From owner-svn-src-all@FreeBSD.ORG Sun Aug 9 11:47:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51D061065674; Sun, 9 Aug 2009 11:47:40 +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 413EB8FC2A; Sun, 9 Aug 2009 11:47:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n79Blehm067103; Sun, 9 Aug 2009 11:47:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n79BleJ7067102; Sun, 9 Aug 2009 11:47:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908091147.n79BleJ7067102@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 9 Aug 2009 11:47: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: r196087 - in stable/7/sys: . contrib/pf 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, 09 Aug 2009 11:47:41 -0000 Author: kib Date: Sun Aug 9 11:47:39 2009 New Revision: 196087 URL: http://svn.freebsd.org/changeset/base/196087 Log: MFC r195773: When buffer write is failed, it is wrong for brelse() to invalidate portion of the page that was written. Among other problems, this page might be picked up by pagedaemon, with failed assertion in vm_pageout_flush() about validity of the page. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/vfs_bio.c Modified: stable/7/sys/kern/vfs_bio.c ============================================================================== --- stable/7/sys/kern/vfs_bio.c Fri Aug 7 15:41:16 2009 (r196086) +++ stable/7/sys/kern/vfs_bio.c Sun Aug 9 11:47:39 2009 (r196087) @@ -1347,7 +1347,8 @@ brelse(struct buf *bp) m = bp->b_pages[i]; } if ((bp->b_flags & B_NOCACHE) || - (bp->b_ioflags & BIO_ERROR)) { + (bp->b_ioflags & BIO_ERROR && + bp->b_iocmd == BIO_READ)) { int poffset = foff & PAGE_MASK; int presid = resid > (PAGE_SIZE - poffset) ? (PAGE_SIZE - poffset) : resid; From owner-svn-src-all@FreeBSD.ORG Sun Aug 9 18:39:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 668C31065677; Sun, 9 Aug 2009 18:39:24 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 550F68FC21; Sun, 9 Aug 2009 18:39: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 n79IdOJw075059; Sun, 9 Aug 2009 18:39:24 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n79IdONq075058; Sun, 9 Aug 2009 18:39:24 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200908091839.n79IdONq075058@svn.freebsd.org> From: Brian Somers Date: Sun, 9 Aug 2009 18:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196088 - stable/7/usr.sbin/ppp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Aug 2009 18:39:25 -0000 Author: brian Date: Sun Aug 9 18:39:23 2009 New Revision: 196088 URL: http://svn.freebsd.org/changeset/base/196088 Log: MFC: Don't get stuck in an infinite loop comparing (short++ <= maxshort) PR: 136893 Submitted by: Aragon Gouveia - aragon at phat dot za dot net (mostly) Modified: stable/7/usr.sbin/ppp/ (props changed) stable/7/usr.sbin/ppp/nat_cmd.c Modified: stable/7/usr.sbin/ppp/nat_cmd.c ============================================================================== --- stable/7/usr.sbin/ppp/nat_cmd.c Sun Aug 9 11:47:39 2009 (r196087) +++ stable/7/usr.sbin/ppp/nat_cmd.c Sun Aug 9 18:39:23 2009 (r196088) @@ -173,7 +173,7 @@ nat_RedirectPort(struct cmdargs const *a return -1; } - while (laliasport <= haliasport) { + do { link = PacketAliasRedirectPort(localaddr, htons(llocalport), remoteaddr, htons(lremoteport), aliasaddr, htons(laliasport), @@ -185,10 +185,9 @@ nat_RedirectPort(struct cmdargs const *a return 1; } llocalport++; - laliasport++; if (hremoteport) lremoteport++; - } + } while (laliasport++ < haliasport); return 0; } From owner-svn-src-all@FreeBSD.ORG Tue Aug 11 16:48:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABD3B1065674; Tue, 11 Aug 2009 16:48:29 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B6078FC48; Tue, 11 Aug 2009 16:48: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 n7BGmTZi036057; Tue, 11 Aug 2009 16:48:29 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7BGmTEc036056; Tue, 11 Aug 2009 16:48:29 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <200908111648.n7BGmTEc036056@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 11 Aug 2009 16:48:29 +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: r196096 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2009 16:48:30 -0000 Author: ken Date: Tue Aug 11 16:48:28 2009 New Revision: 196096 URL: http://svn.freebsd.org/changeset/base/196096 Log: Add Will Andrews (will) back to the src committers list. He will be working on storage and network-related changes. I will be his mentor. Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Tue Aug 11 08:19:15 2009 (r196095) +++ svnadmin/conf/access Tue Aug 11 16:48:28 2009 (r196096) @@ -223,6 +223,7 @@ versus weongyo wes wes@opensail.org wilko freebsd-commits@freebie.xs4all.nl +will wkoszek wollman wpaul From owner-svn-src-all@FreeBSD.ORG Tue Aug 11 16:53:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FF9A106566B; Tue, 11 Aug 2009 16:53:11 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4615E8FC43; Tue, 11 Aug 2009 16:53: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 n7BGrBE7036268; Tue, 11 Aug 2009 16:53:11 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7BGrBLa036266; Tue, 11 Aug 2009 16:53:11 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <200908111653.n7BGrBLa036266@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 11 Aug 2009 16:53:11 +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: r196097 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2009 16:53:11 -0000 Author: ken Date: Tue Aug 11 16:53:08 2009 New Revision: 196097 URL: http://svn.freebsd.org/changeset/base/196097 Log: Mention that I'm mentoring Will Andrews (will). Approved by: core Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Tue Aug 11 16:48:28 2009 (r196096) +++ svnadmin/conf/mentors Tue Aug 11 16:53:08 2009 (r196097) @@ -27,5 +27,6 @@ sbruno scottl snb dwmalone sson gnn versus dds +will ken zec julian Co-mentor: silby zml dfr From owner-svn-src-all@FreeBSD.ORG Tue Aug 11 21:18:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9F24106564A; Tue, 11 Aug 2009 21:18:41 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8A008FC42; Tue, 11 Aug 2009 21:18: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 n7BLIfK9042025; Tue, 11 Aug 2009 21:18:41 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7BLIfqV042023; Tue, 11 Aug 2009 21:18:41 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200908112118.n7BLIfqV042023@svn.freebsd.org> From: Peter Wemm Date: Tue, 11 Aug 2009 21:18:41 +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: r196099 - svnadmin/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Aug 2009 21:18:42 -0000 Author: peter Date: Tue Aug 11 21:18:41 2009 New Revision: 196099 URL: http://svn.freebsd.org/changeset/base/196099 Log: Checkpoint the hacks that have accumulated over time. Usually this is because of ill-advised things like changing properties (eg: keywords) and deleting the file in the same commit. The deprecated API that the exporter uses can't represent that. Modified: svnadmin/tools/export.py Modified: svnadmin/tools/export.py ============================================================================== --- svnadmin/tools/export.py Tue Aug 11 20:39:10 2009 (r196098) +++ svnadmin/tools/export.py Tue Aug 11 21:18:41 2009 (r196099) @@ -313,7 +313,16 @@ def exportrev(pool, fs_ptr, rev, cvspath failed = do_cvs(workpath, '', "cvs -Rq co %s src" % uptag) assert not failed # at this point, the top directory and /src should exist - #print p, path, k + print p, path, k + # hacks + #if p == 'head/contrib/file/FREEBSD-upgrade' and k == 'A': + # continue + #if p == 'head/contrib/file/magic2mime' and k == 'A': + # continue + #if p == 'head/lib/libc/stdio/asprintf.c' and k == 'D': + # continue + if p == 'head/tools/build/options/WITH_BIND_LIBS' and k == 'A' and rev == 193280: + continue makedirs(workpath, _dirname(path), 'src') # Now the directory for the files must exist, and branch tag will be sticky assert os.path.isdir(os.path.join(workpath, _dirname(path))) @@ -352,6 +361,7 @@ def export(pool, repos_path, cvspath): curr_rev = fs.youngest_rev(fs_ptr) last_rev = int(fs.revision_prop(fs_ptr, 0, 'fbsd:lastexp')) if last_rev < curr_rev: + time.sleep(5) print '%d %s' % (last_rev, curr_rev) rev = '%d' % (last_rev + 1) print '==========> export rev ' + rev From owner-svn-src-all@FreeBSD.ORG Tue Aug 11 21:21:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C0F21065677; Tue, 11 Aug 2009 21:21:20 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 493A78FC1F; Tue, 11 Aug 2009 21:21: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 n7BLLK6N042142; Tue, 11 Aug 2009 21:21:20 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7BLLK34042139; Tue, 11 Aug 2009 21:21:20 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200908112121.n7BLLK34042139@svn.freebsd.org> From: Peter Wemm Date: Tue, 11 Aug 2009 21:21:20 +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: r196100 - svnadmin/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Aug 2009 21:21:20 -0000 Author: peter Date: Tue Aug 11 21:21:20 2009 New Revision: 196100 URL: http://svn.freebsd.org/changeset/base/196100 Log: Clone export.py before splitting into two parts. Added: svnadmin/tools/export1.py - copied unchanged from r196099, svnadmin/tools/export.py svnadmin/tools/export2.py - copied unchanged from r196099, svnadmin/tools/export.py Copied: svnadmin/tools/export1.py (from r196099, svnadmin/tools/export.py) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ svnadmin/tools/export1.py Tue Aug 11 21:21:20 2009 (r196100, copy of r196099, svnadmin/tools/export.py) @@ -0,0 +1,381 @@ +#!/usr/local/bin/python + +# $FreeBSD$ + +import string +import sys +import time +import os +import popen2 +import tempfile +from svn import core, fs, delta, repos + +do_keywords = False + +# SVN's API structure is to do callbacks to a class to get notifications +class ChangeReceiver(delta.Editor): + def __init__(self, fs_root, base_root, rev, fs_ptr, pool, do_kw): + self.fs_root = fs_root + self.base_root = base_root + self.fs_ptr = fs_ptr + self.rev = int(rev) + self.pool = pool + self.do_kw = do_kw + self.changes = [] + + def delete_entry(self, path, revision, parent_baton, pool): + self.changes.append(['D', path]) + + def add_file(self, path, parent_baton, + copyfrom_path, copyfrom_revision, file_pool): + self.changes.append(['A', path]) + return [ '_', ' ', None ] + + def open_file(self, path, parent_baton, base_revision, file_pool): + return [ '_', ' ', path ] + + def apply_textdelta(self, file_baton, base_checksum): + text_mod, prop_mod, path = file_baton + file_baton[0] = 'U' + # no handler + return None + + def change_file_prop(self, file_baton, name, value, pool): + text_mod, prop_mod, path = file_baton + if self.do_kw and name == core.SVN_PROP_KEYWORDS: + file_baton[1] = 'U' + + def close_file(self, file_baton, text_checksum): + text_mod, prop_mod, path = file_baton + # test the path. it will be None if we added this file. + if path: + status = text_mod + prop_mod + # was there some kind of change? + if status != '_ ': + self.changes.append(['U', path]) + +# Last path component +def _basename(path): + idx = path.rfind('/') + if idx == -1: + return path + return path[idx+1:] + +# Directory component +def _dirname(path): + idx = path.rfind('/') + if idx == -1: + return '' + return path[:idx] + +# Keep track of best common prefix per directory group to keep commit time down +class pathcollector(): + def __init__(self): + self.paths = {} + + # Not really a set.. calculates common prefix instead. + def __setitem__(self, prefix, dir): + # If we haven't seen a dir, start here + if not self.paths.has_key(prefix): + self.paths[prefix] = dir + return + # If it is the same dir, we're finished + if self.paths[prefix] == dir: + return + # See if we've found a common parent + parent = dir + while _dirname(parent) != parent: + parent = _dirname(parent) + # See if common prefix works + if self.paths[prefix] == parent: + return + # Raise common prefix + if self.paths[prefix].startswith(parent): + self.paths[prefix] = parent + return + print "WTF?" + assert false + + def __iter__(self): + return self.paths.iteritems() + +# Issue a cvs command, aborting if a problem happens +def do_cvs(cvspath, dir, cmd): + ioerror = False + print("cvs path %s, dir %s, cmd %s" % (cvspath, dir, cmd)) + cwd = os.getcwd() + os.chdir(os.path.join(cvspath, dir)) + pipe = popen2.Popen3(cmd) + os.chdir(cwd) + output = '' + try: + output = pipe.fromchild.readlines() + pipe.fromchild.close() + pipe.tochild.close() + except IOError: + ioerror = True + rv = pipe.wait() + failed = (rv != 0) or ioerror + print 'Cvs output: ', output + return failed + +# Dump a file from svn into cvs. This has to apply the delta to the previous rev. +def dump_file(fs_ptr, fs_root, rev, svnpath, cvspath, author, date, pool, workpath): + if do_keywords: + kw = fs.node_prop(fs_root, svnpath, core.SVN_PROP_KEYWORDS) + if not kw: + kw = '' + str = '$' + 'FreeBSD: %s %s %s %s $' % (cvspath, rev, date, author) + #str = '$' + 'FreeBSDId: %s %s %s %s $' % (cvspath, rev, date, author) + + subpool = core.svn_pool_create(pool) + stream = core.Stream(fs.file_contents(fs_root, svnpath, subpool)) + str_list = [] + while 1: + data = stream.read(core.SVN_STREAM_CHUNK_SIZE) + str_list.append(data) + if len(data) < core.SVN_STREAM_CHUNK_SIZE: + break + string = ''.join(str_list) + # Expand keywords + if do_keywords: + if kw == r'FreeBSD=%H': + old = '$' + 'FreeBSD$' + string = string.replace(old, str) + cvsfile = os.path.join(workpath, cvspath) +# sys.stdout.write('File contents:\n=========\n') +# sys.stdout.write(string) +# sys.stdout.write('=========\n') + executable = fs.node_prop(fs_root, svnpath, core.SVN_PROP_EXECUTABLE) + if executable: + mode = 0777 + else: + mode = 0666 + outfile = os.open(cvsfile, os.O_CREAT | os.O_TRUNC | os.O_WRONLY, mode) + if not outfile: + sys.exit('cannot open %s for write' % cvsfile) + n = os.write(outfile, string) + if n != len(string): + sys.exit('short write. %d instead of %d' % (n, len(string))) + os.close(outfile) + core.svn_pool_destroy(subpool) + +# List of paths we export to cvs, and what branch tag (or None for HEAD) +# Hard coded for now. This will be automatically implied based on path transforms. +maptable = [ + # -current head + ( 'head/', None ), + # -stable branches + ( 'stable/2.0.5/', 'RELENG_2_0_5' ), + ( 'stable/2.1/', 'RELENG_2_1_0' ), + ( 'stable/2.2/', 'RELENG_2_2' ), + ( 'stable/3/', 'RELENG_3' ), + ( 'stable/4/', 'RELENG_4' ), + ( 'stable/5/', 'RELENG_5' ), + ( 'stable/6/', 'RELENG_6' ), + ( 'stable/7/', 'RELENG_7' ), + # errata / security / releng branches + ( 'releng/ALPHA_2_0/','ALPHA_2_0' ), + ( 'releng/BETA_2_0/', 'BETA_2_0' ), + ( 'releng/4.3/', 'RELENG_4_3' ), + ( 'releng/4.4/', 'RELENG_4_4' ), + ( 'releng/4.5/', 'RELENG_4_5' ), + ( 'releng/4.6/', 'RELENG_4_6' ), + ( 'releng/4.7/', 'RELENG_4_7' ), + ( 'releng/4.8/', 'RELENG_4_8' ), + ( 'releng/4.9/', 'RELENG_4_9' ), + ( 'releng/4.10/', 'RELENG_4_10' ), + ( 'releng/4.11/', 'RELENG_4_11' ), + ( 'releng/4.12/', 'RELENG_4_12' ), + ( 'releng/5.0/', 'RELENG_5_0' ), + ( 'releng/5.1/', 'RELENG_5_1' ), + ( 'releng/5.2/', 'RELENG_5_2' ), + ( 'releng/5.3/', 'RELENG_5_3' ), + ( 'releng/5.4/', 'RELENG_5_4' ), + ( 'releng/5.5/', 'RELENG_5_5' ), + ( 'releng/5.6/', 'RELENG_5_6' ), + ( 'releng/6.0/', 'RELENG_6_0' ), + ( 'releng/6.1/', 'RELENG_6_1' ), + ( 'releng/6.2/', 'RELENG_6_2' ), + ( 'releng/6.3/', 'RELENG_6_3' ), + ( 'releng/6.4/', 'RELENG_6_4' ), + ( 'releng/7.0/', 'RELENG_7_0' ), + ( 'releng/7.1/', 'RELENG_7_1' ), + ( 'releng/7.2/', 'RELENG_7_2' ), +] + +def map2cvs(svnpath): + for prefix, branch in maptable: + plen = len(prefix) + if svnpath.startswith(prefix): + return 'src/' + svnpath[plen:], branch + return None, None + +# List of special remap cases. +roottable = [ + ( 'svnadmin/conf/access', 'CVSROOT/access', 'CVSROOT' ), + ( 'svnadmin/conf/mentors', 'CVSROOT/mentors', 'CVSROOT' ), +] + +def maproot(p): + for svnpath, path, dir in roottable: + if p == svnpath: + return path, dir + return None, None + +# Add intermediate directories to the cvs checkout area as needed. +# XXX should use 'cvs update -d -l' if the dir exists in cvsroot +def makedirs(cvspath, path, base): + #print 'Makedirs:', cvspath, path + if not path.startswith(base): + sys.exit('Illegal path %s' % path) + if path == base: + return + makedirs(cvspath, _dirname(path), base) + fullpath = os.path.join(cvspath, path) + if os.path.isfile(fullpath): + sys.exit('Dest dir is a file' % path) + if not os.path.isdir(fullpath): + try: + #print "Making directory " + fullpath + os.makedirs(fullpath) + failed = do_cvs(cvspath, _dirname(path), "cvs -q add %s" % _basename(path)) + assert not failed + except OSError: + sys.exit('Cannot mkdir %s' % path) + #print 'Dirpath complete: ' + path + +# Export a single change to cvs. +def exportrev(pool, fs_ptr, rev, cvspath): + def authz_cb(root, path, pool): + return True + + subpool = core.svn_pool_create(pool) + # Connect up to the revision + fs_root = fs.revision_root(fs_ptr, rev, subpool) + base_root = fs.revision_root(fs_ptr, rev - 1, subpool) + editor = ChangeReceiver(fs_root, base_root, rev, fs_ptr, subpool, do_keywords) + e_ptr, e_baton = delta.make_editor(editor, subpool) + repos.dir_delta(base_root, '', '', fs_root, '', e_ptr, e_baton, authz_cb, 0, 1, 0, 0, subpool) + + # Author + author = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_AUTHOR) + if not author: + author = 'NoAuthor' + if author == 'davidg': + author = 'dg' + os.environ['CVS_AUTHOR'] = author + print 'Author: ' + author + + # Date + date = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_DATE) + if date: + aprtime = core.svn_time_from_cstring(date) + secs = aprtime / 1000000 # aprtime is microseconds; make seconds + tm = time.gmtime(secs) + date = time.strftime('%Y-%m-%d %H:%M:%SZ', tm) + os.environ['CVS_TIMESTAMP'] = "%d" % secs + else: + date = 'NoDate' + if os.environ.has_key('CVS_TIMESTAMP'): + del os.environ['CVS_TIMESTAMP'] + + # Build log message to export + cvslog = 'SVN rev %d on %s by %s\n' % (rev, date, author) + svnlog = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_LOG) + if svnlog: + cvslog += '\n' + svnlog + + pc = pathcollector() + + for k, p in editor.changes: + #print 'Path ', p + # Hack, hack + (path, dir) = maproot(p) + if path: + workpath = cvspath + dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) + pc[workpath] = dir + continue + (path, tag) = map2cvs(p) + if not path: + continue + if tag: + workpath = os.path.join(cvspath, tag) + uptag = '-r ' + tag + else: + workpath = cvspath + uptag = '-A' + #print workpath + if not os.path.isdir(workpath): + os.makedirs(workpath) + if not os.path.isdir(os.path.join(workpath, 'src')): + failed = do_cvs(workpath, '', "cvs -Rq co %s src" % uptag) + assert not failed + # at this point, the top directory and /src should exist + print p, path, k + # hacks + #if p == 'head/contrib/file/FREEBSD-upgrade' and k == 'A': + # continue + #if p == 'head/contrib/file/magic2mime' and k == 'A': + # continue + #if p == 'head/lib/libc/stdio/asprintf.c' and k == 'D': + # continue + if p == 'head/tools/build/options/WITH_BIND_LIBS' and k == 'A' and rev == 193280: + continue + makedirs(workpath, _dirname(path), 'src') + # Now the directory for the files must exist, and branch tag will be sticky + assert os.path.isdir(os.path.join(workpath, _dirname(path))) + assert k == 'A' or k == 'U' or k == 'D' + + if k == 'A' or k == 'U': + print 'add/update file ' + path + '.' + destpath = os.path.join(workpath, path) + existed = os.path.isfile(destpath) + dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) + if not existed: + print 'cvs add file ' + path + '.' + failed = do_cvs(workpath, _dirname(path), "cvs -q add %s" % _basename(path)) + assert not failed + elif k == 'D': + print 'cvs rm -f file ' + path + '.' + failed = do_cvs(workpath, _dirname(path), "cvs -q rm -f %s" % _basename(path)) + assert not failed + pc[workpath] = _dirname(path) + + # aggregate the commit + for root, dir in pc: + fd, logfile = tempfile.mkstemp() + os.write(fd, cvslog) + os.close(fd) + failed = do_cvs(root, dir, "cvs -q commit -F %s" % logfile) + assert not failed + os.remove(logfile) + core.svn_pool_destroy(subpool) + +# Loop for the export range +def export(pool, repos_path, cvspath): + repos_path = core.svn_path_canonicalize(repos_path) + fs_ptr = repos.fs(repos.open(repos_path, pool)) + while True: + curr_rev = fs.youngest_rev(fs_ptr) + last_rev = int(fs.revision_prop(fs_ptr, 0, 'fbsd:lastexp')) + if last_rev < curr_rev: + time.sleep(5) + print '%d %s' % (last_rev, curr_rev) + rev = '%d' % (last_rev + 1) + print '==========> export rev ' + rev + exportrev(pool, fs_ptr, last_rev + 1, cvspath) + fs.change_rev_prop(fs_ptr, 0, 'fbsd:lastexp', rev) + continue + print "." + time.sleep(15) + + +if __name__ == '__main__': + print "Version: $FreeBSD$" + os.environ['CVSROOT'] = '/r/ncvs' + core.run_app(export, '/r/svnmirror/base', '/r/svn2cvs/cvs') + # test rig + #os.environ['CVSROOT'] = '/home/peter/exp/cvs' + #core.run_app(export, '/home/peter/exp/svn', '/home/peter/exp/co') Copied: svnadmin/tools/export2.py (from r196099, svnadmin/tools/export.py) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ svnadmin/tools/export2.py Tue Aug 11 21:21:20 2009 (r196100, copy of r196099, svnadmin/tools/export.py) @@ -0,0 +1,381 @@ +#!/usr/local/bin/python + +# $FreeBSD$ + +import string +import sys +import time +import os +import popen2 +import tempfile +from svn import core, fs, delta, repos + +do_keywords = False + +# SVN's API structure is to do callbacks to a class to get notifications +class ChangeReceiver(delta.Editor): + def __init__(self, fs_root, base_root, rev, fs_ptr, pool, do_kw): + self.fs_root = fs_root + self.base_root = base_root + self.fs_ptr = fs_ptr + self.rev = int(rev) + self.pool = pool + self.do_kw = do_kw + self.changes = [] + + def delete_entry(self, path, revision, parent_baton, pool): + self.changes.append(['D', path]) + + def add_file(self, path, parent_baton, + copyfrom_path, copyfrom_revision, file_pool): + self.changes.append(['A', path]) + return [ '_', ' ', None ] + + def open_file(self, path, parent_baton, base_revision, file_pool): + return [ '_', ' ', path ] + + def apply_textdelta(self, file_baton, base_checksum): + text_mod, prop_mod, path = file_baton + file_baton[0] = 'U' + # no handler + return None + + def change_file_prop(self, file_baton, name, value, pool): + text_mod, prop_mod, path = file_baton + if self.do_kw and name == core.SVN_PROP_KEYWORDS: + file_baton[1] = 'U' + + def close_file(self, file_baton, text_checksum): + text_mod, prop_mod, path = file_baton + # test the path. it will be None if we added this file. + if path: + status = text_mod + prop_mod + # was there some kind of change? + if status != '_ ': + self.changes.append(['U', path]) + +# Last path component +def _basename(path): + idx = path.rfind('/') + if idx == -1: + return path + return path[idx+1:] + +# Directory component +def _dirname(path): + idx = path.rfind('/') + if idx == -1: + return '' + return path[:idx] + +# Keep track of best common prefix per directory group to keep commit time down +class pathcollector(): + def __init__(self): + self.paths = {} + + # Not really a set.. calculates common prefix instead. + def __setitem__(self, prefix, dir): + # If we haven't seen a dir, start here + if not self.paths.has_key(prefix): + self.paths[prefix] = dir + return + # If it is the same dir, we're finished + if self.paths[prefix] == dir: + return + # See if we've found a common parent + parent = dir + while _dirname(parent) != parent: + parent = _dirname(parent) + # See if common prefix works + if self.paths[prefix] == parent: + return + # Raise common prefix + if self.paths[prefix].startswith(parent): + self.paths[prefix] = parent + return + print "WTF?" + assert false + + def __iter__(self): + return self.paths.iteritems() + +# Issue a cvs command, aborting if a problem happens +def do_cvs(cvspath, dir, cmd): + ioerror = False + print("cvs path %s, dir %s, cmd %s" % (cvspath, dir, cmd)) + cwd = os.getcwd() + os.chdir(os.path.join(cvspath, dir)) + pipe = popen2.Popen3(cmd) + os.chdir(cwd) + output = '' + try: + output = pipe.fromchild.readlines() + pipe.fromchild.close() + pipe.tochild.close() + except IOError: + ioerror = True + rv = pipe.wait() + failed = (rv != 0) or ioerror + print 'Cvs output: ', output + return failed + +# Dump a file from svn into cvs. This has to apply the delta to the previous rev. +def dump_file(fs_ptr, fs_root, rev, svnpath, cvspath, author, date, pool, workpath): + if do_keywords: + kw = fs.node_prop(fs_root, svnpath, core.SVN_PROP_KEYWORDS) + if not kw: + kw = '' + str = '$' + 'FreeBSD: %s %s %s %s $' % (cvspath, rev, date, author) + #str = '$' + 'FreeBSDId: %s %s %s %s $' % (cvspath, rev, date, author) + + subpool = core.svn_pool_create(pool) + stream = core.Stream(fs.file_contents(fs_root, svnpath, subpool)) + str_list = [] + while 1: + data = stream.read(core.SVN_STREAM_CHUNK_SIZE) + str_list.append(data) + if len(data) < core.SVN_STREAM_CHUNK_SIZE: + break + string = ''.join(str_list) + # Expand keywords + if do_keywords: + if kw == r'FreeBSD=%H': + old = '$' + 'FreeBSD$' + string = string.replace(old, str) + cvsfile = os.path.join(workpath, cvspath) +# sys.stdout.write('File contents:\n=========\n') +# sys.stdout.write(string) +# sys.stdout.write('=========\n') + executable = fs.node_prop(fs_root, svnpath, core.SVN_PROP_EXECUTABLE) + if executable: + mode = 0777 + else: + mode = 0666 + outfile = os.open(cvsfile, os.O_CREAT | os.O_TRUNC | os.O_WRONLY, mode) + if not outfile: + sys.exit('cannot open %s for write' % cvsfile) + n = os.write(outfile, string) + if n != len(string): + sys.exit('short write. %d instead of %d' % (n, len(string))) + os.close(outfile) + core.svn_pool_destroy(subpool) + +# List of paths we export to cvs, and what branch tag (or None for HEAD) +# Hard coded for now. This will be automatically implied based on path transforms. +maptable = [ + # -current head + ( 'head/', None ), + # -stable branches + ( 'stable/2.0.5/', 'RELENG_2_0_5' ), + ( 'stable/2.1/', 'RELENG_2_1_0' ), + ( 'stable/2.2/', 'RELENG_2_2' ), + ( 'stable/3/', 'RELENG_3' ), + ( 'stable/4/', 'RELENG_4' ), + ( 'stable/5/', 'RELENG_5' ), + ( 'stable/6/', 'RELENG_6' ), + ( 'stable/7/', 'RELENG_7' ), + # errata / security / releng branches + ( 'releng/ALPHA_2_0/','ALPHA_2_0' ), + ( 'releng/BETA_2_0/', 'BETA_2_0' ), + ( 'releng/4.3/', 'RELENG_4_3' ), + ( 'releng/4.4/', 'RELENG_4_4' ), + ( 'releng/4.5/', 'RELENG_4_5' ), + ( 'releng/4.6/', 'RELENG_4_6' ), + ( 'releng/4.7/', 'RELENG_4_7' ), + ( 'releng/4.8/', 'RELENG_4_8' ), + ( 'releng/4.9/', 'RELENG_4_9' ), + ( 'releng/4.10/', 'RELENG_4_10' ), + ( 'releng/4.11/', 'RELENG_4_11' ), + ( 'releng/4.12/', 'RELENG_4_12' ), + ( 'releng/5.0/', 'RELENG_5_0' ), + ( 'releng/5.1/', 'RELENG_5_1' ), + ( 'releng/5.2/', 'RELENG_5_2' ), + ( 'releng/5.3/', 'RELENG_5_3' ), + ( 'releng/5.4/', 'RELENG_5_4' ), + ( 'releng/5.5/', 'RELENG_5_5' ), + ( 'releng/5.6/', 'RELENG_5_6' ), + ( 'releng/6.0/', 'RELENG_6_0' ), + ( 'releng/6.1/', 'RELENG_6_1' ), + ( 'releng/6.2/', 'RELENG_6_2' ), + ( 'releng/6.3/', 'RELENG_6_3' ), + ( 'releng/6.4/', 'RELENG_6_4' ), + ( 'releng/7.0/', 'RELENG_7_0' ), + ( 'releng/7.1/', 'RELENG_7_1' ), + ( 'releng/7.2/', 'RELENG_7_2' ), +] + +def map2cvs(svnpath): + for prefix, branch in maptable: + plen = len(prefix) + if svnpath.startswith(prefix): + return 'src/' + svnpath[plen:], branch + return None, None + +# List of special remap cases. +roottable = [ + ( 'svnadmin/conf/access', 'CVSROOT/access', 'CVSROOT' ), + ( 'svnadmin/conf/mentors', 'CVSROOT/mentors', 'CVSROOT' ), +] + +def maproot(p): + for svnpath, path, dir in roottable: + if p == svnpath: + return path, dir + return None, None + +# Add intermediate directories to the cvs checkout area as needed. +# XXX should use 'cvs update -d -l' if the dir exists in cvsroot +def makedirs(cvspath, path, base): + #print 'Makedirs:', cvspath, path + if not path.startswith(base): + sys.exit('Illegal path %s' % path) + if path == base: + return + makedirs(cvspath, _dirname(path), base) + fullpath = os.path.join(cvspath, path) + if os.path.isfile(fullpath): + sys.exit('Dest dir is a file' % path) + if not os.path.isdir(fullpath): + try: + #print "Making directory " + fullpath + os.makedirs(fullpath) + failed = do_cvs(cvspath, _dirname(path), "cvs -q add %s" % _basename(path)) + assert not failed + except OSError: + sys.exit('Cannot mkdir %s' % path) + #print 'Dirpath complete: ' + path + +# Export a single change to cvs. +def exportrev(pool, fs_ptr, rev, cvspath): + def authz_cb(root, path, pool): + return True + + subpool = core.svn_pool_create(pool) + # Connect up to the revision + fs_root = fs.revision_root(fs_ptr, rev, subpool) + base_root = fs.revision_root(fs_ptr, rev - 1, subpool) + editor = ChangeReceiver(fs_root, base_root, rev, fs_ptr, subpool, do_keywords) + e_ptr, e_baton = delta.make_editor(editor, subpool) + repos.dir_delta(base_root, '', '', fs_root, '', e_ptr, e_baton, authz_cb, 0, 1, 0, 0, subpool) + + # Author + author = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_AUTHOR) + if not author: + author = 'NoAuthor' + if author == 'davidg': + author = 'dg' + os.environ['CVS_AUTHOR'] = author + print 'Author: ' + author + + # Date + date = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_DATE) + if date: + aprtime = core.svn_time_from_cstring(date) + secs = aprtime / 1000000 # aprtime is microseconds; make seconds + tm = time.gmtime(secs) + date = time.strftime('%Y-%m-%d %H:%M:%SZ', tm) + os.environ['CVS_TIMESTAMP'] = "%d" % secs + else: + date = 'NoDate' + if os.environ.has_key('CVS_TIMESTAMP'): + del os.environ['CVS_TIMESTAMP'] + + # Build log message to export + cvslog = 'SVN rev %d on %s by %s\n' % (rev, date, author) + svnlog = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_LOG) + if svnlog: + cvslog += '\n' + svnlog + + pc = pathcollector() + + for k, p in editor.changes: + #print 'Path ', p + # Hack, hack + (path, dir) = maproot(p) + if path: + workpath = cvspath + dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) + pc[workpath] = dir + continue + (path, tag) = map2cvs(p) + if not path: + continue + if tag: + workpath = os.path.join(cvspath, tag) + uptag = '-r ' + tag + else: + workpath = cvspath + uptag = '-A' + #print workpath + if not os.path.isdir(workpath): + os.makedirs(workpath) + if not os.path.isdir(os.path.join(workpath, 'src')): + failed = do_cvs(workpath, '', "cvs -Rq co %s src" % uptag) + assert not failed + # at this point, the top directory and /src should exist + print p, path, k + # hacks + #if p == 'head/contrib/file/FREEBSD-upgrade' and k == 'A': + # continue + #if p == 'head/contrib/file/magic2mime' and k == 'A': + # continue + #if p == 'head/lib/libc/stdio/asprintf.c' and k == 'D': + # continue + if p == 'head/tools/build/options/WITH_BIND_LIBS' and k == 'A' and rev == 193280: + continue + makedirs(workpath, _dirname(path), 'src') + # Now the directory for the files must exist, and branch tag will be sticky + assert os.path.isdir(os.path.join(workpath, _dirname(path))) + assert k == 'A' or k == 'U' or k == 'D' + + if k == 'A' or k == 'U': + print 'add/update file ' + path + '.' + destpath = os.path.join(workpath, path) + existed = os.path.isfile(destpath) + dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) + if not existed: + print 'cvs add file ' + path + '.' + failed = do_cvs(workpath, _dirname(path), "cvs -q add %s" % _basename(path)) + assert not failed + elif k == 'D': + print 'cvs rm -f file ' + path + '.' + failed = do_cvs(workpath, _dirname(path), "cvs -q rm -f %s" % _basename(path)) + assert not failed + pc[workpath] = _dirname(path) + + # aggregate the commit + for root, dir in pc: + fd, logfile = tempfile.mkstemp() + os.write(fd, cvslog) + os.close(fd) + failed = do_cvs(root, dir, "cvs -q commit -F %s" % logfile) + assert not failed + os.remove(logfile) + core.svn_pool_destroy(subpool) + +# Loop for the export range +def export(pool, repos_path, cvspath): + repos_path = core.svn_path_canonicalize(repos_path) + fs_ptr = repos.fs(repos.open(repos_path, pool)) + while True: + curr_rev = fs.youngest_rev(fs_ptr) + last_rev = int(fs.revision_prop(fs_ptr, 0, 'fbsd:lastexp')) + if last_rev < curr_rev: + time.sleep(5) + print '%d %s' % (last_rev, curr_rev) + rev = '%d' % (last_rev + 1) + print '==========> export rev ' + rev + exportrev(pool, fs_ptr, last_rev + 1, cvspath) + fs.change_rev_prop(fs_ptr, 0, 'fbsd:lastexp', rev) + continue + print "." + time.sleep(15) + + +if __name__ == '__main__': + print "Version: $FreeBSD$" + os.environ['CVSROOT'] = '/r/ncvs' + core.run_app(export, '/r/svnmirror/base', '/r/svn2cvs/cvs') + # test rig + #os.environ['CVSROOT'] = '/home/peter/exp/cvs' + #core.run_app(export, '/home/peter/exp/svn', '/home/peter/exp/co') From owner-svn-src-all@FreeBSD.ORG Tue Aug 11 21:23:31 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74C1E106566B; Tue, 11 Aug 2009 21:23:31 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61E2C8FC1F; Tue, 11 Aug 2009 21:23: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 n7BLNVNZ042233; Tue, 11 Aug 2009 21:23:31 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7BLNVhj042230; Tue, 11 Aug 2009 21:23:31 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200908112123.n7BLNVhj042230@svn.freebsd.org> From: Peter Wemm Date: Tue, 11 Aug 2009 21:23:31 +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: r196101 - svnadmin/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Aug 2009 21:23:32 -0000 Author: peter Date: Tue Aug 11 21:23:31 2009 New Revision: 196101 URL: http://svn.freebsd.org/changeset/base/196101 Log: WIP: split exporter into two halves, persistent driver that tracks the repository, and a backend that exports a single rev. Modified: svnadmin/tools/export1.py svnadmin/tools/export2.py Modified: svnadmin/tools/export1.py ============================================================================== --- svnadmin/tools/export1.py Tue Aug 11 21:21:20 2009 (r196100) +++ svnadmin/tools/export1.py Tue Aug 11 21:23:31 2009 (r196101) @@ -10,103 +10,10 @@ import popen2 import tempfile from svn import core, fs, delta, repos -do_keywords = False - -# SVN's API structure is to do callbacks to a class to get notifications -class ChangeReceiver(delta.Editor): - def __init__(self, fs_root, base_root, rev, fs_ptr, pool, do_kw): - self.fs_root = fs_root - self.base_root = base_root - self.fs_ptr = fs_ptr - self.rev = int(rev) - self.pool = pool - self.do_kw = do_kw - self.changes = [] - - def delete_entry(self, path, revision, parent_baton, pool): - self.changes.append(['D', path]) - - def add_file(self, path, parent_baton, - copyfrom_path, copyfrom_revision, file_pool): - self.changes.append(['A', path]) - return [ '_', ' ', None ] - - def open_file(self, path, parent_baton, base_revision, file_pool): - return [ '_', ' ', path ] - - def apply_textdelta(self, file_baton, base_checksum): - text_mod, prop_mod, path = file_baton - file_baton[0] = 'U' - # no handler - return None - - def change_file_prop(self, file_baton, name, value, pool): - text_mod, prop_mod, path = file_baton - if self.do_kw and name == core.SVN_PROP_KEYWORDS: - file_baton[1] = 'U' - - def close_file(self, file_baton, text_checksum): - text_mod, prop_mod, path = file_baton - # test the path. it will be None if we added this file. - if path: - status = text_mod + prop_mod - # was there some kind of change? - if status != '_ ': - self.changes.append(['U', path]) - -# Last path component -def _basename(path): - idx = path.rfind('/') - if idx == -1: - return path - return path[idx+1:] - -# Directory component -def _dirname(path): - idx = path.rfind('/') - if idx == -1: - return '' - return path[:idx] - -# Keep track of best common prefix per directory group to keep commit time down -class pathcollector(): - def __init__(self): - self.paths = {} - - # Not really a set.. calculates common prefix instead. - def __setitem__(self, prefix, dir): - # If we haven't seen a dir, start here - if not self.paths.has_key(prefix): - self.paths[prefix] = dir - return - # If it is the same dir, we're finished - if self.paths[prefix] == dir: - return - # See if we've found a common parent - parent = dir - while _dirname(parent) != parent: - parent = _dirname(parent) - # See if common prefix works - if self.paths[prefix] == parent: - return - # Raise common prefix - if self.paths[prefix].startswith(parent): - self.paths[prefix] = parent - return - print "WTF?" - assert false - - def __iter__(self): - return self.paths.iteritems() - -# Issue a cvs command, aborting if a problem happens -def do_cvs(cvspath, dir, cmd): +# Issue an export command, aborting if a problem happens +def do_export(cmd): ioerror = False - print("cvs path %s, dir %s, cmd %s" % (cvspath, dir, cmd)) - cwd = os.getcwd() - os.chdir(os.path.join(cvspath, dir)) pipe = popen2.Popen3(cmd) - os.chdir(cwd) output = '' try: output = pipe.fromchild.readlines() @@ -116,256 +23,24 @@ def do_cvs(cvspath, dir, cmd): ioerror = True rv = pipe.wait() failed = (rv != 0) or ioerror - print 'Cvs output: ', output + print 'export2 output: ', output return failed # Dump a file from svn into cvs. This has to apply the delta to the previous rev. -def dump_file(fs_ptr, fs_root, rev, svnpath, cvspath, author, date, pool, workpath): - if do_keywords: - kw = fs.node_prop(fs_root, svnpath, core.SVN_PROP_KEYWORDS) - if not kw: - kw = '' - str = '$' + 'FreeBSD: %s %s %s %s $' % (cvspath, rev, date, author) - #str = '$' + 'FreeBSDId: %s %s %s %s $' % (cvspath, rev, date, author) - - subpool = core.svn_pool_create(pool) - stream = core.Stream(fs.file_contents(fs_root, svnpath, subpool)) - str_list = [] - while 1: - data = stream.read(core.SVN_STREAM_CHUNK_SIZE) - str_list.append(data) - if len(data) < core.SVN_STREAM_CHUNK_SIZE: - break - string = ''.join(str_list) - # Expand keywords - if do_keywords: - if kw == r'FreeBSD=%H': - old = '$' + 'FreeBSD$' - string = string.replace(old, str) - cvsfile = os.path.join(workpath, cvspath) -# sys.stdout.write('File contents:\n=========\n') -# sys.stdout.write(string) -# sys.stdout.write('=========\n') - executable = fs.node_prop(fs_root, svnpath, core.SVN_PROP_EXECUTABLE) - if executable: - mode = 0777 - else: - mode = 0666 - outfile = os.open(cvsfile, os.O_CREAT | os.O_TRUNC | os.O_WRONLY, mode) - if not outfile: - sys.exit('cannot open %s for write' % cvsfile) - n = os.write(outfile, string) - if n != len(string): - sys.exit('short write. %d instead of %d' % (n, len(string))) - os.close(outfile) - core.svn_pool_destroy(subpool) - -# List of paths we export to cvs, and what branch tag (or None for HEAD) -# Hard coded for now. This will be automatically implied based on path transforms. -maptable = [ - # -current head - ( 'head/', None ), - # -stable branches - ( 'stable/2.0.5/', 'RELENG_2_0_5' ), - ( 'stable/2.1/', 'RELENG_2_1_0' ), - ( 'stable/2.2/', 'RELENG_2_2' ), - ( 'stable/3/', 'RELENG_3' ), - ( 'stable/4/', 'RELENG_4' ), - ( 'stable/5/', 'RELENG_5' ), - ( 'stable/6/', 'RELENG_6' ), - ( 'stable/7/', 'RELENG_7' ), - # errata / security / releng branches - ( 'releng/ALPHA_2_0/','ALPHA_2_0' ), - ( 'releng/BETA_2_0/', 'BETA_2_0' ), - ( 'releng/4.3/', 'RELENG_4_3' ), - ( 'releng/4.4/', 'RELENG_4_4' ), - ( 'releng/4.5/', 'RELENG_4_5' ), - ( 'releng/4.6/', 'RELENG_4_6' ), - ( 'releng/4.7/', 'RELENG_4_7' ), - ( 'releng/4.8/', 'RELENG_4_8' ), - ( 'releng/4.9/', 'RELENG_4_9' ), - ( 'releng/4.10/', 'RELENG_4_10' ), - ( 'releng/4.11/', 'RELENG_4_11' ), - ( 'releng/4.12/', 'RELENG_4_12' ), - ( 'releng/5.0/', 'RELENG_5_0' ), - ( 'releng/5.1/', 'RELENG_5_1' ), - ( 'releng/5.2/', 'RELENG_5_2' ), - ( 'releng/5.3/', 'RELENG_5_3' ), - ( 'releng/5.4/', 'RELENG_5_4' ), - ( 'releng/5.5/', 'RELENG_5_5' ), - ( 'releng/5.6/', 'RELENG_5_6' ), - ( 'releng/6.0/', 'RELENG_6_0' ), - ( 'releng/6.1/', 'RELENG_6_1' ), - ( 'releng/6.2/', 'RELENG_6_2' ), - ( 'releng/6.3/', 'RELENG_6_3' ), - ( 'releng/6.4/', 'RELENG_6_4' ), - ( 'releng/7.0/', 'RELENG_7_0' ), - ( 'releng/7.1/', 'RELENG_7_1' ), - ( 'releng/7.2/', 'RELENG_7_2' ), -] - -def map2cvs(svnpath): - for prefix, branch in maptable: - plen = len(prefix) - if svnpath.startswith(prefix): - return 'src/' + svnpath[plen:], branch - return None, None - -# List of special remap cases. -roottable = [ - ( 'svnadmin/conf/access', 'CVSROOT/access', 'CVSROOT' ), - ( 'svnadmin/conf/mentors', 'CVSROOT/mentors', 'CVSROOT' ), -] - -def maproot(p): - for svnpath, path, dir in roottable: - if p == svnpath: - return path, dir - return None, None - -# Add intermediate directories to the cvs checkout area as needed. -# XXX should use 'cvs update -d -l' if the dir exists in cvsroot -def makedirs(cvspath, path, base): - #print 'Makedirs:', cvspath, path - if not path.startswith(base): - sys.exit('Illegal path %s' % path) - if path == base: - return - makedirs(cvspath, _dirname(path), base) - fullpath = os.path.join(cvspath, path) - if os.path.isfile(fullpath): - sys.exit('Dest dir is a file' % path) - if not os.path.isdir(fullpath): - try: - #print "Making directory " + fullpath - os.makedirs(fullpath) - failed = do_cvs(cvspath, _dirname(path), "cvs -q add %s" % _basename(path)) - assert not failed - except OSError: - sys.exit('Cannot mkdir %s' % path) - #print 'Dirpath complete: ' + path - -# Export a single change to cvs. -def exportrev(pool, fs_ptr, rev, cvspath): - def authz_cb(root, path, pool): - return True - - subpool = core.svn_pool_create(pool) - # Connect up to the revision - fs_root = fs.revision_root(fs_ptr, rev, subpool) - base_root = fs.revision_root(fs_ptr, rev - 1, subpool) - editor = ChangeReceiver(fs_root, base_root, rev, fs_ptr, subpool, do_keywords) - e_ptr, e_baton = delta.make_editor(editor, subpool) - repos.dir_delta(base_root, '', '', fs_root, '', e_ptr, e_baton, authz_cb, 0, 1, 0, 0, subpool) - - # Author - author = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_AUTHOR) - if not author: - author = 'NoAuthor' - if author == 'davidg': - author = 'dg' - os.environ['CVS_AUTHOR'] = author - print 'Author: ' + author - - # Date - date = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_DATE) - if date: - aprtime = core.svn_time_from_cstring(date) - secs = aprtime / 1000000 # aprtime is microseconds; make seconds - tm = time.gmtime(secs) - date = time.strftime('%Y-%m-%d %H:%M:%SZ', tm) - os.environ['CVS_TIMESTAMP'] = "%d" % secs - else: - date = 'NoDate' - if os.environ.has_key('CVS_TIMESTAMP'): - del os.environ['CVS_TIMESTAMP'] - - # Build log message to export - cvslog = 'SVN rev %d on %s by %s\n' % (rev, date, author) - svnlog = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_LOG) - if svnlog: - cvslog += '\n' + svnlog - - pc = pathcollector() - - for k, p in editor.changes: - #print 'Path ', p - # Hack, hack - (path, dir) = maproot(p) - if path: - workpath = cvspath - dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) - pc[workpath] = dir - continue - (path, tag) = map2cvs(p) - if not path: - continue - if tag: - workpath = os.path.join(cvspath, tag) - uptag = '-r ' + tag - else: - workpath = cvspath - uptag = '-A' - #print workpath - if not os.path.isdir(workpath): - os.makedirs(workpath) - if not os.path.isdir(os.path.join(workpath, 'src')): - failed = do_cvs(workpath, '', "cvs -Rq co %s src" % uptag) - assert not failed - # at this point, the top directory and /src should exist - print p, path, k - # hacks - #if p == 'head/contrib/file/FREEBSD-upgrade' and k == 'A': - # continue - #if p == 'head/contrib/file/magic2mime' and k == 'A': - # continue - #if p == 'head/lib/libc/stdio/asprintf.c' and k == 'D': - # continue - if p == 'head/tools/build/options/WITH_BIND_LIBS' and k == 'A' and rev == 193280: - continue - makedirs(workpath, _dirname(path), 'src') - # Now the directory for the files must exist, and branch tag will be sticky - assert os.path.isdir(os.path.join(workpath, _dirname(path))) - assert k == 'A' or k == 'U' or k == 'D' - - if k == 'A' or k == 'U': - print 'add/update file ' + path + '.' - destpath = os.path.join(workpath, path) - existed = os.path.isfile(destpath) - dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) - if not existed: - print 'cvs add file ' + path + '.' - failed = do_cvs(workpath, _dirname(path), "cvs -q add %s" % _basename(path)) - assert not failed - elif k == 'D': - print 'cvs rm -f file ' + path + '.' - failed = do_cvs(workpath, _dirname(path), "cvs -q rm -f %s" % _basename(path)) - assert not failed - pc[workpath] = _dirname(path) - - # aggregate the commit - for root, dir in pc: - fd, logfile = tempfile.mkstemp() - os.write(fd, cvslog) - os.close(fd) - failed = do_cvs(root, dir, "cvs -q commit -F %s" % logfile) - assert not failed - os.remove(logfile) - core.svn_pool_destroy(subpool) - # Loop for the export range -def export(pool, repos_path, cvspath): +def export(pool, repos_path, cvspath, cvsroot): repos_path = core.svn_path_canonicalize(repos_path) fs_ptr = repos.fs(repos.open(repos_path, pool)) while True: curr_rev = fs.youngest_rev(fs_ptr) last_rev = int(fs.revision_prop(fs_ptr, 0, 'fbsd:lastexp')) if last_rev < curr_rev: - time.sleep(5) print '%d %s' % (last_rev, curr_rev) rev = '%d' % (last_rev + 1) print '==========> export rev ' + rev - exportrev(pool, fs_ptr, last_rev + 1, cvspath) + cmd = './export2.py %s %s %d %s' % (repos_path, cvspath, last_rev + 1, cvsroot) + failed = do_export(cmd) + assert not failed fs.change_rev_prop(fs_ptr, 0, 'fbsd:lastexp', rev) continue print "." @@ -374,8 +49,4 @@ def export(pool, repos_path, cvspath): if __name__ == '__main__': print "Version: $FreeBSD$" - os.environ['CVSROOT'] = '/r/ncvs' - core.run_app(export, '/r/svnmirror/base', '/r/svn2cvs/cvs') - # test rig - #os.environ['CVSROOT'] = '/home/peter/exp/cvs' - #core.run_app(export, '/home/peter/exp/svn', '/home/peter/exp/co') + core.run_app(export, '/r/svnmirror/base', '/r/svn2cvs/cvs', '/r/ncvs') Modified: svnadmin/tools/export2.py ============================================================================== --- svnadmin/tools/export2.py Tue Aug 11 21:21:20 2009 (r196100) +++ svnadmin/tools/export2.py Tue Aug 11 21:23:31 2009 (r196101) @@ -354,28 +354,14 @@ def exportrev(pool, fs_ptr, rev, cvspath core.svn_pool_destroy(subpool) # Loop for the export range -def export(pool, repos_path, cvspath): +def export(pool, repos_path, cvspath, rev): repos_path = core.svn_path_canonicalize(repos_path) fs_ptr = repos.fs(repos.open(repos_path, pool)) - while True: - curr_rev = fs.youngest_rev(fs_ptr) - last_rev = int(fs.revision_prop(fs_ptr, 0, 'fbsd:lastexp')) - if last_rev < curr_rev: - time.sleep(5) - print '%d %s' % (last_rev, curr_rev) - rev = '%d' % (last_rev + 1) - print '==========> export rev ' + rev - exportrev(pool, fs_ptr, last_rev + 1, cvspath) - fs.change_rev_prop(fs_ptr, 0, 'fbsd:lastexp', rev) - continue - print "." - time.sleep(15) - + print '==========> export rev ' + rev + exportrev(pool, fs_ptr, rev, cvspath) if __name__ == '__main__': print "Version: $FreeBSD$" - os.environ['CVSROOT'] = '/r/ncvs' - core.run_app(export, '/r/svnmirror/base', '/r/svn2cvs/cvs') - # test rig - #os.environ['CVSROOT'] = '/home/peter/exp/cvs' - #core.run_app(export, '/home/peter/exp/svn', '/home/peter/exp/co') + assert len(sys.argv) == 5 + os.environ['CVSROOT'] = sys.argv[4] + core.run_app(export, sys.argv[1], sys.argv[2], int(sys.argv[3])) From owner-svn-src-all@FreeBSD.ORG Tue Aug 11 21:28:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED99F106564A; Tue, 11 Aug 2009 21:28:26 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAA098FC1F; Tue, 11 Aug 2009 21:28: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 n7BLSQiU042360; Tue, 11 Aug 2009 21:28:26 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7BLSQLG042358; Tue, 11 Aug 2009 21:28:26 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200908112128.n7BLSQLG042358@svn.freebsd.org> From: Peter Wemm Date: Tue, 11 Aug 2009 21:28:26 +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: r196102 - svnadmin/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Aug 2009 21:28:27 -0000 Author: peter Date: Tue Aug 11 21:28:26 2009 New Revision: 196102 URL: http://svn.freebsd.org/changeset/base/196102 Log: Add a usage string. Modified: svnadmin/tools/export2.py Modified: svnadmin/tools/export2.py ============================================================================== --- svnadmin/tools/export2.py Tue Aug 11 21:23:31 2009 (r196101) +++ svnadmin/tools/export2.py Tue Aug 11 21:28:26 2009 (r196102) @@ -360,6 +360,10 @@ def export(pool, repos_path, cvspath, re print '==========> export rev ' + rev exportrev(pool, fs_ptr, rev, cvspath) +# +# Invoke: export2.py /r/svnmirror/base /r/svn2cvs/cvs 12345 /r/ncvs +# svn repo cvs checkout rev cvsroot +# if __name__ == '__main__': print "Version: $FreeBSD$" assert len(sys.argv) == 5 From owner-svn-src-all@FreeBSD.ORG Tue Aug 11 21:41:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91122106564A; Tue, 11 Aug 2009 21:41:21 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D0648FC3E; Tue, 11 Aug 2009 21:41:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7BLfLln042716; Tue, 11 Aug 2009 21:41:21 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7BLfLFe042714; Tue, 11 Aug 2009 21:41:21 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200908112141.n7BLfLFe042714@svn.freebsd.org> From: Peter Wemm Date: Tue, 11 Aug 2009 21:41: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: r196104 - svnadmin/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Aug 2009 21:41:22 -0000 Author: peter Date: Tue Aug 11 21:41:21 2009 New Revision: 196104 URL: http://svn.freebsd.org/changeset/base/196104 Log: Add 8.x placeholders Modified: svnadmin/tools/export2.py Modified: svnadmin/tools/export2.py ============================================================================== --- svnadmin/tools/export2.py Tue Aug 11 21:37:21 2009 (r196103) +++ svnadmin/tools/export2.py Tue Aug 11 21:41:21 2009 (r196104) @@ -174,6 +174,7 @@ maptable = [ ( 'stable/5/', 'RELENG_5' ), ( 'stable/6/', 'RELENG_6' ), ( 'stable/7/', 'RELENG_7' ), + ( 'stable/8/', 'RELENG_8' ), # errata / security / releng branches ( 'releng/ALPHA_2_0/','ALPHA_2_0' ), ( 'releng/BETA_2_0/', 'BETA_2_0' ), @@ -202,6 +203,8 @@ maptable = [ ( 'releng/7.0/', 'RELENG_7_0' ), ( 'releng/7.1/', 'RELENG_7_1' ), ( 'releng/7.2/', 'RELENG_7_2' ), + ( 'releng/8.0/', 'RELENG_8_0' ), + ( 'releng/8.1/', 'RELENG_8_1' ), ] def map2cvs(svnpath): From owner-svn-src-all@FreeBSD.ORG Tue Aug 11 22:09:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C05B106566C; Tue, 11 Aug 2009 22:09:43 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AD208FC36; Tue, 11 Aug 2009 22:09: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 n7BM9hxs043351; Tue, 11 Aug 2009 22:09:43 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7BM9hLx043349; Tue, 11 Aug 2009 22:09:43 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200908112209.n7BM9hLx043349@svn.freebsd.org> From: Peter Wemm Date: Tue, 11 Aug 2009 22:09:43 +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: r196106 - svnadmin/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Aug 2009 22:09:43 -0000 Author: peter Date: Tue Aug 11 22:09:43 2009 New Revision: 196106 URL: http://svn.freebsd.org/changeset/base/196106 Log: Remove a broken printf. There's no need to print the rev that we passed on the command line. That's for the driver to log, not here. Modified: svnadmin/tools/export2.py Modified: svnadmin/tools/export2.py ============================================================================== --- svnadmin/tools/export2.py Tue Aug 11 22:08:46 2009 (r196105) +++ svnadmin/tools/export2.py Tue Aug 11 22:09:43 2009 (r196106) @@ -360,7 +360,6 @@ def exportrev(pool, fs_ptr, rev, cvspath def export(pool, repos_path, cvspath, rev): repos_path = core.svn_path_canonicalize(repos_path) fs_ptr = repos.fs(repos.open(repos_path, pool)) - print '==========> export rev ' + rev exportrev(pool, fs_ptr, rev, cvspath) # From owner-svn-src-all@FreeBSD.ORG Tue Aug 11 23:04:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC7F6106566B; Tue, 11 Aug 2009 23:04:16 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB3B78FC3A; Tue, 11 Aug 2009 23:04: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 n7BN4GGF044569; Tue, 11 Aug 2009 23:04:16 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7BN4GVi044567; Tue, 11 Aug 2009 23:04:16 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200908112304.n7BN4GVi044567@svn.freebsd.org> From: "Simon L. Nielsen" Date: Tue, 11 Aug 2009 23:04:16 +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: r196108 - svnadmin/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Aug 2009 23:04:17 -0000 Author: simon Date: Tue Aug 11 23:04:16 2009 New Revision: 196108 URL: http://svn.freebsd.org/changeset/base/196108 Log: Add stable/8, releng/8.0, and releng/8.1. Modified: svnadmin/tools/export.py Modified: svnadmin/tools/export.py ============================================================================== --- svnadmin/tools/export.py Tue Aug 11 22:26:10 2009 (r196107) +++ svnadmin/tools/export.py Tue Aug 11 23:04:16 2009 (r196108) @@ -174,6 +174,7 @@ maptable = [ ( 'stable/5/', 'RELENG_5' ), ( 'stable/6/', 'RELENG_6' ), ( 'stable/7/', 'RELENG_7' ), + ( 'stable/8/', 'RELENG_8' ), # errata / security / releng branches ( 'releng/ALPHA_2_0/','ALPHA_2_0' ), ( 'releng/BETA_2_0/', 'BETA_2_0' ), @@ -202,6 +203,8 @@ maptable = [ ( 'releng/7.0/', 'RELENG_7_0' ), ( 'releng/7.1/', 'RELENG_7_1' ), ( 'releng/7.2/', 'RELENG_7_2' ), + ( 'releng/8.0/', 'RELENG_8_0' ), + ( 'releng/8.1/', 'RELENG_8_1' ), ] def map2cvs(svnpath): From owner-svn-src-all@FreeBSD.ORG Tue Aug 11 23:05:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 578F2106564A; Tue, 11 Aug 2009 23:05:47 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4657E8FC3D; Tue, 11 Aug 2009 23:05: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 n7BN5lCh044641; Tue, 11 Aug 2009 23:05:47 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7BN5l9R044638; Tue, 11 Aug 2009 23:05:47 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200908112305.n7BN5l9R044638@svn.freebsd.org> From: "Simon L. Nielsen" Date: Tue, 11 Aug 2009 23:05:47 +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: r196109 - svnadmin/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Aug 2009 23:05:47 -0000 Author: simon Date: Tue Aug 11 23:05:47 2009 New Revision: 196109 URL: http://svn.freebsd.org/changeset/base/196109 Log: Add releng/7.3 while updating branches anyway. Modified: svnadmin/tools/export.py svnadmin/tools/export2.py Modified: svnadmin/tools/export.py ============================================================================== --- svnadmin/tools/export.py Tue Aug 11 23:04:16 2009 (r196108) +++ svnadmin/tools/export.py Tue Aug 11 23:05:47 2009 (r196109) @@ -203,6 +203,7 @@ maptable = [ ( 'releng/7.0/', 'RELENG_7_0' ), ( 'releng/7.1/', 'RELENG_7_1' ), ( 'releng/7.2/', 'RELENG_7_2' ), + ( 'releng/7.3/', 'RELENG_7_3' ), ( 'releng/8.0/', 'RELENG_8_0' ), ( 'releng/8.1/', 'RELENG_8_1' ), ] Modified: svnadmin/tools/export2.py ============================================================================== --- svnadmin/tools/export2.py Tue Aug 11 23:04:16 2009 (r196108) +++ svnadmin/tools/export2.py Tue Aug 11 23:05:47 2009 (r196109) @@ -203,6 +203,7 @@ maptable = [ ( 'releng/7.0/', 'RELENG_7_0' ), ( 'releng/7.1/', 'RELENG_7_1' ), ( 'releng/7.2/', 'RELENG_7_2' ), + ( 'releng/7.3/', 'RELENG_7_3' ), ( 'releng/8.0/', 'RELENG_8_0' ), ( 'releng/8.1/', 'RELENG_8_1' ), ] From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 07:08:15 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97C45106566C; Wed, 12 Aug 2009 07:08:15 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51C2B8FC3A; Wed, 12 Aug 2009 07:08:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7C78FgO054462; Wed, 12 Aug 2009 07:08:15 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7C78FDj054461; Wed, 12 Aug 2009 07:08:15 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200908120708.n7C78FDj054461@svn.freebsd.org> From: Ken Smith Date: Wed, 12 Aug 2009 07:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196110 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 07:08:16 -0000 Author: kensmith Date: Wed Aug 12 07:08:14 2009 New Revision: 196110 URL: http://svn.freebsd.org/changeset/base/196110 Log: Adjust 'make update' to use RELENG_8 branch tag for cvs. Approved by: re (implicit) Modified: stable/8/Makefile.inc1 Modified: stable/8/Makefile.inc1 ============================================================================== --- stable/8/Makefile.inc1 Tue Aug 11 23:05:47 2009 (r196109) +++ stable/8/Makefile.inc1 Wed Aug 12 07:08:14 2009 (r196110) @@ -93,7 +93,7 @@ CLEANDIR= cleandir .endif CVS?= cvs -CVSFLAGS?= -A -P -d -I! +CVSFLAGS?= -r RELENG_8 -P -d -I! SVN?= svn SVNFLAGS?= -r HEAD SUP?= /usr/bin/csup From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 07:22:12 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C09A1106564A; Wed, 12 Aug 2009 07:22:12 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFF668FC42; Wed, 12 Aug 2009 07:22:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7C7MCd6054770; Wed, 12 Aug 2009 07:22:12 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7C7MCIV054768; Wed, 12 Aug 2009 07:22:12 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200908120722.n7C7MCIV054768@svn.freebsd.org> From: Ken Smith Date: Wed, 12 Aug 2009 07:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196111 - stable/8/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 07:22:13 -0000 Author: kensmith Date: Wed Aug 12 07:22:12 2009 New Revision: 196111 URL: http://svn.freebsd.org/changeset/base/196111 Log: Adjust for RELENG_8. Approved by: re (implicit) Modified: stable/8/release/Makefile Modified: stable/8/release/Makefile ============================================================================== --- stable/8/release/Makefile Wed Aug 12 07:08:14 2009 (r196110) +++ stable/8/release/Makefile Wed Aug 12 07:22:12 2009 (r196111) @@ -18,7 +18,7 @@ # Set these, release builder! # # Fixed version: -#BUILDNAME=8.0-CURRENT +#BUILDNAME=8.0-STABLE # # Automatic SNAP versioning: DATE != date +%Y%m%d @@ -27,7 +27,7 @@ BUILDNAME?=${BASE}-${DATE}-SNAP # #CHROOTDIR=/junk/release # If this is a -stable snapshot, then set -#RELEASETAG=RELENG_7 +#RELEASETAG=RELENG_8 # # To test a release with a source tree containing patches and # other work. This tree will get copied instead of getting the From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 07:25:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B522106566B; Wed, 12 Aug 2009 07:25:57 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A9CA8FC4E; Wed, 12 Aug 2009 07:25:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7C7PuJU054877; Wed, 12 Aug 2009 07:25:56 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7C7Pu18054875; Wed, 12 Aug 2009 07:25:56 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200908120725.n7C7Pu18054875@svn.freebsd.org> From: Ken Smith Date: Wed, 12 Aug 2009 07:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196112 - stable/8/share/examples/cvsup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 07:25:58 -0000 Author: kensmith Date: Wed Aug 12 07:25:56 2009 New Revision: 196112 URL: http://svn.freebsd.org/changeset/base/196112 Log: Update for RELENG_8. Approved by: re (implicit) Modified: stable/8/share/examples/cvsup/standard-supfile Modified: stable/8/share/examples/cvsup/standard-supfile ============================================================================== --- stable/8/share/examples/cvsup/standard-supfile Wed Aug 12 07:22:12 2009 (r196111) +++ stable/8/share/examples/cvsup/standard-supfile Wed Aug 12 07:25:56 2009 (r196112) @@ -49,7 +49,7 @@ *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr -*default release=cvs tag=. +*default release=cvs tag=RELENG_8 *default delete use-rel-suffix # If you seem to be limited by CPU rather than network or disk bandwidth, try From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 07:37:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53C25106566B; Wed, 12 Aug 2009 07:37:19 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40AE68FC15; Wed, 12 Aug 2009 07:37: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 n7C7bJSi055250; Wed, 12 Aug 2009 07:37:19 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7C7bJWf055248; Wed, 12 Aug 2009 07:37:19 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200908120737.n7C7bJWf055248@svn.freebsd.org> From: Ken Smith Date: Wed, 12 Aug 2009 07:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196115 - stable/8/usr.sbin/pkg_install/add X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 07:37:20 -0000 Author: kensmith Date: Wed Aug 12 07:37:18 2009 New Revision: 196115 URL: http://svn.freebsd.org/changeset/base/196115 Log: Prepare for 8.0 package set, adjust for 8-stable, acknowledge 9-current is coming. Approved by: re (implicit) Modified: stable/8/usr.sbin/pkg_install/add/main.c Modified: stable/8/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/8/usr.sbin/pkg_install/add/main.c Wed Aug 12 07:36:33 2009 (r196114) +++ stable/8/usr.sbin/pkg_install/add/main.c Wed Aug 12 07:37:18 2009 (r196115) @@ -82,13 +82,15 @@ struct { { 700000, 700099, "/packages-7.0-release" }, { 701000, 701099, "/packages-7.1-release" }, { 702000, 702099, "/packages-7.2-release" }, + { 800000, 800499, "/packages-8.0-release" }, { 300000, 399000, "/packages-3-stable" }, { 400000, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, { 503100, 599000, "/packages-5-stable" }, { 600100, 699000, "/packages-6-stable" }, { 700100, 799000, "/packages-7-stable" }, - { 800000, 899000, "/packages-8-current" }, + { 800500, 899000, "/packages-8-stable" }, + { 900000, 999000, "/packages-9-current" }, { 0, 9999999, "/packages-current" }, { 0, 0, NULL } }; From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 10:26:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44BB5106564A; Wed, 12 Aug 2009 10:26:04 +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 3409A8FC6D; Wed, 12 Aug 2009 10:26: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 n7CAQ4lD058695; Wed, 12 Aug 2009 10:26:04 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CAQ4Me058692; Wed, 12 Aug 2009 10:26:04 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908121026.n7CAQ4Me058692@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Aug 2009 10:26: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: r196118 - in head/sys: net 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, 12 Aug 2009 10:26:04 -0000 Author: bz Date: Wed Aug 12 10:26:03 2009 New Revision: 196118 URL: http://svn.freebsd.org/changeset/base/196118 Log: Put minimum alignment on the dpcpu and vnet section so that ld when adding the __start_ symbol knows the expected section alignment and can place the __start_ symbol correctly. These sections will not support symbols with super-cache line alignment requirements. For full details, see posting to freebsd-current, 2009-08-10, Message-ID: <20090810133111.C93661@maildrop.int.zabbadoz.net>. Debugging and testing patches by: Kamigishi Rei (spambox haruhiism.net), np, lstewart, jhb, kib, rwatson Tested by: Kamigishi Rei, lstewart Reviewed by: kib Approved by: re Modified: head/sys/net/vnet.h head/sys/sys/pcpu.h Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Wed Aug 12 08:07:24 2009 (r196117) +++ head/sys/net/vnet.h Wed Aug 12 10:26:03 2009 (r196118) @@ -185,12 +185,14 @@ extern struct sx vnet_sxlock; * Virtual network stack memory allocator, which allows global variables to * be automatically instantiated for each network stack instance. */ +__asm__( #if defined(__arm__) -__asm__(".section " VNET_SETNAME ", \"aw\", %progbits"); + ".section " VNET_SETNAME ", \"aw\", %progbits\n" #else -__asm__(".section " VNET_SETNAME ", \"aw\", @progbits"); + ".section " VNET_SETNAME ", \"aw\", @progbits\n" #endif -__asm__(".previous"); + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" + "\t.previous"); #define VNET_NAME(n) vnet_entry_##n #define VNET_DECLARE(t, n) extern t VNET_NAME(n) Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Wed Aug 12 08:07:24 2009 (r196117) +++ head/sys/sys/pcpu.h Wed Aug 12 10:26:03 2009 (r196118) @@ -56,12 +56,14 @@ struct thread; extern uintptr_t *__start_set_pcpu; extern uintptr_t *__stop_set_pcpu; +__asm__( #if defined(__arm__) -__asm__(".section set_pcpu, \"aw\", %progbits"); + ".section set_pcpu, \"aw\", %progbits\n" #else -__asm__(".section set_pcpu, \"aw\", @progbits"); + ".section set_pcpu, \"aw\", @progbits\n" #endif -__asm__(".previous"); + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" + "\t.previous"); /* * Array of dynamic pcpu base offsets. Indexed by id. From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 10:32:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90F52106566C; Wed, 12 Aug 2009 10:32:20 +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 763068FC3D; Wed, 12 Aug 2009 10:32:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CAWKs2058853; Wed, 12 Aug 2009 10:32:20 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CAWKEM058850; Wed, 12 Aug 2009 10:32:20 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908121032.n7CAWKEM058850@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Aug 2009 10:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196119 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 10:32:21 -0000 Author: bz Date: Wed Aug 12 10:32:20 2009 New Revision: 196119 URL: http://svn.freebsd.org/changeset/base/196119 Log: MFC r196118: Put minimum alignment on the dpcpu and vnet section so that ld when adding the __start_ symbol knows the expected section alignment and can place the __start_ symbol correctly. These sections will not support symbols with super-cache line alignment requirements. For full details, see posting to freebsd-current, 2009-08-10, Message-ID: <20090810133111.C93661@maildrop.int.zabbadoz.net>. Debugging and testing patches by: Kamigishi Rei (spambox haruhiism.net), np, lstewart, jhb, kib, rwatson Tested by: Kamigishi Rei, lstewart Reviewed by: kib Approved by: re Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/vnet.h stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/sys/pcpu.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net/vnet.h ============================================================================== --- stable/8/sys/net/vnet.h Wed Aug 12 10:26:03 2009 (r196118) +++ stable/8/sys/net/vnet.h Wed Aug 12 10:32:20 2009 (r196119) @@ -185,12 +185,14 @@ extern struct sx vnet_sxlock; * Virtual network stack memory allocator, which allows global variables to * be automatically instantiated for each network stack instance. */ +__asm__( #if defined(__arm__) -__asm__(".section " VNET_SETNAME ", \"aw\", %progbits"); + ".section " VNET_SETNAME ", \"aw\", %progbits\n" #else -__asm__(".section " VNET_SETNAME ", \"aw\", @progbits"); + ".section " VNET_SETNAME ", \"aw\", @progbits\n" #endif -__asm__(".previous"); + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" + "\t.previous"); #define VNET_NAME(n) vnet_entry_##n #define VNET_DECLARE(t, n) extern t VNET_NAME(n) Modified: stable/8/sys/sys/pcpu.h ============================================================================== --- stable/8/sys/sys/pcpu.h Wed Aug 12 10:26:03 2009 (r196118) +++ stable/8/sys/sys/pcpu.h Wed Aug 12 10:32:20 2009 (r196119) @@ -56,12 +56,14 @@ struct thread; extern uintptr_t *__start_set_pcpu; extern uintptr_t *__stop_set_pcpu; +__asm__( #if defined(__arm__) -__asm__(".section set_pcpu, \"aw\", %progbits"); + ".section set_pcpu, \"aw\", %progbits\n" #else -__asm__(".section set_pcpu, \"aw\", @progbits"); + ".section set_pcpu, \"aw\", @progbits\n" #endif -__asm__(".previous"); + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" + "\t.previous"); /* * Array of dynamic pcpu base offsets. Indexed by id. From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 10:41:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91365106564A; Wed, 12 Aug 2009 10:41:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80B328FC41; Wed, 12 Aug 2009 10: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 n7CAfbKq059086; Wed, 12 Aug 2009 10:41:37 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CAfbrB059084; Wed, 12 Aug 2009 10:41:37 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908121041.n7CAfbrB059084@svn.freebsd.org> From: Robert Watson Date: Wed, 12 Aug 2009 10:41: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: r196120 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 10:41:38 -0000 Author: rwatson Date: Wed Aug 12 10:41:37 2009 New Revision: 196120 URL: http://svn.freebsd.org/changeset/base/196120 Log: Update procstat(1) for the fact that devfs paths are no longer unsupported. Approved by: re (kib) Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Wed Aug 12 10:32:20 2009 (r196119) +++ head/usr.bin/procstat/procstat.1 Wed Aug 12 10:41:37 2009 (r196120) @@ -351,10 +351,8 @@ may be mechanically parsed. .Pp The display of open file or memory mapping pathnames is implemented using the kernel's name cache. -It therefore does not work for file systems -that do not use the name cache, such as -.Xr devfs 4 , -or if the name is not present in the cache due to removal. +If a file system does not use the name cache, or the path to a file is not in +the cache, a path will not be displayed. .Pp .Nm currently supports extracting data only from a live kernel, and not from From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 10:44:14 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D6EC106566B; Wed, 12 Aug 2009 10:44:14 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D22D8FC16; Wed, 12 Aug 2009 10: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 n7CAiEhk059177; Wed, 12 Aug 2009 10:44:14 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CAiDxP059175; Wed, 12 Aug 2009 10:44:13 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908121044.n7CAiDxP059175@svn.freebsd.org> From: Robert Watson Date: Wed, 12 Aug 2009 10:44: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: r196121 - head/sys/netatalk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 10:44:14 -0000 Author: rwatson Date: Wed Aug 12 10:44:13 2009 New Revision: 196121 URL: http://svn.freebsd.org/changeset/base/196121 Log: Reverse misordered unlock and lock in at_control for netatalk phase I addresses. Submitted by: Russell Cattelan Approved by: re (kib) Modified: head/sys/netatalk/at_control.c Modified: head/sys/netatalk/at_control.c ============================================================================== --- head/sys/netatalk/at_control.c Wed Aug 12 10:41:37 2009 (r196120) +++ head/sys/netatalk/at_control.c Wed Aug 12 10:44:13 2009 (r196121) @@ -276,7 +276,7 @@ at_control(struct socket *so, u_long cmd * If the request is specifying phase 1, then * only look at a phase one address */ - AT_IFADDR_RUNLOCK(); + AT_IFADDR_RLOCK(); for (oaa = aa; aa; aa = TAILQ_NEXT(aa, aa_link)) { if (aa->aa_ifp == ifp && (aa->aa_flags & AFA_PHASE2) == 0) @@ -286,7 +286,7 @@ at_control(struct socket *so, u_long cmd ifa_free(&oaa->aa_ifa); if (aa != NULL && oaa != aa) ifa_ref(&aa->aa_ifa); - AT_IFADDR_RLOCK(); + AT_IFADDR_RUNLOCK(); } else { struct at_ifaddr *oaa; From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 10:45:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04F011065670; Wed, 12 Aug 2009 10:45:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E86A48FC44; Wed, 12 Aug 2009 10:45: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 n7CAjjwa059247; Wed, 12 Aug 2009 10:45:45 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CAjjQi059245; Wed, 12 Aug 2009 10:45:45 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908121045.n7CAjjQi059245@svn.freebsd.org> From: Robert Watson Date: Wed, 12 Aug 2009 10:45: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: r196122 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 10:45:46 -0000 Author: rwatson Date: Wed Aug 12 10:45:45 2009 New Revision: 196122 URL: http://svn.freebsd.org/changeset/base/196122 Log: Correctly audit real gids following changes to the audit record argument interface. Approved by: re (kib) Modified: head/sys/security/audit/audit.h Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Wed Aug 12 10:44:13 2009 (r196121) +++ head/sys/security/audit/audit.h Wed Aug 12 10:45:45 2009 (r196122) @@ -232,7 +232,7 @@ void audit_thread_free(struct thread *t #define AUDIT_ARG_RGID(rgid) do { \ if (AUDITING_TD(curthread)) \ - audit_arg_gid((rgid)); \ + audit_arg_rgid((rgid)); \ } while (0) #define AUDIT_ARG_RUID(ruid) do { \ From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 10:46:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 892B51065674; Wed, 12 Aug 2009 10:46:48 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76F8B8FC4A; Wed, 12 Aug 2009 10:46: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 n7CAkmDd059306; Wed, 12 Aug 2009 10:46:48 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CAkmAw059298; Wed, 12 Aug 2009 10:46:48 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908121046.n7CAkmAw059298@svn.freebsd.org> From: Robert Watson Date: Wed, 12 Aug 2009 10:46: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: r196123 - head/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: Wed, 12 Aug 2009 10:46:49 -0000 Author: rwatson Date: Wed Aug 12 10:46:48 2009 New Revision: 196123 URL: http://svn.freebsd.org/changeset/base/196123 Log: Update posix1e-related man pages, especially as relates to MAC, to more accurately reflect the last ten years of work. Approved by: re (kib) Modified: head/lib/libc/posix1e/Makefile.inc head/lib/libc/posix1e/mac.3 head/lib/libc/posix1e/mac_free.3 head/lib/libc/posix1e/mac_get.3 head/lib/libc/posix1e/mac_set.3 head/lib/libc/posix1e/mac_text.3 head/lib/libc/posix1e/posix1e.3 Modified: head/lib/libc/posix1e/Makefile.inc ============================================================================== --- head/lib/libc/posix1e/Makefile.inc Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/Makefile.inc Wed Aug 12 10:46:48 2009 (r196123) @@ -106,14 +106,16 @@ MLINKS+=acl_create_entry.3 acl_create_en mac_get.3 mac_get_fd.3 \ mac_get.3 mac_get_file.3 \ mac_get.3 mac_get_link.3 \ + mac_get.3 mac_get_peer.3 \ mac_get.3 mac_get_pid.3 \ mac_get.3 mac_get_proc.3 \ mac_prepare.3 mac_prepare_file_label.3 \ mac_prepare.3 mac_prepare_ifnet_label.3 \ mac_prepare.3 mac_prepare_process_label.3 \ - mac_set.3 mac_set_link.3 \ + mac_prepare.3 mac_prepare_type.3 \ mac_set.3 mac_set_fd.3 \ mac_set.3 mac_set_file.3 \ + mac_set.3 mac_set_link.3 \ mac_set.3 mac_set_proc.3 \ mac_text.3 mac_from_text.3 \ mac_text.3 mac_to_text.3 Modified: head/lib/libc/posix1e/mac.3 ============================================================================== --- head/lib/libc/posix1e/mac.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/mac.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -1,4 +1,5 @@ .\" Copyright (c) 2001, 2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2009 Robert N. M. Watson .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris @@ -30,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 19, 2003 +.Dd August 7, 2009 .Dt MAC 3 .Os .Sh NAME @@ -44,81 +45,82 @@ In the kernel configuration file: .Cd "options MAC" .Sh DESCRIPTION -.Fx -permits administrators to define Mandatory Access Control labels -defining levels for the privacy and integrity of data, -overriding discretionary policies -for those objects. -Not all objects currently provide support for MAC labels, -and MAC support must be explicitly enabled by the administrator. -The library calls include routines to retrieve, duplicate, -and set MAC labels associated with files and processes. -.Pp -POSIX.1e describes a set of MAC manipulation routines -to manage the contents of MAC labels, -as well as their relationships with -files and processes; -almost all of these support routines -are implemented in -.Fx . +Mandatory Access Control labels describe confidentiality, integrity, and +other security attributes of operating system objects, overriding +discretionary access control. +Not all system objects support MAC labeling, and MAC policies must be +explicitly enabled by the administrator. +This API, based on POSIX.1e, includes routines to retrieve, manipulate, set, +and convert to and from text the MAC labels on files and processes. +.Pp +MAC labels consist of a set of (name, value) tuples, representing security +attributes from MAC policies. +For example, this label contains security labels defined by two policies, +.Xr mac_biba 4 +and +.Xr mac_mls 4 : +.Bd -literal -offset indent +biba/low,mls/low +.Ed +.Pp +Further syntax and semantics of MAC labels may be found in +.Xr maclabel 7 . +.Pp +Applications operate on labels stored in +.Vt mac_t , +but can convert between this internal format and a text format for the +purposes of presentation to uses or external storage. +When querying a label on an object, a +.Vt mac_t +must first be prepared using the interfaces described in +.Xr mac_prepare 3 , +allowing the application to declare which policies it wishes to interogate. +The application writer can also rely on default label names declared in +.Xr mac.conf 5 . +.Pp +When finished with a +.Vt mac_t , +the application must call +.Xr mac_free 3 +to release its storage. .Pp -Available functions, sorted by behavior, include: +The following functions are defined: .Bl -tag -width indent -.It Fn mac_get_fd -This function is described in +.It Fn mac_is_present +This function, described in +.Xr mac_is_present 3 , +allows applications to test whether MAC is configured, as well as whether +specific policies are configured. +.It Fn mac_get_fd , Fn mac_get_file , Fn mac_get_link , Fn mac_get_peer +These functions, described in .Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -a specific file descriptor. -.It Fn mac_get_file -This function is described in +retrieve the MAC labels associated with file descriptors, files, and socket +peers. +.It Fn mac_get_pid , Fn mac_get_proc +These functions, described in .Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -a named file. -.It Fn mac_get_proc -This function is described in -.Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -the calling process. -.It Fn mac_set_fd -This function is described in -.Xr mac_set 3 , -and may be used to set the -MAC label associated with -a specific file descriptor. -.It Fn mac_set_file -This function is described in +retrieve the MAC labels associated with processes. +.It Fn mac_set_fd , Fn mac_set_file , Fn mac_set_link +These functions, described in .Xr mac_set 3 , -and may be used to set the -MAC label associated with -a named file. +set the MAC labels associated with file descriptors and files. .It Fn mac_set_proc -This function is described in +This function, described in .Xr mac_set 3 , -and may be used to set the -MAC label associated with -the calling process. +sets the MAC label associated with the current process. .It Fn mac_free -This function is described in +This function, desribed in .Xr mac_free 3 , -and may be used to free -userland working MAC label storage. +frees working MAC label storage. .It Fn mac_from_text -This function is described in +This function, described in .Xr mac_text 3 , -and may be used to convert -a text-form MAC label -into a working +converts a text-form MAC label into working MAC label storage, .Vt mac_t . -.It Fn mac_prepare -.It Fn mac_prepare_file_label -.It Fn mac_prepare_ifnet_label -.It Fn mac_prepare_process_label -These functions are described in +.It Fn mac_prepare , Fn mac_prepare_file_label , Fn mac_prepare_ifnet_label , Fn mac_prepare_process_label , Fn mac_prepare_type +These functions, described in .Xr mac_prepare 3 , -and may be used to preallocate storage for MAC label retrieval. +allocate working storage for MAC label operations. .Xr mac_prepare 3 prepares a label based on caller-specified label names; the other calls rely on the default configuration specified in @@ -130,15 +132,6 @@ and may be used to convert a .Vt mac_t into a text-form MAC label. .El -The behavior of some of these calls is influenced by the configuration -settings found in -.Xr mac.conf 5 , -the MAC library run-time configuration file. -.Sh IMPLEMENTATION NOTES -.Fx Ns 's -support for POSIX.1e interfaces and features -is -.Ud . .Sh FILES .Bl -tag -width ".Pa /etc/mac.conf" -compact .It Pa /etc/mac.conf @@ -150,24 +143,20 @@ system objects, but without policy-speci .Sh SEE ALSO .Xr mac_free 3 , .Xr mac_get 3 , +.Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac.conf 5 , .Xr mac 9 .Sh STANDARDS -These APIs are loosely based on the APIs described in POSIX.1e. -POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. -However, the resemblance of these APIs to the POSIX APIs is only loose, -as the POSIX APIs were unable to express many notions required for -flexible and extensible access control. +These APIs are loosely based on the APIs described in POSIX.1e, as described +in IEEE POSIX.1e draft 17. +However, the resemblence of these APIS to the POSIX APIs is loose, as the +PSOXI APIS were unable to express some notinos required for flexible and +extensible access control. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 Modified: head/lib/libc/posix1e/mac_free.3 ============================================================================== --- head/lib/libc/posix1e/mac_free.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/mac_free.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -64,6 +64,7 @@ function. .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh STANDARDS @@ -91,8 +92,8 @@ is a complex structure in the .Tn TrustedBSD implementation, .Fn mac_free -is specific to that type, and must not be used to free the character -strings returned from +is specific to +.Vt mac_3 , +and must not be used to free the character strings returned from .Fn mac_to_text . -Doing so may result in undefined behavior, -including application failure. +Doing so may result in undefined behavior. Modified: head/lib/libc/posix1e/mac_get.3 ============================================================================== --- head/lib/libc/posix1e/mac_get.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/mac_get.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -133,6 +133,7 @@ is not a directory. .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh STANDARDS Modified: head/lib/libc/posix1e/mac_set.3 ============================================================================== --- head/lib/libc/posix1e/mac_set.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/mac_set.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -138,6 +138,7 @@ is not a directory. .Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh HISTORY Modified: head/lib/libc/posix1e/mac_text.3 ============================================================================== --- head/lib/libc/posix1e/mac_text.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/mac_text.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -98,6 +98,7 @@ to allocate internal storage. .Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_set 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr maclabel 7 .Sh STANDARDS Modified: head/lib/libc/posix1e/posix1e.3 ============================================================================== --- head/lib/libc/posix1e/posix1e.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/posix1e.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2009 Robert N. M. Watson .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 20, 2009 +.Dd August 7, 2009 .Dt POSIX1E 3 .Os .Sh NAME @@ -36,99 +36,77 @@ .Sh SYNOPSIS .In sys/types.h .In sys/acl.h -.\" .In sys/capability.h .In sys/mac.h .Sh DESCRIPTION -The IEEE POSIX.1e specification never left draft form, but the interfaces -it describes are now widely used despite inherent limitations. -Currently, only a few of the interfaces and features are implemented in -.Fx , -although efforts are underway to complete the integration at this time. +POSIX.1e describes five security extensions to the POSIX.1 API: Access +Control Lists (ACLs), Auditing, Capabilities, Mandatory Access Control, and +Information Flow Labels. +While IEEE POSIX.1e D17 specification has not been standardized, several of +its interfaces are widely used. .Pp -POSIX.1e describes five security extensions to the base POSIX.1 API: -Access Control Lists (ACLs), Auditing, Capabilities, Mandatory Access -Control, and Information Flow Labels. .Fx -supports POSIX.1e ACL interfaces, as well as POSIX.1e-like MAC -interfaces. -The TrustedBSD Project has produced but not integrated an implementation -of POSIX.1e Capabilities. -.Pp -POSIX.1e defines both syntax and semantics for these features, but fairly -substantial changes are required to implement these features in the -operating system. -.Pp -As shipped, -.Fx 4.0 -provides API and VFS support for ACLs, but not an implementation on any -native file system. -.Fx 5.0 -includes support for ACLs as part of UFS1 and UFS2, as well as necessary -VFS support for additional file systems to export ACLs as appropriate. -Available API calls relating to ACLs are described in detail in -.Xr acl 3 . -.Pp -As shipped, -.Fx 5.0 -includes support for Mandatory Access Control as well as POSIX.1e-like -APIs for label management. -More information on API calls relating to MAC is available in -.Xr mac 3 . +implements POSIX.1e interface for access control lists, described in +.Xr acl 3 , +and supports ACLs on the +.Xr ffs 7 +file system; ACLs must be administratively enabled using +.Xr tunefs 8 . .Pp -Additional patches supporting POSIX.1e features are provided by the -TrustedBSD project: +.Fx +implements a POSIX.1e-like mandatory access control interface, described in +.Xr mac 3 , +although with a number of extensions and important semantic differences. .Pp -http://www.TrustedBSD.org/ -.Sh IMPLEMENTATION NOTES -.Fx Ns 's -support for POSIX.1e interfaces and features is still under -development at this time, and many of these features are considered new -or experimental. +.Fx +does not implement the POSIX.1e audit, privilege (capability), or information +flow label APIs. +However, +.Fx +does implement the +.Xr libbsm +audit API. .Sh ENVIRONMENT -POSIX.1e assigns security labels to all objects, extending the security +POSIX.1e assigns security attributes to all objects, extending the security functionality described in POSIX.1. -These additional labels provide -fine-grained discretionary access control, fine-grained capabilities, -and labels necessary for mandatory access control. -POSIX.2c describes -a set of userland utilities for manipulating these labels. +These additional attributes store fine-grained discretionary access control +information and mandatory access control labels; for files, they are stored +in extended attributes, described in +.Xr extattr 3 . .Pp -Many of these services are supported by extended attributes, documented -in -.Xr extattr 2 +POSIX.2c describes +a set of userland utilities for manipulating these attributes, including +.Xr getfacl 1 +and +.Xr setfacl 1 +for access control lists, and +.Xr getfmac 8 and -.Xr extattr 9 . -While these APIs are not documented in POSIX.1e, they are similar in -structure. +.Xr setfmac 8 +for mandatory access control labels. .Sh SEE ALSO +.Xr getfacl 1 , +.Xr setfacl 1 , .Xr extattr 2 , .Xr acl 3 , +.Xr extattr 3 , .Xr libbsm 3 , .Xr mac 3 , +.Xr ffs 7 , +.Xr getfmac 8 , +.Xr setfmac 8 , +.Xr tunefs 8 , .Xr acl 9 , .Xr extattr 9 , .Xr mac 9 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft continues -on the cross-platform POSIX.1e implementation -mailing list. -To join this list, see the -.Fx -POSIX.1e implementation -page for more information. .Sh HISTORY POSIX.1e support was introduced in .Fx 4.0 ; -most of the features are available as of +most features were available as of .Fx 5.0 . -Development continues. .Sh AUTHORS .An Robert N M Watson .An Chris D. Faulhaber .An Thomas Moestl .An Ilmar S Habibulin -.Sh BUGS -Many of these features are considered new or experimental in -.Fx 5.0 -and should be deployed with appropriate caution. From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 10:47:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54168106564A; Wed, 12 Aug 2009 10:47:23 +0000 (UTC) (envelope-from simon@benji.nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.freebsd.org (Postfix) with ESMTP id 124B78FC3A; Wed, 12 Aug 2009 10:47:23 +0000 (UTC) Received: from benji.nitro.dk (unknown [192.168.3.39]) by mx.nitro.dk (Postfix) with ESMTP id 4F35F2D488F; Wed, 12 Aug 2009 10:47:22 +0000 (UTC) Received: by benji.nitro.dk (Postfix, from userid 2000) id 34F70FCD6; Wed, 12 Aug 2009 12:47:22 +0200 (CEST) Date: Wed, 12 Aug 2009 12:47:22 +0200 From: "Simon L. Nielsen" To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20090812104721.GB91526@zaphod.nitro.dk> References: <200908030813.n738D6x1040724@svn.freebsd.org> <86hbwpvxaq.fsf@ds4.des.no> <4A76ED32.80304@andric.com> <868wi1vvqi.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <868wi1vvqi.fsf@ds4.des.no> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, Ken Smith Subject: Re: svn commit: r196045 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 10:47:23 -0000 [correct mailer issues for svn] On 2009.08.03 16:05:09 +0200, Dag-Erling Smørgrav wrote: > Dimitry Andric writes: > > You might want to change [...] > > Thanks, new patch attached. Just FYI, I plan to look at this tonight CET (but won't be able to before) so it should be fixed soonish. -- Simon L. Nielsen From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 11:55:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 483A11065677; Wed, 12 Aug 2009 11:55:27 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3789C8FC56; Wed, 12 Aug 2009 11:55:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CBtQ5s063219; Wed, 12 Aug 2009 11:55:26 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CBtQUD063217; Wed, 12 Aug 2009 11:55:26 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200908121155.n7CBtQUD063217@svn.freebsd.org> From: Colin Percival Date: Wed, 12 Aug 2009 11:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196128 - head/usr.sbin/ntp/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 11:55:27 -0000 Author: cperciva Date: Wed Aug 12 11:55:26 2009 New Revision: 196128 URL: http://svn.freebsd.org/changeset/base/196128 Log: Apply the ntp-related part of r195626 to the correct part of the tree -- the mkver which is used in builds is the one in usr.sbin/ntp/scripts, not the one in contrib/ntp/scripts. Pointy hat to: cperciva Approved by: re (rwatson) Modified: head/usr.sbin/ntp/scripts/mkver Modified: head/usr.sbin/ntp/scripts/mkver ============================================================================== --- head/usr.sbin/ntp/scripts/mkver Wed Aug 12 11:43:45 2009 (r196127) +++ head/usr.sbin/ntp/scripts/mkver Wed Aug 12 11:55:26 2009 (r196128) @@ -23,8 +23,6 @@ case "" in *) ConfStr="${ConfStr}-r" ;; esac -ConfStr="$ConfStr `LC_ALL=C date`" - if [ ! -f .version ]; then echo 0 > .version fi From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:00:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D788F106567E; Wed, 12 Aug 2009 12:00:22 +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 6AFAE8FC4B; Wed, 12 Aug 2009 12:00: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 n7CC0Lli063409; Wed, 12 Aug 2009 12:00:21 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CC0LJr063407; Wed, 12 Aug 2009 12:00:21 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908121200.n7CC0LJr063407@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Aug 2009 12:00: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: r196129 - 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: Wed, 12 Aug 2009 12:00:23 -0000 Author: bz Date: Wed Aug 12 12:00:21 2009 New Revision: 196129 URL: http://svn.freebsd.org/changeset/base/196129 Log: Update DDB show vnet command to print all used and available information. Reviewed by: rwatson, zec Approved by: re Modified: head/sys/net/vnet.c Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Wed Aug 12 11:55:26 2009 (r196128) +++ head/sys/net/vnet.c Wed Aug 12 12:00:21 2009 (r196129) @@ -615,14 +615,20 @@ DB_SHOW_COMMAND(vnets, db_show_vnets) { VNET_ITERATOR_DECL(vnet_iter); -#if SIZE_MAX == UINT32_MAX /* 32-bit arch */ - db_printf(" vnet ifs socks\n"); -#else /* 64-bit arch, most probaly... */ - db_printf(" vnet ifs socks\n"); -#endif VNET_FOREACH(vnet_iter) { - db_printf("%p %3d %5d\n", vnet_iter, vnet_iter->vnet_ifcnt, - vnet_iter->vnet_sockcnt); + db_printf("vnet = %p\n", vnet_iter); + db_printf(" vnet_magic_n = 0x%x (%s, orig 0x%x)\n", + vnet_iter->vnet_magic_n, + (vnet_iter->vnet_magic_n == VNET_MAGIC_N) ? + "ok" : "mismatch", VNET_MAGIC_N); + db_printf(" vnet_ifcnt = %u\n", vnet_iter->vnet_ifcnt); + db_printf(" vnet_sockcnt = %u\n", vnet_iter->vnet_sockcnt); + db_printf(" vnet_data_mem = %p\n", vnet_iter->vnet_data_mem); + db_printf(" vnet_data_base = 0x%jx\n", + (uintmax_t)vnet_iter->vnet_data_base); + db_printf("\n"); + if (db_pager_quit) + break; } } #endif From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:00:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3557B1065692; Wed, 12 Aug 2009 12:00:23 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E5438FC50; Wed, 12 Aug 2009 12:00: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 n7CC0NAh063444; Wed, 12 Aug 2009 12:00:23 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CC0NaM063442; Wed, 12 Aug 2009 12:00:23 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200908121200.n7CC0NaM063442@svn.freebsd.org> From: Colin Percival Date: Wed, 12 Aug 2009 12:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196130 - in stable/8/usr.sbin/ntp: . scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 12:00:24 -0000 Author: cperciva Date: Wed Aug 12 12:00:22 2009 New Revision: 196130 URL: http://svn.freebsd.org/changeset/base/196130 Log: Merge r196128 to stable/8. Approved by: re (rwatson) Modified: stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/ntp/scripts/mkver Modified: stable/8/usr.sbin/ntp/scripts/mkver ============================================================================== --- stable/8/usr.sbin/ntp/scripts/mkver Wed Aug 12 12:00:21 2009 (r196129) +++ stable/8/usr.sbin/ntp/scripts/mkver Wed Aug 12 12:00:22 2009 (r196130) @@ -23,8 +23,6 @@ case "" in *) ConfStr="${ConfStr}-r" ;; esac -ConfStr="$ConfStr `LC_ALL=C date`" - if [ ! -f .version ]; then echo 0 > .version fi From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:05:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC51B1065724; Wed, 12 Aug 2009 12:05:07 +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 AE5598FC4A; Wed, 12 Aug 2009 12:05: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 n7CC57Zt063581; Wed, 12 Aug 2009 12:05:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CC57E8063579; Wed, 12 Aug 2009 12:05:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908121205.n7CC57E8063579@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Aug 2009 12:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196131 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 12:05:15 -0000 Author: bz Date: Wed Aug 12 12:05:07 2009 New Revision: 196131 URL: http://svn.freebsd.org/changeset/base/196131 Log: MFC r196129: Update DDB show vnet command to print all used and available information. Reviewed by: rwatson, zec Approved by: re Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/vnet.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net/vnet.c ============================================================================== --- stable/8/sys/net/vnet.c Wed Aug 12 12:00:22 2009 (r196130) +++ stable/8/sys/net/vnet.c Wed Aug 12 12:05:07 2009 (r196131) @@ -615,14 +615,20 @@ DB_SHOW_COMMAND(vnets, db_show_vnets) { VNET_ITERATOR_DECL(vnet_iter); -#if SIZE_MAX == UINT32_MAX /* 32-bit arch */ - db_printf(" vnet ifs socks\n"); -#else /* 64-bit arch, most probaly... */ - db_printf(" vnet ifs socks\n"); -#endif VNET_FOREACH(vnet_iter) { - db_printf("%p %3d %5d\n", vnet_iter, vnet_iter->vnet_ifcnt, - vnet_iter->vnet_sockcnt); + db_printf("vnet = %p\n", vnet_iter); + db_printf(" vnet_magic_n = 0x%x (%s, orig 0x%x)\n", + vnet_iter->vnet_magic_n, + (vnet_iter->vnet_magic_n == VNET_MAGIC_N) ? + "ok" : "mismatch", VNET_MAGIC_N); + db_printf(" vnet_ifcnt = %u\n", vnet_iter->vnet_ifcnt); + db_printf(" vnet_sockcnt = %u\n", vnet_iter->vnet_sockcnt); + db_printf(" vnet_data_mem = %p\n", vnet_iter->vnet_data_mem); + db_printf(" vnet_data_base = 0x%jx\n", + (uintmax_t)vnet_iter->vnet_data_base); + db_printf("\n"); + if (db_pager_quit) + break; } } #endif From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:06:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8EE91065874; Wed, 12 Aug 2009 12:06:16 +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 51BC18FC45; Wed, 12 Aug 2009 12:06: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 n7CC6GZX063641; Wed, 12 Aug 2009 12:06:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CC6Gpn063639; Wed, 12 Aug 2009 12:06:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908121206.n7CC6Gpn063639@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Aug 2009 12:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196132 - 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, 12 Aug 2009 12:06:40 -0000 Author: bz Date: Wed Aug 12 12:06:16 2009 New Revision: 196132 URL: http://svn.freebsd.org/changeset/base/196132 Log: Add ddb show dpcpu_off command to ease dpcpu memory debugging. While show pcpu prints pc_dynamic this also prints the original memory address as well as the maths. Once dpcpu goes NUMA this is considered to help debugging as well. Reviewed by: rwatson Approved by: re Modified: head/sys/kern/subr_pcpu.c Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Wed Aug 12 12:05:07 2009 (r196131) +++ head/sys/kern/subr_pcpu.c Wed Aug 12 12:06:16 2009 (r196132) @@ -313,6 +313,18 @@ sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS) } #ifdef DDB +DB_SHOW_COMMAND(dpcpu_off, db_show_dpcpu_off) +{ + int id; + + for (id = 0; id <= mp_maxid; id++) { + if (CPU_ABSENT(id)) + continue; + db_printf("dpcpu_off[%2d] = 0x%jx (+ DPCPU_START = %p)\n", + id, (uintmax_t)dpcpu_off[id], + (void *)(uintptr_t)(dpcpu_off[id] + DPCPU_START)); + } +} static void show_pcpu(struct pcpu *pc) From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:10:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 977121065708; Wed, 12 Aug 2009 12:10:08 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 677458FC49; Wed, 12 Aug 2009 12:10: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 n7CCA0s7063786; Wed, 12 Aug 2009 12:10:00 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CCA0Op063785; Wed, 12 Aug 2009 12:10:00 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200908121210.n7CCA0Op063785@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 12 Aug 2009 12:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196133 - in head/crypto/openssl: apps test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 12:10:11 -0000 Author: simon Date: Wed Aug 12 12:10:00 2009 New Revision: 196133 URL: http://svn.freebsd.org/changeset/base/196133 Log: Remove symlinks in OpenSSL's testing framework. These are not required for normal build, and doesn't export well to CVS. If they are needed later a script will be added to recreate the symlinks when needed at build time. Approved by: re (rwatson) Deleted: head/crypto/openssl/apps/md4.c head/crypto/openssl/test/bftest.c head/crypto/openssl/test/bntest.c head/crypto/openssl/test/casttest.c head/crypto/openssl/test/destest.c head/crypto/openssl/test/dhtest.c head/crypto/openssl/test/dsatest.c head/crypto/openssl/test/ecdhtest.c head/crypto/openssl/test/ecdsatest.c head/crypto/openssl/test/ectest.c head/crypto/openssl/test/enginetest.c head/crypto/openssl/test/evp_test.c head/crypto/openssl/test/exptest.c head/crypto/openssl/test/fips_aesavs.c head/crypto/openssl/test/fips_desmovs.c head/crypto/openssl/test/fips_dsatest.c head/crypto/openssl/test/fips_dssvs.c head/crypto/openssl/test/fips_hmactest.c head/crypto/openssl/test/fips_randtest.c head/crypto/openssl/test/fips_rngvs.c head/crypto/openssl/test/fips_rsagtest.c head/crypto/openssl/test/fips_rsastest.c head/crypto/openssl/test/fips_rsavtest.c head/crypto/openssl/test/fips_shatest.c head/crypto/openssl/test/fips_test_suite.c head/crypto/openssl/test/hmactest.c head/crypto/openssl/test/ideatest.c head/crypto/openssl/test/jpaketest.c head/crypto/openssl/test/md2test.c head/crypto/openssl/test/md4test.c head/crypto/openssl/test/md5test.c head/crypto/openssl/test/mdc2test.c head/crypto/openssl/test/randtest.c head/crypto/openssl/test/rc2test.c head/crypto/openssl/test/rc4test.c head/crypto/openssl/test/rc5test.c head/crypto/openssl/test/rmdtest.c head/crypto/openssl/test/rsa_test.c head/crypto/openssl/test/sha1test.c head/crypto/openssl/test/sha256t.c head/crypto/openssl/test/sha512t.c head/crypto/openssl/test/shatest.c head/crypto/openssl/test/ssltest.c From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:10:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C3AD106570C; Wed, 12 Aug 2009 12:10:29 +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 54A918FC3E; Wed, 12 Aug 2009 12: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 n7CCATZn063836; Wed, 12 Aug 2009 12:10:29 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CCAT1J063834; Wed, 12 Aug 2009 12:10:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908121210.n7CCAT1J063834@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Aug 2009 12:10:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196134 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 12:10:32 -0000 Author: bz Date: Wed Aug 12 12:10:28 2009 New Revision: 196134 URL: http://svn.freebsd.org/changeset/base/196134 Log: MFC r196132: Add ddb show dpcpu_off command to ease dpcpu memory debugging. While show pcpu prints pc_dynamic this also prints the original memory address as well as the maths. Once dpcpu goes NUMA this is considered to help debugging as well. Reviewed by: rwatson Approved by: re Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/subr_pcpu.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/subr_pcpu.c ============================================================================== --- stable/8/sys/kern/subr_pcpu.c Wed Aug 12 12:10:00 2009 (r196133) +++ stable/8/sys/kern/subr_pcpu.c Wed Aug 12 12:10:28 2009 (r196134) @@ -313,6 +313,18 @@ sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS) } #ifdef DDB +DB_SHOW_COMMAND(dpcpu_off, db_show_dpcpu_off) +{ + int id; + + for (id = 0; id <= mp_maxid; id++) { + if (CPU_ABSENT(id)) + continue; + db_printf("dpcpu_off[%2d] = 0x%jx (+ DPCPU_START = %p)\n", + id, (uintmax_t)dpcpu_off[id], + (void *)(uintptr_t)(dpcpu_off[id] + DPCPU_START)); + } +} static void show_pcpu(struct pcpu *pc) From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:12:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B4001065713; Wed, 12 Aug 2009 12:12: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 09E158FC16; Wed, 12 Aug 2009 12: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 n7CCCNqo063926; Wed, 12 Aug 2009 12:12:23 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CCCN85063924; Wed, 12 Aug 2009 12:12:23 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908121212.n7CCCN85063924@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Aug 2009 12:12: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: r196135 - 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, 12 Aug 2009 12:12:26 -0000 Author: bz Date: Wed Aug 12 12:12:23 2009 New Revision: 196135 URL: http://svn.freebsd.org/changeset/base/196135 Log: Make the kernel compile without IP networking by moving a variable under a proper #ifdef. Approved by: re (rwatson) Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Wed Aug 12 12:10:28 2009 (r196134) +++ head/sys/kern/kern_jail.c Wed Aug 12 12:12:23 2009 (r196135) @@ -472,10 +472,11 @@ kern_jail_set(struct thread *td, struct #endif struct vfsopt *opt; struct vfsoptlist *opts; - struct prison *pr, *deadpr, *mypr, *ppr, *tpr, *tppr; + struct prison *pr, *deadpr, *mypr, *ppr, *tpr; struct vnode *root; char *domain, *errmsg, *host, *name, *p, *path, *uuid; #if defined(INET) || defined(INET6) + struct prison *tppr; void *op; #endif unsigned long hid; From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:14:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF5CD106564A; Wed, 12 Aug 2009 12:14:30 +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 BA1318FC3A; Wed, 12 Aug 2009 12:14: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 n7CCEUAM064008; Wed, 12 Aug 2009 12:14:30 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CCEUSe064006; Wed, 12 Aug 2009 12:14:30 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908121214.n7CCEUSe064006@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Aug 2009 12:14:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196136 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 12:14:31 -0000 Author: bz Date: Wed Aug 12 12:14:30 2009 New Revision: 196136 URL: http://svn.freebsd.org/changeset/base/196136 Log: MFC r196135: Make the kernel compile without IP networking by moving a variable under a proper #ifdef. Approved by: re (rwatson) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/kern_jail.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Wed Aug 12 12:12:23 2009 (r196135) +++ stable/8/sys/kern/kern_jail.c Wed Aug 12 12:14:30 2009 (r196136) @@ -472,10 +472,11 @@ kern_jail_set(struct thread *td, struct #endif struct vfsopt *opt; struct vfsoptlist *opts; - struct prison *pr, *deadpr, *mypr, *ppr, *tpr, *tppr; + struct prison *pr, *deadpr, *mypr, *ppr, *tpr; struct vnode *root; char *domain, *errmsg, *host, *name, *p, *path, *uuid; #if defined(INET) || defined(INET6) + struct prison *tppr; void *op; #endif unsigned long hid; From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:20:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDAC1106564A; Wed, 12 Aug 2009 12:20:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 7A91B8FC3D; Wed, 12 Aug 2009 12:20:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id DDC6B41C705; Wed, 12 Aug 2009 14:20:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id gNCxpKJvHfYB; Wed, 12 Aug 2009 14:20:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 9479641C69F; Wed, 12 Aug 2009 14:20: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 2C94E4448EC; Wed, 12 Aug 2009 12:18:53 +0000 (UTC) Date: Wed, 12 Aug 2009 12:18:52 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org In-Reply-To: <200908121032.n7CAWKEM058850@svn.freebsd.org> Message-ID: <20090812121814.M93661@maildrop.int.zabbadoz.net> References: <200908121032.n7CAWKEM058850@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r196119 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 12:20:09 -0000 On Wed, 12 Aug 2009, Bjoern A. Zeeb wrote: > Author: bz > Date: Wed Aug 12 10:32:20 2009 > New Revision: 196119 > URL: http://svn.freebsd.org/changeset/base/196119 > > Log: > MFC r196118: > Put minimum alignment on the dpcpu and vnet section so that ld > when adding the __start_ symbol knows the expected section alignment > and can place the __start_ symbol correctly. > > These sections will not support symbols with super-cache line alignment > requirements. > > For full details, see posting to freebsd-current, 2009-08-10, > Message-ID: <20090810133111.C93661@maildrop.int.zabbadoz.net>. > > Debugging and testing patches by: > Kamigishi Rei (spambox haruhiism.net), > np, lstewart, jhb, kib, rwatson > Tested by: Kamigishi Rei, lstewart > Reviewed by: kib > > Approved by: re ... Just as a follow-up here as well: [ The following samples, etc are generally "thinking" arch=amd64: ] There are two different kinds of places where we find dynamic per-cpu (dpcpu) data: (1) the so called 'master copy', that is a linker set, which holds the BSS initialized compile-time defaults. (2) a copy for each PU copied to allocated memory. The problem seen has been that single members of the set had been un-aligned at run-time. Dumping the linker set (master copy), things look like this for example: ffffffff8168f8e9 g *ABS* 0000000000000000 __start_set_pcpu ffffffff8168f900 l d set_pcpu 0000000000000000 ffffffff8168f900 g O set_pcpu 0000000000000068 pcpu_entry_sched_switch_stats ffffffff8168f980 l O set_pcpu 0000000000000800 pcpu_entry_modspace ffffffff81690180 g O set_pcpu 0000000000000038 pcpu_entry_epair_dpcpu ffffffff81690200 g O set_pcpu 0000000000000500 pcpu_entry_nws ffffffff81690700 g *ABS* 0000000000000000 __stop_set_pcpu The members of the linker set (master copy) are all well aligned within the set: for example pcpu_entry_nws: 0xffffffff81690200 % 128 = 0 Looking at elfdump for the kernel this is also what we would expect: entry: 32 sh_name: set_pcpu sh_type: SHT_PROGBITS sh_flags: SHF_WRITE|SHF_ALLOC sh_addr: 0xffffffff8168f900 sh_offset: 21559552 sh_size: 3584 sh_link: 0 sh_info: 0 sh_addralign: 128 <<<< sh_entsize: 0 The problem is with __start_set_pcpu, the symbol ld adds to mark the beginning of the section. The address of __start_set_pcpu is not well-aligned, not even pointer-aligned: 0xffffffff8168f8e9 % 8 = 1. When now copying the 'master copy' to a dpcpu area the aligned symbols become un-aligned. Example: dpcpu area starts at 0xffff0000 |--------+------------------------------------------ Copyin the master copy from the objdump above starting at __start_set_pcpu will put __start_set_pcpu at 0xffff0000 but the first symbol pcpu_entry_sched_switch_stats at 0xffff0017 0xffff0000 |--------+------------------------------------------ |~~~~~~~~|------------------------------------------======== 0xffff0017 Two problems become obvious: (1) the symbols are now un-aligned in the per-cpu area. (2) due to the offset we did not copy the entire dpcpu area, so some symbols at the end might not have been properly initialized. While (2) may lead to run-time problems it usually is not a problem with memory corrution as the dpcpu area is usually allocated in pages. So unless the dpcpu symbols end page aligned there should be no corruption. (1) in contrast may lead to other effects like a lock spanning multiple cache lines thus no longer permitting atomic reads and being open to races. The results are panics with truncated pointers trying to access invalid memory regions, etc. On architectures like arm, this will immediatly fault as arm does not allow un-aligned reads. So one solution to the problem would be to make sure we allocate enough memory to also account for the offset to proper alignment and then copying the 'master copy' to a possibly unaligned address as well making the symbols properly aligned again: dpcpu area starts at 0xffff0000 |--------+---------+------------------------------------... |*** unused *******|~~~~~~~~|---------------------------... 0xffff0069 | 0xffff0080 In this sample __start_set_pcpu would be at 0xffff0069 and pcpu_entry_sched_switch_stats at 0xffff0080 and thus properly aligned again. With this things will work. Looking further at the problem you may have already noticed that the section for the 'master copy' starts at 0xffffffff8168f900 and that the __start_set_pcpu is outside of that section at 0xffffffff8168f8e9. Looking at a section dump from `readelf -S kernel` you would notice that the __start_set_pcpu directly follows the end of the previous section. The reasons for this are twofold: (1) ld places the __start_ symbol at '.' (the location counter), which at that point is at the end of the old section as the new (set_pcpu) is not yet added with __start_set_pcpu = ALIGN(0). (2) because we manually define the section, so that it is writeable, ld at the point of writing the __start_ symbol does not yet have any possible section alignment information. That is the reason for the ALIGN(0) in (1). An expected behaviour would be for ld to put the *ABS* at the address where the section begins, once known or fixup the address. This could arguably be a bug in ld we should fix post-8.0. One possible workaround would be to force the __start_ symbol and the section to be equally aligned and thus on the same address using linker scripts. The drawbacks are that we need to touch the fragile linker scripts for each of the sections we add and for all architectures individually. As the enforcement of alignment would be at a different place to the actual set creation, putting the alignment in might be easily forgotten. The advantage would be that we can always be sure that __start_ would be on the same address where the section starts. Another solution is to put minimum alignment on the objects inside the section in a way that it is only in a single place in the source code. The section directive in the respective header file, that will be included by each implementation file, is the ideal place for this. While cache line alignment seems to be the widest alignment restriction currently in use, one drawback, like with above ldscript solution, is that a symbol could possibly enforce a wider alignment restriction onto the section making the __start_ symbol and the section beginning to diverge again. Example: 0xffffffff8168f700 __start_set_pcpu 0xffffffff8168f800 set_pcpu 0xffffffff8168f800 pcpu_entry_sched_switch_stats .. if we would put an alignment of 1024 on pcpu_entry_sched_switch_stats. This is unlikely to happen. With the minimum alignment, ld, at the time of placing the __start_ symbol, already knows about the section alignment and will place it correctly on the section beginning doing: __start_set_pcpu = ALIGN(CACHE_LINE_SHIFT) at ".". Summary: The minimum alignment seems to be the least-intrusive solution and is believed to work for the moment. In addition documenting that the dpcpu and similar sections will not support super-cache line alignment. The long term solution would be to fix ld to DTRT. > > Modified: stable/8/sys/net/vnet.h > ============================================================================== > --- stable/8/sys/net/vnet.h Wed Aug 12 10:26:03 2009 (r196118) > +++ stable/8/sys/net/vnet.h Wed Aug 12 10:32:20 2009 (r196119) > @@ -185,12 +185,14 @@ extern struct sx vnet_sxlock; > * Virtual network stack memory allocator, which allows global variables to > * be automatically instantiated for each network stack instance. > */ > +__asm__( > #if defined(__arm__) > -__asm__(".section " VNET_SETNAME ", \"aw\", %progbits"); > + ".section " VNET_SETNAME ", \"aw\", %progbits\n" > #else > -__asm__(".section " VNET_SETNAME ", \"aw\", @progbits"); > + ".section " VNET_SETNAME ", \"aw\", @progbits\n" > #endif > -__asm__(".previous"); > + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" > + "\t.previous"); > > #define VNET_NAME(n) vnet_entry_##n > #define VNET_DECLARE(t, n) extern t VNET_NAME(n) > > Modified: stable/8/sys/sys/pcpu.h > ============================================================================== > --- stable/8/sys/sys/pcpu.h Wed Aug 12 10:26:03 2009 (r196118) > +++ stable/8/sys/sys/pcpu.h Wed Aug 12 10:32:20 2009 (r196119) > @@ -56,12 +56,14 @@ struct thread; > extern uintptr_t *__start_set_pcpu; > extern uintptr_t *__stop_set_pcpu; > > +__asm__( > #if defined(__arm__) > -__asm__(".section set_pcpu, \"aw\", %progbits"); > + ".section set_pcpu, \"aw\", %progbits\n" > #else > -__asm__(".section set_pcpu, \"aw\", @progbits"); > + ".section set_pcpu, \"aw\", @progbits\n" > #endif > -__asm__(".previous"); > + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" > + "\t.previous"); > > /* > * Array of dynamic pcpu base offsets. Indexed by id. > -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:29:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2F921065678; Wed, 12 Aug 2009 12:29:07 +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 A1CB28FC4A; Wed, 12 Aug 2009 12:29: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 n7CCT7YP064396; Wed, 12 Aug 2009 12:29:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CCT7Bw064394; Wed, 12 Aug 2009 12:29:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908121229.n7CCT7Bw064394@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Aug 2009 12:29: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: r196137 - head/usr.sbin/jls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 12:29:18 -0000 Author: bz Date: Wed Aug 12 12:29:07 2009 New Revision: 196137 URL: http://svn.freebsd.org/changeset/base/196137 Log: Do not truncate IPv6 addresses when printing them in the jls -av 7.x multi-IP jail backward compat output. Reported by: ed Tested by: ed Reviewed by: rwatson Approved by: re Modified: head/usr.sbin/jls/jls.c Modified: head/usr.sbin/jls/jls.c ============================================================================== --- head/usr.sbin/jls/jls.c Wed Aug 12 12:14:30 2009 (r196136) +++ head/usr.sbin/jls/jls.c Wed Aug 12 12:29:07 2009 (r196137) @@ -359,7 +359,7 @@ print_jail(int pflags, int jflags) ipbuf, sizeof(ipbuf)) == NULL) err(1, "inet_ntop"); else - printf("%6s %-15.15s\n", "", ipbuf); + printf("%6s %s\n", "", ipbuf); } } else if (pflags & PRINT_DEFAULT) printf("%6d %-15.15s %-29.29s %.74s\n", From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:31:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E030410656EF; Wed, 12 Aug 2009 12:31:29 +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 CE5488FC66; Wed, 12 Aug 2009 12:31:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CCVTBv064501; Wed, 12 Aug 2009 12:31:29 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CCVTZc064499; Wed, 12 Aug 2009 12:31:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908121231.n7CCVTZc064499@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Aug 2009 12:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196138 - stable/8/usr.sbin/jls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 12:31:31 -0000 Author: bz Date: Wed Aug 12 12:31:29 2009 New Revision: 196138 URL: http://svn.freebsd.org/changeset/base/196138 Log: MFC r196137: Do not truncate IPv6 addresses when printing them in the jls -av 7.x multi-IP jail backward compat output. Reported by: ed Tested by: ed Reviewed by: rwatson Approved by: re Modified: stable/8/usr.sbin/jls/ (props changed) stable/8/usr.sbin/jls/jls.c Modified: stable/8/usr.sbin/jls/jls.c ============================================================================== --- stable/8/usr.sbin/jls/jls.c Wed Aug 12 12:29:07 2009 (r196137) +++ stable/8/usr.sbin/jls/jls.c Wed Aug 12 12:31:29 2009 (r196138) @@ -359,7 +359,7 @@ print_jail(int pflags, int jflags) ipbuf, sizeof(ipbuf)) == NULL) err(1, "inet_ntop"); else - printf("%6s %-15.15s\n", "", ipbuf); + printf("%6s %s\n", "", ipbuf); } } else if (pflags & PRINT_DEFAULT) printf("%6d %-15.15s %-29.29s %.74s\n", From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:50:15 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C99971065670; Wed, 12 Aug 2009 12:50:15 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EF858FC44; Wed, 12 Aug 2009 12:50: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 n7CCoFp3064981; Wed, 12 Aug 2009 12:50:15 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CCoFNJ064979; Wed, 12 Aug 2009 12:50:15 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200908121250.n7CCoFNJ064979@svn.freebsd.org> From: Robert Noland Date: Wed, 12 Aug 2009 12:50: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: r196141 - head/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 12:50:16 -0000 Author: rnoland Date: Wed Aug 12 12:50:15 2009 New Revision: 196141 URL: http://svn.freebsd.org/changeset/base/196141 Log: Add some additional radeon pci ids to drm. Approved by: re (kib) MFC after: 0 days Modified: head/sys/dev/drm/drm_pciids.h Modified: head/sys/dev/drm/drm_pciids.h ============================================================================== --- head/sys/dev/drm/drm_pciids.h Wed Aug 12 12:49:52 2009 (r196140) +++ head/sys/dev/drm/drm_pciids.h Wed Aug 12 12:50:15 2009 (r196141) @@ -259,9 +259,12 @@ {0x1002, 0x940F, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V7600"}, \ {0x1002, 0x94A0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4830"}, \ {0x1002, 0x94A1, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ + {0x1002, 0x94A3, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7740"}, \ {0x1002, 0x94B1, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI RV740"}, \ {0x1002, 0x94B3, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B4, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4700 Series"}, \ {0x1002, 0x94B5, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B9, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M5750"}, \ {0x1002, 0x94C0, CHIP_RV610|RADEON_NEW_MEMMAP, "RV610"}, \ {0x1002, 0x94C1, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 XT"}, \ {0x1002, 0x94C3, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 Pro"}, \ @@ -350,6 +353,7 @@ {0x1002, 0x9487, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x948F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x9490, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4670"}, \ + {0x1002, 0x9495, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4600 Series"}, \ {0x1002, 0x9498, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4650"}, \ {0x1002, 0x9480, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4650"}, \ {0x1002, 0x9488, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4670"}, \ @@ -366,6 +370,7 @@ {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4300 Series"}, \ {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ + {0x1002, 0x9557, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro RG220"}, \ {0, 0, 0, NULL} #define r128_PCI_IDS \ From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 12:57:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D992106564A; Wed, 12 Aug 2009 12:57:03 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4518FC4E; Wed, 12 Aug 2009 12:57: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 n7CCv3a4065150; Wed, 12 Aug 2009 12:57:03 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CCv37U065146; Wed, 12 Aug 2009 12:57:03 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200908121257.n7CCv37U065146@svn.freebsd.org> From: Robert Noland Date: Wed, 12 Aug 2009 12:57: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: r196142 - head/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 12:57:03 -0000 Author: rnoland Date: Wed Aug 12 12:57:02 2009 New Revision: 196142 URL: http://svn.freebsd.org/changeset/base/196142 Log: Add support for radeon RS880 IGP chips to drm. Approved by: re (kib) MFC after: 0 days Modified: head/sys/dev/drm/drm_pciids.h head/sys/dev/drm/r600_cp.c head/sys/dev/drm/radeon_drv.h Modified: head/sys/dev/drm/drm_pciids.h ============================================================================== --- head/sys/dev/drm/drm_pciids.h Wed Aug 12 12:50:15 2009 (r196141) +++ head/sys/dev/drm/drm_pciids.h Wed Aug 12 12:57:02 2009 (r196142) @@ -330,6 +330,11 @@ {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ + {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4200"}, \ + {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 4100"}, \ + {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \ + {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \ + {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \ {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ Modified: head/sys/dev/drm/r600_cp.c ============================================================================== --- head/sys/dev/drm/r600_cp.c Wed Aug 12 12:50:15 2009 (r196141) +++ head/sys/dev/drm/r600_cp.c Wed Aug 12 12:57:02 2009 (r196142) @@ -318,7 +318,8 @@ static void r600_cp_load_microcode(drm_r pfp = RV670_pfp_microcode; break; case CHIP_RS780: - DRM_INFO("Loading RS780 Microcode\n"); + case CHIP_RS880: + DRM_INFO("Loading RS780/RS880 Microcode\n"); cp = RS780_cp_microcode; pfp = RS780_pfp_microcode; break; @@ -722,6 +723,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: dev_priv->r600_max_pipes = 1; dev_priv->r600_max_tile_pipes = 1; @@ -856,7 +858,8 @@ static void r600_gfx_init(struct drm_dev ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV630) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_DB_DEBUG, R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE); else RADEON_WRITE(R600_DB_DEBUG, 0); @@ -874,7 +877,8 @@ static void r600_gfx_init(struct drm_dev sq_ms_fifo_sizes = RADEON_READ(R600_SQ_MS_FIFO_SIZES); if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { sq_ms_fifo_sizes = (R600_CACHE_FIFO_SIZE(0xa) | R600_FETCH_FIFO_HIWATER(0xa) | R600_DONE_FIFO_HIWATER(0xe0) | @@ -917,7 +921,8 @@ static void r600_gfx_init(struct drm_dev R600_NUM_ES_STACK_ENTRIES(0)); } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { /* no vertex cache */ sq_config &= ~R600_VC_ENABLE; @@ -974,7 +979,8 @@ static void r600_gfx_init(struct drm_dev if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_TC_ONLY)); else RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_VC_AND_TC)); @@ -1017,6 +1023,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: gs_prim_buffer_depth = 32; break; @@ -1062,6 +1069,7 @@ static void r600_gfx_init(struct drm_dev switch (dev_priv->flags & RADEON_FAMILY_MASK) { case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: tc_cntl = R600_TC_L2_SIZE(8); break; Modified: head/sys/dev/drm/radeon_drv.h ============================================================================== --- head/sys/dev/drm/radeon_drv.h Wed Aug 12 12:50:15 2009 (r196141) +++ head/sys/dev/drm/radeon_drv.h Wed Aug 12 12:57:02 2009 (r196142) @@ -145,6 +145,7 @@ enum radeon_family { CHIP_RV635, CHIP_RV670, CHIP_RS780, + CHIP_RS880, CHIP_RV770, CHIP_RV740, CHIP_RV730, From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 13:09:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 172331065672; Wed, 12 Aug 2009 13:09:25 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 010C88FC52; Wed, 12 Aug 2009 13:09: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 n7CD9O62065469; Wed, 12 Aug 2009 13:09:24 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CD9O1P065467; Wed, 12 Aug 2009 13:09:24 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200908121309.n7CD9O1P065467@svn.freebsd.org> From: Robert Noland Date: Wed, 12 Aug 2009 13:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196143 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/drm dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 13:09:25 -0000 Author: rnoland Date: Wed Aug 12 13:09:24 2009 New Revision: 196143 URL: http://svn.freebsd.org/changeset/base/196143 Log: Merge r196141 Add some additional radeon pci ids to drm. Approved by: re (kib) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/drm/drm_pciids.h stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/dev/drm/drm_pciids.h ============================================================================== --- stable/8/sys/dev/drm/drm_pciids.h Wed Aug 12 12:57:02 2009 (r196142) +++ stable/8/sys/dev/drm/drm_pciids.h Wed Aug 12 13:09:24 2009 (r196143) @@ -259,9 +259,12 @@ {0x1002, 0x940F, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V7600"}, \ {0x1002, 0x94A0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4830"}, \ {0x1002, 0x94A1, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ + {0x1002, 0x94A3, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7740"}, \ {0x1002, 0x94B1, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI RV740"}, \ {0x1002, 0x94B3, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B4, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4700 Series"}, \ {0x1002, 0x94B5, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B9, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M5750"}, \ {0x1002, 0x94C0, CHIP_RV610|RADEON_NEW_MEMMAP, "RV610"}, \ {0x1002, 0x94C1, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 XT"}, \ {0x1002, 0x94C3, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 Pro"}, \ @@ -350,6 +353,7 @@ {0x1002, 0x9487, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x948F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x9490, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4670"}, \ + {0x1002, 0x9495, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4600 Series"}, \ {0x1002, 0x9498, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4650"}, \ {0x1002, 0x9480, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4650"}, \ {0x1002, 0x9488, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4670"}, \ @@ -366,6 +370,7 @@ {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4300 Series"}, \ {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ + {0x1002, 0x9557, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro RG220"}, \ {0, 0, 0, NULL} #define r128_PCI_IDS \ From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 13:12:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EC57106564A; Wed, 12 Aug 2009 13:12:10 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 287708FC15; Wed, 12 Aug 2009 13:12: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 n7CDC9U4065615; Wed, 12 Aug 2009 13:12:09 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CDC9pC065611; Wed, 12 Aug 2009 13:12:09 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200908121312.n7CDC9pC065611@svn.freebsd.org> From: Robert Noland Date: Wed, 12 Aug 2009 13:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196144 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/drm dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 13:12:11 -0000 Author: rnoland Date: Wed Aug 12 13:12:09 2009 New Revision: 196144 URL: http://svn.freebsd.org/changeset/base/196144 Log: Merge r196142 Add support for radeon RS880 IGP chips to drm. Approved by: re (kib) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/drm/drm_pciids.h stable/8/sys/dev/drm/r600_cp.c stable/8/sys/dev/drm/radeon_drv.h stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/dev/drm/drm_pciids.h ============================================================================== --- stable/8/sys/dev/drm/drm_pciids.h Wed Aug 12 13:09:24 2009 (r196143) +++ stable/8/sys/dev/drm/drm_pciids.h Wed Aug 12 13:12:09 2009 (r196144) @@ -330,6 +330,11 @@ {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ + {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4200"}, \ + {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 4100"}, \ + {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \ + {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \ + {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \ {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ Modified: stable/8/sys/dev/drm/r600_cp.c ============================================================================== --- stable/8/sys/dev/drm/r600_cp.c Wed Aug 12 13:09:24 2009 (r196143) +++ stable/8/sys/dev/drm/r600_cp.c Wed Aug 12 13:12:09 2009 (r196144) @@ -318,7 +318,8 @@ static void r600_cp_load_microcode(drm_r pfp = RV670_pfp_microcode; break; case CHIP_RS780: - DRM_INFO("Loading RS780 Microcode\n"); + case CHIP_RS880: + DRM_INFO("Loading RS780/RS880 Microcode\n"); cp = RS780_cp_microcode; pfp = RS780_pfp_microcode; break; @@ -722,6 +723,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: dev_priv->r600_max_pipes = 1; dev_priv->r600_max_tile_pipes = 1; @@ -856,7 +858,8 @@ static void r600_gfx_init(struct drm_dev ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV630) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_DB_DEBUG, R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE); else RADEON_WRITE(R600_DB_DEBUG, 0); @@ -874,7 +877,8 @@ static void r600_gfx_init(struct drm_dev sq_ms_fifo_sizes = RADEON_READ(R600_SQ_MS_FIFO_SIZES); if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { sq_ms_fifo_sizes = (R600_CACHE_FIFO_SIZE(0xa) | R600_FETCH_FIFO_HIWATER(0xa) | R600_DONE_FIFO_HIWATER(0xe0) | @@ -917,7 +921,8 @@ static void r600_gfx_init(struct drm_dev R600_NUM_ES_STACK_ENTRIES(0)); } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { /* no vertex cache */ sq_config &= ~R600_VC_ENABLE; @@ -974,7 +979,8 @@ static void r600_gfx_init(struct drm_dev if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_TC_ONLY)); else RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_VC_AND_TC)); @@ -1017,6 +1023,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: gs_prim_buffer_depth = 32; break; @@ -1062,6 +1069,7 @@ static void r600_gfx_init(struct drm_dev switch (dev_priv->flags & RADEON_FAMILY_MASK) { case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: tc_cntl = R600_TC_L2_SIZE(8); break; Modified: stable/8/sys/dev/drm/radeon_drv.h ============================================================================== --- stable/8/sys/dev/drm/radeon_drv.h Wed Aug 12 13:09:24 2009 (r196143) +++ stable/8/sys/dev/drm/radeon_drv.h Wed Aug 12 13:12:09 2009 (r196144) @@ -145,6 +145,7 @@ enum radeon_family { CHIP_RV635, CHIP_RV670, CHIP_RS780, + CHIP_RS880, CHIP_RV770, CHIP_RV740, CHIP_RV730, From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 13:19:14 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 816EC106564A; Wed, 12 Aug 2009 13:19:14 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 549DC8FC61; Wed, 12 Aug 2009 13:19: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 n7CDJE4m065819; Wed, 12 Aug 2009 13:19:14 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CDJEIU065817; Wed, 12 Aug 2009 13:19:14 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200908121319.n7CDJEIU065817@svn.freebsd.org> From: Robert Noland Date: Wed, 12 Aug 2009 13:19: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: r196145 - in stable/7/sys: . contrib/pf dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 13:19:15 -0000 Author: rnoland Date: Wed Aug 12 13:19:14 2009 New Revision: 196145 URL: http://svn.freebsd.org/changeset/base/196145 Log: Merge r196141 Add some additional radeon pci ids to drm. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_pciids.h Modified: stable/7/sys/dev/drm/drm_pciids.h ============================================================================== --- stable/7/sys/dev/drm/drm_pciids.h Wed Aug 12 13:12:09 2009 (r196144) +++ stable/7/sys/dev/drm/drm_pciids.h Wed Aug 12 13:19:14 2009 (r196145) @@ -259,9 +259,12 @@ {0x1002, 0x940F, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V7600"}, \ {0x1002, 0x94A0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4830"}, \ {0x1002, 0x94A1, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ + {0x1002, 0x94A3, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7740"}, \ {0x1002, 0x94B1, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI RV740"}, \ {0x1002, 0x94B3, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B4, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4700 Series"}, \ {0x1002, 0x94B5, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B9, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M5750"}, \ {0x1002, 0x94C0, CHIP_RV610|RADEON_NEW_MEMMAP, "RV610"}, \ {0x1002, 0x94C1, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 XT"}, \ {0x1002, 0x94C3, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 Pro"}, \ @@ -350,6 +353,7 @@ {0x1002, 0x9487, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x948F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x9490, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4670"}, \ + {0x1002, 0x9495, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4600 Series"}, \ {0x1002, 0x9498, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4650"}, \ {0x1002, 0x9480, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4650"}, \ {0x1002, 0x9488, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4670"}, \ @@ -366,6 +370,7 @@ {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4300 Series"}, \ {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ + {0x1002, 0x9557, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro RG220"}, \ {0, 0, 0, NULL} #define r128_PCI_IDS \ From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 13:20:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4421106566C; Wed, 12 Aug 2009 13:20:42 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A15128FC1F; Wed, 12 Aug 2009 13:20:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CDKgG0065907; Wed, 12 Aug 2009 13:20:42 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CDKgW6065903; Wed, 12 Aug 2009 13:20:42 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200908121320.n7CDKgW6065903@svn.freebsd.org> From: Robert Noland Date: Wed, 12 Aug 2009 13:20:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196146 - in stable/7/sys: . contrib/pf dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 13:20:43 -0000 Author: rnoland Date: Wed Aug 12 13:20:42 2009 New Revision: 196146 URL: http://svn.freebsd.org/changeset/base/196146 Log: Merge r196142 Add support for radeon RS880 IGP chips to drm. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_pciids.h stable/7/sys/dev/drm/r600_cp.c stable/7/sys/dev/drm/radeon_drv.h Modified: stable/7/sys/dev/drm/drm_pciids.h ============================================================================== --- stable/7/sys/dev/drm/drm_pciids.h Wed Aug 12 13:19:14 2009 (r196145) +++ stable/7/sys/dev/drm/drm_pciids.h Wed Aug 12 13:20:42 2009 (r196146) @@ -330,6 +330,11 @@ {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ + {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4200"}, \ + {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 4100"}, \ + {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \ + {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \ + {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \ {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ Modified: stable/7/sys/dev/drm/r600_cp.c ============================================================================== --- stable/7/sys/dev/drm/r600_cp.c Wed Aug 12 13:19:14 2009 (r196145) +++ stable/7/sys/dev/drm/r600_cp.c Wed Aug 12 13:20:42 2009 (r196146) @@ -318,7 +318,8 @@ static void r600_cp_load_microcode(drm_r pfp = RV670_pfp_microcode; break; case CHIP_RS780: - DRM_INFO("Loading RS780 Microcode\n"); + case CHIP_RS880: + DRM_INFO("Loading RS780/RS880 Microcode\n"); cp = RS780_cp_microcode; pfp = RS780_pfp_microcode; break; @@ -722,6 +723,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: dev_priv->r600_max_pipes = 1; dev_priv->r600_max_tile_pipes = 1; @@ -856,7 +858,8 @@ static void r600_gfx_init(struct drm_dev ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV630) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_DB_DEBUG, R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE); else RADEON_WRITE(R600_DB_DEBUG, 0); @@ -874,7 +877,8 @@ static void r600_gfx_init(struct drm_dev sq_ms_fifo_sizes = RADEON_READ(R600_SQ_MS_FIFO_SIZES); if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { sq_ms_fifo_sizes = (R600_CACHE_FIFO_SIZE(0xa) | R600_FETCH_FIFO_HIWATER(0xa) | R600_DONE_FIFO_HIWATER(0xe0) | @@ -917,7 +921,8 @@ static void r600_gfx_init(struct drm_dev R600_NUM_ES_STACK_ENTRIES(0)); } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { /* no vertex cache */ sq_config &= ~R600_VC_ENABLE; @@ -974,7 +979,8 @@ static void r600_gfx_init(struct drm_dev if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_TC_ONLY)); else RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_VC_AND_TC)); @@ -1017,6 +1023,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: gs_prim_buffer_depth = 32; break; @@ -1062,6 +1069,7 @@ static void r600_gfx_init(struct drm_dev switch (dev_priv->flags & RADEON_FAMILY_MASK) { case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: tc_cntl = R600_TC_L2_SIZE(8); break; Modified: stable/7/sys/dev/drm/radeon_drv.h ============================================================================== --- stable/7/sys/dev/drm/radeon_drv.h Wed Aug 12 13:19:14 2009 (r196145) +++ stable/7/sys/dev/drm/radeon_drv.h Wed Aug 12 13:20:42 2009 (r196146) @@ -145,6 +145,7 @@ enum radeon_family { CHIP_RV635, CHIP_RV670, CHIP_RS780, + CHIP_RS880, CHIP_RV770, CHIP_RV740, CHIP_RV730, From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 14:37:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D714106564A; Wed, 12 Aug 2009 14:37:58 +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 3C7878FC48; Wed, 12 Aug 2009 14:37: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 n7CEbwN3067714; Wed, 12 Aug 2009 14:37:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CEbwMK067711; Wed, 12 Aug 2009 14:37:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908121437.n7CEbwMK067711@svn.freebsd.org> From: John Baldwin Date: Wed, 12 Aug 2009 14:37: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: r196147 - 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, 12 Aug 2009 14:37:58 -0000 Author: jhb Date: Wed Aug 12 14:37:57 2009 New Revision: 196147 URL: http://svn.freebsd.org/changeset/base/196147 Log: Fix references to the kernel distributions to use the correct names (uppercase). PR: docs/137415 Submitted by: Yuri Gorchakov Approved by: re (rwatson, kib) MFC after: 3 days Modified: head/usr.sbin/sysinstall/install.c head/usr.sbin/sysinstall/sysinstall.8 Modified: head/usr.sbin/sysinstall/install.c ============================================================================== --- head/usr.sbin/sysinstall/install.c Wed Aug 12 13:20:42 2009 (r196146) +++ head/usr.sbin/sysinstall/install.c Wed Aug 12 14:37:57 2009 (r196147) @@ -939,7 +939,7 @@ installFixupKernel(dialogMenuItem *self, if (RunningAsInit) { /* * Install something as /boot/kernel. Prefer SMP - * over generic--this should handle the case where + * over GENERIC--this should handle the case where * both SMP and GENERIC are installed (otherwise we * select the one kernel that was installed). * Modified: head/usr.sbin/sysinstall/sysinstall.8 ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.8 Wed Aug 12 13:20:42 2009 (r196146) +++ head/usr.sbin/sysinstall/sysinstall.8 Wed Aug 12 14:37:57 2009 (r196147) @@ -411,9 +411,9 @@ Possible distribution values are: .Bl -tag -width indentxx .It Li base The base binary distribution. -.It Li generic +.It Li GENERIC The GENERIC kernel. -.It Li smp +.It Li SMP A kernel suitable for multiple processor systems. .It Li doc Miscellaneous documentation From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 14:40:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C82E01065670; Wed, 12 Aug 2009 14:40:21 +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 B65388FC52; Wed, 12 Aug 2009 14:40: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 n7CEeLbr067829; Wed, 12 Aug 2009 14:40:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CEeLN4067826; Wed, 12 Aug 2009 14:40:21 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908121440.n7CEeLN4067826@svn.freebsd.org> From: John Baldwin Date: Wed, 12 Aug 2009 14:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196148 - stable/8/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, 12 Aug 2009 14:40:22 -0000 Author: jhb Date: Wed Aug 12 14:40:21 2009 New Revision: 196148 URL: http://svn.freebsd.org/changeset/base/196148 Log: MFC 196147: Fix references to the kernel distributions to use the correct names (uppercase). Approved by: re (rwatson, kib) Modified: stable/8/usr.sbin/sysinstall/ (props changed) stable/8/usr.sbin/sysinstall/install.c stable/8/usr.sbin/sysinstall/sysinstall.8 Modified: stable/8/usr.sbin/sysinstall/install.c ============================================================================== --- stable/8/usr.sbin/sysinstall/install.c Wed Aug 12 14:37:57 2009 (r196147) +++ stable/8/usr.sbin/sysinstall/install.c Wed Aug 12 14:40:21 2009 (r196148) @@ -939,7 +939,7 @@ installFixupKernel(dialogMenuItem *self, if (RunningAsInit) { /* * Install something as /boot/kernel. Prefer SMP - * over generic--this should handle the case where + * over GENERIC--this should handle the case where * both SMP and GENERIC are installed (otherwise we * select the one kernel that was installed). * Modified: stable/8/usr.sbin/sysinstall/sysinstall.8 ============================================================================== --- stable/8/usr.sbin/sysinstall/sysinstall.8 Wed Aug 12 14:37:57 2009 (r196147) +++ stable/8/usr.sbin/sysinstall/sysinstall.8 Wed Aug 12 14:40:21 2009 (r196148) @@ -411,9 +411,9 @@ Possible distribution values are: .Bl -tag -width indentxx .It Li base The base binary distribution. -.It Li generic +.It Li GENERIC The GENERIC kernel. -.It Li smp +.It Li SMP A kernel suitable for multiple processor systems. .It Li doc Miscellaneous documentation From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 16:27:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B6B11065673; Wed, 12 Aug 2009 16:27:51 +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 79E808FC1F; Wed, 12 Aug 2009 16:27: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 n7CGRpA2070194; Wed, 12 Aug 2009 16:27:51 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CGRpam070192; Wed, 12 Aug 2009 16:27:51 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <200908121627.n7CGRpam070192@svn.freebsd.org> From: Rick Macklem Date: Wed, 12 Aug 2009 16:27:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196149 - head/sys/xdr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 16:27:52 -0000 Author: rmacklem Date: Wed Aug 12 16:27:51 2009 New Revision: 196149 URL: http://svn.freebsd.org/changeset/base/196149 Log: Add a check for a NULL mbuf ptr at the beginning of xdrmbuf_inline() so that it returns failure instead of crashing when "m->m_len" is executed and m == NULL. The mbuf ptr can be NULL when a call to xdrmbuf_getbytes() gets the bytes it needs, but they are at the end of a short RPC reply. When this happens, xdrmbuf_getbytes() returns success, but advances the mbuf ptr (xdrs->x_private) to m_next, which is NULL. If this is followed by a call to xdrmbuf_getlong(), it calls xdrmbuf_inline(), which would cause a crash by accessing "m->m_len". Tested by: pho, serenity at exscape dot org Approved by: re (rwatson), kib (mentor) Modified: head/sys/xdr/xdr_mbuf.c Modified: head/sys/xdr/xdr_mbuf.c ============================================================================== --- head/sys/xdr/xdr_mbuf.c Wed Aug 12 14:40:21 2009 (r196148) +++ head/sys/xdr/xdr_mbuf.c Wed Aug 12 16:27:51 2009 (r196149) @@ -282,6 +282,8 @@ xdrmbuf_inline(XDR *xdrs, u_int len) size_t available; char *p; + if (!m) + return (0); if (xdrs->x_op == XDR_ENCODE) { available = M_TRAILINGSPACE(m) + (m->m_len - xdrs->x_handy); } else { From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 17:28:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA4CA1065693; Wed, 12 Aug 2009 17:28:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8BD88FC58; Wed, 12 Aug 2009 17:28: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 n7CHSrTm071528; Wed, 12 Aug 2009 17:28:53 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CHSrxF071523; Wed, 12 Aug 2009 17:28:53 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200908121728.n7CHSrxF071523@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 12 Aug 2009 17:28: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: r196150 - 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: Wed, 12 Aug 2009 17:28:54 -0000 Author: jkim Date: Wed Aug 12 17:28:53 2009 New Revision: 196150 URL: http://svn.freebsd.org/changeset/base/196150 Log: Always embed pointer to BPF JIT function in BPF descriptor to avoid inconsistency when opt_bpf.h is not included. Reviewed by: rwatson Approved by: re (rwatson) Modified: head/sys/net/bpf.c head/sys/net/bpf_buffer.c head/sys/net/bpf_zerocopy.c head/sys/net/bpfdesc.h Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Wed Aug 12 16:27:51 2009 (r196149) +++ head/sys/net/bpf.c Wed Aug 12 17:28:53 2009 (r196150) @@ -1585,6 +1585,9 @@ void bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) { struct bpf_d *d; +#ifdef BPF_JITTER + bpf_jit_filter *bf; +#endif u_int slen; int gottime; struct timeval tv; @@ -1601,8 +1604,9 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, * the interface pointers on the mbuf to figure it out. */ #ifdef BPF_JITTER - if (bpf_jitter_enable != 0 && d->bd_bfilter != NULL) - slen = (*(d->bd_bfilter->func))(pkt, pktlen, pktlen); + bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL; + if (bf != NULL) + slen = (*(bf->func))(pkt, pktlen, pktlen); else #endif slen = bpf_filter(d->bd_rfilter, pkt, pktlen, pktlen); @@ -1634,6 +1638,9 @@ void bpf_mtap(struct bpf_if *bp, struct mbuf *m) { struct bpf_d *d; +#ifdef BPF_JITTER + bpf_jit_filter *bf; +#endif u_int pktlen, slen; int gottime; struct timeval tv; @@ -1655,11 +1662,10 @@ bpf_mtap(struct bpf_if *bp, struct mbuf BPFD_LOCK(d); ++d->bd_rcount; #ifdef BPF_JITTER + bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL; /* XXX We cannot handle multiple mbufs. */ - if (bpf_jitter_enable != 0 && d->bd_bfilter != NULL && - m->m_next == NULL) - slen = (*(d->bd_bfilter->func))(mtod(m, u_char *), - pktlen, pktlen); + if (bf != NULL && m->m_next == NULL) + slen = (*(bf->func))(mtod(m, u_char *), pktlen, pktlen); else #endif slen = bpf_filter(d->bd_rfilter, (u_char *)m, pktlen, 0); Modified: head/sys/net/bpf_buffer.c ============================================================================== --- head/sys/net/bpf_buffer.c Wed Aug 12 16:27:51 2009 (r196149) +++ head/sys/net/bpf_buffer.c Wed Aug 12 17:28:53 2009 (r196150) @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: head/sys/net/bpf_zerocopy.c ============================================================================== --- head/sys/net/bpf_zerocopy.c Wed Aug 12 16:27:51 2009 (r196149) +++ head/sys/net/bpf_zerocopy.c Wed Aug 12 17:28:53 2009 (r196150) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/net/bpfdesc.h ============================================================================== --- head/sys/net/bpfdesc.h Wed Aug 12 16:27:51 2009 (r196149) +++ head/sys/net/bpfdesc.h Wed Aug 12 17:28:53 2009 (r196150) @@ -72,9 +72,7 @@ struct bpf_d { u_long bd_rtout; /* Read timeout in 'ticks' */ struct bpf_insn *bd_rfilter; /* read filter code */ struct bpf_insn *bd_wfilter; /* write filter code */ -#ifdef BPF_JITTER - bpf_jit_filter *bd_bfilter; /* binary filter code */ -#endif + void *bd_bfilter; /* binary filter code */ u_int64_t bd_rcount; /* number of packets received */ u_int64_t bd_dcount; /* number of packets dropped */ From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 17:45:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5EC4106564A; Wed, 12 Aug 2009 17:45:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F5B48FC4B; Wed, 12 Aug 2009 17: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 n7CHjtLd071951; Wed, 12 Aug 2009 17:45:55 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CHjtFw071946; Wed, 12 Aug 2009 17:45:55 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200908121745.n7CHjtFw071946@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 12 Aug 2009 17:45:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196151 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 17:45:56 -0000 Author: jkim Date: Wed Aug 12 17:45:55 2009 New Revision: 196151 URL: http://svn.freebsd.org/changeset/base/196151 Log: MFC: r196150 Always embed pointer to BPF JIT function in BPF descriptor to avoid inconsistency when opt_bpf.h is not included. Reviewed by: rwatson Approved by: re (rwatson) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/bpf.c stable/8/sys/net/bpf_buffer.c stable/8/sys/net/bpf_zerocopy.c stable/8/sys/net/bpfdesc.h stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net/bpf.c ============================================================================== --- stable/8/sys/net/bpf.c Wed Aug 12 17:28:53 2009 (r196150) +++ stable/8/sys/net/bpf.c Wed Aug 12 17:45:55 2009 (r196151) @@ -1585,6 +1585,9 @@ void bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) { struct bpf_d *d; +#ifdef BPF_JITTER + bpf_jit_filter *bf; +#endif u_int slen; int gottime; struct timeval tv; @@ -1601,8 +1604,9 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, * the interface pointers on the mbuf to figure it out. */ #ifdef BPF_JITTER - if (bpf_jitter_enable != 0 && d->bd_bfilter != NULL) - slen = (*(d->bd_bfilter->func))(pkt, pktlen, pktlen); + bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL; + if (bf != NULL) + slen = (*(bf->func))(pkt, pktlen, pktlen); else #endif slen = bpf_filter(d->bd_rfilter, pkt, pktlen, pktlen); @@ -1634,6 +1638,9 @@ void bpf_mtap(struct bpf_if *bp, struct mbuf *m) { struct bpf_d *d; +#ifdef BPF_JITTER + bpf_jit_filter *bf; +#endif u_int pktlen, slen; int gottime; struct timeval tv; @@ -1655,11 +1662,10 @@ bpf_mtap(struct bpf_if *bp, struct mbuf BPFD_LOCK(d); ++d->bd_rcount; #ifdef BPF_JITTER + bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL; /* XXX We cannot handle multiple mbufs. */ - if (bpf_jitter_enable != 0 && d->bd_bfilter != NULL && - m->m_next == NULL) - slen = (*(d->bd_bfilter->func))(mtod(m, u_char *), - pktlen, pktlen); + if (bf != NULL && m->m_next == NULL) + slen = (*(bf->func))(mtod(m, u_char *), pktlen, pktlen); else #endif slen = bpf_filter(d->bd_rfilter, (u_char *)m, pktlen, 0); Modified: stable/8/sys/net/bpf_buffer.c ============================================================================== --- stable/8/sys/net/bpf_buffer.c Wed Aug 12 17:28:53 2009 (r196150) +++ stable/8/sys/net/bpf_buffer.c Wed Aug 12 17:45:55 2009 (r196151) @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: stable/8/sys/net/bpf_zerocopy.c ============================================================================== --- stable/8/sys/net/bpf_zerocopy.c Wed Aug 12 17:28:53 2009 (r196150) +++ stable/8/sys/net/bpf_zerocopy.c Wed Aug 12 17:45:55 2009 (r196151) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: stable/8/sys/net/bpfdesc.h ============================================================================== --- stable/8/sys/net/bpfdesc.h Wed Aug 12 17:28:53 2009 (r196150) +++ stable/8/sys/net/bpfdesc.h Wed Aug 12 17:45:55 2009 (r196151) @@ -72,9 +72,7 @@ struct bpf_d { u_long bd_rtout; /* Read timeout in 'ticks' */ struct bpf_insn *bd_rfilter; /* read filter code */ struct bpf_insn *bd_wfilter; /* write filter code */ -#ifdef BPF_JITTER - bpf_jit_filter *bd_bfilter; /* binary filter code */ -#endif + void *bd_bfilter; /* binary filter code */ u_int64_t bd_rcount; /* number of packets received */ u_int64_t bd_dcount; /* number of packets dropped */ From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 19:15:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC536106566B; Wed, 12 Aug 2009 19:15:27 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B57F8FC16; Wed, 12 Aug 2009 19:15: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 n7CJFRsV073947; Wed, 12 Aug 2009 19:15:27 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CJFRRu073946; Wed, 12 Aug 2009 19:15:27 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200908121915.n7CJFRRu073946@svn.freebsd.org> From: Qing Li Date: Wed, 12 Aug 2009 19:15: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: r196152 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 19:15:28 -0000 Author: qingli Date: Wed Aug 12 19:15:26 2009 New Revision: 196152 URL: http://svn.freebsd.org/changeset/base/196152 Log: A piece of code was added to install a host route when an IPv6 interface address is configured with a /128 prefix. This is no longer necessary due to r192011. In fact that code conflicts with r192011. This patch removes the host route installation when detecting the /128 prefix, and instead let the code added by r192011 to install the loopback route for that IPv6 interface address. Reviewed by: bz Approved by: re Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Wed Aug 12 17:45:55 2009 (r196151) +++ head/sys/netinet6/in6.c Wed Aug 12 19:15:26 2009 (r196152) @@ -1750,21 +1750,12 @@ in6_ifinit(struct ifnet *ifp, struct in6 * interface that share the same destination. */ plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */ - if (!(ia->ia_flags & IFA_ROUTE) && plen == 128) { - struct sockaddr *dstaddr; + if (!(ia->ia_flags & IFA_ROUTE) && plen == 128 && + ia->ia_dstaddr.sin6_family == AF_INET6) { int rtflags = RTF_UP | RTF_HOST; - /* - * use the interface address if configuring an - * interface address with a /128 prefix len - */ - if (ia->ia_dstaddr.sin6_family == AF_INET6) - dstaddr = (struct sockaddr *)&ia->ia_dstaddr; - else - dstaddr = (struct sockaddr *)&ia->ia_addr; - error = rtrequest(RTM_ADD, - (struct sockaddr *)dstaddr, + (struct sockaddr *)&ia->ia_dstaddr, (struct sockaddr *)&ia->ia_addr, (struct sockaddr *)&ia->ia_prefixmask, ia->ia_flags | rtflags, NULL); From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 19:48:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1C98106566B; Wed, 12 Aug 2009 19:48:26 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 51B158FC44; Wed, 12 Aug 2009 19:48:26 +0000 (UTC) Received: from orion.SpringDaemons.com (unknown [77.232.3.143]) by mx0.deglitch.com (Postfix) with ESMTPA id 63B9C8FC2E; Wed, 12 Aug 2009 23:48:24 +0400 (MSD) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 10CE139C4F; Wed, 12 Aug 2009 23:49:45 +0400 (MSD) Date: Wed, 12 Aug 2009 23:49:35 +0400 From: Stanislav Sedov To: Tom Judge Message-Id: <20090812234935.84e5ac74.stas@FreeBSD.org> In-Reply-To: <4A7AFFC4.5050607@tomjudge.com> References: <200902271925.n1RJP699080658@svn.freebsd.org> <20090721145559.d2cf3f0b.stas@FreeBSD.org> <4A7AFFC4.5050607@tomjudge.com> Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Wed__12_Aug_2009_23_49_35_+0400_GA3.EGZtxjQkv.WZ" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, David Christensen Subject: Re: svn commit: r189117 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 19:48:27 -0000 --Signature=_Wed__12_Aug_2009_23_49_35_+0400_GA3.EGZtxjQkv.WZ Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, 06 Aug 2009 11:07:32 -0500 Tom Judge mentioned: >=20 > I can confirm that we are also seeing this problem on a number of Dell=20 > PE2950 systems running the bce driver from 7.2, the bug is more=20 > visible/producible on systems that are using Jumbo Frames (in our case 8K= b). >=20 > The symptoms of this are an increase in the requests for jumbo clusters=20 > denied counter at 9k, and then random network stalls which sometimes=20 > recover on there own and others require a reboot. >=20 > We have backed this change and so far it seems to have fixed the issue. >=20 David, are you OK with reverting this patch? I submitted the patch to re@ for review, and I can commit it if you don't mind doing so. :-) --=20 Stanislav Sedov ST4096-RIPE --Signature=_Wed__12_Aug_2009_23_49_35_+0400_GA3.EGZtxjQkv.WZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJKgxzYAAoJEKN82nOYvCd0PLAP/06x59NY+t+tHTRaAmn1xkbY uzWkHet1lPy/2cfDOqZ6Z8H+nHKG138vvn9gdxxrgtp3UOdlWG/A7Sac7CmA5Vh8 3fg7oJpmwvjqnvMIT6Dhaba9JV18s8u7a7Re5nYDJ/ddjL4i+DVx/20g0BIu0rax DBx3qnFILOa+sNcALdD0nfwe+J13HPPC3wAj5+eHDedvDHkQjpS/ocZViReLbCHP ve8lRwL8HwVYNBaw45LMb+/yVEyZ6I+j1LGlhyIHZ83fMWJTs5Faj2vo0oJqXQhd qCJAs6CvvybcVB2c7rt1efsDcvnSVB40bxs/AOa3QSqTojTnXWfSqSLS+kYkeW+0 DRlo1LIiV2jeXnvnjYAg38nfCYsmzv45fby4XVoxFcFLSAa8MOqJ7Hmzt+3/ckuP 17C4AhqykmqvjuOcvnJRE4TVTC/G/6j4FX9pBckRwtzZy+c7s3fu26b9cJn91Y9o Z/+6N1DiYmw/JJ3GiWvgzncStz/DJSxL+cHp2mJwhvzF0kqLisNDI7sXAZTAFtYl +6y7OZxGw7MnmyMGBpbzlenmM/wS4sQy3sQk5f0kfOX1D1niulSXdb42Kv2+LybC tjWS2RxpAwBB8zVUdC8TKBJ+vSZv/K17ovy3MU6VdWCdcYktkNGrVALwzVHG94YP u59dwwnrOhW+sNzKv3BP =/FQ9 -----END PGP SIGNATURE----- --Signature=_Wed__12_Aug_2009_23_49_35_+0400_GA3.EGZtxjQkv.WZ-- From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 20:30:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E40271065675; Wed, 12 Aug 2009 20:30:27 +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 CE29B8FC57; Wed, 12 Aug 2009 20:30:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CKURhR075658; Wed, 12 Aug 2009 20:30:27 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CKUR1o075657; Wed, 12 Aug 2009 20:30:27 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <200908122030.n7CKUR1o075657@svn.freebsd.org> From: Rick Macklem Date: Wed, 12 Aug 2009 20:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196153 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 20:30:28 -0000 Author: rmacklem Date: Wed Aug 12 20:30:27 2009 New Revision: 196153 URL: http://svn.freebsd.org/changeset/base/196153 Log: MFC r196149: Add a check for a NULL mbuf ptr at the beginning of xdrmbuf_inline() so that it returns failure instead of crashing when "m->m_len" is executed and m == NULL. The mbuf ptr can be NULL when a call to xdrmbuf_getbytes() gets the bytes it needs, but they are at the end of a short RPC reply. When this happens, xdrmbuf_getbytes() returns success, but advances the mbuf ptr (xdrs->x_private) to m_next, which is NULL. If this is followed by a call to xdrmbuf_getlong(), it calls xdrmbuf_inline(), which would cause a crash by accessing "m->m_len". Approved by: re (rwatson), kib (mentor) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xdr/xdr_mbuf.c stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/xdr/xdr_mbuf.c ============================================================================== --- stable/8/sys/xdr/xdr_mbuf.c Wed Aug 12 19:15:26 2009 (r196152) +++ stable/8/sys/xdr/xdr_mbuf.c Wed Aug 12 20:30:27 2009 (r196153) @@ -282,6 +282,8 @@ xdrmbuf_inline(XDR *xdrs, u_int len) size_t available; char *p; + if (!m) + return (0); if (xdrs->x_op == XDR_ENCODE) { available = M_TRAILINGSPACE(m) + (m->m_len - xdrs->x_handy); } else { From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 20:48:52 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A2991065677; Wed, 12 Aug 2009 20:48:52 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2629E8FC4B; Wed, 12 Aug 2009 20: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 n7CKmpGY076161; Wed, 12 Aug 2009 20:48:51 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CKmpm3076160; Wed, 12 Aug 2009 20:48:51 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200908122048.n7CKmpm3076160@svn.freebsd.org> From: Qing Li Date: Wed, 12 Aug 2009 20:48:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196154 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 20:48:53 -0000 Author: qingli Date: Wed Aug 12 20:48:50 2009 New Revision: 196154 URL: http://svn.freebsd.org/changeset/base/196154 Log: MFC r196152 A piece of code was added to install a host route when an IPv6 interface address is configured with a /128 prefix. This is no longer necessary due to r192011. In fact that code conflicts with r192011. This patch removes the host route installation when detecting the /128 prefix, and instead let the code added by r192011 to install the loopback route for that IPv6 interface address. Approved by: re Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netinet6/in6.c stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Wed Aug 12 20:30:27 2009 (r196153) +++ stable/8/sys/netinet6/in6.c Wed Aug 12 20:48:50 2009 (r196154) @@ -1750,21 +1750,12 @@ in6_ifinit(struct ifnet *ifp, struct in6 * interface that share the same destination. */ plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */ - if (!(ia->ia_flags & IFA_ROUTE) && plen == 128) { - struct sockaddr *dstaddr; + if (!(ia->ia_flags & IFA_ROUTE) && plen == 128 && + ia->ia_dstaddr.sin6_family == AF_INET6) { int rtflags = RTF_UP | RTF_HOST; - /* - * use the interface address if configuring an - * interface address with a /128 prefix len - */ - if (ia->ia_dstaddr.sin6_family == AF_INET6) - dstaddr = (struct sockaddr *)&ia->ia_dstaddr; - else - dstaddr = (struct sockaddr *)&ia->ia_addr; - error = rtrequest(RTM_ADD, - (struct sockaddr *)dstaddr, + (struct sockaddr *)&ia->ia_dstaddr, (struct sockaddr *)&ia->ia_addr, (struct sockaddr *)&ia->ia_prefixmask, ia->ia_flags | rtflags, NULL); From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 21:03:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00D9D1065784; Wed, 12 Aug 2009 21:03:17 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD5538FC48; Wed, 12 Aug 2009 21:03: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 n7CL3HEh076550; Wed, 12 Aug 2009 21:03:17 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CL3Hpw076548; Wed, 12 Aug 2009 21:03:17 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200908122103.n7CL3Hpw076548@svn.freebsd.org> From: Sam Leffler Date: Wed, 12 Aug 2009 21:03: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: r196155 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 21:03:21 -0000 Author: sam Date: Wed Aug 12 21:03:16 2009 New Revision: 196155 URL: http://svn.freebsd.org/changeset/base/196155 Log: First (early) draft of net80211 documentation. Note this is focused on driver writers (as opposed to folks adding to net80211). Reviewed by: wkoszek Approved by: re (rwatson) Added: head/share/man/man9/ieee80211_amrr.9 (contents, props changed) head/share/man/man9/ieee80211_beacon.9 (contents, props changed) head/share/man/man9/ieee80211_bmiss.9 (contents, props changed) head/share/man/man9/ieee80211_ddb.9 (contents, props changed) head/share/man/man9/ieee80211_regdomain.9 (contents, props changed) head/share/man/man9/ieee80211_scan.9 (contents, props changed) head/share/man/man9/ieee80211_vap.9 (contents, props changed) Deleted: head/share/man/man9/ieee80211_ioctl.9 Modified: head/share/man/man9/Makefile head/share/man/man9/ieee80211.9 head/share/man/man9/ieee80211_crypto.9 head/share/man/man9/ieee80211_input.9 head/share/man/man9/ieee80211_node.9 head/share/man/man9/ieee80211_output.9 head/share/man/man9/ieee80211_proto.9 head/share/man/man9/ieee80211_radiotap.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Wed Aug 12 20:48:50 2009 (r196154) +++ head/share/man/man9/Makefile Wed Aug 12 21:03:16 2009 (r196155) @@ -121,13 +121,19 @@ MAN= accept_filter.9 \ hashinit.9 \ hexdump.9 \ ieee80211.9 \ + ieee80211_amrr.9 \ + ieee80211_beacon.9 \ + ieee80211_bmiss.9 \ ieee80211_crypto.9 \ + ieee80211_ddb.9 \ ieee80211_input.9 \ - ieee80211_ioctl.9 \ ieee80211_node.9 \ ieee80211_output.9 \ ieee80211_proto.9 \ ieee80211_radiotap.9 \ + ieee80211_regdomain.9 \ + ieee80211_scan.9 \ + ieee80211_vap.9 \ ifnet.9 \ inittodr.9 \ insmntque.9 \ @@ -627,52 +633,62 @@ MLINKS+=hash.9 hash32.9 \ MLINKS+=hashinit.9 hashdestroy.9 \ hashinit.9 hashinit_flags.9 \ hashinit.9 phashinit.9 -MLINKS+=ieee80211.9 ieee80211_attach.9 \ - ieee80211.9 ieee80211_chan2ieee.9 \ - ieee80211.9 ieee80211_chan2mode.9 \ - ieee80211.9 ieee80211_ieee2mhz.9 \ - ieee80211.9 ieee80211_ifattach.9 \ - ieee80211.9 ieee80211_ifdetach.9 \ - ieee80211.9 ieee80211_media2rate.9 \ - ieee80211.9 ieee80211_media_change.9 \ - ieee80211.9 ieee80211_media_init.9 \ - ieee80211.9 ieee80211_media_status.9 \ - ieee80211.9 ieee80211_mhz2ieee.9 \ - ieee80211.9 ieee80211_rate2media.9 \ - ieee80211.9 ieee80211_setmode.9 \ - ieee80211.9 ieee80211_watchdog.9 -MLINKS+=ieee80211_crypto.9 ieee80211_crypto_attach.9 \ - ieee80211_crypto.9 ieee80211_crypto_detach.9 \ - ieee80211_crypto.9 ieee80211_wep_crypt.9 -MLINKS+=ieee80211_input.9 ieee80211_decap.9 \ - ieee80211_input.9 ieee80211_recv_mgmt.9 -MLINKS+=ieee80211_ioctl.9 ieee80211_cfgget.9 \ - ieee80211_ioctl.9 ieee80211_cfgset.9 -MLINKS+=ieee80211_node.9 ieee80211_alloc_node.9 \ - ieee80211_node.9 ieee80211_begin_scan.9 \ - ieee80211_node.9 ieee80211_create_ibss.9 \ - ieee80211_node.9 ieee80211_dup_bss.9 \ - ieee80211_node.9 ieee80211_end_scan.9 \ - ieee80211_node.9 ieee80211_find_node.9 \ - ieee80211_node.9 ieee80211_free_allnodes.9 \ +MLINKS+=ieee80211.9 ieee80211_ifattach.9 \ + ieee80211.9 ieee80211_ifdetach.9 +MLINKS+=ieee80211_amrr.9 ieee80211_amrr_init.9 \ + ieee80211_amrr.9 ieee80211_amrr_cleanup.9 \ + ieee80211_amrr.9 ieee80211_amrr_setinterval.9 \ + ieee80211_amrr.9 ieee80211_amrr_node_init.9 \ + ieee80211_amrr.9 ieee80211_amrr_tx_complete.9 \ + ieee80211_amrr.9 ieee80211_amrr_tx_update.9 +MLINKS+=ieee80211_beacon.9 ieee80211_beacon_alloc.9 \ + ieee80211_beacon.9 ieee80211_beacon_update.9 \ + ieee80211_beacon.9 ieee80211_beacon_notify.9 +MLINKS+=ieee80211_bmiss.9 ieee80211_beacon_miss.9 +MLINKS+=ieee80211_crypto.9 ieee80211_key_update_begin.9 \ + ieee80211_crypto.9 ieee80211_key_update_end.9 \ + ieee80211_crypto.9 ieee80211_crypto_newkey.9 \ + ieee80211_crypto.9 ieee80211_crypto_setkey.9 \ + ieee80211_crypto.9 ieee80211_crypto_delglobalkeys.9 \ + ieee80211_crypto.9 ieee80211_crypto_reload_keys.9 \ + ieee80211_crypto.9 ieee80211_crypto_decap.9 \ + ieee80211_crypto.9 ieee80211_crypto_encap.9 \ + ieee80211_crypto.9 ieee80211_crypto_demic.9 \ + ieee80211_crypto.9 ieee80211_crypto_enmic.9 \ + ieee80211_crypto.9 ieee80211_notify_michael_failure.9 \ + ieee80211_crypto.9 ieee80211_notify_replay_failure.9 \ + ieee80211_crypto.9 ieee80211_crypto_register.9 \ + ieee80211_crypto.9 ieee80211_crypto_unregister.9 \ + ieee80211_crypto.9 ieee80211_crypto_available.9 +MLINKS+=ieee80211_input.9 ieee80211_input_all.9 +MLINKS+=ieee80211_node.9 ieee80211_find_rxnode.9 \ + ieee80211_node.9 ieee80211_find_rxnode_withkey.9 \ + ieee80211_node.9 ieee80211_ref_node.9 \ + ieee80211_node.9 ieee80211_unref_node.9 \ ieee80211_node.9 ieee80211_free_node.9 \ ieee80211_node.9 ieee80211_iterate_nodes.9 \ - ieee80211_node.9 ieee80211_lookup_node.9 \ - ieee80211_node.9 ieee80211_next_scan.9 \ - ieee80211_node.9 ieee80211_node_attach.9 \ - ieee80211_node.9 ieee80211_node_detach.9 \ - ieee80211_node.9 ieee80211_node_lateattach.9 \ - ieee80211_node.9 ieee80211_timeout_nodes.9 -MLINKS+=ieee80211_output.9 ieee80211_add_rates.9 \ - ieee80211_output.9 ieee80211_add_xrates.9 \ - ieee80211_output.9 ieee80211_encap.9 \ - ieee80211_output.9 ieee80211_send_mgmt.9 -MLINKS+=ieee80211_proto.9 ieee80211_dump_pkt.9 \ - ieee80211_proto.9 ieee80211_fix_rate.9 \ - ieee80211_proto.9 ieee80211_print_essid.9 \ - ieee80211_proto.9 ieee80211_proto_attach.9 \ - ieee80211_proto.9 ieee80211_proto_detach.9 -MLINKS+=ieee80211_radiotap.9 radiotap.9 + ieee80211_node.9 ieee80211_dump_node.9 \ + ieee80211_node.9 ieee80211_dump_nodes.9 +MLINKS+=ieee80211_output.9 M_WME_GETAC.9 \ + ieee80211_output.9 M_SEQNO_GET.9 \ + ieee80211_output.9 ieee80211_process_callback.9 +MLINKS+=ieee80211_proto.9 ieee80211_new_state.9 \ + ieee80211_proto.9 ieee80211_start_all.9 \ + ieee80211_proto.9 ieee80211_stop_all.9 \ + ieee80211_proto.9 ieee80211_suspend_all.9 \ + ieee80211_proto.9 ieee80211_resume_all.9 \ + ieee80211_proto.9 ieee80211_waitfor_parent.9 +MLINKS+=ieee80211_radiotap.9 radiotap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_attach.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active_vap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_tx.9 +MLINKS+=ieee80211_regdomain.9 ieee80211_init_channels.9 \ + ieee80211_regdomain.9 ieee80211_sort_channels.9 \ + ieee80211_regdomain.9 ieee80211_alloc_countryie.9 +MLINKS+=ieee80211_vap.9 ieee80211_vap_setup.9 \ + ieee80211_vap.9 ieee80211_vap_attach.9 \ + ieee80211_vap.9 ieee80211_vap_detach.9 MLINKS+=ifnet.9 ifaddr.9 \ ifnet.9 if_data.9 \ ifnet.9 ifqueue.9 Modified: head/share/man/man9/ieee80211.9 ============================================================================== --- head/share/man/man9/ieee80211.9 Wed Aug 12 20:48:50 2009 (r196154) +++ head/share/man/man9/ieee80211.9 Wed Aug 12 21:03:16 2009 (r196155) @@ -1,6 +1,5 @@ .\" -.\" Copyright (c) 2004 Bruce M. Simpson -.\" Copyright (c) 2004 Darron Broad +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,236 +24,538 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.\" $Id: ieee80211.9,v 1.5 2004/03/04 12:33:27 bruce Exp $ .\" -.Dd March 2, 2004 -.Dt IEEE80211 9 +.Dd August 4, 2009 +.Dt NET80211 9 .Os .Sh NAME -.Nm ieee80211_ifattach , ieee80211_ifdetach , -.Nm ieee80211_mhz2ieee , ieee80211_chan2ieee , ieee80211_ieee2mhz , -.Nm ieee80211_media_init , ieee80211_media_change , ieee80211_media_status , -.Nm ieee80211_watchdog , -.Nm ieee80211_setmode , ieee80211_chan2mode , -.Nm ieee80211_rate2media , ieee80211_media2rate -.Nd core 802.11 network stack functions +.Nm net80211 +.Nd 802.11 network layer .Sh SYNOPSIS .In net80211/ieee80211_var.h -.In net80211/ieee80211_proto.h .Ft void -.Fn ieee80211_ifattach "struct ifnet *ifp" +.Fn ieee80211_ifattach "struct ieee80211com *ic" "const uint8_t macaddr[IEEE80211_ADDR_LEN]" .Ft void -.Fn ieee80211_ifdetach "struct ifnet *ifp" -.Ft u_int -.Fn ieee80211_mhz2ieee "u_int freq" "u_int flags" -.Ft u_int -.Fn ieee80211_chan2ieee "struct ieee80211com *ic" "struct ieee80211_channel *c" -.Ft u_int -.Fn ieee80211_ieee2mhz "u_int chan" "u_int flags" -.Ft void -.Fo ieee80211_media_init -.Fa "struct ifnet *ifp" "ifm_change_cb_t media_change" -.Fa "ifm_stat_cb_t media_stat" -.Fc -.Fa int -.Fn ieee80211_media_change "struct ifnet *ifp" -.Fa void -.Fn ieee80211_media_status "struct ifnet *ifp" "struct ifmediareq *imr" -.Ft void -.Fn ieee80211_watchdog "struct ifnet *ifp" -.Ft int -.Fn ieee80211_setmode "struct ieee80211com *ic" "enum ieee80211_phymode mode" -.Ft enum ieee80211_phymode -.Fo ieee80211_chan2mode -.Fa "struct ieee80211com *ic" "struct ieee80211_channel *chan" -.Fc -.Ft int -.Fo ieee80211_rate2media -.Fa "struct ieee80211com *ic" "int rate" "enum ieee80211_phymode mode" -.Fc -.Ft int -.Fn ieee80211_media2rate "int mword" +.Fn ieee80211_ifdetach "struct ieee80211com *ic" .Sh DESCRIPTION -The -.Nm ieee80211 -collection of functions are used to manage wireless network interfaces in the -system which use the system's software 802.11 network stack. -Most of these functions require that attachment to the stack is performed -before calling. -Several utility functions are also provided; these are safe to call from -any driver without prior initialization. +IEEE 802.11 device drivers are written to use the infrastructure provided +by the +.Nm +software layer. +This software provides a support framework for drivers that includes +ifnet cloning, state management, and a user management API by which +applications interact with 802.11 devices. +Most drivers depend on the +.Nm +layer for protocol services but devices that off-load functionality +may bypass the layer to connect directly to the device +(e.g. the +.Xr ndis 4 +emulation support does this). +.Pp +A +.Nm +device driver implements a virtual radio API that is exported to +users through network interfaces (aka vaps) that are cloned from the +underlying device. +These interfaces have an operating mode +(station, adhoc, hostap, wds, monitor, etc.) +that is fixed for the lifetime of the interface. +Devices that can support multiple concurrent interfaces allow +multiple vaps to be cloned. +This enables construction of interesting applications such as +an AP vap and one or more WDS vaps +or multiple AP vaps, each with a different security model. +The +.Nm +layer virtualizes most 802.11 state +and coordinates vap state changes including scheduling multiple vaps. +State that is not virtualized includes the current channel and +WME/WMM parameters. +Protocol processing is typically handled entirely in the +.Nm +layer with drivers responsible purely for moving data between the host +and device. +Similarly, +.Nm +handles most +.Xr ioctl 2 +requests without entering the driver; +instead drivers are notified of state changes that +require their involvement. +.Pp +The virtual radio interface defined by the +.Nm +layer means that drivers must be structured to follow specific rules. +Drivers that support only a single interface at any time must still +follow these rules. +.Sh DATA STRUCTURES +The virtual radio architecture splits state between a single per-device +.Vt ieee80211com +structure and one or more +.Vt ieee80211vap +structures. +Drivers are expected to setup various shared state in these structures +at device attach and during vap creation but otherwise should treat them +as read-only. +The +.Vt ieee80211com +structure is allocated by the +.Nm +layer as adjunct data to a device's +.Vt ifnet ; +it is accessed through the +.Vt if_l2com +structure member. +The +.Vt ieee80211vap +structure is allocated by the driver in the +.Dq vap create +method +and should be extended with any driver-private state. +This technique of giving the driver control to allocate data structures +is used for other +.Nm +data structures and should be exploited to maintain driver-private state +together with public +.Nm +state. +.Pp +The other main data structures are the station, or node, table +that tracks peers in the local BSS, and the channel table that defines +the current set of available radio channels. +Both tables are bound to the +.Vt ieee80211com +structure and shared by all vaps. +Long-lasting references to a node are counted to guard against +premature reclamation. +In particular every packet sent/received holds a node reference +(either explicitly for transmit or implicitly on receive). .Pp -.\" -The -.Fn ieee80211_ifattach -function attaches the network interface -.Fa ifp -to the 802.11 network stack layer. -This function must be called before using any of the -.Nm ieee80211 -functions which need to store driver state across invocations; The -.Vt struct ifnet -instance pointed to by -.Fa ifp -MUST be an instance of -.Vt struct ieee80211com , -with various fields initialized to tell -.Nm ieee80211 -about its capabilities. -This function performs Ethernet and BPF attachment (by calling -.Fn ether_ifattach +.Vt ieee80211com and -.Fn bpfattach2 ) -on behalf of the caller. -It also implements the -.Vt ifmedia -interface. +.Vt ieee80211vap +structures also hold a collection of method pointers that drivers +fill-in and/or override to take control of certain operations. +These methods are the primary way drivers are bound to the +.Nm +layer and are described below. +.Sh DRIVER ATTACH/DETACH +Drivers attach to the +.Nm +layer with the +.Fn ieee80211_ifattach +function. +The driver is expected to allocate and setup any device-private +data structures before passing control. +The +.Vt ieee80211com +structure must be pre-initialized with state required to setup the +.Nm +layer: +.Bl -tag -width ic_channels +.It Dv ic_ifp +Backpointer to the physical device's ifnet. +.It Dv ic_caps +Device/driver capabilities; see below for a complete description. +.It Dv ic_channels +Table of channels the device is capable of operating on. +This is initially provided by the driver but may be changed +through calls that change the regulatory state. +.It Dv ic_nchan +Number of entries in +.Dv ic_channels . +.El .Pp -.\" -The +On return from +.Fn ieee80211_ifattach +the driver is expected to override default callback functions in the +.Vt ieee80211com +structure to register it's private routines. +Methods marked with a +.Dq * +must be provided by the driver. +.Bl -tag -width ic_channels +.It Dv ic_vap_create* +Create a vap instance of the specified type (operating mode). +Any fixed BSSID and/or MAC address is provided. +Drivers that support multi-bssid operation may honor the requested BSSID +or assign their own. +.It Dv ic_vap_delete* +Destroy a vap instance created with +.Dv ic_vap_create . +.It Dv ic_getradiocaps +Return the list of calibrated channels for the radio. +The default method returns the current list of channels +(space permitting). +.It Dv ic_setregdomain +Process a request to change regulatory state. +The routine may reject a request or constrain changes (e.g. reduce +transmit power caps). +The default method accepts all proposed changes. +.It Dv ic_send_mgmt +Send an 802.11 management frame. +The default method fabricates the frame using +.Nm +state and passes it to the driver through the +.Dv ic_raw_xmit +method. +.It Dv ic_raw_xmit +Transmit a raw 802.11 frame. +The default method drops the frame and generates a message on the console. +.It Dv ic_updateslot +Update hardware state after an 802.11 IFS slot time change, +There is no default method; the pointer may be NULL in which case +it will not be used. +.It Dv ic_update_mcast +Update hardware for a change in the multicast packet filter, +The default method prints a console message. +.It Dv ic_update_promisc +Update hardware for a change in the promiscuous mode setting. +The default method prints a console message. +.It Dv ic_newassoc +Update driver/device state for association to a new AP (in station mode) +or when a new station associates (e.g. in AP mode). +There is no default method; the pointer may be NULL in which case +it will not be used. +.It Dv ic_node_alloc +Allocate and initialize a +.Vt ieee80211_node +structure. +This method cannot sleep. +The default method allocates zero'd memory using +.Xr malloc 9. +Drivers should override this method to allocate extended storage +for their own needs. +Memory allocated by the driver must be tagged with +.Dv M_80211_NODE +to balance the memory allocation statistics. +.It Dv ic_node_free +Reclaim storage of a node allocated by +.Dv ic_node_alloc . +Drivers are expected to +.Em interpose +their own method to cleanup private state but must call through +this method to allow +.Nm +to reclaim it's private state. +.It Dv ic_node_cleanup +Cleanup state in a +.Vt ieee80211_node +created by +.Dv ic_node_alloc . +This operation is distinguished from +.Dv ic_node_free +in that it may be called long before the node is actually reclaimed +to cleanup adjunct state. +This can happen, for example, when a node must not be reclaimed +due to references held by packets in the transmit queue. +Drivers typically interpose +.Dv ic_node_cleanup +instead of +.Dv ic_node_free . +.It Dv ic_node_age +Age, and potentially reclaim, resources associated with a node. +The default method ages frames on the power-save queue (in AP mode) +and pending frames in the receive reorder queues (for stations using A-MPDU). +.It Dv ic_node_drain +Reclaim all optional resources associated with a node. +This call is used to free up resources when they are in short supply, +.It Dv ic_node_getrssi +Return the Receive Signal Strength Indication (RSSI) in .5 dBm units for +the specified node. +This interface returns a subset of the information +returned by +.Dv ic_node_getsignal , +The default method calculates a filtered average over the last ten +samples passed in to +.Xr ieee80211_input 9 +or +.Xr ieee80211_input_all 9 . +.It Dv ic_node_getsignal +Return the RSSI and noise floor (in .5 dBm units) for a station. +The default method calculates RSSI as described above; +the noise floor returned is the last value supplied to +.Xr ieee80211_input 9 +or +.Xr ieee80211_input_all 9 . +.It Dv ic_node_getmimoinfo +Return MIMO radio state for a station in support of the +.Dv IEEE80211_IOC_STA_INFO +ioctl request. +The default method returns nothing. +.It Dv ic_scan_start* +Prepare driver/hardware state for scanning. +This callback is done in a sleepable context. +.It Dv ic_scan_end* +Restore driver/hardware state after scanning completes. +This callback is done in a sleepable context. +.It Dv ic_set_channel* +Set the current radio channel using +.Vt ic_curchan . +This callback is done in a sleepable context. +.It Dv ic_scan_curchan +Start scanning on a channel. +This method is called immediately after each channel change +and must initiate the work to scan a channel and schedule a timer +to advance to the next channel in the scan list. +This callback is done in a sleepable context. +The default method handles active scan work (e.g. sending ProbRequest +frames), and schedules a call to +.Xr ieee80211_scan_next 9 +according to the maximum dwell time for the channel. +Drivers that off-load scan work to firmware typically use this method +to trigger per-channel scan activity. +.It Dv ic_scan_mindwell +Handle reaching the minimum dwell time on a channel when scanning. +This event is triggered when one or more stations have been found on +a channel and the minimum dwell time has been reached. +This callback is done in a sleepable context. +The default method signals the scan machinery to advance +to the next channel as soon as possible. +Drivers can use this method to preempt further work (e.g. if scanning +is handled by firmware) or ignore the request to force maximum dwell time +on a channel. +.It Dv ic_recv_action +Process a received Action frame. +The default method points to +.Xr ieee80211_recv_action 9 +which provides a mechanism for setting up handlers for each Action frame class. +.It Dv ic_send_action +Transmit an Action frame. +The default method points to +.Xr ieee80211_send_action 9 +which provides a mechanism for setting up handlers for each Action frame class. +.It Dv ic_ampdu_enable +Check if transmit A-MPDU should be enabled for the specified station and AC. +The default method checks a per-AC traffic rate against a per-vap +threshold to decide if A-MPDU should be enabled. +This method also rate-limits ADDBA requests so that requests are not +made too frequently when a receiver has limited resources. +.It Dv ic_addba_request +Request A-MPDU transmit aggregation. +The default method sets up local state and issues an +ADDBA Request Action frame. +Drivers may interpose this method if they need to setup private state +for handling transmit A-MPDU. +.It Dv ic_addb_response +Process a received ADDBA Response Action frame and setup resources as +needed for doing transmit A-MPDU, +.It Dv ic_addb_stop +Shutdown an A-MPDU transmit stream for the specified station and AC. +The default method reclaims local state after sending a DelBA Action frame. +.It Dv ic_bar_response +Process a response to a transmitted BAR control frame. +.It Dv ic_ampdu_rx_start +Prepare to receive A-MPDU data from the specified station for the TID. +.It Dv ic_ampdu_rx_stop +Terminate receipt of A-MPDU data from the specified station for the TID. +.El +.Pp +Once the +.Nm +layer is attached to a driver there are two more steps typically done +to complete the work: +.Bl -enum +.It +Setup +.Dq radiotap support +for capturing raw 802.11 packets that pass through the device. +This is done with a call to +.Xr ieee80211_radiotap_attach 9 . +.It +Do any final device setup like enabling interrupts. +.El +.Pp +State is torn down and reclaimed with a call to +.Fn ieee80211_ifdetach . +Note this call may result in multiple callbacks into the driver +so it should be done before any critical driver state is reclaimed. +On return from .Fn ieee80211_ifdetach -function frees any -.Nm ieee80211 -structures associated with the driver, and performs Ethernet and BPF -detachment on behalf of the caller. -.Pp -.\" -The -.Fn ieee80211_mhz2ieee -utility function converts the frequency -.Fa freq -(specified in MHz) to an IEEE 802.11 channel number. -The -.Fa flags -argument is a hint which specifies whether the frequency is in -the 2GHz ISM band -.Pq Vt IEEE80211_CHAN_2GHZ -or the 5GHz band -.Pq Vt IEEE80211_CHAN_5GHZ ; -appropriate clipping of the result is then performed. -.Pp -.\" -The -.Fn ieee80211_chan2ieee -function converts the channel specified in -.Fa *c -to an IEEE channel number for the driver -.Fa ic . -If the conversion would be invalid, an error message is printed to the -system console. -This function REQUIRES that the driver is hooked up to the -.Nm ieee80211 -subsystem. -.Pp -.\" -The -.Fn ieee80211_ieee2mhz -utility function converts the IEEE channel number -.Ft chan -to a frequency (in MHz). -The -.Fa flags -argument is a hint which specifies whether the frequency is in -the 2GHz ISM band -.Pq Vt IEEE80211_CHAN_2GHZ -or the 5GHz band -.Pq Vt IEEE80211_CHAN_5GHZ ; -appropriate clipping of the result is then performed. -.Pp -.\" -The -.Fn ieee80211_media_init -function initializes media data structures used by the -.Vt ifmedia -interface, for the driver -.Fa ifp . -It must be called by the driver after calling -.Fn ieee80211_attach -and before calling most -.Nm ieee80211 -functions. -The -.Fa media_change -and -.Fa media_stat -arguments specify helper functions which will be invoked by the -.Vt ifmedia -framework when the user changes or queries media options, -using a command such as -.Xr ifconfig 8 . -.Pp -.\" -The -.Fn ieee80211_media_status +all associated vaps and ifnet structures are reclaimed or inaccessible +to user applications so it is safe to teardown driver state without +worry about being re-entered. +The driver is responsible for calling +.Xr if_free 9 +on the ifnet it allocated for the physical device. +.Sh DRIVER CAPABILITIES +Driver/device capabilities are specified using several sets of flags +in the +.Vt ieee80211com +structure. +General capabilities are specified by +.Vt ic_caps . +Hardware cryptographic capabilities are specified by +.Vt ic_cryptocaps . +802.11n capabilities, if any, are specified by +.Vt ic_htcaps . +The +.Nm +layer propagates a subset of these capabilities to each vap through +the equivalent fields: +.Vt iv_caps , +.Vt iv_cryptocaps , and -.Fn ieee80211_media_change -functions are device-independent handlers for -.Vt ifmedia -commands and are not intended to be called directly. -.Pp -.\" -The -.Fn ieee80211_watchdog -function is intended to be called from a driver's -.Va if_watchdog -routine. -It is used to perform periodic cleanup of state within the software 802.11 -stack, as well as timing out scans. -.Pp -.\" -The -.Fn ieee80211_setmode -function is called from within the 802.11 stack to change the mode -of the driver's PHY; it is not intended to be called directly. -.Pp -.\" -The -.Fn ieee80211_chan2mode -function returns the PHY mode required for use with the channel -.Fa chan -on the device -.Fa ic . -This is typically used when selecting a rate set, to be advertised in -beacons, for example. -.Pp -.\" -The -.Fn ieee80211_rate2media -function converts the bit rate -.Fa rate -(measured in units of 0.5Mbps) to an -.Vt ifmedia -sub-type, for the device -.Fa ic -running in PHY mode -.Fa mode . -The -.Fn ieee80211_media2rate -performs the reverse of this conversion, returning the bit rate (in 0.5Mbps -units) corresponding to an -.Vt ifmedia -sub-type. -.\" +.Vt iv_htcaps . +The following general capabilities are defined: +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_C_STA +Device is capable of operating in station (aka Infrastructure) mode. +.It Dv IEEE80211_C_8023ENCAP +Device requires 802.3-encapsulated frames be passed for transmit. +By default +.Nm +will encapsulate all outbound frames as 802.11 frames (without a PLCP header). +.It Dv IEEE80211_C_FF +Device supports Atheros Fast-Frames. +.It Dv IEEE80211_C_TURBOP +Device supports Atheros Dynamic Turbo mode. +.It Dv IEEE80211_C_IBSS +Device is capable of operating in adhoc/IBSS mode. +.It Dv IEEE80211_C_PMGT +Device supports dynamic power-management (aka power save) in station mode. +.It Dv IEEE80211_C_HOSTAP +Device is capable of operating as an Access Point in Infrastructure mode. +.It Dv IEEE80211_C_AHDEMO +Device is capable of operating in Adhoc Demo mode. +In this mode the device is used purely to send/receive raw 802.11 frames. +.It Dv IEEE80211_C_SWRETRY +Device supports software retry of transmitted frames. +.It Dv IEEE80211_C_TXPMGT +Device support dynamic transmit power changes on transmitted frames; +also known as Transmit Power Control (TPC). +.It Dv IEEE80211_C_SHSLOT +Device supports short slot time operation (for 802.11g). +.It Dv IEEE80211_C_SHPREAMBLE +Device supports short preamble operation (for 802.11g). +.It Dv IEEE80211_C_MONITOR +Device is capable of operating in monitor mode. +.It Dv IEEE80211_C_DFS +Device supports radar detection and/or DFS. +DFS protocol support can be handled by +.Nm +but the device must be capable of detecting radar events. +.It Dv IEEE80211_C_MBSS +Device is capable of operating in MeshBSS (MBSS) mode +(as defined by 802.11s Draft 3.0). +.It Dv IEEE80211_C_WPA1 +Device supports WPA1 operation. +.It Dv IEEE80211_C_WPA2 +Device supports WPA2/802.11i operation. +.It Dv IEEE80211_C_BURST +Device supports frame bursting. +.It Dv IEEE80211_C_WME +Device supports WME/WMM operation +(at the moment this is mostly support for sending and receiving +QoS frames with EDCF). +.It Dv IEEE80211_C_WDS +Device supports transmit/receive of 4-address frames. +.It Dv IEEE80211_C_BGSCAN +Device supports background scanning. +.It Dv IEEE80211_C_TXFRAG +Device supports transmit of fragmented 802.11 frames. +.It Dv IEEE80211_C_TDMA +Device is capable of operating in TDMA mode. +.El +.Pp +The follow general crypto capabilities are defined. +In general +.Nm +will fall-back to software support when a device is not capable +of hardware acceleration of a cipher. +This can be done on a per-key basis. +.Nm +can also handle software +.Dv Michael +calculation combined with hardware +.Dv AES +acceleration. +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_CRYPTO_WEP +Device supports hardware WEP cipher. +.It Dv IEEE80211_CRYPTO_TKIP +Device supports hardware TKIP cipher. +.It Dv IEEE80211_CRYPTO_AES_OCB +Device supports hardware AES-OCB cipher. +.It Dv IEEE80211_CRYPTO_AES_CCM +Device supports hardware AES-CCM cipher. +.It Dv IEEE80211_CRYPTO_TKIPMIC +Device supports hardware Michael for use with TKIP. +.It Dv IEEE80211_CRYPTO_CKIP +Devices supports hardware CKIP cipher. +.El +.Pp +The follow general 802.11n capabilities are defined. +The first capabilities are defined exactly as they appear in the +802.11n specification. +Capabilities beginning with IEEE80211_HTC_AMPDU are used soley by the +.Nm +layer. +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_HTCAP_CHWIDTH40 +Device supports 20/40 channel width operation. +.It Dv IEEE80211_HTCAP_SMPS_DYNAMIC +Device supports dynamic SM power save operation. +.It Dv IEEE80211_HTCAP_SMPS_ENA +Device supports static SM power save operation. +.It Dv IEEE80211_HTCAP_GREENFIELD +Device supports Greenfield preamble. +.It Dv IEEE80211_HTCAP_SHORTGI20 +Device supports Short Guard Interval on 20MHz channels. +.It Dv IEEE80211_HTCAP_SHORTGI40 +Device supports Short Guard Interval on 40MHz channels. +.It Dv IEEE80211_HTCAP_TXSTBC +Device supports Space Time Block Convolution (STBC) for transmit. +.It Dv IEEE80211_HTCAP_RXSTBC_1STREAM +Device supports 1 spatial stream for STBC receive. +.It Dv IEEE80211_HTCAP_RXSTBC_2STREAM +Device supports 1-2 spatial streams for STBC receive. +.It Dv IEEE80211_HTCAP_RXSTBC_3STREAM +Device supports 1-3 spatial streams for STBC receive. +.It Dv IEEE80211_HTCAP_MAXAMSDU_7935 +Device supports A-MSDU frames up to 7935 octets. +.It Dv IEEE80211_HTCAP_MAXAMSDU_3839 +Device supports A-MSDU frames up to 3839 octets. +.It Dv IEEE80211_HTCAP_DSSSCCK40 +Device supports use of DSSS/CCK on 40MHz channels. +.It Dv IEEE80211_HTCAP_PSMP +Device supports PSMP. +.It Dv IEEE80211_HTCAP_40INTOLERANT +Device is intolerant of 40MHz wide channel use. +.It Dv IEEE80211_HTCAP_LSIGTXOPPROT +Device supports L-SIG TXOP protection. +.It Dv IEEE80211_HTC_AMPDU +Device supports A-MPDU aggregation. +Note that any 802.11n compliant device must support A-MPDU receive +so this implicitly means support for +.Em transmit +of A-MPDU frames. +.It Dv IEEE80211_HTC_AMSDU +Device supports A-MSDU aggregation. +Note that any 802.11n compliant device must support A-MSDU receive +so this implicitly means support for +.Em transmit +of A-MSDU frames. +.It Dv IEEE80211_HTC_HT +Device supports High Throughput (HT) operation. +This capability must be set to enable 802.11n functionality +in +.Nm . +.It Dv IEEE80211_HTC_SMPS +Device supports MIMO Power Save operation. +.It Dv IEEE80211_HTC_RIFS +Device supports Reduced Inter Frame Spacing (RIFS). +.El .Sh SEE ALSO -.Xr ieee80211_crypto 9 , +.Xr ioctl 2 , +.Xr ndis 4 , .Xr ieee80211_input 9 , -.Xr ieee80211_ioctl 9 , -.Xr ieee80211_node 9 , -.Xr ieee80211_output 9 , -.Xr ieee80211_proto 9 , -.Xr ieee80211_radiotap 9 , -.Xr ifnet 9 -.Sh HISTORY -The -.Nm ieee80211 -series of functions first appeared in -.Nx 1.5 , -and were later ported to -.Fx 4.6 . -.Sh AUTHORS -.An -nosplit -This manual page was written by -.An Bruce M. Simpson Aq bms@FreeBSD.org -and -.An Darron Broad Aq darron@kewl.org . +.Xr ieee80211_input_all 9 , +.Xr ieee80211_scan_next 9 , +.Xr ieee80211_recv_action 9 , +.Xr ieee80211_send_action 9 , +.Xr ieee80211_radiotap_attach 9 , +.Xr ifnet 9 , +.Xr malloc 9 . Added: head/share/man/man9/ieee80211_amrr.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/ieee80211_amrr.9 Wed Aug 12 21:03:16 2009 (r196155) @@ -0,0 +1,194 @@ +.\" +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting +.\" 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 August 4, 2009 +.Dt IEEE8021_AMRR 9 +.Os +.Sh NAME +.Nm ieee80211_amrr +.Nd 802.11 network driver transmit rate control support +.Sh SYNOPSIS +.In net80211/ieee80211_amrr.h +.Ft void +.Fo ieee80211_amrr_init +.Fa "struct ieee80211_amrr *" +.Fa "struct ieee80211vap *" +.Fa "int amin" +.Fa "int amax" +.Fa "int interval" +.Fc +.\" +.Ft void +.Fn ieee80211_amrr_cleanup "struct ieee80211_amrr *" +.\" +.Ft void +.Fn ieee80211_amrr_setinterval "struct ieee80211_amrr *" "int interval" +.\" +.Ft void +.Fo ieee80211_amrr_node_init +.Fa "struct ieee80211_amrr *" +.Fa "struct ieee80211_amrr_node *" +.Fa "struct ieee80211_node *" +.Fc +.\" +.Ft int +.Fo ieee80211_amrr_choose +.Fa "struct ieee80211_node *" +.Fa "struct ieee80211_amrr_node *" +.Fc +.\" +.Ft void +.Fo ieee80211_amrr_tx_complete +.Fa "struct ieee80211_amrr_node *" +.Fa "int ok" +.Fa "int retries" +.Fc +.\" +.Ft void +.Fo ieee80211_amrr_tx_update +.Fa "struct ieee80211_amrr_node *" +.Fa "int txnct" +.Fa "int success" +.Fa "int retrycnt" +.Fc +.Sh DESCRIPTION +.Nm +is an implementation of the AMRR transmit rate control algorithm +for drivers that use the +.Nm net80211 +software layer. +A rate control algorithm is responsible for choosing the transmit +rate for each frame. +To maximize throughput algorithms try to use the highest rate that +is appropriate for the operating conditions. +The rate will vary as conditions change; the distance between two stations +may change, transient noise may be present that affects signal quality, +etc. +.Nm +uses very simple information from a driver to do it's job: +whether a frame was successfully delivered and how many transmit +attempts were made. +While this enables its use with virtually any wireless device it +limits it's effectiveness--do not expect it to function well in +difficult environments and/or respond quickly to changing conditions. +.Pp +.Nm +requires per-vap state and per-node state for each station it is to +select rates for. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 21:05:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E48E106564A; Wed, 12 Aug 2009 21:05:59 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44C558FC3A; Wed, 12 Aug 2009 21:05: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 n7CL5xv6076661; Wed, 12 Aug 2009 21:05:59 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CL5xAA076659; Wed, 12 Aug 2009 21:05:59 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200908122105.n7CL5xAA076659@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 12 Aug 2009 21:05:59 +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: r196156 - 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: Wed, 12 Aug 2009 21:05:59 -0000 Author: simon Date: Wed Aug 12 21:05:58 2009 New Revision: 196156 URL: http://svn.freebsd.org/changeset/base/196156 Log: - Improve matching of paths to reduce risk of matching the wrong branch. - Add stable/8 support. Submitted by: des, Dimitry Andric Modified: svnadmin/conf/mailer.conf Modified: svnadmin/conf/mailer.conf ============================================================================== --- svnadmin/conf/mailer.conf Wed Aug 12 21:03:16 2009 (r196155) +++ svnadmin/conf/mailer.conf Wed Aug 12 21:05:58 2009 (r196156) @@ -335,54 +335,58 @@ truncate_subject = 200 # [svnadmin] -for_paths = svnadmin/.* +for_paths = ^svnadmin(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-svnadmin@freebsd.org [head] -for_paths = head/.* +for_paths = ^head(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-head@freebsd.org +[stable-8] +for_paths = ^stable/8(/[^/]+)*$ +to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-8@freebsd.org + [stable-7] -for_paths = stable/7/.* +for_paths = ^stable/7(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-7@freebsd.org [stable-6] -for_paths = stable/6/.* +for_paths = ^stable/6(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-6@freebsd.org [stable-other] -for_paths = stable/[^67]/.* +for_paths = ^stable/[^678](/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-other@freebsd.org [projects] -for_paths = projects/.* +for_paths = ^projects(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-projects@freebsd.org [user] -for_paths = user/.* +for_paths = ^user(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-user@freebsd.org [release] -for_paths = release/.* +for_paths = ^release(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-release@freebsd.org [releng] -for_paths = releng.* +for_paths = ^releng(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-releng@freebsd.org [vendor] -for_paths = vendor.* +for_paths = ^vendor(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-cddl] -for_paths = vendor-cddl/.* +for_paths = ^vendor-cddl(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-crypto] -for_paths = vendor-crypto/.* +for_paths = ^vendor-crypto(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-sys] -for_paths = vendor-sys/.* +for_paths = ^vendor-sys(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 21:06:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED1521065674; Wed, 12 Aug 2009 21:06:37 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA7568FC4B; Wed, 12 Aug 2009 21:06:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CL6bsp076718; Wed, 12 Aug 2009 21:06:37 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CL6b0b076713; Wed, 12 Aug 2009 21:06:37 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200908122106.n7CL6b0b076713@svn.freebsd.org> From: Sam Leffler Date: Wed, 12 Aug 2009 21:06: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: r196157 - stable/8/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 21:06:38 -0000 Author: sam Date: Wed Aug 12 21:06:37 2009 New Revision: 196157 URL: http://svn.freebsd.org/changeset/base/196157 Log: MFC 196155: First (early) draft of net80211 documentation. Note this is focused on driver writers (as opposed to folks adding to net80211). Reviewed by: wkoszek Approved by: re (rwatson) Added: stable/8/share/man/man9/ieee80211_amrr.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_amrr.9 stable/8/share/man/man9/ieee80211_beacon.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_beacon.9 stable/8/share/man/man9/ieee80211_bmiss.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_bmiss.9 stable/8/share/man/man9/ieee80211_ddb.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_ddb.9 stable/8/share/man/man9/ieee80211_regdomain.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_regdomain.9 stable/8/share/man/man9/ieee80211_scan.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_scan.9 stable/8/share/man/man9/ieee80211_vap.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_vap.9 Deleted: stable/8/share/man/man9/ieee80211_ioctl.9 Modified: stable/8/share/man/man9/ (props changed) stable/8/share/man/man9/Makefile stable/8/share/man/man9/ieee80211.9 stable/8/share/man/man9/ieee80211_crypto.9 stable/8/share/man/man9/ieee80211_input.9 stable/8/share/man/man9/ieee80211_node.9 stable/8/share/man/man9/ieee80211_output.9 stable/8/share/man/man9/ieee80211_proto.9 stable/8/share/man/man9/ieee80211_radiotap.9 Modified: stable/8/share/man/man9/Makefile ============================================================================== --- stable/8/share/man/man9/Makefile Wed Aug 12 21:05:58 2009 (r196156) +++ stable/8/share/man/man9/Makefile Wed Aug 12 21:06:37 2009 (r196157) @@ -121,13 +121,19 @@ MAN= accept_filter.9 \ hashinit.9 \ hexdump.9 \ ieee80211.9 \ + ieee80211_amrr.9 \ + ieee80211_beacon.9 \ + ieee80211_bmiss.9 \ ieee80211_crypto.9 \ + ieee80211_ddb.9 \ ieee80211_input.9 \ - ieee80211_ioctl.9 \ ieee80211_node.9 \ ieee80211_output.9 \ ieee80211_proto.9 \ ieee80211_radiotap.9 \ + ieee80211_regdomain.9 \ + ieee80211_scan.9 \ + ieee80211_vap.9 \ ifnet.9 \ inittodr.9 \ insmntque.9 \ @@ -627,52 +633,62 @@ MLINKS+=hash.9 hash32.9 \ MLINKS+=hashinit.9 hashdestroy.9 \ hashinit.9 hashinit_flags.9 \ hashinit.9 phashinit.9 -MLINKS+=ieee80211.9 ieee80211_attach.9 \ - ieee80211.9 ieee80211_chan2ieee.9 \ - ieee80211.9 ieee80211_chan2mode.9 \ - ieee80211.9 ieee80211_ieee2mhz.9 \ - ieee80211.9 ieee80211_ifattach.9 \ - ieee80211.9 ieee80211_ifdetach.9 \ - ieee80211.9 ieee80211_media2rate.9 \ - ieee80211.9 ieee80211_media_change.9 \ - ieee80211.9 ieee80211_media_init.9 \ - ieee80211.9 ieee80211_media_status.9 \ - ieee80211.9 ieee80211_mhz2ieee.9 \ - ieee80211.9 ieee80211_rate2media.9 \ - ieee80211.9 ieee80211_setmode.9 \ - ieee80211.9 ieee80211_watchdog.9 -MLINKS+=ieee80211_crypto.9 ieee80211_crypto_attach.9 \ - ieee80211_crypto.9 ieee80211_crypto_detach.9 \ - ieee80211_crypto.9 ieee80211_wep_crypt.9 -MLINKS+=ieee80211_input.9 ieee80211_decap.9 \ - ieee80211_input.9 ieee80211_recv_mgmt.9 -MLINKS+=ieee80211_ioctl.9 ieee80211_cfgget.9 \ - ieee80211_ioctl.9 ieee80211_cfgset.9 -MLINKS+=ieee80211_node.9 ieee80211_alloc_node.9 \ - ieee80211_node.9 ieee80211_begin_scan.9 \ - ieee80211_node.9 ieee80211_create_ibss.9 \ - ieee80211_node.9 ieee80211_dup_bss.9 \ - ieee80211_node.9 ieee80211_end_scan.9 \ - ieee80211_node.9 ieee80211_find_node.9 \ - ieee80211_node.9 ieee80211_free_allnodes.9 \ +MLINKS+=ieee80211.9 ieee80211_ifattach.9 \ + ieee80211.9 ieee80211_ifdetach.9 +MLINKS+=ieee80211_amrr.9 ieee80211_amrr_init.9 \ + ieee80211_amrr.9 ieee80211_amrr_cleanup.9 \ + ieee80211_amrr.9 ieee80211_amrr_setinterval.9 \ + ieee80211_amrr.9 ieee80211_amrr_node_init.9 \ + ieee80211_amrr.9 ieee80211_amrr_tx_complete.9 \ + ieee80211_amrr.9 ieee80211_amrr_tx_update.9 +MLINKS+=ieee80211_beacon.9 ieee80211_beacon_alloc.9 \ + ieee80211_beacon.9 ieee80211_beacon_update.9 \ + ieee80211_beacon.9 ieee80211_beacon_notify.9 +MLINKS+=ieee80211_bmiss.9 ieee80211_beacon_miss.9 +MLINKS+=ieee80211_crypto.9 ieee80211_key_update_begin.9 \ + ieee80211_crypto.9 ieee80211_key_update_end.9 \ + ieee80211_crypto.9 ieee80211_crypto_newkey.9 \ + ieee80211_crypto.9 ieee80211_crypto_setkey.9 \ + ieee80211_crypto.9 ieee80211_crypto_delglobalkeys.9 \ + ieee80211_crypto.9 ieee80211_crypto_reload_keys.9 \ + ieee80211_crypto.9 ieee80211_crypto_decap.9 \ + ieee80211_crypto.9 ieee80211_crypto_encap.9 \ + ieee80211_crypto.9 ieee80211_crypto_demic.9 \ + ieee80211_crypto.9 ieee80211_crypto_enmic.9 \ + ieee80211_crypto.9 ieee80211_notify_michael_failure.9 \ + ieee80211_crypto.9 ieee80211_notify_replay_failure.9 \ + ieee80211_crypto.9 ieee80211_crypto_register.9 \ + ieee80211_crypto.9 ieee80211_crypto_unregister.9 \ + ieee80211_crypto.9 ieee80211_crypto_available.9 +MLINKS+=ieee80211_input.9 ieee80211_input_all.9 +MLINKS+=ieee80211_node.9 ieee80211_find_rxnode.9 \ + ieee80211_node.9 ieee80211_find_rxnode_withkey.9 \ + ieee80211_node.9 ieee80211_ref_node.9 \ + ieee80211_node.9 ieee80211_unref_node.9 \ ieee80211_node.9 ieee80211_free_node.9 \ ieee80211_node.9 ieee80211_iterate_nodes.9 \ - ieee80211_node.9 ieee80211_lookup_node.9 \ - ieee80211_node.9 ieee80211_next_scan.9 \ - ieee80211_node.9 ieee80211_node_attach.9 \ - ieee80211_node.9 ieee80211_node_detach.9 \ - ieee80211_node.9 ieee80211_node_lateattach.9 \ - ieee80211_node.9 ieee80211_timeout_nodes.9 -MLINKS+=ieee80211_output.9 ieee80211_add_rates.9 \ - ieee80211_output.9 ieee80211_add_xrates.9 \ - ieee80211_output.9 ieee80211_encap.9 \ - ieee80211_output.9 ieee80211_send_mgmt.9 -MLINKS+=ieee80211_proto.9 ieee80211_dump_pkt.9 \ - ieee80211_proto.9 ieee80211_fix_rate.9 \ - ieee80211_proto.9 ieee80211_print_essid.9 \ - ieee80211_proto.9 ieee80211_proto_attach.9 \ - ieee80211_proto.9 ieee80211_proto_detach.9 -MLINKS+=ieee80211_radiotap.9 radiotap.9 + ieee80211_node.9 ieee80211_dump_node.9 \ + ieee80211_node.9 ieee80211_dump_nodes.9 +MLINKS+=ieee80211_output.9 M_WME_GETAC.9 \ + ieee80211_output.9 M_SEQNO_GET.9 \ + ieee80211_output.9 ieee80211_process_callback.9 +MLINKS+=ieee80211_proto.9 ieee80211_new_state.9 \ + ieee80211_proto.9 ieee80211_start_all.9 \ + ieee80211_proto.9 ieee80211_stop_all.9 \ + ieee80211_proto.9 ieee80211_suspend_all.9 \ + ieee80211_proto.9 ieee80211_resume_all.9 \ + ieee80211_proto.9 ieee80211_waitfor_parent.9 +MLINKS+=ieee80211_radiotap.9 radiotap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_attach.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active_vap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_tx.9 +MLINKS+=ieee80211_regdomain.9 ieee80211_init_channels.9 \ + ieee80211_regdomain.9 ieee80211_sort_channels.9 \ + ieee80211_regdomain.9 ieee80211_alloc_countryie.9 +MLINKS+=ieee80211_vap.9 ieee80211_vap_setup.9 \ + ieee80211_vap.9 ieee80211_vap_attach.9 \ + ieee80211_vap.9 ieee80211_vap_detach.9 MLINKS+=ifnet.9 ifaddr.9 \ ifnet.9 if_data.9 \ ifnet.9 ifqueue.9 Modified: stable/8/share/man/man9/ieee80211.9 ============================================================================== --- stable/8/share/man/man9/ieee80211.9 Wed Aug 12 21:05:58 2009 (r196156) +++ stable/8/share/man/man9/ieee80211.9 Wed Aug 12 21:06:37 2009 (r196157) @@ -1,6 +1,5 @@ .\" -.\" Copyright (c) 2004 Bruce M. Simpson -.\" Copyright (c) 2004 Darron Broad +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,236 +24,538 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.\" $Id: ieee80211.9,v 1.5 2004/03/04 12:33:27 bruce Exp $ .\" -.Dd March 2, 2004 -.Dt IEEE80211 9 +.Dd August 4, 2009 +.Dt NET80211 9 .Os .Sh NAME -.Nm ieee80211_ifattach , ieee80211_ifdetach , -.Nm ieee80211_mhz2ieee , ieee80211_chan2ieee , ieee80211_ieee2mhz , -.Nm ieee80211_media_init , ieee80211_media_change , ieee80211_media_status , -.Nm ieee80211_watchdog , -.Nm ieee80211_setmode , ieee80211_chan2mode , -.Nm ieee80211_rate2media , ieee80211_media2rate -.Nd core 802.11 network stack functions +.Nm net80211 +.Nd 802.11 network layer .Sh SYNOPSIS .In net80211/ieee80211_var.h -.In net80211/ieee80211_proto.h .Ft void -.Fn ieee80211_ifattach "struct ifnet *ifp" +.Fn ieee80211_ifattach "struct ieee80211com *ic" "const uint8_t macaddr[IEEE80211_ADDR_LEN]" .Ft void -.Fn ieee80211_ifdetach "struct ifnet *ifp" -.Ft u_int -.Fn ieee80211_mhz2ieee "u_int freq" "u_int flags" -.Ft u_int -.Fn ieee80211_chan2ieee "struct ieee80211com *ic" "struct ieee80211_channel *c" -.Ft u_int -.Fn ieee80211_ieee2mhz "u_int chan" "u_int flags" -.Ft void -.Fo ieee80211_media_init -.Fa "struct ifnet *ifp" "ifm_change_cb_t media_change" -.Fa "ifm_stat_cb_t media_stat" -.Fc -.Fa int -.Fn ieee80211_media_change "struct ifnet *ifp" -.Fa void -.Fn ieee80211_media_status "struct ifnet *ifp" "struct ifmediareq *imr" -.Ft void -.Fn ieee80211_watchdog "struct ifnet *ifp" -.Ft int -.Fn ieee80211_setmode "struct ieee80211com *ic" "enum ieee80211_phymode mode" -.Ft enum ieee80211_phymode -.Fo ieee80211_chan2mode -.Fa "struct ieee80211com *ic" "struct ieee80211_channel *chan" -.Fc -.Ft int -.Fo ieee80211_rate2media -.Fa "struct ieee80211com *ic" "int rate" "enum ieee80211_phymode mode" -.Fc -.Ft int -.Fn ieee80211_media2rate "int mword" +.Fn ieee80211_ifdetach "struct ieee80211com *ic" .Sh DESCRIPTION -The -.Nm ieee80211 -collection of functions are used to manage wireless network interfaces in the -system which use the system's software 802.11 network stack. -Most of these functions require that attachment to the stack is performed -before calling. -Several utility functions are also provided; these are safe to call from -any driver without prior initialization. +IEEE 802.11 device drivers are written to use the infrastructure provided +by the +.Nm +software layer. +This software provides a support framework for drivers that includes +ifnet cloning, state management, and a user management API by which +applications interact with 802.11 devices. +Most drivers depend on the +.Nm +layer for protocol services but devices that off-load functionality +may bypass the layer to connect directly to the device +(e.g. the +.Xr ndis 4 +emulation support does this). +.Pp +A +.Nm +device driver implements a virtual radio API that is exported to +users through network interfaces (aka vaps) that are cloned from the +underlying device. +These interfaces have an operating mode +(station, adhoc, hostap, wds, monitor, etc.) +that is fixed for the lifetime of the interface. +Devices that can support multiple concurrent interfaces allow +multiple vaps to be cloned. +This enables construction of interesting applications such as +an AP vap and one or more WDS vaps +or multiple AP vaps, each with a different security model. +The +.Nm +layer virtualizes most 802.11 state +and coordinates vap state changes including scheduling multiple vaps. +State that is not virtualized includes the current channel and +WME/WMM parameters. +Protocol processing is typically handled entirely in the +.Nm +layer with drivers responsible purely for moving data between the host +and device. +Similarly, +.Nm +handles most +.Xr ioctl 2 +requests without entering the driver; +instead drivers are notified of state changes that +require their involvement. +.Pp +The virtual radio interface defined by the +.Nm +layer means that drivers must be structured to follow specific rules. +Drivers that support only a single interface at any time must still +follow these rules. +.Sh DATA STRUCTURES +The virtual radio architecture splits state between a single per-device +.Vt ieee80211com +structure and one or more +.Vt ieee80211vap +structures. +Drivers are expected to setup various shared state in these structures +at device attach and during vap creation but otherwise should treat them +as read-only. +The +.Vt ieee80211com +structure is allocated by the +.Nm +layer as adjunct data to a device's +.Vt ifnet ; +it is accessed through the +.Vt if_l2com +structure member. +The +.Vt ieee80211vap +structure is allocated by the driver in the +.Dq vap create +method +and should be extended with any driver-private state. +This technique of giving the driver control to allocate data structures +is used for other +.Nm +data structures and should be exploited to maintain driver-private state +together with public +.Nm +state. +.Pp +The other main data structures are the station, or node, table +that tracks peers in the local BSS, and the channel table that defines +the current set of available radio channels. +Both tables are bound to the +.Vt ieee80211com +structure and shared by all vaps. +Long-lasting references to a node are counted to guard against +premature reclamation. +In particular every packet sent/received holds a node reference +(either explicitly for transmit or implicitly on receive). .Pp -.\" -The -.Fn ieee80211_ifattach -function attaches the network interface -.Fa ifp -to the 802.11 network stack layer. -This function must be called before using any of the -.Nm ieee80211 -functions which need to store driver state across invocations; The -.Vt struct ifnet -instance pointed to by -.Fa ifp -MUST be an instance of -.Vt struct ieee80211com , -with various fields initialized to tell -.Nm ieee80211 -about its capabilities. -This function performs Ethernet and BPF attachment (by calling -.Fn ether_ifattach +.Vt ieee80211com and -.Fn bpfattach2 ) -on behalf of the caller. -It also implements the -.Vt ifmedia -interface. +.Vt ieee80211vap +structures also hold a collection of method pointers that drivers +fill-in and/or override to take control of certain operations. +These methods are the primary way drivers are bound to the +.Nm +layer and are described below. +.Sh DRIVER ATTACH/DETACH +Drivers attach to the +.Nm +layer with the +.Fn ieee80211_ifattach +function. +The driver is expected to allocate and setup any device-private +data structures before passing control. +The +.Vt ieee80211com +structure must be pre-initialized with state required to setup the +.Nm +layer: +.Bl -tag -width ic_channels +.It Dv ic_ifp +Backpointer to the physical device's ifnet. +.It Dv ic_caps +Device/driver capabilities; see below for a complete description. +.It Dv ic_channels +Table of channels the device is capable of operating on. +This is initially provided by the driver but may be changed +through calls that change the regulatory state. +.It Dv ic_nchan +Number of entries in +.Dv ic_channels . +.El .Pp -.\" -The +On return from +.Fn ieee80211_ifattach +the driver is expected to override default callback functions in the +.Vt ieee80211com +structure to register it's private routines. +Methods marked with a +.Dq * +must be provided by the driver. +.Bl -tag -width ic_channels +.It Dv ic_vap_create* +Create a vap instance of the specified type (operating mode). +Any fixed BSSID and/or MAC address is provided. +Drivers that support multi-bssid operation may honor the requested BSSID +or assign their own. +.It Dv ic_vap_delete* +Destroy a vap instance created with +.Dv ic_vap_create . +.It Dv ic_getradiocaps +Return the list of calibrated channels for the radio. +The default method returns the current list of channels +(space permitting). +.It Dv ic_setregdomain +Process a request to change regulatory state. +The routine may reject a request or constrain changes (e.g. reduce +transmit power caps). +The default method accepts all proposed changes. +.It Dv ic_send_mgmt +Send an 802.11 management frame. +The default method fabricates the frame using +.Nm +state and passes it to the driver through the +.Dv ic_raw_xmit +method. +.It Dv ic_raw_xmit +Transmit a raw 802.11 frame. +The default method drops the frame and generates a message on the console. +.It Dv ic_updateslot +Update hardware state after an 802.11 IFS slot time change, +There is no default method; the pointer may be NULL in which case +it will not be used. +.It Dv ic_update_mcast +Update hardware for a change in the multicast packet filter, +The default method prints a console message. +.It Dv ic_update_promisc +Update hardware for a change in the promiscuous mode setting. +The default method prints a console message. +.It Dv ic_newassoc +Update driver/device state for association to a new AP (in station mode) +or when a new station associates (e.g. in AP mode). +There is no default method; the pointer may be NULL in which case +it will not be used. +.It Dv ic_node_alloc +Allocate and initialize a +.Vt ieee80211_node +structure. +This method cannot sleep. +The default method allocates zero'd memory using +.Xr malloc 9. +Drivers should override this method to allocate extended storage +for their own needs. +Memory allocated by the driver must be tagged with +.Dv M_80211_NODE +to balance the memory allocation statistics. +.It Dv ic_node_free +Reclaim storage of a node allocated by +.Dv ic_node_alloc . +Drivers are expected to +.Em interpose +their own method to cleanup private state but must call through +this method to allow +.Nm +to reclaim it's private state. +.It Dv ic_node_cleanup +Cleanup state in a +.Vt ieee80211_node +created by +.Dv ic_node_alloc . +This operation is distinguished from +.Dv ic_node_free +in that it may be called long before the node is actually reclaimed +to cleanup adjunct state. +This can happen, for example, when a node must not be reclaimed +due to references held by packets in the transmit queue. +Drivers typically interpose +.Dv ic_node_cleanup +instead of +.Dv ic_node_free . +.It Dv ic_node_age +Age, and potentially reclaim, resources associated with a node. +The default method ages frames on the power-save queue (in AP mode) +and pending frames in the receive reorder queues (for stations using A-MPDU). +.It Dv ic_node_drain +Reclaim all optional resources associated with a node. +This call is used to free up resources when they are in short supply, +.It Dv ic_node_getrssi +Return the Receive Signal Strength Indication (RSSI) in .5 dBm units for +the specified node. +This interface returns a subset of the information +returned by +.Dv ic_node_getsignal , +The default method calculates a filtered average over the last ten +samples passed in to +.Xr ieee80211_input 9 +or +.Xr ieee80211_input_all 9 . +.It Dv ic_node_getsignal +Return the RSSI and noise floor (in .5 dBm units) for a station. +The default method calculates RSSI as described above; +the noise floor returned is the last value supplied to +.Xr ieee80211_input 9 +or +.Xr ieee80211_input_all 9 . +.It Dv ic_node_getmimoinfo +Return MIMO radio state for a station in support of the +.Dv IEEE80211_IOC_STA_INFO +ioctl request. +The default method returns nothing. +.It Dv ic_scan_start* +Prepare driver/hardware state for scanning. +This callback is done in a sleepable context. +.It Dv ic_scan_end* +Restore driver/hardware state after scanning completes. +This callback is done in a sleepable context. +.It Dv ic_set_channel* +Set the current radio channel using +.Vt ic_curchan . +This callback is done in a sleepable context. +.It Dv ic_scan_curchan +Start scanning on a channel. +This method is called immediately after each channel change +and must initiate the work to scan a channel and schedule a timer +to advance to the next channel in the scan list. +This callback is done in a sleepable context. +The default method handles active scan work (e.g. sending ProbRequest +frames), and schedules a call to +.Xr ieee80211_scan_next 9 +according to the maximum dwell time for the channel. +Drivers that off-load scan work to firmware typically use this method +to trigger per-channel scan activity. +.It Dv ic_scan_mindwell +Handle reaching the minimum dwell time on a channel when scanning. +This event is triggered when one or more stations have been found on +a channel and the minimum dwell time has been reached. +This callback is done in a sleepable context. +The default method signals the scan machinery to advance +to the next channel as soon as possible. +Drivers can use this method to preempt further work (e.g. if scanning +is handled by firmware) or ignore the request to force maximum dwell time +on a channel. +.It Dv ic_recv_action +Process a received Action frame. +The default method points to +.Xr ieee80211_recv_action 9 +which provides a mechanism for setting up handlers for each Action frame class. +.It Dv ic_send_action +Transmit an Action frame. +The default method points to +.Xr ieee80211_send_action 9 +which provides a mechanism for setting up handlers for each Action frame class. +.It Dv ic_ampdu_enable +Check if transmit A-MPDU should be enabled for the specified station and AC. +The default method checks a per-AC traffic rate against a per-vap +threshold to decide if A-MPDU should be enabled. +This method also rate-limits ADDBA requests so that requests are not +made too frequently when a receiver has limited resources. +.It Dv ic_addba_request +Request A-MPDU transmit aggregation. +The default method sets up local state and issues an +ADDBA Request Action frame. +Drivers may interpose this method if they need to setup private state +for handling transmit A-MPDU. +.It Dv ic_addb_response +Process a received ADDBA Response Action frame and setup resources as +needed for doing transmit A-MPDU, +.It Dv ic_addb_stop +Shutdown an A-MPDU transmit stream for the specified station and AC. +The default method reclaims local state after sending a DelBA Action frame. +.It Dv ic_bar_response +Process a response to a transmitted BAR control frame. +.It Dv ic_ampdu_rx_start +Prepare to receive A-MPDU data from the specified station for the TID. +.It Dv ic_ampdu_rx_stop +Terminate receipt of A-MPDU data from the specified station for the TID. +.El +.Pp +Once the +.Nm +layer is attached to a driver there are two more steps typically done +to complete the work: +.Bl -enum +.It +Setup +.Dq radiotap support +for capturing raw 802.11 packets that pass through the device. +This is done with a call to +.Xr ieee80211_radiotap_attach 9 . +.It +Do any final device setup like enabling interrupts. +.El +.Pp +State is torn down and reclaimed with a call to +.Fn ieee80211_ifdetach . +Note this call may result in multiple callbacks into the driver +so it should be done before any critical driver state is reclaimed. +On return from .Fn ieee80211_ifdetach -function frees any -.Nm ieee80211 -structures associated with the driver, and performs Ethernet and BPF -detachment on behalf of the caller. -.Pp -.\" -The -.Fn ieee80211_mhz2ieee -utility function converts the frequency -.Fa freq -(specified in MHz) to an IEEE 802.11 channel number. -The -.Fa flags -argument is a hint which specifies whether the frequency is in -the 2GHz ISM band -.Pq Vt IEEE80211_CHAN_2GHZ -or the 5GHz band -.Pq Vt IEEE80211_CHAN_5GHZ ; -appropriate clipping of the result is then performed. -.Pp -.\" -The -.Fn ieee80211_chan2ieee -function converts the channel specified in -.Fa *c -to an IEEE channel number for the driver -.Fa ic . -If the conversion would be invalid, an error message is printed to the -system console. -This function REQUIRES that the driver is hooked up to the -.Nm ieee80211 -subsystem. -.Pp -.\" -The -.Fn ieee80211_ieee2mhz -utility function converts the IEEE channel number -.Ft chan -to a frequency (in MHz). -The -.Fa flags -argument is a hint which specifies whether the frequency is in -the 2GHz ISM band -.Pq Vt IEEE80211_CHAN_2GHZ -or the 5GHz band -.Pq Vt IEEE80211_CHAN_5GHZ ; -appropriate clipping of the result is then performed. -.Pp -.\" -The -.Fn ieee80211_media_init -function initializes media data structures used by the -.Vt ifmedia -interface, for the driver -.Fa ifp . -It must be called by the driver after calling -.Fn ieee80211_attach -and before calling most -.Nm ieee80211 -functions. -The -.Fa media_change -and -.Fa media_stat -arguments specify helper functions which will be invoked by the -.Vt ifmedia -framework when the user changes or queries media options, -using a command such as -.Xr ifconfig 8 . -.Pp -.\" -The -.Fn ieee80211_media_status +all associated vaps and ifnet structures are reclaimed or inaccessible +to user applications so it is safe to teardown driver state without +worry about being re-entered. +The driver is responsible for calling +.Xr if_free 9 +on the ifnet it allocated for the physical device. +.Sh DRIVER CAPABILITIES +Driver/device capabilities are specified using several sets of flags +in the +.Vt ieee80211com +structure. +General capabilities are specified by +.Vt ic_caps . +Hardware cryptographic capabilities are specified by +.Vt ic_cryptocaps . +802.11n capabilities, if any, are specified by +.Vt ic_htcaps . +The +.Nm +layer propagates a subset of these capabilities to each vap through +the equivalent fields: +.Vt iv_caps , +.Vt iv_cryptocaps , and -.Fn ieee80211_media_change -functions are device-independent handlers for -.Vt ifmedia -commands and are not intended to be called directly. -.Pp -.\" -The -.Fn ieee80211_watchdog -function is intended to be called from a driver's -.Va if_watchdog -routine. -It is used to perform periodic cleanup of state within the software 802.11 -stack, as well as timing out scans. -.Pp -.\" -The -.Fn ieee80211_setmode -function is called from within the 802.11 stack to change the mode -of the driver's PHY; it is not intended to be called directly. -.Pp -.\" -The -.Fn ieee80211_chan2mode -function returns the PHY mode required for use with the channel -.Fa chan -on the device -.Fa ic . -This is typically used when selecting a rate set, to be advertised in -beacons, for example. -.Pp -.\" -The -.Fn ieee80211_rate2media -function converts the bit rate -.Fa rate -(measured in units of 0.5Mbps) to an -.Vt ifmedia -sub-type, for the device -.Fa ic -running in PHY mode -.Fa mode . -The -.Fn ieee80211_media2rate -performs the reverse of this conversion, returning the bit rate (in 0.5Mbps -units) corresponding to an -.Vt ifmedia -sub-type. -.\" +.Vt iv_htcaps . +The following general capabilities are defined: +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_C_STA +Device is capable of operating in station (aka Infrastructure) mode. +.It Dv IEEE80211_C_8023ENCAP +Device requires 802.3-encapsulated frames be passed for transmit. +By default +.Nm +will encapsulate all outbound frames as 802.11 frames (without a PLCP header). +.It Dv IEEE80211_C_FF +Device supports Atheros Fast-Frames. +.It Dv IEEE80211_C_TURBOP +Device supports Atheros Dynamic Turbo mode. +.It Dv IEEE80211_C_IBSS +Device is capable of operating in adhoc/IBSS mode. +.It Dv IEEE80211_C_PMGT +Device supports dynamic power-management (aka power save) in station mode. +.It Dv IEEE80211_C_HOSTAP +Device is capable of operating as an Access Point in Infrastructure mode. +.It Dv IEEE80211_C_AHDEMO +Device is capable of operating in Adhoc Demo mode. +In this mode the device is used purely to send/receive raw 802.11 frames. +.It Dv IEEE80211_C_SWRETRY +Device supports software retry of transmitted frames. +.It Dv IEEE80211_C_TXPMGT +Device support dynamic transmit power changes on transmitted frames; +also known as Transmit Power Control (TPC). +.It Dv IEEE80211_C_SHSLOT +Device supports short slot time operation (for 802.11g). +.It Dv IEEE80211_C_SHPREAMBLE +Device supports short preamble operation (for 802.11g). +.It Dv IEEE80211_C_MONITOR +Device is capable of operating in monitor mode. +.It Dv IEEE80211_C_DFS +Device supports radar detection and/or DFS. +DFS protocol support can be handled by +.Nm +but the device must be capable of detecting radar events. +.It Dv IEEE80211_C_MBSS +Device is capable of operating in MeshBSS (MBSS) mode +(as defined by 802.11s Draft 3.0). +.It Dv IEEE80211_C_WPA1 +Device supports WPA1 operation. +.It Dv IEEE80211_C_WPA2 +Device supports WPA2/802.11i operation. +.It Dv IEEE80211_C_BURST +Device supports frame bursting. +.It Dv IEEE80211_C_WME +Device supports WME/WMM operation +(at the moment this is mostly support for sending and receiving +QoS frames with EDCF). +.It Dv IEEE80211_C_WDS +Device supports transmit/receive of 4-address frames. +.It Dv IEEE80211_C_BGSCAN +Device supports background scanning. +.It Dv IEEE80211_C_TXFRAG +Device supports transmit of fragmented 802.11 frames. +.It Dv IEEE80211_C_TDMA +Device is capable of operating in TDMA mode. +.El +.Pp +The follow general crypto capabilities are defined. +In general +.Nm +will fall-back to software support when a device is not capable +of hardware acceleration of a cipher. +This can be done on a per-key basis. +.Nm +can also handle software +.Dv Michael +calculation combined with hardware +.Dv AES +acceleration. +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_CRYPTO_WEP +Device supports hardware WEP cipher. +.It Dv IEEE80211_CRYPTO_TKIP +Device supports hardware TKIP cipher. +.It Dv IEEE80211_CRYPTO_AES_OCB +Device supports hardware AES-OCB cipher. +.It Dv IEEE80211_CRYPTO_AES_CCM +Device supports hardware AES-CCM cipher. +.It Dv IEEE80211_CRYPTO_TKIPMIC +Device supports hardware Michael for use with TKIP. +.It Dv IEEE80211_CRYPTO_CKIP +Devices supports hardware CKIP cipher. +.El +.Pp +The follow general 802.11n capabilities are defined. +The first capabilities are defined exactly as they appear in the +802.11n specification. +Capabilities beginning with IEEE80211_HTC_AMPDU are used soley by the +.Nm +layer. +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_HTCAP_CHWIDTH40 +Device supports 20/40 channel width operation. +.It Dv IEEE80211_HTCAP_SMPS_DYNAMIC +Device supports dynamic SM power save operation. +.It Dv IEEE80211_HTCAP_SMPS_ENA +Device supports static SM power save operation. +.It Dv IEEE80211_HTCAP_GREENFIELD +Device supports Greenfield preamble. +.It Dv IEEE80211_HTCAP_SHORTGI20 +Device supports Short Guard Interval on 20MHz channels. +.It Dv IEEE80211_HTCAP_SHORTGI40 +Device supports Short Guard Interval on 40MHz channels. +.It Dv IEEE80211_HTCAP_TXSTBC +Device supports Space Time Block Convolution (STBC) for transmit. +.It Dv IEEE80211_HTCAP_RXSTBC_1STREAM +Device supports 1 spatial stream for STBC receive. +.It Dv IEEE80211_HTCAP_RXSTBC_2STREAM +Device supports 1-2 spatial streams for STBC receive. +.It Dv IEEE80211_HTCAP_RXSTBC_3STREAM +Device supports 1-3 spatial streams for STBC receive. +.It Dv IEEE80211_HTCAP_MAXAMSDU_7935 +Device supports A-MSDU frames up to 7935 octets. +.It Dv IEEE80211_HTCAP_MAXAMSDU_3839 +Device supports A-MSDU frames up to 3839 octets. +.It Dv IEEE80211_HTCAP_DSSSCCK40 +Device supports use of DSSS/CCK on 40MHz channels. +.It Dv IEEE80211_HTCAP_PSMP +Device supports PSMP. +.It Dv IEEE80211_HTCAP_40INTOLERANT +Device is intolerant of 40MHz wide channel use. +.It Dv IEEE80211_HTCAP_LSIGTXOPPROT +Device supports L-SIG TXOP protection. +.It Dv IEEE80211_HTC_AMPDU +Device supports A-MPDU aggregation. +Note that any 802.11n compliant device must support A-MPDU receive +so this implicitly means support for +.Em transmit +of A-MPDU frames. +.It Dv IEEE80211_HTC_AMSDU +Device supports A-MSDU aggregation. +Note that any 802.11n compliant device must support A-MSDU receive +so this implicitly means support for +.Em transmit +of A-MSDU frames. +.It Dv IEEE80211_HTC_HT +Device supports High Throughput (HT) operation. +This capability must be set to enable 802.11n functionality +in +.Nm . +.It Dv IEEE80211_HTC_SMPS +Device supports MIMO Power Save operation. +.It Dv IEEE80211_HTC_RIFS +Device supports Reduced Inter Frame Spacing (RIFS). +.El .Sh SEE ALSO -.Xr ieee80211_crypto 9 , +.Xr ioctl 2 , +.Xr ndis 4 , .Xr ieee80211_input 9 , -.Xr ieee80211_ioctl 9 , -.Xr ieee80211_node 9 , -.Xr ieee80211_output 9 , -.Xr ieee80211_proto 9 , -.Xr ieee80211_radiotap 9 , -.Xr ifnet 9 -.Sh HISTORY -The -.Nm ieee80211 -series of functions first appeared in -.Nx 1.5 , -and were later ported to -.Fx 4.6 . -.Sh AUTHORS -.An -nosplit -This manual page was written by -.An Bruce M. Simpson Aq bms@FreeBSD.org -and -.An Darron Broad Aq darron@kewl.org . +.Xr ieee80211_input_all 9 , +.Xr ieee80211_scan_next 9 , +.Xr ieee80211_recv_action 9 , +.Xr ieee80211_send_action 9 , +.Xr ieee80211_radiotap_attach 9 , +.Xr ifnet 9 , +.Xr malloc 9 . Copied: stable/8/share/man/man9/ieee80211_amrr.9 (from r196155, head/share/man/man9/ieee80211_amrr.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man9/ieee80211_amrr.9 Wed Aug 12 21:06:37 2009 (r196157, copy of r196155, head/share/man/man9/ieee80211_amrr.9) @@ -0,0 +1,194 @@ +.\" +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting +.\" 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 August 4, 2009 +.Dt IEEE8021_AMRR 9 +.Os +.Sh NAME +.Nm ieee80211_amrr +.Nd 802.11 network driver transmit rate control support +.Sh SYNOPSIS +.In net80211/ieee80211_amrr.h +.Ft void +.Fo ieee80211_amrr_init +.Fa "struct ieee80211_amrr *" +.Fa "struct ieee80211vap *" +.Fa "int amin" +.Fa "int amax" +.Fa "int interval" +.Fc +.\" +.Ft void +.Fn ieee80211_amrr_cleanup "struct ieee80211_amrr *" +.\" +.Ft void +.Fn ieee80211_amrr_setinterval "struct ieee80211_amrr *" "int interval" +.\" +.Ft void +.Fo ieee80211_amrr_node_init +.Fa "struct ieee80211_amrr *" +.Fa "struct ieee80211_amrr_node *" +.Fa "struct ieee80211_node *" +.Fc +.\" +.Ft int +.Fo ieee80211_amrr_choose +.Fa "struct ieee80211_node *" +.Fa "struct ieee80211_amrr_node *" +.Fc +.\" +.Ft void +.Fo ieee80211_amrr_tx_complete +.Fa "struct ieee80211_amrr_node *" +.Fa "int ok" +.Fa "int retries" +.Fc +.\" +.Ft void +.Fo ieee80211_amrr_tx_update +.Fa "struct ieee80211_amrr_node *" +.Fa "int txnct" +.Fa "int success" +.Fa "int retrycnt" +.Fc +.Sh DESCRIPTION +.Nm +is an implementation of the AMRR transmit rate control algorithm +for drivers that use the +.Nm net80211 +software layer. +A rate control algorithm is responsible for choosing the transmit +rate for each frame. +To maximize throughput algorithms try to use the highest rate that +is appropriate for the operating conditions. +The rate will vary as conditions change; the distance between two stations +may change, transient noise may be present that affects signal quality, +etc. +.Nm +uses very simple information from a driver to do it's job: +whether a frame was successfully delivered and how many transmit +attempts were made. +While this enables its use with virtually any wireless device it +limits it's effectiveness--do not expect it to function well in +difficult environments and/or respond quickly to changing conditions. +.Pp +.Nm +requires per-vap state and per-node state for each station it is to +select rates for. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 21:06:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55410106564A; Wed, 12 Aug 2009 21:06:44 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 451838FC4D; Wed, 12 Aug 2009 21:06: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 n7CL6iev076757; Wed, 12 Aug 2009 21:06:44 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CL6iT2076755; Wed, 12 Aug 2009 21:06:44 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200908122106.n7CL6iT2076755@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 12 Aug 2009 21:06:44 +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: r196158 - 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: Wed, 12 Aug 2009 21:06:47 -0000 Author: simon Date: Wed Aug 12 21:06:43 2009 New Revision: 196158 URL: http://svn.freebsd.org/changeset/base/196158 Log: Remove empty line... really 'forced' commit to test updated mailer config. Modified: svnadmin/conf/mailer.conf Modified: svnadmin/conf/mailer.conf ============================================================================== --- svnadmin/conf/mailer.conf Wed Aug 12 21:06:37 2009 (r196157) +++ svnadmin/conf/mailer.conf Wed Aug 12 21:06:43 2009 (r196158) @@ -389,4 +389,3 @@ to_addr = src-committers@freebsd.org svn [vendor-sys] for_paths = ^vendor-sys(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org - From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 21:19:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A1341065678; Wed, 12 Aug 2009 21:19:20 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BEAC8FC4F; Wed, 12 Aug 2009 21:19:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CLJJmr077113; Wed, 12 Aug 2009 21:19:20 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CLJJlk077111; Wed, 12 Aug 2009 21:19:19 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200908122119.n7CLJJlk077111@svn.freebsd.org> From: Sam Leffler Date: Wed, 12 Aug 2009 21:19: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: r196159 - 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, 12 Aug 2009 21:19:21 -0000 Author: sam Date: Wed Aug 12 21:19:19 2009 New Revision: 196159 URL: http://svn.freebsd.org/changeset/base/196159 Log: Drain link state event changes posted during vap destroy. This is a band-aid for the general problem that if_link_state_change can be called between if_detach and if_free leaving a task queued that has been free'd. Spotted by: thompsa Reviewed by: rwatson Approved by: re (rwatson) Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Wed Aug 12 21:06:43 2009 (r196158) +++ head/sys/net80211/ieee80211.c Wed Aug 12 21:19:19 2009 (r196159) @@ -573,11 +573,13 @@ ieee80211_vap_detach(struct ieee80211vap /* * Flush any deferred vap tasks. - * NB: must be before ether_ifdetach() and removal from ic_vaps list */ ieee80211_draintask(ic, &vap->iv_nstate_task); ieee80211_draintask(ic, &vap->iv_swbmiss_task); + /* XXX band-aid until ifnet handles this for us */ + taskqueue_drain(taskqueue_swi, &ifp->if_linktask); + IEEE80211_LOCK(ic); KASSERT(vap->iv_state == IEEE80211_S_INIT , ("vap still running")); TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next); From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 21:23:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1EB21065670; Wed, 12 Aug 2009 21:23:41 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86F258FC3E; Wed, 12 Aug 2009 21:23: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 n7CLNfgZ077260; Wed, 12 Aug 2009 21:23:41 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CLNf5J077259; Wed, 12 Aug 2009 21:23:41 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200908122123.n7CLNf5J077259@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 12 Aug 2009 21:23: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: r196160 - in stable/8/crypto/openssl: . apps test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 21:23:42 -0000 Author: simon Date: Wed Aug 12 21:23:41 2009 New Revision: 196160 URL: http://svn.freebsd.org/changeset/base/196160 Log: MFC 196133: Remove symlinks in OpenSSL's testing framework. These are not required for normal build, and doesn't export well to CVS. If they are needed later a script will be added to recreate the symlinks when needed at build time. Approved by: re (rwatson) Deleted: stable/8/crypto/openssl/apps/md4.c stable/8/crypto/openssl/test/bftest.c stable/8/crypto/openssl/test/bntest.c stable/8/crypto/openssl/test/casttest.c stable/8/crypto/openssl/test/destest.c stable/8/crypto/openssl/test/dhtest.c stable/8/crypto/openssl/test/dsatest.c stable/8/crypto/openssl/test/ecdhtest.c stable/8/crypto/openssl/test/ecdsatest.c stable/8/crypto/openssl/test/ectest.c stable/8/crypto/openssl/test/enginetest.c stable/8/crypto/openssl/test/evp_test.c stable/8/crypto/openssl/test/exptest.c stable/8/crypto/openssl/test/fips_aesavs.c stable/8/crypto/openssl/test/fips_desmovs.c stable/8/crypto/openssl/test/fips_dsatest.c stable/8/crypto/openssl/test/fips_dssvs.c stable/8/crypto/openssl/test/fips_hmactest.c stable/8/crypto/openssl/test/fips_randtest.c stable/8/crypto/openssl/test/fips_rngvs.c stable/8/crypto/openssl/test/fips_rsagtest.c stable/8/crypto/openssl/test/fips_rsastest.c stable/8/crypto/openssl/test/fips_rsavtest.c stable/8/crypto/openssl/test/fips_shatest.c stable/8/crypto/openssl/test/fips_test_suite.c stable/8/crypto/openssl/test/hmactest.c stable/8/crypto/openssl/test/ideatest.c stable/8/crypto/openssl/test/jpaketest.c stable/8/crypto/openssl/test/md2test.c stable/8/crypto/openssl/test/md4test.c stable/8/crypto/openssl/test/md5test.c stable/8/crypto/openssl/test/mdc2test.c stable/8/crypto/openssl/test/randtest.c stable/8/crypto/openssl/test/rc2test.c stable/8/crypto/openssl/test/rc4test.c stable/8/crypto/openssl/test/rc5test.c stable/8/crypto/openssl/test/rmdtest.c stable/8/crypto/openssl/test/rsa_test.c stable/8/crypto/openssl/test/sha1test.c stable/8/crypto/openssl/test/sha256t.c stable/8/crypto/openssl/test/sha512t.c stable/8/crypto/openssl/test/shatest.c stable/8/crypto/openssl/test/ssltest.c Modified: stable/8/crypto/openssl/ (props changed) From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 21:34:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAA09106566C; Wed, 12 Aug 2009 21:34:57 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C67328FC44; Wed, 12 Aug 2009 21:34: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 n7CLYvbW077613; Wed, 12 Aug 2009 21:34:57 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CLYvPX077611; Wed, 12 Aug 2009 21:34:57 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200908122134.n7CLYvPX077611@svn.freebsd.org> From: Sam Leffler Date: Wed, 12 Aug 2009 21:34: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: r196161 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Aug 2009 21:34:58 -0000 Author: sam Date: Wed Aug 12 21:34:57 2009 New Revision: 196161 URL: http://svn.freebsd.org/changeset/base/196161 Log: MFC r196159: Drain link state event changes posted during vap destroy. This is a band-aid for the general problem that if_link_state_change can be called between if_detach and if_free leaving a task queued that has been free'd. Reviewed by: rwatson Approved by: re (rwatson) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net80211/ieee80211.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net80211/ieee80211.c ============================================================================== --- stable/8/sys/net80211/ieee80211.c Wed Aug 12 21:23:41 2009 (r196160) +++ stable/8/sys/net80211/ieee80211.c Wed Aug 12 21:34:57 2009 (r196161) @@ -573,11 +573,13 @@ ieee80211_vap_detach(struct ieee80211vap /* * Flush any deferred vap tasks. - * NB: must be before ether_ifdetach() and removal from ic_vaps list */ ieee80211_draintask(ic, &vap->iv_nstate_task); ieee80211_draintask(ic, &vap->iv_swbmiss_task); + /* XXX band-aid until ifnet handles this for us */ + taskqueue_drain(taskqueue_swi, &ifp->if_linktask); + IEEE80211_LOCK(ic); KASSERT(vap->iv_state == IEEE80211_S_INIT , ("vap still running")); TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next); From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 21:45:49 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE36F1065675; Wed, 12 Aug 2009 21:45:49 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5EB158FC4E; Wed, 12 Aug 2009 21:45:49 +0000 (UTC) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id A39ED5C025; Thu, 13 Aug 2009 05:45:48 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 66F1255CDC2A; Thu, 13 Aug 2009 05:45:48 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id FftGxEKzL56N; Thu, 13 Aug 2009 05:44:54 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 959DC55CDC1F; Thu, 13 Aug 2009 05:44:47 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=N703mPS20uIA7FsT4U5TLNU+sPz0iPcmpTSdeI6Age7Txo+w0zPDoyjPOWv3qEFcJ 7hm28Mtwe2SnEJuBQ5rEw== Message-ID: <4A8337BD.3010700@delphij.net> Date: Wed, 12 Aug 2009 14:44:29 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.22 (X11/20090803) MIME-Version: 1.0 To: Stanislav Sedov References: <200902271925.n1RJP699080658@svn.freebsd.org> <20090721145559.d2cf3f0b.stas@FreeBSD.org> <4A7AFFC4.5050607@tomjudge.com> <20090812234935.84e5ac74.stas@FreeBSD.org> In-Reply-To: <20090812234935.84e5ac74.stas@FreeBSD.org> X-Enigmail-Version: 0.96.0 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Tom Judge , svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, David Christensen Subject: Re: svn commit: r189117 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 21:45:50 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Stanislav, Stanislav Sedov wrote: > On Thu, 06 Aug 2009 11:07:32 -0500 > Tom Judge mentioned: > >> I can confirm that we are also seeing this problem on a number of Dell >> PE2950 systems running the bce driver from 7.2, the bug is more >> visible/producible on systems that are using Jumbo Frames (in our case 8Kb). >> >> The symptoms of this are an increase in the requests for jumbo clusters >> denied counter at 9k, and then random network stalls which sometimes >> recover on there own and others require a reboot. >> >> We have backed this change and so far it seems to have fixed the issue. >> > > David, > > are you OK with reverting this patch? I submitted the patch to re@ for > review, and I can commit it if you don't mind doing so. :-) I think there was some motivation supporting the SPLIT_HEADER disable in the past (IIRC it was for reliability or data corruption), but I think I have lost the mail archive (at least I couldn't find it at this moment :-/ I'm not very sure if that was fixed by my busdma_sync fix, though, can anyone confirm that? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkqDN70ACgkQi+vbBBjt66CfiwCeIpYBDxMXZPhW6gLhdXdBYgj4 uIIAoIRnUkEs0n1xTRJb0JzryxR6poD+ =Iuis -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 21:55:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77BAD106566C; Wed, 12 Aug 2009 21:55:47 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 534F38FC4A; Wed, 12 Aug 2009 21:55:47 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id E762A46B37; Wed, 12 Aug 2009 17:55:46 -0400 (EDT) Date: Wed, 12 Aug 2009 22:55:46 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Sam Leffler In-Reply-To: <200908122119.n7CLJJlk077111@svn.freebsd.org> Message-ID: References: <200908122119.n7CLJJlk077111@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196159 - 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, 12 Aug 2009 21:55:47 -0000 On Wed, 12 Aug 2009, Sam Leffler wrote: > Drain link state event changes posted during vap destroy. This is a > band-aid for the general problem that if_link_state_change can be > called between if_detach and if_free leaving a task queued that has > been free'd. FYI to others -- we believe the proper fix should be in the ifnet framework, but this change was the lowest-risk way to resolve the problem for 8.0. Following the release we'll investigate having the ifnet framework provide this protection automatically for drivers. Robert N M Watson Computer Laboratory University of Cambridge > Spotted by: thompsa > Reviewed by: rwatson > Approved by: re (rwatson) > > Modified: > head/sys/net80211/ieee80211.c > > Modified: head/sys/net80211/ieee80211.c > ============================================================================== > --- head/sys/net80211/ieee80211.c Wed Aug 12 21:06:43 2009 (r196158) > +++ head/sys/net80211/ieee80211.c Wed Aug 12 21:19:19 2009 (r196159) > @@ -573,11 +573,13 @@ ieee80211_vap_detach(struct ieee80211vap > > /* > * Flush any deferred vap tasks. > - * NB: must be before ether_ifdetach() and removal from ic_vaps list > */ > ieee80211_draintask(ic, &vap->iv_nstate_task); > ieee80211_draintask(ic, &vap->iv_swbmiss_task); > > + /* XXX band-aid until ifnet handles this for us */ > + taskqueue_drain(taskqueue_swi, &ifp->if_linktask); > + > IEEE80211_LOCK(ic); > KASSERT(vap->iv_state == IEEE80211_S_INIT , ("vap still running")); > TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next); > From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 22:58:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64955106566B; Wed, 12 Aug 2009 22:58:32 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id B11788FC52; Wed, 12 Aug 2009 22:58:31 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 3so138994qwe.7 for ; Wed, 12 Aug 2009 15:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=KrmsiKZLV5AeyOhKwbI75MLSNr5YG9va+s/w2KKG5Q8=; b=KbjVdWd5NdIR60AMAxBETD//coFLX2xhtqhKbmE4X6t8niB7VahwtnAXJwJqe3YwZD /Mj/IezTqBvJ3eI8xC+qt2cIN0KBOCIh+rfxpWFVKZ7Wfql6DYGt76YcCqXe7yUo/OdL UcfDEKI+3s0vEbUy4QitcPLcha5XsYCsXkoVw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=qGl4OqG6VlU+/fVXgwFvU3LLpi5ozdxVqeFzRm3TFgzTVRbMEqOnREo/B8VX8DXlrp 34vOeSO+T+FJ+275FJSepYURTbgZFnX7vzBtWEyXQBNUhlbDLVuG60t1Jmh/gBYKDtHs DpCHPh6ItfGYqVAP1YaNwBh8v7+8cCG/0QGSM= Received: by 10.224.32.7 with SMTP id a7mr704517qad.308.1250117910896; Wed, 12 Aug 2009 15:58:30 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 2sm3248650qwi.33.2009.08.12.15.58.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 12 Aug 2009 15:58:30 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Wed, 12 Aug 2009 15:57:26 -0700 From: Pyun YongHyeon Date: Wed, 12 Aug 2009 15:57:26 -0700 To: Xin LI Message-ID: <20090812225726.GI55129@michelle.cdnetworks.com> References: <200902271925.n1RJP699080658@svn.freebsd.org> <20090721145559.d2cf3f0b.stas@FreeBSD.org> <4A7AFFC4.5050607@tomjudge.com> <20090812234935.84e5ac74.stas@FreeBSD.org> <4A8337BD.3010700@delphij.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A8337BD.3010700@delphij.net> User-Agent: Mutt/1.4.2.3i Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, David Christensen , Stanislav Sedov , svn-src-head@freebsd.org, Tom Judge Subject: Re: svn commit: r189117 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 22:58:32 -0000 On Wed, Aug 12, 2009 at 02:44:29PM -0700, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, Stanislav, > > Stanislav Sedov wrote: > > On Thu, 06 Aug 2009 11:07:32 -0500 > > Tom Judge mentioned: > > > >> I can confirm that we are also seeing this problem on a number of Dell > >> PE2950 systems running the bce driver from 7.2, the bug is more > >> visible/producible on systems that are using Jumbo Frames (in our case 8Kb). > >> > >> The symptoms of this are an increase in the requests for jumbo clusters > >> denied counter at 9k, and then random network stalls which sometimes > >> recover on there own and others require a reboot. > >> > >> We have backed this change and so far it seems to have fixed the issue. > >> > > > > David, > > > > are you OK with reverting this patch? I submitted the patch to re@ for > > review, and I can commit it if you don't mind doing so. :-) > > I think there was some motivation supporting the SPLIT_HEADER disable in > the past (IIRC it was for reliability or data corruption), but I think I > have lost the mail archive (at least I couldn't find it at this moment > :-/ I'm not very sure if that was fixed by my busdma_sync fix, though, > can anyone confirm that? > Since I don't have bce(4) hardwares I can't confirm it. I think the busdma_sync fix would be prerequisite condition to fix data corruption problem but I think it would not necessarily fix previous data corruption issue. From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 01:17:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6994C1065670; Thu, 13 Aug 2009 01:17:27 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 584C08FC3F; Thu, 13 Aug 2009 01:17: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 n7D1HROm082172; Thu, 13 Aug 2009 01:17:27 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D1HR7E082170; Thu, 13 Aug 2009 01:17:27 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <200908130117.n7D1HR7E082170@svn.freebsd.org> From: Matt Jacob Date: Thu, 13 Aug 2009 01:17: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: r196162 - head/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 01:17:27 -0000 Author: mjacob Date: Thu Aug 13 01:17:26 2009 New Revision: 196162 URL: http://svn.freebsd.org/changeset/base/196162 Log: Have at least *some* default WWN to fall back on, otherwise Sun branded FC cards won't configure. Reviewed by: Ken, Scott Approved by: re Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Aug 12 21:34:57 2009 (r196161) +++ head/sys/dev/isp/isp_freebsd.c Thu Aug 13 01:17:26 2009 (r196162) @@ -5280,6 +5280,10 @@ isp_default_wwn(ispsoftc_t * isp, int ch return (seed); } seed = iswwnn ? FCPARAM(isp, chan)->isp_wwnn_nvram : FCPARAM(isp, chan)->isp_wwpn_nvram; + if (seed) { + return (seed); + } + return (0x400000007F000009ull); } else { seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; } From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 01:45:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0832E1065670; Thu, 13 Aug 2009 01:45:27 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E976B8FC44; Thu, 13 Aug 2009 01:45: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 n7D1jQ41082801; Thu, 13 Aug 2009 01:45:26 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D1jQd7082799; Thu, 13 Aug 2009 01:45:26 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <200908130145.n7D1jQd7082799@svn.freebsd.org> From: Matt Jacob Date: Thu, 13 Aug 2009 01:45: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: r196163 - stable/8/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 01:45:27 -0000 Author: mjacob Date: Thu Aug 13 01:45:26 2009 New Revision: 196163 URL: http://svn.freebsd.org/changeset/base/196163 Log: MFC 196162: Have at least a fallback WWN so cards on sun branded FC cards can configure. Approved by: re Modified: stable/8/sys/dev/isp/isp_freebsd.c Modified: stable/8/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/8/sys/dev/isp/isp_freebsd.c Thu Aug 13 01:17:26 2009 (r196162) +++ stable/8/sys/dev/isp/isp_freebsd.c Thu Aug 13 01:45:26 2009 (r196163) @@ -5280,6 +5280,10 @@ isp_default_wwn(ispsoftc_t * isp, int ch return (seed); } seed = iswwnn ? FCPARAM(isp, chan)->isp_wwnn_nvram : FCPARAM(isp, chan)->isp_wwpn_nvram; + if (seed) { + return (seed); + } + return (0x400000007F000009ull); } else { seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; } From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 06:07:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEEC7106566C; Thu, 13 Aug 2009 06:07:39 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83D1D8FC49; Thu, 13 Aug 2009 06:07: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 n7D67dup089198; Thu, 13 Aug 2009 06:07:39 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D67dfm089197; Thu, 13 Aug 2009 06:07:39 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200908130607.n7D67dfm089197@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 13 Aug 2009 06:07: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: r196164 - in head: contrib/bzip2 contrib/netcat contrib/openpam 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, 13 Aug 2009 06:07:40 -0000 Author: des Date: Thu Aug 13 06:07:38 2009 New Revision: 196164 URL: http://svn.freebsd.org/changeset/base/196164 Log: Update and remove CVS-specific items Approved by: re (kib) Modified: head/contrib/bzip2/FREEBSD-vendor head/contrib/netcat/FREEBSD-vendor head/contrib/openpam/FREEBSD-vendor head/crypto/openssh/FREEBSD-vendor Modified: head/contrib/bzip2/FREEBSD-vendor ============================================================================== --- head/contrib/bzip2/FREEBSD-vendor Thu Aug 13 01:45:26 2009 (r196163) +++ head/contrib/bzip2/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) @@ -2,6 +2,4 @@ Project: bzip2 ProjectURL: http://www.bzip.org/ Version: 1.0.5 -VendorTag: BZIP2 -VersionTag: v1_0_5 License: BSD Modified: head/contrib/netcat/FREEBSD-vendor ============================================================================== --- head/contrib/netcat/FREEBSD-vendor Thu Aug 13 01:45:26 2009 (r196163) +++ head/contrib/netcat/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) @@ -2,6 +2,4 @@ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ Version: 4.4 -VendorTag: OPENBSD -VersionTag: OPENBSD_4_4 License: BSD Modified: head/contrib/openpam/FREEBSD-vendor ============================================================================== --- head/contrib/openpam/FREEBSD-vendor Thu Aug 13 01:45:26 2009 (r196163) +++ head/contrib/openpam/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) @@ -2,7 +2,5 @@ Project: OpenPAM ProjectURL: http://www.openpam.org/ Version: Hydrangea (20071221) -VendorTag: OPENPAM -VersionTag: OPENPAM_HYDRANGEA License: BSD Maintainer: des Modified: head/crypto/openssh/FREEBSD-vendor ============================================================================== --- head/crypto/openssh/FREEBSD-vendor Thu Aug 13 01:45:26 2009 (r196163) +++ head/crypto/openssh/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) @@ -1,8 +1,6 @@ # $FreeBSD$ Project: Portable OpenSSH ProjectURL: http://www.openssh.com/portable.html -Version: 5.1p1 -VendorTag: OPENSSH -VersionTag: OpenSSH_5_1p1 +Version: 5.2p1 License: BSD Maintainer: des From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 06:13:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D3C5106566B; Thu, 13 Aug 2009 06:13:46 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E565B8FC3F; Thu, 13 Aug 2009 06:13: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 n7D6DjRr089491; Thu, 13 Aug 2009 06:13:45 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D6Dje1089486; Thu, 13 Aug 2009 06:13:45 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200908130613.n7D6Dje1089486@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 13 Aug 2009 06:13: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: r196165 - in stable/8: contrib/bzip2 contrib/netcat contrib/openpam 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, 13 Aug 2009 06:13:46 -0000 Author: des Date: Thu Aug 13 06:13:45 2009 New Revision: 196165 URL: http://svn.freebsd.org/changeset/base/196165 Log: merge r196164: update & remove CVS-specific items. Approved by: re (kib) Modified: stable/8/contrib/bzip2/ (props changed) stable/8/contrib/bzip2/FREEBSD-vendor stable/8/contrib/netcat/ (props changed) stable/8/contrib/netcat/FREEBSD-vendor stable/8/contrib/openpam/ (props changed) stable/8/contrib/openpam/FREEBSD-vendor stable/8/crypto/openssh/ (props changed) stable/8/crypto/openssh/FREEBSD-vendor Modified: stable/8/contrib/bzip2/FREEBSD-vendor ============================================================================== --- stable/8/contrib/bzip2/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/contrib/bzip2/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -2,6 +2,4 @@ Project: bzip2 ProjectURL: http://www.bzip.org/ Version: 1.0.5 -VendorTag: BZIP2 -VersionTag: v1_0_5 License: BSD Modified: stable/8/contrib/netcat/FREEBSD-vendor ============================================================================== --- stable/8/contrib/netcat/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/contrib/netcat/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -2,6 +2,4 @@ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ Version: 4.4 -VendorTag: OPENBSD -VersionTag: OPENBSD_4_4 License: BSD Modified: stable/8/contrib/openpam/FREEBSD-vendor ============================================================================== --- stable/8/contrib/openpam/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/contrib/openpam/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -2,7 +2,5 @@ Project: OpenPAM ProjectURL: http://www.openpam.org/ Version: Hydrangea (20071221) -VendorTag: OPENPAM -VersionTag: OPENPAM_HYDRANGEA License: BSD Maintainer: des Modified: stable/8/crypto/openssh/FREEBSD-vendor ============================================================================== --- stable/8/crypto/openssh/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/crypto/openssh/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -1,8 +1,6 @@ # $FreeBSD$ Project: Portable OpenSSH ProjectURL: http://www.openssh.com/portable.html -Version: 5.1p1 -VendorTag: OPENSSH -VersionTag: OpenSSH_5_1p1 +Version: 5.2p1 License: BSD Maintainer: des From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 07:19:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B255106566C; Thu, 13 Aug 2009 07:19:44 +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 EDB4F8FC1F; Thu, 13 Aug 2009 07:19: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 n7D7Jh6k090785; Thu, 13 Aug 2009 07:19:43 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 n7D7JhBA090783; Thu, 13 Aug 2009 07:19:43 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200908130719.n7D7JhBA090783@svn.freebsd.org> From: Nick Hibma Date: Thu, 13 Aug 2009 07:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196166 - 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: Thu, 13 Aug 2009 07:19:44 -0000 Author: n_hibma Date: Thu Aug 13 07:19:43 2009 New Revision: 196166 URL: http://svn.freebsd.org/changeset/base/196166 Log: Reset the debugging flag to 0. Modified: stable/7/sys/dev/usb/u3g.c Modified: stable/7/sys/dev/usb/u3g.c ============================================================================== --- stable/7/sys/dev/usb/u3g.c Thu Aug 13 06:13:45 2009 (r196165) +++ stable/7/sys/dev/usb/u3g.c Thu Aug 13 07:19:43 2009 (r196166) @@ -52,7 +52,7 @@ #endif #include "usbdevs.h" -static int u3gdebug = 1; +static int u3gdebug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, u3g, CTLFLAG_RW, 0, "USB u3g"); SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RW, &u3gdebug, 0, "u3g debug level"); From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 07:21:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7C2F106564A; Thu, 13 Aug 2009 07:21:24 +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 7D21E8FC51; Thu, 13 Aug 2009 07: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 n7D7LOse090863; Thu, 13 Aug 2009 07:21:24 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 n7D7LOWd090861; Thu, 13 Aug 2009 07:21:24 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200908130721.n7D7LOWd090861@svn.freebsd.org> From: Nick Hibma Date: Thu, 13 Aug 2009 07:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196167 - 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: Thu, 13 Aug 2009 07:21:25 -0000 Author: n_hibma Date: Thu Aug 13 07:21:24 2009 New Revision: 196167 URL: http://svn.freebsd.org/changeset/base/196167 Log: Restart the controller if it has halted. Restarting it makes the USB tree functional again (without reconnecting the devices, mind you). On my laptop there is probably a short somewhere on the motherboard and once in a while the host controller halts. Modified: stable/7/sys/dev/usb/uhci.c Modified: stable/7/sys/dev/usb/uhci.c ============================================================================== --- stable/7/sys/dev/usb/uhci.c Thu Aug 13 07:19:43 2009 (r196166) +++ stable/7/sys/dev/usb/uhci.c Thu Aug 13 07:21:24 2009 (r196167) @@ -1205,20 +1205,55 @@ uhci_intr1(uhci_softc_t *sc) device_get_nameunit(sc->sc_bus.bdev)); } if (status & UHCI_STS_HCH) { - /* no acknowledge needed */ if (!sc->sc_dying) { + ack |= UHCI_STS_HCH; printf("%s: host controller halted\n", - device_get_nameunit(sc->sc_bus.bdev)); -#ifdef USB_DEBUG - uhci_dump_all(sc); -#endif + device_get_nameunit(sc->sc_bus.bdev)); } - sc->sc_dying = 1; } if (!ack) return (0); /* nothing to acknowledge */ - UWRITE2(sc, UHCI_STS, ack); /* acknowledge the ints */ + + UWRITE2(sc, UHCI_STS, ack & ~UHCI_STS_HCH); /* acknowledge the ints */ + + if (ack & UHCI_STS_HCH) { + /* Restart the controller, by Manuel Bouyer */ + sc->sc_saved_frnum = UREAD2(sc, UHCI_FRNUM); + sc->sc_saved_sof = UREAD1(sc, UHCI_SOF); + + sc->sc_bus.use_polling++; + uhci_run(sc, 0); /* stop the controller */ + UWRITE2(sc, UHCI_INTR, 0); /* disable intrs */ + + uhci_globalreset(sc); + uhci_reset(sc); + + /* restore saved state */ + UWRITE4(sc, UHCI_FLBASEADDR, DMAADDR(&sc->sc_dma, 0)); + UWRITE2(sc, UHCI_FRNUM, sc->sc_saved_frnum); + UWRITE1(sc, UHCI_SOF, sc->sc_saved_sof); + + UWRITE2(sc, UHCI_INTR, UHCI_INTR_TOCRCIE | UHCI_INTR_RIE | + UHCI_INTR_IOCE | UHCI_INTR_SPIE); /* re-enable intrs */ + UHCICMD(sc, UHCI_CMD_MAXP); + + uhci_run(sc, 1); /* and start traffic again */ + sc->sc_bus.use_polling--; + + if (UREAD2(sc, UHCI_STS) & UHCI_STS_HCH) { + printf("%s: host controller couldn't be restarted\n", + device_get_nameunit(sc->sc_bus.bdev)); +#ifdef USB_DEBUG + uhci_dump_all(sc); +#endif + sc->sc_dying = 1; + return (0); + } + + printf("%s: host controller restarted\n", + device_get_nameunit(sc->sc_bus.bdev)); + } sc->sc_bus.no_intrs++; usb_schedsoftintr(&sc->sc_bus); From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 08:18:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E462106566B; Thu, 13 Aug 2009 08:18:30 +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 234098FC41; Thu, 13 Aug 2009 08:18: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 n7D8ITiR093435; Thu, 13 Aug 2009 08:18:30 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 n7D8ITDx093434; Thu, 13 Aug 2009 08:18:29 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200908130818.n7D8ITDx093434@svn.freebsd.org> From: Nick Hibma Date: Thu, 13 Aug 2009 08:18:29 +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: r196168 - in stable/7/sys/modules: . ohci uhci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 08:18:30 -0000 Author: n_hibma Date: Thu Aug 13 08:18:29 2009 New Revision: 196168 URL: http://svn.freebsd.org/changeset/base/196168 Log: Add these two modules to enable loading of 'the other' host controller if only one was compiled into the kernel. This happens on a laptop with an Intel chipset (UHCI) to which an Option 3G Cardbus card is added (which contains a NEC USB host controller (OHCI)). Added: stable/7/sys/modules/ohci/ stable/7/sys/modules/ohci/Makefile (contents, props changed) stable/7/sys/modules/uhci/ stable/7/sys/modules/uhci/Makefile (contents, props changed) Modified: stable/7/sys/modules/Makefile Modified: stable/7/sys/modules/Makefile ============================================================================== --- stable/7/sys/modules/Makefile Thu Aug 13 07:21:24 2009 (r196167) +++ stable/7/sys/modules/Makefile Thu Aug 13 08:18:29 2009 (r196168) @@ -206,6 +206,7 @@ SUBDIR= ${_3dfx} \ ${_nve} \ ${_nvram} \ ${_nwfs} \ + ohci \ ${_oltr} \ ${_opensolaris} \ ${_padlock} \ @@ -293,6 +294,7 @@ SUBDIR= ${_3dfx} \ ufoma \ uftdi \ ugen \ + uhci \ uhid \ ukbd \ ulpt \ Added: stable/7/sys/modules/ohci/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/modules/ohci/Makefile Thu Aug 13 08:18:29 2009 (r196168) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +S= ${.CURDIR}/../.. + +.PATH: $S/dev/usb $S/pci + +KMOD= ohci +SRCS= bus_if.h device_if.h usb_if.h usb_if.c opt_usb.h +SRCS+= ohci_pci.c ohci.c ohcireg.h ohcivar.h +SRCS+= opt_bus.h pci_if.h + +.include Added: stable/7/sys/modules/uhci/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/modules/uhci/Makefile Thu Aug 13 08:18:29 2009 (r196168) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +S= ${.CURDIR}/../.. + +.PATH: $S/dev/usb $S/pci + +KMOD= uhci +SRCS= bus_if.h device_if.h usb_if.h usb_if.c opt_usb.h +SRCS+= uhci_pci.c uhci.c uhcireg.h uhcivar.h +SRCS+= opt_bus.h pci_if.h + +.include From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 08:20:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C809106566C; Thu, 13 Aug 2009 08:20:13 +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 1B6368FC45; Thu, 13 Aug 2009 08: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 n7D8KD9R093513; Thu, 13 Aug 2009 08:20:13 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 n7D8KCgt093511; Thu, 13 Aug 2009 08:20:12 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200908130820.n7D8KCgt093511@svn.freebsd.org> From: Nick Hibma Date: Thu, 13 Aug 2009 08:20:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196169 - 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: Thu, 13 Aug 2009 08:20:13 -0000 Author: n_hibma Date: Thu Aug 13 08:20:12 2009 New Revision: 196169 URL: http://svn.freebsd.org/changeset/base/196169 Log: Hide aperture size and stolen memory behind bootverbose. Modified: stable/7/sys/pci/agp_i810.c Modified: stable/7/sys/pci/agp_i810.c ============================================================================== --- stable/7/sys/pci/agp_i810.c Thu Aug 13 08:18:29 2009 (r196168) +++ stable/7/sys/pci/agp_i810.c Thu Aug 13 08:20:12 2009 (r196169) @@ -474,12 +474,13 @@ agp_i810_attach(device_t dev) agp_generic_detach(dev); return EINVAL; } - if (sc->stolen > 0) { - device_printf(dev, "detected %dk stolen memory\n", - sc->stolen * 4); + + if (bootverbose) { + device_print_prettyname(dev); + if (sc->stolen > 0) + printf("detected %dk stolen memory, ", sc->stolen * 4); + printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); } - device_printf(dev, "aperture size is %dM\n", - sc->initial_aperture / 1024 / 1024); /* GATT address is already in there, make sure it's enabled */ pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); @@ -664,9 +665,13 @@ agp_i810_attach(device_t dev) gtt_size += 4; sc->stolen = (stolen - gtt_size) * 1024 / 4096; - if (sc->stolen > 0) - device_printf(dev, "detected %dk stolen memory\n", sc->stolen * 4); - device_printf(dev, "aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); + + if (bootverbose) { + device_print_prettyname(dev); + if (sc->stolen > 0) + printf("detected %dk stolen memory, ", sc->stolen * 4); + printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); + } /* GATT address is already in there, make sure it's enabled */ pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 08:24:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10242106564A; Thu, 13 Aug 2009 08:24:59 +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 D932F8FC45; Thu, 13 Aug 2009 08:24: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 n7D8Owji093634; Thu, 13 Aug 2009 08:24:58 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 n7D8OwO9093632; Thu, 13 Aug 2009 08:24:58 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200908130824.n7D8OwO9093632@svn.freebsd.org> From: Nick Hibma Date: Thu, 13 Aug 2009 08:24:58 +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: r196170 - stable/7/sys/dev/firewire X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 08:24:59 -0000 Author: n_hibma Date: Thu Aug 13 08:24:58 2009 New Revision: 196170 URL: http://svn.freebsd.org/changeset/base/196170 Log: Compact some output. Move some behind bootverbose. Modified: stable/7/sys/dev/firewire/fwohci.c Modified: stable/7/sys/dev/firewire/fwohci.c ============================================================================== --- stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 08:20:12 2009 (r196169) +++ stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 08:24:58 2009 (r196170) @@ -616,10 +616,9 @@ fwohci_init(struct fwohci_softc *sc, dev /* OHCI version */ reg = OREAD(sc, OHCI_VERSION); mver = (reg >> 16) & 0xff; - device_printf(dev, "OHCI version %x.%x (ROM=%d)\n", - mver, reg & 0xff, (reg>>24) & 1); if (mver < 1 || mver > 9) { - device_printf(dev, "invalid OHCI version\n"); + device_printf(dev, "invalid OHCI version %d (reg=0x%08x)\n", + mver, reg); return (ENXIO); } @@ -632,10 +631,15 @@ fwohci_init(struct fwohci_softc *sc, dev for (i = 0; i < 0x20; i++) if ((reg & (1 << i)) == 0) break; + if (i == 0) { + device_printf(dev, "0 isoc. channels"); + return ENXIO; + } sc->fc.nisodma = i; - device_printf(dev, "No. of Isochronous channels is %d.\n", i); - if (i == 0) - return (ENXIO); + + device_printf(dev, "OHCI version %x.%x (ROM=%d), %d isoc. channels\n", + mver, reg & 0xff, (reg>>24) & 1, + sc->fc.nisodma); sc->fc.arq = &sc->arrq.xferq; sc->fc.ars = &sc->arrs.xferq; @@ -1848,7 +1852,8 @@ fwohci_intr_core(struct fwohci_softc *sc /* Disable bus reset interrupt until sid recv. */ OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); - device_printf(fc->dev, "BUS reset\n"); + if (bootverbose) + device_printf(fc->dev, "BUS reset\n"); OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); @@ -2464,7 +2469,8 @@ fwohci_ibr(struct firewire_comm *fc) struct fwohci_softc *sc; uint32_t fun; - device_printf(fc->dev, "Initiate bus reset\n"); + if (bootverbose) + device_printf(fc->dev, "Initiate bus reset\n"); sc = (struct fwohci_softc *)fc; /* From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 08:31:15 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1B321065670; Thu, 13 Aug 2009 08:31:15 +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 C0B8E8FC15; Thu, 13 Aug 2009 08:31:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7D8VFKV093807; Thu, 13 Aug 2009 08:31:15 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 n7D8VF7U093805; Thu, 13 Aug 2009 08:31:15 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200908130831.n7D8VF7U093805@svn.freebsd.org> From: Nick Hibma Date: Thu, 13 Aug 2009 08:31: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: r196171 - stable/7/sys/netsmb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 08:31:16 -0000 Author: n_hibma Date: Thu Aug 13 08:31:15 2009 New Revision: 196171 URL: http://svn.freebsd.org/changeset/base/196171 Log: Silence this module. Modified: stable/7/sys/netsmb/smb_dev.c Modified: stable/7/sys/netsmb/smb_dev.c ============================================================================== --- stable/7/sys/netsmb/smb_dev.c Thu Aug 13 08:24:58 2009 (r196170) +++ stable/7/sys/netsmb/smb_dev.c Thu Aug 13 08:31:15 2009 (r196171) @@ -341,7 +341,6 @@ nsmb_dev_load(module_t mod, int cmd, voi break; } nsmb_dev_tag = EVENTHANDLER_REGISTER(dev_clone, nsmb_dev_clone, 0, 1000); - printf("netsmb_dev: loaded\n"); break; case MOD_UNLOAD: smb_iod_done(); @@ -351,7 +350,6 @@ nsmb_dev_load(module_t mod, int cmd, voi EVENTHANDLER_DEREGISTER(dev_clone, nsmb_dev_tag); drain_dev_clone_events(); destroy_dev_drain(&nsmb_cdevsw); - printf("netsmb_dev: unloaded\n"); break; default: error = EINVAL; From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 08:32:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB3521065672; Thu, 13 Aug 2009 08:32:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 4D41A8FC16; Thu, 13 Aug 2009 08:32:40 +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 n7D8Waws014042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Aug 2009 11:32:36 +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.3/8.14.3) with ESMTP id n7D8WaMP055518; Thu, 13 Aug 2009 11:32:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n7D8WaQ3055517; Thu, 13 Aug 2009 11:32:36 +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, 13 Aug 2009 11:32:36 +0300 From: Kostik Belousov To: Nick Hibma Message-ID: <20090813083236.GR1884@deviant.kiev.zoral.com.ua> References: <200908130824.n7D8OwO9093632@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DRCExcqOz6ELznMK" Content-Disposition: inline In-Reply-To: <200908130824.n7D8OwO9093632@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=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r196170 - stable/7/sys/dev/firewire X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 08:32:42 -0000 --DRCExcqOz6ELznMK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 13, 2009 at 08:24:58AM +0000, Nick Hibma wrote: > Author: n_hibma > Date: Thu Aug 13 08:24:58 2009 > New Revision: 196170 > URL: http://svn.freebsd.org/changeset/base/196170 >=20 > Log: > Compact some output. Move some behind bootverbose. >=20 > Modified: > stable/7/sys/dev/firewire/fwohci.c >=20 Please revert this commit and your previous r196169. Patches shall go into HEAD first and then merged back to stable branch after settle period. [I consider USB changes as relevant only to stable/7, due to new USB stack in HEAD ?]. --DRCExcqOz6ELznMK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkqDz6QACgkQC3+MBN1Mb4jJJQCg4PJg0B6905BNlM5f3OFjQoa1 TT4An27IZnLSArGZwpGKQND6h7eWaQ+l =HPNj -----END PGP SIGNATURE----- --DRCExcqOz6ELznMK-- From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 08:36:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 988A1106564A; Thu, 13 Aug 2009 08:36:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 722FA8FC15; Thu, 13 Aug 2009 08:36:10 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id E1F0446B17; Thu, 13 Aug 2009 04:36:09 -0400 (EDT) Date: Thu, 13 Aug 2009 09:36:09 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Nick Hibma In-Reply-To: <200908130831.n7D8VF7U093805@svn.freebsd.org> Message-ID: References: <200908130831.n7D8VF7U093805@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r196171 - stable/7/sys/netsmb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 08:36:11 -0000 On Thu, 13 Aug 2009, Nick Hibma wrote: > Silence this module. I can't help but notice you're committing changes to a stable branch without first making them in head. For the USB stack, where there's a different implementation between head and stable/7, that's fine. For code that's shared, it's really not fine. Please stop. Robert N M Watson Computer Laboratory University of Cambridge > > Modified: > stable/7/sys/netsmb/smb_dev.c > > Modified: stable/7/sys/netsmb/smb_dev.c > ============================================================================== > --- stable/7/sys/netsmb/smb_dev.c Thu Aug 13 08:24:58 2009 (r196170) > +++ stable/7/sys/netsmb/smb_dev.c Thu Aug 13 08:31:15 2009 (r196171) > @@ -341,7 +341,6 @@ nsmb_dev_load(module_t mod, int cmd, voi > break; > } > nsmb_dev_tag = EVENTHANDLER_REGISTER(dev_clone, nsmb_dev_clone, 0, 1000); > - printf("netsmb_dev: loaded\n"); > break; > case MOD_UNLOAD: > smb_iod_done(); > @@ -351,7 +350,6 @@ nsmb_dev_load(module_t mod, int cmd, voi > EVENTHANDLER_DEREGISTER(dev_clone, nsmb_dev_tag); > drain_dev_clone_events(); > destroy_dev_drain(&nsmb_cdevsw); > - printf("netsmb_dev: unloaded\n"); > break; > default: > error = EINVAL; > From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 09:11:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A6001065675; Thu, 13 Aug 2009 09:11:48 +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 295128FC3F; Thu, 13 Aug 2009 09:11: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 n7D9BmFT094790; Thu, 13 Aug 2009 09:11:48 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D9BmsI094785; Thu, 13 Aug 2009 09:11:48 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908130911.n7D9BmsI094785@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 09:11: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: r196172 - head/tools/regression/priv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 09:11:48 -0000 Author: bz Date: Thu Aug 13 09:11:47 2009 New Revision: 196172 URL: http://svn.freebsd.org/changeset/base/196172 Log: Start respecting WITHOUT_INET6. Make regression/priv compile again after the multi-IP jail changes. Note that we are still using the legacy jail(2) rather than the jail_set(2)/jail(3) syscall. Add an IPv4, and an IPv6 loopback address in case we compile with INET6 enabled. Make the priv_vfs_extattr_system compile on amd64 as well using the proper length modifier to printf(3) for ssize_t. Reviewed by: rwatson Approved by: re (kib) Modified: head/tools/regression/priv/Makefile head/tools/regression/priv/main.c head/tools/regression/priv/priv_netinet_ipsec.c head/tools/regression/priv/priv_vfs_extattr_system.c Modified: head/tools/regression/priv/Makefile ============================================================================== --- head/tools/regression/priv/Makefile Thu Aug 13 08:31:15 2009 (r196171) +++ head/tools/regression/priv/Makefile Thu Aug 13 09:11:47 2009 (r196172) @@ -2,6 +2,8 @@ # $FreeBSD$ # +.include + PROG= priv SRCS= main.c \ priv_acct.c \ @@ -49,4 +51,8 @@ WARNS= 3 DPADD+= ${LIBIPSEC} LDADD+= -lipsec +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+= -DINET6 +.endif + .include Modified: head/tools/regression/priv/main.c ============================================================================== --- head/tools/regression/priv/main.c Thu Aug 13 08:31:15 2009 (r196171) +++ head/tools/regression/priv/main.c Thu Aug 13 09:11:47 2009 (r196172) @@ -142,20 +142,24 @@ static struct test tests[] = { priv_netinet_ipsec_policy4_bypass, priv_netinet_ipsec_policy_bypass_cleanup }, +#ifdef INET6 { "priv_netinet_ipsec_policy6_bypass", priv_netinet_ipsec_policy6_bypass_setup, priv_netinet_ipsec_policy6_bypass, priv_netinet_ipsec_policy_bypass_cleanup }, +#endif { "priv_netinet_ipsec_policy4_entrust", priv_netinet_ipsec_policy4_entrust_setup, priv_netinet_ipsec_policy4_entrust, priv_netinet_ipsec_policy_entrust_cleanup }, +#ifdef INET6 { "priv_netinet_ipsec_policy6_entrust", priv_netinet_ipsec_policy6_entrust_setup, priv_netinet_ipsec_policy6_entrust, priv_netinet_ipsec_policy_entrust_cleanup }, +#endif { "priv_netinet_raw", priv_netinet_raw_setup, priv_netinet_raw, priv_netinet_raw_cleanup }, @@ -420,12 +424,23 @@ static void enter_jail(const char *test) { struct jail j; + struct in_addr ia4; +#ifdef INET6 + struct in6_addr ia6 = IN6ADDR_LOOPBACK_INIT; +#endif bzero(&j, sizeof(j)); - j.version = 0; + j.version = JAIL_API_VERSION; j.path = "/"; j.hostname = "test"; - j.ip_number = htonl(INADDR_LOOPBACK); + j.jailname = "regressions/priv"; + ia4.s_addr = htonl(INADDR_LOOPBACK); + j.ip4s = 1; + j.ip4 = &ia4; +#ifdef INET6 + j.ip6s = 1; + j.ip6 = &ia6; +#endif if (jail(&j) < 0) err(-1, "test %s: jail", test); } Modified: head/tools/regression/priv/priv_netinet_ipsec.c ============================================================================== --- head/tools/regression/priv/priv_netinet_ipsec.c Thu Aug 13 08:31:15 2009 (r196171) +++ head/tools/regression/priv/priv_netinet_ipsec.c Thu Aug 13 09:11:47 2009 (r196172) @@ -69,6 +69,7 @@ priv_netinet_ipsec_policy_bypass_setup_a return (-1); } break; +#ifdef INET6 case AF_INET6: sd = socket(AF_INET6, SOCK_DGRAM, 0); if (sd < 0) { @@ -76,6 +77,7 @@ priv_netinet_ipsec_policy_bypass_setup_a return (-1); } break; +#endif default: warnx("%s: unexpected address family", __func__); return (-1); @@ -92,6 +94,7 @@ priv_netinet_ipsec_policy4_bypass_setup( AF_INET)); } +#ifdef INET6 int priv_netinet_ipsec_policy6_bypass_setup(int asroot, int injail, struct test *test) @@ -100,7 +103,7 @@ priv_netinet_ipsec_policy6_bypass_setup( return (priv_netinet_ipsec_policy_bypass_setup_af(asroot, injail, test, AF_INET6)); } - +#endif static int @@ -121,6 +124,7 @@ priv_netinet_ipsec_policy_entrust_setup_ return (-1); } break; +#ifdef INET6 case AF_INET6: sd = socket(AF_INET6, SOCK_DGRAM, 0); if (sd < 0) { @@ -128,6 +132,7 @@ priv_netinet_ipsec_policy_entrust_setup_ return (-1); } break; +#endif default: warnx("%s: unexpected address family", __func__); return (-1); @@ -144,6 +149,7 @@ priv_netinet_ipsec_policy4_entrust_setup AF_INET)); } +#ifdef INET6 int priv_netinet_ipsec_policy6_entrust_setup(int asroot, int injail, struct test *test) @@ -152,7 +158,7 @@ priv_netinet_ipsec_policy6_entrust_setup return (priv_netinet_ipsec_policy_entrust_setup_af(asroot, injail, test, AF_INET6)); } - +#endif void priv_netinet_ipsec_pfkey(int asroot, int injail, struct test *test) @@ -196,10 +202,12 @@ priv_netinet_ipsec_policy_bypass_af(int level = IPPROTO_IP; optname = IP_IPSEC_POLICY; break; +#ifdef INET6 case AF_INET6: level = IPPROTO_IPV6; optname = IPV6_IPSEC_POLICY; break; +#endif default: warnx("%s: unexpected address family", __func__); return; @@ -227,13 +235,14 @@ priv_netinet_ipsec_policy4_bypass(int as priv_netinet_ipsec_policy_bypass_af(asroot, injail, test, AF_INET); } +#ifdef INET6 void priv_netinet_ipsec_policy6_bypass(int asroot, int injail, struct test *test) { priv_netinet_ipsec_policy_bypass_af(asroot, injail, test, AF_INET6); } - +#endif static void priv_netinet_ipsec_policy_entrust_af(int asroot, int injail, struct test *test, @@ -246,10 +255,12 @@ priv_netinet_ipsec_policy_entrust_af(int level = IPPROTO_IP; optname = IP_IPSEC_POLICY; break; +#ifdef INET6 case AF_INET6: level = IPPROTO_IPV6; optname = IPV6_IPSEC_POLICY; break; +#endif default: warnx("%s: unexpected address family", __func__); return; @@ -277,13 +288,14 @@ priv_netinet_ipsec_policy4_entrust(int a priv_netinet_ipsec_policy_entrust_af(asroot, injail, test, AF_INET); } +#ifdef INET6 void priv_netinet_ipsec_policy6_entrust(int asroot, int injail, struct test *test) { priv_netinet_ipsec_policy_entrust_af(asroot, injail, test, AF_INET6); } - +#endif void priv_netinet_ipsec_policy_bypass_cleanup(int asroot, int injail, Modified: head/tools/regression/priv/priv_vfs_extattr_system.c ============================================================================== --- head/tools/regression/priv/priv_vfs_extattr_system.c Thu Aug 13 08:31:15 2009 (r196171) +++ head/tools/regression/priv/priv_vfs_extattr_system.c Thu Aug 13 09:11:47 2009 (r196172) @@ -80,7 +80,7 @@ priv_vfs_extattr_system(int asroot, int else if (ret == EA_SIZE) error = 0; else - err(-1, "priv_vfs_extattr_system: set returned %d", ret); + err(-1, "priv_vfs_extattr_system: set returned %zd", ret); if (asroot && injail) expect("priv_vfs_extattr_system(asroot, injail)", error, -1, EPERM); From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 09:17:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48D25106564A; Thu, 13 Aug 2009 09:17: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 2CF748FC1F; Thu, 13 Aug 2009 09:17: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 n7D9H81e094961; Thu, 13 Aug 2009 09:17:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D9H85Q094956; Thu, 13 Aug 2009 09:17:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908130917.n7D9H85Q094956@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 09:17: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: r196173 - stable/8/tools/regression/priv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 09:17:08 -0000 Author: bz Date: Thu Aug 13 09:17:07 2009 New Revision: 196173 URL: http://svn.freebsd.org/changeset/base/196173 Log: MFC r196172: Start respecting WITHOUT_INET6. Make regression/priv compile again after the multi-IP jail changes. Note that we are still using the legacy jail(2) rather than the jail_set(2)/jail(3) syscall. Add an IPv4, and an IPv6 loopback address in case we compile with INET6 enabled. Make the priv_vfs_extattr_system compile on amd64 as well using the proper length modifier to printf(3) for ssize_t. Reviewed by: rwatson Approved by: re (kib) Modified: stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/priv/Makefile stable/8/tools/regression/priv/main.c stable/8/tools/regression/priv/priv_netinet_ipsec.c stable/8/tools/regression/priv/priv_vfs_extattr_system.c Modified: stable/8/tools/regression/priv/Makefile ============================================================================== --- stable/8/tools/regression/priv/Makefile Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/Makefile Thu Aug 13 09:17:07 2009 (r196173) @@ -2,6 +2,8 @@ # $FreeBSD$ # +.include + PROG= priv SRCS= main.c \ priv_acct.c \ @@ -49,4 +51,8 @@ WARNS= 3 DPADD+= ${LIBIPSEC} LDADD+= -lipsec +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+= -DINET6 +.endif + .include Modified: stable/8/tools/regression/priv/main.c ============================================================================== --- stable/8/tools/regression/priv/main.c Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/main.c Thu Aug 13 09:17:07 2009 (r196173) @@ -142,20 +142,24 @@ static struct test tests[] = { priv_netinet_ipsec_policy4_bypass, priv_netinet_ipsec_policy_bypass_cleanup }, +#ifdef INET6 { "priv_netinet_ipsec_policy6_bypass", priv_netinet_ipsec_policy6_bypass_setup, priv_netinet_ipsec_policy6_bypass, priv_netinet_ipsec_policy_bypass_cleanup }, +#endif { "priv_netinet_ipsec_policy4_entrust", priv_netinet_ipsec_policy4_entrust_setup, priv_netinet_ipsec_policy4_entrust, priv_netinet_ipsec_policy_entrust_cleanup }, +#ifdef INET6 { "priv_netinet_ipsec_policy6_entrust", priv_netinet_ipsec_policy6_entrust_setup, priv_netinet_ipsec_policy6_entrust, priv_netinet_ipsec_policy_entrust_cleanup }, +#endif { "priv_netinet_raw", priv_netinet_raw_setup, priv_netinet_raw, priv_netinet_raw_cleanup }, @@ -420,12 +424,23 @@ static void enter_jail(const char *test) { struct jail j; + struct in_addr ia4; +#ifdef INET6 + struct in6_addr ia6 = IN6ADDR_LOOPBACK_INIT; +#endif bzero(&j, sizeof(j)); - j.version = 0; + j.version = JAIL_API_VERSION; j.path = "/"; j.hostname = "test"; - j.ip_number = htonl(INADDR_LOOPBACK); + j.jailname = "regressions/priv"; + ia4.s_addr = htonl(INADDR_LOOPBACK); + j.ip4s = 1; + j.ip4 = &ia4; +#ifdef INET6 + j.ip6s = 1; + j.ip6 = &ia6; +#endif if (jail(&j) < 0) err(-1, "test %s: jail", test); } Modified: stable/8/tools/regression/priv/priv_netinet_ipsec.c ============================================================================== --- stable/8/tools/regression/priv/priv_netinet_ipsec.c Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/priv_netinet_ipsec.c Thu Aug 13 09:17:07 2009 (r196173) @@ -69,6 +69,7 @@ priv_netinet_ipsec_policy_bypass_setup_a return (-1); } break; +#ifdef INET6 case AF_INET6: sd = socket(AF_INET6, SOCK_DGRAM, 0); if (sd < 0) { @@ -76,6 +77,7 @@ priv_netinet_ipsec_policy_bypass_setup_a return (-1); } break; +#endif default: warnx("%s: unexpected address family", __func__); return (-1); @@ -92,6 +94,7 @@ priv_netinet_ipsec_policy4_bypass_setup( AF_INET)); } +#ifdef INET6 int priv_netinet_ipsec_policy6_bypass_setup(int asroot, int injail, struct test *test) @@ -100,7 +103,7 @@ priv_netinet_ipsec_policy6_bypass_setup( return (priv_netinet_ipsec_policy_bypass_setup_af(asroot, injail, test, AF_INET6)); } - +#endif static int @@ -121,6 +124,7 @@ priv_netinet_ipsec_policy_entrust_setup_ return (-1); } break; +#ifdef INET6 case AF_INET6: sd = socket(AF_INET6, SOCK_DGRAM, 0); if (sd < 0) { @@ -128,6 +132,7 @@ priv_netinet_ipsec_policy_entrust_setup_ return (-1); } break; +#endif default: warnx("%s: unexpected address family", __func__); return (-1); @@ -144,6 +149,7 @@ priv_netinet_ipsec_policy4_entrust_setup AF_INET)); } +#ifdef INET6 int priv_netinet_ipsec_policy6_entrust_setup(int asroot, int injail, struct test *test) @@ -152,7 +158,7 @@ priv_netinet_ipsec_policy6_entrust_setup return (priv_netinet_ipsec_policy_entrust_setup_af(asroot, injail, test, AF_INET6)); } - +#endif void priv_netinet_ipsec_pfkey(int asroot, int injail, struct test *test) @@ -196,10 +202,12 @@ priv_netinet_ipsec_policy_bypass_af(int level = IPPROTO_IP; optname = IP_IPSEC_POLICY; break; +#ifdef INET6 case AF_INET6: level = IPPROTO_IPV6; optname = IPV6_IPSEC_POLICY; break; +#endif default: warnx("%s: unexpected address family", __func__); return; @@ -227,13 +235,14 @@ priv_netinet_ipsec_policy4_bypass(int as priv_netinet_ipsec_policy_bypass_af(asroot, injail, test, AF_INET); } +#ifdef INET6 void priv_netinet_ipsec_policy6_bypass(int asroot, int injail, struct test *test) { priv_netinet_ipsec_policy_bypass_af(asroot, injail, test, AF_INET6); } - +#endif static void priv_netinet_ipsec_policy_entrust_af(int asroot, int injail, struct test *test, @@ -246,10 +255,12 @@ priv_netinet_ipsec_policy_entrust_af(int level = IPPROTO_IP; optname = IP_IPSEC_POLICY; break; +#ifdef INET6 case AF_INET6: level = IPPROTO_IPV6; optname = IPV6_IPSEC_POLICY; break; +#endif default: warnx("%s: unexpected address family", __func__); return; @@ -277,13 +288,14 @@ priv_netinet_ipsec_policy4_entrust(int a priv_netinet_ipsec_policy_entrust_af(asroot, injail, test, AF_INET); } +#ifdef INET6 void priv_netinet_ipsec_policy6_entrust(int asroot, int injail, struct test *test) { priv_netinet_ipsec_policy_entrust_af(asroot, injail, test, AF_INET6); } - +#endif void priv_netinet_ipsec_policy_bypass_cleanup(int asroot, int injail, Modified: stable/8/tools/regression/priv/priv_vfs_extattr_system.c ============================================================================== --- stable/8/tools/regression/priv/priv_vfs_extattr_system.c Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/priv_vfs_extattr_system.c Thu Aug 13 09:17:07 2009 (r196173) @@ -80,7 +80,7 @@ priv_vfs_extattr_system(int asroot, int else if (ret == EA_SIZE) error = 0; else - err(-1, "priv_vfs_extattr_system: set returned %d", ret); + err(-1, "priv_vfs_extattr_system: set returned %zd", ret); if (asroot && injail) expect("priv_vfs_extattr_system(asroot, injail)", error, -1, EPERM); From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 09:29:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E7B01065674; Thu, 13 Aug 2009 09:29:53 +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 44DC98FC52; Thu, 13 Aug 2009 09:29: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 n7D9TrBB095298; Thu, 13 Aug 2009 09:29:53 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D9TrGh095296; Thu, 13 Aug 2009 09:29:53 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908130929.n7D9TrGh095296@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 09:29: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: r196174 - 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: Thu, 13 Aug 2009 09:29:54 -0000 Author: bz Date: Thu Aug 13 09:29:52 2009 New Revision: 196174 URL: http://svn.freebsd.org/changeset/base/196174 Log: Put multiple instructions into a block when iterating; unbreaks NET_RT_DUMP, which otherwise only returned information of AF_MAX. This was broken in r193232 (save your time - my bug, my fix). PR: kern/137700 Reported by: Larry Baird (lab gta.com) Tested by: Larry Baird (lab gta.com) Reviewed by: zec, lstewart, qing Approved by: re (kib) Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Thu Aug 13 09:17:07 2009 (r196173) +++ head/sys/net/rtsock.c Thu Aug 13 09:29:52 2009 (r196174) @@ -1473,7 +1473,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) /* * take care of routing entries */ - for (error = 0; error == 0 && i <= lim; i++) + for (error = 0; error == 0 && i <= lim; i++) { rnh = rt_tables_get_rnh(req->td->td_proc->p_fibnum, i); if (rnh != NULL) { RADIX_NODE_HEAD_LOCK(rnh); @@ -1482,6 +1482,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) RADIX_NODE_HEAD_UNLOCK(rnh); } else if (af != 0) error = EAFNOSUPPORT; + } break; case NET_RT_IFLIST: From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 09:32:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75D95106564A; Thu, 13 Aug 2009 09:32:16 +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 610E48FC4E; Thu, 13 Aug 2009 09:32: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 n7D9WGVU095404; Thu, 13 Aug 2009 09:32:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D9WGbX095402; Thu, 13 Aug 2009 09:32:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908130932.n7D9WGbX095402@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 09:32: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: r196175 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 09:32:17 -0000 Author: bz Date: Thu Aug 13 09:32:15 2009 New Revision: 196175 URL: http://svn.freebsd.org/changeset/base/196175 Log: MFC r196174: Put multiple instructions into a block when iterating; unbreaks NET_RT_DUMP, which otherwise only returned information of AF_MAX. This was broken in r193232 (save your time - my bug, my fix). Reported by: Larry Baird (lab gta.com) Tested by: Larry Baird (lab gta.com) Reviewed by: zec, lstewart, qing PR: kern/137700 Approved by: re (kib) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/rtsock.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net/rtsock.c ============================================================================== --- stable/8/sys/net/rtsock.c Thu Aug 13 09:29:52 2009 (r196174) +++ stable/8/sys/net/rtsock.c Thu Aug 13 09:32:15 2009 (r196175) @@ -1473,7 +1473,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) /* * take care of routing entries */ - for (error = 0; error == 0 && i <= lim; i++) + for (error = 0; error == 0 && i <= lim; i++) { rnh = rt_tables_get_rnh(req->td->td_proc->p_fibnum, i); if (rnh != NULL) { RADIX_NODE_HEAD_LOCK(rnh); @@ -1482,6 +1482,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) RADIX_NODE_HEAD_UNLOCK(rnh); } else if (af != 0) error = EAFNOSUPPORT; + } break; case NET_RT_IFLIST: From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 10:18:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCBC21065677 for ; Thu, 13 Aug 2009 10:18:16 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id B73518FC4B for ; Thu, 13 Aug 2009 10:18:16 +0000 (UTC) Received: (qmail 29124 invoked from network); 13 Aug 2009 02:51:35 -0700 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.200?) (69.64.235.60) by iron2.pdx.net with (DHE-RSA-AES256-SHA encrypted) SMTP; 13 Aug 2009 02:51:35 -0700 From: Sean Bruno To: Nick Hibma In-Reply-To: <200908130824.n7D8OwO9093632@svn.freebsd.org> References: <200908130824.n7D8OwO9093632@svn.freebsd.org> Content-Type: text/plain Date: Thu, 13 Aug 2009 02:51:34 -0700 Message-Id: <1250157094.8589.11.camel@Lappy> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r196170 - stable/7/sys/dev/firewire X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 10:18:17 -0000 Nick: I like your ideas in this code, but this change removes debugging output from the default output. I'm afraid that it's there for a reason, i.e. please revert this changeset and let's chat about it in IRC or via email to come up with something that makes sense. :) Sean On Thu, 2009-08-13 at 08:24 +0000, Nick Hibma wrote: > Author: n_hibma > Date: Thu Aug 13 08:24:58 2009 > New Revision: 196170 > URL: http://svn.freebsd.org/changeset/base/196170 > > Log: > Compact some output. Move some behind bootverbose. > > Modified: > stable/7/sys/dev/firewire/fwohci.c > > Modified: stable/7/sys/dev/firewire/fwohci.c > ============================================================================== > --- stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 08:20:12 2009 (r196169) > +++ stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 08:24:58 2009 (r196170) > @@ -616,10 +616,9 @@ fwohci_init(struct fwohci_softc *sc, dev > /* OHCI version */ > reg = OREAD(sc, OHCI_VERSION); > mver = (reg >> 16) & 0xff; > - device_printf(dev, "OHCI version %x.%x (ROM=%d)\n", > - mver, reg & 0xff, (reg>>24) & 1); > if (mver < 1 || mver > 9) { > - device_printf(dev, "invalid OHCI version\n"); > + device_printf(dev, "invalid OHCI version %d (reg=0x%08x)\n", > + mver, reg); > return (ENXIO); > } > > @@ -632,10 +631,15 @@ fwohci_init(struct fwohci_softc *sc, dev > for (i = 0; i < 0x20; i++) > if ((reg & (1 << i)) == 0) > break; > + if (i == 0) { > + device_printf(dev, "0 isoc. channels"); > + return ENXIO; > + } > sc->fc.nisodma = i; > - device_printf(dev, "No. of Isochronous channels is %d.\n", i); > - if (i == 0) > - return (ENXIO); > + > + device_printf(dev, "OHCI version %x.%x (ROM=%d), %d isoc. channels\n", > + mver, reg & 0xff, (reg>>24) & 1, > + sc->fc.nisodma); > > sc->fc.arq = &sc->arrq.xferq; > sc->fc.ars = &sc->arrs.xferq; > @@ -1848,7 +1852,8 @@ fwohci_intr_core(struct fwohci_softc *sc > /* Disable bus reset interrupt until sid recv. */ > OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); > > - device_printf(fc->dev, "BUS reset\n"); > + if (bootverbose) > + device_printf(fc->dev, "BUS reset\n"); > OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); > OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); > > @@ -2464,7 +2469,8 @@ fwohci_ibr(struct firewire_comm *fc) > struct fwohci_softc *sc; > uint32_t fun; > > - device_printf(fc->dev, "Initiate bus reset\n"); > + if (bootverbose) > + device_printf(fc->dev, "Initiate bus reset\n"); > sc = (struct fwohci_softc *)fc; > > /* From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 10:26:34 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87BC9106564A; Thu, 13 Aug 2009 10:26:34 +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 76C578FC57; Thu, 13 Aug 2009 10:26: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 n7DAQYYu097680; Thu, 13 Aug 2009 10:26:34 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DAQYN1097674; Thu, 13 Aug 2009 10:26:34 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908131026.n7DAQYN1097674@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 10:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196176 - in head/sys: kern net 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, 13 Aug 2009 10:26:35 -0000 Author: bz Date: Thu Aug 13 10:26:34 2009 New Revision: 196176 URL: http://svn.freebsd.org/changeset/base/196176 Log: Make it possible to change the vnet sysctl variables on jails with their own virtual network stack. Jails only inheriting a network stack cannot change anything that cannot be changed from within a prison. Reviewed by: rwatson, zec Approved by: re (kib) Modified: head/sys/kern/kern_jail.c head/sys/kern/kern_sysctl.c head/sys/net/vnet.h head/sys/sys/jail.h head/sys/sys/sysctl.h Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Thu Aug 13 09:32:15 2009 (r196175) +++ head/sys/kern/kern_jail.c Thu Aug 13 10:26:34 2009 (r196176) @@ -88,7 +88,11 @@ struct prison prison0 = { .pr_childmax = JAIL_MAX, .pr_hostuuid = DEFAULT_HOSTUUID, .pr_children = LIST_HEAD_INITIALIZER(&prison0.pr_children), +#ifdef VIMAGE + .pr_flags = PR_HOST|PR_VNET, +#else .pr_flags = PR_HOST, +#endif .pr_allow = PR_ALLOW_ALL, }; MTX_SYSINIT(prison0, &prison0.pr_mtx, "jail mutex", MTX_DEF); @@ -3308,6 +3312,25 @@ getcredhostid(struct ucred *cred, unsign mtx_unlock(&cred->cr_prison->pr_mtx); } +#ifdef VIMAGE +/* + * Determine whether the prison represented by cred owns + * its vnet rather than having it inherited. + * + * Returns 1 in case the prison owns the vnet, 0 otherwise. + */ +int +prison_owns_vnet(struct ucred *cred) +{ + + /* + * vnets cannot be added/removed after jail creation, + * so no need to lock here. + */ + return (cred->cr_prison->pr_flags & PR_VNET ? 1 : 0); +} +#endif + /* * Determine whether the subject represented by cred can "see" * status of a mount point. Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Thu Aug 13 09:32:15 2009 (r196175) +++ head/sys/kern/kern_sysctl.c Thu Aug 13 10:26:34 2009 (r196176) @@ -1381,10 +1381,18 @@ sysctl_root(SYSCTL_HANDLER_ARGS) /* Is this sysctl writable by only privileged users? */ if (req->newptr && !(oid->oid_kind & CTLFLAG_ANYBODY)) { + int priv; + if (oid->oid_kind & CTLFLAG_PRISON) - error = priv_check(req->td, PRIV_SYSCTL_WRITEJAIL); + priv = PRIV_SYSCTL_WRITEJAIL; +#ifdef VIMAGE + else if ((oid->oid_kind & CTLFLAG_VNET) && + prison_owns_vnet(req->td->td_ucred)) + priv = PRIV_SYSCTL_WRITEJAIL; +#endif else - error = priv_check(req->td, PRIV_SYSCTL_WRITE); + priv = PRIV_SYSCTL_WRITE; + error = priv_check(req->td, priv); if (error) return (error); } Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Thu Aug 13 09:32:15 2009 (r196175) +++ head/sys/net/vnet.h Thu Aug 13 10:26:34 2009 (r196176) @@ -232,21 +232,25 @@ int vnet_sysctl_handle_string(SYSCTL_HAN int vnet_sysctl_handle_uint(SYSCTL_HANDLER_ARGS); #define SYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_int, "I", descr) #define SYSCTL_VNET_PROC(parent, nbr, name, access, ptr, arg, handler, \ fmt, descr) \ - SYSCTL_OID(parent, nbr, name, access, ptr, arg, handler, fmt, \ - descr) + SYSCTL_OID(parent, nbr, name, CTLFLAG_VNET|(access), ptr, arg, \ + handler, fmt, descr) #define SYSCTL_VNET_STRING(parent, nbr, name, access, arg, len, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), arg, \ - len, vnet_sysctl_handle_string, "A", descr) + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_STRING|CTLFLAG_VNET|(access), \ + arg, len, vnet_sysctl_handle_string, "A", descr) #define SYSCTL_VNET_STRUCT(parent, nbr, name, access, ptr, type, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), ptr, \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_OPAQUE|CTLFLAG_VNET|(access), ptr, \ sizeof(struct type), vnet_sysctl_handle_opaque, "S," #type, \ descr) #define SYSCTL_VNET_UINT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_UINT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_UINT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_uint, "IU", descr) #define VNET_SYSCTL_ARG(req, arg1) do { \ if (arg1 != NULL) \ Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Thu Aug 13 09:32:15 2009 (r196175) +++ head/sys/sys/jail.h Thu Aug 13 10:26:34 2009 (r196176) @@ -341,6 +341,7 @@ void getcredhostuuid(struct ucred *, cha void getcredhostid(struct ucred *, unsigned long *); int prison_allow(struct ucred *, unsigned); int prison_check(struct ucred *cred1, struct ucred *cred2); +int prison_owns_vnet(struct ucred *); int prison_canseemount(struct ucred *cred, struct mount *mp); void prison_enforce_statfs(struct ucred *cred, struct mount *mp, struct statfs *sp); Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Thu Aug 13 09:32:15 2009 (r196175) +++ head/sys/sys/sysctl.h Thu Aug 13 10:26:34 2009 (r196176) @@ -85,6 +85,7 @@ struct ctlname { #define CTLMASK_SECURE 0x00F00000 /* Secure level */ #define CTLFLAG_TUN 0x00080000 /* Tunable variable */ #define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */ +#define CTLFLAG_VNET 0x00020000 /* Prisons with vnet can fiddle */ #define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN) /* From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 10:27:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 731F51065673; Thu, 13 Aug 2009 10:27:23 +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 47FC88FC48; Thu, 13 Aug 2009 10:27: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 n7DARNRO097750; Thu, 13 Aug 2009 10:27:23 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 n7DARNFs097748; Thu, 13 Aug 2009 10:27:23 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200908131027.n7DARNFs097748@svn.freebsd.org> From: Nick Hibma Date: Thu, 13 Aug 2009 10:27:23 +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: r196177 - stable/7/sys/dev/firewire X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 10:27:24 -0000 Author: n_hibma Date: Thu Aug 13 10:27:22 2009 New Revision: 196177 URL: http://svn.freebsd.org/changeset/base/196177 Log: Revert he previous commit as requested by Sean Bruno. Modified: stable/7/sys/dev/firewire/fwohci.c Modified: stable/7/sys/dev/firewire/fwohci.c ============================================================================== --- stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 10:26:34 2009 (r196176) +++ stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 10:27:22 2009 (r196177) @@ -616,9 +616,10 @@ fwohci_init(struct fwohci_softc *sc, dev /* OHCI version */ reg = OREAD(sc, OHCI_VERSION); mver = (reg >> 16) & 0xff; + device_printf(dev, "OHCI version %x.%x (ROM=%d)\n", + mver, reg & 0xff, (reg>>24) & 1); if (mver < 1 || mver > 9) { - device_printf(dev, "invalid OHCI version %d (reg=0x%08x)\n", - mver, reg); + device_printf(dev, "invalid OHCI version\n"); return (ENXIO); } @@ -631,15 +632,10 @@ fwohci_init(struct fwohci_softc *sc, dev for (i = 0; i < 0x20; i++) if ((reg & (1 << i)) == 0) break; - if (i == 0) { - device_printf(dev, "0 isoc. channels"); - return ENXIO; - } sc->fc.nisodma = i; - - device_printf(dev, "OHCI version %x.%x (ROM=%d), %d isoc. channels\n", - mver, reg & 0xff, (reg>>24) & 1, - sc->fc.nisodma); + device_printf(dev, "No. of Isochronous channels is %d.\n", i); + if (i == 0) + return (ENXIO); sc->fc.arq = &sc->arrq.xferq; sc->fc.ars = &sc->arrs.xferq; @@ -1852,8 +1848,7 @@ fwohci_intr_core(struct fwohci_softc *sc /* Disable bus reset interrupt until sid recv. */ OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); - if (bootverbose) - device_printf(fc->dev, "BUS reset\n"); + device_printf(fc->dev, "BUS reset\n"); OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); @@ -2469,8 +2464,7 @@ fwohci_ibr(struct firewire_comm *fc) struct fwohci_softc *sc; uint32_t fun; - if (bootverbose) - device_printf(fc->dev, "Initiate bus reset\n"); + device_printf(fc->dev, "Initiate bus reset\n"); sc = (struct fwohci_softc *)fc; /* From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 10:31:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7407D106564A; Thu, 13 Aug 2009 10:31:03 +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 5EC828FC51; Thu, 13 Aug 2009 10:31:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DAV3eN097860; Thu, 13 Aug 2009 10:31:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DAV3WZ097854; Thu, 13 Aug 2009 10:31:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908131031.n7DAV3WZ097854@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 10:31: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: r196178 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 10:31:04 -0000 Author: bz Date: Thu Aug 13 10:31:02 2009 New Revision: 196178 URL: http://svn.freebsd.org/changeset/base/196178 Log: MFC r196176: Make it possible to change the vnet sysctl variables on jails with their own virtual network stack. Jails only inheriting a network stack cannot change anything that cannot be changed from within a prison. Reviewed by: rwatson, zec Approved by: re (kib) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/kern_jail.c stable/8/sys/kern/kern_sysctl.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/vnet.h stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/sys/jail.h stable/8/sys/sys/sysctl.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/kern/kern_jail.c Thu Aug 13 10:31:02 2009 (r196178) @@ -88,7 +88,11 @@ struct prison prison0 = { .pr_childmax = JAIL_MAX, .pr_hostuuid = DEFAULT_HOSTUUID, .pr_children = LIST_HEAD_INITIALIZER(&prison0.pr_children), +#ifdef VIMAGE + .pr_flags = PR_HOST|PR_VNET, +#else .pr_flags = PR_HOST, +#endif .pr_allow = PR_ALLOW_ALL, }; MTX_SYSINIT(prison0, &prison0.pr_mtx, "jail mutex", MTX_DEF); @@ -3308,6 +3312,25 @@ getcredhostid(struct ucred *cred, unsign mtx_unlock(&cred->cr_prison->pr_mtx); } +#ifdef VIMAGE +/* + * Determine whether the prison represented by cred owns + * its vnet rather than having it inherited. + * + * Returns 1 in case the prison owns the vnet, 0 otherwise. + */ +int +prison_owns_vnet(struct ucred *cred) +{ + + /* + * vnets cannot be added/removed after jail creation, + * so no need to lock here. + */ + return (cred->cr_prison->pr_flags & PR_VNET ? 1 : 0); +} +#endif + /* * Determine whether the subject represented by cred can "see" * status of a mount point. Modified: stable/8/sys/kern/kern_sysctl.c ============================================================================== --- stable/8/sys/kern/kern_sysctl.c Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/kern/kern_sysctl.c Thu Aug 13 10:31:02 2009 (r196178) @@ -1381,10 +1381,18 @@ sysctl_root(SYSCTL_HANDLER_ARGS) /* Is this sysctl writable by only privileged users? */ if (req->newptr && !(oid->oid_kind & CTLFLAG_ANYBODY)) { + int priv; + if (oid->oid_kind & CTLFLAG_PRISON) - error = priv_check(req->td, PRIV_SYSCTL_WRITEJAIL); + priv = PRIV_SYSCTL_WRITEJAIL; +#ifdef VIMAGE + else if ((oid->oid_kind & CTLFLAG_VNET) && + prison_owns_vnet(req->td->td_ucred)) + priv = PRIV_SYSCTL_WRITEJAIL; +#endif else - error = priv_check(req->td, PRIV_SYSCTL_WRITE); + priv = PRIV_SYSCTL_WRITE; + error = priv_check(req->td, priv); if (error) return (error); } Modified: stable/8/sys/net/vnet.h ============================================================================== --- stable/8/sys/net/vnet.h Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/net/vnet.h Thu Aug 13 10:31:02 2009 (r196178) @@ -232,21 +232,25 @@ int vnet_sysctl_handle_string(SYSCTL_HAN int vnet_sysctl_handle_uint(SYSCTL_HANDLER_ARGS); #define SYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_int, "I", descr) #define SYSCTL_VNET_PROC(parent, nbr, name, access, ptr, arg, handler, \ fmt, descr) \ - SYSCTL_OID(parent, nbr, name, access, ptr, arg, handler, fmt, \ - descr) + SYSCTL_OID(parent, nbr, name, CTLFLAG_VNET|(access), ptr, arg, \ + handler, fmt, descr) #define SYSCTL_VNET_STRING(parent, nbr, name, access, arg, len, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), arg, \ - len, vnet_sysctl_handle_string, "A", descr) + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_STRING|CTLFLAG_VNET|(access), \ + arg, len, vnet_sysctl_handle_string, "A", descr) #define SYSCTL_VNET_STRUCT(parent, nbr, name, access, ptr, type, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), ptr, \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_OPAQUE|CTLFLAG_VNET|(access), ptr, \ sizeof(struct type), vnet_sysctl_handle_opaque, "S," #type, \ descr) #define SYSCTL_VNET_UINT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_UINT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_UINT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_uint, "IU", descr) #define VNET_SYSCTL_ARG(req, arg1) do { \ if (arg1 != NULL) \ Modified: stable/8/sys/sys/jail.h ============================================================================== --- stable/8/sys/sys/jail.h Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/sys/jail.h Thu Aug 13 10:31:02 2009 (r196178) @@ -341,6 +341,7 @@ void getcredhostuuid(struct ucred *, cha void getcredhostid(struct ucred *, unsigned long *); int prison_allow(struct ucred *, unsigned); int prison_check(struct ucred *cred1, struct ucred *cred2); +int prison_owns_vnet(struct ucred *); int prison_canseemount(struct ucred *cred, struct mount *mp); void prison_enforce_statfs(struct ucred *cred, struct mount *mp, struct statfs *sp); Modified: stable/8/sys/sys/sysctl.h ============================================================================== --- stable/8/sys/sys/sysctl.h Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/sys/sysctl.h Thu Aug 13 10:31:02 2009 (r196178) @@ -85,6 +85,7 @@ struct ctlname { #define CTLMASK_SECURE 0x00F00000 /* Secure level */ #define CTLFLAG_TUN 0x00080000 /* Tunable variable */ #define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */ +#define CTLFLAG_VNET 0x00020000 /* Prisons with vnet can fiddle */ #define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN) /* From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 10:42:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3C80106566B; Thu, 13 Aug 2009 10:42:13 +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 92CF58FC43; Thu, 13 Aug 2009 10:42:13 +0000 (UTC) Received: from [192.168.1.4] (adsl-157-61-83.bna.bellsouth.net [70.157.61.83]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n7DAgBDb086813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Aug 2009 06:42:11 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Nick Hibma In-Reply-To: <200908130820.n7D8KCgt093511@svn.freebsd.org> References: <200908130820.n7D8KCgt093511@svn.freebsd.org> Content-Type: text/plain Organization: FreeBSD Date: Thu, 13 Aug 2009 05:42:06 -0500 Message-Id: <1250160126.1823.11.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RDNS_DYNAMIC,SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r196169 - 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: Thu, 13 Aug 2009 10:42:14 -0000 On Thu, 2009-08-13 at 08:20 +0000, Nick Hibma wrote: > Author: n_hibma > Date: Thu Aug 13 08:20:12 2009 > New Revision: 196169 > URL: http://svn.freebsd.org/changeset/base/196169 > > Log: > Hide aperture size and stolen memory behind bootverbose. Why? This information can be useful and doesn't need to be buried in the verbose boot log. robert. > Modified: > stable/7/sys/pci/agp_i810.c > > Modified: stable/7/sys/pci/agp_i810.c > ============================================================================== > --- stable/7/sys/pci/agp_i810.c Thu Aug 13 08:18:29 2009 (r196168) > +++ stable/7/sys/pci/agp_i810.c Thu Aug 13 08:20:12 2009 (r196169) > @@ -474,12 +474,13 @@ agp_i810_attach(device_t dev) > agp_generic_detach(dev); > return EINVAL; > } > - if (sc->stolen > 0) { > - device_printf(dev, "detected %dk stolen memory\n", > - sc->stolen * 4); > + > + if (bootverbose) { > + device_print_prettyname(dev); > + if (sc->stolen > 0) > + printf("detected %dk stolen memory, ", sc->stolen * 4); > + printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); > } > - device_printf(dev, "aperture size is %dM\n", > - sc->initial_aperture / 1024 / 1024); > > /* GATT address is already in there, make sure it's enabled */ > pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); > @@ -664,9 +665,13 @@ agp_i810_attach(device_t dev) > gtt_size += 4; > > sc->stolen = (stolen - gtt_size) * 1024 / 4096; > - if (sc->stolen > 0) > - device_printf(dev, "detected %dk stolen memory\n", sc->stolen * 4); > - device_printf(dev, "aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); > + > + if (bootverbose) { > + device_print_prettyname(dev); > + if (sc->stolen > 0) > + printf("detected %dk stolen memory, ", sc->stolen * 4); > + printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); > + } > > /* GATT address is already in there, make sure it's enabled */ > pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); -- Robert Noland FreeBSD From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 12:28:31 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C8281065672; Thu, 13 Aug 2009 12:28:31 +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 1B0438FC60; Thu, 13 Aug 2009 12:28:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DCSUuZ000651; Thu, 13 Aug 2009 12:28:30 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DCSU1o000650; Thu, 13 Aug 2009 12:28:30 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200908131228.n7DCSU1o000650@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 13 Aug 2009 12:28: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: r196179 - head/sys/cddl/compat/opensolaris/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 12:28:32 -0000 Author: trasz Date: Thu Aug 13 12:28:30 2009 New Revision: 196179 URL: http://svn.freebsd.org/changeset/base/196179 Log: Remove CDDL warning. Approved by: re (kib), core Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris.c Thu Aug 13 10:31:02 2009 (r196178) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris.c Thu Aug 13 12:28:30 2009 (r196179) @@ -49,10 +49,6 @@ opensolaris_load(void *dummy) { int i; - printf("This module (opensolaris) contains code covered by the\n"); - printf("Common Development and Distribution License (CDDL)\n"); - printf("see http://opensolaris.org/os/licensing/opensolaris_license/\n"); - /* * "Enable" all CPUs even though they may not exist just so * that the asserts work. On FreeBSD, if a CPU exists, it is From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 13:56:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3FB41065680; Thu, 13 Aug 2009 13:56:05 +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 DDB298FC57; Thu, 13 Aug 2009 13: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 n7DDu5Np002640; Thu, 13 Aug 2009 13:56:05 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DDu5T0002638; Thu, 13 Aug 2009 13:56:05 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200908131356.n7DDu5T0002638@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 13 Aug 2009 13:56:05 +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: r196181 - in stable/8/sys: . amd64/include/xen cddl/compat/opensolaris/kern cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/control... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 13:56:06 -0000 Author: trasz Date: Thu Aug 13 13:56:05 2009 New Revision: 196181 URL: http://svn.freebsd.org/changeset/base/196181 Log: InstaMFC 196179: Remove CDDL warning. Approved by: re (kib), core Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c Thu Aug 13 13:17:50 2009 (r196180) +++ stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c Thu Aug 13 13:56:05 2009 (r196181) @@ -49,10 +49,6 @@ opensolaris_load(void *dummy) { int i; - printf("This module (opensolaris) contains code covered by the\n"); - printf("Common Development and Distribution License (CDDL)\n"); - printf("see http://opensolaris.org/os/licensing/opensolaris_license/\n"); - /* * "Enable" all CPUs even though they may not exist just so * that the asserts work. On FreeBSD, if a CPU exists, it is From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 14:38:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 421B4106566C; Thu, 13 Aug 2009 14:38:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB388FC43; Thu, 13 Aug 2009 14:38: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 n7DEcAD9003656; Thu, 13 Aug 2009 14:38:10 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DEcAK2003654; Thu, 13 Aug 2009 14:38:10 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908131438.n7DEcAK2003654@svn.freebsd.org> From: Robert Watson Date: Thu, 13 Aug 2009 14:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196182 - stable/8/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 14:38:10 -0000 Author: rwatson Date: Thu Aug 13 14:38:09 2009 New Revision: 196182 URL: http://svn.freebsd.org/changeset/base/196182 Log: Merge r196120 from head to stable/8: Update procstat(1) for the fact that devfs paths are no longer unsupported. Approved by: re (kib) Modified: stable/8/usr.bin/procstat/ (props changed) stable/8/usr.bin/procstat/procstat.1 Modified: stable/8/usr.bin/procstat/procstat.1 ============================================================================== --- stable/8/usr.bin/procstat/procstat.1 Thu Aug 13 13:56:05 2009 (r196181) +++ stable/8/usr.bin/procstat/procstat.1 Thu Aug 13 14:38:09 2009 (r196182) @@ -351,10 +351,8 @@ may be mechanically parsed. .Pp The display of open file or memory mapping pathnames is implemented using the kernel's name cache. -It therefore does not work for file systems -that do not use the name cache, such as -.Xr devfs 4 , -or if the name is not present in the cache due to removal. +If a file system does not use the name cache, or the path to a file is not in +the cache, a path will not be displayed. .Pp .Nm currently supports extracting data only from a live kernel, and not from From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 14:50:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F1721065690; Thu, 13 Aug 2009 14:50:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 082178FC4A; Thu, 13 Aug 2009 14:50: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 n7DEod6n004046; Thu, 13 Aug 2009 14:50:39 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DEodDD004044; Thu, 13 Aug 2009 14:50:39 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908131450.n7DEodDD004044@svn.freebsd.org> From: Robert Watson Date: Thu, 13 Aug 2009 14:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196184 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 14:50:41 -0000 Author: rwatson Date: Thu Aug 13 14:50:39 2009 New Revision: 196184 URL: http://svn.freebsd.org/changeset/base/196184 Log: Merge r196121 from head to stable/8: Reverse misordered unlock and lock in at_control for netatalk phase I addresses. Submitted by: Russell Cattelan Approved by: re (kib) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netatalk/at_control.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netatalk/at_control.c ============================================================================== --- stable/8/sys/netatalk/at_control.c Thu Aug 13 14:46:32 2009 (r196183) +++ stable/8/sys/netatalk/at_control.c Thu Aug 13 14:50:39 2009 (r196184) @@ -276,7 +276,7 @@ at_control(struct socket *so, u_long cmd * If the request is specifying phase 1, then * only look at a phase one address */ - AT_IFADDR_RUNLOCK(); + AT_IFADDR_RLOCK(); for (oaa = aa; aa; aa = TAILQ_NEXT(aa, aa_link)) { if (aa->aa_ifp == ifp && (aa->aa_flags & AFA_PHASE2) == 0) @@ -286,7 +286,7 @@ at_control(struct socket *so, u_long cmd ifa_free(&oaa->aa_ifa); if (aa != NULL && oaa != aa) ifa_ref(&aa->aa_ifa); - AT_IFADDR_RLOCK(); + AT_IFADDR_RUNLOCK(); } else { struct at_ifaddr *oaa; From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 14:59:05 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ED40106564A; Thu, 13 Aug 2009 14:59:05 +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 F1BCB8FC4D; Thu, 13 Aug 2009 14:59: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 n7DEx480004281; Thu, 13 Aug 2009 14:59:04 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DEx4hf004279; Thu, 13 Aug 2009 14:59:04 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908131459.n7DEx4hf004279@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 14:59: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: r196185 - head/lib/libkvm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 14:59:05 -0000 Author: bz Date: Thu Aug 13 14:59:04 2009 New Revision: 196185 URL: http://svn.freebsd.org/changeset/base/196185 Log: Rather than replicating the maths from the kernel, use the value the kernel calculated directly as we already read it with struct vnet. This will make kvm_vnet.c more resilent in case of possible kernel changes. Reviewed by: rwatson Approved by: re (kib) Modified: head/lib/libkvm/kvm_vnet.c Modified: head/lib/libkvm/kvm_vnet.c ============================================================================== --- head/lib/libkvm/kvm_vnet.c Thu Aug 13 14:50:39 2009 (r196184) +++ head/lib/libkvm/kvm_vnet.c Thu Aug 13 14:59:04 2009 (r196185) @@ -195,7 +195,7 @@ _kvm_vnet_selectpid(kvm_t *kd, pid_t pid kd->vnet_start = nl[NLIST_START_VNET].n_value; kd->vnet_stop = nl[NLIST_STOP_VNET].n_value; kd->vnet_current = (uintptr_t)prison.pr_vnet; - kd->vnet_base = (uintptr_t)vnet.vnet_data_mem - kd->vnet_start; + kd->vnet_base = vnet.vnet_data_base; return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 15:00:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED65710656EE; Thu, 13 Aug 2009 15:00:18 +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 DA5EF8FC43; Thu, 13 Aug 2009 15:00:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DF0IHa004401; Thu, 13 Aug 2009 15:00:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DF0Iaf004398; Thu, 13 Aug 2009 15:00:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908131500.n7DF0Iaf004398@svn.freebsd.org> From: John Baldwin Date: Thu, 13 Aug 2009 15:00: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: r196186 - in stable/7/usr.bin/locate: . locate X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 15:00:20 -0000 Author: jhb Date: Thu Aug 13 15:00:18 2009 New Revision: 196186 URL: http://svn.freebsd.org/changeset/base/196186 Log: MFC: Move the check to ensure the locate database has the minimum required size when using mmap() before invoking mmap(). Modified: stable/7/usr.bin/locate/ (props changed) stable/7/usr.bin/locate/locate/fastfind.c stable/7/usr.bin/locate/locate/locate.c Modified: stable/7/usr.bin/locate/locate/fastfind.c ============================================================================== --- stable/7/usr.bin/locate/locate/fastfind.c Thu Aug 13 14:59:04 2009 (r196185) +++ stable/7/usr.bin/locate/locate/fastfind.c Thu Aug 13 15:00:18 2009 (r196186) @@ -154,9 +154,6 @@ fastfind /* init bigram table */ #ifdef FF_MMAP - if (len < (2*NBG)) - errx(1, "database too small: %s", database); - for (c = 0, p = bigram1, s = bigram2; c < NBG; c++, len-= 2) { p[c] = check_bigram_char(*paddr++); s[c] = check_bigram_char(*paddr++); Modified: stable/7/usr.bin/locate/locate/locate.c ============================================================================== --- stable/7/usr.bin/locate/locate/locate.c Thu Aug 13 14:59:04 2009 (r196185) +++ stable/7/usr.bin/locate/locate/locate.c Thu Aug 13 15:00:18 2009 (r196186) @@ -291,6 +291,8 @@ search_mmap(db, s) fstat(fd, &sb) == -1) err(1, "`%s'", db); len = sb.st_size; + if (len < (2*NBG)) + errx(1, "database too small: %s", db); if ((p = mmap((caddr_t)0, (size_t)len, PROT_READ, MAP_SHARED, From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 15:01:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C84F0106566C; Thu, 13 Aug 2009 15:01:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1E538FC4A; Thu, 13 Aug 2009 15: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 n7DF1otg004480; Thu, 13 Aug 2009 15:01:50 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DF1o0b004478; Thu, 13 Aug 2009 15:01:50 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908131501.n7DF1o0b004478@svn.freebsd.org> From: Robert Watson Date: Thu, 13 Aug 2009 15:01:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196187 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 15:01:51 -0000 Author: rwatson Date: Thu Aug 13 15:01:50 2009 New Revision: 196187 URL: http://svn.freebsd.org/changeset/base/196187 Log: Merge r196122 from head to stable/8: Correctly audit real gids following changes to the audit record argument interface. Approved by: re (kib) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/security/audit/audit.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/security/audit/audit.h ============================================================================== --- stable/8/sys/security/audit/audit.h Thu Aug 13 15:00:18 2009 (r196186) +++ stable/8/sys/security/audit/audit.h Thu Aug 13 15:01:50 2009 (r196187) @@ -232,7 +232,7 @@ void audit_thread_free(struct thread *t #define AUDIT_ARG_RGID(rgid) do { \ if (AUDITING_TD(curthread)) \ - audit_arg_gid((rgid)); \ + audit_arg_rgid((rgid)); \ } while (0) #define AUDIT_ARG_RUID(ruid) do { \ From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 15:02:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CA521065674; Thu, 13 Aug 2009 15:02:03 +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 3A74E8FC4D; Thu, 13 Aug 2009 15:02: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 n7DF23oa004521; Thu, 13 Aug 2009 15:02:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DF23FU004519; Thu, 13 Aug 2009 15:02:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908131502.n7DF23FU004519@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 15:02: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: r196188 - stable/8/lib/libkvm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 15:02:04 -0000 Author: bz Date: Thu Aug 13 15:02:02 2009 New Revision: 196188 URL: http://svn.freebsd.org/changeset/base/196188 Log: MFC r196185: Rather than replicating the maths from the kernel, use the value the kernel calculated directly as we already read it with struct vnet. This will make kvm_vnet.c more resilent in case of possible kernel changes. Reviewed by: rwatson Approved by: re (kib) Modified: stable/8/lib/libkvm/ (props changed) stable/8/lib/libkvm/kvm_vnet.c Modified: stable/8/lib/libkvm/kvm_vnet.c ============================================================================== --- stable/8/lib/libkvm/kvm_vnet.c Thu Aug 13 15:01:50 2009 (r196187) +++ stable/8/lib/libkvm/kvm_vnet.c Thu Aug 13 15:02:02 2009 (r196188) @@ -195,7 +195,7 @@ _kvm_vnet_selectpid(kvm_t *kd, pid_t pid kd->vnet_start = nl[NLIST_START_VNET].n_value; kd->vnet_stop = nl[NLIST_STOP_VNET].n_value; kd->vnet_current = (uintptr_t)prison.pr_vnet; - kd->vnet_base = (uintptr_t)vnet.vnet_data_mem - kd->vnet_start; + kd->vnet_base = vnet.vnet_data_base; return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 15:06:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94B6A106575C; Thu, 13 Aug 2009 15:06:08 +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 81E028FC56; Thu, 13 Aug 2009 15:06: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 n7DF68t8004674; Thu, 13 Aug 2009 15:06:08 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DF68qt004671; Thu, 13 Aug 2009 15:06:08 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908131506.n7DF68qt004671@svn.freebsd.org> From: John Baldwin Date: Thu, 13 Aug 2009 15:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196189 - in stable/7/usr.sbin/acpi: . acpidump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 15:06:09 -0000 Author: jhb Date: Thu Aug 13 15:06:08 2009 New Revision: 196189 URL: http://svn.freebsd.org/changeset/base/196189 Log: MFC: Parse the System Resource Affinity Table ('SRAT') used to describe affinity relationships between CPUs and memory. Modified: stable/7/usr.sbin/acpi/ (props changed) stable/7/usr.sbin/acpi/acpidump/acpi.c stable/7/usr.sbin/acpi/acpidump/acpidump.h Modified: stable/7/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- stable/7/usr.sbin/acpi/acpidump/acpi.c Thu Aug 13 15:02:02 2009 (r196188) +++ stable/7/usr.sbin/acpi/acpidump/acpi.c Thu Aug 13 15:06:08 2009 (r196189) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -57,6 +58,11 @@ static void acpi_print_intr(u_int32_t in static void acpi_print_apic(struct MADT_APIC *mp); static void acpi_handle_apic(struct ACPIsdt *sdp); static void acpi_handle_hpet(struct ACPIsdt *sdp); +static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, + uint32_t flags); +static void acpi_print_srat_memory(struct SRAT_memory *mp); +static void acpi_print_srat(struct SRATentry *srat); +static void acpi_handle_srat(struct ACPIsdt *sdp); static void acpi_print_sdt(struct ACPIsdt *sdp); static void acpi_print_fadt(struct ACPIsdt *sdp); static void acpi_print_facs(struct FACSbody *facs); @@ -256,7 +262,10 @@ static void acpi_print_apic(struct MADT_APIC *mp) { - printf("\tType=%s\n", apic_types[mp->type]); + if (mp->type < sizeof(apic_types) / sizeof(apic_types[0])) + printf("\tType=%s\n", apic_types[mp->type]); + else + printf("\tType=%d (unknown)\n", mp->type); switch (mp->type) { case ACPI_MADT_APIC_TYPE_LOCAL_APIC: acpi_print_local_apic(mp->body.local_apic.cpu_id, @@ -305,9 +314,6 @@ acpi_print_apic(struct MADT_APIC *mp) acpi_print_intr(mp->body.int_src.intr, mp->body.int_src.mps_flags); break; - default: - printf("\tUnknown type %d\n", (u_int)mp->type); - break; } } @@ -391,10 +397,92 @@ acpi_handle_mcfg(struct ACPIsdt *sdp) sizeof(*mcfg->s); for (i = 0; i < e; i++, mcfg++) { printf("\n"); - printf("\tBase Address= 0x%016jx\n", mcfg->s[i].baseaddr); - printf("\tSegment Group= 0x%04x\n", mcfg->s[i].seg_grp); - printf("\tStart Bus= %d\n", mcfg->s[i].start); - printf("\tEnd Bus= %d\n", mcfg->s[i].end); + printf("\tBase Address=0x%016jx\n", mcfg->s[i].baseaddr); + printf("\tSegment Group=0x%04x\n", mcfg->s[i].seg_grp); + printf("\tStart Bus=%d\n", mcfg->s[i].start); + printf("\tEnd Bus=%d\n", mcfg->s[i].end); + } + printf(END_COMMENT); +} + +static void +acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, + uint32_t flags) +{ + + printf("\tFlags={"); + if (flags & ACPI_SRAT_CPU_ENABLED) + printf("ENABLED"); + else + printf("DISABLED"); + printf("}\n"); + printf("\tAPIC ID=%d\n", apic_id); + printf("\tProximity Domain=%d\n", proximity_domain); +} + +static void +acpi_print_srat_memory(struct SRAT_memory *mp) +{ + + printf("\tFlags={"); + if (mp->flags & ACPI_SRAT_MEM_ENABLED) + printf("ENABLED"); + else + printf("DISABLED"); + if (mp->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) + printf(",HOT_PLUGGABLE"); + if (mp->flags & ACPI_SRAT_MEM_NON_VOLATILE) + printf(",NON_VOLATILE"); + printf("}\n"); + printf("\tBase Address=0x%016jx\n", (uintmax_t)mp->base_address); + printf("\tLength=0x%016jx\n", (uintmax_t)mp->length); + printf("\tProximity Domain=%d\n", mp->proximity_domain); +} + +const char *srat_types[] = { "CPU", "Memory", "X2APIC" }; + +static void +acpi_print_srat(struct SRATentry *srat) +{ + + if (srat->type < sizeof(srat_types) / sizeof(srat_types[0])) + printf("\tType=%s\n", srat_types[srat->type]); + else + printf("\tType=%d (unknown)\n", srat->type); + switch (srat->type) { + case ACPI_SRAT_TYPE_CPU_AFFINITY: + acpi_print_srat_cpu(srat->body.cpu.apic_id, + srat->body.cpu.proximity_domain_hi[2] << 24 | + srat->body.cpu.proximity_domain_hi[1] << 16 | + srat->body.cpu.proximity_domain_hi[0] << 0 | + srat->body.cpu.proximity_domain_lo, srat->body.cpu.flags); + break; + case ACPI_SRAT_TYPE_MEMORY_AFFINITY: + acpi_print_srat_memory(&srat->body.mem); + break; + case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY: + acpi_print_srat_cpu(srat->body.x2apic.apic_id, + srat->body.x2apic.proximity_domain, + srat->body.x2apic.flags); + break; + } +} + +static void +acpi_handle_srat(struct ACPIsdt *sdp) +{ + struct SRATbody *sratp; + struct SRATentry *entry; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + sratp = (struct SRATbody *)sdp->body; + printf("\tTable Revision=%d\n", sratp->table_revision); + entry = sratp->body; + while (((uintptr_t)entry) - ((uintptr_t)sdp) < sdp->len) { + printf("\n"); + acpi_print_srat(entry); + entry = (struct SRATentry *)((char *)entry + entry->len); } printf(END_COMMENT); } @@ -708,6 +796,8 @@ acpi_handle_rsdt(struct ACPIsdt *rsdp) acpi_handle_ecdt(sdp); else if (!memcmp(sdp->signature, "MCFG", 4)) acpi_handle_mcfg(sdp); + else if (!memcmp(sdp->signature, "SRAT", 4)) + acpi_handle_srat(sdp); else { printf(BEGIN_COMMENT); acpi_print_sdt(sdp); Modified: stable/7/usr.sbin/acpi/acpidump/acpidump.h ============================================================================== --- stable/7/usr.sbin/acpi/acpidump/acpidump.h Thu Aug 13 15:02:02 2009 (r196188) +++ stable/7/usr.sbin/acpi/acpidump/acpidump.h Thu Aug 13 15:06:08 2009 (r196189) @@ -304,6 +304,56 @@ struct MCFGbody { } s[1] __packed; } __packed; +/* System Resource Affinity Table */ +struct SRAT_cpu { + uint8_t proximity_domain_lo; + uint8_t apic_id; + uint32_t flags; +#define ACPI_SRAT_CPU_ENABLED 0x00000001 + uint8_t sapic_eid; + uint8_t proximity_domain_hi[3]; + uint32_t reserved; +} __packed; + +struct SRAT_memory { + uint32_t proximity_domain; + uint16_t reserved; + uint64_t base_address; + uint64_t length; + uint32_t reserved1; + uint32_t flags; +#define ACPI_SRAT_MEM_ENABLED 0x00000001 +#define ACPI_SRAT_MEM_HOT_PLUGGABLE 0x00000002 +#define ACPI_SRAT_MEM_NON_VOLATILE 0x00000002 + uint64_t reserved2; +} __packed; + +struct SRAT_x2apic { + uint16_t reserved; + uint32_t proximity_domain; + uint32_t apic_id; + uint32_t flags; +} __packed; + +struct SRATentry { + uint8_t type; +#define ACPI_SRAT_TYPE_CPU_AFFINITY 0 +#define ACPI_SRAT_TYPE_MEMORY_AFFINITY 1 +#define ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY 2 + uint8_t len; + union { + struct SRAT_cpu cpu; + struct SRAT_memory mem; + struct SRAT_x2apic x2apic; + } body; +} __packed; + +struct SRATbody { + uint32_t table_revision; + uint64_t reserved; + struct SRATentry body[0]; +} __packed; + /* * Addresses to scan on ia32 for the RSD PTR. According to section 5.2.2 * of the ACPI spec, we only consider two regions for the base address: From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 15:08:05 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1B8410656D7; Thu, 13 Aug 2009 15:08:05 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C7C58FC69; Thu, 13 Aug 2009 15:08: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 n7DF856M004751; Thu, 13 Aug 2009 15:08:05 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DF859n004743; Thu, 13 Aug 2009 15:08:05 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908131508.n7DF859n004743@svn.freebsd.org> From: Robert Watson Date: Thu, 13 Aug 2009 15:08:05 +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: r196190 - in stable/8/lib/libc: . posix1e stdio stdtime string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 15:08:07 -0000 Author: rwatson Date: Thu Aug 13 15:08:05 2009 New Revision: 196190 URL: http://svn.freebsd.org/changeset/base/196190 Log: Merge r196123 from head to stable/8: Update posix1e-related man pages, especially as relates to MAC, to more accurately reflect the last ten years of work. Approved by: re (kib) Modified: stable/8/lib/libc/ (props changed) stable/8/lib/libc/posix1e/Makefile.inc stable/8/lib/libc/posix1e/mac.3 stable/8/lib/libc/posix1e/mac_free.3 stable/8/lib/libc/posix1e/mac_get.3 stable/8/lib/libc/posix1e/mac_set.3 stable/8/lib/libc/posix1e/mac_text.3 stable/8/lib/libc/posix1e/posix1e.3 stable/8/lib/libc/stdio/asprintf.c (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/string/ffsll.c (props changed) stable/8/lib/libc/string/flsll.c (props changed) stable/8/lib/libc/string/wcpcpy.c (props changed) stable/8/lib/libc/string/wcpncpy.c (props changed) Modified: stable/8/lib/libc/posix1e/Makefile.inc ============================================================================== --- stable/8/lib/libc/posix1e/Makefile.inc Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/Makefile.inc Thu Aug 13 15:08:05 2009 (r196190) @@ -106,14 +106,16 @@ MLINKS+=acl_create_entry.3 acl_create_en mac_get.3 mac_get_fd.3 \ mac_get.3 mac_get_file.3 \ mac_get.3 mac_get_link.3 \ + mac_get.3 mac_get_peer.3 \ mac_get.3 mac_get_pid.3 \ mac_get.3 mac_get_proc.3 \ mac_prepare.3 mac_prepare_file_label.3 \ mac_prepare.3 mac_prepare_ifnet_label.3 \ mac_prepare.3 mac_prepare_process_label.3 \ - mac_set.3 mac_set_link.3 \ + mac_prepare.3 mac_prepare_type.3 \ mac_set.3 mac_set_fd.3 \ mac_set.3 mac_set_file.3 \ + mac_set.3 mac_set_link.3 \ mac_set.3 mac_set_proc.3 \ mac_text.3 mac_from_text.3 \ mac_text.3 mac_to_text.3 Modified: stable/8/lib/libc/posix1e/mac.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -1,4 +1,5 @@ .\" Copyright (c) 2001, 2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2009 Robert N. M. Watson .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris @@ -30,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 19, 2003 +.Dd August 7, 2009 .Dt MAC 3 .Os .Sh NAME @@ -44,81 +45,82 @@ In the kernel configuration file: .Cd "options MAC" .Sh DESCRIPTION -.Fx -permits administrators to define Mandatory Access Control labels -defining levels for the privacy and integrity of data, -overriding discretionary policies -for those objects. -Not all objects currently provide support for MAC labels, -and MAC support must be explicitly enabled by the administrator. -The library calls include routines to retrieve, duplicate, -and set MAC labels associated with files and processes. -.Pp -POSIX.1e describes a set of MAC manipulation routines -to manage the contents of MAC labels, -as well as their relationships with -files and processes; -almost all of these support routines -are implemented in -.Fx . +Mandatory Access Control labels describe confidentiality, integrity, and +other security attributes of operating system objects, overriding +discretionary access control. +Not all system objects support MAC labeling, and MAC policies must be +explicitly enabled by the administrator. +This API, based on POSIX.1e, includes routines to retrieve, manipulate, set, +and convert to and from text the MAC labels on files and processes. +.Pp +MAC labels consist of a set of (name, value) tuples, representing security +attributes from MAC policies. +For example, this label contains security labels defined by two policies, +.Xr mac_biba 4 +and +.Xr mac_mls 4 : +.Bd -literal -offset indent +biba/low,mls/low +.Ed +.Pp +Further syntax and semantics of MAC labels may be found in +.Xr maclabel 7 . +.Pp +Applications operate on labels stored in +.Vt mac_t , +but can convert between this internal format and a text format for the +purposes of presentation to uses or external storage. +When querying a label on an object, a +.Vt mac_t +must first be prepared using the interfaces described in +.Xr mac_prepare 3 , +allowing the application to declare which policies it wishes to interogate. +The application writer can also rely on default label names declared in +.Xr mac.conf 5 . +.Pp +When finished with a +.Vt mac_t , +the application must call +.Xr mac_free 3 +to release its storage. .Pp -Available functions, sorted by behavior, include: +The following functions are defined: .Bl -tag -width indent -.It Fn mac_get_fd -This function is described in +.It Fn mac_is_present +This function, described in +.Xr mac_is_present 3 , +allows applications to test whether MAC is configured, as well as whether +specific policies are configured. +.It Fn mac_get_fd , Fn mac_get_file , Fn mac_get_link , Fn mac_get_peer +These functions, described in .Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -a specific file descriptor. -.It Fn mac_get_file -This function is described in +retrieve the MAC labels associated with file descriptors, files, and socket +peers. +.It Fn mac_get_pid , Fn mac_get_proc +These functions, described in .Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -a named file. -.It Fn mac_get_proc -This function is described in -.Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -the calling process. -.It Fn mac_set_fd -This function is described in -.Xr mac_set 3 , -and may be used to set the -MAC label associated with -a specific file descriptor. -.It Fn mac_set_file -This function is described in +retrieve the MAC labels associated with processes. +.It Fn mac_set_fd , Fn mac_set_file , Fn mac_set_link +These functions, described in .Xr mac_set 3 , -and may be used to set the -MAC label associated with -a named file. +set the MAC labels associated with file descriptors and files. .It Fn mac_set_proc -This function is described in +This function, described in .Xr mac_set 3 , -and may be used to set the -MAC label associated with -the calling process. +sets the MAC label associated with the current process. .It Fn mac_free -This function is described in +This function, desribed in .Xr mac_free 3 , -and may be used to free -userland working MAC label storage. +frees working MAC label storage. .It Fn mac_from_text -This function is described in +This function, described in .Xr mac_text 3 , -and may be used to convert -a text-form MAC label -into a working +converts a text-form MAC label into working MAC label storage, .Vt mac_t . -.It Fn mac_prepare -.It Fn mac_prepare_file_label -.It Fn mac_prepare_ifnet_label -.It Fn mac_prepare_process_label -These functions are described in +.It Fn mac_prepare , Fn mac_prepare_file_label , Fn mac_prepare_ifnet_label , Fn mac_prepare_process_label , Fn mac_prepare_type +These functions, described in .Xr mac_prepare 3 , -and may be used to preallocate storage for MAC label retrieval. +allocate working storage for MAC label operations. .Xr mac_prepare 3 prepares a label based on caller-specified label names; the other calls rely on the default configuration specified in @@ -130,15 +132,6 @@ and may be used to convert a .Vt mac_t into a text-form MAC label. .El -The behavior of some of these calls is influenced by the configuration -settings found in -.Xr mac.conf 5 , -the MAC library run-time configuration file. -.Sh IMPLEMENTATION NOTES -.Fx Ns 's -support for POSIX.1e interfaces and features -is -.Ud . .Sh FILES .Bl -tag -width ".Pa /etc/mac.conf" -compact .It Pa /etc/mac.conf @@ -150,24 +143,20 @@ system objects, but without policy-speci .Sh SEE ALSO .Xr mac_free 3 , .Xr mac_get 3 , +.Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac.conf 5 , .Xr mac 9 .Sh STANDARDS -These APIs are loosely based on the APIs described in POSIX.1e. -POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. -However, the resemblance of these APIs to the POSIX APIs is only loose, -as the POSIX APIs were unable to express many notions required for -flexible and extensible access control. +These APIs are loosely based on the APIs described in POSIX.1e, as described +in IEEE POSIX.1e draft 17. +However, the resemblence of these APIS to the POSIX APIs is loose, as the +PSOXI APIS were unable to express some notinos required for flexible and +extensible access control. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 Modified: stable/8/lib/libc/posix1e/mac_free.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_free.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_free.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -64,6 +64,7 @@ function. .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh STANDARDS @@ -91,8 +92,8 @@ is a complex structure in the .Tn TrustedBSD implementation, .Fn mac_free -is specific to that type, and must not be used to free the character -strings returned from +is specific to +.Vt mac_3 , +and must not be used to free the character strings returned from .Fn mac_to_text . -Doing so may result in undefined behavior, -including application failure. +Doing so may result in undefined behavior. Modified: stable/8/lib/libc/posix1e/mac_get.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_get.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_get.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -133,6 +133,7 @@ is not a directory. .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh STANDARDS Modified: stable/8/lib/libc/posix1e/mac_set.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_set.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_set.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -138,6 +138,7 @@ is not a directory. .Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh HISTORY Modified: stable/8/lib/libc/posix1e/mac_text.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_text.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_text.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -98,6 +98,7 @@ to allocate internal storage. .Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_set 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr maclabel 7 .Sh STANDARDS Modified: stable/8/lib/libc/posix1e/posix1e.3 ============================================================================== --- stable/8/lib/libc/posix1e/posix1e.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/posix1e.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2009 Robert N. M. Watson .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 20, 2009 +.Dd August 7, 2009 .Dt POSIX1E 3 .Os .Sh NAME @@ -36,99 +36,77 @@ .Sh SYNOPSIS .In sys/types.h .In sys/acl.h -.\" .In sys/capability.h .In sys/mac.h .Sh DESCRIPTION -The IEEE POSIX.1e specification never left draft form, but the interfaces -it describes are now widely used despite inherent limitations. -Currently, only a few of the interfaces and features are implemented in -.Fx , -although efforts are underway to complete the integration at this time. +POSIX.1e describes five security extensions to the POSIX.1 API: Access +Control Lists (ACLs), Auditing, Capabilities, Mandatory Access Control, and +Information Flow Labels. +While IEEE POSIX.1e D17 specification has not been standardized, several of +its interfaces are widely used. .Pp -POSIX.1e describes five security extensions to the base POSIX.1 API: -Access Control Lists (ACLs), Auditing, Capabilities, Mandatory Access -Control, and Information Flow Labels. .Fx -supports POSIX.1e ACL interfaces, as well as POSIX.1e-like MAC -interfaces. -The TrustedBSD Project has produced but not integrated an implementation -of POSIX.1e Capabilities. -.Pp -POSIX.1e defines both syntax and semantics for these features, but fairly -substantial changes are required to implement these features in the -operating system. -.Pp -As shipped, -.Fx 4.0 -provides API and VFS support for ACLs, but not an implementation on any -native file system. -.Fx 5.0 -includes support for ACLs as part of UFS1 and UFS2, as well as necessary -VFS support for additional file systems to export ACLs as appropriate. -Available API calls relating to ACLs are described in detail in -.Xr acl 3 . -.Pp -As shipped, -.Fx 5.0 -includes support for Mandatory Access Control as well as POSIX.1e-like -APIs for label management. -More information on API calls relating to MAC is available in -.Xr mac 3 . +implements POSIX.1e interface for access control lists, described in +.Xr acl 3 , +and supports ACLs on the +.Xr ffs 7 +file system; ACLs must be administratively enabled using +.Xr tunefs 8 . .Pp -Additional patches supporting POSIX.1e features are provided by the -TrustedBSD project: +.Fx +implements a POSIX.1e-like mandatory access control interface, described in +.Xr mac 3 , +although with a number of extensions and important semantic differences. .Pp -http://www.TrustedBSD.org/ -.Sh IMPLEMENTATION NOTES -.Fx Ns 's -support for POSIX.1e interfaces and features is still under -development at this time, and many of these features are considered new -or experimental. +.Fx +does not implement the POSIX.1e audit, privilege (capability), or information +flow label APIs. +However, +.Fx +does implement the +.Xr libbsm +audit API. .Sh ENVIRONMENT -POSIX.1e assigns security labels to all objects, extending the security +POSIX.1e assigns security attributes to all objects, extending the security functionality described in POSIX.1. -These additional labels provide -fine-grained discretionary access control, fine-grained capabilities, -and labels necessary for mandatory access control. -POSIX.2c describes -a set of userland utilities for manipulating these labels. +These additional attributes store fine-grained discretionary access control +information and mandatory access control labels; for files, they are stored +in extended attributes, described in +.Xr extattr 3 . .Pp -Many of these services are supported by extended attributes, documented -in -.Xr extattr 2 +POSIX.2c describes +a set of userland utilities for manipulating these attributes, including +.Xr getfacl 1 +and +.Xr setfacl 1 +for access control lists, and +.Xr getfmac 8 and -.Xr extattr 9 . -While these APIs are not documented in POSIX.1e, they are similar in -structure. +.Xr setfmac 8 +for mandatory access control labels. .Sh SEE ALSO +.Xr getfacl 1 , +.Xr setfacl 1 , .Xr extattr 2 , .Xr acl 3 , +.Xr extattr 3 , .Xr libbsm 3 , .Xr mac 3 , +.Xr ffs 7 , +.Xr getfmac 8 , +.Xr setfmac 8 , +.Xr tunefs 8 , .Xr acl 9 , .Xr extattr 9 , .Xr mac 9 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft continues -on the cross-platform POSIX.1e implementation -mailing list. -To join this list, see the -.Fx -POSIX.1e implementation -page for more information. .Sh HISTORY POSIX.1e support was introduced in .Fx 4.0 ; -most of the features are available as of +most features were available as of .Fx 5.0 . -Development continues. .Sh AUTHORS .An Robert N M Watson .An Chris D. Faulhaber .An Thomas Moestl .An Ilmar S Habibulin -.Sh BUGS -Many of these features are considered new or experimental in -.Fx 5.0 -and should be deployed with appropriate caution. From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 15:16:31 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D53F106564A; Thu, 13 Aug 2009 15:16:31 +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 2A2CD8FC3F; Thu, 13 Aug 2009 15:16: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 n7DFGUCe005051; Thu, 13 Aug 2009 15:16:30 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DFGUSC005047; Thu, 13 Aug 2009 15:16:30 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908131516.n7DFGUSC005047@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 15:16: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: r196192 - in stable/7/sys: . contrib/pf 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: Thu, 13 Aug 2009 15:16:31 -0000 Author: bz Date: Thu Aug 13 15:16:30 2009 New Revision: 196192 URL: http://svn.freebsd.org/changeset/base/196192 Log: MFC: r192649 Implement UDP control block support. Add udpcb support with own fields and flags for UDP instead of further sticking things into in_pcb and flags fields. Attach the udpcb to the inp_ppcb in the kernel. Note: the udp tunneling parts are not (yet) existing in 7 and thus were not merged. Reviewed by: rwatson Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/netinet/udp_usrreq.c stable/7/sys/netinet/udp_var.h stable/7/sys/netinet6/udp6_usrreq.c Modified: stable/7/sys/netinet/udp_usrreq.c ============================================================================== --- stable/7/sys/netinet/udp_usrreq.c Thu Aug 13 15:14:02 2009 (r196191) +++ stable/7/sys/netinet/udp_usrreq.c Thu Aug 13 15:16:30 2009 (r196192) @@ -138,6 +138,7 @@ SYSCTL_INT(_net_inet_udp, OID_AUTO, sore struct inpcbhead udb; /* from udp_var.h */ struct inpcbinfo udbinfo; +static uma_zone_t udpcb_zone; #ifndef UDBHASHSIZE #define UDBHASHSIZE 128 @@ -156,6 +157,7 @@ udp_zone_change(void *tag) { uma_zone_set_max(udbinfo.ipi_zone, maxsockets); + uma_zone_set_max(udpcb_zone, maxsockets); } static int @@ -179,9 +181,14 @@ udp_init(void) &udbinfo.ipi_hashmask); udbinfo.ipi_porthashbase = hashinit(UDBHASHSIZE, M_PCB, &udbinfo.ipi_porthashmask); - udbinfo.ipi_zone = uma_zcreate("udpcb", sizeof(struct inpcb), NULL, - NULL, udp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + udbinfo.ipi_zone = uma_zcreate("udp_inpcb", sizeof(struct inpcb), + NULL, NULL, udp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); uma_zone_set_max(udbinfo.ipi_zone, maxsockets); + + udpcb_zone = uma_zcreate("udpcb", sizeof(struct udpcb), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + uma_zone_set_max(udpcb_zone, maxsockets); + EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL, EVENTHANDLER_PRI_ANY); TUNABLE_INT_FETCH("net.inet.udp.soreceive_dgram_enabled", @@ -194,6 +201,25 @@ udp_init(void) } } +int +udp_newudpcb(struct inpcb *inp) +{ + struct udpcb *up; + + up = uma_zalloc(udpcb_zone, M_NOWAIT | M_ZERO); + if (up == NULL) + return (ENOBUFS); + inp->inp_ppcb = up; + return (0); +} + +void +udp_discardcb(struct udpcb *up) +{ + + uma_zfree(udpcb_zone, up); +} + /* * Subroutine of udp_input(), which appends the provided mbuf chain to the * passed pcb/socket. The caller must provide a sockaddr_in via udp_in that @@ -1129,10 +1155,19 @@ udp_attach(struct socket *so, int proto, } inp = (struct inpcb *)so->so_pcb; - INP_INFO_WUNLOCK(&udbinfo); inp->inp_vflag |= INP_IPV4; inp->inp_ip_ttl = ip_defttl; + + error = udp_newudpcb(inp); + if (error) { + in_pcbdetach(inp); + in_pcbfree(inp); + INP_INFO_WUNLOCK(&udbinfo); + return (error); + } + INP_WUNLOCK(inp); + INP_INFO_WUNLOCK(&udbinfo); return (0); } @@ -1205,6 +1240,7 @@ static void udp_detach(struct socket *so) { struct inpcb *inp; + struct udpcb *up; inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_detach: inp == NULL")); @@ -1212,9 +1248,13 @@ udp_detach(struct socket *so) ("udp_detach: not disconnected")); INP_INFO_WLOCK(&udbinfo); INP_WLOCK(inp); + up = intoudpcb(inp); + KASSERT(up != NULL, ("%s: up == NULL", __func__)); + inp->inp_ppcb = NULL; in_pcbdetach(inp); in_pcbfree(inp); INP_INFO_WUNLOCK(&udbinfo); + udp_discardcb(up); } static int Modified: stable/7/sys/netinet/udp_var.h ============================================================================== --- stable/7/sys/netinet/udp_var.h Thu Aug 13 15:14:02 2009 (r196191) +++ stable/7/sys/netinet/udp_var.h Thu Aug 13 15:16:30 2009 (r196192) @@ -51,6 +51,17 @@ struct udpiphdr { #define ui_ulen ui_u.uh_ulen #define ui_sum ui_u.uh_sum +/* + * UDP control block; one per udp. + */ +struct udpcb { + void *u_pspare; + u_int u_flags; /* Generic UDP flags. */ +}; + +#define intoudpcb(ip) ((struct udpcb *)(ip)->inp_ppcb) +#define sotoudpcb(so) (intoudpcb(sotoinpcb(so))) + struct udpstat { /* input statistics: */ u_long udps_ipackets; /* total input packets */ @@ -102,6 +113,9 @@ extern struct udpstat udpstat; extern int udp_blackhole; extern int udp_log_in_vain; +int udp_newudpcb(struct inpcb *); +void udp_discardcb(struct udpcb *); + void udp_ctlinput(int, struct sockaddr *, void *); void udp_init(void); void udp_input(struct mbuf *, int); Modified: stable/7/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/7/sys/netinet6/udp6_usrreq.c Thu Aug 13 15:14:02 2009 (r196191) +++ stable/7/sys/netinet6/udp6_usrreq.c Thu Aug 13 15:16:30 2009 (r196192) @@ -739,7 +739,6 @@ udp6_attach(struct socket *so, int proto return (error); } inp = (struct inpcb *)so->so_pcb; - INP_INFO_WUNLOCK(&udbinfo); inp->inp_vflag |= INP_IPV6; if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) inp->inp_vflag |= INP_IPV4; @@ -752,7 +751,16 @@ udp6_attach(struct socket *so, int proto * which may match an IPv4-mapped IPv6 address. */ inp->inp_ip_ttl = ip_defttl; + + error = udp_newudpcb(inp); + if (error) { + in_pcbdetach(inp); + in_pcbfree(inp); + INP_INFO_WUNLOCK(&udbinfo); + return (error); + } INP_WUNLOCK(inp); + INP_INFO_WUNLOCK(&udbinfo); return (0); } @@ -883,15 +891,19 @@ static void udp6_detach(struct socket *so) { struct inpcb *inp; + struct udpcb *up; inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_detach: inp == NULL")); INP_INFO_WLOCK(&udbinfo); INP_WLOCK(inp); + up = intoudpcb(inp); + KASSERT(up != NULL, ("%s: up == NULL", __func__)); in_pcbdetach(inp); in_pcbfree(inp); INP_INFO_WUNLOCK(&udbinfo); + udp_discardcb(up); } static int From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 15:30:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EF8F106564A; Thu, 13 Aug 2009 15:30:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id C74878FC45; Thu, 13 Aug 2009 15:30:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id B5B0E41C616; Thu, 13 Aug 2009 17:30:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id S3-8c-3d9TSD; Thu, 13 Aug 2009 17:30:06 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id EF69B41C615; Thu, 13 Aug 2009 17:30: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 4F9C64448EC; Thu, 13 Aug 2009 15:29:47 +0000 (UTC) Date: Thu, 13 Aug 2009 15:29:47 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org In-Reply-To: <200908131516.n7DFGUSC005047@svn.freebsd.org> Message-ID: <20090813151939.H93661@maildrop.int.zabbadoz.net> References: <200908131516.n7DFGUSC005047@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r196192 - in stable/7/sys: . contrib/pf 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: Thu, 13 Aug 2009 15:30:08 -0000 On Thu, 13 Aug 2009, Bjoern A. Zeeb wrote: > Author: bz > Date: Thu Aug 13 15:16:30 2009 > New Revision: 196192 > URL: http://svn.freebsd.org/changeset/base/196192 > > Log: > MFC: r192649 > > Implement UDP control block support. > > Add udpcb support with own fields and flags for UDP instead > of further sticking things into in_pcb and flags fields. > Attach the udpcb to the inp_ppcb in the kernel. > > Note: the udp tunneling parts are not (yet) existing in 7 > and thus were not merged. > > Reviewed by: rwatson I forgot: Submitted by: jhb (original 7.x version before detour via HEAD) Not that there are consumers out there using an UDPCB in 7-STABLE already and thus can reduce their patchset now, this gives us the possibility to generate a IPSEC NAT-T patch that will be compatible with what is in FreeBSD 8 and HEAD (9) reducing problems on maintainance for ports and and tools (I'll post that patch in a bit on net@). We can also MFC the generic in-kernel UDP tunneling support now, even if the SCTP changes might not be MFCable, externel kernel modules can still make use of this then. > Modified: > stable/7/sys/ (props changed) > stable/7/sys/contrib/pf/ (props changed) > stable/7/sys/netinet/udp_usrreq.c > stable/7/sys/netinet/udp_var.h > stable/7/sys/netinet6/udp6_usrreq.c -- Bjoern A. Zeeb What was I talking about and who are you again? From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 15:56:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05A37106566B; Thu, 13 Aug 2009 15:56:10 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8B7A8FC57; Thu, 13 Aug 2009 15:56: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 n7DFu9qq005967; Thu, 13 Aug 2009 15:56:09 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DFu9dE005965; Thu, 13 Aug 2009 15:56:09 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200908131556.n7DFu9dE005965@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 13 Aug 2009 15:56: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: r196193 - head/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 15:56:10 -0000 Author: raj Date: Thu Aug 13 15:56:09 2009 New Revision: 196193 URL: http://svn.freebsd.org/changeset/base/196193 Log: Use correct wbinv operation in pmap_l2cache_wbinv_range(). Submitted by: Michal Hajduk Reviewed by: stas Approved by: re (kib) Obtained from: Semihalf Modified: head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Thu Aug 13 15:16:30 2009 (r196192) +++ head/sys/arm/arm/pmap.c Thu Aug 13 15:56:09 2009 (r196193) @@ -1212,7 +1212,7 @@ pmap_l2cache_wbinv_range(pmap_t pm, vm_o CTR4(KTR_PMAP, "pmap_l2cache_wbinv_range: pmap %p is_kernel %d " "va 0x%08x len 0x%x ", pm, pm == pmap_kernel(), va, rest); if (pmap_get_pde_pte(pm, va, &pde, &ptep) && l2pte_valid(*ptep)) - cpu_l2cache_wb_range(va, rest); + cpu_l2cache_wbinv_range(va, rest); len -= rest; va += rest; From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 16:01:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D6C106564A; Thu, 13 Aug 2009 16:01:19 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72C0C8FC41; Thu, 13 Aug 2009 16:01: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 n7DG1JNC006134; Thu, 13 Aug 2009 16:01:19 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DG1Jtc006132; Thu, 13 Aug 2009 16:01:19 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200908131601.n7DG1Jtc006132@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 13 Aug 2009 16:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196194 - in stable/8/sys: . amd64/include/xen arm/arm cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 16:01:20 -0000 Author: raj Date: Thu Aug 13 16:01:19 2009 New Revision: 196194 URL: http://svn.freebsd.org/changeset/base/196194 Log: MFC r196193: Use correct wbinv operation in pmap_l2cache_wbinv_range(). Submitted by: Michal Hajduk Reviewed by: stas Approved by: re (kib) Obtained from: Semihalf Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/arm/arm/pmap.c 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/arm/arm/pmap.c ============================================================================== --- stable/8/sys/arm/arm/pmap.c Thu Aug 13 15:56:09 2009 (r196193) +++ stable/8/sys/arm/arm/pmap.c Thu Aug 13 16:01:19 2009 (r196194) @@ -1212,7 +1212,7 @@ pmap_l2cache_wbinv_range(pmap_t pm, vm_o CTR4(KTR_PMAP, "pmap_l2cache_wbinv_range: pmap %p is_kernel %d " "va 0x%08x len 0x%x ", pm, pm == pmap_kernel(), va, rest); if (pmap_get_pde_pte(pm, va, &pde, &ptep) && l2pte_valid(*ptep)) - cpu_l2cache_wb_range(va, rest); + cpu_l2cache_wbinv_range(va, rest); len -= rest; va += rest; From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 17:09:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B856B1065670; Thu, 13 Aug 2009 17:09:46 +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 A2A5E8FC3A; Thu, 13 Aug 2009 17:09: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 n7DH9kjU007673; Thu, 13 Aug 2009 17:09:46 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DH9jpC007642; Thu, 13 Aug 2009 17:09:45 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200908131709.n7DH9jpC007642@svn.freebsd.org> From: Attilio Rao Date: Thu, 13 Aug 2009 17:09: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: r196196 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/conf sys/i386/conf sys/i386/i386 sys/i386/include sys/i386/xen sys/ia64/ia64 sys/ia64/include sys/kern sys/mips... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 17:09:47 -0000 Author: attilio Date: Thu Aug 13 17:09:45 2009 New Revision: 196196 URL: http://svn.freebsd.org/changeset/base/196196 Log: * Completely Remove the option STOP_NMI from the kernel. This option has proven to have a good effect when entering KDB by using a NMI, but it completely violates all the good rules about interrupts disabled while holding a spinlock in other occasions. This can be the cause of deadlocks on events where a normal IPI_STOP is expected. * Adds an new IPI called IPI_STOP_HARD on all the supported architectures. This IPI is responsible for sending a stop message among CPUs using a privileged channel when disponible. In other cases it just does match a normal IPI_STOP. Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64 architectures, while on the other has a normal IPI_STOP effect. It is responsibility of maintainers to eventually implement an hard stop when necessary and possible. * Use the new IPI facility in order to implement a new userend SMP kernel function called stop_cpus_hard(). That is specular to stop_cpu() but it does use the privileged channel for the stopping facility. * Let KDB use the newly introduced function stop_cpus_hard() and leave stop_cpus() for all the other cases * Disable interrupts on CPU0 when starting the process of APs suspension. * Style cleanup and comments adding This patch should fix the reboot/shutdown deadlocks many users are constantly reporting on mailing lists. Please don't forget to update your config file with the STOP_NMI option removal Reviewed by: jhb Tested by: pho, bz, rink Approved by: re (kib) Modified: head/UPDATING head/sys/amd64/amd64/local_apic.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/amd64/trap.c head/sys/amd64/conf/GENERIC head/sys/amd64/conf/NOTES head/sys/amd64/conf/XENHVM head/sys/amd64/include/apicvar.h head/sys/amd64/include/smp.h head/sys/conf/options.amd64 head/sys/conf/options.i386 head/sys/conf/options.pc98 head/sys/i386/conf/GENERIC head/sys/i386/conf/NOTES head/sys/i386/i386/local_apic.c head/sys/i386/i386/mp_machdep.c head/sys/i386/i386/trap.c head/sys/i386/include/apicvar.h head/sys/i386/include/smp.h head/sys/i386/xen/mp_machdep.c head/sys/ia64/ia64/interrupt.c head/sys/ia64/include/smp.h head/sys/kern/kern_shutdown.c head/sys/kern/subr_kdb.c head/sys/kern/subr_smp.c head/sys/mips/include/smp.h head/sys/mips/mips/mp_machdep.c head/sys/pc98/conf/NOTES head/sys/powerpc/include/smp.h head/sys/powerpc/powerpc/mp_machdep.c head/sys/sparc64/include/smp.h head/sys/sun4v/include/smp.h head/sys/sys/smp.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Aug 13 16:08:35 2009 (r196195) +++ head/UPDATING Thu Aug 13 17:09:45 2009 (r196196) @@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090813: + Remove the option STOP_NMI. The default action is now to use NMI + only for KDB via the newly introduced function stop_cpus_hard() + and maintain stop_cpus() to just use a normal IPI_STOP on ia32 + and amd64. + 20090719: Bump the shared library version numbers for all libraries that do not use symbol versioning as part of the 8.0-RELEASE cycle. Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/amd64/local_apic.c Thu Aug 13 17:09:45 2009 (r196196) @@ -1238,8 +1238,17 @@ lapic_ipi_vectored(u_int vector, int des KASSERT((vector & ~APIC_VECTOR_MASK) == 0, ("%s: invalid vector %d", __func__, vector)); - icrlo = vector | APIC_DELMODE_FIXED | APIC_DESTMODE_PHY | - APIC_LEVEL_DEASSERT | APIC_TRIGMOD_EDGE; + icrlo = APIC_DESTMODE_PHY | APIC_TRIGMOD_EDGE; + + /* + * IPI_STOP_HARD is just a "fake" vector used to send a NMI. + * Use special rules regard NMI if passed, otherwise specify + * the vector. + */ + if (vector == IPI_STOP_HARD) + icrlo |= APIC_DELMODE_NMI | APIC_LEVEL_ASSERT; + else + icrlo |= vector | APIC_DELMODE_FIXED | APIC_LEVEL_DEASSERT; destfield = 0; switch (dest) { case APIC_IPI_DEST_SELF: Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/amd64/mp_machdep.c Thu Aug 13 17:09:45 2009 (r196196) @@ -114,31 +114,12 @@ volatile int smp_tlb_wait; extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); -#ifdef STOP_NMI -static volatile cpumask_t ipi_nmi_pending; - -static void ipi_nmi_selected(cpumask_t cpus); -#endif - /* * Local data and functions. */ -#ifdef STOP_NMI -/* - * Provide an alternate method of stopping other CPUs. If another CPU has - * disabled interrupts the conventional STOP IPI will be blocked. This - * NMI-based stop should get through in that case. - */ -static int stop_cpus_with_nmi = 1; -SYSCTL_INT(_debug, OID_AUTO, stop_cpus_with_nmi, CTLTYPE_INT | CTLFLAG_RW, - &stop_cpus_with_nmi, 0, ""); -TUNABLE_INT("debug.stop_cpus_with_nmi", &stop_cpus_with_nmi); -#else -#define stop_cpus_with_nmi 0 -#endif - static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1158,12 +1139,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } -#ifdef STOP_NMI - if (ipi == IPI_STOP && stop_cpus_with_nmi) { - ipi_nmi_selected(cpus); - return; - } -#endif + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1194,64 +1177,43 @@ void ipi_all_but_self(u_int ipi) { - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { + if (IPI_IS_BITMAPED(ipi)) { ipi_selected(PCPU_GET(other_cpus), ipi); return; } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); -} -#ifdef STOP_NMI -/* - * send NMI IPI to selected CPUs - */ - -#define BEFORE_SPIN 1000000 - -static void -ipi_nmi_selected(cpumask_t cpus) -{ - int cpu; - register_t icrlo; - - icrlo = APIC_DELMODE_NMI | APIC_DESTMODE_PHY | APIC_LEVEL_ASSERT - | APIC_TRIGMOD_EDGE; - - CTR2(KTR_SMP, "%s: cpus: %x nmi", __func__, cpus); - - atomic_set_int(&ipi_nmi_pending, cpus); - - while ((cpu = ffs(cpus)) != 0) { - cpu--; - cpus &= ~(1 << cpu); - - KASSERT(cpu_apic_ids[cpu] != -1, - ("IPI NMI to non-existent CPU %d", cpu)); - - /* Wait for an earlier IPI to finish. */ - if (!lapic_ipi_wait(BEFORE_SPIN)) - panic("ipi_nmi_selected: previous IPI has not cleared"); + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); - lapic_ipi_raw(icrlo, cpu_apic_ids[cpu]); - } + CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); + lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } int -ipi_nmi_handler(void) +ipi_nmi_handler() { - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; - if (!(ipi_nmi_pending & cpumask)) - return 1; + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); atomic_clear_int(&ipi_nmi_pending, cpumask); cpustop_handler(); - return 0; + return (0); } -#endif /* STOP_NMI */ - /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/amd64/trap.c Thu Aug 13 17:09:45 2009 (r196196) @@ -239,13 +239,11 @@ trap(struct trapframe *frame) type = frame->tf_trapno; #ifdef SMP -#ifdef STOP_NMI /* Handler for NMI IPIs used for stopping CPUs. */ if (type == T_NMI) { if (ipi_nmi_handler() == 0) goto out; } -#endif /* STOP_NMI */ #endif /* SMP */ #ifdef KDB Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/conf/GENERIC Thu Aug 13 17:09:45 2009 (r196196) @@ -69,7 +69,6 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/conf/NOTES Thu Aug 13 17:09:45 2009 (r196196) @@ -30,11 +30,6 @@ device mptable # Optional MPSPEC mpta # options MP_WATCHDOG -# -# Debugging options. -# -options STOP_NMI # Stop CPUS using NMI instead of IPI - ##################################################################### Modified: head/sys/amd64/conf/XENHVM ============================================================================== --- head/sys/amd64/conf/XENHVM Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/conf/XENHVM Thu Aug 13 17:09:45 2009 (r196196) @@ -68,7 +68,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing #options KDTRACE_FRAME # Ensure frames are compiled in Modified: head/sys/amd64/include/apicvar.h ============================================================================== --- head/sys/amd64/include/apicvar.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/include/apicvar.h Thu Aug 13 17:09:45 2009 (r196196) @@ -102,11 +102,6 @@ * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user * at a time) The second group uses a single interrupt and a bitmap to avoid * redundant IPI interrupts. - * - * Right now IPI_STOP used by kdb shares the interrupt priority class with - * the two IPI groups mentioned above. As such IPI_STOP may cause a deadlock. - * Eventually IPI_STOP should use NMI IPIs - this would eliminate this and - * other deadlocks caused by IPI_STOP. */ /* Interrupts for local APIC LVT entries other than the timer. */ @@ -134,6 +129,7 @@ #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ #define IPI_SUSPEND (APIC_IPI_INTS + 8) /* Suspend CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 9) /* Stop CPU with a NMI. */ /* * The spurious interrupt can share the priority class with the IPIs since Modified: head/sys/amd64/include/smp.h ============================================================================== --- head/sys/amd64/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -52,6 +52,7 @@ void cpu_add(u_int apic_id, char boot_cp void cpustop_handler(void); void cpususpend_handler(void); void init_secondary(void); +int ipi_nmi_handler(void); void ipi_selected(cpumask_t cpus, u_int ipi); void ipi_all_but_self(u_int ipi); void ipi_bitmap_handler(struct trapframe frame); @@ -66,10 +67,6 @@ void smp_masked_invlpg_range(cpumask_t m void smp_invltlb(void); void smp_masked_invltlb(cpumask_t mask); -#ifdef STOP_NMI -int ipi_nmi_handler(void); -#endif - #endif /* !LOCORE */ #endif /* SMP */ Modified: head/sys/conf/options.amd64 ============================================================================== --- head/sys/conf/options.amd64 Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/conf/options.amd64 Thu Aug 13 17:09:45 2009 (r196196) @@ -52,7 +52,6 @@ PSM_DEBUG opt_psm.h DEV_ATPIC opt_atpic.h # Debugging -STOP_NMI opt_cpu.h KDTRACE_FRAME opt_kdtrace.h # BPF just-in-time compiler Modified: head/sys/conf/options.i386 ============================================================================== --- head/sys/conf/options.i386 Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/conf/options.i386 Thu Aug 13 17:09:45 2009 (r196196) @@ -110,7 +110,6 @@ ASR_COMPAT opt_asr.h # Debugging NPX_DEBUG opt_npx.h -STOP_NMI opt_cpu.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h Modified: head/sys/conf/options.pc98 ============================================================================== --- head/sys/conf/options.pc98 Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/conf/options.pc98 Thu Aug 13 17:09:45 2009 (r196196) @@ -95,7 +95,6 @@ DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h -STOP_NMI opt_cpu.h AGP_DEBUG opt_agp.h # BPF just-in-time compiler Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/conf/GENERIC Thu Aug 13 17:09:45 2009 (r196196) @@ -70,7 +70,6 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/conf/NOTES Thu Aug 13 17:09:45 2009 (r196196) @@ -49,7 +49,6 @@ options MP_WATCHDOG # Debugging options. # -options STOP_NMI # Stop CPUS using NMI instead of IPI options COUNT_XINVLTLB_HITS # Counters for TLB events options COUNT_IPIS # Per-CPU IPI interrupt counters Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/i386/local_apic.c Thu Aug 13 17:09:45 2009 (r196196) @@ -1248,8 +1248,17 @@ lapic_ipi_vectored(u_int vector, int des KASSERT((vector & ~APIC_VECTOR_MASK) == 0, ("%s: invalid vector %d", __func__, vector)); - icrlo = vector | APIC_DELMODE_FIXED | APIC_DESTMODE_PHY | - APIC_LEVEL_DEASSERT | APIC_TRIGMOD_EDGE; + icrlo = APIC_DESTMODE_PHY | APIC_TRIGMOD_EDGE; + + /* + * IPI_STOP_HARD is just a "fake" vector used to send a NMI. + * Use special rules regard NMI if passed, otherwise specify + * the vector. + */ + if (vector == IPI_STOP_HARD) + icrlo |= APIC_DELMODE_NMI | APIC_LEVEL_ASSERT; + else + icrlo |= vector | APIC_DELMODE_FIXED | APIC_LEVEL_DEASSERT; destfield = 0; switch (dest) { case APIC_IPI_DEST_SELF: Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/i386/mp_machdep.c Thu Aug 13 17:09:45 2009 (r196196) @@ -155,12 +155,6 @@ vm_offset_t smp_tlb_addr1; vm_offset_t smp_tlb_addr2; volatile int smp_tlb_wait; -#ifdef STOP_NMI -static volatile cpumask_t ipi_nmi_pending; - -static void ipi_nmi_selected(cpumask_t cpus); -#endif - #ifdef COUNT_IPIS /* Interrupt counts. */ static u_long *ipi_preempt_counts[MAXCPU]; @@ -177,21 +171,8 @@ u_long *ipi_lazypmap_counts[MAXCPU]; * Local data and functions. */ -#ifdef STOP_NMI -/* - * Provide an alternate method of stopping other CPUs. If another CPU has - * disabled interrupts the conventional STOP IPI will be blocked. This - * NMI-based stop should get through in that case. - */ -static int stop_cpus_with_nmi = 1; -SYSCTL_INT(_debug, OID_AUTO, stop_cpus_with_nmi, CTLTYPE_INT | CTLFLAG_RW, - &stop_cpus_with_nmi, 0, ""); -TUNABLE_INT("debug.stop_cpus_with_nmi", &stop_cpus_with_nmi); -#else -#define stop_cpus_with_nmi 0 -#endif - static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1318,12 +1299,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } -#ifdef STOP_NMI - if (ipi == IPI_STOP && stop_cpus_with_nmi) { - ipi_nmi_selected(cpus); - return; - } -#endif + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1354,64 +1337,42 @@ void ipi_all_but_self(u_int ipi) { - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { + if (IPI_IS_BITMAPED(ipi)) { ipi_selected(PCPU_GET(other_cpus), ipi); return; } + + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } -#ifdef STOP_NMI -/* - * send NMI IPI to selected CPUs - */ - -#define BEFORE_SPIN 1000000 - -void -ipi_nmi_selected(cpumask_t cpus) -{ - int cpu; - register_t icrlo; - - icrlo = APIC_DELMODE_NMI | APIC_DESTMODE_PHY | APIC_LEVEL_ASSERT - | APIC_TRIGMOD_EDGE; - - CTR2(KTR_SMP, "%s: cpus: %x nmi", __func__, cpus); - - atomic_set_int(&ipi_nmi_pending, cpus); - - while ((cpu = ffs(cpus)) != 0) { - cpu--; - cpus &= ~(1 << cpu); - - KASSERT(cpu_apic_ids[cpu] != -1, - ("IPI NMI to non-existent CPU %d", cpu)); - - /* Wait for an earlier IPI to finish. */ - if (!lapic_ipi_wait(BEFORE_SPIN)) - panic("ipi_nmi_selected: previous IPI has not cleared"); - - lapic_ipi_raw(icrlo, cpu_apic_ids[cpu]); - } -} - int -ipi_nmi_handler(void) +ipi_nmi_handler() { - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; - if (!(ipi_nmi_pending & cpumask)) - return 1; + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); atomic_clear_int(&ipi_nmi_pending, cpumask); cpustop_handler(); - return 0; + return (0); } -#endif /* STOP_NMI */ - /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/i386/trap.c Thu Aug 13 17:09:45 2009 (r196196) @@ -211,13 +211,11 @@ trap(struct trapframe *frame) type = frame->tf_trapno; #ifdef SMP -#ifdef STOP_NMI /* Handler for NMI IPIs used for stopping CPUs. */ if (type == T_NMI) { if (ipi_nmi_handler() == 0) goto out; } -#endif /* STOP_NMI */ #endif /* SMP */ #ifdef KDB Modified: head/sys/i386/include/apicvar.h ============================================================================== --- head/sys/i386/include/apicvar.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/include/apicvar.h Thu Aug 13 17:09:45 2009 (r196196) @@ -100,11 +100,6 @@ * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user * at a time) The second group uses a single interrupt and a bitmap to avoid * redundant IPI interrupts. - * - * Right now IPI_STOP used by kdb shares the interrupt priority class with - * the two IPI groups mentioned above. As such IPI_STOP may cause a deadlock. - * Eventually IPI_STOP should use NMI IPIs - this would eliminate this and - * other deadlocks caused by IPI_STOP. */ /* Interrupts for local APIC LVT entries other than the timer. */ @@ -134,6 +129,7 @@ #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ #else /* XEN */ /* These are the normal i386 APIC definitions */ @@ -161,6 +157,7 @@ #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ #endif /* XEN */ /* Modified: head/sys/i386/include/smp.h ============================================================================== --- head/sys/i386/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -60,7 +60,8 @@ inthand_t void cpu_add(u_int apic_id, char boot_cpu); void cpustop_handler(void); void init_secondary(void); -void ipi_selected(u_int cpus, u_int ipi); +int ipi_nmi_handler(void); +void ipi_selected(cpumask_t cpus, u_int ipi); void ipi_all_but_self(u_int ipi); #ifndef XEN void ipi_bitmap_handler(struct trapframe frame); @@ -76,9 +77,6 @@ void smp_masked_invlpg_range(cpumask_t m void smp_invltlb(void); void smp_masked_invltlb(cpumask_t mask); -#ifdef STOP_NMI -int ipi_nmi_handler(void); -#endif #ifdef XEN void ipi_to_irq_init(void); Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/xen/mp_machdep.c Thu Aug 13 17:09:45 2009 (r196196) @@ -90,8 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define stop_cpus_with_nmi 0 - int mp_naps; /* # of Applications processors */ int boot_cpu_id = -1; /* designated BSP */ Modified: head/sys/ia64/ia64/interrupt.c ============================================================================== --- head/sys/ia64/ia64/interrupt.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/ia64/ia64/interrupt.c Thu Aug 13 17:09:45 2009 (r196196) @@ -145,6 +145,8 @@ interrupt(struct trapframe *tf) /* * Handle ExtINT interrupts by generating an INTA cycle to * read the vector. + * IPI_STOP_HARD is mapped to IPI_STOP so it is not necessary + * to add it to this switch-like construct. */ if (vector == 0) { inta = ib->ib_inta; Modified: head/sys/ia64/include/smp.h ============================================================================== --- head/sys/ia64/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/ia64/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -21,6 +21,7 @@ #define IPI_AST 4 #define IPI_RENDEZVOUS 5 #define IPI_STOP 6 +#define IPI_STOP_HARD 6 #define IPI_PREEMPT 7 #define IPI_COUNT 8 Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/kern/kern_shutdown.c Thu Aug 13 17:09:45 2009 (r196196) @@ -412,9 +412,6 @@ boot(int howto) */ EVENTHANDLER_INVOKE(shutdown_post_sync, howto); - /* XXX This doesn't disable interrupts any more. Reconsider? */ - splhigh(); - if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold && !dumping) doadump(); @@ -488,6 +485,13 @@ static void shutdown_reset(void *junk, int howto) { + /* + * Disable interrupts on CPU0 in order to avoid fast handlers + * to preempt the stopping process and to deadlock against other + * CPUs. + */ + spinlock_enter(); + printf("Rebooting...\n"); DELAY(1000000); /* wait 1 sec for printf's to complete and be read */ /* cpu_boot(howto); */ /* doesn't do anything at the moment */ Modified: head/sys/kern/subr_kdb.c ============================================================================== --- head/sys/kern/subr_kdb.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/kern/subr_kdb.c Thu Aug 13 17:09:45 2009 (r196196) @@ -88,7 +88,8 @@ SYSCTL_PROC(_debug_kdb, OID_AUTO, trap_c * Flag indicating whether or not to IPI the other CPUs to stop them on * entering the debugger. Sometimes, this will result in a deadlock as * stop_cpus() waits for the other cpus to stop, so we allow it to be - * disabled. + * disabled. In order to maximize the chances of success, use a hard + * stop for that. */ #ifdef SMP static int kdb_stop_cpus = 1; @@ -226,7 +227,7 @@ kdb_panic(const char *msg) { #ifdef SMP - stop_cpus(PCPU_GET(other_cpus)); + stop_cpus_hard(PCPU_GET(other_cpus)); #endif printf("KDB: panic\n"); panic(msg); @@ -518,7 +519,7 @@ kdb_trap(int type, int code, struct trap #ifdef SMP if ((did_stop_cpus = kdb_stop_cpus) != 0) - stop_cpus(PCPU_GET(other_cpus)); + stop_cpus_hard(PCPU_GET(other_cpus)); #endif kdb_active++; Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/kern/subr_smp.c Thu Aug 13 17:09:45 2009 (r196196) @@ -233,18 +233,21 @@ forward_roundrobin(void) * XXX FIXME: this is not MP-safe, needs a lock to prevent multiple CPUs * from executing at same time. */ -int -stop_cpus(cpumask_t map) +static int +generic_stop_cpus(cpumask_t map, u_int type) { int i; + KASSERT(type == IPI_STOP || type == IPI_STOP_HARD, + ("%s: invalid stop type", __func__)); + if (!smp_started) return 0; - CTR1(KTR_SMP, "stop_cpus(%x)", map); + CTR2(KTR_SMP, "stop_cpus(%x) with %u type", map, type); /* send the stop IPI to all CPUs in map */ - ipi_selected(map, IPI_STOP); + ipi_selected(map, type); i = 0; while ((stopped_cpus & map) != map) { @@ -262,6 +265,20 @@ stop_cpus(cpumask_t map) return 1; } +int +stop_cpus(cpumask_t map) +{ + + return (generic_stop_cpus(map, IPI_STOP)); +} + +int +stop_cpus_hard(cpumask_t map) +{ + + return (generic_stop_cpus(map, IPI_STOP_HARD)); +} + #if defined(__amd64__) /* * When called the executing CPU will send an IPI to all other CPUs Modified: head/sys/mips/include/smp.h ============================================================================== --- head/sys/mips/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/mips/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -24,6 +24,7 @@ #define IPI_RENDEZVOUS 0x0002 #define IPI_AST 0x0004 #define IPI_STOP 0x0008 +#define IPI_STOP_HARD 0x0008 #ifndef LOCORE Modified: head/sys/mips/mips/mp_machdep.c ============================================================================== --- head/sys/mips/mips/mp_machdep.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/mips/mips/mp_machdep.c Thu Aug 13 17:09:45 2009 (r196196) @@ -129,7 +129,12 @@ smp_handle_ipi(struct trapframe *frame) break; case IPI_STOP: - CTR0(KTR_SMP, "IPI_STOP"); + + /* + * IPI_STOP_HARD is mapped to IPI_STOP so it is not + * necessary to add it in the switch. + */ + CTR0(KTR_SMP, "IPI_STOP or IPI_STOP_HARD"); atomic_set_int(&stopped_cpus, cpumask); while ((started_cpus & cpumask) == 0) Modified: head/sys/pc98/conf/NOTES ============================================================================== --- head/sys/pc98/conf/NOTES Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/pc98/conf/NOTES Thu Aug 13 17:09:45 2009 (r196196) @@ -29,10 +29,6 @@ device apic # I/O apic # options MP_WATCHDOG -# Debugging options. -# -options STOP_NMI # Stop CPUS using NMI instead of IPI - ##################################################################### Modified: head/sys/powerpc/include/smp.h ============================================================================== --- head/sys/powerpc/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/powerpc/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -35,6 +35,7 @@ #define IPI_PREEMPT 1 #define IPI_RENDEZVOUS 2 #define IPI_STOP 3 +#define IPI_STOP_HARD 3 #ifndef LOCORE Modified: head/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/mp_machdep.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/powerpc/powerpc/mp_machdep.c Thu Aug 13 17:09:45 2009 (r196196) @@ -281,7 +281,13 @@ powerpc_ipi_handler(void *arg) smp_rendezvous_action(); break; case IPI_STOP: - CTR1(KTR_SMP, "%s: IPI_STOP (stop)", __func__); + + /* + * IPI_STOP_HARD is mapped to IPI_STOP so it is not + * necessary to add such case in the switch. + */ + CTR1(KTR_SMP, "%s: IPI_STOP or IPI_STOP_HARD (stop)", + __func__); self = PCPU_GET(cpumask); savectx(PCPU_GET(curpcb)); atomic_set_int(&stopped_cpus, self); Modified: head/sys/sparc64/include/smp.h ============================================================================== --- head/sys/sparc64/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/sparc64/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -56,6 +56,7 @@ #define IPI_RENDEZVOUS PIL_RENDEZVOUS #define IPI_PREEMPT PIL_PREEMPT #define IPI_STOP PIL_STOP +#define IPI_STOP_HARD PIL_STOP #define IPI_RETRIES 5000 Modified: head/sys/sun4v/include/smp.h ============================================================================== --- head/sys/sun4v/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/sun4v/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -44,6 +44,7 @@ #define IPI_AST PIL_AST #define IPI_RENDEZVOUS PIL_RENDEZVOUS #define IPI_STOP PIL_STOP +#define IPI_STOP_HARD PIL_STOP #define IPI_PREEMPT PIL_PREEMPT Modified: head/sys/sys/smp.h ============================================================================== --- head/sys/sys/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/sys/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -123,6 +123,7 @@ void forward_signal(struct thread *); void forward_roundrobin(void); int restart_cpus(cpumask_t); int stop_cpus(cpumask_t); +int stop_cpus_hard(cpumask_t); #if defined(__amd64__) int suspend_cpus(cpumask_t); #endif From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 17:51:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14037106564A; Thu, 13 Aug 2009 17:51:27 +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 01F398FC3A; Thu, 13 Aug 2009 17:51: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 n7DHpQHq008613; Thu, 13 Aug 2009 17:51:26 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DHpQpU008608; Thu, 13 Aug 2009 17:51:26 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908131751.n7DHpQpU008608@svn.freebsd.org> From: John Baldwin Date: Thu, 13 Aug 2009 17:51:26 +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: r196197 - in stable/7/sys: . contrib/pf fs/unionfs 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, 13 Aug 2009 17:51:27 -0000 Author: jhb Date: Thu Aug 13 17:51:26 2009 New Revision: 196197 URL: http://svn.freebsd.org/changeset/base/196197 Log: MFC: Fix some LORs between vnode locks and filedescriptor table locks. - Don't grab the filedesc lock just to read fd_cmask. - Drop vnode locks earlier when mounting the root filesystem and before sanitizing stdin/out/err file descriptors during execve(). Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/fs/unionfs/union_subr.c stable/7/sys/kern/kern_exec.c stable/7/sys/kern/vfs_mount.c stable/7/sys/kern/vfs_syscalls.c Modified: stable/7/sys/fs/unionfs/union_subr.c ============================================================================== --- stable/7/sys/fs/unionfs/union_subr.c Thu Aug 13 17:09:45 2009 (r196196) +++ stable/7/sys/fs/unionfs/union_subr.c Thu Aug 13 17:51:26 2009 (r196197) @@ -488,9 +488,7 @@ unionfs_create_uppervattr_core(struct un } break; default: /* UNIONFS_TRADITIONAL */ - FILEDESC_SLOCK(td->td_proc->p_fd); uva->va_mode = 0777 & ~td->td_proc->p_fd->fd_cmask; - FILEDESC_SUNLOCK(td->td_proc->p_fd); uva->va_uid = ump->um_uid; uva->va_gid = ump->um_gid; break; Modified: stable/7/sys/kern/kern_exec.c ============================================================================== --- stable/7/sys/kern/kern_exec.c Thu Aug 13 17:09:45 2009 (r196196) +++ stable/7/sys/kern/kern_exec.c Thu Aug 13 17:51:26 2009 (r196197) @@ -615,8 +615,8 @@ interpret: * allocate memory, so temporarily drop the process lock. */ PROC_UNLOCK(p); - setugidsafety(td); VOP_UNLOCK(imgp->vp, 0, td); + setugidsafety(td); error = fdcheckstd(td); vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY, td); if (error != 0) Modified: stable/7/sys/kern/vfs_mount.c ============================================================================== --- stable/7/sys/kern/vfs_mount.c Thu Aug 13 17:09:45 2009 (r196196) +++ stable/7/sys/kern/vfs_mount.c Thu Aug 13 17:51:26 2009 (r196197) @@ -1083,9 +1083,10 @@ vfs_domount( vfs_event_signal(NULL, VQ_MOUNT, 0); if (VFS_ROOT(mp, LK_EXCLUSIVE, &newdp, td)) panic("mount: lost mount"); - mountcheckdirs(vp, newdp); - vput(newdp); + VOP_UNLOCK(newdp, 0, td); VOP_UNLOCK(vp, 0, td); + mountcheckdirs(vp, newdp); + vrele(newdp); if ((mp->mnt_flag & MNT_RDONLY) == 0) error = vfs_allocate_syncvnode(mp); vfs_unbusy(mp, td); @@ -1468,8 +1469,10 @@ set_rootvnode(struct thread *td) if (VFS_ROOT(TAILQ_FIRST(&mountlist), LK_EXCLUSIVE, &rootvnode, td)) panic("Cannot find root vnode"); + VOP_UNLOCK(rootvnode, 0, td); + p = td->td_proc; - FILEDESC_SLOCK(p->p_fd); + FILEDESC_XLOCK(p->p_fd); if (p->p_fd->fd_cdir != NULL) vrele(p->p_fd->fd_cdir); @@ -1481,9 +1484,7 @@ set_rootvnode(struct thread *td) p->p_fd->fd_rdir = rootvnode; VREF(rootvnode); - FILEDESC_SUNLOCK(p->p_fd); - - VOP_UNLOCK(rootvnode, 0, td); + FILEDESC_XUNLOCK(p->p_fd); } /* Modified: stable/7/sys/kern/vfs_syscalls.c ============================================================================== --- stable/7/sys/kern/vfs_syscalls.c Thu Aug 13 17:09:45 2009 (r196196) +++ stable/7/sys/kern/vfs_syscalls.c Thu Aug 13 17:51:26 2009 (r196197) @@ -1238,10 +1238,8 @@ restart: return (EEXIST); } else { VATTR_NULL(&vattr); - FILEDESC_SLOCK(td->td_proc->p_fd); vattr.va_mode = (mode & ALLPERMS) & ~td->td_proc->p_fd->fd_cmask; - FILEDESC_SUNLOCK(td->td_proc->p_fd); vattr.va_rdev = dev; whiteout = 0; @@ -1351,9 +1349,7 @@ restart: } VATTR_NULL(&vattr); vattr.va_type = VFIFO; - FILEDESC_SLOCK(td->td_proc->p_fd); vattr.va_mode = (mode & ALLPERMS) & ~td->td_proc->p_fd->fd_cmask; - FILEDESC_SUNLOCK(td->td_proc->p_fd); #ifdef MAC error = mac_check_vnode_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, &vattr); @@ -1564,9 +1560,7 @@ restart: goto restart; } VATTR_NULL(&vattr); - FILEDESC_SLOCK(td->td_proc->p_fd); vattr.va_mode = ACCESSPERMS &~ td->td_proc->p_fd->fd_cmask; - FILEDESC_SUNLOCK(td->td_proc->p_fd); #ifdef MAC vattr.va_type = VLNK; error = mac_check_vnode_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, @@ -3502,9 +3496,7 @@ restart: } VATTR_NULL(&vattr); vattr.va_type = VDIR; - FILEDESC_SLOCK(td->td_proc->p_fd); vattr.va_mode = (mode & ACCESSPERMS) &~ td->td_proc->p_fd->fd_cmask; - FILEDESC_SUNLOCK(td->td_proc->p_fd); #ifdef MAC error = mac_check_vnode_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, &vattr); From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 17:54:12 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 938781065673; Thu, 13 Aug 2009 17:54:12 +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 7E40D8FC55; Thu, 13 Aug 2009 17:54:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DHsCP0008734; Thu, 13 Aug 2009 17:54:12 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DHsCvJ008700; Thu, 13 Aug 2009 17:54:12 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200908131754.n7DHsCvJ008700@svn.freebsd.org> From: Attilio Rao Date: Thu, 13 Aug 2009 17:54: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: r196198 - in stable/8: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/conf sys/i386/conf sys/i386/i386 sys/i386/include sys/i386/xen sys/ia64/ia64 sys/ia64/include sys/kern sys/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 17:54:13 -0000 Author: attilio Date: Thu Aug 13 17:54:11 2009 New Revision: 196198 URL: http://svn.freebsd.org/changeset/base/196198 Log: MFC r196196: * Completely remove the option STOP_NMI from the kernel. This option has proven to have a good effect when entering KDB by using a NMI, but it completely violates all the good rules about interrupts disabled while holding a spinlock in other occasions. This can be the cause of deadlocks on events where a normal IPI_STOP is expected. * Add an new IPI called IPI_STOP_HARD on all the supported architectures. This IPI is responsible for sending a stop message among CPUs using a privileged channel when disponible. In other cases it just does match a normal IPI_STOP. Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64 architectures, while on the other has a normal IPI_STOP effect. It is responsibility of maintainers to eventually implement an hard stop when necessary and possible. * Use the new IPI facility in order to implement a new userend SMP kernel function called stop_cpus_hard(). That is specular to stop_cpu() but it does use the privileged channel for the stopping facility. * Let KDB use the newly introduced function stop_cpus_hard() and leave stop_cpus() for all the other cases * Disable interrupts on CPU0 when starting the process of APs suspension. * Style cleanup and comments adding This patch should fix the reboot/shutdown deadlocks many users are constantly reporting on mailing lists. Please don't forget to update your config file with the STOP_NMI option removal Reviewed by: jhb Tested by: pho, bz, rink Approved by: re (kib) Modified: stable/8/UPDATING (contents, props changed) stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/amd64/mp_machdep.c stable/8/sys/amd64/amd64/trap.c stable/8/sys/amd64/conf/GENERIC stable/8/sys/amd64/conf/NOTES stable/8/sys/amd64/conf/XENHVM stable/8/sys/amd64/include/apicvar.h stable/8/sys/amd64/include/smp.h stable/8/sys/conf/options.amd64 stable/8/sys/conf/options.i386 stable/8/sys/conf/options.pc98 stable/8/sys/i386/conf/GENERIC stable/8/sys/i386/conf/NOTES stable/8/sys/i386/i386/local_apic.c stable/8/sys/i386/i386/mp_machdep.c stable/8/sys/i386/i386/trap.c stable/8/sys/i386/include/apicvar.h stable/8/sys/i386/include/smp.h stable/8/sys/i386/xen/mp_machdep.c stable/8/sys/ia64/ia64/interrupt.c stable/8/sys/ia64/include/smp.h stable/8/sys/kern/kern_shutdown.c stable/8/sys/kern/subr_kdb.c stable/8/sys/kern/subr_smp.c stable/8/sys/mips/include/smp.h stable/8/sys/mips/mips/mp_machdep.c stable/8/sys/pc98/conf/NOTES stable/8/sys/powerpc/include/smp.h stable/8/sys/powerpc/powerpc/mp_machdep.c stable/8/sys/sparc64/include/smp.h stable/8/sys/sun4v/include/smp.h stable/8/sys/sys/smp.h Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/UPDATING Thu Aug 13 17:54:11 2009 (r196198) @@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090813: + Remove the option STOP_NMI. The default action is now to use NMI + only for KDB via the newly introduced function stop_cpus_hard() + and maintain stop_cpus() to just use a normal IPI_STOP on ia32 + and amd64. + 20090803: RELENG_8 branched. Modified: stable/8/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/amd64/local_apic.c Thu Aug 13 17:54:11 2009 (r196198) @@ -1238,8 +1238,17 @@ lapic_ipi_vectored(u_int vector, int des KASSERT((vector & ~APIC_VECTOR_MASK) == 0, ("%s: invalid vector %d", __func__, vector)); - icrlo = vector | APIC_DELMODE_FIXED | APIC_DESTMODE_PHY | - APIC_LEVEL_DEASSERT | APIC_TRIGMOD_EDGE; + icrlo = APIC_DESTMODE_PHY | APIC_TRIGMOD_EDGE; + + /* + * IPI_STOP_HARD is just a "fake" vector used to send a NMI. + * Use special rules regard NMI if passed, otherwise specify + * the vector. + */ + if (vector == IPI_STOP_HARD) + icrlo |= APIC_DELMODE_NMI | APIC_LEVEL_ASSERT; + else + icrlo |= vector | APIC_DELMODE_FIXED | APIC_LEVEL_DEASSERT; destfield = 0; switch (dest) { case APIC_IPI_DEST_SELF: Modified: stable/8/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/amd64/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -114,31 +114,12 @@ volatile int smp_tlb_wait; extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); -#ifdef STOP_NMI -static volatile cpumask_t ipi_nmi_pending; - -static void ipi_nmi_selected(cpumask_t cpus); -#endif - /* * Local data and functions. */ -#ifdef STOP_NMI -/* - * Provide an alternate method of stopping other CPUs. If another CPU has - * disabled interrupts the conventional STOP IPI will be blocked. This - * NMI-based stop should get through in that case. - */ -static int stop_cpus_with_nmi = 1; -SYSCTL_INT(_debug, OID_AUTO, stop_cpus_with_nmi, CTLTYPE_INT | CTLFLAG_RW, - &stop_cpus_with_nmi, 0, ""); -TUNABLE_INT("debug.stop_cpus_with_nmi", &stop_cpus_with_nmi); -#else -#define stop_cpus_with_nmi 0 -#endif - static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1158,12 +1139,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } -#ifdef STOP_NMI - if (ipi == IPI_STOP && stop_cpus_with_nmi) { - ipi_nmi_selected(cpus); - return; - } -#endif + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1194,64 +1177,43 @@ void ipi_all_but_self(u_int ipi) { - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { + if (IPI_IS_BITMAPED(ipi)) { ipi_selected(PCPU_GET(other_cpus), ipi); return; } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); -} -#ifdef STOP_NMI -/* - * send NMI IPI to selected CPUs - */ - -#define BEFORE_SPIN 1000000 - -static void -ipi_nmi_selected(cpumask_t cpus) -{ - int cpu; - register_t icrlo; - - icrlo = APIC_DELMODE_NMI | APIC_DESTMODE_PHY | APIC_LEVEL_ASSERT - | APIC_TRIGMOD_EDGE; - - CTR2(KTR_SMP, "%s: cpus: %x nmi", __func__, cpus); - - atomic_set_int(&ipi_nmi_pending, cpus); - - while ((cpu = ffs(cpus)) != 0) { - cpu--; - cpus &= ~(1 << cpu); - - KASSERT(cpu_apic_ids[cpu] != -1, - ("IPI NMI to non-existent CPU %d", cpu)); - - /* Wait for an earlier IPI to finish. */ - if (!lapic_ipi_wait(BEFORE_SPIN)) - panic("ipi_nmi_selected: previous IPI has not cleared"); + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); - lapic_ipi_raw(icrlo, cpu_apic_ids[cpu]); - } + CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); + lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } int -ipi_nmi_handler(void) +ipi_nmi_handler() { - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; - if (!(ipi_nmi_pending & cpumask)) - return 1; + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); atomic_clear_int(&ipi_nmi_pending, cpumask); cpustop_handler(); - return 0; + return (0); } -#endif /* STOP_NMI */ - /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/amd64/trap.c Thu Aug 13 17:54:11 2009 (r196198) @@ -239,13 +239,11 @@ trap(struct trapframe *frame) type = frame->tf_trapno; #ifdef SMP -#ifdef STOP_NMI /* Handler for NMI IPIs used for stopping CPUs. */ if (type == T_NMI) { if (ipi_nmi_handler() == 0) goto out; } -#endif /* STOP_NMI */ #endif /* SMP */ #ifdef KDB Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/conf/GENERIC Thu Aug 13 17:54:11 2009 (r196198) @@ -69,7 +69,6 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework Modified: stable/8/sys/amd64/conf/NOTES ============================================================================== --- stable/8/sys/amd64/conf/NOTES Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/conf/NOTES Thu Aug 13 17:54:11 2009 (r196198) @@ -30,11 +30,6 @@ device mptable # Optional MPSPEC mpta # options MP_WATCHDOG -# -# Debugging options. -# -options STOP_NMI # Stop CPUS using NMI instead of IPI - ##################################################################### Modified: stable/8/sys/amd64/conf/XENHVM ============================================================================== --- stable/8/sys/amd64/conf/XENHVM Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/conf/XENHVM Thu Aug 13 17:54:11 2009 (r196198) @@ -68,7 +68,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing #options KDTRACE_FRAME # Ensure frames are compiled in Modified: stable/8/sys/amd64/include/apicvar.h ============================================================================== --- stable/8/sys/amd64/include/apicvar.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/include/apicvar.h Thu Aug 13 17:54:11 2009 (r196198) @@ -102,11 +102,6 @@ * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user * at a time) The second group uses a single interrupt and a bitmap to avoid * redundant IPI interrupts. - * - * Right now IPI_STOP used by kdb shares the interrupt priority class with - * the two IPI groups mentioned above. As such IPI_STOP may cause a deadlock. - * Eventually IPI_STOP should use NMI IPIs - this would eliminate this and - * other deadlocks caused by IPI_STOP. */ /* Interrupts for local APIC LVT entries other than the timer. */ @@ -134,6 +129,7 @@ #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ #define IPI_SUSPEND (APIC_IPI_INTS + 8) /* Suspend CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 9) /* Stop CPU with a NMI. */ /* * The spurious interrupt can share the priority class with the IPIs since Modified: stable/8/sys/amd64/include/smp.h ============================================================================== --- stable/8/sys/amd64/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -52,6 +52,7 @@ void cpu_add(u_int apic_id, char boot_cp void cpustop_handler(void); void cpususpend_handler(void); void init_secondary(void); +int ipi_nmi_handler(void); void ipi_selected(cpumask_t cpus, u_int ipi); void ipi_all_but_self(u_int ipi); void ipi_bitmap_handler(struct trapframe frame); @@ -66,10 +67,6 @@ void smp_masked_invlpg_range(cpumask_t m void smp_invltlb(void); void smp_masked_invltlb(cpumask_t mask); -#ifdef STOP_NMI -int ipi_nmi_handler(void); -#endif - #endif /* !LOCORE */ #endif /* SMP */ Modified: stable/8/sys/conf/options.amd64 ============================================================================== --- stable/8/sys/conf/options.amd64 Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/conf/options.amd64 Thu Aug 13 17:54:11 2009 (r196198) @@ -52,7 +52,6 @@ PSM_DEBUG opt_psm.h DEV_ATPIC opt_atpic.h # Debugging -STOP_NMI opt_cpu.h KDTRACE_FRAME opt_kdtrace.h # BPF just-in-time compiler Modified: stable/8/sys/conf/options.i386 ============================================================================== --- stable/8/sys/conf/options.i386 Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/conf/options.i386 Thu Aug 13 17:54:11 2009 (r196198) @@ -110,7 +110,6 @@ ASR_COMPAT opt_asr.h # Debugging NPX_DEBUG opt_npx.h -STOP_NMI opt_cpu.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h Modified: stable/8/sys/conf/options.pc98 ============================================================================== --- stable/8/sys/conf/options.pc98 Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/conf/options.pc98 Thu Aug 13 17:54:11 2009 (r196198) @@ -95,7 +95,6 @@ DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h -STOP_NMI opt_cpu.h AGP_DEBUG opt_agp.h # BPF just-in-time compiler Modified: stable/8/sys/i386/conf/GENERIC ============================================================================== --- stable/8/sys/i386/conf/GENERIC Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/conf/GENERIC Thu Aug 13 17:54:11 2009 (r196198) @@ -70,7 +70,6 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework Modified: stable/8/sys/i386/conf/NOTES ============================================================================== --- stable/8/sys/i386/conf/NOTES Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/conf/NOTES Thu Aug 13 17:54:11 2009 (r196198) @@ -49,7 +49,6 @@ options MP_WATCHDOG # Debugging options. # -options STOP_NMI # Stop CPUS using NMI instead of IPI options COUNT_XINVLTLB_HITS # Counters for TLB events options COUNT_IPIS # Per-CPU IPI interrupt counters Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/i386/local_apic.c Thu Aug 13 17:54:11 2009 (r196198) @@ -1248,8 +1248,17 @@ lapic_ipi_vectored(u_int vector, int des KASSERT((vector & ~APIC_VECTOR_MASK) == 0, ("%s: invalid vector %d", __func__, vector)); - icrlo = vector | APIC_DELMODE_FIXED | APIC_DESTMODE_PHY | - APIC_LEVEL_DEASSERT | APIC_TRIGMOD_EDGE; + icrlo = APIC_DESTMODE_PHY | APIC_TRIGMOD_EDGE; + + /* + * IPI_STOP_HARD is just a "fake" vector used to send a NMI. + * Use special rules regard NMI if passed, otherwise specify + * the vector. + */ + if (vector == IPI_STOP_HARD) + icrlo |= APIC_DELMODE_NMI | APIC_LEVEL_ASSERT; + else + icrlo |= vector | APIC_DELMODE_FIXED | APIC_LEVEL_DEASSERT; destfield = 0; switch (dest) { case APIC_IPI_DEST_SELF: Modified: stable/8/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/8/sys/i386/i386/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/i386/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -155,12 +155,6 @@ vm_offset_t smp_tlb_addr1; vm_offset_t smp_tlb_addr2; volatile int smp_tlb_wait; -#ifdef STOP_NMI -static volatile cpumask_t ipi_nmi_pending; - -static void ipi_nmi_selected(cpumask_t cpus); -#endif - #ifdef COUNT_IPIS /* Interrupt counts. */ static u_long *ipi_preempt_counts[MAXCPU]; @@ -177,21 +171,8 @@ u_long *ipi_lazypmap_counts[MAXCPU]; * Local data and functions. */ -#ifdef STOP_NMI -/* - * Provide an alternate method of stopping other CPUs. If another CPU has - * disabled interrupts the conventional STOP IPI will be blocked. This - * NMI-based stop should get through in that case. - */ -static int stop_cpus_with_nmi = 1; -SYSCTL_INT(_debug, OID_AUTO, stop_cpus_with_nmi, CTLTYPE_INT | CTLFLAG_RW, - &stop_cpus_with_nmi, 0, ""); -TUNABLE_INT("debug.stop_cpus_with_nmi", &stop_cpus_with_nmi); -#else -#define stop_cpus_with_nmi 0 -#endif - static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1318,12 +1299,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } -#ifdef STOP_NMI - if (ipi == IPI_STOP && stop_cpus_with_nmi) { - ipi_nmi_selected(cpus); - return; - } -#endif + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1354,64 +1337,42 @@ void ipi_all_but_self(u_int ipi) { - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { + if (IPI_IS_BITMAPED(ipi)) { ipi_selected(PCPU_GET(other_cpus), ipi); return; } + + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } -#ifdef STOP_NMI -/* - * send NMI IPI to selected CPUs - */ - -#define BEFORE_SPIN 1000000 - -void -ipi_nmi_selected(cpumask_t cpus) -{ - int cpu; - register_t icrlo; - - icrlo = APIC_DELMODE_NMI | APIC_DESTMODE_PHY | APIC_LEVEL_ASSERT - | APIC_TRIGMOD_EDGE; - - CTR2(KTR_SMP, "%s: cpus: %x nmi", __func__, cpus); - - atomic_set_int(&ipi_nmi_pending, cpus); - - while ((cpu = ffs(cpus)) != 0) { - cpu--; - cpus &= ~(1 << cpu); - - KASSERT(cpu_apic_ids[cpu] != -1, - ("IPI NMI to non-existent CPU %d", cpu)); - - /* Wait for an earlier IPI to finish. */ - if (!lapic_ipi_wait(BEFORE_SPIN)) - panic("ipi_nmi_selected: previous IPI has not cleared"); - - lapic_ipi_raw(icrlo, cpu_apic_ids[cpu]); - } -} - int -ipi_nmi_handler(void) +ipi_nmi_handler() { - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; - if (!(ipi_nmi_pending & cpumask)) - return 1; + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); atomic_clear_int(&ipi_nmi_pending, cpumask); cpustop_handler(); - return 0; + return (0); } -#endif /* STOP_NMI */ - /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. Modified: stable/8/sys/i386/i386/trap.c ============================================================================== --- stable/8/sys/i386/i386/trap.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/i386/trap.c Thu Aug 13 17:54:11 2009 (r196198) @@ -211,13 +211,11 @@ trap(struct trapframe *frame) type = frame->tf_trapno; #ifdef SMP -#ifdef STOP_NMI /* Handler for NMI IPIs used for stopping CPUs. */ if (type == T_NMI) { if (ipi_nmi_handler() == 0) goto out; } -#endif /* STOP_NMI */ #endif /* SMP */ #ifdef KDB Modified: stable/8/sys/i386/include/apicvar.h ============================================================================== --- stable/8/sys/i386/include/apicvar.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/include/apicvar.h Thu Aug 13 17:54:11 2009 (r196198) @@ -100,11 +100,6 @@ * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user * at a time) The second group uses a single interrupt and a bitmap to avoid * redundant IPI interrupts. - * - * Right now IPI_STOP used by kdb shares the interrupt priority class with - * the two IPI groups mentioned above. As such IPI_STOP may cause a deadlock. - * Eventually IPI_STOP should use NMI IPIs - this would eliminate this and - * other deadlocks caused by IPI_STOP. */ /* Interrupts for local APIC LVT entries other than the timer. */ @@ -134,6 +129,7 @@ #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ #else /* XEN */ /* These are the normal i386 APIC definitions */ @@ -161,6 +157,7 @@ #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ #endif /* XEN */ /* Modified: stable/8/sys/i386/include/smp.h ============================================================================== --- stable/8/sys/i386/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -60,7 +60,8 @@ inthand_t void cpu_add(u_int apic_id, char boot_cpu); void cpustop_handler(void); void init_secondary(void); -void ipi_selected(u_int cpus, u_int ipi); +int ipi_nmi_handler(void); +void ipi_selected(cpumask_t cpus, u_int ipi); void ipi_all_but_self(u_int ipi); #ifndef XEN void ipi_bitmap_handler(struct trapframe frame); @@ -76,9 +77,6 @@ void smp_masked_invlpg_range(cpumask_t m void smp_invltlb(void); void smp_masked_invltlb(cpumask_t mask); -#ifdef STOP_NMI -int ipi_nmi_handler(void); -#endif #ifdef XEN void ipi_to_irq_init(void); Modified: stable/8/sys/i386/xen/mp_machdep.c ============================================================================== --- stable/8/sys/i386/xen/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/xen/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -90,8 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define stop_cpus_with_nmi 0 - int mp_naps; /* # of Applications processors */ int boot_cpu_id = -1; /* designated BSP */ Modified: stable/8/sys/ia64/ia64/interrupt.c ============================================================================== --- stable/8/sys/ia64/ia64/interrupt.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/ia64/ia64/interrupt.c Thu Aug 13 17:54:11 2009 (r196198) @@ -145,6 +145,8 @@ interrupt(struct trapframe *tf) /* * Handle ExtINT interrupts by generating an INTA cycle to * read the vector. + * IPI_STOP_HARD is mapped to IPI_STOP so it is not necessary + * to add it to this switch-like construct. */ if (vector == 0) { inta = ib->ib_inta; Modified: stable/8/sys/ia64/include/smp.h ============================================================================== --- stable/8/sys/ia64/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/ia64/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -21,6 +21,7 @@ #define IPI_AST 4 #define IPI_RENDEZVOUS 5 #define IPI_STOP 6 +#define IPI_STOP_HARD 6 #define IPI_PREEMPT 7 #define IPI_COUNT 8 Modified: stable/8/sys/kern/kern_shutdown.c ============================================================================== --- stable/8/sys/kern/kern_shutdown.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/kern/kern_shutdown.c Thu Aug 13 17:54:11 2009 (r196198) @@ -412,9 +412,6 @@ boot(int howto) */ EVENTHANDLER_INVOKE(shutdown_post_sync, howto); - /* XXX This doesn't disable interrupts any more. Reconsider? */ - splhigh(); - if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold && !dumping) doadump(); @@ -488,6 +485,13 @@ static void shutdown_reset(void *junk, int howto) { + /* + * Disable interrupts on CPU0 in order to avoid fast handlers + * to preempt the stopping process and to deadlock against other + * CPUs. + */ + spinlock_enter(); + printf("Rebooting...\n"); DELAY(1000000); /* wait 1 sec for printf's to complete and be read */ /* cpu_boot(howto); */ /* doesn't do anything at the moment */ Modified: stable/8/sys/kern/subr_kdb.c ============================================================================== --- stable/8/sys/kern/subr_kdb.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/kern/subr_kdb.c Thu Aug 13 17:54:11 2009 (r196198) @@ -88,7 +88,8 @@ SYSCTL_PROC(_debug_kdb, OID_AUTO, trap_c * Flag indicating whether or not to IPI the other CPUs to stop them on * entering the debugger. Sometimes, this will result in a deadlock as * stop_cpus() waits for the other cpus to stop, so we allow it to be - * disabled. + * disabled. In order to maximize the chances of success, use a hard + * stop for that. */ #ifdef SMP static int kdb_stop_cpus = 1; @@ -226,7 +227,7 @@ kdb_panic(const char *msg) { #ifdef SMP - stop_cpus(PCPU_GET(other_cpus)); + stop_cpus_hard(PCPU_GET(other_cpus)); #endif printf("KDB: panic\n"); panic(msg); @@ -518,7 +519,7 @@ kdb_trap(int type, int code, struct trap #ifdef SMP if ((did_stop_cpus = kdb_stop_cpus) != 0) - stop_cpus(PCPU_GET(other_cpus)); + stop_cpus_hard(PCPU_GET(other_cpus)); #endif kdb_active++; Modified: stable/8/sys/kern/subr_smp.c ============================================================================== --- stable/8/sys/kern/subr_smp.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/kern/subr_smp.c Thu Aug 13 17:54:11 2009 (r196198) @@ -233,18 +233,21 @@ forward_roundrobin(void) * XXX FIXME: this is not MP-safe, needs a lock to prevent multiple CPUs * from executing at same time. */ -int -stop_cpus(cpumask_t map) +static int +generic_stop_cpus(cpumask_t map, u_int type) { int i; + KASSERT(type == IPI_STOP || type == IPI_STOP_HARD, + ("%s: invalid stop type", __func__)); + if (!smp_started) return 0; - CTR1(KTR_SMP, "stop_cpus(%x)", map); + CTR2(KTR_SMP, "stop_cpus(%x) with %u type", map, type); /* send the stop IPI to all CPUs in map */ - ipi_selected(map, IPI_STOP); + ipi_selected(map, type); i = 0; while ((stopped_cpus & map) != map) { @@ -262,6 +265,20 @@ stop_cpus(cpumask_t map) return 1; } +int +stop_cpus(cpumask_t map) +{ + + return (generic_stop_cpus(map, IPI_STOP)); +} + +int +stop_cpus_hard(cpumask_t map) +{ + + return (generic_stop_cpus(map, IPI_STOP_HARD)); +} + #if defined(__amd64__) /* * When called the executing CPU will send an IPI to all other CPUs Modified: stable/8/sys/mips/include/smp.h ============================================================================== --- stable/8/sys/mips/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/mips/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -24,6 +24,7 @@ #define IPI_RENDEZVOUS 0x0002 #define IPI_AST 0x0004 #define IPI_STOP 0x0008 +#define IPI_STOP_HARD 0x0008 #ifndef LOCORE Modified: stable/8/sys/mips/mips/mp_machdep.c ============================================================================== --- stable/8/sys/mips/mips/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/mips/mips/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -129,7 +129,12 @@ smp_handle_ipi(struct trapframe *frame) break; case IPI_STOP: - CTR0(KTR_SMP, "IPI_STOP"); + + /* + * IPI_STOP_HARD is mapped to IPI_STOP so it is not + * necessary to add it in the switch. + */ + CTR0(KTR_SMP, "IPI_STOP or IPI_STOP_HARD"); atomic_set_int(&stopped_cpus, cpumask); while ((started_cpus & cpumask) == 0) Modified: stable/8/sys/pc98/conf/NOTES ============================================================================== --- stable/8/sys/pc98/conf/NOTES Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/pc98/conf/NOTES Thu Aug 13 17:54:11 2009 (r196198) @@ -29,10 +29,6 @@ device apic # I/O apic # options MP_WATCHDOG -# Debugging options. -# -options STOP_NMI # Stop CPUS using NMI instead of IPI - ##################################################################### Modified: stable/8/sys/powerpc/include/smp.h ============================================================================== --- stable/8/sys/powerpc/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/powerpc/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -35,6 +35,7 @@ #define IPI_PREEMPT 1 #define IPI_RENDEZVOUS 2 #define IPI_STOP 3 +#define IPI_STOP_HARD 3 #ifndef LOCORE Modified: stable/8/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- stable/8/sys/powerpc/powerpc/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/powerpc/powerpc/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -281,7 +281,13 @@ powerpc_ipi_handler(void *arg) smp_rendezvous_action(); break; case IPI_STOP: - CTR1(KTR_SMP, "%s: IPI_STOP (stop)", __func__); + + /* + * IPI_STOP_HARD is mapped to IPI_STOP so it is not + * necessary to add such case in the switch. + */ + CTR1(KTR_SMP, "%s: IPI_STOP or IPI_STOP_HARD (stop)", + __func__); self = PCPU_GET(cpumask); savectx(PCPU_GET(curpcb)); atomic_set_int(&stopped_cpus, self); Modified: stable/8/sys/sparc64/include/smp.h ============================================================================== --- stable/8/sys/sparc64/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/sparc64/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -56,6 +56,7 @@ #define IPI_RENDEZVOUS PIL_RENDEZVOUS #define IPI_PREEMPT PIL_PREEMPT #define IPI_STOP PIL_STOP +#define IPI_STOP_HARD PIL_STOP #define IPI_RETRIES 5000 Modified: stable/8/sys/sun4v/include/smp.h ============================================================================== --- stable/8/sys/sun4v/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/sun4v/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -44,6 +44,7 @@ #define IPI_AST PIL_AST #define IPI_RENDEZVOUS PIL_RENDEZVOUS #define IPI_STOP PIL_STOP +#define IPI_STOP_HARD PIL_STOP #define IPI_PREEMPT PIL_PREEMPT Modified: stable/8/sys/sys/smp.h ============================================================================== --- stable/8/sys/sys/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/sys/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -123,6 +123,7 @@ void forward_signal(struct thread *); void forward_roundrobin(void); int restart_cpus(cpumask_t); int stop_cpus(cpumask_t); +int stop_cpus_hard(cpumask_t); #if defined(__amd64__) int suspend_cpus(cpumask_t); #endif From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 22:49:14 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3296106568E for ; Thu, 13 Aug 2009 22:49:14 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 736C98FC16 for ; Thu, 13 Aug 2009 22:49:14 +0000 (UTC) Received: (qmail 16003 invoked by uid 399); 13 Aug 2009 22:22:33 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 13 Aug 2009 22:22:33 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A849222.3090004@FreeBSD.org> Date: Thu, 13 Aug 2009 15:22:26 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.22 (X11/20090729) MIME-Version: 1.0 To: Robert Noland References: <200908130820.n7D8KCgt093511@svn.freebsd.org> <1250160126.1823.11.camel@balrog.2hip.net> In-Reply-To: <1250160126.1823.11.camel@balrog.2hip.net> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB 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-7@freebsd.org, Nick Hibma Subject: Re: svn commit: r196169 - 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: Thu, 13 Aug 2009 22:49:15 -0000 Robert Noland wrote: > On Thu, 2009-08-13 at 08:20 +0000, Nick Hibma wrote: >> Author: n_hibma >> Date: Thu Aug 13 08:20:12 2009 >> New Revision: 196169 >> URL: http://svn.freebsd.org/changeset/base/196169 >> >> Log: >> Hide aperture size and stolen memory behind bootverbose. > > Why? This information can be useful and doesn't need to be buried in > the verbose boot log. Useful to developers maybe, but not to the average user. Personally I'd like to see most of what we print at boot time hidden behind bootverbose, but that's just me. Doug -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 23:09:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 142FC106568E; Thu, 13 Aug 2009 23:09:32 +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 C908D8FC3A; Thu, 13 Aug 2009 23:09:31 +0000 (UTC) Received: from [192.168.1.4] (adsl-157-61-83.bna.bellsouth.net [70.157.61.83]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n7DN9TSf091369 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Aug 2009 19:09:30 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Doug Barton In-Reply-To: <4A849222.3090004@FreeBSD.org> References: <200908130820.n7D8KCgt093511@svn.freebsd.org> <1250160126.1823.11.camel@balrog.2hip.net> <4A849222.3090004@FreeBSD.org> Content-Type: text/plain Organization: FreeBSD Date: Thu, 13 Aug 2009 18:09:24 -0500 Message-Id: <1250204964.33905.7.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RDNS_DYNAMIC,SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, Nick Hibma Subject: Re: svn commit: r196169 - 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: Thu, 13 Aug 2009 23:09:32 -0000 On Thu, 2009-08-13 at 15:22 -0700, Doug Barton wrote: > Robert Noland wrote: > > On Thu, 2009-08-13 at 08:20 +0000, Nick Hibma wrote: > >> Author: n_hibma > >> Date: Thu Aug 13 08:20:12 2009 > >> New Revision: 196169 > >> URL: http://svn.freebsd.org/changeset/base/196169 > >> > >> Log: > >> Hide aperture size and stolen memory behind bootverbose. > > > > Why? This information can be useful and doesn't need to be buried in > > the verbose boot log. > > Useful to developers maybe, but not to the average user. While it certainly isn't critical information for the user to see, it is informative and not excessively chatty. At any rate this change should not have been made directly to 7. If people want to discuss this for HEAD, I will argue there... robert. > Personally I'd like to see most of what we print at boot time hidden > behind bootverbose, but that's just me. > > > Doug > -- Robert Noland FreeBSD From owner-svn-src-all@FreeBSD.ORG Thu Aug 13 23:18:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A211106568B; Thu, 13 Aug 2009 23:18:46 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 075288FC5D; Thu, 13 Aug 2009 23: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 n7DNIk3a015605; Thu, 13 Aug 2009 23:18:46 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DNIjvO015601; Thu, 13 Aug 2009 23:18:45 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <200908132318.n7DNIjvO015601@svn.freebsd.org> From: Scott Long Date: Thu, 13 Aug 2009 23:18: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: r196200 - in head: etc/mtree include sys/dev/mfi usr.sbin usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Aug 2009 23:18:46 -0000 Author: scottl Date: Thu Aug 13 23:18:45 2009 New Revision: 196200 URL: http://svn.freebsd.org/changeset/base/196200 Log: ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6 controllers. Controller, array, and drive status can be checked, basic attributes can be changed, and arrays and spares can be created and deleted. Controller firmware can also be flashed. This does not replace MegaCLI, found in ports, as that is officially sanctioned and supported by LSI and includes vastly more functionality. However, mfiutil is open source and guaranteed to provide basic functionality, which can be especially useful if you have a problem and can't get MegaCLI to work. Approved by: re Obtained from: Yahoo! Inc. Added: head/usr.sbin/mfiutil/ head/usr.sbin/mfiutil/Makefile (contents, props changed) head/usr.sbin/mfiutil/README (contents, props changed) head/usr.sbin/mfiutil/mfi_cmd.c (contents, props changed) head/usr.sbin/mfiutil/mfi_config.c (contents, props changed) head/usr.sbin/mfiutil/mfi_drive.c (contents, props changed) head/usr.sbin/mfiutil/mfi_evt.c (contents, props changed) head/usr.sbin/mfiutil/mfi_flash.c (contents, props changed) head/usr.sbin/mfiutil/mfi_patrol.c (contents, props changed) head/usr.sbin/mfiutil/mfi_show.c (contents, props changed) head/usr.sbin/mfiutil/mfi_volume.c (contents, props changed) head/usr.sbin/mfiutil/mfiutil.1 (contents, props changed) head/usr.sbin/mfiutil/mfiutil.c (contents, props changed) head/usr.sbin/mfiutil/mfiutil.h (contents, props changed) Modified: head/etc/mtree/BSD.include.dist head/include/Makefile head/sys/dev/mfi/mfi_ioctl.h head/sys/dev/mfi/mfireg.h head/usr.sbin/Makefile Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Thu Aug 13 19:47:13 2009 (r196199) +++ head/etc/mtree/BSD.include.dist Thu Aug 13 23:18:45 2009 (r196200) @@ -104,6 +104,8 @@ .. lmc .. + mfi + .. mpt mpilib .. Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Thu Aug 13 19:47:13 2009 (r196199) +++ head/include/Makefile Thu Aug 13 23:18:45 2009 (r196200) @@ -40,7 +40,7 @@ LDIRS= bsm cam geom net net80211 netatal LSUBDIRS= cam/ata cam/scsi \ dev/acpica dev/an dev/bktr dev/firewire dev/hwpmc \ - dev/ic dev/iicbus ${_dev_ieee488} dev/lmc dev/ofw \ + dev/ic dev/iicbus ${_dev_ieee488} dev/lmc dev/mfi dev/ofw \ dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/fifofs fs/msdosfs fs/nfs fs/ntfs fs/nullfs \ Modified: head/sys/dev/mfi/mfi_ioctl.h ============================================================================== --- head/sys/dev/mfi/mfi_ioctl.h Thu Aug 13 19:47:13 2009 (r196199) +++ head/sys/dev/mfi/mfi_ioctl.h Thu Aug 13 23:18:45 2009 (r196200) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #if defined(__amd64__) /* Assume amd64 wants 32 bit Linux */ struct iovec32 { u_int32_t iov_base; Modified: head/sys/dev/mfi/mfireg.h ============================================================================== --- head/sys/dev/mfi/mfireg.h Thu Aug 13 19:47:13 2009 (r196199) +++ head/sys/dev/mfi/mfireg.h Thu Aug 13 23:18:45 2009 (r196200) @@ -89,7 +89,7 @@ __FBSDID("$FreeBSD$"); #define MFI_ODCR0 0xa0 /* outbound doorbell clear register0 */ #define MFI_OSP0 0xb0 /* outbound scratch pad0 */ #define MFI_1078_EIM 0x80000004 /* 1078 enable intrrupt mask */ -#define MFI_RMI 0x2 /* reply message interrupt */ +#define MFI_RMI 0x2 /* reply message interrupt */ #define MFI_1078_RM 0x80000000 /* reply 1078 message interrupt */ #define MFI_ODC 0x4 /* outbound doorbell change interrupt */ @@ -151,15 +151,41 @@ typedef enum { MFI_DCMD_CTRL_EVENT_GETINFO = 0x01040100, MFI_DCMD_CTRL_EVENT_GET = 0x01040300, MFI_DCMD_CTRL_EVENT_WAIT = 0x01040500, + MFI_DCMD_PR_GET_STATUS = 0x01070100, + MFI_DCMD_PR_GET_PROPERTIES = 0x01070200, + MFI_DCMD_PR_SET_PROPERTIES = 0x01070300, + MFI_DCMD_PR_START = 0x01070400, + MFI_DCMD_PR_STOP = 0x01070500, + MFI_DCMD_TIME_SECS_GET = 0x01080201, + MFI_DCMD_FLASH_FW_OPEN = 0x010f0100, + MFI_DCMD_FLASH_FW_DOWNLOAD = 0x010f0200, + MFI_DCMD_FLASH_FW_FLASH = 0x010f0300, + MFI_DCMD_FLASH_FW_CLOSE = 0x010f0400, + MFI_DCMD_PD_GET_LIST = 0x02010000, + MFI_DCMD_PD_GET_INFO = 0x02020000, + MFI_DCMD_PD_STATE_SET = 0x02030100, + MFI_DCMD_PD_REBUILD_START = 0x02040100, + MFI_DCMD_PD_REBUILD_ABORT = 0x02040200, + MFI_DCMD_PD_CLEAR_START = 0x02050100, + MFI_DCMD_PD_CLEAR_ABORT = 0x02050200, + MFI_DCMD_PD_GET_PROGRESS = 0x02060000, + MFI_DCMD_PD_LOCATE_START = 0x02070100, + MFI_DCMD_PD_LOCATE_STOP = 0x02070200, MFI_DCMD_LD_GET_LIST = 0x03010000, MFI_DCMD_LD_GET_INFO = 0x03020000, MFI_DCMD_LD_GET_PROP = 0x03030000, MFI_DCMD_LD_SET_PROP = 0x03040000, + MFI_DCMD_LD_INIT_START = 0x03060100, MFI_DCMD_LD_DELETE = 0x03090000, MFI_DCMD_CFG_READ = 0x04010000, MFI_DCMD_CFG_ADD = 0x04020000, MFI_DCMD_CFG_CLEAR = 0x04030000, + MFI_DCMD_CFG_MAKE_SPARE = 0x04040000, + MFI_DCMD_CFG_REMOVE_SPARE = 0x04050000, MFI_DCMD_CFG_FOREIGN_IMPORT = 0x04060400, + MFI_DCMD_BBU_GET_STATUS = 0x05010000, + MFI_DCMD_BBU_GET_CAPACITY_INFO =0x05020000, + MFI_DCMD_BBU_GET_DESIGN_INFO = 0x05030000, MFI_DCMD_CLUSTER = 0x08000000, MFI_DCMD_CLUSTER_RESET_ALL = 0x08010100, MFI_DCMD_CLUSTER_RESET_LD = 0x08010200 @@ -245,6 +271,9 @@ typedef enum { MFI_STAT_RESERVATION_IN_PROGRESS, MFI_STAT_I2C_ERRORS_DETECTED, MFI_STAT_PCI_ERRORS_DETECTED, + MFI_STAT_DIAG_FAILED, + MFI_STAT_BOOT_MSG_PENDING, + MFI_STAT_FOREIGN_CONFIG_INCOMPLETE, MFI_STAT_INVALID_STATUS = 0xFF } mfi_status_t; @@ -303,6 +332,17 @@ typedef enum { MR_LD_CACHE_ALLOW_WRITE_CACHE = 0x20, MR_LD_CACHE_ALLOW_READ_CACHE = 0x40 } mfi_ld_cache; +#define MR_LD_CACHE_MASK 0x7f + +#define MR_LD_CACHE_POLICY_READ_AHEAD_NONE 0 +#define MR_LD_CACHE_POLICY_READ_AHEAD_ALWAYS MR_LD_CACHE_READ_AHEAD +#define MR_LD_CACHE_POLICY_READ_AHEAD_ADAPTIVE \ + (MR_LD_CACHE_READ_AHEAD | MR_LD_CACHE_READ_ADAPTIVE) +#define MR_LD_CACHE_POLICY_WRITE_THROUGH 0 +#define MR_LD_CACHE_POLICY_WRITE_BACK MR_LD_CACHE_WRITE_BACK +#define MR_LD_CACHE_POLICY_IO_CACHED \ + (MR_LD_CACHE_ALLOW_WRITE_CACHE | MR_LD_CACHE_ALLOW_READ_CACHE) +#define MR_LD_CACHE_POLICY_IO_DIRECT 0 typedef enum { MR_PD_CACHE_UNCHANGED = 0, @@ -320,6 +360,7 @@ typedef enum { #define MFI_DEFAULT_ID -1 #define MFI_MAX_LUN 8 #define MFI_MAX_LD 64 +#define MFI_MAX_PD 256 #define MFI_FRAME_SIZE 64 #define MFI_MBOX_SIZE 12 @@ -866,12 +907,10 @@ union mfi_pd_ddf_type { } __packed; struct mfi_pd_progress { - struct { - uint32_t rbld : 1; - uint32_t patrol : 1; - uint32_t clear : 1; - uint32_t reserved: 29; - } active; + uint32_t active; +#define MFI_PD_PROGRESS_REBUILD (1<<0) +#define MFI_PD_PROGRESS_PATROL (1<<1) +#define MFI_PD_PROGRESS_CLEAR (1<<2) struct mfi_progress rbld; struct mfi_progress patrol; struct mfi_progress clear; @@ -890,8 +929,8 @@ struct mfi_pd_info { uint32_t other_err_count; uint32_t pred_fail_count; uint32_t last_pred_fail_event_seq_num; - uint16_t fw_state; - uint8_t disable_for_removal; + uint16_t fw_state; /* MFI_PD_STATE_* */ + uint8_t disabled_for_removal; uint8_t link_speed; union mfi_pd_ddf_type state; struct { @@ -918,7 +957,7 @@ struct mfi_pd_address { uint16_t encl_device_id; uint8_t encl_index; uint8_t slot_number; - uint8_t scsi_dev_type; + uint8_t scsi_dev_type; /* 0 = disk */ uint8_t connect_port_bitmap; uint64_t sas_addr[2]; } __packed; @@ -926,12 +965,19 @@ struct mfi_pd_address { struct mfi_pd_list { uint32_t size; uint32_t count; - uint8_t data; - /* - struct mfi_pd_address addr[]; - */ + struct mfi_pd_address addr[0]; } __packed; +enum mfi_pd_state { + MFI_PD_STATE_UNCONFIGURED_GOOD = 0x00, + MFI_PD_STATE_UNCONFIGURED_BAD = 0x01, + MFI_PD_STATE_HOT_SPARE = 0x02, + MFI_PD_STATE_OFFLINE = 0x10, + MFI_PD_STATE_FAILED = 0x11, + MFI_PD_STATE_REBUILD = 0x14, + MFI_PD_STATE_ONLINE = 0x18 +}; + union mfi_ld_ref { struct { uint8_t target_id; @@ -986,6 +1032,9 @@ struct mfi_ld_params { uint8_t span_depth; uint8_t state; uint8_t init_state; +#define MFI_LD_PARAMS_INIT_NO 0 +#define MFI_LD_PARAMS_INIT_QUICK 1 +#define MFI_LD_PARAMS_INIT_FULL 2 uint8_t is_consistent; uint8_t reserved[23]; } __packed; @@ -995,7 +1044,7 @@ struct mfi_ld_progress { #define MFI_LD_PROGRESS_CC (1<<0) #define MFI_LD_PROGRESS_BGI (1<<1) #define MFI_LD_PROGRESS_FGI (1<<2) -#define MFI_LD_PORGRESS_RECON (1<<3) +#define MFI_LD_PROGRESS_RECON (1<<3) struct mfi_progress cc; struct mfi_progress bgi; struct mfi_progress fgi; @@ -1028,26 +1077,18 @@ struct mfi_ld_info { uint8_t reserved2[16]; } __packed; -union mfi_spare_type { - struct { - uint8_t is_dedicate :1; - uint8_t is_revertable :1; - uint8_t is_encl_affinity :1; - uint8_t reserved :5; - } v; - uint8_t type; -} __packed; - #define MAX_ARRAYS 16 struct mfi_spare { union mfi_pd_ref ref; - union mfi_spare_type spare_type; + uint8_t spare_type; +#define MFI_SPARE_DEDICATED (1 << 0) +#define MFI_SPARE_REVERTIBLE (1 << 1) +#define MFI_SPARE_ENCL_AFFINITY (1 << 2) uint8_t reserved[2]; uint8_t array_count; - uint16_t array_refd[MAX_ARRAYS]; + uint16_t array_ref[MAX_ARRAYS]; } __packed; -#define MAX_ROW_SIZE 32 struct mfi_array { uint64_t size; uint8_t num_drives; @@ -1055,13 +1096,13 @@ struct mfi_array { uint16_t array_ref; uint8_t pad[20]; struct { - union mfi_pd_ref ref; - uint16_t fw_state; + union mfi_pd_ref ref; /* 0xffff == missing drive */ + uint16_t fw_state; /* MFI_PD_STATE_* */ struct { uint8_t pd; uint8_t slot; } encl; - } pd[MAX_ROW_SIZE]; + } pd[0]; } __packed; struct mfi_config_data { @@ -1073,13 +1114,117 @@ struct mfi_config_data { uint16_t spares_count; uint16_t spares_size; uint8_t reserved[16]; - uint8_t data; - /* - struct mfi_array array[]; - struct mfi_ld_config ld[]; - struct mfi_spare spare[]; - */ -} __packed; + struct mfi_array array[0]; + struct mfi_ld_config ld[0]; + struct mfi_spare spare[0]; +} __packed; + +struct mfi_bbu_capacity_info { + uint16_t relative_charge; + uint16_t absolute_charge; + uint16_t remaining_capacity; + uint16_t full_charge_capacity; + uint16_t run_time_to_empty; + uint16_t average_time_to_empty; + uint16_t average_time_to_full; + uint16_t cycle_count; + uint16_t max_error; + uint16_t remaining_capacity_alarm; + uint16_t remaining_time_alarm; + uint8_t reserved[26]; +} __packed; + +struct mfi_bbu_design_info { + uint32_t mfg_date; + uint16_t design_capacity; + uint16_t design_voltage; + uint16_t spec_info; + uint16_t serial_number; + uint16_t pack_stat_config; + uint8_t mfg_name[12]; + uint8_t device_name[8]; + uint8_t device_chemistry[8]; + uint8_t mfg_data[8]; + uint8_t reserved[17]; +} __packed; + +struct mfi_ibbu_state { + uint16_t gas_guage_status; + uint16_t relative_charge; + uint16_t charger_system_state; + uint16_t charger_system_ctrl; + uint16_t charging_current; + uint16_t absolute_charge; + uint16_t max_error; + uint8_t reserved[18]; +} __packed; + +struct mfi_bbu_state { + uint16_t gas_guage_status; + uint16_t relative_charge; + uint16_t charger_status; + uint16_t remaining_capacity; + uint16_t full_charge_capacity; + uint8_t is_SOH_good; + uint8_t reserved[21]; +} __packed; + +union mfi_bbu_status_detail { + struct mfi_ibbu_state ibbu; + struct mfi_bbu_state bbu; +}; + +struct mfi_bbu_status { + uint8_t battery_type; +#define MFI_BBU_TYPE_NONE 0 +#define MFI_BBU_TYPE_IBBU 1 +#define MFI_BBU_TYPE_BBU 2 + uint8_t reserved; + uint16_t voltage; + int16_t current; + uint16_t temperature; + uint32_t fw_status; +#define MFI_BBU_STATE_PACK_MISSING (1 << 0) +#define MFI_BBU_STATE_VOLTAGE_LOW (1 << 1) +#define MFI_BBU_STATE_TEMPERATURE_HIGH (1 << 2) +#define MFI_BBU_STATE_CHARGE_ACTIVE (1 << 0) +#define MFI_BBU_STATE_DISCHARGE_ACTIVE (1 << 0) + uint8_t pad[20]; + union mfi_bbu_status_detail detail; +} __packed; + +enum mfi_pr_state { + MFI_PR_STATE_STOPPED = 0, + MFI_PR_STATE_READY = 1, + MFI_PR_STATE_ACTIVE = 2, + MFI_PR_STATE_ABORTED = 0xff +}; + +struct mfi_pr_status { + uint32_t num_iteration; + uint8_t state; + uint8_t num_pd_done; + uint8_t reserved[10]; +}; + +enum mfi_pr_opmode { + MFI_PR_OPMODE_AUTO = 0, + MFI_PR_OPMODE_MANUAL = 1, + MFI_PR_OPMODE_DISABLED = 2 +}; + +struct mfi_pr_properties { + uint8_t op_mode; + uint8_t max_pd; + uint8_t reserved; + uint8_t exclude_ld_count; + uint16_t excluded_ld[MFI_MAX_LD]; + uint8_t cur_pd_map[MFI_MAX_PD / 8]; + uint8_t last_pd_map[MFI_MAX_PD / 8]; + uint32_t next_exec; + uint32_t exec_freq; + uint32_t clear_freq; +}; #define MFI_SCSI_MAX_TARGETS 128 #define MFI_SCSI_MAX_LUNS 8 Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Thu Aug 13 19:47:13 2009 (r196199) +++ head/usr.sbin/Makefile Thu Aug 13 23:18:45 2009 (r196200) @@ -94,6 +94,7 @@ SUBDIR= ${_ac} \ manctl \ memcontrol \ mergemaster \ + mfiutil \ mixer \ ${_mld6query} \ mlxcontrol \ Added: head/usr.sbin/mfiutil/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mfiutil/Makefile Thu Aug 13 23:18:45 2009 (r196200) @@ -0,0 +1,17 @@ +# $FreeBSD$ +PROG= mfiutil + +SRCS= mfiutil.c mfi_cmd.c mfi_config.c mfi_drive.c mfi_evt.c mfi_flash.c \ + mfi_patrol.c mfi_show.c mfi_volume.c + +CFLAGS+= -fno-builtin-strftime +WARNS?=3 + +LDADD= -lutil + +# Here be dragons +.ifdef DEBUG +CFLAGS+= -DDEBUG +.endif + +.include Added: head/usr.sbin/mfiutil/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mfiutil/README Thu Aug 13 23:18:45 2009 (r196200) @@ -0,0 +1,104 @@ +# $FreeBSD$ + +This package includes a mfiutil command for administering mfi(4) controllers +on FreeBSD. + +Version 1.0.13 + * Cleaned up warnings in preparation for integration with FreeBSD + +Version 1.0.12 + * Add 'drive clear' command to wipe drives with all 0x00 characters + +Version 1.0.11 + * Display serial number for drives + * Display location info for drives with 'show config' + +Version 1.0.10 + * Display min and max stripe size supported by adapters. + * Added support for examining the controller event log. + +Version 1.0.9 + * Display stripe size for volumes. + * Added support for setting the stripe size for new volumes. + * Fix a regression in 1.0.8 that broke creation of RAID-5 and RAID-50 + arrays. + +Version 1.0.8 + * Added support for RAID-60 arrays. + * Added 'flash' command to support firmware flashing. + +Version 1.0.7 + * Renamed 'clear config' to 'clear, 'create volume' to 'create', + 'delete volume' to 'delete', 'create spare' to 'add', and + 'delete spare' to 'remove'. The old names still work. + * Added support for RAID-6 arrays. + +Version 1.0.6 + * Added 'show patrol', 'patrol', 'start patrol', and 'stop patrol' + commands to manage patrol reads. + +Version 1.0.5 + * Added 'create volume' and 'delete volume' commands to manage volumes. + * Added 'clear config' command to clear entire configuration. + * Added more detailed error reporting based on firmware status codes. + * Renamed 'progress' command to 'drive progress'. + * Added 'volume progress' command to display progress of volume-level + activites such as background inits. + * Fixed 'create spare' to properly add global spares. + +Version 1.0.4 + * Added 'create spare' and 'delete spare' commands to manage hot spares. + * Added 'good' command to mark unconfigured bad drives as good. + * Display more information about hot spares in 'show config' + * Allow physical drives to be specified via Exx:Syy similar to megacli + * Display onboard memory size in 'show adapter' + +Version 1.0.3 + * Added 'cache' command to manage cache settings for volumes. + * Added 'name' command to name volumes. + * Added manpage. + +Version 1.0.2 + * Added 'show adapter' and 'show battery' commands. + * Added RAID level of volumes to 'show config' and 'show volumes'. + * Added drive model info to 'show config' and 'show drives'. + * Added package firmware version to 'show firmware'. + * Added read and write cache status to 'show volumes'. + * Map volume IDs to mfidX device names on newer kernels. + +Version 1.0.1 + * Added 'show firmware' command + +Version 1.0.0 + * Initial release + +usage: mfiutil [-u unit] ... + +Commands include: + version + show adapter - display controller information + show battery - display battery information + show config - display RAID configuration + show drives - list physical drives + show firmware - list firmware images + show volumes - list logical volumes + show patrol - display patrol read status + fail - fail a physical drive + good - mark a bad physical drive as good + rebuild - mark failed drive ready for rebuild + drive progress - display status of active operations + start rebuild + abort rebuild + locate - toggle drive LED + cache [command [setting]] + name + volume progress - display status of active operations + clear - clear volume configuration + create [-v] [,[,...]] [[,[,...]] + delete + add [volume] - add a hot spare + remove - remove a hot spare + patrol [interval [start]] + start patrol - start a patrol read + stop patrol - stop a patrol read + flash Added: head/usr.sbin/mfiutil/mfi_cmd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mfiutil/mfi_cmd.c Thu Aug 13 23:18:45 2009 (r196200) @@ -0,0 +1,351 @@ +/*- + * Copyright (c) 2008, 2009 Yahoo!, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The names of the authors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "mfiutil.h" +#include + +static const char *mfi_status_codes[] = { + "Command completed succesfully", + "Invalid command", + "Invalid DMCD opcode", + "Invalid parameter", + "Invalid Sequence Number", + "Abort isn't possible for the requested command", + "Application 'host' code not found", + "Application in use", + "Application not initialized", + "Array index invalid", + "Array row not empty", + "Configuration resource conflict", + "Device not found", + "Drive too small", + "Flash memory allocation failed", + "Flash download already in progress", + "Flash operation failed", + "Bad flash image", + "Incomplete flash image", + "Flash not open", + "Flash not started", + "Flush failed", + "Specified application doesn't have host-resident code", + "Volume consistency check in progress", + "Volume initialization in progress", + "Volume LBA out of range", + "Maximum number of volumes are already configured", + "Volume is not OPTIMAL", + "Volume rebuild in progress", + "Volume reconstruction in progress", + "Volume RAID level is wrong for requested operation", + "Too many spares assigned", + "Scratch memory not available", + "Error writing MFC data to SEEPROM", + "Required hardware is missing", + "Item not found", + "Volume drives are not within an enclosure", + "Drive clear in progress", + "Drive type mismatch (SATA vs SAS)", + "Patrol read disabled", + "Invalid row index", + "SAS Config - Invalid action", + "SAS Config - Invalid data", + "SAS Config - Invalid page", + "SAS Config - Invalid type", + "SCSI command completed with error", + "SCSI I/O request failed", + "SCSI RESERVATION_CONFLICT", + "One or more flush operations during shutdown failed", + "Firmware time is not set", + "Wrong firmware or drive state", + "Volume is offline", + "Peer controller rejected request", + "Unable to inform peer of communication changes", + "Volume reservation already in progress", + "I2C errors were detected", + "PCI errors occurred during XOR/DMA operation", + "Diagnostics failed", + "Unable to process command as boot messages are pending", + "Foreign configuration is incomplete" +}; + +const char * +mfi_status(u_int status_code) +{ + static char buffer[16]; + + if (status_code == MFI_STAT_INVALID_STATUS) + return ("Invalid status"); + if (status_code < sizeof(mfi_status_codes) / sizeof(char *)) + return (mfi_status_codes[status_code]); + snprintf(buffer, sizeof(buffer), "Status: 0x%02x", status_code); + return (buffer); +} + +const char * +mfi_raid_level(uint8_t primary_level, uint8_t secondary_level) +{ + static char buf[16]; + + switch (primary_level) { + case DDF_RAID0: + return ("RAID-0"); + case DDF_RAID1: + if (secondary_level != 0) + return ("RAID-10"); + else + return ("RAID-1"); + case DDF_RAID1E: + return ("RAID-1E"); + case DDF_RAID3: + return ("RAID-3"); + case DDF_RAID5: + if (secondary_level != 0) + return ("RAID-50"); + else + return ("RAID-5"); + case DDF_RAID5E: + return ("RAID-5E"); + case DDF_RAID5EE: + return ("RAID-5EE"); + case DDF_RAID6: + if (secondary_level != 0) + return ("RAID-60"); + else + return ("RAID-6"); + case DDF_JBOD: + return ("JBOD"); + case DDF_CONCAT: + return ("CONCAT"); + default: + sprintf(buf, "LVL 0x%02x", primary_level); + return (buf); + } +} + +static int +mfi_query_disk(int fd, uint8_t target_id, struct mfi_query_disk *info) +{ + + bzero(info, sizeof(*info)); + info->array_id = target_id; + if (ioctl(fd, MFIIO_QUERY_DISK, info) < 0) + return (-1); + if (!info->present) { + errno = ENXIO; + return (-1); + } + return (0); +} + +const char * +mfi_volume_name(int fd, uint8_t target_id) +{ + static struct mfi_query_disk info; + static char buf[4]; + + if (mfi_query_disk(fd, target_id, &info) < 0) { + snprintf(buf, sizeof(buf), "%d", target_id); + return (buf); + } + return (info.devname); +} + +int +mfi_volume_busy(int fd, uint8_t target_id) +{ + struct mfi_query_disk info; + + /* Assume it isn't mounted if we can't get information. */ + if (mfi_query_disk(fd, target_id, &info) < 0) + return (0); + return (info.open != 0); +} + +/* + * Check if the running kernel supports changing the RAID + * configuration of the mfi controller. + */ +int +mfi_reconfig_supported(void) +{ + char mibname[64]; + size_t len; + int dummy; + + len = sizeof(dummy); + snprintf(mibname, sizeof(mibname), "dev.mfi.%d.delete_busy_volumes", + mfi_unit); + return (sysctlbyname(mibname, &dummy, &len, NULL, 0) == 0); +} + +int +mfi_lookup_volume(int fd, const char *name, uint8_t *target_id) +{ + struct mfi_query_disk info; + struct mfi_ld_list list; + char *cp; + long val; + u_int i; + + /* If it's a valid number, treat it as a raw target ID. */ + val = strtol(name, &cp, 0); + if (*cp == '\0') { + *target_id = val; + return (0); + } + + if (mfi_dcmd_command(fd, MFI_DCMD_LD_GET_LIST, &list, sizeof(list), + NULL, 0, NULL) < 0) + return (-1); + + for (i = 0; i < list.ld_count; i++) { + if (mfi_query_disk(fd, list.ld_list[i].ld.v.target_id, + &info) < 0) + continue; + if (strcmp(name, info.devname) == 0) { + *target_id = list.ld_list[i].ld.v.target_id; + return (0); + } + } + errno = EINVAL; + return (-1); +} + +int +mfi_dcmd_command(int fd, uint32_t opcode, void *buf, size_t bufsize, + uint8_t *mbox, size_t mboxlen, uint8_t *statusp) +{ + struct mfi_ioc_passthru ioc; + struct mfi_dcmd_frame *dcmd; + int r; + + if ((mbox != NULL && (mboxlen == 0 || mboxlen > MFI_MBOX_SIZE)) || + (mbox == NULL && mboxlen != 0)) { + errno = EINVAL; + return (-1); + } + + bzero(&ioc, sizeof(ioc)); + dcmd = &ioc.ioc_frame; + if (mbox) + bcopy(mbox, dcmd->mbox, mboxlen); + dcmd->header.cmd = MFI_CMD_DCMD; + dcmd->header.timeout = 0; + dcmd->header.flags = 0; + dcmd->header.data_len = bufsize; + dcmd->opcode = opcode; + + ioc.buf = buf; + ioc.buf_size = bufsize; + r = ioctl(fd, MFIIO_PASSTHRU, &ioc); + if (r < 0) + return (r); + + if (statusp != NULL) + *statusp = dcmd->header.cmd_status; + else if (dcmd->header.cmd_status != MFI_STAT_OK) { + warnx("Command failed: %s", + mfi_status(dcmd->header.cmd_status)); + errno = EIO; + return (-1); + } + return (0); +} + +int +mfi_ctrl_get_info(int fd, struct mfi_ctrl_info *info, uint8_t *statusp) +{ + + return (mfi_dcmd_command(fd, MFI_DCMD_CTRL_GETINFO, info, + sizeof(struct mfi_ctrl_info), NULL, 0, statusp)); +} + +int +mfi_open(int unit) +{ + char path[MAXPATHLEN]; + + snprintf(path, sizeof(path), "/dev/mfi%d", unit); + return (open(path, O_RDWR)); +} + +void +mfi_display_progress(const char *label, struct mfi_progress *prog) +{ + uint seconds; + + printf("%s: %.2f%% complete, after %ds", label, + (float)prog->progress * 100 / 0xffff, prog->elapsed_seconds); + if (prog->elapsed_seconds > 10) { + printf(" finished in "); + seconds = (0x10000 * (uint32_t)prog->elapsed_seconds) / + prog->progress - prog->elapsed_seconds; + if (seconds > 3600) + printf("%u:", seconds / 3600); + if (seconds > 60) { + seconds %= 3600; + printf("%02u:%02u", seconds / 60, seconds % 60); + } else + printf("%us", seconds); + } + printf("\n"); +} + +int +mfi_table_handler(struct mfiutil_command **start, struct mfiutil_command **end, + int ac, char **av) +{ + struct mfiutil_command **cmd; + + if (ac < 2) { + warnx("The %s command requires a sub-command.", av[0]); + return (EINVAL); + } + for (cmd = start; cmd < end; cmd++) { + if (strcmp((*cmd)->name, av[1]) == 0) + return ((*cmd)->handler(ac - 1, av + 1)); + } + + warnx("%s is not a valid sub-command of %s.", av[1], av[0]); + return (ENOENT); +} Added: head/usr.sbin/mfiutil/mfi_config.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mfiutil/mfi_config.c Thu Aug 13 23:18:45 2009 (r196200) @@ -0,0 +1,1164 @@ +/*- + * Copyright (c) 2008, 2009 Yahoo!, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The names of the authors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 +#ifdef DEBUG +#include +#endif +#include +#include +#include +#ifdef DEBUG +#include +#endif +#include +#include +#include +#include +#include "mfiutil.h" + +#ifdef DEBUG +static void dump_config(int fd, struct mfi_config_data *config); +#endif + +static int add_spare(int ac, char **av); +static int remove_spare(int ac, char **av); + +#define powerof2(x) ((((x)-1)&(x))==0) + +static long +dehumanize(const char *value) +{ + char *vtp; + long iv; + + if (value == NULL) + return (0); + iv = strtoq(value, &vtp, 0); + if (vtp == value || (vtp[0] != '\0' && vtp[1] != '\0')) { + return (0); + } + switch (vtp[0]) { + case 't': case 'T': + iv *= 1024; + case 'g': case 'G': + iv *= 1024; + case 'm': case 'M': + iv *= 1024; + case 'k': case 'K': + iv *= 1024; + case '\0': + break; + default: + return (0); + } + return (iv); +} +int +mfi_config_read(int fd, struct mfi_config_data **configp) +{ + struct mfi_config_data *config; + uint32_t config_size; + + /* + * Keep fetching the config in a loop until we have a large enough + * buffer to hold the entire configuration. + */ + config = NULL; + config_size = 1024; +fetch: + config = reallocf(config, config_size); + if (config == NULL) + return (-1); + if (mfi_dcmd_command(fd, MFI_DCMD_CFG_READ, config, + config_size, NULL, 0, NULL) < 0) + return (-1); + + if (config->size > config_size) { + config_size = config->size; + goto fetch; + } + + *configp = config; + return (0); +} + +static struct mfi_array * +mfi_config_lookup_array(struct mfi_config_data *config, uint16_t array_ref) +{ + struct mfi_array *ar; + char *p; + int i; + + p = (char *)config->array; + for (i = 0; i < config->array_count; i++) { + ar = (struct mfi_array *)p; + if (ar->array_ref == array_ref) + return (ar); + p += config->array_size; + } + + return (NULL); +} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 06:00:05 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CFCB106568D; Fri, 14 Aug 2009 06:00:05 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from websrv01.jr-hosting.nl (websrv01.jr-hosting.nl [78.47.69.233]) by mx1.freebsd.org (Postfix) with ESMTP id 2E8A98FC62; Fri, 14 Aug 2009 06:00:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=www.jr-hosting.nl) by websrv01.jr-hosting.nl with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1MbpQj-000LSC-0T; Fri, 14 Aug 2009 07:34:21 +0200 Received: from 145.7.91.133 (SquirrelMail authenticated user remko) by www.jr-hosting.nl with HTTP; Fri, 14 Aug 2009 07:34:21 +0200 Message-ID: In-Reply-To: <200908132318.n7DNIjvO015601@svn.freebsd.org> References: <200908132318.n7DNIjvO015601@svn.freebsd.org> Date: Fri, 14 Aug 2009 07:34:21 +0200 From: "Remko Lodder" To: "Scott Long" User-Agent: SquirrelMail/1.4.19 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196200 - in head: etc/mtree include sys/dev/mfi usr.sbin usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: remko@elvandar.org List-Id: "SVN commit messages 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, 14 Aug 2009 06:00:05 -0000 On Fri, August 14, 2009 1:18 am, Scott Long wrote: > Author: scottl > Date: Thu Aug 13 23:18:45 2009 > New Revision: 196200 > URL: http://svn.freebsd.org/changeset/base/196200 > > Log: > ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell > PERC5/6 > controllers. Controller, array, and drive status can be checked, basic > attributes can be changed, and arrays and spares can be created and > deleted. > Controller firmware can also be flashed. > > This does not replace MegaCLI, found in ports, as that is officially > sanctioned > and supported by LSI and includes vastly more functionality. However, > mfiutil > is open source and guaranteed to provide basic functionality, which can > be > especially useful if you have a problem and can't get MegaCLI to work. > > Approved by: re > Obtained from: Yahoo! Inc. > Great work! Thanks! Also thanks to Yahoo! Inc.! Cheers, Remko -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 09:53:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3BD1106568D; Fri, 14 Aug 2009 09:53:21 +0000 (UTC) (envelope-from danger@rulez.sk) Received: from services.rulez.sk (services.rulez.sk [92.240.234.125]) by mx1.freebsd.org (Postfix) with ESMTP id 68BC98FC41; Fri, 14 Aug 2009 09:53:21 +0000 (UTC) Received: from localhost (services.rulez.sk [92.240.234.125]) by services.rulez.sk (Postfix) with ESMTP id E30F5133446C; Fri, 14 Aug 2009 11:35:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at rulez.sk Received: from services.rulez.sk ([92.240.234.125]) by localhost (services.rulez.sk [92.240.234.125]) (amavisd-new, port 10024) with ESMTP id d4cDsm25U5zN; Fri, 14 Aug 2009 11:35:39 +0200 (CEST) Received: from danger-mbp.local (adsl-dyn219.78-99-59.t-com.sk [78.99.59.219]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: danger@rulez.sk) by services.rulez.sk (Postfix) with ESMTPSA id 1E47A1334445; Fri, 14 Aug 2009 11:35:39 +0200 (CEST) Message-ID: <4A852FDF.5060709@rulez.sk> Date: Fri, 14 Aug 2009 11:35:27 +0200 From: =?UTF-8?B?RGFuaWVsIEdlcsW+bw==?= User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Scott Long References: <200908132318.n7DNIjvO015601@svn.freebsd.org> In-Reply-To: <200908132318.n7DNIjvO015601@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196200 - in head: etc/mtree include sys/dev/mfi usr.sbin usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 09:53:21 -0000 Scott Long wrote: > Author: scottl > Date: Thu Aug 13 23:18:45 2009 > New Revision: 196200 > URL: http://svn.freebsd.org/changeset/base/196200 > > Log: > ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6 > controllers. Controller, array, and drive status can be checked, basic > attributes can be changed, and arrays and spares can be created and deleted. > Controller firmware can also be flashed. > > This does not replace MegaCLI, found in ports, as that is officially sanctioned > and supported by LSI and includes vastly more functionality. However, mfiutil > is open source and guaranteed to provide basic functionality, which can be > especially useful if you have a problem and can't get MegaCLI to work. Is this MFC-able to stable/7 and stable/8? From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 10:09:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 906511065690; Fri, 14 Aug 2009 10:09:46 +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 7FBDD8FC55; Fri, 14 Aug 2009 10:09: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 n7EA9k5G028515; Fri, 14 Aug 2009 10:09:46 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EA9k1m028514; Fri, 14 Aug 2009 10:09:46 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200908141009.n7EA9k1m028514@svn.freebsd.org> From: Julian Elischer Date: Fri, 14 Aug 2009 10:09: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: r196201 - head/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 10:09:46 -0000 Author: julian Date: Fri Aug 14 10:09:45 2009 New Revision: 196201 URL: http://svn.freebsd.org/changeset/base/196201 Log: Fix ipfw crash on uid or gid check. Receiving any ip packet for which there is no existing socket will crash if ipfw has a uid or gid test rule, as the uid/gid of the non existent owner of said non existent socket is tested. Brooks introduced this error as part of his >16 gids patch. It appears to be a cut-n-paste error from similar code a few lines before. The old code used the 'pcb' variable here, but in the new code that switched the 'inp' variable, which is often NULL and what is tested in the code further up. The rest of the multi-gid patch for ipfw seems solid (and cleaner than previous code). Reviewed by: brooks Approved by: re (rwatson) Modified: head/sys/netinet/ipfw/ip_fw2.c Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Thu Aug 13 23:18:45 2009 (r196200) +++ head/sys/netinet/ipfw/ip_fw2.c Fri Aug 14 10:09:45 2009 (r196201) @@ -2057,7 +2057,7 @@ check_uidgid(ipfw_insn_u32 *insn, int pr dst_ip, htons(dst_port), wildcard, NULL); if (pcb != NULL) { - *uc = crhold(inp->inp_cred); + *uc = crhold(pcb->inp_cred); *ugid_lookupp = 1; } INP_INFO_RUNLOCK(pi); From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 10:20:34 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E3BC1065692; Fri, 14 Aug 2009 10:20:34 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id C961B8FC57; Fri, 14 Aug 2009 10:20:33 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id B383F41C6FC; Fri, 14 Aug 2009 12:05:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id J9m6UkKWDJXU; Fri, 14 Aug 2009 12:05:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id B31B941C6F2; Fri, 14 Aug 2009 12:05: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 24E024448EC; Fri, 14 Aug 2009 10:02:15 +0000 (UTC) Date: Fri, 14 Aug 2009 10:02:15 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Scott Long In-Reply-To: <200908132318.n7DNIjvO015601@svn.freebsd.org> Message-ID: <20090814095726.A93661@maildrop.int.zabbadoz.net> References: <200908132318.n7DNIjvO015601@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: r196200 - in head: etc/mtree include sys/dev/mfi usr.sbin usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 10:20:34 -0000 On Thu, 13 Aug 2009, Scott Long wrote: > Author: scottl > Date: Thu Aug 13 23:18:45 2009 > New Revision: 196200 > URL: http://svn.freebsd.org/changeset/base/196200 > > Log: > ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6 > controllers. Controller, array, and drive status can be checked, basic > attributes can be changed, and arrays and spares can be created and deleted. > Controller firmware can also be flashed. > > This does not replace MegaCLI, found in ports, as that is officially sanctioned > and supported by LSI and includes vastly more functionality. However, mfiutil > is open source and guaranteed to provide basic functionality, which can be > especially useful if you have a problem and can't get MegaCLI to work. > > Approved by: re > Obtained from: Yahoo! Inc. as you noticed already it breaks here on 32bit platforms: /src/usr.sbin/mfiutil/mfi_drive.c: In function 'mfi_lookup_drive': /src/usr.sbin/mfiutil/mfi_drive.c:120: warning: comparison between signed and unsigned struct mfi_pd_list { uint32_t size; uint32_t count; struct mfi_pd_address addr[0]; } __packed; long val; struct mfi_pd_list *list 120 for (val = 0; val < list->count; val++) { long vs uint32_t. -- Bjoern A. Zeeb What was I talking about and who are you again? From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 10:25:15 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25B56106568B; Fri, 14 Aug 2009 10:25:15 +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 0FFAD8FC65; Fri, 14 Aug 2009 10:25: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 n7EAPESQ028939; Fri, 14 Aug 2009 10:25:14 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EAPE4m028937; Fri, 14 Aug 2009 10:25:14 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200908141025.n7EAPE4m028937@svn.freebsd.org> From: Julian Elischer Date: Fri, 14 Aug 2009 10:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196202 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 10:25:15 -0000 Author: julian Date: Fri Aug 14 10:25:14 2009 New Revision: 196202 URL: http://svn.freebsd.org/changeset/base/196202 Log: MFC of r196201 URL: http://svn.freebsd.org/changeset/base/196201 Fix ipfw crash on uid or gid check. Receiving any ip packet for which there is no existing socket will crash if ipfw has a uid or gid test rule, as the uid/gid of the non existent owner of said non existent socket is tested. Brooks introduced this error as part of his >16 gids patch. It appears to be a cut-n-paste error from similar code a few lines before. The old code used the 'pcb' variable here, but in the new code that switched the 'inp' variable, which is often NULL and what is tested in the code further up. The rest of the multi-gid patch for ipfw seems solid (and cleaner than previous code). p.s. What's up with all the properties changing? It is a fresh checkout. Reviewed by: brooks Approved by: re (rwatson) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (contents, props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw2.c Fri Aug 14 10:09:45 2009 (r196201) +++ stable/8/sys/netinet/ipfw/ip_fw2.c Fri Aug 14 10:25:14 2009 (r196202) @@ -2057,7 +2057,7 @@ check_uidgid(ipfw_insn_u32 *insn, int pr dst_ip, htons(dst_port), wildcard, NULL); if (pcb != NULL) { - *uc = crhold(inp->inp_cred); + *uc = crhold(pcb->inp_cred); *ugid_lookupp = 1; } INP_INFO_RUNLOCK(pi); From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 10:57:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16E67106568C; Fri, 14 Aug 2009 10:57:29 +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 065A68FC43; Fri, 14 Aug 2009 10:57: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 n7EAvSRn029584; Fri, 14 Aug 2009 10:57:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EAvS1P029582; Fri, 14 Aug 2009 10:57:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141057.n7EAvS1P029582@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 10:57: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: r196203 - 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: Fri, 14 Aug 2009 10:57:29 -0000 Author: kib Date: Fri Aug 14 10:57:28 2009 New Revision: 196203 URL: http://svn.freebsd.org/changeset/base/196203 Log: Correctly handle unlock for !MAKEENTRY case, after successfull attempt of lock upgrade cache shall be unlocked from write. Reported by: Lucius Windschuh Reviewed by: kan Approved by: re (rwatson) Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Fri Aug 14 10:25:14 2009 (r196202) +++ head/sys/kern/vfs_cache.c Fri Aug 14 10:57:28 2009 (r196203) @@ -416,7 +416,8 @@ retry_wlocked: if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) cache_zap(dvp->v_cache_dd); dvp->v_cache_dd = NULL; - goto unlock; + CACHE_WUNLOCK(); + return (0); } if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) *vpp = dvp->v_cache_dd->nc_vp; From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 10:57:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4D68106568D; Fri, 14 Aug 2009 10:57: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 C473D8FC43; Fri, 14 Aug 2009 10:57: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 n7EAvvFq029628; Fri, 14 Aug 2009 10:57:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EAvveO029626; Fri, 14 Aug 2009 10:57:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141057.n7EAvveO029626@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 10:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196204 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 10:57:57 -0000 Author: kib Date: Fri Aug 14 10:57:57 2009 New Revision: 196204 URL: http://svn.freebsd.org/changeset/base/196204 Log: Add the address of the lock to the KTR_LOCK trace. Tested by: pho Approved by: re (rwatson) Modified: head/sys/sys/lock.h Modified: head/sys/sys/lock.h ============================================================================== --- head/sys/sys/lock.h Fri Aug 14 10:57:28 2009 (r196203) +++ head/sys/sys/lock.h Fri Aug 14 10:57:57 2009 (r196204) @@ -155,16 +155,16 @@ struct lock_class { #define LOCK_LOG_LOCK(opname, lo, flags, recurse, file, line) do { \ if (LOCK_LOG_TEST((lo), (flags))) \ - CTR5(KTR_LOCK, opname " (%s) %s r = %d at %s:%d", \ + CTR6(KTR_LOCK, opname " (%s) %s %p r = %d at %s:%d", \ LOCK_CLASS(lo)->lc_name, (lo)->lo_name, \ - (u_int)(recurse), (file), (line)); \ + (lo), (u_int)(recurse), (file), (line)); \ } while (0) #define LOCK_LOG_TRY(opname, lo, flags, result, file, line) do { \ if (LOCK_LOG_TEST((lo), (flags))) \ - CTR5(KTR_LOCK, "TRY_" opname " (%s) %s result=%d at %s:%d",\ + CTR6(KTR_LOCK, "TRY_" opname " (%s) %s %p result=%d at %s:%d",\ LOCK_CLASS(lo)->lc_name, (lo)->lo_name, \ - (u_int)(result), (file), (line)); \ + (lo), (u_int)(result), (file), (line)); \ } while (0) #define LOCK_LOG_INIT(lo, flags) do { \ From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 10:59:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 250B8106568B; Fri, 14 Aug 2009 10:59:18 +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 144E18FC59; Fri, 14 Aug 2009 10:59: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 n7EAxHtE032023; Fri, 14 Aug 2009 10:59:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EAxHUF032021; Fri, 14 Aug 2009 10:59:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141059.n7EAxHUF032021@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 10:59: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: r196205 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 10:59:18 -0000 Author: kib Date: Fri Aug 14 10:59:17 2009 New Revision: 196205 URL: http://svn.freebsd.org/changeset/base/196205 Log: In nfs_upgrade_vnlock(), assert that the vnode is locked. It is for all pathes, as far as I see and testing seems to confirm it. Comparision of old_lock with LK_SHARED make sense only if vnode is locked by current thread. When downgrading, pass LK_RETRY to the vn_lock(), since otherwise vn_lock() unlocks the doomed vnode, causing extra unlock. Reported and tested by: pho Approved by: re (rwatson) MFC after: 3 weeks Modified: head/sys/nfsclient/nfs_subs.c Modified: head/sys/nfsclient/nfs_subs.c ============================================================================== --- head/sys/nfsclient/nfs_subs.c Fri Aug 14 10:57:57 2009 (r196204) +++ head/sys/nfsclient/nfs_subs.c Fri Aug 14 10:59:17 2009 (r196205) @@ -409,28 +409,25 @@ int nfs_upgrade_vnlock(struct vnode *vp) { int old_lock; - - if ((old_lock = VOP_ISLOCKED(vp)) != LK_EXCLUSIVE) { - if (old_lock == LK_SHARED) { - /* Upgrade to exclusive lock, this might block */ - vn_lock(vp, LK_UPGRADE | LK_RETRY); - } else { - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - } + + ASSERT_VOP_LOCKED(vp, "nfs_upgrade_vnlock"); + old_lock = VOP_ISLOCKED(vp); + if (old_lock != LK_EXCLUSIVE) { + KASSERT(old_lock == LK_SHARED, + ("nfs_upgrade_vnlock: wrong old_lock %d", old_lock)); + /* Upgrade to exclusive lock, this might block */ + vn_lock(vp, LK_UPGRADE | LK_RETRY); } - return old_lock; + return (old_lock); } void nfs_downgrade_vnlock(struct vnode *vp, int old_lock) { if (old_lock != LK_EXCLUSIVE) { - if (old_lock == LK_SHARED) { - /* Downgrade from exclusive lock, this might block */ - vn_lock(vp, LK_DOWNGRADE); - } else { - VOP_UNLOCK(vp, 0); - } + KASSERT(old_lock == LK_SHARED, ("wrong old_lock %d", old_lock)); + /* Downgrade from exclusive lock. */ + vn_lock(vp, LK_DOWNGRADE | LK_RETRY); } } From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 11:00:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A6EE106568D; Fri, 14 Aug 2009 11:00:38 +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 600188FC45; Fri, 14 Aug 2009 11:00: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 n7EB0cuF032111; Fri, 14 Aug 2009 11:00:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EB0cnM032109; Fri, 14 Aug 2009 11:00:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141100.n7EB0cnM032109@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 11:00: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: r196206 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 11:00:38 -0000 Author: kib Date: Fri Aug 14 11:00:38 2009 New Revision: 196206 URL: http://svn.freebsd.org/changeset/base/196206 Log: When a UFS node is truncated to the zero length, e.g. by explicit truncate(2) call, or by being removed or truncated on open, either new softupdate freeblks structure is allocated to track the freed blocks of the node, or truncation is done syncronously when too many SU dependencies are accumulated. The decision does not take into account the allocated freeblks dependencies, allowing workloads that do huge amount of truncations to exhaust the kernel memory. Take the number of allocated freeblks into consideration for softdep_slowdown(). Reported by: pluknet gmail com Diagnosed and tested by: pho Approved by: re (rwatson) MFC after: 1 month Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Fri Aug 14 10:59:17 2009 (r196205) +++ head/sys/ufs/ffs/ffs_softdep.c Fri Aug 14 11:00:38 2009 (r196206) @@ -663,6 +663,8 @@ static int req_clear_inodedeps; /* synce static int req_clear_remove; /* syncer process flush some freeblks */ #define FLUSH_REMOVE 2 #define FLUSH_REMOVE_WAIT 3 +static long num_freeblkdep; /* number of freeblks workitems allocated */ + /* * runtime statistics */ @@ -2223,6 +2225,9 @@ softdep_setup_freeblocks(ip, length, fla freeblks->fb_uid = ip->i_uid; freeblks->fb_previousinum = ip->i_number; freeblks->fb_devvp = ip->i_devvp; + ACQUIRE_LOCK(&lk); + num_freeblkdep++; + FREE_LOCK(&lk); extblocks = 0; if (fs->fs_magic == FS_UFS2_MAGIC) extblocks = btodb(fragroundup(fs, ip->i_din2->di_extsize)); @@ -2815,6 +2820,7 @@ handle_workitem_freeblocks(freeblks, fla ACQUIRE_LOCK(&lk); WORKITEM_FREE(freeblks, D_FREEBLKS); + num_freeblkdep--; FREE_LOCK(&lk); } @@ -5768,7 +5774,8 @@ softdep_slowdown(vp) max_softdeps_hard = max_softdeps * 11 / 10; if (num_dirrem < max_softdeps_hard / 2 && num_inodedep < max_softdeps_hard && - VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps) { + VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps && + num_freeblkdep < max_softdeps_hard) { FREE_LOCK(&lk); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 11:06:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC18C1065691; Fri, 14 Aug 2009 11:06:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B663C8FC61; Fri, 14 Aug 2009 11:06: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 n7EB6wxw032266; Fri, 14 Aug 2009 11:06:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EB6wCv032264; Fri, 14 Aug 2009 11:06:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141106.n7EB6wCv032264@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 11:06: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: r196207 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 11:06:58 -0000 Author: kib Date: Fri Aug 14 11:06:58 2009 New Revision: 196207 URL: http://svn.freebsd.org/changeset/base/196207 Log: MFC r196203: Correctly handle unlock for !MAKEENTRY case. Approved by: re (rwatson) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/vfs_cache.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/vfs_cache.c ============================================================================== --- stable/8/sys/kern/vfs_cache.c Fri Aug 14 11:00:38 2009 (r196206) +++ stable/8/sys/kern/vfs_cache.c Fri Aug 14 11:06:58 2009 (r196207) @@ -416,7 +416,8 @@ retry_wlocked: if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) cache_zap(dvp->v_cache_dd); dvp->v_cache_dd = NULL; - goto unlock; + CACHE_WUNLOCK(); + return (0); } if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) *vpp = dvp->v_cache_dd->nc_vp; From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 11:13:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BB3D106568E; Fri, 14 Aug 2009 11:13:06 +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 761B88FC45; Fri, 14 Aug 2009 11:13: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 n7EBD6H9032436; Fri, 14 Aug 2009 11:13:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EBD61g032434; Fri, 14 Aug 2009 11:13:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141113.n7EBD61g032434@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 11:13: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: r196208 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 11:13:06 -0000 Author: kib Date: Fri Aug 14 11:13:06 2009 New Revision: 196208 URL: http://svn.freebsd.org/changeset/base/196208 Log: MFC r196204: Add the address of the lock to the KTR_LOCK trace. Approved by: re (rwatson) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/sys/lock.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/sys/lock.h ============================================================================== --- stable/8/sys/sys/lock.h Fri Aug 14 11:06:58 2009 (r196207) +++ stable/8/sys/sys/lock.h Fri Aug 14 11:13:06 2009 (r196208) @@ -155,16 +155,16 @@ struct lock_class { #define LOCK_LOG_LOCK(opname, lo, flags, recurse, file, line) do { \ if (LOCK_LOG_TEST((lo), (flags))) \ - CTR5(KTR_LOCK, opname " (%s) %s r = %d at %s:%d", \ + CTR6(KTR_LOCK, opname " (%s) %s %p r = %d at %s:%d", \ LOCK_CLASS(lo)->lc_name, (lo)->lo_name, \ - (u_int)(recurse), (file), (line)); \ + (lo), (u_int)(recurse), (file), (line)); \ } while (0) #define LOCK_LOG_TRY(opname, lo, flags, result, file, line) do { \ if (LOCK_LOG_TEST((lo), (flags))) \ - CTR5(KTR_LOCK, "TRY_" opname " (%s) %s result=%d at %s:%d",\ + CTR6(KTR_LOCK, "TRY_" opname " (%s) %s %p result=%d at %s:%d",\ LOCK_CLASS(lo)->lc_name, (lo)->lo_name, \ - (u_int)(result), (file), (line)); \ + (lo), (u_int)(result), (file), (line)); \ } while (0) #define LOCK_LOG_INIT(lo, flags) do { \ From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 11:17:34 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2FB7106568D; Fri, 14 Aug 2009 11:17:34 +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 AD1A08FC15; Fri, 14 Aug 2009 11:17: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 n7EBHY5w032560; Fri, 14 Aug 2009 11:17:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EBHYqu032558; Fri, 14 Aug 2009 11:17:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141117.n7EBHYqu032558@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 11:17: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: r196209 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 11:17:35 -0000 Author: kib Date: Fri Aug 14 11:17:34 2009 New Revision: 196209 URL: http://svn.freebsd.org/changeset/base/196209 Log: MFC r196205: In nfs_upgrade_vnlock(), assert that the vnode is locked. When downgrading, pass LK_RETRY to the vn_lock(), since otherwise vn_lock() unlocks the doomed vnode, causing extra unlock. Approved by: re (rwatson) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/nfsclient/nfs_subs.c stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/nfsclient/nfs_subs.c ============================================================================== --- stable/8/sys/nfsclient/nfs_subs.c Fri Aug 14 11:13:06 2009 (r196208) +++ stable/8/sys/nfsclient/nfs_subs.c Fri Aug 14 11:17:34 2009 (r196209) @@ -409,28 +409,25 @@ int nfs_upgrade_vnlock(struct vnode *vp) { int old_lock; - - if ((old_lock = VOP_ISLOCKED(vp)) != LK_EXCLUSIVE) { - if (old_lock == LK_SHARED) { - /* Upgrade to exclusive lock, this might block */ - vn_lock(vp, LK_UPGRADE | LK_RETRY); - } else { - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - } + + ASSERT_VOP_LOCKED(vp, "nfs_upgrade_vnlock"); + old_lock = VOP_ISLOCKED(vp); + if (old_lock != LK_EXCLUSIVE) { + KASSERT(old_lock == LK_SHARED, + ("nfs_upgrade_vnlock: wrong old_lock %d", old_lock)); + /* Upgrade to exclusive lock, this might block */ + vn_lock(vp, LK_UPGRADE | LK_RETRY); } - return old_lock; + return (old_lock); } void nfs_downgrade_vnlock(struct vnode *vp, int old_lock) { if (old_lock != LK_EXCLUSIVE) { - if (old_lock == LK_SHARED) { - /* Downgrade from exclusive lock, this might block */ - vn_lock(vp, LK_DOWNGRADE); - } else { - VOP_UNLOCK(vp, 0); - } + KASSERT(old_lock == LK_SHARED, ("wrong old_lock %d", old_lock)); + /* Downgrade from exclusive lock. */ + vn_lock(vp, LK_DOWNGRADE | LK_RETRY); } } From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 11:22:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 210CF1065690; Fri, 14 Aug 2009 11:22:10 +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 0B5AE8FC3D; Fri, 14 Aug 2009 11:22: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 n7EBM9wx032714; Fri, 14 Aug 2009 11:22:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EBM9ml032712; Fri, 14 Aug 2009 11:22:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141122.n7EBM9ml032712@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 11:22: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: r196210 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 11:22:10 -0000 Author: kib Date: Fri Aug 14 11:22:09 2009 New Revision: 196210 URL: http://svn.freebsd.org/changeset/base/196210 Log: MFC r196206: Take the number of allocated freeblks into consideration for softdep_slowdown(), to prevent kernel memory exhaustioni on mass-truncation. Approved by: re (rwatson) Modified: 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/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/ufs/ffs/ffs_softdep.c stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/8/sys/ufs/ffs/ffs_softdep.c Fri Aug 14 11:17:34 2009 (r196209) +++ stable/8/sys/ufs/ffs/ffs_softdep.c Fri Aug 14 11:22:09 2009 (r196210) @@ -663,6 +663,8 @@ static int req_clear_inodedeps; /* synce static int req_clear_remove; /* syncer process flush some freeblks */ #define FLUSH_REMOVE 2 #define FLUSH_REMOVE_WAIT 3 +static long num_freeblkdep; /* number of freeblks workitems allocated */ + /* * runtime statistics */ @@ -2223,6 +2225,9 @@ softdep_setup_freeblocks(ip, length, fla freeblks->fb_uid = ip->i_uid; freeblks->fb_previousinum = ip->i_number; freeblks->fb_devvp = ip->i_devvp; + ACQUIRE_LOCK(&lk); + num_freeblkdep++; + FREE_LOCK(&lk); extblocks = 0; if (fs->fs_magic == FS_UFS2_MAGIC) extblocks = btodb(fragroundup(fs, ip->i_din2->di_extsize)); @@ -2815,6 +2820,7 @@ handle_workitem_freeblocks(freeblks, fla ACQUIRE_LOCK(&lk); WORKITEM_FREE(freeblks, D_FREEBLKS); + num_freeblkdep--; FREE_LOCK(&lk); } @@ -5768,7 +5774,8 @@ softdep_slowdown(vp) max_softdeps_hard = max_softdeps * 11 / 10; if (num_dirrem < max_softdeps_hard / 2 && num_inodedep < max_softdeps_hard && - VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps) { + VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps && + num_freeblkdep < max_softdeps_hard) { FREE_LOCK(&lk); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 12:30:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D0B0106568E; Fri, 14 Aug 2009 12:30:10 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BF338FC67; Fri, 14 Aug 2009 12:30: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 n7ECUAde034048; Fri, 14 Aug 2009 12:30:10 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7ECUA9I034046; Fri, 14 Aug 2009 12:30:10 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <200908141230.n7ECUA9I034046@svn.freebsd.org> From: Scott Long Date: Fri, 14 Aug 2009 12:30: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: r196211 - head/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 12:30:10 -0000 Author: scottl Date: Fri Aug 14 12:30:10 2009 New Revision: 196211 URL: http://svn.freebsd.org/changeset/base/196211 Log: Fix is 32bit bug missed in testing. Approved by: re Modified: head/usr.sbin/mfiutil/mfi_drive.c Modified: head/usr.sbin/mfiutil/mfi_drive.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_drive.c Fri Aug 14 11:22:09 2009 (r196210) +++ head/usr.sbin/mfiutil/mfi_drive.c Fri Aug 14 12:30:10 2009 (r196211) @@ -75,8 +75,9 @@ int mfi_lookup_drive(int fd, char *drive, uint16_t *device_id) { struct mfi_pd_list *list; - long val; uint8_t encl, slot; + long val; + u_int i; char *cp; /* Look for a raw device id first. */ @@ -117,15 +118,15 @@ mfi_lookup_drive(int fd, char *drive, ui return (errno); } - for (val = 0; val < list->count; val++) { - if (list->addr[val].scsi_dev_type != 0) + for (i = 0; i < list->count; i++) { + if (list->addr[i].scsi_dev_type != 0) continue; if (((encl == 0xff && - list->addr[val].encl_device_id == 0xffff) || - list->addr[val].encl_index == encl) && - list->addr[val].slot_number == slot) { - *device_id = list->addr[val].device_id; + list->addr[i].encl_device_id == 0xffff) || + list->addr[i].encl_index == encl) && + list->addr[i].slot_number == slot) { + *device_id = list->addr[i].device_id; free(list); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 13:13:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57BD2106568D; Fri, 14 Aug 2009 13:13:13 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 446C98FC57; Fri, 14 Aug 2009 13:13: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 n7EDDDwe034949; Fri, 14 Aug 2009 13:13:13 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EDDDC5034943; Fri, 14 Aug 2009 13:13:13 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <200908141313.n7EDDDC5034943@svn.freebsd.org> From: Scott Long Date: Fri, 14 Aug 2009 13:13: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: r196212 - in head/usr.sbin: . mptutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 13:13:13 -0000 Author: scottl Date: Fri Aug 14 13:13:12 2009 New Revision: 196212 URL: http://svn.freebsd.org/changeset/base/196212 Log: Add mptutil, a basic utility for managing MPT SCSI/SATA/SAS controllers. Drive and controller status can be reported, basic attributes changed, and arrays and spares can be created and deleted. Approved by: re Obtained from: Yahoo! Inc. Added: head/usr.sbin/mptutil/ head/usr.sbin/mptutil/Makefile (contents, props changed) head/usr.sbin/mptutil/mpt_cam.c (contents, props changed) head/usr.sbin/mptutil/mpt_cmd.c (contents, props changed) head/usr.sbin/mptutil/mpt_config.c (contents, props changed) head/usr.sbin/mptutil/mpt_drive.c (contents, props changed) head/usr.sbin/mptutil/mpt_evt.c (contents, props changed) head/usr.sbin/mptutil/mpt_show.c (contents, props changed) head/usr.sbin/mptutil/mpt_volume.c (contents, props changed) head/usr.sbin/mptutil/mptutil.8 (contents, props changed) head/usr.sbin/mptutil/mptutil.c (contents, props changed) head/usr.sbin/mptutil/mptutil.h (contents, props changed) Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Fri Aug 14 12:30:10 2009 (r196211) +++ head/usr.sbin/Makefile Fri Aug 14 13:13:12 2009 (r196212) @@ -104,6 +104,7 @@ SUBDIR= ${_ac} \ ${_mount_smbfs} \ ${_moused} \ ${_mptable} \ + mptutil \ mtest \ mtree \ ${_named} \ Added: head/usr.sbin/mptutil/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mptutil/Makefile Fri Aug 14 13:13:12 2009 (r196212) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +PROG= mptutil +SRCS= mptutil.c mpt_cam.c mpt_cmd.c mpt_config.c mpt_drive.c mpt_evt.c \ + mpt_show.c mpt_volume.c +# mpt_flash.c +MAN= mptutil.8 + +WARNS?= 3 + +DPADD+= ${LIBCAM} ${LIBUTIL} +LDADD+= -lcam -lutil + +# Here be dragons +.ifdef DEBUG +CFLAGS+= -DDEBUG +.endif + +.include Added: head/usr.sbin/mptutil/mpt_cam.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mptutil/mpt_cam.c Fri Aug 14 13:13:12 2009 (r196212) @@ -0,0 +1,569 @@ +/*- + * Copyright (c) 2008 Yahoo!, Inc. + * All rights reserved. + * Written by: John Baldwin + * + * 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. 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 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 +__RCSID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "mptutil.h" + +static int xptfd; + +static int +xpt_open(void) +{ + + if (xptfd == 0) + xptfd = open(XPT_DEVICE, O_RDWR); + return (xptfd); +} + +int +mpt_query_disk(U8 VolumeBus, U8 VolumeID, struct mpt_query_disk *qd) +{ + struct bus_match_pattern *b; + struct periph_match_pattern *p; + struct periph_match_result *r; + union ccb ccb; + size_t bufsize; + int i; + + /* mpt(4) only handles devices on bus 0. */ + if (VolumeBus != 0) + return (ENXIO); + + if (xpt_open() < 0) + return (ENXIO); + + bzero(&ccb, sizeof(ccb)); + + ccb.ccb_h.func_code = XPT_DEV_MATCH; + ccb.ccb_h.path_id = CAM_XPT_PATH_ID; + ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; + + bufsize = sizeof(struct dev_match_result) * 5; + ccb.cdm.num_matches = 0; + ccb.cdm.match_buf_len = bufsize; + ccb.cdm.matches = calloc(1, bufsize); + + bufsize = sizeof(struct dev_match_pattern) * 2; + ccb.cdm.num_patterns = 2; + ccb.cdm.pattern_buf_len = bufsize; + ccb.cdm.patterns = calloc(1, bufsize); + + /* Match mptX bus 0. */ + ccb.cdm.patterns[0].type = DEV_MATCH_BUS; + b = &ccb.cdm.patterns[0].pattern.bus_pattern; + snprintf(b->dev_name, sizeof(b->dev_name), "mpt"); + b->unit_number = mpt_unit; + b->bus_id = 0; + b->flags = BUS_MATCH_NAME | BUS_MATCH_UNIT | BUS_MATCH_BUS_ID; + + /* Look for a "da" device at the specified target and lun. */ + ccb.cdm.patterns[1].type = DEV_MATCH_PERIPH; + p = &ccb.cdm.patterns[1].pattern.periph_pattern; + snprintf(p->periph_name, sizeof(p->periph_name), "da"); + p->target_id = VolumeID; + p->flags = PERIPH_MATCH_NAME | PERIPH_MATCH_TARGET; + + if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { + i = errno; + free(ccb.cdm.matches); + free(ccb.cdm.patterns); + return (i); + } + free(ccb.cdm.patterns); + + if (((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) || + (ccb.cdm.status != CAM_DEV_MATCH_LAST)) { + warnx("mpt_query_disk got CAM error %#x, CDM error %d\n", + ccb.ccb_h.status, ccb.cdm.status); + free(ccb.cdm.matches); + return (EIO); + } + + /* + * We should have exactly 2 matches, 1 for the bus and 1 for + * the peripheral. However, if we only have 1 match and it is + * for the bus, don't print an error message and return + * ENOENT. + */ + if (ccb.cdm.num_matches == 1 && + ccb.cdm.matches[0].type == DEV_MATCH_BUS) { + free(ccb.cdm.matches); + return (ENOENT); + } + if (ccb.cdm.num_matches != 2) { + warnx("mpt_query_disk got %d matches, expected 2", + ccb.cdm.num_matches); + free(ccb.cdm.matches); + return (EIO); + } + if (ccb.cdm.matches[0].type != DEV_MATCH_BUS || + ccb.cdm.matches[1].type != DEV_MATCH_PERIPH) { + warnx("mpt_query_disk got wrong CAM matches"); + free(ccb.cdm.matches); + return (EIO); + } + + /* Copy out the data. */ + r = &ccb.cdm.matches[1].result.periph_result; + snprintf(qd->devname, sizeof(qd->devname), "%s%d", r->periph_name, + r->unit_number); + free(ccb.cdm.matches); + + return (0); +} + +static int +periph_is_volume(CONFIG_PAGE_IOC_2 *ioc2, struct periph_match_result *r) +{ + CONFIG_PAGE_IOC_2_RAID_VOL *vol; + int i; + + if (ioc2 == NULL) + return (0); + vol = ioc2->RaidVolume; + for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) { + if (vol->VolumeBus == 0 && vol->VolumeID == r->target_id) + return (1); + } + return (0); +} + +/* Much borrowed from scsireadcapacity() in src/sbin/camcontrol/camcontrol.c. */ +static int +fetch_scsi_capacity(struct cam_device *dev, struct mpt_standalone_disk *disk) +{ + struct scsi_read_capacity_data rcap; + struct scsi_read_capacity_data_long rcaplong; + union ccb *ccb; + int error; + + ccb = cam_getccb(dev); + if (ccb == NULL) + return (ENOMEM); + + /* Zero the rest of the ccb. */ + bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_scsiio) - + sizeof(struct ccb_hdr)); + + scsi_read_capacity(&ccb->csio, 1, NULL, MSG_SIMPLE_Q_TAG, &rcap, + SSD_FULL_SIZE, 5000); + + /* Disable freezing the device queue */ + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + + if (cam_send_ccb(dev, ccb) < 0) { + error = errno; + cam_freeccb(ccb); + return (error); + } + + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + cam_freeccb(ccb); + return (EIO); + } + cam_freeccb(ccb); + + /* + * A last block of 2^32-1 means that the true capacity is over 2TB, + * and we need to issue the long READ CAPACITY to get the real + * capacity. Otherwise, we're all set. + */ + if (scsi_4btoul(rcap.addr) != 0xffffffff) { + disk->maxlba = scsi_4btoul(rcap.addr); + return (0); + } + + /* Zero the rest of the ccb. */ + bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_scsiio) - + sizeof(struct ccb_hdr)); + + scsi_read_capacity_16(&ccb->csio, 1, NULL, MSG_SIMPLE_Q_TAG, 0, 0, 0, + &rcaplong, SSD_FULL_SIZE, 5000); + + /* Disable freezing the device queue */ + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + + if (cam_send_ccb(dev, ccb) < 0) { + error = errno; + cam_freeccb(ccb); + return (error); + } + + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + cam_freeccb(ccb); + return (EIO); + } + cam_freeccb(ccb); + + disk->maxlba = scsi_8btou64(rcaplong.addr); + return (0); +} + +/* Borrowed heavily from scsi_all.c:scsi_print_inquiry(). */ +static void +format_scsi_inquiry(struct mpt_standalone_disk *disk, + struct scsi_inquiry_data *inq_data) +{ + char vendor[16], product[48], revision[16], rstr[12]; + + if (SID_QUAL_IS_VENDOR_UNIQUE(inq_data)) + return; + if (SID_TYPE(inq_data) != T_DIRECT) + return; + if (SID_QUAL(inq_data) != SID_QUAL_LU_CONNECTED) + return; + + cam_strvis(vendor, inq_data->vendor, sizeof(inq_data->vendor), + sizeof(vendor)); + cam_strvis(product, inq_data->product, sizeof(inq_data->product), + sizeof(product)); + cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), + sizeof(revision)); + + /* Hack for SATA disks, no idea how to tell speed. */ + if (strcmp(vendor, "ATA") == 0) { + snprintf(disk->inqstring, sizeof(disk->inqstring), + "<%s %s> SATA", product, revision); + return; + } + + switch (SID_ANSI_REV(inq_data)) { + case SCSI_REV_CCS: + strcpy(rstr, "SCSI-CCS"); + break; + case 5: + strcpy(rstr, "SAS"); + break; + default: + snprintf(rstr, sizeof (rstr), "SCSI-%d", + SID_ANSI_REV(inq_data)); + break; + } + snprintf(disk->inqstring, sizeof(disk->inqstring), "<%s %s %s> %s", + vendor, product, revision, rstr); +} + +/* Much borrowed from scsiinquiry() in src/sbin/camcontrol/camcontrol.c. */ +static int +fetch_scsi_inquiry(struct cam_device *dev, struct mpt_standalone_disk *disk) +{ + struct scsi_inquiry_data *inq_buf; + union ccb *ccb; + int error; + + ccb = cam_getccb(dev); + if (ccb == NULL) + return (ENOMEM); + + /* Zero the rest of the ccb. */ + bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_scsiio) - + sizeof(struct ccb_hdr)); + + inq_buf = calloc(1, sizeof(*inq_buf)); + if (inq_buf == NULL) { + cam_freeccb(ccb); + return (ENOMEM); + } + scsi_inquiry(&ccb->csio, 1, NULL, MSG_SIMPLE_Q_TAG, (void *)inq_buf, + SHORT_INQUIRY_LENGTH, 0, 0, SSD_FULL_SIZE, 5000); + + /* Disable freezing the device queue */ + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + + if (cam_send_ccb(dev, ccb) < 0) { + error = errno; + free(inq_buf); + cam_freeccb(ccb); + return (error); + } + + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + free(inq_buf); + cam_freeccb(ccb); + return (EIO); + } + + cam_freeccb(ccb); + format_scsi_inquiry(disk, inq_buf); + free(inq_buf); + return (0); +} + +int +mpt_fetch_disks(int fd, int *ndisks, struct mpt_standalone_disk **disksp) +{ + CONFIG_PAGE_IOC_2 *ioc2; + struct mpt_standalone_disk *disks; + struct bus_match_pattern *b; + struct periph_match_pattern *p; + struct periph_match_result *r; + struct cam_device *dev; + union ccb ccb; + size_t bufsize; + u_int i; + int count; + + if (xpt_open() < 0) + return (ENXIO); + + for (count = 100;; count+= 100) { + /* Try to fetch 'count' disks in one go. */ + bzero(&ccb, sizeof(ccb)); + + ccb.ccb_h.func_code = XPT_DEV_MATCH; + + bufsize = sizeof(struct dev_match_result) * (count + 2); + ccb.cdm.num_matches = 0; + ccb.cdm.match_buf_len = bufsize; + ccb.cdm.matches = calloc(1, bufsize); + + bufsize = sizeof(struct dev_match_pattern) * 2; + ccb.cdm.num_patterns = 2; + ccb.cdm.pattern_buf_len = bufsize; + ccb.cdm.patterns = calloc(1, bufsize); + + /* Match mptX bus 0. */ + ccb.cdm.patterns[0].type = DEV_MATCH_BUS; + b = &ccb.cdm.patterns[0].pattern.bus_pattern; + snprintf(b->dev_name, sizeof(b->dev_name), "mpt"); + b->unit_number = mpt_unit; + b->bus_id = 0; + b->flags = BUS_MATCH_NAME | BUS_MATCH_UNIT | BUS_MATCH_BUS_ID; + + /* Match any "da" peripherals. */ + ccb.cdm.patterns[1].type = DEV_MATCH_PERIPH; + p = &ccb.cdm.patterns[1].pattern.periph_pattern; + snprintf(p->periph_name, sizeof(p->periph_name), "da"); + p->flags = PERIPH_MATCH_NAME; + + if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { + i = errno; + free(ccb.cdm.matches); + free(ccb.cdm.patterns); + return (i); + } + free(ccb.cdm.patterns); + + /* Check for CCB errors. */ + if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + free(ccb.cdm.matches); + return (EIO); + } + + /* If we need a longer list, try again. */ + if (ccb.cdm.status == CAM_DEV_MATCH_MORE) { + free(ccb.cdm.matches); + continue; + } + + /* If we got an error, abort. */ + if (ccb.cdm.status != CAM_DEV_MATCH_LAST) { + free(ccb.cdm.matches); + return (EIO); + } + break; + } + + /* + * We should have N + 1 matches, 1 for the bus and 1 for each + * "da" device. + */ + if (ccb.cdm.num_matches < 1) { + warnx("mpt_fetch_disks didn't get any matches"); + free(ccb.cdm.matches); + return (EIO); + } + if (ccb.cdm.matches[0].type != DEV_MATCH_BUS) { + warnx("mpt_fetch_disks got wrong CAM matches"); + free(ccb.cdm.matches); + return (EIO); + } + for (i = 1; i < ccb.cdm.num_matches; i++) { + if (ccb.cdm.matches[i].type != DEV_MATCH_PERIPH) { + warnx("mpt_fetch_disks got wrong CAM matches"); + free(ccb.cdm.matches); + return (EIO); + } + } + + /* Shortcut if we don't have any "da" devices. */ + if (ccb.cdm.num_matches == 1) { + free(ccb.cdm.matches); + *ndisks = 0; + *disksp = NULL; + return (0); + } + + /* + * Some of the "da" peripherals may be for RAID volumes, so + * fetch the IOC 2 page (list of RAID volumes) so we can + * exclude them from the list. + */ + ioc2 = mpt_read_ioc_page(fd, 2, NULL); + disks = calloc(ccb.cdm.num_matches, sizeof(*disks)); + count = 0; + for (i = 1; i < ccb.cdm.num_matches; i++) { + r = &ccb.cdm.matches[i].result.periph_result; + if (periph_is_volume(ioc2, r)) + continue; + disks[count].bus = 0; + disks[count].target = r->target_id; + snprintf(disks[count].devname, sizeof(disks[count].devname), + "%s%d", r->periph_name, r->unit_number); + + dev = cam_open_device(disks[count].devname, O_RDWR); + if (dev != NULL) { + fetch_scsi_capacity(dev, &disks[count]); + fetch_scsi_inquiry(dev, &disks[count]); + cam_close_device(dev); + } + count++; + } + free(ccb.cdm.matches); + free(ioc2); + + *ndisks = count; + *disksp = disks; + return (0); +} + +/* + * Instruct the mpt(4) device to rescan its busses to find new devices + * such as disks whose RAID physdisk page was removed or volumes that + * were created. If id is -1, the entire bus is rescanned. + * Otherwise, only devices at the specified ID are rescanned. If bus + * is -1, then all busses are scanned instead of the specified bus. + * Note that currently, only bus 0 is supported. + */ +int +mpt_rescan_bus(int bus, int id) +{ + struct bus_match_pattern *b; + union ccb ccb; + path_id_t path_id; + size_t bufsize; + + /* mpt(4) only handles devices on bus 0. */ + if (bus != -1 && bus != 0) + return (EINVAL); + + if (xpt_open() < 0) + return (ENXIO); + + /* First, find the path id of bus 0 for this mpt controller. */ + bzero(&ccb, sizeof(ccb)); + + ccb.ccb_h.func_code = XPT_DEV_MATCH; + + bufsize = sizeof(struct dev_match_result) * 1; + ccb.cdm.num_matches = 0; + ccb.cdm.match_buf_len = bufsize; + ccb.cdm.matches = calloc(1, bufsize); + + bufsize = sizeof(struct dev_match_pattern) * 1; + ccb.cdm.num_patterns = 1; + ccb.cdm.pattern_buf_len = bufsize; + ccb.cdm.patterns = calloc(1, bufsize); + + /* Match mptX bus 0. */ + ccb.cdm.patterns[0].type = DEV_MATCH_BUS; + b = &ccb.cdm.patterns[0].pattern.bus_pattern; + snprintf(b->dev_name, sizeof(b->dev_name), "mpt"); + b->unit_number = mpt_unit; + b->bus_id = 0; + b->flags = BUS_MATCH_NAME | BUS_MATCH_UNIT | BUS_MATCH_BUS_ID; + + if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { + free(ccb.cdm.matches); + free(ccb.cdm.patterns); + return (errno); + } + free(ccb.cdm.patterns); + + if (((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) || + (ccb.cdm.status != CAM_DEV_MATCH_LAST)) { + warnx("mpt_rescan_bus got CAM error %#x, CDM error %d\n", + ccb.ccb_h.status, ccb.cdm.status); + free(ccb.cdm.matches); + return (EIO); + } + + /* We should have exactly 1 match for the bus. */ + if (ccb.cdm.num_matches != 1 || + ccb.cdm.matches[0].type != DEV_MATCH_BUS) { + free(ccb.cdm.matches); + return (ENOENT); + } + path_id = ccb.cdm.matches[0].result.bus_result.path_id; + free(ccb.cdm.matches); + + /* Now perform the actual rescan. */ + ccb.ccb_h.path_id = path_id; + if (id == -1) { + ccb.ccb_h.func_code = XPT_SCAN_BUS; + ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; + ccb.ccb_h.timeout = 5000; + } else { + ccb.ccb_h.func_code = XPT_SCAN_LUN; + ccb.ccb_h.target_id = id; + ccb.ccb_h.target_lun = 0; + } + ccb.crcn.flags = CAM_FLAG_NONE; + + /* Run this at a low priority. */ + ccb.ccb_h.pinfo.priority = 5; + + if (ioctl(xptfd, CAMIOCOMMAND, &ccb) == -1) + return (errno); + + if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + warnx("mpt_rescan_bus rescan got CAM error %#x\n", + ccb.ccb_h.status & CAM_STATUS_MASK); + return (EIO); + } + + return (0); +} Added: head/usr.sbin/mptutil/mpt_cmd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mptutil/mpt_cmd.c Fri Aug 14 13:13:12 2009 (r196212) @@ -0,0 +1,639 @@ +/*- + * Copyright (c) 2008 Yahoo!, Inc. + * All rights reserved. + * Written by: John Baldwin + * + * 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. 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 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 +__RCSID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "mptutil.h" + +static const char *mpt_ioc_status_codes[] = { + "Success", /* 0x0000 */ + "Invalid function", + "Busy", + "Invalid scatter-gather list", + "Internal error", + "Reserved", + "Insufficient resources", + "Invalid field", + "Invalid state", /* 0x0008 */ + "Operation state not supported", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, /* 0x0010 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, /* 0x0018 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "Invalid configuration action", /* 0x0020 */ + "Invalid configuration type", + "Invalid configuration page", + "Invalid configuration data", + "No configuration defaults", + "Unable to commit configuration change", + NULL, + NULL, + NULL, /* 0x0028 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, /* 0x0030 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, /* 0x0038 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "Recovered SCSI error", /* 0x0040 */ + "Invalid SCSI bus", + "Invalid SCSI target ID", + "SCSI device not there", + "SCSI data overrun", + "SCSI data underrun", + "SCSI I/O error", + "SCSI protocol error", + "SCSI task terminated", /* 0x0048 */ + "SCSI residual mismatch", + "SCSI task management failed", + "SCSI I/O controller terminated", + "SCSI external controller terminated", + "EEDP guard error", + "EEDP reference tag error", + "EEDP application tag error", + NULL, /* 0x0050 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, /* 0x0058 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "SCSI target priority I/O", /* 0x0060 */ + "Invalid SCSI target port", + "Invalid SCSI target I/O index", + "SCSI target aborted", + "No connection retryable", + "No connection", + "FC aborted", + "Invalid FC receive ID", + "FC did invalid", /* 0x0068 */ + "FC node logged out", + "Transfer count mismatch", + "STS data not set", + "FC exchange canceled", + "Data offset error", + "Too much write data", + "IU too short", + "ACK NAK timeout", /* 0x0070 */ + "NAK received", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, /* 0x0078 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "LAN device not found", /* 0x0080 */ + "LAN device failure", + "LAN transmit error", + "LAN transmit aborted", + "LAN receive error", + "LAN receive aborted", + "LAN partial packet", + "LAN canceled", + NULL, /* 0x0088 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "SAS SMP request failed", /* 0x0090 */ + "SAS SMP data overrun", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "Inband aborted", /* 0x0098 */ + "No inband connection", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "Diagnostic released", /* 0x00A0 */ +}; + +static const char *mpt_raid_action_status_codes[] = { + "Success", + "Invalid action", + "Failure", + "Operation in progress", +}; + +const char * +mpt_ioc_status(U16 IOCStatus) +{ + static char buffer[16]; + + IOCStatus &= MPI_IOCSTATUS_MASK; + if (IOCStatus < sizeof(mpt_ioc_status_codes) / sizeof(char *) && + mpt_ioc_status_codes[IOCStatus] != NULL) + return (mpt_ioc_status_codes[IOCStatus]); + snprintf(buffer, sizeof(buffer), "Status: 0x%04x", IOCStatus); + return (buffer); +} + +const char * +mpt_raid_status(U16 ActionStatus) +{ + static char buffer[16]; + + if (ActionStatus < sizeof(mpt_raid_action_status_codes) / + sizeof(char *)) + return (mpt_raid_action_status_codes[ActionStatus]); + snprintf(buffer, sizeof(buffer), "Status: 0x%04x", ActionStatus); + return (buffer); +} + +const char * +mpt_raid_level(U8 VolumeType) +{ + static char buf[16]; + + switch (VolumeType) { + case MPI_RAID_VOL_TYPE_IS: + return ("RAID-0"); + case MPI_RAID_VOL_TYPE_IM: + return ("RAID-1"); + case MPI_RAID_VOL_TYPE_IME: + return ("RAID-1E"); + case MPI_RAID_VOL_TYPE_RAID_5: + return ("RAID-5"); + case MPI_RAID_VOL_TYPE_RAID_6: + return ("RAID-6"); + case MPI_RAID_VOL_TYPE_RAID_10: + return ("RAID-10"); + case MPI_RAID_VOL_TYPE_RAID_50: + return ("RAID-50"); + default: + sprintf(buf, "LVL 0x%02x", VolumeType); + return (buf); + } +} + +const char * +mpt_volume_name(U8 VolumeBus, U8 VolumeID) +{ + static struct mpt_query_disk info; + static char buf[16]; + + if (mpt_query_disk(VolumeBus, VolumeID, &info) != 0) { + /* + * We only print out the bus number if it is non-zero + * since mpt(4) only supports devices on bus zero + * anyway. + */ + if (VolumeBus == 0) + snprintf(buf, sizeof(buf), "%d", VolumeID); + else + snprintf(buf, sizeof(buf), "%d:%d", VolumeBus, + VolumeID); + return (buf); + } + return (info.devname); +} + +int +mpt_lookup_volume(int fd, const char *name, U8 *VolumeBus, U8 *VolumeID) +{ + CONFIG_PAGE_IOC_2 *ioc2; + CONFIG_PAGE_IOC_2_RAID_VOL *vol; + struct mpt_query_disk info; + char *cp; + long bus, id; + int i; + + /* + * Check for a raw [:] string. If the bus is not + * specified, assume bus 0. + */ + bus = strtol(name, &cp, 0); + if (*cp == ':') { + id = strtol(cp + 1, &cp, 0); + if (*cp == '\0') { + if (bus < 0 || bus > 0xff || id < 0 || id > 0xff) { + errno = EINVAL; + return (-1); + } + *VolumeBus = bus; + *VolumeID = id; + return (0); + } + } else if (*cp == '\0') { + if (bus < 0 || bus > 0xff) { + errno = EINVAL; + return (-1); + } + *VolumeBus = 0; + *VolumeID = bus; + return (0); + } + + ioc2 = mpt_read_ioc_page(fd, 2, NULL); + if (ioc2 == NULL) + return (-1); + + vol = ioc2->RaidVolume; + for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) { + if (mpt_query_disk(vol->VolumeBus, vol->VolumeID, &info) != 0) + continue; + if (strcmp(name, info.devname) == 0) { + *VolumeBus = vol->VolumeBus; + *VolumeID = vol->VolumeID; + free(ioc2); + return (0); + } + } + free(ioc2); + errno = EINVAL; + return (-1); +} + +int +mpt_read_config_page_header(int fd, U8 PageType, U8 PageNumber, U32 PageAddress, + CONFIG_PAGE_HEADER *header, U16 *IOCStatus) +{ + struct mpt_cfg_page_req req; + + if (IOCStatus != NULL) + *IOCStatus = MPI_IOCSTATUS_SUCCESS; + bzero(&req, sizeof(req)); + req.header.PageType = PageType; + req.header.PageNumber = PageNumber; + req.page_address = PageAddress; + if (ioctl(fd, MPTIO_READ_CFG_HEADER, &req) < 0) + return (-1); + if (!IOC_STATUS_SUCCESS(req.ioc_status)) { + if (IOCStatus != NULL) + *IOCStatus = req.ioc_status; + else + warnx("Reading config page header failed: %s", + mpt_ioc_status(req.ioc_status)); + errno = EIO; + return (-1); + } + *header = req.header; + return (0); +} + +void * +mpt_read_config_page(int fd, U8 PageType, U8 PageNumber, U32 PageAddress, + U16 *IOCStatus) +{ + struct mpt_cfg_page_req req; + void *buf; + int save_errno; + + if (IOCStatus != NULL) + *IOCStatus = MPI_IOCSTATUS_SUCCESS; + bzero(&req, sizeof(req)); + req.header.PageType = PageType; + req.header.PageNumber = PageNumber; + req.page_address = PageAddress; + if (ioctl(fd, MPTIO_READ_CFG_HEADER, &req) < 0) + return (NULL); + if (!IOC_STATUS_SUCCESS(req.ioc_status)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 13:13:44 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55F54106568E; Fri, 14 Aug 2009 13:13:44 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 06DAC8FC3D; Fri, 14 Aug 2009 13:13:43 +0000 (UTC) Received: from phobos.local (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n7EDDdgU070476; Fri, 14 Aug 2009 07:13:39 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4A856303.6050000@samsco.org> Date: Fri, 14 Aug 2009 07:13:39 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: =?UTF-8?B?RGFuaWVsIEdlcsW+bw==?= References: <200908132318.n7DNIjvO015601@svn.freebsd.org> <4A852FDF.5060709@rulez.sk> In-Reply-To: <4A852FDF.5060709@rulez.sk> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-65.4 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Scott Long Subject: Re: svn commit: r196200 - in head: etc/mtree include sys/dev/mfi usr.sbin usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 13:13:44 -0000 Daniel Geržo wrote: > Scott Long wrote: >> Author: scottl >> Date: Thu Aug 13 23:18:45 2009 >> New Revision: 196200 >> URL: http://svn.freebsd.org/changeset/base/196200 >> >> Log: >> ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell >> PERC5/6 >> controllers. Controller, array, and drive status can be checked, basic >> attributes can be changed, and arrays and spares can be created and >> deleted. >> Controller firmware can also be flashed. >> This does not replace MegaCLI, found in ports, as that is >> officially sanctioned >> and supported by LSI and includes vastly more functionality. >> However, mfiutil >> is open source and guaranteed to provide basic functionality, which >> can be >> especially useful if you have a problem and can't get MegaCLI to work. > > Is this MFC-able to stable/7 and stable/8? Yes. Scott From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 13:24:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B7DC106568B; Fri, 14 Aug 2009 13:24:44 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A02A8FC45; Fri, 14 Aug 2009 13:24: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 n7EDOi70035236; Fri, 14 Aug 2009 13:24:44 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EDOi2r035234; Fri, 14 Aug 2009 13:24:44 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200908141324.n7EDOi2r035234@svn.freebsd.org> From: Colin Percival Date: Fri, 14 Aug 2009 13:24: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: r196213 - 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: Fri, 14 Aug 2009 13:24:44 -0000 Author: cperciva Date: Fri Aug 14 13:24:44 2009 New Revision: 196213 URL: http://svn.freebsd.org/changeset/base/196213 Log: Make sysinstall recognize /dev/ada* disk devices. The description string "SATA disk device" reflects the current state of /dev/ada*; this may be changed in the future if other drive types start appearing as /dev/ada*. Submitted by: randi Details about what disks can appear as /dev/ada* supplied by: scottl Approved by: re (rwatson) Modified: head/usr.sbin/sysinstall/devices.c Modified: head/usr.sbin/sysinstall/devices.c ============================================================================== --- head/usr.sbin/sysinstall/devices.c Fri Aug 14 13:13:12 2009 (r196212) +++ head/usr.sbin/sysinstall/devices.c Fri Aug 14 13:24:44 2009 (r196213) @@ -80,6 +80,7 @@ static struct _devname { CDROM("acd%d", "ATAPI/IDE CDROM", 4), DISK("da%d", "SCSI disk device", 16), DISK("ad%d", "ATA/IDE disk device", 16), + DISK("ada%d", "SATA disk device", 16), DISK("ar%d", "ATA/IDE RAID device", 16), DISK("afd%d", "ATAPI/IDE floppy device", 4), DISK("mlxd%d", "Mylex RAID disk", 4), From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 13:26:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80B75106568B; Fri, 14 Aug 2009 13:26:50 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E9148FC4D; Fri, 14 Aug 2009 13:26: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 n7EDQoh8035357; Fri, 14 Aug 2009 13:26:50 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EDQoSC035355; Fri, 14 Aug 2009 13:26:50 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200908141326.n7EDQoSC035355@svn.freebsd.org> From: Colin Percival Date: Fri, 14 Aug 2009 13:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196214 - stable/8/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: Fri, 14 Aug 2009 13:26:50 -0000 Author: cperciva Date: Fri Aug 14 13:26:50 2009 New Revision: 196214 URL: http://svn.freebsd.org/changeset/base/196214 Log: Merge r196213 to stable/8. Approved by: re (rwatson) Modified: stable/8/usr.sbin/sysinstall/ (props changed) stable/8/usr.sbin/sysinstall/devices.c Modified: stable/8/usr.sbin/sysinstall/devices.c ============================================================================== --- stable/8/usr.sbin/sysinstall/devices.c Fri Aug 14 13:24:44 2009 (r196213) +++ stable/8/usr.sbin/sysinstall/devices.c Fri Aug 14 13:26:50 2009 (r196214) @@ -80,6 +80,7 @@ static struct _devname { CDROM("acd%d", "ATAPI/IDE CDROM", 4), DISK("da%d", "SCSI disk device", 16), DISK("ad%d", "ATA/IDE disk device", 16), + DISK("ada%d", "SATA disk device", 16), DISK("ar%d", "ATA/IDE RAID device", 16), DISK("afd%d", "ATAPI/IDE floppy device", 4), DISK("mlxd%d", "Mylex RAID disk", 4), From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 13:27:40 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84729106564A; Fri, 14 Aug 2009 13:27:40 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 264C28FC59; Fri, 14 Aug 2009 13:27:39 +0000 (UTC) Received: from phobos.local (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n7EDRZrN071485; Fri, 14 Aug 2009 07:27:35 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4A856647.7030100@samsco.org> Date: Fri, 14 Aug 2009 07:27:35 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Colin Percival References: <200908141324.n7EDOi2r035234@svn.freebsd.org> In-Reply-To: <200908141324.n7EDOi2r035234@svn.freebsd.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-19.5 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196213 - 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: Fri, 14 Aug 2009 13:27:40 -0000 Colin Percival wrote: > Author: cperciva > Date: Fri Aug 14 13:24:44 2009 > New Revision: 196213 > URL: http://svn.freebsd.org/changeset/base/196213 > > Log: > Make sysinstall recognize /dev/ada* disk devices. The description string > "SATA disk device" reflects the current state of /dev/ada*; this may be > changed in the future if other drive types start appearing as /dev/ada*. > > Submitted by: randi > Details about what disks can appear as /dev/ada* supplied by: scottl > Approved by: re (rwatson) > > Modified: > head/usr.sbin/sysinstall/devices.c > > Modified: head/usr.sbin/sysinstall/devices.c > ============================================================================== > --- head/usr.sbin/sysinstall/devices.c Fri Aug 14 13:13:12 2009 (r196212) > +++ head/usr.sbin/sysinstall/devices.c Fri Aug 14 13:24:44 2009 (r196213) > @@ -80,6 +80,7 @@ static struct _devname { > CDROM("acd%d", "ATAPI/IDE CDROM", 4), > DISK("da%d", "SCSI disk device", 16), > DISK("ad%d", "ATA/IDE disk device", 16), > + DISK("ada%d", "SATA disk device", 16), > DISK("ar%d", "ATA/IDE RAID device", 16), > DISK("afd%d", "ATAPI/IDE floppy device", 4), > DISK("mlxd%d", "Mylex RAID disk", 4), Note that there's still a possibility that 'ada' will go away in the future. Scott From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 13:28:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED3A5106568E; Fri, 14 Aug 2009 13:28:51 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C4E8D8FC52; Fri, 14 Aug 2009 13:28:51 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 5E52B46B06; Fri, 14 Aug 2009 09:28:51 -0400 (EDT) Date: Fri, 14 Aug 2009 14:28:51 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Nick Hibma In-Reply-To: <20090813083236.GR1884@deviant.kiev.zoral.com.ua> Message-ID: References: <200908130824.n7D8OwO9093632@svn.freebsd.org> <20090813083236.GR1884@deviant.kiev.zoral.com.ua> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Kostik Belousov , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r196170 - stable/7/sys/dev/firewire X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 13:28:52 -0000 On Thu, 13 Aug 2009, Kostik Belousov wrote: >> Log: >> Compact some output. Move some behind bootverbose. >> >> Modified: >> stable/7/sys/dev/firewire/fwohci.c >> > Please revert this commit and your previous r196169. Patches shall go into > HEAD first and then merged back to stable branch after settle period. > > [I consider USB changes as relevant only to stable/7, due to new USB stack > in HEAD ?]. You have received several requests to backout your changes, including this one from a member of the release engineering team. Please comply. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 13:34:07 2009 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 94B861065692 for ; Fri, 14 Aug 2009 13:34:07 +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 3CE8816050F for ; Fri, 14 Aug 2009 13:34:07 +0000 (UTC) Received: (qmail 68915 invoked from network); 14 Aug 2009 13:34:06 -0000 Received: from unknown (HELO xps.daemonology.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2009 13:34:06 -0000 Message-ID: <4A8567CE.4010400@freebsd.org> Date: Fri, 14 Aug 2009 06:34:06 -0700 From: Colin Percival User-Agent: Thunderbird 2.0.0.22 (X11/20090808) MIME-Version: 1.0 To: Scott Long References: <200908141324.n7EDOi2r035234@svn.freebsd.org> <4A856647.7030100@samsco.org> In-Reply-To: <4A856647.7030100@samsco.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196213 - 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: Fri, 14 Aug 2009 13:34:07 -0000 Scott Long wrote: > Colin Percival wrote: >> Log: >> Make sysinstall recognize /dev/ada* disk devices. The description >> string >> "SATA disk device" reflects the current state of /dev/ada*; this may be >> changed in the future if other drive types start appearing as >> /dev/ada*. >> Submitted by: randi >> Details about what disks can appear as /dev/ada* supplied by: scottl >> Approved by: re (rwatson) > > Note that there's still a possibility that 'ada' will go away in the > future. Oops. Quite right, I intended to mention both the possibility of more devices appearing as /dev/ada* and also the possibility of fewer devices appearing as /dev/ada*, but I forgot about the second half of that when I sat down to write the commit log. -- 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 Aug 14 18:18:52 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1932F106568B; Fri, 14 Aug 2009 18:18:52 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 087758FC16; Fri, 14 Aug 2009 18:18:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EIIphS043808; Fri, 14 Aug 2009 18:18:51 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EIIpxZ043806; Fri, 14 Aug 2009 18:18:51 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200908141818.n7EIIpxZ043806@svn.freebsd.org> From: Remko Lodder Date: Fri, 14 Aug 2009 18:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196216 - head/usr.sbin/arp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 18:18:52 -0000 Author: remko Date: Fri Aug 14 18:18:51 2009 New Revision: 196216 URL: http://svn.freebsd.org/changeset/base/196216 Log: Remove bogus char cast. PR: 118014 Submitted by: Gardner Bell Approved by: re (rwatson), imp (mentor, implicit) MFC after: immediate Modified: head/usr.sbin/arp/arp.c Modified: head/usr.sbin/arp/arp.c ============================================================================== --- head/usr.sbin/arp/arp.c Fri Aug 14 16:15:18 2009 (r196215) +++ head/usr.sbin/arp/arp.c Fri Aug 14 18:18:51 2009 (r196216) @@ -120,7 +120,7 @@ main(int argc, char *argv[]) int aflag = 0; /* do it for all entries */ while ((ch = getopt(argc, argv, "andfsSi:")) != -1) - switch((char)ch) { + switch(ch) { case 'a': aflag = 1; break; From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 19:30:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8357106568B; Fri, 14 Aug 2009 19:30:59 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6FCB8FC3D; Fri, 14 Aug 2009 19:30: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 n7EJUxO9045350; Fri, 14 Aug 2009 19:30:59 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EJUxCf045348; Fri, 14 Aug 2009 19:30:59 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200908141930.n7EJUxCf045348@svn.freebsd.org> From: Remko Lodder Date: Fri, 14 Aug 2009 19:30: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: r196217 - stable/8/usr.sbin/arp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 19:31:00 -0000 Author: remko Date: Fri Aug 14 19:30:59 2009 New Revision: 196217 URL: http://svn.freebsd.org/changeset/base/196217 Log: Remove bogus char cast. PR: 118014 Submitted by: Gardner Bell Approved by: re (rwatson), imp (mentor, implicit) MFC after: immediate Approved by: re (rwatson), imp (mentor, implicit) Modified: stable/8/usr.sbin/arp/ (props changed) stable/8/usr.sbin/arp/arp.c Modified: stable/8/usr.sbin/arp/arp.c ============================================================================== --- stable/8/usr.sbin/arp/arp.c Fri Aug 14 18:18:51 2009 (r196216) +++ stable/8/usr.sbin/arp/arp.c Fri Aug 14 19:30:59 2009 (r196217) @@ -120,7 +120,7 @@ main(int argc, char *argv[]) int aflag = 0; /* do it for all entries */ while ((ch = getopt(argc, argv, "andfsSi:")) != -1) - switch((char)ch) { + switch(ch) { case 'a': aflag = 1; break; From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 19:36:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 497CD1065693; Fri, 14 Aug 2009 19:36:55 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3877B8FC51; Fri, 14 Aug 2009 19:36:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EJatWT045527; Fri, 14 Aug 2009 19:36:55 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EJatN2045525; Fri, 14 Aug 2009 19:36:55 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200908141936.n7EJatN2045525@svn.freebsd.org> From: Remko Lodder Date: Fri, 14 Aug 2009 19:36: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: r196218 - stable/7/usr.sbin/arp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 19:36:55 -0000 Author: remko Date: Fri Aug 14 19:36:54 2009 New Revision: 196218 URL: http://svn.freebsd.org/changeset/base/196218 Log: Remove bogus char cast. PR: 118014 Submitted by: Gardner Bell Approved by: re (rwatson), imp (mentor, implicit) MFC after: immediate Approved by: imp (mentor, implicit) Modified: stable/7/usr.sbin/arp/ (props changed) stable/7/usr.sbin/arp/arp.c Modified: stable/7/usr.sbin/arp/arp.c ============================================================================== --- stable/7/usr.sbin/arp/arp.c Fri Aug 14 19:30:59 2009 (r196217) +++ stable/7/usr.sbin/arp/arp.c Fri Aug 14 19:36:54 2009 (r196218) @@ -120,7 +120,7 @@ main(int argc, char *argv[]) int aflag = 0; /* do it for all entries */ while ((ch = getopt(argc, argv, "andfsSi:")) != -1) - switch((char)ch) { + switch(ch) { case 'a': aflag = 1; break; From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 20:03:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1FBC106568B; Fri, 14 Aug 2009 20:03:53 +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 8DEF88FC51; Fri, 14 Aug 2009 20:03: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 n7EK3rNv046081; Fri, 14 Aug 2009 20:03:53 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EK3r82046080; Fri, 14 Aug 2009 20:03:53 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908142003.n7EK3r82046080@svn.freebsd.org> From: John Baldwin Date: Fri, 14 Aug 2009 20:03: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: r196219 - in head/sys: dev/ata dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/misc dev/usb/net dev/usb/quirk dev/usb/serial dev/usb/storage dev/usb/template dev/usb/wlan... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 20:03:53 -0000 Author: jhb Date: Fri Aug 14 20:03:53 2009 New Revision: 196219 URL: http://svn.freebsd.org/changeset/base/196219 Log: Purge mergeinfo from files that were temporarily renamed while USB2 was imported into the tree alongside USB. Approved by: re (mergeinfo blanket) Modified: head/sys/dev/ata/ata-usb.c (props changed) head/sys/dev/sound/usb/uaudio.c (props changed) head/sys/dev/sound/usb/uaudio.h (props changed) head/sys/dev/sound/usb/uaudio_pcm.c (props changed) head/sys/dev/sound/usb/uaudioreg.h (props changed) head/sys/dev/usb/controller/at91dci.c (props changed) head/sys/dev/usb/controller/at91dci.h (props changed) head/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) head/sys/dev/usb/controller/atmegadci.c (props changed) head/sys/dev/usb/controller/atmegadci.h (props changed) head/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) head/sys/dev/usb/controller/ehci.c (props changed) head/sys/dev/usb/controller/ehci.h (props changed) head/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) head/sys/dev/usb/controller/ehci_mbus.c (props changed) head/sys/dev/usb/controller/ehci_pci.c (props changed) head/sys/dev/usb/controller/musb_otg.c (props changed) head/sys/dev/usb/controller/musb_otg.h (props changed) head/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) head/sys/dev/usb/controller/ohci.c (props changed) head/sys/dev/usb/controller/ohci.h (props changed) head/sys/dev/usb/controller/ohci_atmelarm.c (props changed) head/sys/dev/usb/controller/ohci_pci.c (props changed) head/sys/dev/usb/controller/uhci.c (props changed) head/sys/dev/usb/controller/uhci.h (props changed) head/sys/dev/usb/controller/uhci_pci.c (props changed) head/sys/dev/usb/controller/usb_controller.c (props changed) head/sys/dev/usb/controller/uss820dci.c (props changed) head/sys/dev/usb/controller/uss820dci.h (props changed) head/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) head/sys/dev/usb/input/uhid.c (props changed) head/sys/dev/usb/input/ukbd.c (props changed) head/sys/dev/usb/input/ums.c (props changed) head/sys/dev/usb/input/usb_rdesc.h (props changed) head/sys/dev/usb/misc/udbp.c (props changed) head/sys/dev/usb/misc/udbp.h (props changed) head/sys/dev/usb/misc/ufm.c (props changed) head/sys/dev/usb/net/if_aue.c (props changed) head/sys/dev/usb/net/if_auereg.h (props changed) head/sys/dev/usb/net/if_axe.c (props changed) head/sys/dev/usb/net/if_axereg.h (props changed) head/sys/dev/usb/net/if_cdce.c (props changed) head/sys/dev/usb/net/if_cdcereg.h (props changed) head/sys/dev/usb/net/if_cue.c (props changed) head/sys/dev/usb/net/if_cuereg.h (props changed) head/sys/dev/usb/net/if_kue.c (props changed) head/sys/dev/usb/net/if_kuefw.h (props changed) head/sys/dev/usb/net/if_kuereg.h (props changed) head/sys/dev/usb/net/if_rue.c (props changed) head/sys/dev/usb/net/if_ruereg.h (props changed) head/sys/dev/usb/net/if_udav.c (props changed) head/sys/dev/usb/net/if_udavreg.h (props changed) head/sys/dev/usb/net/usb_ethernet.c (props changed) head/sys/dev/usb/net/usb_ethernet.h (props changed) head/sys/dev/usb/quirk/usb_quirk.c (props changed) head/sys/dev/usb/quirk/usb_quirk.h (props changed) head/sys/dev/usb/serial/u3g.c (props changed) head/sys/dev/usb/serial/uark.c (props changed) head/sys/dev/usb/serial/ubsa.c (props changed) head/sys/dev/usb/serial/ubser.c (props changed) head/sys/dev/usb/serial/uchcom.c (props changed) head/sys/dev/usb/serial/ucycom.c (props changed) head/sys/dev/usb/serial/ufoma.c (props changed) head/sys/dev/usb/serial/uftdi.c (props changed) head/sys/dev/usb/serial/uftdi_reg.h (props changed) head/sys/dev/usb/serial/ugensa.c (props changed) head/sys/dev/usb/serial/uipaq.c (props changed) head/sys/dev/usb/serial/ulpt.c (props changed) head/sys/dev/usb/serial/umct.c (props changed) head/sys/dev/usb/serial/umodem.c (props changed) head/sys/dev/usb/serial/umoscom.c (props changed) head/sys/dev/usb/serial/uplcom.c (props changed) head/sys/dev/usb/serial/usb_serial.c (props changed) head/sys/dev/usb/serial/usb_serial.h (props changed) head/sys/dev/usb/serial/uslcom.c (props changed) head/sys/dev/usb/serial/uvisor.c (props changed) head/sys/dev/usb/serial/uvscom.c (props changed) head/sys/dev/usb/storage/rio500_usb.h (props changed) head/sys/dev/usb/storage/umass.c (props changed) head/sys/dev/usb/storage/urio.c (props changed) head/sys/dev/usb/storage/ustorage_fs.c (props changed) head/sys/dev/usb/template/usb_template.c (props changed) head/sys/dev/usb/template/usb_template.h (props changed) head/sys/dev/usb/template/usb_template_cdce.c (props changed) head/sys/dev/usb/template/usb_template_msc.c (props changed) head/sys/dev/usb/template/usb_template_mtp.c (props changed) head/sys/dev/usb/ufm_ioctl.h (props changed) head/sys/dev/usb/usb.h (props changed) head/sys/dev/usb/usb_bus.h (props changed) head/sys/dev/usb/usb_busdma.c (props changed) head/sys/dev/usb/usb_busdma.h (props changed) head/sys/dev/usb/usb_cdc.h (props changed) head/sys/dev/usb/usb_compat_linux.c (props changed) head/sys/dev/usb/usb_compat_linux.h (props changed) head/sys/dev/usb/usb_controller.h (props changed) head/sys/dev/usb/usb_core.c (props changed) head/sys/dev/usb/usb_core.h (props changed) head/sys/dev/usb/usb_debug.c (props changed) head/sys/dev/usb/usb_debug.h (props changed) head/sys/dev/usb/usb_dev.c (props changed) head/sys/dev/usb/usb_dev.h (props changed) head/sys/dev/usb/usb_device.c (props changed) head/sys/dev/usb/usb_device.h (props changed) head/sys/dev/usb/usb_dynamic.c (props changed) head/sys/dev/usb/usb_dynamic.h (props changed) head/sys/dev/usb/usb_endian.h (props changed) head/sys/dev/usb/usb_error.c (props changed) head/sys/dev/usb/usb_generic.c (props changed) head/sys/dev/usb/usb_generic.h (props changed) head/sys/dev/usb/usb_handle_request.c (props changed) head/sys/dev/usb/usb_hid.c (props changed) head/sys/dev/usb/usb_hub.c (props changed) head/sys/dev/usb/usb_hub.h (props changed) head/sys/dev/usb/usb_if.m (props changed) head/sys/dev/usb/usb_ioctl.h (props changed) head/sys/dev/usb/usb_lookup.c (props changed) head/sys/dev/usb/usb_mbuf.c (props changed) head/sys/dev/usb/usb_mbuf.h (props changed) head/sys/dev/usb/usb_msctest.c (props changed) head/sys/dev/usb/usb_msctest.h (props changed) head/sys/dev/usb/usb_parse.c (props changed) head/sys/dev/usb/usb_pci.h (props changed) head/sys/dev/usb/usb_process.c (props changed) head/sys/dev/usb/usb_process.h (props changed) head/sys/dev/usb/usb_request.c (props changed) head/sys/dev/usb/usb_request.h (props changed) head/sys/dev/usb/usb_transfer.c (props changed) head/sys/dev/usb/usb_transfer.h (props changed) head/sys/dev/usb/usb_util.c (props changed) head/sys/dev/usb/usb_util.h (props changed) head/sys/dev/usb/usbdevs (props changed) head/sys/dev/usb/usbhid.h (props changed) head/sys/dev/usb/wlan/if_rum.c (props changed) head/sys/dev/usb/wlan/if_rumfw.h (props changed) head/sys/dev/usb/wlan/if_rumreg.h (props changed) head/sys/dev/usb/wlan/if_rumvar.h (props changed) head/sys/dev/usb/wlan/if_ural.c (props changed) head/sys/dev/usb/wlan/if_uralreg.h (props changed) head/sys/dev/usb/wlan/if_uralvar.h (props changed) head/sys/dev/usb/wlan/if_zyd.c (props changed) head/sys/dev/usb/wlan/if_zydfw.h (props changed) head/sys/dev/usb/wlan/if_zydreg.h (props changed) head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) head/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 20:09:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D60E106568B; Fri, 14 Aug 2009 20:09:32 +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 48D6E8FC65; Fri, 14 Aug 2009 20:09: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 n7EK9Wan046244; Fri, 14 Aug 2009 20:09:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EK9Wac046243; Fri, 14 Aug 2009 20:09:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908142009.n7EK9Wac046243@svn.freebsd.org> From: John Baldwin Date: Fri, 14 Aug 2009 20:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196220 - in stable/8/sys: dev/ata dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/misc dev/usb/net dev/usb/quirk dev/usb/serial dev/usb/storage dev/usb/template 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, 14 Aug 2009 20:09:32 -0000 Author: jhb Date: Fri Aug 14 20:09:31 2009 New Revision: 196220 URL: http://svn.freebsd.org/changeset/base/196220 Log: MFC: Purge mergeinfo from files that were temporarily renamed while USB2 was imported into the tree alongside USB. Approved by: re (mergeinfo blanket) Modified: stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 20:35:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04DDE106568F; Fri, 14 Aug 2009 20:35:43 +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 E88398FC4D; Fri, 14 Aug 2009 20:35: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 n7EKZgBD046899; Fri, 14 Aug 2009 20:35:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EKZgfS046896; Fri, 14 Aug 2009 20:35:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908142035.n7EKZgfS046896@svn.freebsd.org> From: John Baldwin Date: Fri, 14 Aug 2009 20:35: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: r196221 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 20:35:43 -0000 Author: jhb Date: Fri Aug 14 20:35:42 2009 New Revision: 196221 URL: http://svn.freebsd.org/changeset/base/196221 Log: Add the ability to build a release from an SVN checkout instead of a CVS checkout. If SVNROOT is specified, then the source tree will be checked out from that SVN repository instead of using CVS. ports and docs still use CVS. If SVNROOT is not specified, then the source tree will be checked out using CVS. An explicit SVN branch can be specified using SVNBRANCH (e.g. SVNBRANCH=stable/8). If SVNBRANCH is not set but RELEASETAG is set to a CVS branch (such as RELENG_8) the appropriate SVN branch will be inferred from the CVS branch using svnbranch.awk. Note that there are still several open questions about using SVN instead of CVS in the release process. However, this does enable one to build a release from an SVN repository if needed. Approved by: re (kensmith) Added: head/release/svnbranch.awk (contents, props changed) Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Fri Aug 14 20:09:31 2009 (r196220) +++ head/release/Makefile Fri Aug 14 20:35:42 2009 (r196221) @@ -1,7 +1,8 @@ # $FreeBSD$ # # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \ -# [RELEASETAG=tag] +# [RELEASETAG=tag] [SVNROOT=svn://svn.freebsd.org/base] \ +# [SVNBRANCH=some/branch] # # Where "/some/dir" is the pathname of a directory on a some filesystem with # at least 1000MB of free space, "somename" is what you want the release to @@ -9,6 +10,11 @@ # which CVS "tag" name should be used when checking out the sources to build # the release (default is HEAD). # +# Please note the support for building from SVN is preliminary and there +# are still questions about things like how to handle updates of +# /usr/src on production systems (csup(1) replacement). It is a work +# in progress and may change as the other issues get worked out. +# # Please note: the md(4) driver must be present in the kernel # (either by being compiled in or available as a kld(4) module), # otherwise the target 'release.8' and possibly others will fail. @@ -49,12 +55,25 @@ BUILDNAME?=${BASE}-${DATE}-SNAP # To add other options to the CVS command, set #CVSARGS="-lfq" # -# To prefix the cvs command +# To prefix the CVS command #CVSPREFIX="/usr/bin/time" # # Where the CVS repository is #CVSROOT="/home/ncvs" # +# To add other options to the Subversion subcommands (co,up), set +#SVNCMDARGS="-r '{ 01/01/2002 00:00:00 UTC }'" +# +# To prefix the Subversion command +#SVNPREFIX="/usr/bin/time" +# +# Where the Subversion repository is +#SVNROOT=svn://svn.freebsd.org/base +# +# Subversion branch to build for src. If this is not set then it is +# automatically computed from RELEASETAG. +#SVNBRANCH=stable/7 +# # Non-zero if ${RELEASETAG} is in the form "RELENG_ver_RELEASE"; we # are building an official release. Otherwise, we are building for # a branch. @@ -68,6 +87,16 @@ PORTSRELEASETAG?= ${AUXRELEASETAG} .endif .endif +# Determine the Subversion source branch that corresponds to the requested +# RELEASETAG. +.if !defined(SVNBRANCH) +.if defined(RELEASETAG) +SVNBRANCH!= echo "${RELEASETAG}" | awk -f ${.CURDIR}/svnbranch.awk +.else +SVNBRANCH= head +.endif +.endif + # If you want to pass flags to the world build such as -j X, use # WORLD_FLAGS. Similarly, you can specify make flags for kernel # builds via KERNEL_FLAGS. @@ -341,8 +370,17 @@ CVS_PORTSARGS+= -r ${PORTSRELEASETAG} WORLDDIR?= ${.CURDIR}/.. release rerelease: -.if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT) - @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false +.if !defined(CHROOTDIR) || !defined(BUILDNAME) + @echo "To make a release you must set CHROOTDIR and BUILDNAME" && false +.endif +.if !defined(NOPORTSATALL) && !defined(EXTPORTSDIR) && !defined(CVSROOT) + @echo "Building ports requires CVSROOT or EXTPORTSDIR" && false +.endif +.if !defined(NODOC) && !defined(EXTDOCDIR) && !defined(CVSROOT) + @echo "Building docs requires CVSROOT or EXTDOCDIR" && false +.endif +.if !defined(EXTSRCDIR) && !defined(CVSROOT) && !defined(SVNROOT) + @echo "The source tree requires SVNROOT, CVSROOT, or EXTSRCDIR" && false .endif .if defined(NOPORTSATALL) && !defined(NODOC) @echo "Ports are required for building the release docs. Either set NODOC or" @@ -387,6 +425,10 @@ release rerelease: .if defined(EXTSRCDIR) cd ${CHROOTDIR}/usr && \ cp -R -H ${EXTSRCDIR} src +.elif defined(SVNROOT) + cd ${CHROOTDIR}/usr && \ + ${SVNPREFIX} svn co ${SVNCMDARGS} ${SVNROOT}/${SVNBRANCH} \ + ${RELEASESRCMODULE} .else cd ${CHROOTDIR}/usr && \ ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \ @@ -432,7 +474,10 @@ release rerelease: .endif .if make(rerelease) .if !defined(RELEASENOUPDATE) && !defined(EXTSRCDIR) -.if !defined(RELEASETAG) +.if defined(SVNROOT) + cd ${CHROOTDIR}/usr/src && ${SVNPREFIX} svn switch ${SVNCMDARGS} \ + ${SVNROOT}/${SVNBRANCH} +.elif !defined(RELEASETAG) cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q \ update ${CVSCMDARGS} -P -d -A .else Added: head/release/svnbranch.awk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/svnbranch.awk Fri Aug 14 20:35:42 2009 (r196221) @@ -0,0 +1,28 @@ +# $FreeBSD$ + +BEGIN { + FS = "_" +} + +/RELENG_.*_RELEASE/ { + if (NF == 5) { + printf "release/%s.%s.%s", $2, $3, $4 + exit + } +} + +/RELENG_.*/ { + if (NF == 3) { + printf "releng/%s.%s", $2, $3 + exit + } + + if (NF == 2) { + printf "stable/%s", $2 + exit + } +} + +// { + printf "unknown_branch" +} From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 20:42:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55B461065690; Fri, 14 Aug 2009 20:42:41 +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 4439D8FC52; Fri, 14 Aug 2009 20:42: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 n7EKgfl9047072; Fri, 14 Aug 2009 20:42:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EKgft4047069; Fri, 14 Aug 2009 20:42:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908142042.n7EKgft4047069@svn.freebsd.org> From: John Baldwin Date: Fri, 14 Aug 2009 20:42: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: r196222 - stable/8/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 20:42:41 -0000 Author: jhb Date: Fri Aug 14 20:42:40 2009 New Revision: 196222 URL: http://svn.freebsd.org/changeset/base/196222 Log: MFC 196221: Add the ability to build a release from an SVN checkout instead of a CVS checkout. If SVNROOT is specified, then the source tree will be checked out from that SVN repository instead of using CVS. ports and docs still use CVS. If SVNROOT is not specified, then the source tree will be checked out using CVS. An explicit SVN branch can be specified using SVNBRANCH (e.g. SVNBRANCH=stable/8). If SVNBRANCH is not set but RELEASETAG is set to a CVS branch (such as RELENG_8) the appropriate SVN branch will be inferred from the CVS branch using svnbranch.awk. Note that there are still several open questions about using SVN instead of CVS in the release process. However, this does enable one to build a release from an SVN repository if needed. Approved by: re (kensmith) Added: stable/8/release/svnbranch.awk - copied unchanged from r196221, head/release/svnbranch.awk Modified: stable/8/release/ (props changed) stable/8/release/Makefile Modified: stable/8/release/Makefile ============================================================================== --- stable/8/release/Makefile Fri Aug 14 20:35:42 2009 (r196221) +++ stable/8/release/Makefile Fri Aug 14 20:42:40 2009 (r196222) @@ -1,7 +1,8 @@ # $FreeBSD$ # # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \ -# [RELEASETAG=tag] +# [RELEASETAG=tag] [SVNROOT=svn://svn.freebsd.org/base] \ +# [SVNBRANCH=some/branch] # # Where "/some/dir" is the pathname of a directory on a some filesystem with # at least 1000MB of free space, "somename" is what you want the release to @@ -9,6 +10,11 @@ # which CVS "tag" name should be used when checking out the sources to build # the release (default is HEAD). # +# Please note the support for building from SVN is preliminary and there +# are still questions about things like how to handle updates of +# /usr/src on production systems (csup(1) replacement). It is a work +# in progress and may change as the other issues get worked out. +# # Please note: the md(4) driver must be present in the kernel # (either by being compiled in or available as a kld(4) module), # otherwise the target 'release.8' and possibly others will fail. @@ -49,12 +55,25 @@ BUILDNAME?=${BASE}-${DATE}-SNAP # To add other options to the CVS command, set #CVSARGS="-lfq" # -# To prefix the cvs command +# To prefix the CVS command #CVSPREFIX="/usr/bin/time" # # Where the CVS repository is #CVSROOT="/home/ncvs" # +# To add other options to the Subversion subcommands (co,up), set +#SVNCMDARGS="-r '{ 01/01/2002 00:00:00 UTC }'" +# +# To prefix the Subversion command +#SVNPREFIX="/usr/bin/time" +# +# Where the Subversion repository is +#SVNROOT=svn://svn.freebsd.org/base +# +# Subversion branch to build for src. If this is not set then it is +# automatically computed from RELEASETAG. +#SVNBRANCH=stable/7 +# # Non-zero if ${RELEASETAG} is in the form "RELENG_ver_RELEASE"; we # are building an official release. Otherwise, we are building for # a branch. @@ -68,6 +87,16 @@ PORTSRELEASETAG?= ${AUXRELEASETAG} .endif .endif +# Determine the Subversion source branch that corresponds to the requested +# RELEASETAG. +.if !defined(SVNBRANCH) +.if defined(RELEASETAG) +SVNBRANCH!= echo "${RELEASETAG}" | awk -f ${.CURDIR}/svnbranch.awk +.else +SVNBRANCH= head +.endif +.endif + # If you want to pass flags to the world build such as -j X, use # WORLD_FLAGS. Similarly, you can specify make flags for kernel # builds via KERNEL_FLAGS. @@ -341,8 +370,17 @@ CVS_PORTSARGS+= -r ${PORTSRELEASETAG} WORLDDIR?= ${.CURDIR}/.. release rerelease: -.if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT) - @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false +.if !defined(CHROOTDIR) || !defined(BUILDNAME) + @echo "To make a release you must set CHROOTDIR and BUILDNAME" && false +.endif +.if !defined(NOPORTSATALL) && !defined(EXTPORTSDIR) && !defined(CVSROOT) + @echo "Building ports requires CVSROOT or EXTPORTSDIR" && false +.endif +.if !defined(NODOC) && !defined(EXTDOCDIR) && !defined(CVSROOT) + @echo "Building docs requires CVSROOT or EXTDOCDIR" && false +.endif +.if !defined(EXTSRCDIR) && !defined(CVSROOT) && !defined(SVNROOT) + @echo "The source tree requires SVNROOT, CVSROOT, or EXTSRCDIR" && false .endif .if defined(NOPORTSATALL) && !defined(NODOC) @echo "Ports are required for building the release docs. Either set NODOC or" @@ -387,6 +425,10 @@ release rerelease: .if defined(EXTSRCDIR) cd ${CHROOTDIR}/usr && \ cp -R -H ${EXTSRCDIR} src +.elif defined(SVNROOT) + cd ${CHROOTDIR}/usr && \ + ${SVNPREFIX} svn co ${SVNCMDARGS} ${SVNROOT}/${SVNBRANCH} \ + ${RELEASESRCMODULE} .else cd ${CHROOTDIR}/usr && \ ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \ @@ -432,7 +474,10 @@ release rerelease: .endif .if make(rerelease) .if !defined(RELEASENOUPDATE) && !defined(EXTSRCDIR) -.if !defined(RELEASETAG) +.if defined(SVNROOT) + cd ${CHROOTDIR}/usr/src && ${SVNPREFIX} svn switch ${SVNCMDARGS} \ + ${SVNROOT}/${SVNBRANCH} +.elif !defined(RELEASETAG) cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q \ update ${CVSCMDARGS} -P -d -A .else Copied: stable/8/release/svnbranch.awk (from r196221, head/release/svnbranch.awk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/release/svnbranch.awk Fri Aug 14 20:42:40 2009 (r196222, copy of r196221, head/release/svnbranch.awk) @@ -0,0 +1,28 @@ +# $FreeBSD$ + +BEGIN { + FS = "_" +} + +/RELENG_.*_RELEASE/ { + if (NF == 5) { + printf "release/%s.%s.%s", $2, $3, $4 + exit + } +} + +/RELENG_.*/ { + if (NF == 3) { + printf "releng/%s.%s", $2, $3 + exit + } + + if (NF == 2) { + printf "stable/%s", $2 + exit + } +} + +// { + printf "unknown_branch" +} From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 20:57:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CEED106568B; Fri, 14 Aug 2009 20:57:22 +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 19F598FC4B; Fri, 14 Aug 2009 20:57: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 n7EKvMHM047412; Fri, 14 Aug 2009 20:57:22 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EKvLuf047405; Fri, 14 Aug 2009 20:57:22 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908142057.n7EKvLuf047405@svn.freebsd.org> From: John Baldwin Date: Fri, 14 Aug 2009 20:57: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: r196223 - in stable/8/sys: amd64/amd64 amd64/include dev/hwpmc 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: Fri, 14 Aug 2009 20:57:22 -0000 Author: jhb Date: Fri Aug 14 20:57:21 2009 New Revision: 196223 URL: http://svn.freebsd.org/changeset/base/196223 Log: Adjust the handling of the local APIC PMC interrupt vector: - Provide lapic_disable_pmc(), lapic_enable_pmc(), and lapic_reenable_pmc() routines in the local APIC code that the hwpmc(4) driver can use to manage the local APIC PMC interrupt vector. - Do not enable the local APIC PMC interrupt vector by default when HWPMC_HOOKS is enabled. Instead, the hwpmc(4) driver explicitly enables the interrupt when it is succesfully initialized and disables the interrupt when it is unloaded. This avoids enabling the interrupt on unsupported CPUs which may result in spurious NMIs. Reported by: rnoland Reviewed by: jkoshy Approved by: re (kib) MFC after: 2 weeks Modified: stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/include/apicvar.h stable/8/sys/amd64/include/pmc_mdep.h stable/8/sys/dev/hwpmc/hwpmc_core.c stable/8/sys/dev/hwpmc/hwpmc_piv.c stable/8/sys/dev/hwpmc/hwpmc_ppro.c stable/8/sys/dev/hwpmc/hwpmc_x86.c stable/8/sys/i386/i386/local_apic.c stable/8/sys/i386/include/apicvar.h stable/8/sys/i386/include/pmc_mdep.h Modified: stable/8/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/amd64/amd64/local_apic.c Fri Aug 14 20:57:21 2009 (r196223) @@ -123,7 +123,7 @@ static struct lvt lvts[LVT_MAX + 1] = { { 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_NMI, 0 }, /* PMC */ + { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -305,11 +305,9 @@ lapic_setup(int boot) lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); -#ifdef HWPMC_HOOKS /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); -#endif /* Program timer LVT and setup handler. */ lapic->lvt_timer = lvt_mode(la, LVT_TIMER, lapic->lvt_timer); @@ -332,6 +330,88 @@ lapic_setup(int boot) intr_restore(eflags); } +void +lapic_reenable_pmc(void) +{ +#ifdef HWPMC_HOOKS + uint32_t value; + + value = lapic->lvt_pcint; + value &= ~APIC_LVT_M; + lapic->lvt_pcint = value; +#endif +} + +#ifdef HWPMC_HOOKS +static void +lapic_update_pmc(void *dummy) +{ + struct lapic *la; + + la = &lapics[lapic_id()]; + lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); +} +#endif + +int +lapic_enable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return (0); + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return (0); + + lvts[LVT_PMC].lvt_masked = 0; + +#ifdef SMP + /* + * If hwpmc was loaded at boot time then the APs may not be + * started yet. In that case, don't forward the request to + * them as they will program the lvt when they start. + */ + if (smp_started) + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); + else +#endif + lapic_update_pmc(NULL); + return (1); +#else + return (0); +#endif +} + +void +lapic_disable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return; + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return; + + lvts[LVT_PMC].lvt_masked = 1; + +#ifdef SMP + /* The APs should always be started when hwpmc is unloaded. */ + KASSERT(mp_ncpus == 1 || smp_started, ("hwpmc unloaded too early")); +#endif + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); +#endif +} + /* * Called by cpu_initclocks() on the BSP to setup the local APIC timer so * that it can drive hardclock, statclock, and profclock. This function Modified: stable/8/sys/amd64/include/apicvar.h ============================================================================== --- stable/8/sys/amd64/include/apicvar.h Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/amd64/include/apicvar.h Fri Aug 14 20:57:21 2009 (r196223) @@ -201,7 +201,9 @@ int ioapic_set_triggermode(void *cookie, int ioapic_set_smi(void *cookie, u_int pin); void lapic_create(u_int apic_id, int boot_cpu); void lapic_disable(void); +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); @@ -212,6 +214,7 @@ void lapic_ipi_vectored(u_int vector, in int lapic_ipi_wait(int delay); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); +void lapic_reenable_pmc(void); void lapic_set_logical_id(u_int apic_id, u_int cluster, u_int cluster_id); int lapic_set_lvt_mask(u_int apic_id, u_int lvt, u_char masked); int lapic_set_lvt_mode(u_int apic_id, u_int lvt, u_int32_t mode); Modified: stable/8/sys/amd64/include/pmc_mdep.h ============================================================================== --- stable/8/sys/amd64/include/pmc_mdep.h Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/amd64/include/pmc_mdep.h Fri Aug 14 20:57:21 2009 (r196223) @@ -115,7 +115,6 @@ union pmc_md_pmc { */ void start_exceptions(void), end_exceptions(void); -void pmc_x86_lapic_enable_pmc_interrupt(void); struct pmc_mdep *pmc_amd_initialize(void); void pmc_amd_finalize(struct pmc_mdep *_md); Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_core.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/dev/hwpmc/hwpmc_core.c Fri Aug 14 20:57:21 2009 (r196223) @@ -32,10 +32,13 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include +#include +#include #include #include #include @@ -1771,7 +1774,7 @@ core_intr(int cpu, struct trapframe *tf) } if (found_interrupt) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(found_interrupt ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); @@ -1895,7 +1898,7 @@ core2_intr(int cpu, struct trapframe *tf (uintmax_t) rdmsr(IA_GLOBAL_OVF_CTRL)); if (found_interrupt) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(found_interrupt ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); Modified: stable/8/sys/dev/hwpmc/hwpmc_piv.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_piv.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/dev/hwpmc/hwpmc_piv.c Fri Aug 14 20:57:21 2009 (r196223) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -39,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -1537,7 +1540,7 @@ p4_intr(int cpu, struct trapframe *tf) */ if (did_interrupt) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(did_interrupt ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); Modified: stable/8/sys/dev/hwpmc/hwpmc_ppro.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_ppro.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/dev/hwpmc/hwpmc_ppro.c Fri Aug 14 20:57:21 2009 (r196223) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -39,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -718,7 +721,7 @@ p6_intr(int cpu, struct trapframe *tf) * unmasked after a PMC interrupt. */ if (retval) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(retval ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); Modified: stable/8/sys/dev/hwpmc/hwpmc_x86.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_x86.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/dev/hwpmc/hwpmc_x86.c Fri Aug 14 20:57:21 2009 (r196223) @@ -39,7 +39,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include +#include #include #include @@ -47,18 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -extern volatile lapic_t *lapic; - -void -pmc_x86_lapic_enable_pmc_interrupt(void) -{ - uint32_t value; - - value = lapic->lvt_pcint; - value &= ~APIC_LVT_M; - lapic->lvt_pcint = value; -} - /* * Attempt to walk a user call stack using a too-simple algorithm. * In the general case we need unwind information associated with @@ -252,16 +241,15 @@ pmc_md_initialize() struct pmc_mdep *md; /* determine the CPU kind */ - md = NULL; if (cpu_vendor_id == CPU_VENDOR_AMD) md = pmc_amd_initialize(); else if (cpu_vendor_id == CPU_VENDOR_INTEL) md = pmc_intel_initialize(); else - KASSERT(0, ("[x86,%d] Unknown vendor", __LINE__)); + return (NULL); /* disallow sampling if we do not have an LAPIC */ - if (md != NULL && lapic == NULL) + if (!lapic_enable_pmc()) for (i = 1; i < md->pmd_nclass; i++) md->pmd_classdep[i].pcd_caps &= ~PMC_CAP_INTERRUPT; @@ -271,6 +259,8 @@ pmc_md_initialize() void pmc_md_finalize(struct pmc_mdep *md) { + + lapic_disable_pmc(); if (cpu_vendor_id == CPU_VENDOR_AMD) pmc_amd_finalize(md); else if (cpu_vendor_id == CPU_VENDOR_INTEL) Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/i386/i386/local_apic.c Fri Aug 14 20:57:21 2009 (r196223) @@ -123,7 +123,7 @@ static struct lvt lvts[LVT_MAX + 1] = { { 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_NMI, 0 }, /* PMC */ + { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -307,11 +307,9 @@ lapic_setup(int boot) lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); -#ifdef HWPMC_HOOKS /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); -#endif /* Program timer LVT and setup handler. */ lapic->lvt_timer = lvt_mode(la, LVT_TIMER, lapic->lvt_timer); @@ -334,6 +332,88 @@ lapic_setup(int boot) intr_restore(eflags); } +void +lapic_reenable_pmc(void) +{ +#ifdef HWPMC_HOOKS + uint32_t value; + + value = lapic->lvt_pcint; + value &= ~APIC_LVT_M; + lapic->lvt_pcint = value; +#endif +} + +#ifdef HWPMC_HOOKS +static void +lapic_update_pmc(void *dummy) +{ + struct lapic *la; + + la = &lapics[lapic_id()]; + lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); +} +#endif + +int +lapic_enable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return (0); + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return (0); + + lvts[LVT_PMC].lvt_masked = 0; + +#ifdef SMP + /* + * If hwpmc was loaded at boot time then the APs may not be + * started yet. In that case, don't forward the request to + * them as they will program the lvt when they start. + */ + if (smp_started) + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); + else +#endif + lapic_update_pmc(NULL); + return (1); +#else + return (0); +#endif +} + +void +lapic_disable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return; + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return; + + lvts[LVT_PMC].lvt_masked = 1; + +#ifdef SMP + /* The APs should always be started when hwpmc is unloaded. */ + KASSERT(mp_ncpus == 1 || smp_started, ("hwpmc unloaded too early")); +#endif + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); +#endif +} + /* * Called by cpu_initclocks() on the BSP to setup the local APIC timer so * that it can drive hardclock, statclock, and profclock. This function Modified: stable/8/sys/i386/include/apicvar.h ============================================================================== --- stable/8/sys/i386/include/apicvar.h Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/i386/include/apicvar.h Fri Aug 14 20:57:21 2009 (r196223) @@ -230,7 +230,9 @@ int ioapic_set_triggermode(void *cookie, int ioapic_set_smi(void *cookie, u_int pin); void lapic_create(u_int apic_id, int boot_cpu); void lapic_disable(void); +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); @@ -241,6 +243,7 @@ void lapic_ipi_vectored(u_int vector, in int lapic_ipi_wait(int delay); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); +void lapic_reenable_pmc(void); void lapic_set_logical_id(u_int apic_id, u_int cluster, u_int cluster_id); int lapic_set_lvt_mask(u_int apic_id, u_int lvt, u_char masked); int lapic_set_lvt_mode(u_int apic_id, u_int lvt, u_int32_t mode); Modified: stable/8/sys/i386/include/pmc_mdep.h ============================================================================== --- stable/8/sys/i386/include/pmc_mdep.h Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/i386/include/pmc_mdep.h Fri Aug 14 20:57:21 2009 (r196223) @@ -150,7 +150,6 @@ struct pmc_mdep; */ void start_exceptions(void), end_exceptions(void); -void pmc_x86_lapic_enable_pmc_interrupt(void); struct pmc_mdep *pmc_amd_initialize(void); void pmc_amd_finalize(struct pmc_mdep *_md); From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 21:03:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F276106568B; Fri, 14 Aug 2009 21:03:26 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from websrv01.jr-hosting.nl (websrv01.jr-hosting.nl [78.47.69.233]) by mx1.freebsd.org (Postfix) with ESMTP id 1D60E8FC43; Fri, 14 Aug 2009 21:03:25 +0000 (UTC) Received: from a83-163-38-147.adsl.xs4all.nl ([83.163.38.147] helo=[10.0.2.66]) by websrv01.jr-hosting.nl with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Mc3vo-00098N-Sf; Fri, 14 Aug 2009 23:03:24 +0200 Message-Id: From: Remko Lodder To: Remko Lodder In-Reply-To: <200908141936.n7EJatN2045525@svn.freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Fri, 14 Aug 2009 23:03:21 +0200 References: <200908141936.n7EJatN2045525@svn.freebsd.org> X-Mailer: Apple Mail (2.936) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r196218 - stable/7/usr.sbin/arp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 21:03:26 -0000 On Aug 14, 2009, at 9:36 PM, Remko Lodder wrote: > Author: remko > Date: Fri Aug 14 19:36:54 2009 > New Revision: 196218 > URL: http://svn.freebsd.org/changeset/base/196218 > > Log: > Remove bogus char cast. > > PR: 118014 > Submitted by: Gardner Bell > Approved by: re (rwatson), imp (mentor, implicit) > MFC after: immediate > Sorry, I should have kept a little time in between the commit to stable/7. I was just so excited to do the MFC's that I instantly did stable/7 as well, where I normally kept a few days in between. If someone objects to this I can revert it and MFC it a few days later. Pointyhat for instant MFC: remko Pointed out by: simon -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 21:05:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 377C2106568C; Fri, 14 Aug 2009 21:05:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 255DE8FC5B; Fri, 14 Aug 2009 21:05: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 n7EL59uh047677; Fri, 14 Aug 2009 21:05:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EL58HV047671; Fri, 14 Aug 2009 21:05:08 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908142105.n7EL58HV047671@svn.freebsd.org> From: John Baldwin Date: Fri, 14 Aug 2009 21:05: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: r196224 - in head/sys: amd64/amd64 amd64/include dev/hwpmc 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: Fri, 14 Aug 2009 21:05:09 -0000 Author: jhb Date: Fri Aug 14 21:05:08 2009 New Revision: 196224 URL: http://svn.freebsd.org/changeset/base/196224 Log: Adjust the handling of the local APIC PMC interrupt vector: - Provide lapic_disable_pmc(), lapic_enable_pmc(), and lapic_reenable_pmc() routines in the local APIC code that the hwpmc(4) driver can use to manage the local APIC PMC interrupt vector. - Do not enable the local APIC PMC interrupt vector by default when HWPMC_HOOKS is enabled. Instead, the hwpmc(4) driver explicitly enables the interrupt when it is succesfully initialized and disables the interrupt when it is unloaded. This avoids enabling the interrupt on unsupported CPUs which may result in spurious NMIs. Reported by: rnoland Reviewed by: jkoshy Approved by: re (kib) MFC after: 2 weeks Modified: head/sys/amd64/amd64/local_apic.c head/sys/amd64/include/apicvar.h head/sys/amd64/include/pmc_mdep.h head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_piv.c head/sys/dev/hwpmc/hwpmc_ppro.c head/sys/dev/hwpmc/hwpmc_x86.c head/sys/i386/i386/local_apic.c head/sys/i386/include/apicvar.h head/sys/i386/include/pmc_mdep.h Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Fri Aug 14 20:57:21 2009 (r196223) +++ head/sys/amd64/amd64/local_apic.c Fri Aug 14 21:05:08 2009 (r196224) @@ -123,7 +123,7 @@ static struct lvt lvts[LVT_MAX + 1] = { { 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_NMI, 0 }, /* PMC */ + { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -305,11 +305,9 @@ lapic_setup(int boot) lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); -#ifdef HWPMC_HOOKS /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); -#endif /* Program timer LVT and setup handler. */ lapic->lvt_timer = lvt_mode(la, LVT_TIMER, lapic->lvt_timer); @@ -332,6 +330,88 @@ lapic_setup(int boot) intr_restore(eflags); } +void +lapic_reenable_pmc(void) +{ +#ifdef HWPMC_HOOKS + uint32_t value; + + value = lapic->lvt_pcint; + value &= ~APIC_LVT_M; + lapic->lvt_pcint = value; +#endif +} + +#ifdef HWPMC_HOOKS +static void +lapic_update_pmc(void *dummy) +{ + struct lapic *la; + + la = &lapics[lapic_id()]; + lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); +} +#endif + +int +lapic_enable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return (0); + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return (0); + + lvts[LVT_PMC].lvt_masked = 0; + +#ifdef SMP + /* + * If hwpmc was loaded at boot time then the APs may not be + * started yet. In that case, don't forward the request to + * them as they will program the lvt when they start. + */ + if (smp_started) + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); + else +#endif + lapic_update_pmc(NULL); + return (1); +#else + return (0); +#endif +} + +void +lapic_disable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return; + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return; + + lvts[LVT_PMC].lvt_masked = 1; + +#ifdef SMP + /* The APs should always be started when hwpmc is unloaded. */ + KASSERT(mp_ncpus == 1 || smp_started, ("hwpmc unloaded too early")); +#endif + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); +#endif +} + /* * Called by cpu_initclocks() on the BSP to setup the local APIC timer so * that it can drive hardclock, statclock, and profclock. This function Modified: head/sys/amd64/include/apicvar.h ============================================================================== --- head/sys/amd64/include/apicvar.h Fri Aug 14 20:57:21 2009 (r196223) +++ head/sys/amd64/include/apicvar.h Fri Aug 14 21:05:08 2009 (r196224) @@ -201,7 +201,9 @@ int ioapic_set_triggermode(void *cookie, int ioapic_set_smi(void *cookie, u_int pin); void lapic_create(u_int apic_id, int boot_cpu); void lapic_disable(void); +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); @@ -212,6 +214,7 @@ void lapic_ipi_vectored(u_int vector, in int lapic_ipi_wait(int delay); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); +void lapic_reenable_pmc(void); void lapic_set_logical_id(u_int apic_id, u_int cluster, u_int cluster_id); int lapic_set_lvt_mask(u_int apic_id, u_int lvt, u_char masked); int lapic_set_lvt_mode(u_int apic_id, u_int lvt, u_int32_t mode); Modified: head/sys/amd64/include/pmc_mdep.h ============================================================================== --- head/sys/amd64/include/pmc_mdep.h Fri Aug 14 20:57:21 2009 (r196223) +++ head/sys/amd64/include/pmc_mdep.h Fri Aug 14 21:05:08 2009 (r196224) @@ -115,7 +115,6 @@ union pmc_md_pmc { */ void start_exceptions(void), end_exceptions(void); -void pmc_x86_lapic_enable_pmc_interrupt(void); struct pmc_mdep *pmc_amd_initialize(void); void pmc_amd_finalize(struct pmc_mdep *_md); Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Fri Aug 14 20:57:21 2009 (r196223) +++ head/sys/dev/hwpmc/hwpmc_core.c Fri Aug 14 21:05:08 2009 (r196224) @@ -32,10 +32,13 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include +#include +#include #include #include #include @@ -1771,7 +1774,7 @@ core_intr(int cpu, struct trapframe *tf) } if (found_interrupt) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(found_interrupt ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); @@ -1895,7 +1898,7 @@ core2_intr(int cpu, struct trapframe *tf (uintmax_t) rdmsr(IA_GLOBAL_OVF_CTRL)); if (found_interrupt) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(found_interrupt ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); Modified: head/sys/dev/hwpmc/hwpmc_piv.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_piv.c Fri Aug 14 20:57:21 2009 (r196223) +++ head/sys/dev/hwpmc/hwpmc_piv.c Fri Aug 14 21:05:08 2009 (r196224) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -39,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -1537,7 +1540,7 @@ p4_intr(int cpu, struct trapframe *tf) */ if (did_interrupt) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(did_interrupt ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); Modified: head/sys/dev/hwpmc/hwpmc_ppro.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_ppro.c Fri Aug 14 20:57:21 2009 (r196223) +++ head/sys/dev/hwpmc/hwpmc_ppro.c Fri Aug 14 21:05:08 2009 (r196224) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -39,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -718,7 +721,7 @@ p6_intr(int cpu, struct trapframe *tf) * unmasked after a PMC interrupt. */ if (retval) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(retval ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); Modified: head/sys/dev/hwpmc/hwpmc_x86.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_x86.c Fri Aug 14 20:57:21 2009 (r196223) +++ head/sys/dev/hwpmc/hwpmc_x86.c Fri Aug 14 21:05:08 2009 (r196224) @@ -39,7 +39,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include +#include #include #include @@ -47,18 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -extern volatile lapic_t *lapic; - -void -pmc_x86_lapic_enable_pmc_interrupt(void) -{ - uint32_t value; - - value = lapic->lvt_pcint; - value &= ~APIC_LVT_M; - lapic->lvt_pcint = value; -} - /* * Attempt to walk a user call stack using a too-simple algorithm. * In the general case we need unwind information associated with @@ -252,16 +241,15 @@ pmc_md_initialize() struct pmc_mdep *md; /* determine the CPU kind */ - md = NULL; if (cpu_vendor_id == CPU_VENDOR_AMD) md = pmc_amd_initialize(); else if (cpu_vendor_id == CPU_VENDOR_INTEL) md = pmc_intel_initialize(); else - KASSERT(0, ("[x86,%d] Unknown vendor", __LINE__)); + return (NULL); /* disallow sampling if we do not have an LAPIC */ - if (md != NULL && lapic == NULL) + if (!lapic_enable_pmc()) for (i = 1; i < md->pmd_nclass; i++) md->pmd_classdep[i].pcd_caps &= ~PMC_CAP_INTERRUPT; @@ -271,6 +259,8 @@ pmc_md_initialize() void pmc_md_finalize(struct pmc_mdep *md) { + + lapic_disable_pmc(); if (cpu_vendor_id == CPU_VENDOR_AMD) pmc_amd_finalize(md); else if (cpu_vendor_id == CPU_VENDOR_INTEL) Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Fri Aug 14 20:57:21 2009 (r196223) +++ head/sys/i386/i386/local_apic.c Fri Aug 14 21:05:08 2009 (r196224) @@ -123,7 +123,7 @@ static struct lvt lvts[LVT_MAX + 1] = { { 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_NMI, 0 }, /* PMC */ + { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -307,11 +307,9 @@ lapic_setup(int boot) lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); -#ifdef HWPMC_HOOKS /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); -#endif /* Program timer LVT and setup handler. */ lapic->lvt_timer = lvt_mode(la, LVT_TIMER, lapic->lvt_timer); @@ -334,6 +332,88 @@ lapic_setup(int boot) intr_restore(eflags); } +void +lapic_reenable_pmc(void) +{ +#ifdef HWPMC_HOOKS + uint32_t value; + + value = lapic->lvt_pcint; + value &= ~APIC_LVT_M; + lapic->lvt_pcint = value; +#endif +} + +#ifdef HWPMC_HOOKS +static void +lapic_update_pmc(void *dummy) +{ + struct lapic *la; + + la = &lapics[lapic_id()]; + lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); +} +#endif + +int +lapic_enable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return (0); + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return (0); + + lvts[LVT_PMC].lvt_masked = 0; + +#ifdef SMP + /* + * If hwpmc was loaded at boot time then the APs may not be + * started yet. In that case, don't forward the request to + * them as they will program the lvt when they start. + */ + if (smp_started) + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); + else +#endif + lapic_update_pmc(NULL); + return (1); +#else + return (0); +#endif +} + +void +lapic_disable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return; + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return; + + lvts[LVT_PMC].lvt_masked = 1; + +#ifdef SMP + /* The APs should always be started when hwpmc is unloaded. */ + KASSERT(mp_ncpus == 1 || smp_started, ("hwpmc unloaded too early")); +#endif + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); +#endif +} + /* * Called by cpu_initclocks() on the BSP to setup the local APIC timer so * that it can drive hardclock, statclock, and profclock. This function Modified: head/sys/i386/include/apicvar.h ============================================================================== --- head/sys/i386/include/apicvar.h Fri Aug 14 20:57:21 2009 (r196223) +++ head/sys/i386/include/apicvar.h Fri Aug 14 21:05:08 2009 (r196224) @@ -230,7 +230,9 @@ int ioapic_set_triggermode(void *cookie, int ioapic_set_smi(void *cookie, u_int pin); void lapic_create(u_int apic_id, int boot_cpu); void lapic_disable(void); +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); @@ -241,6 +243,7 @@ void lapic_ipi_vectored(u_int vector, in int lapic_ipi_wait(int delay); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); +void lapic_reenable_pmc(void); void lapic_set_logical_id(u_int apic_id, u_int cluster, u_int cluster_id); int lapic_set_lvt_mask(u_int apic_id, u_int lvt, u_char masked); int lapic_set_lvt_mode(u_int apic_id, u_int lvt, u_int32_t mode); Modified: head/sys/i386/include/pmc_mdep.h ============================================================================== --- head/sys/i386/include/pmc_mdep.h Fri Aug 14 20:57:21 2009 (r196223) +++ head/sys/i386/include/pmc_mdep.h Fri Aug 14 21:05:08 2009 (r196224) @@ -150,7 +150,6 @@ struct pmc_mdep; */ void start_exceptions(void), end_exceptions(void); -void pmc_x86_lapic_enable_pmc_interrupt(void); struct pmc_mdep *pmc_amd_initialize(void); void pmc_amd_finalize(struct pmc_mdep *_md); From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 21:07:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 169401065691; Fri, 14 Aug 2009 21:07:42 +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 05E098FC5B; Fri, 14 Aug 2009 21:07: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 n7EL7f51047801; Fri, 14 Aug 2009 21:07:41 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 n7EL7fGl047798; Fri, 14 Aug 2009 21:07:41 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200908142107.n7EL7fGl047798@svn.freebsd.org> From: Nick Hibma Date: Fri, 14 Aug 2009 21:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196225 - 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: Fri, 14 Aug 2009 21:07:42 -0000 Author: n_hibma Date: Fri Aug 14 21:07:41 2009 New Revision: 196225 URL: http://svn.freebsd.org/changeset/base/196225 Log: Revert r196169. Modified: stable/7/sys/pci/agp_i810.c Modified: stable/7/sys/pci/agp_i810.c ============================================================================== --- stable/7/sys/pci/agp_i810.c Fri Aug 14 21:05:08 2009 (r196224) +++ stable/7/sys/pci/agp_i810.c Fri Aug 14 21:07:41 2009 (r196225) @@ -474,13 +474,12 @@ agp_i810_attach(device_t dev) agp_generic_detach(dev); return EINVAL; } - - if (bootverbose) { - device_print_prettyname(dev); - if (sc->stolen > 0) - printf("detected %dk stolen memory, ", sc->stolen * 4); - printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); + if (sc->stolen > 0) { + device_printf(dev, "detected %dk stolen memory\n", + sc->stolen * 4); } + device_printf(dev, "aperture size is %dM\n", + sc->initial_aperture / 1024 / 1024); /* GATT address is already in there, make sure it's enabled */ pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); @@ -665,13 +664,9 @@ agp_i810_attach(device_t dev) gtt_size += 4; sc->stolen = (stolen - gtt_size) * 1024 / 4096; - - if (bootverbose) { - device_print_prettyname(dev); - if (sc->stolen > 0) - printf("detected %dk stolen memory, ", sc->stolen * 4); - printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); - } + if (sc->stolen > 0) + device_printf(dev, "detected %dk stolen memory\n", sc->stolen * 4); + device_printf(dev, "aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); /* GATT address is already in there, make sure it's enabled */ pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 21:35:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1E591065795; Fri, 14 Aug 2009 21:35:25 +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 494A98FC59; Fri, 14 Aug 2009 21:35:25 +0000 (UTC) Received: from [192.168.1.4] (adsl-1-120-225.bna.bellsouth.net [65.1.120.225]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n7ELZMLB098504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 Aug 2009 17:35:23 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Nick Hibma In-Reply-To: <200908142107.n7EL7fGl047798@svn.freebsd.org> References: <200908142107.n7EL7fGl047798@svn.freebsd.org> Content-Type: text/plain Organization: FreeBSD Date: Fri, 14 Aug 2009 16:35:17 -0500 Message-Id: <1250285717.21931.0.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC, SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r196225 - 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: Fri, 14 Aug 2009 21:35:25 -0000 On Fri, 2009-08-14 at 21:07 +0000, Nick Hibma wrote: > Author: n_hibma > Date: Fri Aug 14 21:07:41 2009 > New Revision: 196225 > URL: http://svn.freebsd.org/changeset/base/196225 > > Log: > Revert r196169. Thanks, robert. > Modified: > stable/7/sys/pci/agp_i810.c > > Modified: stable/7/sys/pci/agp_i810.c > ============================================================================== > --- stable/7/sys/pci/agp_i810.c Fri Aug 14 21:05:08 2009 (r196224) > +++ stable/7/sys/pci/agp_i810.c Fri Aug 14 21:07:41 2009 (r196225) > @@ -474,13 +474,12 @@ agp_i810_attach(device_t dev) > agp_generic_detach(dev); > return EINVAL; > } > - > - if (bootverbose) { > - device_print_prettyname(dev); > - if (sc->stolen > 0) > - printf("detected %dk stolen memory, ", sc->stolen * 4); > - printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); > + if (sc->stolen > 0) { > + device_printf(dev, "detected %dk stolen memory\n", > + sc->stolen * 4); > } > + device_printf(dev, "aperture size is %dM\n", > + sc->initial_aperture / 1024 / 1024); > > /* GATT address is already in there, make sure it's enabled */ > pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); > @@ -665,13 +664,9 @@ agp_i810_attach(device_t dev) > gtt_size += 4; > > sc->stolen = (stolen - gtt_size) * 1024 / 4096; > - > - if (bootverbose) { > - device_print_prettyname(dev); > - if (sc->stolen > 0) > - printf("detected %dk stolen memory, ", sc->stolen * 4); > - printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); > - } > + if (sc->stolen > 0) > + device_printf(dev, "detected %dk stolen memory\n", sc->stolen * 4); > + device_printf(dev, "aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); > > /* GATT address is already in there, make sure it's enabled */ > pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); -- Robert Noland FreeBSD From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 21:46:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94BDF1065695; Fri, 14 Aug 2009 21:46:54 +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 7A1078FC45; Fri, 14 Aug 2009 21:46: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 n7ELksSF048765; Fri, 14 Aug 2009 21:46:54 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7ELksKZ048760; Fri, 14 Aug 2009 21:46:54 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908142146.n7ELksKZ048760@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 14 Aug 2009 21:46: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: r196226 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 21:46:54 -0000 Author: bz Date: Fri Aug 14 21:46:54 2009 New Revision: 196226 URL: http://svn.freebsd.org/changeset/base/196226 Log: Add a new macro to test that a variable could be loaded atomically. Check that the given variable is at most uintptr_t in size and that it is aligned. Note: ASSERT_ATOMIC_LOAD() uses ALIGN() to check for adequate alignment -- however, the function of ALIGN() is to guarantee alignment, and therefore may lead to stronger alignment enforcement than necessary for types that are smaller than sizeof(uintptr_t). Add checks to mtx, rw and sx locks init functions to detect possible breakage. This was used during debugging of the problem fixed with r196118 where a pointer was on an un-aligned address in the dpcpu area. In collaboration with: rwatson Reviewed by: rwatson Approved by: re (kib) Modified: head/sys/kern/kern_mutex.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c head/sys/sys/systm.h Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Fri Aug 14 21:07:41 2009 (r196225) +++ head/sys/kern/kern_mutex.c Fri Aug 14 21:46:54 2009 (r196226) @@ -783,6 +783,8 @@ mtx_init(struct mtx *m, const char *name MPASS((opts & ~(MTX_SPIN | MTX_QUIET | MTX_RECURSE | MTX_NOWITNESS | MTX_DUPOK | MTX_NOPROFILE)) == 0); + ASSERT_ATOMIC_LOAD(m->mtx_lock, ("%s: mtx_lock not aligned for %s: %p", + __func__, name, &m->mtx_lock)); #ifdef MUTEX_DEBUG /* Diagnostic and error correction */ Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Fri Aug 14 21:07:41 2009 (r196225) +++ head/sys/kern/kern_rwlock.c Fri Aug 14 21:46:54 2009 (r196226) @@ -174,6 +174,8 @@ rw_init_flags(struct rwlock *rw, const c MPASS((opts & ~(RW_DUPOK | RW_NOPROFILE | RW_NOWITNESS | RW_QUIET | RW_RECURSE)) == 0); + ASSERT_ATOMIC_LOAD(rw->rw_lock, ("%s: rw_lock not aligned for %s: %p", + __func__, name, &rw->rw_lock)); flags = LO_UPGRADABLE; if (opts & RW_DUPOK) Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Fri Aug 14 21:07:41 2009 (r196225) +++ head/sys/kern/kern_sx.c Fri Aug 14 21:46:54 2009 (r196226) @@ -205,6 +205,8 @@ sx_init_flags(struct sx *sx, const char MPASS((opts & ~(SX_QUIET | SX_RECURSE | SX_NOWITNESS | SX_DUPOK | SX_NOPROFILE | SX_NOADAPTIVE)) == 0); + ASSERT_ATOMIC_LOAD(sx->sx_lock, ("%s: sx_lock not aligned for %s: %p", + __func__, description, &sx->sx_lock)); flags = LO_SLEEPABLE | LO_UPGRADABLE; if (opts & SX_DUPOK) Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Fri Aug 14 21:07:41 2009 (r196225) +++ head/sys/sys/systm.h Fri Aug 14 21:46:54 2009 (r196226) @@ -89,6 +89,10 @@ extern int maxusers; /* system tune hin #define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] #endif +#define ASSERT_ATOMIC_LOAD(var,msg) \ + KASSERT(sizeof(var) <= sizeof(uintptr_t) && \ + ALIGN(&(var)) == (uintptr_t)&(var), msg) + /* * XXX the hints declarations are even more misplaced than most declarations * in this file, since they are needed in one file (per arch) and only used From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 21:50:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D918106568D; Fri, 14 Aug 2009 21:50:48 +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 29CAD8FC6B; Fri, 14 Aug 2009 21:50: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 n7ELombX048919; Fri, 14 Aug 2009 21:50:48 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7ELomPp048914; Fri, 14 Aug 2009 21:50:48 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908142150.n7ELomPp048914@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 14 Aug 2009 21:50: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: r196227 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci kern modules/dtrace/dtnfsclient mo... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 21:50:48 -0000 Author: bz Date: Fri Aug 14 21:50:47 2009 New Revision: 196227 URL: http://svn.freebsd.org/changeset/base/196227 Log: MFC r196226: Add a new macro to test that a variable could be loaded atomically. Check that the given variable is at most uintptr_t in size and that it is aligned. Note: ASSERT_ATOMIC_LOAD() uses ALIGN() to check for adequate alignment -- however, the function of ALIGN() is to guarantee alignment, and therefore may lead to stronger alignment enforcement than necessary for types that are smaller than sizeof(uintptr_t). Add checks to mtx, rw and sx locks init functions to detect possible breakage. This was used during debugging of the problem fixed with r196118 where a pointer was on an un-aligned address in the dpcpu area. In collaboration with: rwatson Reviewed by: rwatson Approved by: re (kib) Modified: 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/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/kern_mutex.c stable/8/sys/kern/kern_rwlock.c stable/8/sys/kern/kern_sx.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/sys/systm.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/kern_mutex.c ============================================================================== --- stable/8/sys/kern/kern_mutex.c Fri Aug 14 21:46:54 2009 (r196226) +++ stable/8/sys/kern/kern_mutex.c Fri Aug 14 21:50:47 2009 (r196227) @@ -783,6 +783,8 @@ mtx_init(struct mtx *m, const char *name MPASS((opts & ~(MTX_SPIN | MTX_QUIET | MTX_RECURSE | MTX_NOWITNESS | MTX_DUPOK | MTX_NOPROFILE)) == 0); + ASSERT_ATOMIC_LOAD(m->mtx_lock, ("%s: mtx_lock not aligned for %s: %p", + __func__, name, &m->mtx_lock)); #ifdef MUTEX_DEBUG /* Diagnostic and error correction */ Modified: stable/8/sys/kern/kern_rwlock.c ============================================================================== --- stable/8/sys/kern/kern_rwlock.c Fri Aug 14 21:46:54 2009 (r196226) +++ stable/8/sys/kern/kern_rwlock.c Fri Aug 14 21:50:47 2009 (r196227) @@ -174,6 +174,8 @@ rw_init_flags(struct rwlock *rw, const c MPASS((opts & ~(RW_DUPOK | RW_NOPROFILE | RW_NOWITNESS | RW_QUIET | RW_RECURSE)) == 0); + ASSERT_ATOMIC_LOAD(rw->rw_lock, ("%s: rw_lock not aligned for %s: %p", + __func__, name, &rw->rw_lock)); flags = LO_UPGRADABLE; if (opts & RW_DUPOK) Modified: stable/8/sys/kern/kern_sx.c ============================================================================== --- stable/8/sys/kern/kern_sx.c Fri Aug 14 21:46:54 2009 (r196226) +++ stable/8/sys/kern/kern_sx.c Fri Aug 14 21:50:47 2009 (r196227) @@ -205,6 +205,8 @@ sx_init_flags(struct sx *sx, const char MPASS((opts & ~(SX_QUIET | SX_RECURSE | SX_NOWITNESS | SX_DUPOK | SX_NOPROFILE | SX_NOADAPTIVE)) == 0); + ASSERT_ATOMIC_LOAD(sx->sx_lock, ("%s: sx_lock not aligned for %s: %p", + __func__, description, &sx->sx_lock)); flags = LO_SLEEPABLE | LO_UPGRADABLE; if (opts & SX_DUPOK) Modified: stable/8/sys/sys/systm.h ============================================================================== --- stable/8/sys/sys/systm.h Fri Aug 14 21:46:54 2009 (r196226) +++ stable/8/sys/sys/systm.h Fri Aug 14 21:50:47 2009 (r196227) @@ -89,6 +89,10 @@ extern int maxusers; /* system tune hin #define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] #endif +#define ASSERT_ATOMIC_LOAD(var,msg) \ + KASSERT(sizeof(var) <= sizeof(uintptr_t) && \ + ALIGN(&(var)) == (uintptr_t)&(var), msg) + /* * XXX the hints declarations are even more misplaced than most declarations * in this file, since they are needed in one file (per arch) and only used From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 22:41:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E6A61065672; Fri, 14 Aug 2009 22:41:39 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E14E8FC59; Fri, 14 Aug 2009 22:41: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 n7EMfdsU050066; Fri, 14 Aug 2009 22:41:39 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EMfdw1050063; Fri, 14 Aug 2009 22:41:39 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <200908142241.n7EMfdw1050063@svn.freebsd.org> From: Marko Zec Date: Fri, 14 Aug 2009 22:41: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: r196228 - in head/sys: conf net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 22:41:39 -0000 Author: zec Date: Fri Aug 14 22:41:39 2009 New Revision: 196228 URL: http://svn.freebsd.org/changeset/base/196228 Log: Make VNET_DEBUG a standalone compile-time option, i.e. decouple it from INVARIANTS. Reviewed by: bz Approved by: re (rwatson), julian (mentor) Modified: head/sys/conf/options head/sys/net/vnet.h Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Fri Aug 14 21:50:47 2009 (r196227) +++ head/sys/conf/options Fri Aug 14 22:41:39 2009 (r196228) @@ -821,8 +821,9 @@ TDMA_TXRATE_QUARTER_DEFAULT opt_tdma.h TDMA_TXRATE_11NA_DEFAULT opt_tdma.h TDMA_TXRATE_11NG_DEFAULT opt_tdma.h -# Virtualize the network stack +# Network stack virtualization options VIMAGE opt_global.h +VNET_DEBUG opt_global.h # Common Flash Interface (CFI) options CFI_SUPPORT_STRATAFLASH opt_cfi.h Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Fri Aug 14 21:50:47 2009 (r196227) +++ head/sys/net/vnet.h Fri Aug 14 22:41:39 2009 (r196228) @@ -107,9 +107,6 @@ void vnet_destroy(struct vnet *vnet); * Various macros -- get and set the current network stack, but also * assertions. */ -#ifdef INVARIANTS -#define VNET_DEBUG -#endif #ifdef VNET_DEBUG #define VNET_ASSERT(condition) \ if (!(condition)) { \ From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 22:43:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA7F81065690; Fri, 14 Aug 2009 22:43:25 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A3878FC59; Fri, 14 Aug 2009 22:43: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 n7EMhPxc050132; Fri, 14 Aug 2009 22:43:25 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EMhPUQ050130; Fri, 14 Aug 2009 22:43:25 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <200908142243.n7EMhPUQ050130@svn.freebsd.org> From: Marko Zec Date: Fri, 14 Aug 2009 22:43: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: r196229 - 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, 14 Aug 2009 22:43:25 -0000 Author: zec Date: Fri Aug 14 22:43:25 2009 New Revision: 196229 URL: http://svn.freebsd.org/changeset/base/196229 Log: SCTP is not yet compatible with options VIMAGE kernels although it compiles with VIMAGE defined, so explicitly disallow building such kernels. Reviewed by: rrs Approved by: re (rwatson), julian (mentor) Modified: head/sys/netinet/sctp_os_bsd.h Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Fri Aug 14 22:41:39 2009 (r196228) +++ head/sys/netinet/sctp_os_bsd.h Fri Aug 14 22:43:25 2009 (r196229) @@ -78,6 +78,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef VIMAGE +#error "SCTP is not yet compatible with VIMAGE." +#endif + #ifdef IPSEC #include #include From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 22:46:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0FF8106568C; Fri, 14 Aug 2009 22:46:45 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C102B8FC4D; Fri, 14 Aug 2009 22:46: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 n7EMkjXr050247; Fri, 14 Aug 2009 22:46:45 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EMkjgw050245; Fri, 14 Aug 2009 22:46:45 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <200908142246.n7EMkjgw050245@svn.freebsd.org> From: Marko Zec Date: Fri, 14 Aug 2009 22:46: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: r196230 - 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: Fri, 14 Aug 2009 22:46:45 -0000 Author: zec Date: Fri Aug 14 22:46:45 2009 New Revision: 196230 URL: http://svn.freebsd.org/changeset/base/196230 Log: Appease VNET_DEBUG - in if_vmove we temporarily switch i.e. recurse from one vnet to another which is OK, so no need to flood the console with warnings here. Approved by: re (rwatson), julian (mentor) Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Fri Aug 14 22:43:25 2009 (r196229) +++ head/sys/net/if.c Fri Aug 14 22:46:45 2009 (r196230) @@ -920,7 +920,7 @@ if_vmove_loan(struct thread *td, struct /* Make sure the named iface does not exists in the dst. prison/vnet. */ /* XXX Lock interfaces to avoid races. */ - CURVNET_SET(pr->pr_vnet); + CURVNET_SET_QUIET(pr->pr_vnet); difp = ifunit(ifname); CURVNET_RESTORE(); if (difp != NULL) { From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 22:55:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65651106564A; Fri, 14 Aug 2009 22:55:55 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 380C88FC45; Fri, 14 Aug 2009 22:55: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 n7EMttxk050558; Fri, 14 Aug 2009 22:55:55 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EMttK0050555; Fri, 14 Aug 2009 22:55:55 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <200908142255.n7EMttK0050555@svn.freebsd.org> From: Marko Zec Date: Fri, 14 Aug 2009 22:55: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: r196231 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris conf contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclient mo... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Aug 2009 22:55:55 -0000 Author: zec Date: Fri Aug 14 22:55:54 2009 New Revision: 196231 URL: http://svn.freebsd.org/changeset/base/196231 Log: MFC r196228: Make VNET_DEBUG a standalone compile-time option, i.e. decouple it from INVARIANTS. Reviewed by: bz Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/options stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/vnet.h stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Fri Aug 14 22:46:45 2009 (r196230) +++ stable/8/sys/conf/options Fri Aug 14 22:55:54 2009 (r196231) @@ -821,8 +821,9 @@ TDMA_TXRATE_QUARTER_DEFAULT opt_tdma.h TDMA_TXRATE_11NA_DEFAULT opt_tdma.h TDMA_TXRATE_11NG_DEFAULT opt_tdma.h -# Virtualize the network stack +# Network stack virtualization options VIMAGE opt_global.h +VNET_DEBUG opt_global.h # Common Flash Interface (CFI) options CFI_SUPPORT_STRATAFLASH opt_cfi.h Modified: stable/8/sys/net/vnet.h ============================================================================== --- stable/8/sys/net/vnet.h Fri Aug 14 22:46:45 2009 (r196230) +++ stable/8/sys/net/vnet.h Fri Aug 14 22:55:54 2009 (r196231) @@ -107,9 +107,6 @@ void vnet_destroy(struct vnet *vnet); * Various macros -- get and set the current network stack, but also * assertions. */ -#ifdef INVARIANTS -#define VNET_DEBUG -#endif #ifdef VNET_DEBUG #define VNET_ASSERT(condition) \ if (!(condition)) { \ From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 23:01:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD8E51065672; Fri, 14 Aug 2009 23:01:21 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A043C8FC16; Fri, 14 Aug 2009 23:01: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 n7EN1LDv050805; Fri, 14 Aug 2009 23:01:21 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EN1Lnm050803; Fri, 14 Aug 2009 23:01:21 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <200908142301.n7EN1Lnm050803@svn.freebsd.org> From: Marko Zec Date: Fri, 14 Aug 2009 23:01: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: r196232 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclient 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: Fri, 14 Aug 2009 23:01:21 -0000 Author: zec Date: Fri Aug 14 23:01:21 2009 New Revision: 196232 URL: http://svn.freebsd.org/changeset/base/196232 Log: MFC r196229: SCTP is not yet compatible with options VIMAGE kernels although it compiles with VIMAGE defined, so explicitly disallow building such kernels. Reviewed by: rrs Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) Modified: 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/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netinet/sctp_os_bsd.h stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/8/sys/netinet/sctp_os_bsd.h Fri Aug 14 22:55:54 2009 (r196231) +++ stable/8/sys/netinet/sctp_os_bsd.h Fri Aug 14 23:01:21 2009 (r196232) @@ -78,6 +78,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef VIMAGE +#error "SCTP is not yet compatible with VIMAGE." +#endif + #ifdef IPSEC #include #include From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 23:05:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CF5B106568D; Fri, 14 Aug 2009 23:05:10 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5974F8FC43; Fri, 14 Aug 2009 23:05: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 n7EN5A1g051007; Fri, 14 Aug 2009 23:05:10 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EN5Arc051005; Fri, 14 Aug 2009 23:05:10 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <200908142305.n7EN5Arc051005@svn.freebsd.org> From: Marko Zec Date: Fri, 14 Aug 2009 23:05:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196233 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclient 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: Fri, 14 Aug 2009 23:05:10 -0000 Author: zec Date: Fri Aug 14 23:05:10 2009 New Revision: 196233 URL: http://svn.freebsd.org/changeset/base/196233 Log: MFC r196230: Appease VNET_DEBUG - in if_vmove we temporarily switch i.e. recurse from one vnet to another which is OK, so no need to flood the console with warnings here. Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) Modified: 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/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/if.c stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net/if.c ============================================================================== --- stable/8/sys/net/if.c Fri Aug 14 23:01:21 2009 (r196232) +++ stable/8/sys/net/if.c Fri Aug 14 23:05:10 2009 (r196233) @@ -920,7 +920,7 @@ if_vmove_loan(struct thread *td, struct /* Make sure the named iface does not exists in the dst. prison/vnet. */ /* XXX Lock interfaces to avoid races. */ - CURVNET_SET(pr->pr_vnet); + CURVNET_SET_QUIET(pr->pr_vnet); difp = ifunit(ifname); CURVNET_RESTORE(); if (difp != NULL) { From owner-svn-src-all@FreeBSD.ORG Fri Aug 14 23:44:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96AD2106568C; Fri, 14 Aug 2009 23:44:59 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 859EC8FC3D; Fri, 14 Aug 2009 23:44: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 n7ENix1U051746; Fri, 14 Aug 2009 23:44:59 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7ENixMN051744; Fri, 14 Aug 2009 23:44:59 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200908142344.n7ENixMN051744@svn.freebsd.org> From: Qing Li Date: Fri, 14 Aug 2009 23:44: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: r196234 - 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, 14 Aug 2009 23:44:59 -0000 Author: qingli Date: Fri Aug 14 23:44:59 2009 New Revision: 196234 URL: http://svn.freebsd.org/changeset/base/196234 Log: In function ip_output(), the cached route is flushed when there is a mismatch between the cached entry and the intended destination. The cached rtentry{} is flushed but the associated llentry{} is not. This causes the wrong destination MAC address being used in the output packets. The fix is to flush the llentry{} when rtentry{} is cleared. Reviewed by: kmacy, rwatson Approved by: re Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Aug 14 23:05:10 2009 (r196233) +++ head/sys/netinet/ip_output.c Fri Aug 14 23:44:59 2009 (r196234) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -201,9 +202,12 @@ again: if (ro->ro_rt && ((ro->ro_rt->rt_flags & RTF_UP) == 0 || dst->sin_family != AF_INET || dst->sin_addr.s_addr != ip->ip_dst.s_addr)) { - if (!nortfree) + if (!nortfree) { RTFREE(ro->ro_rt); + LLE_FREE(ro->ro_lle); + } ro->ro_rt = (struct rtentry *)NULL; + ro->ro_lle = (struct llentry *)NULL; } #ifdef IPFIREWALL_FORWARD if (ro->ro_rt == NULL && fwd_tag == NULL) { From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 00:04:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A412106568B; Sat, 15 Aug 2009 00:04:13 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F07738FC3F; Sat, 15 Aug 2009 00:04:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7F04C3B052229; Sat, 15 Aug 2009 00:04:12 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7F04CxT052227; Sat, 15 Aug 2009 00:04:12 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200908150004.n7F04CxT052227@svn.freebsd.org> From: Qing Li Date: Sat, 15 Aug 2009 00:04: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: r196235 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclient 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: Sat, 15 Aug 2009 00:04:13 -0000 Author: qingli Date: Sat Aug 15 00:04:12 2009 New Revision: 196235 URL: http://svn.freebsd.org/changeset/base/196235 Log: MFC 196234 In function ip_output(), the cached route is flushed when there is a mismatch between the cached entry and the intended destination. The cached rtentry{} is flushed but the associated llentry{} is not. This causes the wrong destination MAC address being used in the output packets. The fix is to flush the llentry{} when rtentry{} is cleared. Reviewed by: kmacy, rwatson Approved by: re Modified: 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/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netinet/ip_output.c stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netinet/ip_output.c ============================================================================== --- stable/8/sys/netinet/ip_output.c Fri Aug 14 23:44:59 2009 (r196234) +++ stable/8/sys/netinet/ip_output.c Sat Aug 15 00:04:12 2009 (r196235) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -201,9 +202,12 @@ again: if (ro->ro_rt && ((ro->ro_rt->rt_flags & RTF_UP) == 0 || dst->sin_family != AF_INET || dst->sin_addr.s_addr != ip->ip_dst.s_addr)) { - if (!nortfree) + if (!nortfree) { RTFREE(ro->ro_rt); + LLE_FREE(ro->ro_lle); + } ro->ro_rt = (struct rtentry *)NULL; + ro->ro_lle = (struct llentry *)NULL; } #ifdef IPFIREWALL_FORWARD if (ro->ro_rt == NULL && fwd_tag == NULL) { From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 03:01:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0266E1065696; Sat, 15 Aug 2009 03:01:03 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f205.google.com (mail-fx0-f205.google.com [209.85.220.205]) by mx1.freebsd.org (Postfix) with ESMTP id 1EE2F8FC41; Sat, 15 Aug 2009 03:01:02 +0000 (UTC) Received: by fxm1 with SMTP id 1so1410736fxm.7 for ; Fri, 14 Aug 2009 20:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=ZRonFAq3aRIdt/oYZLYaRuYzS1/HRtDfP32g0xr++AU=; b=RqY9xyccdlDQX+IYVRQzUcwy83D8uQZ5IaPupl0hzziAU5pCl15rnmT+hXuOzXehxY 20gHli3AYNAssLuSU2iGxoHcKMuytyOiwDgXvIA3EjD3mqg9jVV6lrRGMvdqx1sqoxOf 4XF/Cu4DGdLHw8xtcwwzmoh9vbhiROJVaHM2U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=I/+wtGQT4vJM5uIqLrG92e4wwjWClGyczz6hJn5/QB8EthDnZv9A1dLnSmoN02VUeE I/GHYiFl9RYQ8s6Yp49pcoKwXsczlsLAOrvAcUuEk+AxnHUOuR4g9IpmNoBpjlLlnpap KfZTE1HhgLKXw6owCNNs81K6llnJaJi5GOvuU= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.113.9 with SMTP id y9mr631359fap.61.1250303630020; Fri, 14 Aug 2009 19:33:50 -0700 (PDT) In-Reply-To: <200908142146.n7ELksKZ048760@svn.freebsd.org> References: <200908142146.n7ELksKZ048760@svn.freebsd.org> Date: Sat, 15 Aug 2009 04:33:49 +0200 X-Google-Sender-Auth: 62226973df3521b6 Message-ID: <3bbf2fe10908141933u91d0305jdc7301526adb69e2@mail.gmail.com> From: Attilio Rao To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196226 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 03:01:04 -0000 2009/8/14 Bjoern A. Zeeb : > Author: bz > Date: Fri Aug 14 21:46:54 2009 > New Revision: 196226 > URL: http://svn.freebsd.org/changeset/base/196226 > > Log: > Add a new macro to test that a variable could be loaded atomically. > Check that the given variable is at most uintptr_t in size and that > it is aligned. > > Note: ASSERT_ATOMIC_LOAD() uses ALIGN() to check for adequate > alignment -- however, the function of ALIGN() is to guarantee > alignment, and therefore may lead to stronger alignment > enforcement than necessary for types that are smaller than > sizeof(uintptr_t). > > Add checks to mtx, rw and sx locks init functions to detect possible > breakage. This was used during debugging of the problem fixed with > r196118 where a pointer was on an un-aligned address in the dpcpu area. > > In collaboration with: rwatson > Reviewed by: rwatson > Approved by: re (kib) > > Modified: > head/sys/kern/kern_mutex.c > head/sys/kern/kern_rwlock.c > head/sys/kern/kern_sx.c > head/sys/sys/systm.h I think you should cover the lockmgr case too. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 11:47:05 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BADF0106568B; Sat, 15 Aug 2009 11:47:05 +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 A97B38FC43; Sat, 15 Aug 2009 11:47: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 n7FBl5k7069287; Sat, 15 Aug 2009 11:47:05 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FBl5HS069284; Sat, 15 Aug 2009 11:47:05 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200908151147.n7FBl5HS069284@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 15 Aug 2009 11:47: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: r196242 - 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: Sat, 15 Aug 2009 11:47:05 -0000 Author: trasz Date: Sat Aug 15 11:47:05 2009 New Revision: 196242 URL: http://svn.freebsd.org/changeset/base/196242 Log: Add mptutil(8) and mfiutil(1) to 'SEE ALSO' sections in mpt(4) and mfi(4). Approved by: re (rwatson) Modified: head/share/man/man4/mfi.4 head/share/man/man4/mpt.4 Modified: head/share/man/man4/mfi.4 ============================================================================== --- head/share/man/man4/mfi.4 Sat Aug 15 08:39:54 2009 (r196241) +++ head/share/man/man4/mfi.4 Sat Aug 15 11:47:05 2009 (r196242) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2008 +.Dd August 15, 2009 .Dt MFI 4 .Os .Sh NAME @@ -102,6 +102,7 @@ management interface An attempt was made to remove a mounted volume. .El .Sh SEE ALSO +.Xr mfiutil 1 , .Xr amr 4 , .Xr pci 4 .Sh HISTORY Modified: head/share/man/man4/mpt.4 ============================================================================== --- head/share/man/man4/mpt.4 Sat Aug 15 08:39:54 2009 (r196241) +++ head/share/man/man4/mpt.4 Sat Aug 15 11:47:05 2009 (r196242) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 6, 2007 +.Dd August 15, 2009 .Dt MPT 4 .Os .Sh NAME @@ -155,6 +155,7 @@ can take on - no separate compilation is .Xr sa 4 , .Xr scsi 4 , .Xr targ 4 , +.Xr mptutil 8 , .Xr gmultipath 8 .Rs .%T "LSI Logic Website" From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 11:52:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ACAB106568E; Sat, 15 Aug 2009 11:52:41 +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 ECDA48FC65; Sat, 15 Aug 2009 11:52: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 n7FBqeOL069436; Sat, 15 Aug 2009 11:52:40 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FBqeQA069432; Sat, 15 Aug 2009 11:52:40 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200908151152.n7FBqeQA069432@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 15 Aug 2009 11:52: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: r196243 - 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, 15 Aug 2009 11:52:41 -0000 Author: trasz Date: Sat Aug 15 11:52:40 2009 New Revision: 196243 URL: http://svn.freebsd.org/changeset/base/196243 Log: MFC c196242: Add mptutil(8) and mfiutil(1) to 'SEE ALSO' sections in mpt(4) and mfi(4). Approved by: re (rwatson) Modified: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/mfi.4 stable/8/share/man/man4/mpt.4 Modified: stable/8/share/man/man4/mfi.4 ============================================================================== --- stable/8/share/man/man4/mfi.4 Sat Aug 15 11:47:05 2009 (r196242) +++ stable/8/share/man/man4/mfi.4 Sat Aug 15 11:52:40 2009 (r196243) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2008 +.Dd August 15, 2009 .Dt MFI 4 .Os .Sh NAME @@ -102,6 +102,7 @@ management interface An attempt was made to remove a mounted volume. .El .Sh SEE ALSO +.Xr mfiutil 1 , .Xr amr 4 , .Xr pci 4 .Sh HISTORY Modified: stable/8/share/man/man4/mpt.4 ============================================================================== --- stable/8/share/man/man4/mpt.4 Sat Aug 15 11:47:05 2009 (r196242) +++ stable/8/share/man/man4/mpt.4 Sat Aug 15 11:52:40 2009 (r196243) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 6, 2007 +.Dd August 15, 2009 .Dt MPT 4 .Os .Sh NAME @@ -155,6 +155,7 @@ can take on - no separate compilation is .Xr sa 4 , .Xr scsi 4 , .Xr targ 4 , +.Xr mptutil 8 , .Xr gmultipath 8 .Rs .%T "LSI Logic Website" From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 14:39:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF75B106568B; Sat, 15 Aug 2009 14:39:33 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE09A8FC16; Sat, 15 Aug 2009 14:39: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 n7FEdXIe073319; Sat, 15 Aug 2009 14:39:33 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FEdXom073317; Sat, 15 Aug 2009 14:39:33 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200908151439.n7FEdXom073317@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 15 Aug 2009 14:39: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: r196244 - head/usr.sbin/pstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Aug 2009 14:39:33 -0000 Author: stas Date: Sat Aug 15 14:39:33 2009 New Revision: 196244 URL: http://svn.freebsd.org/changeset/base/196244 Log: - Avoid overflowing the swap size counters in human-readable mode by introducing the new CONVERT_BLOCKS macro which operates on sizes already converted to number of blocks. With this macro it is not longer needed to perform needless multiplication by blocksize just to divide on it later in CONVERT macro. Approved by: re (kib) MFC after: 1 week Modified: head/usr.sbin/pstat/pstat.c Modified: head/usr.sbin/pstat/pstat.c ============================================================================== --- head/usr.sbin/pstat/pstat.c Sat Aug 15 11:52:40 2009 (r196243) +++ head/usr.sbin/pstat/pstat.c Sat Aug 15 14:39:33 2009 (r196244) @@ -460,6 +460,7 @@ getfiles(struct xfile **abuf, size_t *al */ #define CONVERT(v) ((int64_t)(v) * pagesize / blocksize) +#define CONVERT_BLOCKS(v) ((int64_t)(v) * pagesize) static struct kvm_swap swtot; static int nswdev; @@ -492,10 +493,10 @@ print_swap_line(const char *swdevname, i printf("%-15s %*jd ", swdevname, hlen, CONVERT(nblks)); if (humanflag) { humanize_number(usedbuf, sizeof(usedbuf), - CONVERT(blocksize * bused), "", + CONVERT_BLOCKS(bused), "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); humanize_number(availbuf, sizeof(availbuf), - CONVERT(blocksize * bavail), "", + CONVERT_BLOCKS(bavail), "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); printf("%8s %8s %5.0f%%\n", usedbuf, availbuf, bpercent); } else { From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 15:12:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D7BC106568D; Sat, 15 Aug 2009 15:12:46 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B3278FC5B; Sat, 15 Aug 2009 15:12: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 n7FFCkIa074508; Sat, 15 Aug 2009 15:12:46 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FFCkPM074506; Sat, 15 Aug 2009 15:12:46 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200908151512.n7FFCkPM074506@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 15 Aug 2009 15:12: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: r196245 - stable/8/usr.sbin/pstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Aug 2009 15:12:46 -0000 Author: stas Date: Sat Aug 15 15:12:46 2009 New Revision: 196245 URL: http://svn.freebsd.org/changeset/base/196245 Log: - Merge r196244: Avoid overflowing the swap size counters in human-readable mode by introducing the new CONVERT_BLOCKS macro which operates on sizes already converted to number of blocks. With this macro it is not longer needed to perform needless multiplica Approved by: re (kib) Modified: stable/8/usr.sbin/pstat/ (props changed) stable/8/usr.sbin/pstat/pstat.c Modified: stable/8/usr.sbin/pstat/pstat.c ============================================================================== --- stable/8/usr.sbin/pstat/pstat.c Sat Aug 15 14:39:33 2009 (r196244) +++ stable/8/usr.sbin/pstat/pstat.c Sat Aug 15 15:12:46 2009 (r196245) @@ -460,6 +460,7 @@ getfiles(struct xfile **abuf, size_t *al */ #define CONVERT(v) ((int64_t)(v) * pagesize / blocksize) +#define CONVERT_BLOCKS(v) ((int64_t)(v) * pagesize) static struct kvm_swap swtot; static int nswdev; @@ -492,10 +493,10 @@ print_swap_line(const char *swdevname, i printf("%-15s %*jd ", swdevname, hlen, CONVERT(nblks)); if (humanflag) { humanize_number(usedbuf, sizeof(usedbuf), - CONVERT(blocksize * bused), "", + CONVERT_BLOCKS(bused), "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); humanize_number(availbuf, sizeof(availbuf), - CONVERT(blocksize * bavail), "", + CONVERT_BLOCKS(bavail), "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); printf("%8s %8s %5.0f%%\n", usedbuf, availbuf, bpercent); } else { From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 15:15:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9416106568C; Sat, 15 Aug 2009 15:15:20 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D81A78FC52; Sat, 15 Aug 2009 15:15:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7FFFKmI074657; Sat, 15 Aug 2009 15:15:20 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FFFKEG074655; Sat, 15 Aug 2009 15:15:20 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200908151515.n7FFFKEG074655@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 15 Aug 2009 15:15:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196246 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Aug 2009 15:15:21 -0000 Author: stas Date: Sat Aug 15 15:15:20 2009 New Revision: 196246 URL: http://svn.freebsd.org/changeset/base/196246 Log: - Proprely intialize UART parameters at probe stage, so uart(4) will initialize the FIFO memory correctly on attach. Before that this values was intialized in only in at91_usart_bus_attach which is called after the uart(4) memory allocation happens. Approved by: re (kib) MFC after: 1 week Modified: head/sys/arm/at91/uart_dev_at91usart.c Modified: head/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_dev_at91usart.c Sat Aug 15 15:12:46 2009 (r196245) +++ head/sys/arm/at91/uart_dev_at91usart.c Sat Aug 15 15:15:20 2009 (r196246) @@ -307,6 +307,10 @@ static kobj_method_t at91_usart_methods[ int at91_usart_bus_probe(struct uart_softc *sc) { + + sc->sc_txfifosz = USART_BUFFER_SIZE; + sc->sc_rxfifosz = USART_BUFFER_SIZE; + sc->sc_hwiflow = 0; return (0); } @@ -344,10 +348,6 @@ at91_usart_bus_attach(struct uart_softc atsc->flags |= HAS_TIMEOUT; WR4(&sc->sc_bas, USART_IDR, 0xffffffff); - sc->sc_txfifosz = USART_BUFFER_SIZE; - sc->sc_rxfifosz = USART_BUFFER_SIZE; - sc->sc_hwiflow = 0; - #ifndef SKYEYE_WORKAROUNDS /* * Allocate DMA tags and maps From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 15:18:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2DC7106568C; Sat, 15 Aug 2009 15:18:29 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B469F8FC67; Sat, 15 Aug 2009 15:18: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 n7FFITtT074830; Sat, 15 Aug 2009 15:18:29 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FFITAG074828; Sat, 15 Aug 2009 15:18:29 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200908151518.n7FFITAG074828@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 15 Aug 2009 15:18: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: r196247 - in stable/8/sys: . amd64/include/xen arm/at91 cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclien... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Aug 2009 15:18:30 -0000 Author: stas Date: Sat Aug 15 15:18:29 2009 New Revision: 196247 URL: http://svn.freebsd.org/changeset/base/196247 Log: - Merge r196246: Proprely intialize UART parameters at probe stage, so uart(4) will initialize the FIFO memory correctly on attach. Before that this values was intialized in only in at91_usart_bus_attach which is called after the uart(4) memory allocation happens. Approved by: re (kib) MFC after: 1 week Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/arm/at91/uart_dev_at91usart.c 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/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- stable/8/sys/arm/at91/uart_dev_at91usart.c Sat Aug 15 15:15:20 2009 (r196246) +++ stable/8/sys/arm/at91/uart_dev_at91usart.c Sat Aug 15 15:18:29 2009 (r196247) @@ -307,6 +307,10 @@ static kobj_method_t at91_usart_methods[ int at91_usart_bus_probe(struct uart_softc *sc) { + + sc->sc_txfifosz = USART_BUFFER_SIZE; + sc->sc_rxfifosz = USART_BUFFER_SIZE; + sc->sc_hwiflow = 0; return (0); } @@ -344,10 +348,6 @@ at91_usart_bus_attach(struct uart_softc atsc->flags |= HAS_TIMEOUT; WR4(&sc->sc_bas, USART_IDR, 0xffffffff); - sc->sc_txfifosz = USART_BUFFER_SIZE; - sc->sc_rxfifosz = USART_BUFFER_SIZE; - sc->sc_hwiflow = 0; - #ifndef SKYEYE_WORKAROUNDS /* * Allocate DMA tags and maps From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 15:40:31 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EC07106568B; Sat, 15 Aug 2009 15:40:31 +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 2D1318FC61; Sat, 15 Aug 2009 15:40: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 n7FFeVTn075797; Sat, 15 Aug 2009 15:40:31 GMT (envelope-from fluffy@svn.freebsd.org) Received: (from fluffy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FFeVCl075795; Sat, 15 Aug 2009 15:40:31 GMT (envelope-from fluffy@svn.freebsd.org) Message-Id: <200908151540.n7FFeVCl075795@svn.freebsd.org> From: Dima Panov Date: Sat, 15 Aug 2009 15:40: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: r196248 - 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: Sat, 15 Aug 2009 15:40:31 -0000 Author: fluffy (ports committer) Date: Sat Aug 15 15:40:30 2009 New Revision: 196248 URL: http://svn.freebsd.org/changeset/base/196248 Log: Add my birthday Approved by: re (rwatson) miwi (mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Sat Aug 15 15:18:29 2009 (r196247) +++ head/usr.bin/calendar/calendars/calendar.freebsd Sat Aug 15 15:40:30 2009 (r196248) @@ -244,6 +244,7 @@ 09/10 Wesley R. Peters born in Hartford, Alabama, United States, 1961 09/12 Weongyo Jeong born in Haman, Korea, 1980 09/12 William C. Fumerola II born in Detroit, Michigan, United States, 1981 +09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 09/27 Neil Blakey-Milner born in Port Elizabeth, South Africa, 1978 From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 15:41:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0FAF106568C; Sat, 15 Aug 2009 15:41:10 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EE568FC61; Sat, 15 Aug 2009 15:41: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 n7FFfALJ075855; Sat, 15 Aug 2009 15:41:10 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FFfA4C075853; Sat, 15 Aug 2009 15:41:10 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200908151541.n7FFfA4C075853@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 15 Aug 2009 15:41:10 +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: r196249 - in stable/7/lib/libc: . arm/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Aug 2009 15:41:10 -0000 Author: stas Date: Sat Aug 15 15:41:10 2009 New Revision: 196249 URL: http://svn.freebsd.org/changeset/base/196249 Log: - MFC r194583: Fix strncmp on arm. Return 0 as result without performing the main cycle only if the len passed is equal to 0. If end address overflows use last possible address as the end address. Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/arm/string/strncmp.S Modified: stable/7/lib/libc/arm/string/strncmp.S ============================================================================== --- stable/7/lib/libc/arm/string/strncmp.S Sat Aug 15 15:40:30 2009 (r196248) +++ stable/7/lib/libc/arm/string/strncmp.S Sat Aug 15 15:41:10 2009 (r196249) @@ -33,13 +33,17 @@ __FBSDID("$FreeBSD$"); ENTRY(strncmp) -/* if ((len - 1) < 0) return 0 */ - subs r2, r2, #1 - movmi r0, #0 - movmi pc, lr +/* if (len == 0) return 0 */ + cmp r2, #0 + moveq r0, #0 + moveq pc, lr /* ip == last src address to compare */ - add ip, r0, r2 + adds ip, r0, r2 + sub ip, ip, #1 +/* Use last possible address on overflow. */ + movcs ip, #0 + subcs ip, ip, #1 1: ldrb r2, [r0], #1 ldrb r3, [r1], #1 From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 15:48:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF20A106568B; Sat, 15 Aug 2009 15:48:10 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCBC58FC52; Sat, 15 Aug 2009 15:48: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 n7FFmAwh076138; Sat, 15 Aug 2009 15:48:10 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FFmAVK076135; Sat, 15 Aug 2009 15:48:10 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200908151548.n7FFmAVK076135@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 15 Aug 2009 15:48:10 +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: r196250 - in stable/7/sys: . contrib/pf dev/sound/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: Sat, 15 Aug 2009 15:48:11 -0000 Author: stas Date: Sat Aug 15 15:48:10 2009 New Revision: 196250 URL: http://svn.freebsd.org/changeset/base/196250 Log: - MFC r191308, r191310: Properly unlock mutex on failure in channel_trigger. Before this the function just returned with the mutex held. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/sound/pci/envy24.c stable/7/sys/dev/sound/pci/envy24ht.c Modified: stable/7/sys/dev/sound/pci/envy24.c ============================================================================== --- stable/7/sys/dev/sound/pci/envy24.c Sat Aug 15 15:41:10 2009 (r196249) +++ stable/7/sys/dev/sound/pci/envy24.c Sat Aug 15 15:48:10 2009 (r196250) @@ -1721,6 +1721,7 @@ envy24chan_trigger(kobj_t obj, void *dat struct sc_info *sc = ch->parent; u_int32_t ptr; int slot; + int error = 0; #if 0 int i; @@ -1742,8 +1743,10 @@ envy24chan_trigger(kobj_t obj, void *dat sc->caps[0].minspeed = sc->caps[0].maxspeed = sc->speed; sc->caps[1].minspeed = sc->caps[1].maxspeed = sc->speed; } - else if (ch->speed != 0 && ch->speed != sc->speed) - return -1; + else if (ch->speed != 0 && ch->speed != sc->speed) { + error = -1; + goto fail; + } if (ch->speed == 0) ch->channel->speed = sc->speed; /* start or enable channel */ @@ -1773,16 +1776,20 @@ envy24chan_trigger(kobj_t obj, void *dat #if(0) device_printf(sc->dev, "envy24chan_trigger(): emldmawr\n"); #endif - if (ch->run != 1) - return -1; + if (ch->run != 1) { + error = -1; + goto fail; + } ch->emldma(ch); break; case PCMTRIG_EMLDMARD: #if(0) device_printf(sc->dev, "envy24chan_trigger(): emldmard\n"); #endif - if (ch->run != 1) - return -1; + if (ch->run != 1) { + error = -1; + goto fail; + } ch->emldma(ch); break; case PCMTRIG_ABORT: @@ -1814,9 +1821,9 @@ envy24chan_trigger(kobj_t obj, void *dat } break; } +fail: snd_mtxunlock(sc->lock); - - return 0; + return (error); } static int Modified: stable/7/sys/dev/sound/pci/envy24ht.c ============================================================================== --- stable/7/sys/dev/sound/pci/envy24ht.c Sat Aug 15 15:41:10 2009 (r196249) +++ stable/7/sys/dev/sound/pci/envy24ht.c Sat Aug 15 15:48:10 2009 (r196250) @@ -1668,6 +1668,7 @@ envy24htchan_trigger(kobj_t obj, void *d struct sc_info *sc = ch->parent; u_int32_t ptr; int slot; + int error = 0; #if 0 int i; @@ -1689,8 +1690,10 @@ envy24htchan_trigger(kobj_t obj, void *d sc->caps[0].minspeed = sc->caps[0].maxspeed = sc->speed; sc->caps[1].minspeed = sc->caps[1].maxspeed = sc->speed; } - else if (ch->speed != 0 && ch->speed != sc->speed) - return -1; + else if (ch->speed != 0 && ch->speed != sc->speed) { + error = -1; + goto fail; + } if (ch->speed == 0) ch->channel->speed = sc->speed; /* start or enable channel */ @@ -1720,16 +1723,20 @@ envy24htchan_trigger(kobj_t obj, void *d #if(0) device_printf(sc->dev, "envy24htchan_trigger(): emldmawr\n"); #endif - if (ch->run != 1) - return -1; + if (ch->run != 1) { + error = -1; + goto fail; + } ch->emldma(ch); break; case PCMTRIG_EMLDMARD: #if(0) device_printf(sc->dev, "envy24htchan_trigger(): emldmard\n"); #endif - if (ch->run != 1) - return -1; + if (ch->run != 1) { + error = -1; + goto fail; + } ch->emldma(ch); break; case PCMTRIG_ABORT: @@ -1759,9 +1766,9 @@ envy24htchan_trigger(kobj_t obj, void *d } break; } +fail: snd_mtxunlock(sc->lock); - - return 0; + return (error); } static int From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 15:52:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E084D1065690; Sat, 15 Aug 2009 15:52:20 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE56C8FC59; Sat, 15 Aug 2009 15: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 n7FFqKCO076299; Sat, 15 Aug 2009 15:52:20 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FFqKJQ076297; Sat, 15 Aug 2009 15:52:20 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200908151552.n7FFqKJQ076297@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 15 Aug 2009 15:52: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: r196251 - in stable/7/sys: . contrib/pf dev/cpuctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Aug 2009 15:52:21 -0000 Author: stas Date: Sat Aug 15 15:52:20 2009 New Revision: 196251 URL: http://svn.freebsd.org/changeset/base/196251 Log: - MFC r195081: - Don't zero data field in case of MSR write operation. Before this change the value written to MSR register was always 0 regardless of value passed by user. - Use proper data pointer when performing AMD microcode update. Previously, the pointer to user-space data has been provided instead, which is totally incorrect. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cpuctl/cpuctl.c Modified: stable/7/sys/dev/cpuctl/cpuctl.c ============================================================================== --- stable/7/sys/dev/cpuctl/cpuctl.c Sat Aug 15 15:48:10 2009 (r196250) +++ stable/7/sys/dev/cpuctl/cpuctl.c Sat Aug 15 15:52:20 2009 (r196251) @@ -223,14 +223,17 @@ cpuctl_do_msr(int cpu, cpuctl_msr_args_t * Explicitly clear cpuid data to avoid returning stale * info */ - data->data = 0; DPRINTF("[cpuctl,%d]: operating on MSR %#0x for %d cpu\n", __LINE__, data->msr, cpu); oldcpu = td->td_oncpu; is_bound = cpu_sched_is_bound(td); set_cpu(cpu, td); - ret = cmd == CPUCTL_RDMSR ? rdmsr_safe(data->msr, &data->data) : - wrmsr_safe(data->msr, data->data); + if (cmd == CPUCTL_RDMSR) { + data->data = 0; + ret = rdmsr_safe(data->msr, &data->data); + } else { + ret = wrmsr_safe(data->msr, data->data); + } restore_cpu(oldcpu, is_bound, td); return (ret); } @@ -369,7 +372,7 @@ update_amd(int cpu, cpuctl_update_args_t /* * Perform update. */ - wrmsr_safe(MSR_K8_UCODE_UPDATE, (uintptr_t)args->data); + wrmsr_safe(MSR_K8_UCODE_UPDATE, (uintptr_t)ptr); /* * Serialize instruction flow. From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 16:04:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3422E1065695; Sat, 15 Aug 2009 16:04:37 +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 225CC8FC60; Sat, 15 Aug 2009 16:04:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7FG4bCC076984; Sat, 15 Aug 2009 16:04:37 GMT (envelope-from fluffy@svn.freebsd.org) Received: (from fluffy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FG4bVD076982; Sat, 15 Aug 2009 16:04:37 GMT (envelope-from fluffy@svn.freebsd.org) Message-Id: <200908151604.n7FG4bVD076982@svn.freebsd.org> From: Dima Panov Date: Sat, 15 Aug 2009 16:04: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: r196252 - 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: Sat, 15 Aug 2009 16:04:37 -0000 Author: fluffy (ports committer) Date: Sat Aug 15 16:04:36 2009 New Revision: 196252 URL: http://svn.freebsd.org/changeset/base/196252 Log: MFC calendar.freebsd Approved by: re (rwatson) miwi (mentor) Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd (contents, props changed) Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.freebsd Sat Aug 15 15:52:20 2009 (r196251) +++ stable/8/usr.bin/calendar/calendars/calendar.freebsd Sat Aug 15 16:04:36 2009 (r196252) @@ -244,6 +244,7 @@ 09/10 Wesley R. Peters born in Hartford, Alabama, United States, 1961 09/12 Weongyo Jeong born in Haman, Korea, 1980 09/12 William C. Fumerola II born in Detroit, Michigan, United States, 1981 +09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 09/27 Neil Blakey-Milner born in Port Elizabeth, South Africa, 1978 From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 16:15:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAA16106568E; Sat, 15 Aug 2009 16:15:50 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6E308FC62; Sat, 15 Aug 2009 16:15: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 n7FGFoQw077466; Sat, 15 Aug 2009 16:15:50 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FGFoEb077460; Sat, 15 Aug 2009 16:15:50 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200908151615.n7FGFoEb077460@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 15 Aug 2009 16:15: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: r196253 - in stable/7: share/man/man4 sys sys/contrib/pf sys/dev/cpuctl sys/sys usr.sbin/cpucontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Aug 2009 16:15:50 -0000 Author: stas Date: Sat Aug 15 16:15:50 2009 New Revision: 196253 URL: http://svn.freebsd.org/changeset/base/196253 Log: - Merge r195189: - Add support to atomically set/clear individual bits of a MSR register via cpuctl(4) driver. Two new CPUCTL_MSRSBIT and CPUCTL_MSRCBIT ioctl(2) calls treat the data field of the argument struct passed as a mask and set/clear bits of the MSR register according to the mask value. - Allow user to perform atomic bitwise AND and OR operaions on MSR registers via cpucontrol(8) utility. Two new operations ("&=" and "|=") have been added. The first one applies bitwise AND operaion between the current contents of the MSR register and the mask, and the second performs bitwise OR. The argument can be optionally prefixed with "~" inversion operator. This allows one to mimic the "clear bit" behavior by using the command like this: cpucontrol -m 0x10&=~0x02 # clear the second bit of TSC MSR Inversion operator support in all modes (assignment, OR, AND). Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/cpuctl.4 stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cpuctl/cpuctl.c stable/7/sys/sys/cpuctl.h stable/7/usr.sbin/cpucontrol/ (props changed) stable/7/usr.sbin/cpucontrol/cpucontrol.8 stable/7/usr.sbin/cpucontrol/cpucontrol.c Modified: stable/7/share/man/man4/cpuctl.4 ============================================================================== --- stable/7/share/man/man4/cpuctl.4 Sat Aug 15 16:04:36 2009 (r196252) +++ stable/7/share/man/man4/cpuctl.4 Sat Aug 15 16:15:50 2009 (r196253) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31, 2008 +.Dd June 30, 2009 .Dt CPUCTL 4 .Os .Sh NAME @@ -81,6 +81,11 @@ typedef struct { uint64_t data; } cpuctl_msr_args_t; .Ed +.It Dv CPUCTL_MSRSBIT Fa cpuctl_msr_args_t *args +.It Dv CPUCTL_MSRCBIT Fa cpuctl_msr_args_t *args +Set/clear MSR bits according to the mask given in the +.Va data +field. .It Dv CPUCTL_CPUID Fa cpuctl_cpuid_args_t *args Retrieve CPUID information. Arguments are supplied in Modified: stable/7/sys/dev/cpuctl/cpuctl.c ============================================================================== --- stable/7/sys/dev/cpuctl/cpuctl.c Sat Aug 15 16:04:36 2009 (r196252) +++ stable/7/sys/dev/cpuctl/cpuctl.c Sat Aug 15 16:15:50 2009 (r196253) @@ -159,6 +159,8 @@ cpuctl_ioctl(struct cdev *dev, u_long cm case CPUCTL_RDMSR: ret = cpuctl_do_msr(cpu, (cpuctl_msr_args_t *)data, cmd, td); break; + case CPUCTL_MSRSBIT: + case CPUCTL_MSRCBIT: case CPUCTL_WRMSR: ret = priv_check(td, PRIV_CPUCTL_WRMSR); if (ret != 0) @@ -212,6 +214,7 @@ cpuctl_do_cpuid(int cpu, cpuctl_cpuid_ar static int cpuctl_do_msr(int cpu, cpuctl_msr_args_t *data, u_long cmd, struct thread *td) { + uint64_t reg; int is_bound = 0; int oldcpu; int ret; @@ -231,9 +234,22 @@ cpuctl_do_msr(int cpu, cpuctl_msr_args_t if (cmd == CPUCTL_RDMSR) { data->data = 0; ret = rdmsr_safe(data->msr, &data->data); - } else { + } else if (cmd == CPUCTL_WRMSR) { ret = wrmsr_safe(data->msr, data->data); - } + } else if (cmd == CPUCTL_MSRSBIT) { + critical_enter(); + ret = rdmsr_safe(data->msr, ®); + if (ret == 0) + ret = wrmsr_safe(data->msr, reg | data->data); + critical_exit(); + } else if (cmd == CPUCTL_MSRCBIT) { + critical_enter(); + ret = rdmsr_safe(data->msr, ®); + if (ret == 0) + ret = wrmsr_safe(data->msr, reg & ~data->data); + critical_exit(); + } else + panic("[cpuctl,%d]: unknown operation requested: %lu", __LINE__, cmd); restore_cpu(oldcpu, is_bound, td); return (ret); } Modified: stable/7/sys/sys/cpuctl.h ============================================================================== --- stable/7/sys/sys/cpuctl.h Sat Aug 15 16:04:36 2009 (r196252) +++ stable/7/sys/sys/cpuctl.h Sat Aug 15 16:15:50 2009 (r196253) @@ -48,5 +48,7 @@ typedef struct { #define CPUCTL_WRMSR _IOWR('c', 2, cpuctl_msr_args_t) #define CPUCTL_CPUID _IOWR('c', 3, cpuctl_cpuid_args_t) #define CPUCTL_UPDATE _IOWR('c', 4, cpuctl_update_args_t) +#define CPUCTL_MSRSBIT _IOWR('c', 5, cpuctl_msr_args_t) +#define CPUCTL_MSRCBIT _IOWR('c', 6, cpuctl_msr_args_t) #endif /* _CPUCTL_H_ */ Modified: stable/7/usr.sbin/cpucontrol/cpucontrol.8 ============================================================================== --- stable/7/usr.sbin/cpucontrol/cpucontrol.8 Sat Aug 15 16:04:36 2009 (r196252) +++ stable/7/usr.sbin/cpucontrol/cpucontrol.8 Sat Aug 15 16:15:50 2009 (r196253) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2008 +.Dd June 30, 2009 .Dt CPUCONTROL 8 .Os .Sh NAME @@ -35,7 +35,25 @@ device. .Sh SYNOPSIS .Nm .Op Fl vh -.Fl m Ar msr Ns Op = Ns Ar value +.Fl m Ar msr +.Bk +.Ar device +.Ek +.Nm +.Op Fl vh +.Fl m Ar msr Ns = Ns Ar value +.Bk +.Ar device +.Ek +.Nm +.Op Fl vh +.Fl m Ar msr Ns &= Ns Ar mask +.Bk +.Ar device +.Ek +.Nm +.Op Fl vh +.Fl m Ar msr Ns |= Ns Ar mask .Bk .Ar device .Ek @@ -67,8 +85,32 @@ The following options are available: Where to look for microcode images. The option can be specified multiple times. .It Fl m Ar msr Ns Op = Ns Ar value -Read/write the specified MSR. -Both the MSR and the value should be given as a hex number. +Show value of the specified MSR. +MSR register number should be given as a hexadecimal number. +.It Fl m Ar msr Ns = Ns Ar value +Store the +.Ar value +in the specified MSR register. +The +.Ar value +argument can be prefixed with ~ operator. +In this case the inverted value of argument will be stored in the register. +.It Fl m Ar msr Ns &= Ns Ar mask +Store the result of bitwise AND operation between +.Ar mask +and the current MSR value in the MSR register. +The +.Ar mask +argument can be prefixed with ~ operator. +In this case the inverted value of mask will be used. +.It Fl m Ar msr Ns |= Ns Ar mask +Store the result of bitwise OR operation between +.Ar mask +and the current MSR value in the MSR register. +The +.Ar mask +argument can be prefixed with ~ operator. +In this case the inverted value of mask will be used. .It Fl i Ar level Retrieve CPUID info. Level should be given as a hex number. @@ -94,7 +136,15 @@ will read the contents of TSC MSR from C .Pp To set the CPU 0 TSC MSR register value to 0x1 issue .Pp -.Dq Li "cpucontrol -m 0x10=0x1 /dev/cpuctl0" +.Dq Li "cpucontrol -m 0x10=0x1 /dev/cpuctl0" . +.Pp +The following command will clear the second bit of TSC register: +.Pp +.Dq Li "cpucontrol -m 0x10&=~0x02 /dev/cpuctl0" . +.Pp +The following command will set the forth and second bit of TSC register: +.Pp +.Dq Li "cpucontrol -m 0x10|=0x0a /dev/cpuctl0" . .Pp The command .Pp Modified: stable/7/usr.sbin/cpucontrol/cpucontrol.c ============================================================================== --- stable/7/usr.sbin/cpucontrol/cpucontrol.c Sat Aug 15 16:04:36 2009 (r196252) +++ stable/7/usr.sbin/cpucontrol/cpucontrol.c Sat Aug 15 16:15:50 2009 (r196253) @@ -60,6 +60,12 @@ int verbosity_level = 0; #define FLAG_M 0x02 #define FLAG_U 0x04 +#define OP_INVAL 0x00 +#define OP_READ 0x01 +#define OP_WRITE 0x02 +#define OP_OR 0x04 +#define OP_AND 0x08 + #define HIGH(val) (uint32_t)(((val) >> 32) & 0xffffffff) #define LOW(val) (uint32_t)((val) & 0xffffffff) @@ -166,28 +172,64 @@ do_msr(const char *cmdarg, const char *d { unsigned int msr; cpuctl_msr_args_t args; + size_t len; + uint64_t data = 0; + unsigned long command; + int do_invert = 0, op; int fd, error; - int wr = 0; - char *p; char *endptr; + char *p; assert(cmdarg != NULL); assert(dev != NULL); + len = strlen(cmdarg); + if (len == 0) { + WARNX(0, "MSR register expected"); + usage(); + /* NOTREACHED */ + } - p = strchr(cmdarg, '='); - if (p != NULL) { - wr = 1; - *p++ = '\0'; - args.data = strtoull(p, &endptr, 16); - if (*p == '\0' || *endptr != '\0') { - WARNX(0, "incorrect MSR value: %s", p); - usage(); - /* NOTREACHED */ + /* + * Parse command string. + */ + msr = strtoul(cmdarg, &endptr, 16); + switch (*endptr) { + case '\0': + op = OP_READ; + break; + case '=': + op = OP_WRITE; + break; + case '&': + op = OP_AND; + endptr++; + break; + case '|': + op = OP_OR; + endptr++; + break; + default: + op = OP_INVAL; + } + if (op != OP_READ) { /* Complex operation. */ + if (*endptr != '=') + op = OP_INVAL; + else { + p = ++endptr; + if (*p == '~') { + do_invert = 1; + p++; + } + data = strtoull(p, &endptr, 16); + if (*p == '\0' || *endptr != '\0') { + WARNX(0, "argument required: %s", cmdarg); + usage(); + /* NOTREACHED */ + } } } - msr = strtoul(cmdarg, &endptr, 16); - if (*cmdarg == '\0' || *endptr != '\0') { - WARNX(0, "incorrect MSR register: %s", cmdarg); + if (op == OP_INVAL) { + WARNX(0, "invalid operator: %s", cmdarg); usage(); /* NOTREACHED */ } @@ -196,20 +238,39 @@ do_msr(const char *cmdarg, const char *d * Fill ioctl argument structure. */ args.msr = msr; - fd = open(dev, wr == 0 ? O_RDONLY : O_WRONLY); + if ((do_invert != 0) ^ (op == OP_AND)) + args.data = ~data; + else + args.data = data; + switch (op) { + case OP_READ: + command = CPUCTL_RDMSR; + break; + case OP_WRITE: + command = CPUCTL_WRMSR; + break; + case OP_OR: + command = CPUCTL_MSRSBIT; + break; + case OP_AND: + command = CPUCTL_MSRCBIT; + break; + default: + abort(); + } + fd = open(dev, op == OP_READ ? O_RDONLY : O_WRONLY); if (fd < 0) { WARN(0, "error opening %s for %s", dev, - wr == 0 ? "reading" : "writing"); + op == OP_READ ? "reading" : "writing"); return (1); } - error = ioctl(fd, wr == 0 ? CPUCTL_RDMSR : CPUCTL_WRMSR, &args); + error = ioctl(fd, command, &args); if (error < 0) { - WARN(0, "ioctl(%s, %s)", dev, - wr == 0 ? "CPUCTL_RDMSR" : "CPUCTL_WRMSR"); + WARN(0, "ioctl(%s, %lu)", dev, command); close(fd); return (1); } - if (wr == 0) + if (op == OP_READ) fprintf(stdout, "MSR 0x%x: 0x%.8x 0x%.8x\n", msr, HIGH(args.data), LOW(args.data)); close(fd); From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 17:57:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE5AF106564A; Sat, 15 Aug 2009 17:57:21 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD5A18FC45; Sat, 15 Aug 2009 17:57: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 n7FHvLnw080914; Sat, 15 Aug 2009 17:57:21 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FHvLCa080913; Sat, 15 Aug 2009 17:57:21 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200908151757.n7FHvLCa080913@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 15 Aug 2009 17:57: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: r196254 - head/usr.sbin/iostat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 17:57:22 -0000 Author: keramida (doc committer) Date: Sat Aug 15 17:57:21 2009 New Revision: 196254 URL: http://svn.freebsd.org/changeset/base/196254 Log: iostat: add a bit of space between tty in/out columns The columns for tty input and output may bump against each other if the tty output needs more than 5 columns. Add a bit of space that pushes everything 1 column to the right, but also avoids the problem. Approved by: re (rwatson) Modified: head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.c ============================================================================== --- head/usr.sbin/iostat/iostat.c Sat Aug 15 16:15:50 2009 (r196253) +++ head/usr.sbin/iostat/iostat.c Sat Aug 15 17:57:21 2009 (r196254) @@ -586,7 +586,7 @@ main(int argc, char **argv) } if (xflag == 0 && Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); devstats(hflag, etime, havelast); @@ -674,7 +674,7 @@ phdr(void) return; if (Tflag > 0) - (void)printf(" tty"); + (void)printf(" tty"); for (i = 0, printed=0;(i < num_devices) && (printed < maxshowdevs);i++){ int di; if ((dev_select[i].selected != 0) @@ -696,7 +696,7 @@ phdr(void) (void)printf("\n"); if (Tflag > 0) - (void)printf(" tin tout"); + (void)printf(" tin tout"); for (i=0, printed = 0;(i < num_devices) && (printed < maxshowdevs);i++){ if ((dev_select[i].selected != 0) @@ -741,7 +741,7 @@ devstats(int perf_select, long double et if (xflag > 0) { printf(" extended device statistics "); if (Tflag > 0) - printf(" tty "); + printf(" tty "); if (Cflag > 0) printf(" cpu "); printf("\n"); @@ -754,7 +754,7 @@ devstats(int perf_select, long double et "device r/i w/i kr/i kw/i wait svc_t %%b " ); if (Tflag > 0) - printf("tin tout "); + printf("tin tout "); if (Cflag > 0) printf("us ni sy in id "); printf("\n"); @@ -895,7 +895,7 @@ devstats(int perf_select, long double et */ printf("%52s",""); if (Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); if (Cflag > 0) cpustats(); From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 18:03:35 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 386681065691; Sat, 15 Aug 2009 18:03:35 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D4B88FC15; Sat, 15 Aug 2009 18:03: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 n7FI3Y6g081172; Sat, 15 Aug 2009 18:03:34 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FI3Y1N081170; Sat, 15 Aug 2009 18:03:34 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200908151803.n7FI3Y1N081170@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 15 Aug 2009 18:03: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: r196255 - stable/8/usr.sbin/iostat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 18:03:35 -0000 Author: keramida (doc committer) Date: Sat Aug 15 18:03:34 2009 New Revision: 196255 URL: http://svn.freebsd.org/changeset/base/196255 Log: MFC 196254 - iostat: add a bit of space between tty in/out columns The columns for tty input and output may bump against each other if the tty output needs more than 5 columns. Add a bit of space that pushes everything 1 column to the right, but also avoids the problem. Approved by: re (rwatson) Modified: stable/8/usr.sbin/iostat/ (props changed) stable/8/usr.sbin/iostat/iostat.c Modified: stable/8/usr.sbin/iostat/iostat.c ============================================================================== --- stable/8/usr.sbin/iostat/iostat.c Sat Aug 15 17:57:21 2009 (r196254) +++ stable/8/usr.sbin/iostat/iostat.c Sat Aug 15 18:03:34 2009 (r196255) @@ -586,7 +586,7 @@ main(int argc, char **argv) } if (xflag == 0 && Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); devstats(hflag, etime, havelast); @@ -674,7 +674,7 @@ phdr(void) return; if (Tflag > 0) - (void)printf(" tty"); + (void)printf(" tty"); for (i = 0, printed=0;(i < num_devices) && (printed < maxshowdevs);i++){ int di; if ((dev_select[i].selected != 0) @@ -696,7 +696,7 @@ phdr(void) (void)printf("\n"); if (Tflag > 0) - (void)printf(" tin tout"); + (void)printf(" tin tout"); for (i=0, printed = 0;(i < num_devices) && (printed < maxshowdevs);i++){ if ((dev_select[i].selected != 0) @@ -741,7 +741,7 @@ devstats(int perf_select, long double et if (xflag > 0) { printf(" extended device statistics "); if (Tflag > 0) - printf(" tty "); + printf(" tty "); if (Cflag > 0) printf(" cpu "); printf("\n"); @@ -754,7 +754,7 @@ devstats(int perf_select, long double et "device r/i w/i kr/i kw/i wait svc_t %%b " ); if (Tflag > 0) - printf("tin tout "); + printf("tin tout "); if (Cflag > 0) printf("us ni sy in id "); printf("\n"); @@ -895,7 +895,7 @@ devstats(int perf_select, long double et */ printf("%52s",""); if (Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); if (Cflag > 0) cpustats(); From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 18:37:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BC54106568B; Sat, 15 Aug 2009 18:37:07 +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 120D58FC45; Sat, 15 Aug 2009 18:37:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7FIb6CT081961; Sat, 15 Aug 2009 18:37:06 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FIb69r081959; Sat, 15 Aug 2009 18:37:06 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200908151837.n7FIb69r081959@svn.freebsd.org> From: Attilio Rao Date: Sat, 15 Aug 2009 18:37: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: r196256 - head/sys/i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Aug 2009 18:37:07 -0000 Author: attilio Date: Sat Aug 15 18:37:06 2009 New Revision: 196256 URL: http://svn.freebsd.org/changeset/base/196256 Log: Port recent IPI enhachements to en: * Introduce the ipi_nmi_handler() function for the Xen infrastructure * Fixup adeguately the ipi sender functions Approved by: re (kib) Modified: head/sys/i386/xen/mp_machdep.c Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Sat Aug 15 18:03:34 2009 (r196255) +++ head/sys/i386/xen/mp_machdep.c Sat Aug 15 18:37:06 2009 (r196256) @@ -118,6 +118,7 @@ volatile int smp_tlb_wait; typedef void call_data_func_t(uintptr_t , uintptr_t); static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1109,6 +1110,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1140,10 +1149,39 @@ ipi_selected(cpumask_t cpus, u_int ipi) void ipi_all_but_self(u_int ipi) { + + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); + CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); ipi_selected(PCPU_GET(other_cpus), ipi); } +int +ipi_nmi_handler() +{ + cpumask_t cpumask; + + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); + + atomic_clear_int(&ipi_nmi_pending, cpumask); + cpustop_handler(); + return (0); +} + /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 18:37:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40CCA1065694; Sat, 15 Aug 2009 18:37:50 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ew0-f206.google.com (mail-ew0-f206.google.com [209.85.219.206]) by mx1.freebsd.org (Postfix) with ESMTP id 3D6998FC65; Sat, 15 Aug 2009 18:37:48 +0000 (UTC) Received: by ewy2 with SMTP id 2so178400ewy.43 for ; Sat, 15 Aug 2009 11:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=GqLsAUE/3YnPdJqyStUzcEx+pkxm09Onm0T73CSsgNc=; b=GqZhINZFg4X6R+l+4suFv1B1Be5MyfjO3ERrM7WU+xXY/lxOqOrqzY3NRrcvRDgNxI wV6czqcsyCM141GXDZsJ4jW1Fny3U2/HqmB9LhLlCzNdvMa1rsVAHQEr0mNECdvkfnR5 QN6aYfTeTge7HIjAJdtzTqqDYzldQjWNVSl6s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=bb7S4V8g1p8tK2oOdR/QQ0a4ZVzpNp4YQuHhj6g4LDiQ+vG9R5mLdPLbHKId2sSs6q V3IHG83Wi0unal8wgTQlrLhwkv1L92fW4y5gZkN2u4Uyub2vGFzlnne3gPC4mxmcfnLK EzxNDsf2y6Dp8rj1mdCV02SDQXMtGv5HUbVbk= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.210.116.11 with SMTP id o11mr3675711ebc.99.1250361468139; Sat, 15 Aug 2009 11:37:48 -0700 (PDT) In-Reply-To: <200908151757.n7FHvLCa080913@svn.freebsd.org> References: <200908151757.n7FHvLCa080913@svn.freebsd.org> From: Ivan Voras Date: Sat, 15 Aug 2009 20:37:28 +0200 X-Google-Sender-Auth: b96eb44b14e332b6 Message-ID: <9bbcef730908151137h3c752f91j3ec9d93a8f860d66@mail.gmail.com> To: Giorgos Keramidas Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196254 - head/usr.sbin/iostat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 18:37:50 -0000 2009/8/15 Giorgos Keramidas : > Author: keramida (doc committer) > Date: Sat Aug 15 17:57:21 2009 > New Revision: 196254 > URL: http://svn.freebsd.org/changeset/base/196254 > > Log: > =C2=A0iostat: add a bit of space between tty in/out columns > > =C2=A0The columns for tty input and output may bump against each other > =C2=A0if the tty output needs more than 5 columns. =C2=A0Add a bit of spa= ce > =C2=A0that pushes everything 1 column to the right, but also avoids the > =C2=A0problem. I don't know if it would interfere with some use cases (OTOH I don't know why would someone need tty in/out counts at all) but why not aggressively humanize the numbers instead? From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 18:56:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C403106568E; Sat, 15 Aug 2009 18:56:57 +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 116E18FC51; Sat, 15 Aug 2009 18:56: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 n7FIuuNp082699; Sat, 15 Aug 2009 18:56:56 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FIuusc082697; Sat, 15 Aug 2009 18:56:56 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200908151856.n7FIuusc082697@svn.freebsd.org> From: Attilio Rao Date: Sat, 15 Aug 2009 18:56: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: r196257 - stable/8/sys/i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Aug 2009 18:56:57 -0000 Author: attilio Date: Sat Aug 15 18:56:56 2009 New Revision: 196257 URL: http://svn.freebsd.org/changeset/base/196257 Log: MFC r196256: Fixup the Xen support in order to match newly introduced enhacements for IPIs. Approved by: re (kib) Modified: stable/8/sys/i386/xen/mp_machdep.c Modified: stable/8/sys/i386/xen/mp_machdep.c ============================================================================== --- stable/8/sys/i386/xen/mp_machdep.c Sat Aug 15 18:37:06 2009 (r196256) +++ stable/8/sys/i386/xen/mp_machdep.c Sat Aug 15 18:56:56 2009 (r196257) @@ -118,6 +118,7 @@ volatile int smp_tlb_wait; typedef void call_data_func_t(uintptr_t , uintptr_t); static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1109,6 +1110,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1140,10 +1149,39 @@ ipi_selected(cpumask_t cpus, u_int ipi) void ipi_all_but_self(u_int ipi) { + + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); + CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); ipi_selected(PCPU_GET(other_cpus), ipi); } +int +ipi_nmi_handler() +{ + cpumask_t cpumask; + + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); + + atomic_clear_int(&ipi_nmi_pending, cpumask); + cpustop_handler(); + return (0); +} + /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 19:46:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99546106568C; Sat, 15 Aug 2009 19:46:39 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.freebsd.org (Postfix) with ESMTP id 0F8A18FC15; Sat, 15 Aug 2009 19:46:38 +0000 (UTC) Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 2A9D6EB4FF7; Sat, 15 Aug 2009 22:21:02 +0300 (EEST) Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id F383145088; Sat, 15 Aug 2009 22:21:01 +0300 (EEST) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qA82IaLicYAH; Sat, 15 Aug 2009 22:21:01 +0300 (EEST) Received: from kobe.laptop (adsl218-136.kln.forthnet.gr [79.103.31.136]) by mail.ceid.upatras.gr (Postfix) with ESMTP id B053E4503F; Sat, 15 Aug 2009 22:21:01 +0300 (EEST) Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n7FJL0Ze066914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 15 Aug 2009 22:21:01 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n7FJL018066913; Sat, 15 Aug 2009 22:21:00 +0300 (EEST) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: Ivan Voras References: <200908151757.n7FHvLCa080913@svn.freebsd.org> <9bbcef730908151137h3c752f91j3ec9d93a8f860d66@mail.gmail.com> Date: Sat, 15 Aug 2009 22:21:00 +0300 In-Reply-To: <9bbcef730908151137h3c752f91j3ec9d93a8f860d66@mail.gmail.com> (Ivan Voras's message of "Sat, 15 Aug 2009 20:37:28 +0200") Message-ID: <87r5vcc28z.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (berkeley-unix) MIME-Version: 1.0 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: r196254 - head/usr.sbin/iostat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 19:46:39 -0000 On Sat, 15 Aug 2009 20:37:28 +0200, Ivan Voras wrote: >2009/8/15 Giorgos Keramidas : >> Author: keramida (doc committer) >> Date: Sat Aug 15 17:57:21 2009 >> New Revision: 196254 >> URL: http://svn.freebsd.org/changeset/base/196254 >> >> Log: >> =A0iostat: add a bit of space between tty in/out columns >> >> =A0The columns for tty input and output may bump against each other >> =A0if the tty output needs more than 5 columns. =A0Add a bit of space >> =A0that pushes everything 1 column to the right, but also avoids the >> =A0problem. > > I don't know if it would interfere with some use cases (OTOH I don't > know why would someone need tty in/out counts at all) but why not > aggressively humanize the numbers instead? It would probably interfere with scripts that people are using to parse iostat output. Even *this* change that slides everything to the right by one column may cause a bit of surprise, but I see that -H is not taken as an option. I'll try to grab it and add support for human readable numbers, but keep it non-default. Thanks! :) From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 21:10:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47034106568C; Sat, 15 Aug 2009 21:10:53 +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 3562A8FC41; Sat, 15 Aug 2009 21:10: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 n7FLArBP088340; Sat, 15 Aug 2009 21:10:53 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FLArWj088332; Sat, 15 Aug 2009 21:10:53 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <200908152110.n7FLArWj088332@svn.freebsd.org> From: Michael Tuexen Date: Sat, 15 Aug 2009 21:10: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: r196260 - 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, 15 Aug 2009 21:10:53 -0000 Author: tuexen Date: Sat Aug 15 21:10:52 2009 New Revision: 196260 URL: http://svn.freebsd.org/changeset/base/196260 Log: * Fix a bug where PR-SCTP settings are ignore when using implicit association setup. * Fix a bug where message with illegal stream ids are not deleted. * Fix a crash when reporting back unsent messages from the send_queue. * Fix a bug related to INIT retransmission when the socket is already closed. * Fix a bug where associations were stalled when partial delivery API was enabled. * Fix a bug where the receive buffer size was smaller than the partial_delivery_point. Approved by: re, rrs (mentor) MFC after: One day. Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_timer.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sat Aug 15 19:48:14 2009 (r196259) +++ head/sys/netinet/sctp_indata.c Sat Aug 15 21:10:52 2009 (r196260) @@ -900,7 +900,7 @@ sctp_deliver_reasm_check(struct sctp_tcb { struct sctp_tmit_chunk *chk; uint16_t nxt_todel; - uint32_t tsize; + uint32_t tsize, pd_point; doit_again: chk = TAILQ_FIRST(&asoc->reasmqueue); @@ -920,8 +920,13 @@ doit_again: * Yep the first one is here and its ok to deliver * but should we? */ - if ((sctp_is_all_msg_on_reasm(asoc, &tsize) || - (tsize >= stcb->sctp_ep->partial_delivery_point))) { + if (stcb->sctp_socket) { + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, + stcb->sctp_ep->partial_delivery_point); + } else { + pd_point = stcb->sctp_ep->partial_delivery_point; + } + if (sctp_is_all_msg_on_reasm(asoc, &tsize) || (tsize >= pd_point)) { /* * Yes, we setup to start reception, by @@ -2824,7 +2829,7 @@ void sctp_service_queues(struct sctp_tcb *stcb, struct sctp_association *asoc) { struct sctp_tmit_chunk *chk; - uint32_t tsize; + uint32_t tsize, pd_point; uint16_t nxt_todel; if (asoc->fragmented_delivery_inprogress) { @@ -2860,8 +2865,13 @@ doit_again: * be here or 1/4 the socket buffer max or nothing on the * delivery queue and something can be delivered. */ - if ((sctp_is_all_msg_on_reasm(asoc, &tsize) || - (tsize >= stcb->sctp_ep->partial_delivery_point))) { + if (stcb->sctp_socket) { + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, + stcb->sctp_ep->partial_delivery_point); + } else { + pd_point = stcb->sctp_ep->partial_delivery_point; + } + if (sctp_is_all_msg_on_reasm(asoc, &tsize) || (tsize >= pd_point)) { asoc->fragmented_delivery_inprogress = 1; asoc->tsn_last_delivered = chk->rec.data.TSN_seq - 1; asoc->str_of_pdapi = chk->rec.data.stream_number; @@ -5192,7 +5202,7 @@ skip_segments: /* sa_ignore NO_NULL_CHK */ sctp_free_bufspace(stcb, asoc, tp1, 1); sctp_m_freem(tp1->data); - if (PR_SCTP_BUF_ENABLED(tp1->flags)) { + if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(tp1->flags)) { asoc->sent_queue_cnt_removeable--; } } @@ -6289,10 +6299,11 @@ sctp_handle_forward_tsn(struct sctp_tcb ctl->pdapi_aborted = 1; sv = stcb->asoc.control_pdapi; stcb->asoc.control_pdapi = ctl; - sctp_notify_partial_delivery_indication(stcb, + sctp_ulp_notify(SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, + stcb, SCTP_PARTIAL_DELIVERY_ABORTED, - SCTP_HOLDS_LOCK, - str_seq); + (void *)&str_seq, + SCTP_SO_NOT_LOCKED); stcb->asoc.control_pdapi = sv; break; } else if ((ctl->sinfo_stream == stseq->stream) && @@ -7786,7 +7797,7 @@ skip_segments: /* sa_ignore NO_NULL_CHK */ sctp_free_bufspace(stcb, asoc, tp1, 1); sctp_m_freem(tp1->data); - if (PR_SCTP_BUF_ENABLED(tp1->flags)) { + if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(tp1->flags)) { asoc->sent_queue_cnt_removeable--; } } Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat Aug 15 19:48:14 2009 (r196259) +++ head/sys/netinet/sctp_input.c Sat Aug 15 21:10:52 2009 (r196260) @@ -278,18 +278,38 @@ sctp_process_init(struct sctp_init_chunk unsigned int newcnt; struct sctp_stream_out *outs; struct sctp_stream_queue_pending *sp; + struct sctp_tmit_chunk *chk, *chk_next; - /* cut back on number of streams */ + /* abandon the upper streams */ newcnt = ntohs(init->num_inbound_streams); - /* This if is probably not needed but I am cautious */ + if (!TAILQ_EMPTY(&asoc->send_queue)) { + chk = TAILQ_FIRST(&asoc->send_queue); + while (chk) { + chk_next = TAILQ_NEXT(chk, sctp_next); + if (chk->rec.data.stream_number >= newcnt) { + TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next); + asoc->send_queue_cnt--; + if (chk->data != NULL) { + sctp_free_bufspace(stcb, asoc, chk, 1); + sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, + SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_NOT_LOCKED); + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } + } + sctp_free_a_chunk(stcb, chk); + /* sa_ignore FREED_MEMORY */ + } + chk = chk_next; + } + } if (asoc->strmout) { - /* First make sure no data chunks are trapped */ for (i = newcnt; i < asoc->pre_open_streams; i++) { outs = &asoc->strmout[i]; sp = TAILQ_FIRST(&outs->outqueue); while (sp) { - TAILQ_REMOVE(&outs->outqueue, sp, - next); + TAILQ_REMOVE(&outs->outqueue, sp, next); asoc->stream_queue_cnt--; sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, @@ -301,16 +321,13 @@ sctp_process_init(struct sctp_init_chunk sctp_free_remote_addr(sp->net); sp->net = NULL; /* Free the chunk */ - SCTP_PRINTF("sp:%p tcb:%p weird free case\n", - sp, stcb); - sctp_free_a_strmoq(stcb, sp); /* sa_ignore FREED_MEMORY */ sp = TAILQ_FIRST(&outs->outqueue); } } } - /* cut back the count and abandon the upper streams */ + /* cut back the count */ asoc->pre_open_streams = newcnt; } SCTP_TCB_SEND_UNLOCK(stcb); Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Aug 15 19:48:14 2009 (r196259) +++ head/sys/netinet/sctp_output.c Sat Aug 15 21:10:52 2009 (r196260) @@ -4200,7 +4200,7 @@ sctp_send_initiate(struct sctp_inpcb *in /* place in my tag */ init->init.initiate_tag = htonl(stcb->asoc.my_vtag); /* set up some of the credits. */ - init->init.a_rwnd = htonl(max(SCTP_SB_LIMIT_RCV(inp->sctp_socket), + init->init.a_rwnd = htonl(max(inp->sctp_socket ? SCTP_SB_LIMIT_RCV(inp->sctp_socket) : 0, SCTP_MINIMAL_RWND)); init->init.num_outbound_streams = htons(stcb->asoc.pre_open_streams); @@ -4411,7 +4411,6 @@ sctp_send_initiate(struct sctp_inpcb *in net->port, so_locked, NULL); SCTPDBG(SCTP_DEBUG_OUTPUT4, "lowlevel_output - %d\n", ret); SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks); - sctp_timer_start(SCTP_TIMER_TYPE_INIT, inp, stcb, net); (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); } @@ -5786,61 +5785,58 @@ sctp_get_frag_point(struct sctp_tcb *stc } static void -sctp_set_prsctp_policy(struct sctp_tcb *stcb, - struct sctp_stream_queue_pending *sp) +sctp_set_prsctp_policy(struct sctp_stream_queue_pending *sp) { sp->pr_sctp_on = 0; - if (stcb->asoc.peer_supports_prsctp) { + /* + * We assume that the user wants PR_SCTP_TTL if the user provides a + * positive lifetime but does not specify any PR_SCTP policy. This + * is a BAD assumption and causes problems at least with the + * U-Vancovers MPI folks. I will change this to be no policy means + * NO PR-SCTP. + */ + if (PR_SCTP_ENABLED(sp->sinfo_flags)) { + sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); + sp->pr_sctp_on = 1; + } else { + return; + } + switch (PR_SCTP_POLICY(sp->sinfo_flags)) { + case CHUNK_FLAGS_PR_SCTP_BUF: /* - * We assume that the user wants PR_SCTP_TTL if the user - * provides a positive lifetime but does not specify any - * PR_SCTP policy. This is a BAD assumption and causes - * problems at least with the U-Vancovers MPI folks. I will - * change this to be no policy means NO PR-SCTP. - */ - if (PR_SCTP_ENABLED(sp->sinfo_flags)) { - sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); - sp->pr_sctp_on = 1; - } else { - return; - } - switch (PR_SCTP_POLICY(sp->sinfo_flags)) { - case CHUNK_FLAGS_PR_SCTP_BUF: - /* - * Time to live is a priority stored in tv_sec when - * doing the buffer drop thing. - */ - sp->ts.tv_sec = sp->timetolive; - sp->ts.tv_usec = 0; - break; - case CHUNK_FLAGS_PR_SCTP_TTL: - { - struct timeval tv; - - (void)SCTP_GETTIME_TIMEVAL(&sp->ts); - tv.tv_sec = sp->timetolive / 1000; - tv.tv_usec = (sp->timetolive * 1000) % 1000000; - /* - * TODO sctp_constants.h needs alternative - * time macros when _KERNEL is undefined. - */ - timevaladd(&sp->ts, &tv); - } - break; - case CHUNK_FLAGS_PR_SCTP_RTX: + * Time to live is a priority stored in tv_sec when doing + * the buffer drop thing. + */ + sp->ts.tv_sec = sp->timetolive; + sp->ts.tv_usec = 0; + break; + case CHUNK_FLAGS_PR_SCTP_TTL: + { + struct timeval tv; + + (void)SCTP_GETTIME_TIMEVAL(&sp->ts); + tv.tv_sec = sp->timetolive / 1000; + tv.tv_usec = (sp->timetolive * 1000) % 1000000; /* - * Time to live is a the number or retransmissions - * stored in tv_sec. + * TODO sctp_constants.h needs alternative time + * macros when _KERNEL is undefined. */ - sp->ts.tv_sec = sp->timetolive; - sp->ts.tv_usec = 0; - break; - default: - SCTPDBG(SCTP_DEBUG_USRREQ1, - "Unknown PR_SCTP policy %u.\n", - PR_SCTP_POLICY(sp->sinfo_flags)); - break; + timevaladd(&sp->ts, &tv); } + break; + case CHUNK_FLAGS_PR_SCTP_RTX: + /* + * Time to live is a the number or retransmissions stored in + * tv_sec. + */ + sp->ts.tv_sec = sp->timetolive; + sp->ts.tv_usec = 0; + break; + default: + SCTPDBG(SCTP_DEBUG_USRREQ1, + "Unknown PR_SCTP policy %u.\n", + PR_SCTP_POLICY(sp->sinfo_flags)); + break; } } @@ -5911,7 +5907,7 @@ sctp_msg_append(struct sctp_tcb *stcb, sp->tail_mbuf = NULL; sp->length = 0; at = m; - sctp_set_prsctp_policy(stcb, sp); + sctp_set_prsctp_policy(sp); /* * We could in theory (for sendall) sifa the length in, but we would * still have to hunt through the chain since we need to setup the @@ -7138,7 +7134,7 @@ dont_do_it: } /* We only re-set the policy if it is on */ if (sp->pr_sctp_on) { - sctp_set_prsctp_policy(stcb, sp); + sctp_set_prsctp_policy(sp); asoc->pr_sctp_cnt++; chk->pr_sctp_on = 1; } else { @@ -12285,7 +12281,7 @@ skip_copy: sp->addr_over = 0; } atomic_add_int(&sp->net->ref_count, 1); - sctp_set_prsctp_policy(stcb, sp); + sctp_set_prsctp_policy(sp); } out_now: return (sp); Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sat Aug 15 19:48:14 2009 (r196259) +++ head/sys/netinet/sctp_pcb.c Sat Aug 15 21:10:52 2009 (r196260) @@ -4547,8 +4547,11 @@ sctp_free_assoc(struct sctp_inpcb *inp, stcb->asoc.control_pdapi = sq; strseq = (sq->sinfo_stream << 16) | sq->sinfo_ssn; - sctp_notify_partial_delivery_indication(stcb, - SCTP_PARTIAL_DELIVERY_ABORTED, 1, strseq); + sctp_ulp_notify(SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, + stcb, + SCTP_PARTIAL_DELIVERY_ABORTED, + (void *)&strseq, + SCTP_SO_LOCKED); stcb->asoc.control_pdapi = NULL; } } Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Sat Aug 15 19:48:14 2009 (r196259) +++ head/sys/netinet/sctp_timer.c Sat Aug 15 21:10:52 2009 (r196260) @@ -588,7 +588,7 @@ sctp_recover_sent_list(struct sctp_tcb * /* sa_ignore NO_NULL_CHK */ sctp_free_bufspace(stcb, asoc, chk, 1); sctp_m_freem(chk->data); - if (PR_SCTP_BUF_ENABLED(chk->flags)) { + if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(chk->flags)) { asoc->sent_queue_cnt_removeable--; } } @@ -757,7 +757,7 @@ start_again: continue; } } - if (PR_SCTP_TTL_ENABLED(chk->flags)) { + if (stcb->asoc.peer_supports_prsctp && PR_SCTP_TTL_ENABLED(chk->flags)) { /* Is it expired? */ if ((now.tv_sec > chk->rec.data.timetodrop.tv_sec) || ((chk->rec.data.timetodrop.tv_sec == now.tv_sec) && @@ -772,7 +772,7 @@ start_again: continue; } } - if (PR_SCTP_RTX_ENABLED(chk->flags)) { + if (stcb->asoc.peer_supports_prsctp && PR_SCTP_RTX_ENABLED(chk->flags)) { /* Has it been retransmitted tv_sec times? */ if (chk->snd_count > chk->rec.data.timetodrop.tv_sec) { if (chk->data) { Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sat Aug 15 19:48:14 2009 (r196259) +++ head/sys/netinet/sctputil.c Sat Aug 15 21:10:52 2009 (r196260) @@ -1484,6 +1484,7 @@ sctp_timeout_handler(void *t) SCTP_INP_INCR_REF(inp); if ((inp->sctp_socket == 0) && ((tmr->type != SCTP_TIMER_TYPE_INPKILL) && + (tmr->type != SCTP_TIMER_TYPE_INIT) && (tmr->type != SCTP_TIMER_TYPE_SEND) && (tmr->type != SCTP_TIMER_TYPE_RECV) && (tmr->type != SCTP_TIMER_TYPE_HEARTBEAT) && @@ -2984,8 +2985,6 @@ sctp_notify_send_failed(struct sctp_tcb ssf->ssf_info.sinfo_assoc_id = sctp_get_associd(stcb); ssf->ssf_assoc_id = sctp_get_associd(stcb); - SCTP_BUF_NEXT(m_notify) = chk->data; - SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed); if (chk->data) { /* * trim off the sctp chunk header(it should be there) @@ -2996,6 +2995,8 @@ sctp_notify_send_failed(struct sctp_tcb chk->send_size -= sizeof(struct sctp_data_chunk); } } + SCTP_BUF_NEXT(m_notify) = chk->data; + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed); /* Steal off the mbuf */ chk->data = NULL; /* @@ -3146,9 +3147,13 @@ sctp_notify_adaptation_layer(struct sctp } /* This always must be called with the read-queue LOCKED in the INP */ -void +static void sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, - int nolock, uint32_t val) + uint32_t val, int so_locked +#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) + SCTP_UNUSED +#endif +) { struct mbuf *m_notify; struct sctp_pdapi_event *pdapi; @@ -3189,9 +3194,6 @@ sctp_notify_partial_delivery_indication( control->tail_mbuf = m_notify; control->held_length = 0; control->length = 0; - if (nolock == 0) { - SCTP_INP_READ_LOCK(stcb->sctp_ep); - } sb = &stcb->sctp_socket->so_rcv; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { sctp_sblog(sb, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBALLOC, SCTP_BUF_LEN(m_notify)); @@ -3208,12 +3210,30 @@ sctp_notify_partial_delivery_indication( /* we really should not see this case */ TAILQ_INSERT_TAIL(&stcb->sctp_ep->read_queue, control, next); } - if (nolock == 0) { - SCTP_INP_READ_UNLOCK(stcb->sctp_ep); - } if (stcb->sctp_ep && stcb->sctp_socket) { /* This should always be the case */ +#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + struct socket *so; + + so = SCTP_INP_SO(stcb->sctp_ep); + if (!so_locked) { + 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->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { + SCTP_SOCKET_UNLOCK(so, 1); + return; + } + } +#endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); +#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + if (!so_locked) { + SCTP_SOCKET_UNLOCK(so, 1); + } +#endif } } @@ -3540,9 +3560,9 @@ sctp_ulp_notify(uint32_t notification, s val = *((uint32_t *) data); - sctp_notify_partial_delivery_indication(stcb, error, 0, val); + sctp_notify_partial_delivery_indication(stcb, error, val, so_locked); + break; } - break; case SCTP_NOTIFY_STRDATA_ERR: break; case SCTP_NOTIFY_ASSOC_ABORTED: @@ -3585,11 +3605,9 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_STR_RESET_FAILED_OUT: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), (SCTP_STRRESET_OUTBOUND_STR | SCTP_STRRESET_FAILED)); break; - case SCTP_NOTIFY_STR_RESET_FAILED_IN: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), (SCTP_STRRESET_INBOUND_STR | SCTP_STRRESET_FAILED)); break; - case SCTP_NOTIFY_ASCONF_ADD_IP: sctp_notify_peer_addr_change(stcb, SCTP_ADDR_ADDED, data, error); @@ -3671,8 +3689,10 @@ sctp_report_all_outbound(struct sctp_tcb sctp_free_bufspace(stcb, asoc, chk, 1); sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_SENT, chk, so_locked); - sctp_m_freem(chk->data); - chk->data = NULL; + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } } sctp_free_a_chunk(stcb, chk); /* sa_ignore FREED_MEMORY */ @@ -3689,8 +3709,10 @@ sctp_report_all_outbound(struct sctp_tcb sctp_free_bufspace(stcb, asoc, chk, 1); sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, chk, so_locked); - sctp_m_freem(chk->data); - chk->data = NULL; + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } } sctp_free_a_chunk(stcb, chk); /* sa_ignore FREED_MEMORY */ @@ -5346,6 +5368,38 @@ restart_nosblocks: } goto restart; } + if ((control->length == 0) && + (control->end_added == 1)) { + /* + * Do we also need to check for (control->pdapi_aborted == + * 1)? + */ + if (hold_rlock == 0) { + hold_rlock = 1; + SCTP_INP_READ_LOCK(inp); + } + TAILQ_REMOVE(&inp->read_queue, control, next); + if (control->data) { +#ifdef INVARIANTS + panic("control->data not null but control->length == 0"); +#else + SCTP_PRINTF("Strange, data left in the control buffer. Cleaning up.\n"); + sctp_m_freem(control->data); + control->data = NULL; +#endif + } + if (control->aux_data) { + sctp_m_free(control->aux_data); + control->aux_data = NULL; + } + sctp_free_remote_addr(control->whoFrom); + sctp_free_a_readq(stcb, control); + if (hold_rlock) { + hold_rlock = 0; + SCTP_INP_READ_UNLOCK(inp); + } + goto restart; + } if (control->length == 0) { if ((sctp_is_feature_on(inp, SCTP_PCB_FLAGS_FRAG_INTERLEAVE)) && (filling_sinfo)) { Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sat Aug 15 19:48:14 2009 (r196259) +++ head/sys/netinet/sctputil.h Sat Aug 15 21:10:52 2009 (r196260) @@ -234,10 +234,6 @@ int sctp_cmpaddr(struct sockaddr *, stru void sctp_print_address(struct sockaddr *); void sctp_print_address_pkt(struct ip *, struct sctphdr *); -void -sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, - uint32_t error, int no_lock, uint32_t strseq); - int sctp_release_pr_sctp_chunk(struct sctp_tcb *, struct sctp_tmit_chunk *, int, int From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 21:37:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED47B106568C; Sat, 15 Aug 2009 21:37:16 +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 D870E8FC3D; Sat, 15 Aug 2009 21:37: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 n7FLbGdh089497; Sat, 15 Aug 2009 21:37:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FLbGD6089489; Sat, 15 Aug 2009 21:37:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <200908152137.n7FLbGD6089489@svn.freebsd.org> From: Michael Tuexen Date: Sat, 15 Aug 2009 21:37: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: r196261 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclient 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: Sat, 15 Aug 2009 21:37:17 -0000 Author: tuexen Date: Sat Aug 15 21:37:16 2009 New Revision: 196261 URL: http://svn.freebsd.org/changeset/base/196261 Log: MFC r196260. * Fix a bug where PR-SCTP settings are ignore when using implicit association setup. * Fix a bug where message with illegal stream ids are not deleted. * Fix a crash when reporting back unsent messages from the send_queue. * Fix a bug related to INIT retransmission when the socket is already closed. * Fix a bug where associations were stalled when partial delivery API was enabled. * Fix a bug where the receive buffer size was smaller than the partial_delivery_point. Approved by: re, rrs (mentor) Modified: 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/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) 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/sctp_pcb.c stable/8/sys/netinet/sctp_timer.c stable/8/sys/netinet/sctputil.c stable/8/sys/netinet/sctputil.h stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctp_indata.c Sat Aug 15 21:37:16 2009 (r196261) @@ -900,7 +900,7 @@ sctp_deliver_reasm_check(struct sctp_tcb { struct sctp_tmit_chunk *chk; uint16_t nxt_todel; - uint32_t tsize; + uint32_t tsize, pd_point; doit_again: chk = TAILQ_FIRST(&asoc->reasmqueue); @@ -920,8 +920,13 @@ doit_again: * Yep the first one is here and its ok to deliver * but should we? */ - if ((sctp_is_all_msg_on_reasm(asoc, &tsize) || - (tsize >= stcb->sctp_ep->partial_delivery_point))) { + if (stcb->sctp_socket) { + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, + stcb->sctp_ep->partial_delivery_point); + } else { + pd_point = stcb->sctp_ep->partial_delivery_point; + } + if (sctp_is_all_msg_on_reasm(asoc, &tsize) || (tsize >= pd_point)) { /* * Yes, we setup to start reception, by @@ -2824,7 +2829,7 @@ void sctp_service_queues(struct sctp_tcb *stcb, struct sctp_association *asoc) { struct sctp_tmit_chunk *chk; - uint32_t tsize; + uint32_t tsize, pd_point; uint16_t nxt_todel; if (asoc->fragmented_delivery_inprogress) { @@ -2860,8 +2865,13 @@ doit_again: * be here or 1/4 the socket buffer max or nothing on the * delivery queue and something can be delivered. */ - if ((sctp_is_all_msg_on_reasm(asoc, &tsize) || - (tsize >= stcb->sctp_ep->partial_delivery_point))) { + if (stcb->sctp_socket) { + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, + stcb->sctp_ep->partial_delivery_point); + } else { + pd_point = stcb->sctp_ep->partial_delivery_point; + } + if (sctp_is_all_msg_on_reasm(asoc, &tsize) || (tsize >= pd_point)) { asoc->fragmented_delivery_inprogress = 1; asoc->tsn_last_delivered = chk->rec.data.TSN_seq - 1; asoc->str_of_pdapi = chk->rec.data.stream_number; @@ -5192,7 +5202,7 @@ skip_segments: /* sa_ignore NO_NULL_CHK */ sctp_free_bufspace(stcb, asoc, tp1, 1); sctp_m_freem(tp1->data); - if (PR_SCTP_BUF_ENABLED(tp1->flags)) { + if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(tp1->flags)) { asoc->sent_queue_cnt_removeable--; } } @@ -6289,10 +6299,11 @@ sctp_handle_forward_tsn(struct sctp_tcb ctl->pdapi_aborted = 1; sv = stcb->asoc.control_pdapi; stcb->asoc.control_pdapi = ctl; - sctp_notify_partial_delivery_indication(stcb, + sctp_ulp_notify(SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, + stcb, SCTP_PARTIAL_DELIVERY_ABORTED, - SCTP_HOLDS_LOCK, - str_seq); + (void *)&str_seq, + SCTP_SO_NOT_LOCKED); stcb->asoc.control_pdapi = sv; break; } else if ((ctl->sinfo_stream == stseq->stream) && @@ -7786,7 +7797,7 @@ skip_segments: /* sa_ignore NO_NULL_CHK */ sctp_free_bufspace(stcb, asoc, tp1, 1); sctp_m_freem(tp1->data); - if (PR_SCTP_BUF_ENABLED(tp1->flags)) { + if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(tp1->flags)) { asoc->sent_queue_cnt_removeable--; } } Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctp_input.c Sat Aug 15 21:37:16 2009 (r196261) @@ -278,18 +278,38 @@ sctp_process_init(struct sctp_init_chunk unsigned int newcnt; struct sctp_stream_out *outs; struct sctp_stream_queue_pending *sp; + struct sctp_tmit_chunk *chk, *chk_next; - /* cut back on number of streams */ + /* abandon the upper streams */ newcnt = ntohs(init->num_inbound_streams); - /* This if is probably not needed but I am cautious */ + if (!TAILQ_EMPTY(&asoc->send_queue)) { + chk = TAILQ_FIRST(&asoc->send_queue); + while (chk) { + chk_next = TAILQ_NEXT(chk, sctp_next); + if (chk->rec.data.stream_number >= newcnt) { + TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next); + asoc->send_queue_cnt--; + if (chk->data != NULL) { + sctp_free_bufspace(stcb, asoc, chk, 1); + sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, + SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_NOT_LOCKED); + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } + } + sctp_free_a_chunk(stcb, chk); + /* sa_ignore FREED_MEMORY */ + } + chk = chk_next; + } + } if (asoc->strmout) { - /* First make sure no data chunks are trapped */ for (i = newcnt; i < asoc->pre_open_streams; i++) { outs = &asoc->strmout[i]; sp = TAILQ_FIRST(&outs->outqueue); while (sp) { - TAILQ_REMOVE(&outs->outqueue, sp, - next); + TAILQ_REMOVE(&outs->outqueue, sp, next); asoc->stream_queue_cnt--; sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, @@ -301,16 +321,13 @@ sctp_process_init(struct sctp_init_chunk sctp_free_remote_addr(sp->net); sp->net = NULL; /* Free the chunk */ - SCTP_PRINTF("sp:%p tcb:%p weird free case\n", - sp, stcb); - sctp_free_a_strmoq(stcb, sp); /* sa_ignore FREED_MEMORY */ sp = TAILQ_FIRST(&outs->outqueue); } } } - /* cut back the count and abandon the upper streams */ + /* cut back the count */ asoc->pre_open_streams = newcnt; } SCTP_TCB_SEND_UNLOCK(stcb); Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctp_output.c Sat Aug 15 21:37:16 2009 (r196261) @@ -4200,7 +4200,7 @@ sctp_send_initiate(struct sctp_inpcb *in /* place in my tag */ init->init.initiate_tag = htonl(stcb->asoc.my_vtag); /* set up some of the credits. */ - init->init.a_rwnd = htonl(max(SCTP_SB_LIMIT_RCV(inp->sctp_socket), + init->init.a_rwnd = htonl(max(inp->sctp_socket ? SCTP_SB_LIMIT_RCV(inp->sctp_socket) : 0, SCTP_MINIMAL_RWND)); init->init.num_outbound_streams = htons(stcb->asoc.pre_open_streams); @@ -4411,7 +4411,6 @@ sctp_send_initiate(struct sctp_inpcb *in net->port, so_locked, NULL); SCTPDBG(SCTP_DEBUG_OUTPUT4, "lowlevel_output - %d\n", ret); SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks); - sctp_timer_start(SCTP_TIMER_TYPE_INIT, inp, stcb, net); (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); } @@ -5786,61 +5785,58 @@ sctp_get_frag_point(struct sctp_tcb *stc } static void -sctp_set_prsctp_policy(struct sctp_tcb *stcb, - struct sctp_stream_queue_pending *sp) +sctp_set_prsctp_policy(struct sctp_stream_queue_pending *sp) { sp->pr_sctp_on = 0; - if (stcb->asoc.peer_supports_prsctp) { + /* + * We assume that the user wants PR_SCTP_TTL if the user provides a + * positive lifetime but does not specify any PR_SCTP policy. This + * is a BAD assumption and causes problems at least with the + * U-Vancovers MPI folks. I will change this to be no policy means + * NO PR-SCTP. + */ + if (PR_SCTP_ENABLED(sp->sinfo_flags)) { + sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); + sp->pr_sctp_on = 1; + } else { + return; + } + switch (PR_SCTP_POLICY(sp->sinfo_flags)) { + case CHUNK_FLAGS_PR_SCTP_BUF: /* - * We assume that the user wants PR_SCTP_TTL if the user - * provides a positive lifetime but does not specify any - * PR_SCTP policy. This is a BAD assumption and causes - * problems at least with the U-Vancovers MPI folks. I will - * change this to be no policy means NO PR-SCTP. - */ - if (PR_SCTP_ENABLED(sp->sinfo_flags)) { - sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); - sp->pr_sctp_on = 1; - } else { - return; - } - switch (PR_SCTP_POLICY(sp->sinfo_flags)) { - case CHUNK_FLAGS_PR_SCTP_BUF: - /* - * Time to live is a priority stored in tv_sec when - * doing the buffer drop thing. - */ - sp->ts.tv_sec = sp->timetolive; - sp->ts.tv_usec = 0; - break; - case CHUNK_FLAGS_PR_SCTP_TTL: - { - struct timeval tv; - - (void)SCTP_GETTIME_TIMEVAL(&sp->ts); - tv.tv_sec = sp->timetolive / 1000; - tv.tv_usec = (sp->timetolive * 1000) % 1000000; - /* - * TODO sctp_constants.h needs alternative - * time macros when _KERNEL is undefined. - */ - timevaladd(&sp->ts, &tv); - } - break; - case CHUNK_FLAGS_PR_SCTP_RTX: + * Time to live is a priority stored in tv_sec when doing + * the buffer drop thing. + */ + sp->ts.tv_sec = sp->timetolive; + sp->ts.tv_usec = 0; + break; + case CHUNK_FLAGS_PR_SCTP_TTL: + { + struct timeval tv; + + (void)SCTP_GETTIME_TIMEVAL(&sp->ts); + tv.tv_sec = sp->timetolive / 1000; + tv.tv_usec = (sp->timetolive * 1000) % 1000000; /* - * Time to live is a the number or retransmissions - * stored in tv_sec. + * TODO sctp_constants.h needs alternative time + * macros when _KERNEL is undefined. */ - sp->ts.tv_sec = sp->timetolive; - sp->ts.tv_usec = 0; - break; - default: - SCTPDBG(SCTP_DEBUG_USRREQ1, - "Unknown PR_SCTP policy %u.\n", - PR_SCTP_POLICY(sp->sinfo_flags)); - break; + timevaladd(&sp->ts, &tv); } + break; + case CHUNK_FLAGS_PR_SCTP_RTX: + /* + * Time to live is a the number or retransmissions stored in + * tv_sec. + */ + sp->ts.tv_sec = sp->timetolive; + sp->ts.tv_usec = 0; + break; + default: + SCTPDBG(SCTP_DEBUG_USRREQ1, + "Unknown PR_SCTP policy %u.\n", + PR_SCTP_POLICY(sp->sinfo_flags)); + break; } } @@ -5911,7 +5907,7 @@ sctp_msg_append(struct sctp_tcb *stcb, sp->tail_mbuf = NULL; sp->length = 0; at = m; - sctp_set_prsctp_policy(stcb, sp); + sctp_set_prsctp_policy(sp); /* * We could in theory (for sendall) sifa the length in, but we would * still have to hunt through the chain since we need to setup the @@ -7138,7 +7134,7 @@ dont_do_it: } /* We only re-set the policy if it is on */ if (sp->pr_sctp_on) { - sctp_set_prsctp_policy(stcb, sp); + sctp_set_prsctp_policy(sp); asoc->pr_sctp_cnt++; chk->pr_sctp_on = 1; } else { @@ -12285,7 +12281,7 @@ skip_copy: sp->addr_over = 0; } atomic_add_int(&sp->net->ref_count, 1); - sctp_set_prsctp_policy(stcb, sp); + sctp_set_prsctp_policy(sp); } out_now: return (sp); Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctp_pcb.c Sat Aug 15 21:37:16 2009 (r196261) @@ -4547,8 +4547,11 @@ sctp_free_assoc(struct sctp_inpcb *inp, stcb->asoc.control_pdapi = sq; strseq = (sq->sinfo_stream << 16) | sq->sinfo_ssn; - sctp_notify_partial_delivery_indication(stcb, - SCTP_PARTIAL_DELIVERY_ABORTED, 1, strseq); + sctp_ulp_notify(SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, + stcb, + SCTP_PARTIAL_DELIVERY_ABORTED, + (void *)&strseq, + SCTP_SO_LOCKED); stcb->asoc.control_pdapi = NULL; } } Modified: stable/8/sys/netinet/sctp_timer.c ============================================================================== --- stable/8/sys/netinet/sctp_timer.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctp_timer.c Sat Aug 15 21:37:16 2009 (r196261) @@ -588,7 +588,7 @@ sctp_recover_sent_list(struct sctp_tcb * /* sa_ignore NO_NULL_CHK */ sctp_free_bufspace(stcb, asoc, chk, 1); sctp_m_freem(chk->data); - if (PR_SCTP_BUF_ENABLED(chk->flags)) { + if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(chk->flags)) { asoc->sent_queue_cnt_removeable--; } } @@ -757,7 +757,7 @@ start_again: continue; } } - if (PR_SCTP_TTL_ENABLED(chk->flags)) { + if (stcb->asoc.peer_supports_prsctp && PR_SCTP_TTL_ENABLED(chk->flags)) { /* Is it expired? */ if ((now.tv_sec > chk->rec.data.timetodrop.tv_sec) || ((chk->rec.data.timetodrop.tv_sec == now.tv_sec) && @@ -772,7 +772,7 @@ start_again: continue; } } - if (PR_SCTP_RTX_ENABLED(chk->flags)) { + if (stcb->asoc.peer_supports_prsctp && PR_SCTP_RTX_ENABLED(chk->flags)) { /* Has it been retransmitted tv_sec times? */ if (chk->snd_count > chk->rec.data.timetodrop.tv_sec) { if (chk->data) { Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctputil.c Sat Aug 15 21:37:16 2009 (r196261) @@ -1484,6 +1484,7 @@ sctp_timeout_handler(void *t) SCTP_INP_INCR_REF(inp); if ((inp->sctp_socket == 0) && ((tmr->type != SCTP_TIMER_TYPE_INPKILL) && + (tmr->type != SCTP_TIMER_TYPE_INIT) && (tmr->type != SCTP_TIMER_TYPE_SEND) && (tmr->type != SCTP_TIMER_TYPE_RECV) && (tmr->type != SCTP_TIMER_TYPE_HEARTBEAT) && @@ -2984,8 +2985,6 @@ sctp_notify_send_failed(struct sctp_tcb ssf->ssf_info.sinfo_assoc_id = sctp_get_associd(stcb); ssf->ssf_assoc_id = sctp_get_associd(stcb); - SCTP_BUF_NEXT(m_notify) = chk->data; - SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed); if (chk->data) { /* * trim off the sctp chunk header(it should be there) @@ -2996,6 +2995,8 @@ sctp_notify_send_failed(struct sctp_tcb chk->send_size -= sizeof(struct sctp_data_chunk); } } + SCTP_BUF_NEXT(m_notify) = chk->data; + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed); /* Steal off the mbuf */ chk->data = NULL; /* @@ -3146,9 +3147,13 @@ sctp_notify_adaptation_layer(struct sctp } /* This always must be called with the read-queue LOCKED in the INP */ -void +static void sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, - int nolock, uint32_t val) + uint32_t val, int so_locked +#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) + SCTP_UNUSED +#endif +) { struct mbuf *m_notify; struct sctp_pdapi_event *pdapi; @@ -3189,9 +3194,6 @@ sctp_notify_partial_delivery_indication( control->tail_mbuf = m_notify; control->held_length = 0; control->length = 0; - if (nolock == 0) { - SCTP_INP_READ_LOCK(stcb->sctp_ep); - } sb = &stcb->sctp_socket->so_rcv; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { sctp_sblog(sb, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBALLOC, SCTP_BUF_LEN(m_notify)); @@ -3208,12 +3210,30 @@ sctp_notify_partial_delivery_indication( /* we really should not see this case */ TAILQ_INSERT_TAIL(&stcb->sctp_ep->read_queue, control, next); } - if (nolock == 0) { - SCTP_INP_READ_UNLOCK(stcb->sctp_ep); - } if (stcb->sctp_ep && stcb->sctp_socket) { /* This should always be the case */ +#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + struct socket *so; + + so = SCTP_INP_SO(stcb->sctp_ep); + if (!so_locked) { + 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->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { + SCTP_SOCKET_UNLOCK(so, 1); + return; + } + } +#endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); +#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + if (!so_locked) { + SCTP_SOCKET_UNLOCK(so, 1); + } +#endif } } @@ -3540,9 +3560,9 @@ sctp_ulp_notify(uint32_t notification, s val = *((uint32_t *) data); - sctp_notify_partial_delivery_indication(stcb, error, 0, val); + sctp_notify_partial_delivery_indication(stcb, error, val, so_locked); + break; } - break; case SCTP_NOTIFY_STRDATA_ERR: break; case SCTP_NOTIFY_ASSOC_ABORTED: @@ -3585,11 +3605,9 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_STR_RESET_FAILED_OUT: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), (SCTP_STRRESET_OUTBOUND_STR | SCTP_STRRESET_FAILED)); break; - case SCTP_NOTIFY_STR_RESET_FAILED_IN: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), (SCTP_STRRESET_INBOUND_STR | SCTP_STRRESET_FAILED)); break; - case SCTP_NOTIFY_ASCONF_ADD_IP: sctp_notify_peer_addr_change(stcb, SCTP_ADDR_ADDED, data, error); @@ -3671,8 +3689,10 @@ sctp_report_all_outbound(struct sctp_tcb sctp_free_bufspace(stcb, asoc, chk, 1); sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_SENT, chk, so_locked); - sctp_m_freem(chk->data); - chk->data = NULL; + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } } sctp_free_a_chunk(stcb, chk); /* sa_ignore FREED_MEMORY */ @@ -3689,8 +3709,10 @@ sctp_report_all_outbound(struct sctp_tcb sctp_free_bufspace(stcb, asoc, chk, 1); sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, chk, so_locked); - sctp_m_freem(chk->data); - chk->data = NULL; + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } } sctp_free_a_chunk(stcb, chk); /* sa_ignore FREED_MEMORY */ @@ -5346,6 +5368,38 @@ restart_nosblocks: } goto restart; } + if ((control->length == 0) && + (control->end_added == 1)) { + /* + * Do we also need to check for (control->pdapi_aborted == + * 1)? + */ + if (hold_rlock == 0) { + hold_rlock = 1; + SCTP_INP_READ_LOCK(inp); + } + TAILQ_REMOVE(&inp->read_queue, control, next); + if (control->data) { +#ifdef INVARIANTS + panic("control->data not null but control->length == 0"); +#else + SCTP_PRINTF("Strange, data left in the control buffer. Cleaning up.\n"); + sctp_m_freem(control->data); + control->data = NULL; +#endif + } + if (control->aux_data) { + sctp_m_free(control->aux_data); + control->aux_data = NULL; + } + sctp_free_remote_addr(control->whoFrom); + sctp_free_a_readq(stcb, control); + if (hold_rlock) { + hold_rlock = 0; + SCTP_INP_READ_UNLOCK(inp); + } + goto restart; + } if (control->length == 0) { if ((sctp_is_feature_on(inp, SCTP_PCB_FLAGS_FRAG_INTERLEAVE)) && (filling_sinfo)) { Modified: stable/8/sys/netinet/sctputil.h ============================================================================== --- stable/8/sys/netinet/sctputil.h Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctputil.h Sat Aug 15 21:37:16 2009 (r196261) @@ -234,10 +234,6 @@ int sctp_cmpaddr(struct sockaddr *, stru void sctp_print_address(struct sockaddr *); void sctp_print_address_pkt(struct ip *, struct sctphdr *); -void -sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, - uint32_t error, int no_lock, uint32_t strseq); - int sctp_release_pr_sctp_chunk(struct sctp_tcb *, struct sctp_tmit_chunk *, int, int From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 22:26:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 518E6106568D; Sat, 15 Aug 2009 22:26:27 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4139E8FC3D; Sat, 15 Aug 2009 22:26: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 n7FMQRsE091855; Sat, 15 Aug 2009 22:26:27 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FMQRvQ091853; Sat, 15 Aug 2009 22:26:27 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908152226.n7FMQRvQ091853@svn.freebsd.org> From: Robert Watson Date: Sat, 15 Aug 2009 22:26: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: r196263 - 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: Sat, 15 Aug 2009 22:26:27 -0000 Author: rwatson Date: Sat Aug 15 22:26:26 2009 New Revision: 196263 URL: http://svn.freebsd.org/changeset/base/196263 Log: Remove unused if_rawoutput() macro; it has been unused since at least FreeBSD 2. Approved by: re (kib) Modified: head/sys/net/if_var.h Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sat Aug 15 21:42:04 2009 (r196262) +++ head/sys/net/if_var.h Sat Aug 15 22:26:26 2009 (r196263) @@ -235,7 +235,6 @@ typedef void if_init_f_t(void *); #define if_iqdrops if_data.ifi_iqdrops #define if_noproto if_data.ifi_noproto #define if_lastchange if_data.ifi_lastchange -#define if_rawoutput(if, m, sa) if_output(if, m, sa, (struct rtentry *)NULL) /* for compatibility with other BSDs */ #define if_addrlist if_addrhead From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 23:07:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 457D71065690; Sat, 15 Aug 2009 23:07:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3333B8FC15; Sat, 15 Aug 2009 23:07: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 n7FN7iig092915; Sat, 15 Aug 2009 23:07:44 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FN7ihE092912; Sat, 15 Aug 2009 23:07:44 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908152307.n7FN7ihE092912@svn.freebsd.org> From: Robert Watson Date: Sat, 15 Aug 2009 23:07: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: r196267 - in head: share/man/man4 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, 15 Aug 2009 23:07:44 -0000 Author: rwatson Date: Sat Aug 15 23:07:43 2009 New Revision: 196267 URL: http://svn.freebsd.org/changeset/base/196267 Log: Rather than fix questionable ifnet list locking in the implementation of the kern.polling.enable sysctl, remove the sysctl. It has been deprecated since FreeBSD 6 in favour of per-ifnet polling flags. Reviewed by: luigi Approved by: re (kib) Modified: head/share/man/man4/polling.4 head/sys/kern/kern_poll.c Modified: head/share/man/man4/polling.4 ============================================================================== --- head/share/man/man4/polling.4 Sat Aug 15 22:51:11 2009 (r196266) +++ head/share/man/man4/polling.4 Sat Aug 15 23:07:43 2009 (r196267) @@ -87,6 +87,16 @@ feature. It is turned on and off with help of .Xr ifconfig 8 command. +.Pp +The historic +.Va kern.polling.enable , +which enabled polling for all interfaces, can be replaced with the following +code: +.Bd -literal +for i in `ifconfig -l` ; + do ifconfig $i polling; # use -polling to disable +done +.Ed .Ss MIB Variables The operation of .Nm @@ -156,15 +166,6 @@ Default is 20. How many active devices have registered for .Nm . .Pp -.It Va kern.polling.enable -Legacy MIB, that was used to enable or disable polling globally. -Currently if set to 1, -.Nm -is enabled on all capable interfaces. -If set to 0, -.Nm -is disabled on all interfaces. -.Pp .It Va kern.polling.short_ticks .It Va kern.polling.lost_polls .It Va kern.polling.pending_polls Modified: head/sys/kern/kern_poll.c ============================================================================== --- head/sys/kern/kern_poll.c Sat Aug 15 22:51:11 2009 (r196266) +++ head/sys/kern/kern_poll.c Sat Aug 15 23:07:43 2009 (r196267) @@ -46,8 +46,6 @@ __FBSDID("$FreeBSD$"); #include /* for NETISR_POLL */ #include -static int poll_switch(SYSCTL_HANDLER_ARGS); - void hardclock_device_poll(void); /* hook from hardclock */ static struct mtx poll_mtx; @@ -230,10 +228,6 @@ static uint32_t poll_handlers; /* next f SYSCTL_UINT(_kern_polling, OID_AUTO, handlers, CTLFLAG_RD, &poll_handlers, 0, "Number of registered poll handlers"); -static int polling = 0; -SYSCTL_PROC(_kern_polling, OID_AUTO, enable, CTLTYPE_UINT | CTLFLAG_RW, - 0, sizeof(int), poll_switch, "I", "Switch polling for all interfaces"); - static uint32_t phase; SYSCTL_UINT(_kern_polling, OID_AUTO, phase, CTLFLAG_RD, &phase, 0, "Polling phase"); @@ -538,49 +532,6 @@ ether_poll_deregister(struct ifnet *ifp) return (0); } -/* - * Legacy interface for turning polling on all interfaces at one time. - */ -static int -poll_switch(SYSCTL_HANDLER_ARGS) -{ - struct ifnet *ifp; - int error; - int val = polling; - - error = sysctl_handle_int(oidp, &val, 0, req); - if (error || !req->newptr ) - return (error); - - if (val == polling) - return (0); - - if (val < 0 || val > 1) - return (EINVAL); - - polling = val; - - IFNET_RLOCK(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { - if (ifp->if_capabilities & IFCAP_POLLING) { - struct ifreq ifr; - - if (val == 1) - ifr.ifr_reqcap = - ifp->if_capenable | IFCAP_POLLING; - else - ifr.ifr_reqcap = - ifp->if_capenable & ~IFCAP_POLLING; - (void) (*ifp->if_ioctl)(ifp, SIOCSIFCAP, (caddr_t)&ifr); - } - } - IFNET_RUNLOCK(); - - log(LOG_ERR, "kern.polling.enable is deprecated. Use ifconfig(8)"); - - return (0); -} - static void poll_idle(void) {