From owner-svn-src-all@FreeBSD.ORG Sun Jun 27 02:30:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CA96106566B; Sun, 27 Jun 2010 02:30:19 +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 6BB208FC1A; Sun, 27 Jun 2010 02:30: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 o5R2UJE7051884; Sun, 27 Jun 2010 02:30:19 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5R2UJBX051882; Sun, 27 Jun 2010 02:30:19 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201006270230.o5R2UJBX051882@svn.freebsd.org> From: Colin Percival Date: Sun, 27 Jun 2010 02:30: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: r209546 - 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: Sun, 27 Jun 2010 02:30:19 -0000 Author: cperciva Date: Sun Jun 27 02:30:19 2010 New Revision: 209546 URL: http://svn.freebsd.org/changeset/base/209546 Log: Note that internal_underscores should be used in identifier names rather than camelCase or TitleCase. According to grep and my checked-out source tree, we're currently at 3733379 internal_underscores, 93024 camelCases, and 80831 TitleCases; so this commit is merely documenting existing practice. Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Sat Jun 26 22:26:53 2010 (r209545) +++ head/share/man/man9/style.9 Sun Jun 27 02:30:19 2010 (r209546) @@ -293,6 +293,9 @@ Enumeration values are all uppercase. enum enumtype { ONE, TWO } et; .Ed .Pp +The use of internal_underscores in identifiers is preferred over +camelCase or TitleCase. +.Pp In declarations, do not put any whitespace between asterisks and adjacent tokens, except for tokens that are identifiers related to types. From owner-svn-src-all@FreeBSD.ORG Sun Jun 27 03:06:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A3CF106564A; Sun, 27 Jun 2010 03:06:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBFFA8FC08; Sun, 27 Jun 2010 03:06: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 o5R36KCV060004; Sun, 27 Jun 2010 03:06:20 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5R36KCF060001; Sun, 27 Jun 2010 03:06:20 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201006270306.o5R36KCF060001@svn.freebsd.org> From: Xin LI Date: Sun, 27 Jun 2010 03:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209547 - in stable/8: contrib/ee usr.bin/ee X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2010 03:06:21 -0000 Author: delphij Date: Sun Jun 27 03:06:20 2010 New Revision: 209547 URL: http://svn.freebsd.org/changeset/base/209547 Log: MFC 196750,196751,196818,196819 (ache@): 196750: 1) Use isprint() instead of hardcoded values to detect non-printable. 2) Use (unsigned char) cast in waddch() calls. It fix highlighting bug: sign extension of 8bit to the attributes area. 3) Use setlocale() in any case. 196751: Move out of NO_CATGETS define too (as setlocale() in prev. commit) 196818: 1) Remove single occurance of HAS_CTYPE ifdef, ctype functions used here for a long time and needs their header in anycase. 2) Add (unsigned char) casts to more ctype macros. 3) Simplify menu input handling using ctype instead of range unguarded hardcoded tricks. 196819: Remove single occurance of HAS_CTYPE ifdef, ctype functions used here for a long time and needs their header in anycase. Requested by: Patrick Lamaiziere Ok'ed by: ache Modified: stable/8/contrib/ee/ee.c stable/8/usr.bin/ee/Makefile Directory Properties: stable/8/contrib/ee/ (props changed) stable/8/usr.bin/ee/ (props changed) Modified: stable/8/contrib/ee/ee.c ============================================================================== --- stable/8/contrib/ee/ee.c Sun Jun 27 02:30:19 2010 (r209546) +++ stable/8/contrib/ee/ee.c Sun Jun 27 03:06:20 2010 (r209547) @@ -72,10 +72,7 @@ char *version = "@(#) ee, version " EE_ #include #endif -#ifdef HAS_CTYPE #include -#endif - #include #include #include @@ -83,6 +80,7 @@ char *version = "@(#) ee, version " EE_ #include #include #include +#include #ifdef HAS_SYS_WAIT #include @@ -100,9 +98,7 @@ char *version = "@(#) ee, version " EE_ #include #endif - #ifndef NO_CATGETS -#include #include nl_catd catalog; @@ -726,7 +722,7 @@ int character; /* new character */ } *point = character; /* insert new character */ wclrtoeol(text_win); - if (((character >= 0) && (character < ' ')) || (character >= 127)) /* check for TAB character*/ + if (!isprint((unsigned char)character)) /* check for TAB character*/ { scr_pos = scr_horz += out_char(text_win, character, scr_horz); point++; @@ -734,7 +730,7 @@ int character; /* new character */ } else { - waddch(text_win, character); + waddch(text_win, (unsigned char)character); scr_pos = ++scr_horz; point++; position ++; @@ -969,17 +965,17 @@ int column; } else { - waddch(window, (char)character ); + waddch(window, (unsigned char)character ); return(1); } } else { - waddch(window, (char)character); + waddch(window, (unsigned char)character); return(1); } for (i2 = 0; (string[i2] != '\0') && (((column+i2+1)-horiz_offset) < last_col); i2++) - waddch(window, string[i2]); + waddch(window, (unsigned char)string[i2]); return(strlen(string)); } @@ -1044,7 +1040,7 @@ int length; /* length (in bytes) of line wclrtoeol(text_win); while ((posit < length) && (column <= last_col)) { - if ((*temp < 32) || (*temp >= 127)) + if (!isprint(*temp)) { column += len_char(*temp, abs_column); abs_column += out_char(text_win, *temp, abs_column); @@ -1923,13 +1919,13 @@ int advance; /* if true, skip leading s } *nam_str = in; g_pos++; - if (((in < ' ') || (in > 126)) && (g_horz < (last_col - 1))) + if (!isprint((unsigned char)in) && (g_horz < (last_col - 1))) g_horz += out_char(com_win, in, g_horz); else { g_horz++; if (g_horz < (last_col - 1)) - waddch(com_win, in); + waddch(com_win, (unsigned char)in); } nam_str++; } @@ -1974,7 +1970,7 @@ int sensitive; } else { - if (toupper(*strng1) != toupper(*strng2)) + if (toupper((unsigned char)*strng1) != toupper((unsigned char)*strng2)) equal = FALSE; } strng1++; @@ -2446,7 +2442,7 @@ int noverify; if ((text_changes) && (!noverify)) { ans = get_string(changes_made_prompt, TRUE); - if (toupper(*ans) == toupper(*yes_char)) + if (toupper((unsigned char)*ans) == toupper((unsigned char)*yes_char)) text_changes = FALSE; else return(0); @@ -2523,7 +2519,7 @@ int warn_if_exists; if ((temp_fp = fopen(file_name, "r"))) { tmp_point = get_string(file_exists_prompt, TRUE); - if (toupper(*tmp_point) == toupper(*yes_char)) + if (toupper((unsigned char)*tmp_point) == toupper((unsigned char)*yes_char)) write_flag = TRUE; else write_flag = FALSE; @@ -3438,14 +3434,13 @@ struct menu_entries menu_list[]; if (input == -1) exit(0); - if (((tolower(input) >= 'a') && (tolower(input) <= 'z')) || - ((input >= '0') && (input <= '9'))) + if (isascii(input) && isalnum(input)) { - if ((tolower(input) >= 'a') && (tolower(input) <= 'z')) + if (isalpha(input)) { temp = 1 + tolower(input) - 'a'; } - else if ((input >= '0') && (input <= '9')) + else if (isdigit(input)) { temp = (2 + 'z' - 'a') + (input - '0'); } @@ -5085,8 +5080,8 @@ strings_init() { int counter; -#ifndef NO_CATGETS setlocale(LC_ALL, ""); +#ifndef NO_CATGETS catalog = catopen("ee", NL_CAT_LOCALE); #endif /* NO_CATGETS */ Modified: stable/8/usr.bin/ee/Makefile ============================================================================== --- stable/8/usr.bin/ee/Makefile Sun Jun 27 02:30:19 2010 (r209546) +++ stable/8/usr.bin/ee/Makefile Sun Jun 27 03:06:20 2010 (r209547) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../contrib/ee CFLAGS+= -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB \ - -DHAS_CTYPE -DHAS_SYS_WAIT + -DHAS_SYS_WAIT PROG= ee LINKS= ${BINDIR}/ee ${BINDIR}/ree ${BINDIR}/ee ${BINDIR}/edit From owner-svn-src-all@FreeBSD.ORG Sun Jun 27 10:17:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C4561065670; Sun, 27 Jun 2010 10:17:12 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B4B78FC14; Sun, 27 Jun 2010 10:17: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 o5RAHCo2054606; Sun, 27 Jun 2010 10:17:12 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5RAHC0R054605; Sun, 27 Jun 2010 10:17:12 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201006271017.o5RAHC0R054605@svn.freebsd.org> From: Rui Paulo Date: Sun, 27 Jun 2010 10:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209548 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jun 2010 10:17:12 -0000 Author: rpaulo Date: Sun Jun 27 10:17:11 2010 New Revision: 209548 URL: http://svn.freebsd.org/changeset/base/209548 Log: Fix typo introduced in previous revision. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sun Jun 27 03:06:20 2010 (r209547) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sun Jun 27 10:17:11 2010 (r209548) @@ -612,7 +612,7 @@ AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_MERLIN_20) #define AR_SREV_MERLIN_20_OR_LATER(_ah) \ (AR_SREV_MERLIN_20(_ah) || \ - AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_MERLIN_20) + AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_MERLIN) #define AR_SREV_KITE(_ah) \ (AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_KITE) From owner-svn-src-all@FreeBSD.ORG Sun Jun 27 12:19:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F3681065670; Sun, 27 Jun 2010 12:19:09 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E9AE8FC16; Sun, 27 Jun 2010 12:19: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 o5RCJ94V082665; Sun, 27 Jun 2010 12:19:09 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5RCJ9ee082662; Sun, 27 Jun 2010 12:19:09 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201006271219.o5RCJ9ee082662@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 27 Jun 2010 12:19: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: r209549 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jun 2010 12:19:09 -0000 Author: jh Date: Sun Jun 27 12:19:09 2010 New Revision: 209549 URL: http://svn.freebsd.org/changeset/base/209549 Log: Correct a comment typo. Modified: head/sys/kern/subr_unit.c Modified: head/sys/kern/subr_unit.c ============================================================================== --- head/sys/kern/subr_unit.c Sun Jun 27 10:17:11 2010 (r209548) +++ head/sys/kern/subr_unit.c Sun Jun 27 12:19:09 2010 (r209549) @@ -318,7 +318,7 @@ clean_unrhdr(struct unrhdr *uh) /* * Allocate a new unrheader set. * - * Highest and lowest valid values given as paramters. + * Highest and lowest valid values given as parameters. */ struct unrhdr * From owner-svn-src-all@FreeBSD.ORG Sun Jun 27 14:11:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3374106566B; Sun, 27 Jun 2010 14:11:03 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91D168FC16; Sun, 27 Jun 2010 14:11:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5REB31b007383; Sun, 27 Jun 2010 14:11:03 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5REB39b007381; Sun, 27 Jun 2010 14:11:03 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201006271411.o5REB39b007381@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 27 Jun 2010 14:11: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: r209550 - head/usr.bin/tftp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jun 2010 14:11:03 -0000 Author: gavin Date: Sun Jun 27 14:11:03 2010 New Revision: 209550 URL: http://svn.freebsd.org/changeset/base/209550 Log: Fix core dump when server fails to respond. Reviewed by: imp Modified: head/usr.bin/tftp/tftp.c Modified: head/usr.bin/tftp/tftp.c ============================================================================== --- head/usr.bin/tftp/tftp.c Sun Jun 27 12:19:09 2010 (r209549) +++ head/usr.bin/tftp/tftp.c Sun Jun 27 14:11:03 2010 (r209550) @@ -229,7 +229,10 @@ recvfile(int peer, char *port, int fd, c /* Otherwise it is a fatal error */ break; } - + if (i == 12) { + printf("Transfer timed out.\n"); + return; + } if (rp->th_opcode == ERROR) { tftp_log(LOG_ERR, "Error code %d: %s", rp->th_code, rp->th_msg); return; From owner-svn-src-all@FreeBSD.ORG Sun Jun 27 14:21:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB1C71065670; Sun, 27 Jun 2010 14:21:08 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A99B88FC12; Sun, 27 Jun 2010 14:21: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 o5REL8gj009593; Sun, 27 Jun 2010 14:21:08 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5REL8ld009591; Sun, 27 Jun 2010 14:21:08 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201006271421.o5REL8ld009591@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 27 Jun 2010 14:21: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: r209551 - head/usr.bin/tftp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jun 2010 14:21:08 -0000 Author: gavin Date: Sun Jun 27 14:21:08 2010 New Revision: 209551 URL: http://svn.freebsd.org/changeset/base/209551 Log: Fix transfer statistics in the "send file" case - The conditional used to print the stats were using an uninitialised variable. [1] Fix trasnfer statistics in the "receive file" case - the statistics struct was being cleared both before and after the initial connect to the remote server. As a result, the printed time and calculated bandwidth covers the time to connect ad well as the time to transfer the file. This may not be ideal, but now at least matches the "send file" case. Found by: clang static analyser [1] Reviewed by: imp Modified: head/usr.bin/tftp/tftp.c Modified: head/usr.bin/tftp/tftp.c ============================================================================== --- head/usr.bin/tftp/tftp.c Sun Jun 27 14:11:03 2010 (r209550) +++ head/usr.bin/tftp/tftp.c Sun Jun 27 14:21:08 2010 (r209551) @@ -75,7 +75,6 @@ xmitfile(int peer, char *port, int fd, c struct tftphdr *rp; int n, i; uint16_t block; - uint32_t amount; struct sockaddr_storage serv; /* valid server port number */ char recvbuffer[MAXPKTSIZE]; struct tftp_stats tftp_stats; @@ -162,7 +161,7 @@ xmitfile(int peer, char *port, int fd, c tftp_send(peer, &block, &tftp_stats); read_close(); - if (amount > 0) + if (tftp_stats.amount > 0) printstats("Sent", verbose, &tftp_stats); txrx_error = 1; @@ -243,8 +242,6 @@ recvfile(int peer, char *port, int fd, c return; } - stats_init(&tftp_stats); - /* * If the first packet is an OACK packet instead of an DATA packet, * handle it different. From owner-svn-src-all@FreeBSD.ORG Sun Jun 27 16:31:51 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79679106566B; Sun, 27 Jun 2010 16:31:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 08D2E8FC13; Sun, 27 Jun 2010 16:31:50 +0000 (UTC) Received: from c122-107-125-7.carlnfd1.nsw.optusnet.com.au (c122-107-125-7.carlnfd1.nsw.optusnet.com.au [122.107.125.7]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o5RGVlpp022132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Jun 2010 02:31:48 +1000 Date: Mon, 28 Jun 2010 02:31:46 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Garrett Cooper In-Reply-To: Message-ID: <20100628012949.I49091@delplex.bde.org> References: <201006262144.o5QLi5tF076622@svn.freebsd.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-920043072-1277656306=:49091" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Pawel Jakub Dawidek Subject: Re: svn commit: r209542 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jun 2010 16:31:51 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-920043072-1277656306=:49091 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 26 Jun 2010, Garrett Cooper wrote: Please fix your mail program to not mangle the message with \xa0's. > On Sat, Jun 26, 2010 at 2:44 PM, Pawel Jakub Dawidek wr= ote: >> Log: >> =A0Just like in case of setgroups(2), for getgroups(2) also advice inclu= ding >> =A0sys/param.h instead of sys/types.h so we get NGROUPS_MAX and NGROUPS >> =A0definitions. This bug should have been fixed in getgroups.2, not duplicated. It was fixed in getgroups.2 in 1998, but not in setgroups, presumably because POSIX only specified getgroups back then: % RCS file: /home/ncvs/src/lib/libc/sys/getgroups.2,v % Working file: getgroups.2 % head: 1.12 % ---------------------------- % revision 1.3 % date: 1998/01/11 22:01:20; author: alex; state: Exp; lines: +9 -1 % Replace sys/param.h with sys/types.h as per POSIX. % Document the special case of gidsetlen =3D=3D 0. %=20 % Partially obtained from: OpenBSD % ---------------------------- This is a bug because: - neither NGROUPS_MAX nor NGROUPS is needed to use get/setgroups(). These functions take an int arg which may be unrelated to the maximum number of groups - all uses of NGROUPS_MAX and NGROUPS are bugs, since they are fixed values so using them breaks binary compatibility - FreeBSD was fixed relatively recently to never (?) use NGROUPS_MAX or NGROUPS. The fixes include removing the reference to NGROUPS max in getgroups.2 and the reference to NGROUPS in setgroups.2. Now {NGROUPS_MAX}+1 is used consistently. This cannot be found in . (It's documentation seems to be unfindable in any, man page but that is another bug. POSIX limits should be described somewhere like intro.2 and intro.2 should not be cross referenced to.) > Hmmm... looks like our copy of getgroups(2) is not POSIX compliant > then :/ : http://www.opengroup.org/onlinepubs/000095399/functions/getgrou= ps.html It only used to be, after the 1998 fix. POSIX didn't have setgroups() in 2001 either. > . Why not just use sysconf like the POSIX page suggests (which is > portable)? FreeBSD's man page says this too (implicitly via the {} markup). POSIX has an explicit example using sysconf(). I prefer not to have such examples in individual man pages. They are difficult to give in enough detail to work in general. POSIX has very wrong examples for use of {LINE_MAX}. Its example for {NGROUPS_MAX} for getgroups() is little better -- it is missing an include of to declare malloc(), and has no error handling. I would prefer a central example that is missing these bugs but describes the shortcuts of having them. Bruce --0-920043072-1277656306=:49091-- From owner-svn-src-all@FreeBSD.ORG Sun Jun 27 16:46:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B7EE1065672; Sun, 27 Jun 2010 16:46:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 569408FC08; Sun, 27 Jun 2010 16:46: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 o5RGkCuA041356; Sun, 27 Jun 2010 16:46:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5RGkBOA041314; Sun, 27 Jun 2010 16:46:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201006271646.o5RGkBOA041314@svn.freebsd.org> From: Warner Losh Date: Sun, 27 Jun 2010 16:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209552 - in head/usr.sbin/pc-sysinstall: backend backend-partmanager backend-query pc-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: Sun, 27 Jun 2010 16:46:12 -0000 Author: imp Date: Sun Jun 27 16:46:11 2010 New Revision: 209552 URL: http://svn.freebsd.org/changeset/base/209552 Log: Spell iXsystems, Inc properly Submitted by: delphij@ Modified: head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh head/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh head/usr.sbin/pc-sysinstall/backend-query/detect-laptop.sh head/usr.sbin/pc-sysinstall/backend-query/detect-nics.sh head/usr.sbin/pc-sysinstall/backend-query/detect-vmware.sh head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh head/usr.sbin/pc-sysinstall/backend-query/disk-part.sh head/usr.sbin/pc-sysinstall/backend-query/enable-net.sh head/usr.sbin/pc-sysinstall/backend-query/list-components.sh head/usr.sbin/pc-sysinstall/backend-query/list-rsync-backups.sh head/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh head/usr.sbin/pc-sysinstall/backend-query/query-langs.sh head/usr.sbin/pc-sysinstall/backend-query/send-logs.sh head/usr.sbin/pc-sysinstall/backend-query/setup-ssh-keys.sh head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh head/usr.sbin/pc-sysinstall/backend-query/test-live.sh head/usr.sbin/pc-sysinstall/backend-query/test-netup.sh head/usr.sbin/pc-sysinstall/backend-query/update-part-list.sh head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-models.sh head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-variants.sh head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh head/usr.sbin/pc-sysinstall/backend/functions-disk.sh head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh head/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh head/usr.sbin/pc-sysinstall/backend/functions-localize.sh head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh head/usr.sbin/pc-sysinstall/backend/functions-mountoptical.sh head/usr.sbin/pc-sysinstall/backend/functions-networking.sh head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh head/usr.sbin/pc-sysinstall/backend/functions-parse.sh head/usr.sbin/pc-sysinstall/backend/functions-runcommands.sh head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh head/usr.sbin/pc-sysinstall/backend/functions-upgrade.sh head/usr.sbin/pc-sysinstall/backend/functions-users.sh head/usr.sbin/pc-sysinstall/backend/functions.sh head/usr.sbin/pc-sysinstall/backend/parseconfig.sh head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Modified: head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/detect-laptop.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/detect-laptop.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/detect-laptop.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/detect-nics.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/detect-nics.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/detect-nics.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/detect-vmware.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/detect-vmware.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/detect-vmware.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-part.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/disk-part.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/disk-part.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/enable-net.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/enable-net.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/enable-net.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/list-components.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/list-components.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/list-components.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/list-rsync-backups.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/list-rsync-backups.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/list-rsync-backups.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/query-langs.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/query-langs.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/query-langs.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/send-logs.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/send-logs.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/send-logs.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/setup-ssh-keys.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/setup-ssh-keys.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/setup-ssh-keys.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/test-live.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/test-live.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/test-live.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/test-netup.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/test-netup.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/test-netup.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/update-part-list.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/update-part-list.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/update-part-list.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-models.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-models.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-models.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-variants.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-variants.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-variants.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-localize.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-localize.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-localize.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-mountoptical.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-mountoptical.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-mountoptical.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-networking.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-networking.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-networking.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-parse.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-parse.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-parse.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-runcommands.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-runcommands.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-runcommands.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-upgrade.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-upgrade.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-upgrade.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions-users.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-users.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions-users.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/functions.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/parseconfig.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/parseconfig.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/parseconfig.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Sun Jun 27 14:21:08 2010 (r209551) +++ head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Sun Jun 27 16:46:11 2010 (r209552) @@ -6,7 +6,7 @@ # system installations, as well as calls which a front-end can use # to retrive information about the system ##################################################################### -# Copyright 2010 iX Systems +# Copyright 2010 iXsystems # All rights reserved # # Redistribution and use in source and binary forms, with or without From owner-svn-src-all@FreeBSD.ORG Sun Jun 27 17:04:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CB4D1065672; Sun, 27 Jun 2010 17:04:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8732C8FC18; Sun, 27 Jun 2010 17:04: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 o5RH43Up045289; Sun, 27 Jun 2010 17:04:03 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5RH43TB045279; Sun, 27 Jun 2010 17:04:03 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201006271704.o5RH43TB045279@svn.freebsd.org> From: Warner Losh Date: Sun, 27 Jun 2010 17:04: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: r209553 - in head/usr.sbin/pc-sysinstall: backend backend-query conf doc pc-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: Sun, 27 Jun 2010 17:04:03 -0000 Author: imp Date: Sun Jun 27 17:04:03 2010 New Revision: 209553 URL: http://svn.freebsd.org/changeset/base/209553 Log: Update pc-sysinstall to output list of FTP mirrors as well as some installation information. Export architecture to install. PR: 148184 Submitted by: John Hixson Added: head/usr.sbin/pc-sysinstall/backend-query/list-config.sh (contents, props changed) head/usr.sbin/pc-sysinstall/backend-query/list-mirrors.sh (contents, props changed) head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh (contents, props changed) Modified: head/usr.sbin/pc-sysinstall/backend-query/Makefile head/usr.sbin/pc-sysinstall/backend/Makefile head/usr.sbin/pc-sysinstall/conf/pc-sysinstall.conf head/usr.sbin/pc-sysinstall/doc/help-index head/usr.sbin/pc-sysinstall/pc-sysinstall/Makefile head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Modified: head/usr.sbin/pc-sysinstall/backend-query/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/Makefile Sun Jun 27 16:46:11 2010 (r209552) +++ head/usr.sbin/pc-sysinstall/backend-query/Makefile Sun Jun 27 17:04:03 2010 (r209553) @@ -1,9 +1,9 @@ # $FreeBSD$ FILES= detect-laptop.sh detect-nics.sh detect-vmware.sh disk-info.sh \ - disk-list.sh disk-part.sh enable-net.sh list-components.sh \ - list-rsync-backups.sh list-tzones.sh query-langs.sh send-logs.sh \ - setup-ssh-keys.sh sys-mem.sh test-live.sh test-netup.sh \ + disk-list.sh disk-part.sh enable-net.sh list-config.sh list-components.sh \ + list-mirrors.sh list-rsync-backups.sh list-tzones.sh query-langs.sh \ + send-logs.sh setup-ssh-keys.sh sys-mem.sh test-live.sh test-netup.sh \ update-part-list.sh xkeyboard-layouts.sh xkeyboard-models.sh \ xkeyboard-variants.sh FILESMODE= ${BINMODE} Added: head/usr.sbin/pc-sysinstall/backend-query/list-config.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pc-sysinstall/backend-query/list-config.sh Sun Jun 27 17:04:03 2010 (r209553) @@ -0,0 +1,30 @@ +#!/bin/sh +#- +# Copyright (c) 2010 iX Systems, 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. +# +# 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$ + +echo "branch=${FBSD_BRANCH}" +echo "arch=${FBSD_ARCH}" +exit 0 Added: head/usr.sbin/pc-sysinstall/backend-query/list-mirrors.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pc-sysinstall/backend-query/list-mirrors.sh Sun Jun 27 17:04:03 2010 (r209553) @@ -0,0 +1,37 @@ +#!/bin/sh +#- +# Copyright (c) 2010 iX Systems, 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. +# +# 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$ + +. ${PROGDIR}/backend/functions.sh +. ${PROGDIR}/backend/functions-ftp.sh + +# Backend script which lists all the available ftp mirrors for front-ends to display +COUNTRY="${1}" + +get_ftp_mirrors "${COUNTRY}" +show_mirrors "${VAL}" + +exit 0 Modified: head/usr.sbin/pc-sysinstall/backend/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/Makefile Sun Jun 27 16:46:11 2010 (r209552) +++ head/usr.sbin/pc-sysinstall/backend/Makefile Sun Jun 27 17:04:03 2010 (r209553) @@ -1,7 +1,7 @@ # $FreeBSD$ FILES= functions-bsdlabel.sh functions-cleanup.sh functions-disk.sh \ - functions-extractimage.sh functions-installcomponents.sh \ + functions-extractimage.sh functions-ftp.sh functions-installcomponents.sh \ functions-localize.sh functions-mountdisk.sh \ functions-mountoptical.sh functions-networking.sh \ functions-newfs.sh functions-parse.sh functions-runcommands.sh \ Added: head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh Sun Jun 27 17:04:03 2010 (r209553) @@ -0,0 +1,374 @@ +#!/bin/sh +#- +# Copyright (c) 2010 iX Systems, 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. +# +# 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$ + +# Functions which runs commands on the system + +. ${BACKEND}/functions.sh +. ${BACKEND}/functions-parse.sh + +MAIN_FTP_SERVERS="\ +Main Site: ftp.freebsd.org" + +IPV6_FTP_SERVERS="\ +IPv6 Main Site: ftp.freebsd.org|\ +IPv6 Ireland: ftp3.ie.freebsd.org|\ +IPv6 Israel: ftp.il.freebsd.org|\ +IPv6 Japan: ftp2.jp.freebsd.org|\ +IPv6 USA: ftp4.us.freebsd.org|\ +IPv6 Turkey: ftp2.tr.freebsd.org" + +PRIMARY_FTP_SERVERS="\ +Primary: ftp1.freebsd.org|\ +Primary #2: ftp2.freebsd.org|\ +Primary #3: ftp3.freebsd.org|\ +Primary #4: ftp4.freebsd.org|\ +Primary #5: ftp5.freebsd.org|\ +Primary #6: ftp6.freebsd.org|\ +Primary #7: ftp7.freebsd.org|\ +Primary #8: ftp8.freebsd.org|\ +Primary #9: ftp9.freebsd.org|\ +Primary #10: ftp10.freebsd.org|\ +Primary #11: ftp11.freebsd.org|\ +Primary #12: ftp12.freebsd.org|\ +Primary #13: ftp13.freebsd.org|\ +Primary #14: ftp14.freebsd.org" + +ARGENTINA_FTP_SERVERS="\ +Argentina: ftp.ar.freebsd.org" + +AUSTRALIA_FTP_SERVERS="\ +Australia: ftp.au.freebsd.org|\ +Australia #2: ftp2.au.freebsd.org|\ +Australia #3: ftp3.au.freebsd.org" + +AUSTRIA_FTP_SERVERS="\ +Austria: ftp.at.freebsd.org|\ +Austria #2: ftp2.at.freebsd.org" + +BRAZIL_FTP_SERVERS="\ +Brazil: ftp.br.freebsd.org|\ +Brazil #2: ftp2.br.freebsd.org|\ +Brazil #3: ftp3.br.freebsd.org|\ +Brazil #4: ftp4.br.freebsd.org|\ +Brazil #5: ftp5.br.freebsd.org|\ +Brazil #6: ftp6.br.freebsd.org|\ +Brazil #7: ftp7.br.freebsd.org" + +CANADA_FTP_SERVERS="\ +Canada: ftp.ca.freebsd.org" + +CHINA_FTP_SERVERS="\ +China: ftp.cn.freebsd.org|\ +China #2: ftp2.cn.freebsd.org" + +CROATIA_FTP_SERVERS="\ +Croatia: ftp.hr.freebsd.org" + +CZECH_REPUBLIC_FTP_SERVERS="\ +Czech Republic: ftp.cz.freebsd.org" + +DENMARK_FTP_SERVERS="\ +Denmark: ftp.dk.freebsd.org|\ +Denmark #2: ftp2.dk.freebsd.org" + +ESTONIA_FTP_SERVERS="\ +Estonia: ftp.ee.freebsd.org" + +FINLAND_FTP_SERVERS="\ +Finland: ftp.fi.freebsd.org" + +FRANCE_FTP_SERVERS="\ +France: ftp.fr.freebsd.org|\ +France #2: ftp2.fr.freebsd.org|\ +France #3: ftp3.fr.freebsd.org|\ +France #5: ftp5.fr.freebsd.org|\ +France #6: ftp6.fr.freebsd.org|\ +France #8: ftp8.fr.freebsd.org" + +GERMANY_FTP_SERVERS="\ +Germany: ftp.de.freebsd.org|\ +Germany #2: ftp2.de.freebsd.org|\ +Germany #3: ftp3.de.freebsd.org|\ +Germany #4: ftp4.de.freebsd.org|\ +Germany #5: ftp5.de.freebsd.org|\ +Germany #6: ftp6.de.freebsd.org|\ +Germany #7: ftp7.de.freebsd.org|\ +Germany #8: ftp8.de.freebsd.org" + +GREECE_FTP_SERVERS="\ +Greece: ftp.gr.freebsd.org|\ +Greece #2: ftp2.gr.freebsd.org" + +HUNGARY_FTP_SERVERS="\ +Hungary: ftp.hu.freebsd.org" + +ICELAND_FTP_SERVERS="\ +Iceland: ftp.is.freebsd.org" + +IRELAND_FTP_SERVERS="\ +Ireland: ftp.ie.freebsd.org|\ +Ireland #2: ftp2.ie.freebsd.org|\ +Ireland #3: ftp3.ie.freebsd.org" + +ISRAEL_FTP_SERVERS="\ +Israel: ftp.il.freebsd.org" + +ITALY_FTP_SERVERS="\ +Italy: ftp.it.freebsd.org" + +JAPAN_FTP_SERVERS="\ +Japan: ftp.jp.freebsd.org|\ +Japan #2: ftp2.jp.freebsd.org|\ +Japan #3: ftp3.jp.freebsd.org|\ +Japan #4: ftp4.jp.freebsd.org|\ +Japan #5: ftp5.jp.freebsd.org|\ +Japan #6: ftp6.jp.freebsd.org|\ +Japan #7: ftp7.jp.freebsd.org|\ +Japan #8: ftp8.jp.freebsd.org|\ +Japan #9: ftp9.jp.freebsd.org" + +KOREA_FTP_SERVERS="\ +Korea: ftp.kr.freebsd.org|\ +Korea #2: ftp2.kr.freebsd.org" + +LITHUANIA_FTP_SERVERS="\ +Lithuania: ftp.lt.freebsd.org" + +NETHERLANDS_FTP_SERVERS="\ +Netherlands: ftp.nl.freebsd.org|\ +Netherlands #2: ftp2.nl.freebsd.org" + +NORWAY_FTP_SERVERS="\ +Norway: ftp.no.freebsd.org|\ +Norway #3: ftp3.no.freebsd.org" + +POLAND_FTP_SERVERS="\ +Poland: ftp.pl.freebsd.org|\ +Poland #2: ftp2.pl.freebsd.org|\ +Poland #5: ftp5.pl.freebsd.org" + +PORTUGAL_FTP_SERVERS="\ +Portugal: ftp.pt.freebsd.org|\ +Portugal #2: ftp2.pt.freebsd.org|\ +Portugal #4: ftp4.pt.freebsd.org" + +ROMANIA_FTP_SERVERS="\ +Romania: ftp.ro.freebsd.org" + +RUSSIA_FTP_SERVERS="\ +Russia: ftp.ru.freebsd.org|\ +Russia #2: ftp2.ru.freebsd.org|\ +Russia #3: ftp3.ru.freebsd.org|\ +Russia #4: ftp4.ru.freebsd.org" + +SINGAPORE_FTP_SERVERS="\ +Singapore: ftp.sg.freebsd.org" + +SLOVAK_REPUBLIC_FTP_SERVERS="\ +Slovak Republic: ftp.sk.freebsd.org" + +SLOVENIA_FTP_SERVERS="\ +Slovenia: ftp.si.freebsd.org|\ +Slovenia #2: ftp2.si.freebsd.org" + +SOUTH_AFRICA_FTP_SERVERS="\ +South Africa: ftp.za.freebsd.org|\ +South Africa #2: ftp2.za.freebsd.org|\ +South Africa #3: ftp3.za.freebsd.org|\ +South Africa #4: ftp4.za.freebsd.org" + +SPAIN_FTP_SERVERS="\ +Spain: ftp.es.freebsd.org|\ +Spain #2: ftp2.es.freebsd.org|\ +Spain #3: ftp3.es.freebsd.org" + +SWEDEN_FTP_SERVERS="\ +Sweden: ftp.se.freebsd.org|\ +Sweden #2: ftp2.se.freebsd.org|\ +Sweden #3: ftp3.se.freebsd.org|\ +Sweden #5: ftp5.se.freebsd.org" + +SWITZERLAND_FTP_SERVERS="\ +Switzerland: ftp.ch.freebsd.org|\ +Switzerland #2: ftp2.ch.freebsd.org" + +TAIWAN_FTP_SERVERS="\ +Taiwan: ftp.tw.freebsd.org|\ +Taiwan #2: ftp2.tw.freebsd.org|\ +Taiwan #3: ftp3.tw.freebsd.org|\ +Taiwan #4: ftp4.tw.freebsd.org|\ +Taiwan #6: ftp6.tw.freebsd.org|\ +Taiwan #11: ftp11.tw.freebsd.org" + +TURKEY_FTP_SERVERS="\ +Turkey: ftp.tr.freebsd.org|\ +Turkey #2: ftp2.tr.freebsd.org" + +UK_FTP_SERVERS="\ +UK: ftp.uk.freebsd.org|\ +UK #2: ftp2.uk.freebsd.org|\ +UK #3: ftp3.uk.freebsd.org|\ +UK #4: ftp4.uk.freebsd.org|\ +UK #5: ftp5.uk.freebsd.org|\ +UK #6: ftp6.uk.freebsd.org" + +UKRAINE_FTP_SERVERS="\ +Ukraine: ftp.ua.freebsd.org|\ +Ukraine #2: ftp2.ua.freebsd.org|\ +Ukraine #5: ftp5.ua.freebsd.org|\ +Ukraine #6: ftp6.ua.freebsd.org|\ +Ukraine #7: ftp7.ua.freebsd.org|\ +Ukraine #8: ftp8.ua.freebsd.org" + +USA_FTP_SERVERS="\ +USA #1: ftp1.us.freebsd.org|\ +USA #2: ftp2.us.freebsd.org|\ +USA #3: ftp3.us.freebsd.org|\ +USA #4: ftp4.us.freebsd.org|\ +USA #5: ftp5.us.freebsd.org|\ +USA #6: ftp6.us.freebsd.org|\ +USA #7: ftp7.us.freebsd.org|\ +USA #8: ftp8.us.freebsd.org|\ +USA #9: ftp9.us.freebsd.org|\ +USA #10: ftp10.us.freebsd.org|\ +USA #11: ftp11.us.freebsd.org|\ +USA #12: ftp12.us.freebsd.org|\ +USA #13: ftp13.us.freebsd.org|\ +USA #14: ftp14.us.freebsd.org|\ +USA #15: ftp15.us.freebsd.org" + +show_mirrors() +{ + MIRRORS="${1}" + if [ -n "${MIRRORS}" ] + then + SAVE_IFS="${IFS}" + IFS="|" + for m in ${MIRRORS} + do + echo "$m" + done + IFS="${SAVE_IFS}" + fi +} + +get_ftp_mirrors() +{ + COUNTRY="${1}" + if [ -n "$COUNTRY" ] + then + COUNTRY=`echo $COUNTRY|tr A-Z a-z` + case "${COUNTRY}" in + argentina*) VAL="${ARGENTINA_FTP_SERVERS}" ;; + australia*) VAL="${AUSTRALIA_FTP_SERVERS}" ;; + austria*) VAL="${AUSTRIA_FTP_SERVERS}" ;; + brazil*) VAL="${BRAZIL_FTP_SERVERS}" ;; + canada*) VAL="${CANADA_FTP_SERVERS}" ;; + china*) VAL="${CHINA_FTP_SERVERS}" ;; + croatia*) VAL="${CROATIA_FTP_SERVERS}" ;; + czech*) VAL="${CZECH_REPUBLIC_FTP_SERVERS}" ;; + denmark*) VAL="${DENMARK_FTP_SERVERS}" ;; + estonia*) VAL="${ESTONIA_FTP_SERVERS}" ;; + finland*) VAL="${FINLAND_FTP_SERVERS}" ;; + france*) VAL="${FRANCE_FTP_SERVERS}" ;; + germany*) VAL="${GERMANY_FTP_SERVERS}" ;; + greece*) VAL="${GREECE_FTP_SERVERS}" ;; + hungary*) VAL="${HUNGARY_FTP_SERVERS}" ;; + iceland*) VAL="${ICELAND_FTP_SERVERS}" ;; + ireland*) VAL="${IRELAND_FTP_SERVERS}" ;; + israel*) VAL="${ISRAEL_FTP_SERVERS}" ;; + italy*) VAL="${ITALY_FTP_SERVERS}" ;; + japan*) VAL="${JAPAN_FTP_SERVERS}" ;; + korea*) VAL="${KOREA_FTP_SERVERS}" ;; + lithuania*) VAL="${LITHUANIA_FTP_SERVERS}" ;; + netherlands*) VAL="${NETHERLANDS_FTP_SERVERS}" ;; + norway*) VAL="${NORWAY_FTP_SERVERS}" ;; + poland*) VAL="${POLAND_FTP_SERVERS}" ;; + portugal*) VAL="${PORTUGAL_FTP_SERVERS}" ;; + romania*) VAL="${ROMAINIA_FTP_SERVERS}" ;; + russia*) VAL="${RUSSIA_FTP_SERVERS}" ;; + singapore*) VAL="${SINGAPORE_FTP_SERVERS}" ;; + slovak*) VAL="${SLOVAK_REPUBLIC_FTP_SERVERS}" ;; + slovenia*) VAL="${SLOVENIA_FTP_SERVERS}" ;; + *africa*) VAL="${SOUTH_AFRICA_FTP_SERVERS}" ;; + spain*) VAL="${SPAIN_FTP_SERVERS}" ;; + sweden*) VAL="${SWEDEN_FTP_SERVERS}" ;; + switzerland*) VAL="${SWITZERLAND_FTP_SERVERS}" ;; + taiwan*) VAL="${TAIWAN_FTP_SERVERS}" ;; + turkey*) VAL="${TURKEY_FTP_SERVERS}" ;; + ukraine*) VAL="${UKRAINE_FTP_SERVERS}" ;; + uk*) VAL="${UK_FTP_SERVERS}" ;; + usa*) VAL="${USA_FTP_SERVERS}" ;; + esac + else + VAL="${MAIN_FTP_SERVERS}" + VAL="${VAL}|${IPV6_FTP_SERVERS}" + VAL="${VAL}|${PRIMARY_FTP_SERVERS}" + VAL="${VAL}|${ARGENTINA_FTP_SERVERS}" + VAL="${VAL}|${AUSTRALIA_FTP_SERVERS}" + VAL="${VAL}|${AUSTRIA_FTP_SERVERS}" + VAL="${VAL}|${BRAZIL_FTP_SERVERS}" + VAL="${VAL}|${CANADA_FTP_SERVERS}" + VAL="${VAL}|${CHINA_FTP_SERVERS}" + VAL="${VAL}|${CROATIA_FTP_SERVERS}" + VAL="${VAL}|${CZECH_REPUBLIC_FTP_SERVERS}" + VAL="${VAL}|${DENMARK_FTP_SERVERS}" + VAL="${VAL}|${ESTONIA_FTP_SERVERS}" + VAL="${VAL}|${FINLAND_FTP_SERVERS}" + VAL="${VAL}|${FRANCE_FTP_SERVERS}" + VAL="${VAL}|${GERMANY_FTP_SERVERS}" + VAL="${VAL}|${GREECE_FTP_SERVERS}" + VAL="${VAL}|${HUNGARY_FTP_SERVERS}" + VAL="${VAL}|${ICELAND_FTP_SERVERS}" + VAL="${VAL}|${IRELAND_FTP_SERVERS}" + VAL="${VAL}|${ISRAEL_FTP_SERVERS}" + VAL="${VAL}|${ITALY_FTP_SERVERS}" + VAL="${VAL}|${JAPAN_FTP_SERVERS}" + VAL="${VAL}|${KOREA_FTP_SERVERS}" + VAL="${VAL}|${LITHUANIA_FTP_SERVERS}" + VAL="${VAL}|${NETHERLANDS_FTP_SERVERS}" + VAL="${VAL}|${NORWAY_FTP_SERVERS}" + VAL="${VAL}|${POLAND_FTP_SERVERS}" + VAL="${VAL}|${PORTUGAL_FTP_SERVERS}" + VAL="${VAL}|${ROMANIA_FTP_SERVERS}" + VAL="${VAL}|${RUSSIA_FTP_SERVERS}" + VAL="${VAL}|${SINGAPORE_FTP_SERVERS}" + VAL="${VAL}|${SLOVAK_REPUBLIC_FTP_SERVERS}" + VAL="${VAL}|${SLOVENIA_FTP_SERVERS}" + VAL="${VAL}|${SOUTH_AFRICA_FTP_SERVERS}" + VAL="${VAL}|${SPAIN_FTP_SERVERS}" + VAL="${VAL}|${SWEDEN_FTP_SERVERS}" + VAL="${VAL}|${SWITZERLAND_FTP_SERVERS}" + VAL="${VAL}|${TAIWAN_FTP_SERVERS}" + VAL="${VAL}|${TURKEY_FTP_SERVERS}" + VAL="${VAL}|${UKRAINE_FTP_SERVERS}" + VAL="${VAL}|${UK_FTP_SERVERS}" + VAL="${VAL}|${USA_FTP_SERVERS}" + fi + + export VAL +} Modified: head/usr.sbin/pc-sysinstall/conf/pc-sysinstall.conf ============================================================================== --- head/usr.sbin/pc-sysinstall/conf/pc-sysinstall.conf Sun Jun 27 16:46:11 2010 (r209552) +++ head/usr.sbin/pc-sysinstall/conf/pc-sysinstall.conf Sun Jun 27 17:04:03 2010 (r209553) @@ -59,8 +59,10 @@ export UZIP_FILE TAR_FILE # Locations of FreeBSD only install files FBSD_UZIP_FILE="fbsd-release.ufs.uzip" FBSD_TAR_FILE="fbsd-release.tbz" -FBSD_BRANCH_DIR="8.0-CURRENT" -export FBSD_UZIP_FILE FBSD_TAR_FILE FBSD_BRANCH_DIR +FBSD_BRANCH="8.0-RELEASE" +FBSD_BRANCH_DIR="${FBSD_BRANCH}" +FBSD_ARCH=`uname -m` +export FBSD_UZIP_FILE FBSD_TAR_FILE FBSD_BRANCH FBSD_BRANCH_DIR FBSD_ARCH # Our internet mirror listing file location NETSERVER="http://updates.pcbsd.org" Modified: head/usr.sbin/pc-sysinstall/doc/help-index ============================================================================== --- head/usr.sbin/pc-sysinstall/doc/help-index Sun Jun 27 16:46:11 2010 (r209552) +++ head/usr.sbin/pc-sysinstall/doc/help-index Sun Jun 27 17:04:03 2010 (r209553) @@ -28,9 +28,15 @@ System Query Commands detect-nics Returns a listing of the detected network cards on this system + list-config + Returns a listing of the pc-sysinstall configuration + list-components Returns a listing of the available components which can be installed + list-mirrors + Returns a listing of the available FTP mirrors + list-rsync-backups Returns a listing of available rsync-backups on the target server in the life-preserver/ dir Modified: head/usr.sbin/pc-sysinstall/pc-sysinstall/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/pc-sysinstall/Makefile Sun Jun 27 16:46:11 2010 (r209552) +++ head/usr.sbin/pc-sysinstall/pc-sysinstall/Makefile Sun Jun 27 17:04:03 2010 (r209553) @@ -2,5 +2,6 @@ SCRIPTS=pc-sysinstall.sh MAN= pc-sysinstall.8 +BINDIR= /usr/sbin .include Modified: head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Sun Jun 27 16:46:11 2010 (r209552) +++ head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Sun Jun 27 17:04:03 2010 (r209553) @@ -148,6 +148,14 @@ case $1 in list-components) ${QUERYDIR}/list-components.sh ;; + # Function which lists pc-sysinstall configuration + list-config) ${QUERYDIR}/list-config.sh + ;; + + # Function which lists available FTP mirrors + list-mirrors) ${QUERYDIR}/list-mirrors.sh "${2}" + ;; + # Function which lists available backups on a rsync/ssh server list-rsync-backups) ${QUERYDIR}/list-rsync-backups.sh "${2}" "${3}" "${4}" ;; From owner-svn-src-all@FreeBSD.ORG Sun Jun 27 17:14:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48287106566B; Sun, 27 Jun 2010 17:14:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3639F8FC16; Sun, 27 Jun 2010 17:14: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 o5RHE5Cs047522; Sun, 27 Jun 2010 17:14:05 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5RHE5kK047519; Sun, 27 Jun 2010 17:14:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201006271714.o5RHE5kK047519@svn.freebsd.org> From: Warner Losh Date: Sun, 27 Jun 2010 17:14: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: r209554 - in head/usr.sbin/pc-sysinstall: . pc-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: Sun, 27 Jun 2010 17:14:05 -0000 Author: imp Date: Sun Jun 27 17:14:04 2010 New Revision: 209554 URL: http://svn.freebsd.org/changeset/base/209554 Log: Properly inherit variables from src/usr.sbin/Makefile.inc for subdirectories of pc-sysinstall. Back out explicit setting in pc-sysinstall/pc-sysinstall/Makefile. Added: head/usr.sbin/pc-sysinstall/Makefile.inc (contents, props changed) Modified: head/usr.sbin/pc-sysinstall/pc-sysinstall/Makefile Added: head/usr.sbin/pc-sysinstall/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pc-sysinstall/Makefile.inc Sun Jun 27 17:14:04 2010 (r209554) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Modified: head/usr.sbin/pc-sysinstall/pc-sysinstall/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/pc-sysinstall/Makefile Sun Jun 27 17:04:03 2010 (r209553) +++ head/usr.sbin/pc-sysinstall/pc-sysinstall/Makefile Sun Jun 27 17:14:04 2010 (r209554) @@ -2,6 +2,5 @@ SCRIPTS=pc-sysinstall.sh MAN= pc-sysinstall.8 -BINDIR= /usr/sbin .include From owner-svn-src-all@FreeBSD.ORG Sun Jun 27 23:11:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82E471065670; Sun, 27 Jun 2010 23:11:36 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 733148FC18; Sun, 27 Jun 2010 23:11:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5RNBaBQ025760; Sun, 27 Jun 2010 23:11:36 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5RNBaBB025758; Sun, 27 Jun 2010 23:11:36 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201006272311.o5RNBaBB025758@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 27 Jun 2010 23:11:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209555 - head/usr.bin/ministat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2010 23:11:36 -0000 Author: gavin Date: Sun Jun 27 23:11:35 2010 New Revision: 209555 URL: http://svn.freebsd.org/changeset/base/209555 Log: Make the second example command more closely match the demo output, and as a side effect more clearly show the change in command lines between the first and second example invocations. Modified: head/usr.bin/ministat/ministat.1 Modified: head/usr.bin/ministat/ministat.1 ============================================================================== --- head/usr.bin/ministat/ministat.1 Sun Jun 27 17:14:04 2010 (r209554) +++ head/usr.bin/ministat/ministat.1 Sun Jun 27 23:11:35 2010 (r209555) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2007 +.Dd June 28, 2010 .Dt MINISTAT 1 .Os .Sh NAME @@ -93,7 +93,7 @@ all statistical purposes identical. You have the option of lowering your standards by specifying a lower confidence level: .Bd -literal -offset indent - $ ministat -c 80 iguana chameleon + $ ministat -s -w 60 -c 80 iguana chameleon x iguana + chameleon +------------------------------------------------------------+ From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 01:16:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1230A106566C; Mon, 28 Jun 2010 01:16:35 +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 F3CB98FC18; Mon, 28 Jun 2010 01:16: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 o5S1GYvU053177; Mon, 28 Jun 2010 01:16:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S1GYgu053167; Mon, 28 Jun 2010 01:16:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201006280116.o5S1GYgu053167@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 28 Jun 2010 01:16: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: r209556 - in stable/8/sys: fs/nfsclient fs/nfsserver nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 01:16:35 -0000 Author: kib Date: Mon Jun 28 01:16:34 2010 New Revision: 209556 URL: http://svn.freebsd.org/changeset/base/209556 Log: MFC r209120: In NFS clients, instead of inconsistently using #ifdef DIAGNOSTIC and #ifndef DIAGNOSTIC for debug assertions, prefer KASSERT(). Also change one #ifdef DIAGNOSTIC in the new nfs server. Modified: stable/8/sys/fs/nfsclient/nfs_clbio.c stable/8/sys/fs/nfsclient/nfs_clcomsubs.c stable/8/sys/fs/nfsclient/nfs_clrpcops.c stable/8/sys/fs/nfsclient/nfs_clsubs.c stable/8/sys/fs/nfsclient/nfs_clvnops.c stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c stable/8/sys/nfsclient/nfs_bio.c stable/8/sys/nfsclient/nfs_subs.c stable/8/sys/nfsclient/nfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clbio.c Sun Jun 27 23:11:35 2010 (r209555) +++ stable/8/sys/fs/nfsclient/nfs_clbio.c Mon Jun 28 01:16:34 2010 (r209556) @@ -449,10 +449,7 @@ ncl_bioread(struct vnode *vp, struct uio int seqcount; int nra, error = 0, n = 0, on = 0; -#ifdef DIAGNOSTIC - if (uio->uio_rw != UIO_READ) - panic("ncl_read mode"); -#endif + KASSERT(uio->uio_rw == UIO_READ, ("ncl_read mode")); if (uio->uio_resid == 0) return (0); if (uio->uio_offset < 0) /* XXX VDIR cookies can be negative */ @@ -878,12 +875,9 @@ ncl_write(struct vop_write_args *ap) int n, on, error = 0; struct proc *p = td?td->td_proc:NULL; -#ifdef DIAGNOSTIC - if (uio->uio_rw != UIO_WRITE) - panic("ncl_write mode"); - if (uio->uio_segflg == UIO_USERSPACE && uio->uio_td != curthread) - panic("ncl_write proc"); -#endif + KASSERT(uio->uio_rw == UIO_WRITE, ("ncl_write mode")); + KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, + ("ncl_write proc")); if (vp->v_type != VREG) return (EIO); mtx_lock(&np->n_mtx); Modified: stable/8/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clcomsubs.c Sun Jun 27 23:11:35 2010 (r209555) +++ stable/8/sys/fs/nfsclient/nfs_clcomsubs.c Mon Jun 28 01:16:34 2010 (r209556) @@ -194,10 +194,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, int uiosiz, clflg, rem; char *cp, *tcp; -#ifdef DIAGNOSTIC - if (uiop->uio_iovcnt != 1) - panic("nfsm_uiotombuf: iovcnt != 1"); -#endif + KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); if (siz > ncl_mbuf_mlen) /* or should it >= MCLBYTES ?? */ clflg = 1; @@ -346,10 +343,7 @@ nfscl_getcookie(struct nfsnode *np, off_ pos = off / NFS_DIRBLKSIZ; if (pos == 0) { -#ifdef DIAGNOSTIC - if (add) - panic("nfs getcookie add at 0"); -#endif + KASSERT(!add, ("nfs getcookie add at 0")); return (&nfs_nullcookie); } pos--; Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Sun Jun 27 23:11:35 2010 (r209555) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Mon Jun 28 01:16:34 2010 (r209556) @@ -1452,10 +1452,7 @@ nfsrpc_writerpc(vnode_t vp, struct uio * struct nfsrv_descript *nd = &nfsd; nfsattrbit_t attrbits; -#ifdef DIAGNOSTIC - if (uiop->uio_iovcnt != 1) - panic("nfs: writerpc iovcnt > 1"); -#endif + KASSERT(uiop->uio_iovcnt == 1, ("nfs: writerpc iovcnt > 1")); *attrflagp = 0; tsiz = uio_uio_resid(uiop); NFSLOCKMNT(nmp); @@ -2508,10 +2505,9 @@ nfsrpc_readdir(vnode_t vp, struct uio *u u_int32_t *tl2 = NULL; size_t tresid; -#ifdef DIAGNOSTIC - if (uiop->uio_iovcnt != 1 || (uio_uio_resid(uiop) & (DIRBLKSIZ - 1))) - panic("nfs readdirrpc bad uio"); -#endif + KASSERT(uiop->uio_iovcnt == 1 && + (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, + ("nfs readdirrpc bad uio")); /* * There is no point in reading a lot more than uio_resid, however @@ -2946,10 +2942,9 @@ nfsrpc_readdirplus(vnode_t vp, struct ui size_t tresid; u_int32_t *tl2 = NULL, fakefileno = 0xffffffff, rderr; -#ifdef DIAGNOSTIC - if (uiop->uio_iovcnt != 1 || (uio_uio_resid(uiop) & (DIRBLKSIZ - 1))) - panic("nfs readdirplusrpc bad uio"); -#endif + KASSERT(uiop->uio_iovcnt == 1 && + (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, + ("nfs readdirplusrpc bad uio")); *attrflagp = 0; if (eofp != NULL) *eofp = 0; Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clsubs.c Sun Jun 27 23:11:35 2010 (r209555) +++ stable/8/sys/fs/nfsclient/nfs_clsubs.c Mon Jun 28 01:16:34 2010 (r209556) @@ -282,10 +282,7 @@ ncl_getcookie(struct nfsnode *np, off_t pos = (uoff_t)off / NFS_DIRBLKSIZ; if (pos == 0 || off < 0) { -#ifdef DIAGNOSTIC - if (add) - panic("nfs getcookie add at <= 0"); -#endif + KASSERT(!add, ("nfs getcookie add at <= 0")); return (&nfs_nullcookie); } pos--; @@ -336,10 +333,7 @@ ncl_invaldir(struct vnode *vp) { struct nfsnode *np = VTONFS(vp); -#ifdef DIAGNOSTIC - if (vp->v_type != VDIR) - panic("nfs: invaldir not dir"); -#endif + KASSERT(vp->v_type == VDIR, ("nfs: invaldir not dir")); ncl_dircookie_lock(np); np->n_direofoffset = 0; np->n_cookieverf.nfsuquad[0] = 0; Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun Jun 27 23:11:35 2010 (r209555) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Mon Jun 28 01:16:34 2010 (r209556) @@ -1564,12 +1564,8 @@ nfs_remove(struct vop_remove_args *ap) int error = 0; struct vattr vattr; -#ifndef DIAGNOSTIC - if ((cnp->cn_flags & HASBUF) == 0) - panic("nfs_remove: no name"); - if (vrefcnt(vp) < 1) - panic("nfs_remove: bad v_usecount"); -#endif + KASSERT((cnp->cn_flags & HASBUF) != 0, ("nfs_remove: no name")); + KASSERT(vrefcnt(vp) > 0, ("nfs_remove: bad v_usecount")); if (vp->v_type == VDIR) error = EPERM; else if (vrefcnt(vp) == 1 || (np->n_sillyrename && @@ -1676,11 +1672,8 @@ nfs_rename(struct vop_rename_args *ap) struct nfsv4node *newv4 = NULL; int error; -#ifndef DIAGNOSTIC - if ((tcnp->cn_flags & HASBUF) == 0 || - (fcnp->cn_flags & HASBUF) == 0) - panic("nfs_rename: no name"); -#endif + KASSERT((tcnp->cn_flags & HASBUF) != 0 && + (fcnp->cn_flags & HASBUF) != 0, ("nfs_rename: no name")); /* Check for cross-device rename */ if ((fvp->v_mount != tdvp->v_mount) || (tvp && (fvp->v_mount != tvp->v_mount))) { @@ -2137,11 +2130,10 @@ ncl_readdirrpc(struct vnode *vp, struct struct nfsmount *nmp = VFSTONFS(vp->v_mount); int error = 0, eof, attrflag; -#ifndef DIAGNOSTIC - if (uiop->uio_iovcnt != 1 || (uiop->uio_offset & (DIRBLKSIZ - 1)) || - (uiop->uio_resid & (DIRBLKSIZ - 1))) - panic("nfs readdirrpc bad uio"); -#endif + KASSERT(uiop->uio_iovcnt == 1 && + (uiop->uio_offset & (DIRBLKSIZ - 1)) == 0 && + (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, + ("nfs readdirrpc bad uio")); /* * If there is no cookie, assume directory was stale. @@ -2198,11 +2190,10 @@ ncl_readdirplusrpc(struct vnode *vp, str struct nfsmount *nmp = VFSTONFS(vp->v_mount); int error = 0, attrflag, eof; -#ifndef DIAGNOSTIC - if (uiop->uio_iovcnt != 1 || (uiop->uio_offset & (DIRBLKSIZ - 1)) || - (uiop->uio_resid & (DIRBLKSIZ - 1))) - panic("nfs readdirplusrpc bad uio"); -#endif + KASSERT(uiop->uio_iovcnt == 1 && + (uiop->uio_offset & (DIRBLKSIZ - 1)) == 0 && + (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, + ("nfs readdirplusrpc bad uio")); /* * If there is no cookie, assume directory was stale. @@ -2264,10 +2255,7 @@ nfs_sillyrename(struct vnode *dvp, struc cache_purge(dvp); np = VTONFS(vp); -#ifndef DIAGNOSTIC - if (vp->v_type == VDIR) - panic("nfs: sillyrename dir"); -#endif + KASSERT(vp->v_type != VDIR, ("nfs: sillyrename dir")); MALLOC(sp, struct sillyrename *, sizeof (struct sillyrename), M_NEWNFSREQ, M_WAITOK); sp->s_cred = crhold(cnp->cn_cred); Modified: stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c Sun Jun 27 23:11:35 2010 (r209555) +++ stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c Mon Jun 28 01:16:34 2010 (r209556) @@ -364,10 +364,7 @@ nfsrvd_dorpc(struct nfsrv_descript *nd, * Get a locked vnode for the first file handle */ if (!(nd->nd_flag & ND_NFSV4)) { -#ifdef DIAGNOSTIC - if (nd->nd_repstat) - panic("nfsrvd_dorpc"); -#endif + KASSERT(nd->nd_repstat == 0, ("nfsrvd_dorpc")); /* * For NFSv3, if the malloc/mget allocation is near limits, * return NFSERR_DELAY. Modified: stable/8/sys/nfsclient/nfs_bio.c ============================================================================== --- stable/8/sys/nfsclient/nfs_bio.c Sun Jun 27 23:11:35 2010 (r209555) +++ stable/8/sys/nfsclient/nfs_bio.c Mon Jun 28 01:16:34 2010 (r209556) @@ -448,10 +448,7 @@ nfs_bioread(struct vnode *vp, struct uio int seqcount; int nra, error = 0, n = 0, on = 0; -#ifdef DIAGNOSTIC - if (uio->uio_rw != UIO_READ) - panic("nfs_read mode"); -#endif + KASSERT(uio->uio_rw == UIO_READ, ("nfs_read mode")); if (uio->uio_resid == 0) return (0); if (uio->uio_offset < 0) /* XXX VDIR cookies can be negative */ @@ -871,12 +868,9 @@ nfs_write(struct vop_write_args *ap) int n, on, error = 0; struct proc *p = td?td->td_proc:NULL; -#ifdef DIAGNOSTIC - if (uio->uio_rw != UIO_WRITE) - panic("nfs_write mode"); - if (uio->uio_segflg == UIO_USERSPACE && uio->uio_td != curthread) - panic("nfs_write proc"); -#endif + KASSERT(uio->uio_rw == UIO_WRITE, ("nfs_write mode")); + KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, + ("nfs_write proc")); if (vp->v_type != VREG) return (EIO); mtx_lock(&np->n_mtx); Modified: stable/8/sys/nfsclient/nfs_subs.c ============================================================================== --- stable/8/sys/nfsclient/nfs_subs.c Sun Jun 27 23:11:35 2010 (r209555) +++ stable/8/sys/nfsclient/nfs_subs.c Mon Jun 28 01:16:34 2010 (r209556) @@ -199,10 +199,7 @@ nfsm_uiotombuf(struct uio *uiop, struct int uiosiz, clflg, rem; char *cp; -#ifdef DIAGNOSTIC - if (uiop->uio_iovcnt != 1) - panic("nfsm_uiotombuf: iovcnt != 1"); -#endif + KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); if (siz > MLEN) /* or should it >= MCLBYTES ?? */ clflg = 1; @@ -789,10 +786,7 @@ nfs_getcookie(struct nfsnode *np, off_t pos = (uoff_t)off / NFS_DIRBLKSIZ; if (pos == 0 || off < 0) { -#ifdef DIAGNOSTIC - if (add) - panic("nfs getcookie add at <= 0"); -#endif + KASSERT(!add, ("nfs getcookie add at <= 0")); return (&nfs_nullcookie); } pos--; @@ -843,10 +837,7 @@ nfs_invaldir(struct vnode *vp) { struct nfsnode *np = VTONFS(vp); -#ifdef DIAGNOSTIC - if (vp->v_type != VDIR) - panic("nfs: invaldir not dir"); -#endif + KASSERT(vp->v_type == VDIR, ("nfs: invaldir not dir")); nfs_dircookie_lock(np); np->n_direofoffset = 0; np->n_cookieverf.nfsuquad[0] = 0; Modified: stable/8/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/8/sys/nfsclient/nfs_vnops.c Sun Jun 27 23:11:35 2010 (r209555) +++ stable/8/sys/nfsclient/nfs_vnops.c Mon Jun 28 01:16:34 2010 (r209556) @@ -1348,10 +1348,7 @@ nfs_writerpc(struct vnode *vp, struct ui int v3 = NFS_ISV3(vp), committed = NFSV3WRITE_FILESYNC; int wsize; -#ifndef DIAGNOSTIC - if (uiop->uio_iovcnt != 1) - panic("nfs: writerpc iovcnt > 1"); -#endif + KASSERT(uiop->uio_iovcnt == 1, ("nfs: writerpc iovcnt > 1")); *must_commit = 0; tsiz = uiop->uio_resid; mtx_lock(&nmp->nm_mtx); @@ -1708,12 +1705,8 @@ nfs_remove(struct vop_remove_args *ap) int error = 0; struct vattr vattr; -#ifndef DIAGNOSTIC - if ((cnp->cn_flags & HASBUF) == 0) - panic("nfs_remove: no name"); - if (vrefcnt(vp) < 1) - panic("nfs_remove: bad v_usecount"); -#endif + KASSERT((cnp->cn_flags & HASBUF) != 0, ("nfs_remove: no name")); + KASSERT(vrefcnt(vp) > 0, ("nfs_remove: bad v_usecount")); if (vp->v_type == VDIR) error = EPERM; else if (vrefcnt(vp) == 1 || (np->n_sillyrename && @@ -1814,11 +1807,8 @@ nfs_rename(struct vop_rename_args *ap) struct componentname *fcnp = ap->a_fcnp; int error; -#ifndef DIAGNOSTIC - if ((tcnp->cn_flags & HASBUF) == 0 || - (fcnp->cn_flags & HASBUF) == 0) - panic("nfs_rename: no name"); -#endif + KASSERT((tcnp->cn_flags & HASBUF) != 0 && + (fcnp->cn_flags & HASBUF) != 0, ("nfs_rename: no name")); /* Check for cross-device rename */ if ((fvp->v_mount != tdvp->v_mount) || (tvp && (fvp->v_mount != tvp->v_mount))) { @@ -2277,11 +2267,10 @@ nfs_readdirrpc(struct vnode *vp, struct int attrflag; int v3 = NFS_ISV3(vp); -#ifndef DIAGNOSTIC - if (uiop->uio_iovcnt != 1 || (uiop->uio_offset & (DIRBLKSIZ - 1)) || - (uiop->uio_resid & (DIRBLKSIZ - 1))) - panic("nfs readdirrpc bad uio"); -#endif + KASSERT(uiop->uio_iovcnt == 1 && + (uiop->uio_offset & (DIRBLKSIZ - 1)) == 0 && + (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, + ("nfs readdirrpc bad uio")); /* * If there is no cookie, assume directory was stale. @@ -2482,11 +2471,10 @@ nfs_readdirplusrpc(struct vnode *vp, str #ifndef nolint dp = NULL; #endif -#ifndef DIAGNOSTIC - if (uiop->uio_iovcnt != 1 || (uiop->uio_offset & (DIRBLKSIZ - 1)) || - (uiop->uio_resid & (DIRBLKSIZ - 1))) - panic("nfs readdirplusrpc bad uio"); -#endif + KASSERT(uiop->uio_iovcnt == 1 && + (uiop->uio_offset & (DIRBLKSIZ - 1)) == 0 && + (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, + ("nfs readdirplusrpc bad uio")); ndp->ni_dvp = vp; newvp = NULLVP; @@ -2752,10 +2740,7 @@ nfs_sillyrename(struct vnode *dvp, struc cache_purge(dvp); np = VTONFS(vp); -#ifndef DIAGNOSTIC - if (vp->v_type == VDIR) - panic("nfs: sillyrename dir"); -#endif + KASSERT(vp->v_type != VDIR, ("nfs: sillyrename dir")); sp = malloc(sizeof (struct sillyrename), M_NFSREQ, M_WAITOK); sp->s_cred = crhold(cnp->cn_cred); From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 01:36:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBE34106564A; Mon, 28 Jun 2010 01:36:22 +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 BABF28FC12; Mon, 28 Jun 2010 01:36: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 o5S1aMWd057543; Mon, 28 Jun 2010 01:36:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S1aMUQ057541; Mon, 28 Jun 2010 01:36:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201006280136.o5S1aMUQ057541@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 28 Jun 2010 01:36:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209557 - stable/8/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 01:36:22 -0000 Author: kib Date: Mon Jun 28 01:36:22 2010 New Revision: 209557 URL: http://svn.freebsd.org/changeset/base/209557 Log: MFC r209367: Ensure that VOP_ACCESSX is called with exclusively locked vnode for the kernel compiled with QUOTA option. Modified: stable/8/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_lookup.c Mon Jun 28 01:16:34 2010 (r209556) +++ stable/8/sys/ufs/ufs/ufs_lookup.c Mon Jun 28 01:36:22 2010 (r209557) @@ -80,6 +80,32 @@ SYSCTL_INT(_debug, OID_AUTO, dircheck, C static int ufs_lookup_(struct vnode *, struct vnode **, struct componentname *, ino_t *); +#ifdef QUOTA +static int +ufs_lookup_upgrade_lock(struct vnode *vp) +{ + int error; + + ASSERT_VOP_LOCKED(vp, __FUNCTION__); + if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) + return (0); + + error = 0; + + /* + * Upgrade vnode lock, since getinoquota() + * requires exclusive lock to modify inode. + */ + vhold(vp); + vn_lock(vp, LK_UPGRADE | LK_RETRY); + VI_LOCK(vp); + if (vp->v_iflag & VI_DOOMED) + error = ENOENT; + vdropl(vp); + return (error); +} +#endif + static int ufs_delete_denied(struct vnode *vdp, struct vnode *tdp, struct ucred *cred, struct thread *td) @@ -235,6 +261,13 @@ ufs_lookup_(struct vnode *vdp, struct vn vnode_create_vobject(vdp, DIP(dp, i_size), cnp->cn_thread); bmask = VFSTOUFS(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; +#ifdef QUOTA + if ((nameiop == DELETE || nameiop == RENAME) && (flags & ISLASTCN)) { + error = ufs_lookup_upgrade_lock(vdp); + if (error != 0) + return (error); + } +#endif restart: bp = NULL; From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 01:40:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE4BF106564A; Mon, 28 Jun 2010 01:40:56 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDAAE8FC0A; Mon, 28 Jun 2010 01:40:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5S1euTh058563; Mon, 28 Jun 2010 01:40:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S1euB9058561; Mon, 28 Jun 2010 01:40:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201006280140.o5S1euB9058561@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 28 Jun 2010 01:40:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209558 - head/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 01:40:57 -0000 Author: nwhitehorn Date: Mon Jun 28 01:40:56 2010 New Revision: 209558 URL: http://svn.freebsd.org/changeset/base/209558 Log: Revert r209544. It papers over a binutils bug, and is not even a reliable fix for it. The bug occurs when using the --as-needed flag to ld in the presence of synthetic linker-generated symbols that reference symbols defined in linked-to shared libraries with versioned symbols. When the only symbols used from a library fall into this category, ld will drop the DT_NEEDED entry for it, but retain the versioning information. This bug is best fixed/hacked around in binutils, not in rtld. Discussed with: kan Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Jun 28 01:36:22 2010 (r209557) +++ head/libexec/rtld-elf/rtld.c Mon Jun 28 01:40:56 2010 (r209558) @@ -3443,13 +3443,9 @@ locate_dependency(const Obj_Entry *obj, if (object_match_name(needed->obj, name)) return needed->obj; } - - /* - * GNU LD sometimes refers to version dependencies on objects to which - * it does not actually link. Treat this as a non-fatal error, and - * ignore this dependency. - */ - return NULL; + _rtld_error("%s: Unexpected inconsistency: dependency %s not found", + obj->path, name); + die(); } static int @@ -3571,9 +3567,6 @@ rtld_verify_object_versions(Obj_Entry *o vn = obj->verneed; while (vn != NULL) { depobj = locate_dependency(obj, obj->strtab + vn->vn_file); - if (depobj == NULL) - break; - vna = (const Elf_Vernaux *) ((char *)vn + vn->vn_aux); for (;;) { if (check_object_provided_version(obj, depobj, vna)) From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 04:54:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1080106566B; Mon, 28 Jun 2010 04:54:16 +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 DFE948FC19; Mon, 28 Jun 2010 04:54: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 o5S4sGun001272; Mon, 28 Jun 2010 04:54:16 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S4sGtG001270; Mon, 28 Jun 2010 04:54:16 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201006280454.o5S4sGtG001270@svn.freebsd.org> From: Brian Somers Date: Mon, 28 Jun 2010 04:54: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: r209560 - stable/8/sys/dev/agp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 04:54:17 -0000 Author: brian Date: Mon Jun 28 04:54:16 2010 New Revision: 209560 URL: http://svn.freebsd.org/changeset/base/209560 Log: MFC r209329; add a missing linefeed PR: 147337 Submitted by: cyberleo at cyberleo dot net Modified: stable/8/sys/dev/agp/agp_nvidia.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/agp/agp_nvidia.c ============================================================================== --- stable/8/sys/dev/agp/agp_nvidia.c Mon Jun 28 01:46:26 2010 (r209559) +++ stable/8/sys/dev/agp/agp_nvidia.c Mon Jun 28 04:54:16 2010 (r209560) @@ -282,7 +282,7 @@ agp_nvidia_get_aperture(device_t dev) case 14: return (64 * 1024 * 1024); break; case 15: return (32 * 1024 * 1024); break; default: - device_printf(dev, "Invalid aperture setting 0x%x", + device_printf(dev, "Invalid aperture setting 0x%x\n", pci_read_config(dev, AGP_NVIDIA_0_APSIZE, 1)); return 0; } From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 06:59:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77C90106566C; Mon, 28 Jun 2010 06:59:57 +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 64D528FC1A; Mon, 28 Jun 2010 06:59: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 o5S6xvjp028792; Mon, 28 Jun 2010 06:59:57 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S6xvtk028788; Mon, 28 Jun 2010 06:59:57 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201006280659.o5S6xvtk028788@svn.freebsd.org> From: Brian Somers Date: Mon, 28 Jun 2010 06:59: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: r209561 - in stable/8: etc tools/regression/lib/msun tools/regression/usr.bin/pkill tools/tools/ath/common tools/tools/termcap tools/tools/tinybsd/conf/default tools/tools/tinybsd/conf/vpn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 06:59:57 -0000 Author: brian Date: Mon Jun 28 06:59:57 2010 New Revision: 209561 URL: http://svn.freebsd.org/changeset/base/209561 Log: MFC r209331 at stable/8/etc and stable/8/tools; Remove vestiges of 'slip'. PR: 145648 Submitted by: alexbestms at wwu dot de and spam at rm-rf dot kiev dot ua Modified: stable/8/etc/login.conf stable/8/tools/tools/tinybsd/conf/default/TINYBSD stable/8/tools/tools/tinybsd/conf/vpn/TINYBSD Directory Properties: stable/8/etc/ (props changed) stable/8/tools/ (props changed) stable/8/tools/build/mk/ (props changed) stable/8/tools/build/options/ (props changed) stable/8/tools/kerneldoc/subsys/ (props changed) stable/8/tools/regression/acltools/ (props changed) stable/8/tools/regression/aio/aiotest/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) stable/8/tools/regression/fifo/ (props changed) stable/8/tools/regression/geom/ (props changed) stable/8/tools/regression/lib/libc/ (props changed) stable/8/tools/regression/lib/msun/test-conj.t (props changed) stable/8/tools/regression/mqueue/mqtest1/ (props changed) stable/8/tools/regression/mqueue/mqtest2/ (props changed) stable/8/tools/regression/mqueue/mqtest3/ (props changed) stable/8/tools/regression/mqueue/mqtest4/ (props changed) stable/8/tools/regression/mqueue/mqtest5/ (props changed) stable/8/tools/regression/poll/ (props changed) stable/8/tools/regression/posixsem/ (props changed) stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) stable/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/tools/test/ (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) stable/8/tools/tools/nanobsd/ (props changed) stable/8/tools/tools/netrate/tcpp/ (props changed) stable/8/tools/tools/termcap/termcap.pl (props changed) stable/8/tools/tools/vimage/ (props changed) Modified: stable/8/etc/login.conf ============================================================================== --- stable/8/etc/login.conf Mon Jun 28 04:54:16 2010 (r209560) +++ stable/8/etc/login.conf Mon Jun 28 06:59:57 2010 (r209561) @@ -228,7 +228,7 @@ russian|Russian Users Accounts:\ # # ## -## The dialer class should be used for a dialup PPP/SLIP accounts +## The dialer class should be used for a dialup PPP account ## Welcome messages/news suppressed ## #dialer:\ @@ -247,7 +247,7 @@ russian|Russian Users Accounts:\ # # ## -## Site full-time 24/7 PPP/SLIP connections +## Site full-time 24/7 PPP connection ## - no time accounting, restricted to access via dialin lines ## #site:\ @@ -306,11 +306,6 @@ russian|Russian Users Accounts:\ # :tc=subscriber: # # -#subslip|SLIP Subscriber Accounts:\ -# :tc=dialer:\ -# :tc=subscriber: -# -# #subshell|Shell Subscriber Accounts:\ # :tc=subscriber: # Modified: stable/8/tools/tools/tinybsd/conf/default/TINYBSD ============================================================================== --- stable/8/tools/tools/tinybsd/conf/default/TINYBSD Mon Jun 28 04:54:16 2010 (r209560) +++ stable/8/tools/tools/tinybsd/conf/default/TINYBSD Mon Jun 28 06:59:57 2010 (r209561) @@ -143,7 +143,6 @@ device wi # WaveLAN/Intersil/Symbol 80 device loop # Network loopback device random # Entropy device device ether # Ethernet support -#device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) Modified: stable/8/tools/tools/tinybsd/conf/vpn/TINYBSD ============================================================================== --- stable/8/tools/tools/tinybsd/conf/vpn/TINYBSD Mon Jun 28 04:54:16 2010 (r209560) +++ stable/8/tools/tools/tinybsd/conf/vpn/TINYBSD Mon Jun 28 06:59:57 2010 (r209561) @@ -133,7 +133,6 @@ device xe # Xircom pccard Ethernet device loop # Network loopback device random # Entropy device device ether # Ethernet support -#device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 07:03:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D04C1065673; Mon, 28 Jun 2010 07:03:18 +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 7C44E8FC1A; Mon, 28 Jun 2010 07:03: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 o5S73IM0029614; Mon, 28 Jun 2010 07:03:18 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S73I28029612; Mon, 28 Jun 2010 07:03:18 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201006280703.o5S73I28029612@svn.freebsd.org> From: Brian Somers Date: Mon, 28 Jun 2010 07:03:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209562 - in stable/8/release: picobsd/floppy.tree/sbin 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: Mon, 28 Jun 2010 07:03:18 -0000 Author: brian Date: Mon Jun 28 07:03:18 2010 New Revision: 209562 URL: http://svn.freebsd.org/changeset/base/209562 Log: MFC r209332: Shoot a stray cat! PR: 145447 Submitted by: u at netbeisser dot de Modified: stable/8/release/scripts/ports-install.sh Directory Properties: stable/8/release/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) Modified: stable/8/release/scripts/ports-install.sh ============================================================================== --- stable/8/release/scripts/ports-install.sh Mon Jun 28 06:59:57 2010 (r209561) +++ stable/8/release/scripts/ports-install.sh Mon Jun 28 07:03:18 2010 (r209562) @@ -8,5 +8,5 @@ if [ "`id -u`" != "0" ]; then exit 1 fi echo "Extracting ports tarball into ${DESTDIR}/usr" -cat ports.tgz | tar --unlink -xpzf - -C ${DESTDIR}/usr +tar --unlink -xpzf ports.tgz -C ${DESTDIR}/usr exit 0 From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 07:15:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0F3A106566C; Mon, 28 Jun 2010 07:15:30 +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 E08578FC14; Mon, 28 Jun 2010 07:15:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5S7FU41032347; Mon, 28 Jun 2010 07:15:30 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S7FUrJ032345; Mon, 28 Jun 2010 07:15:30 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201006280715.o5S7FUrJ032345@svn.freebsd.org> From: Brian Somers Date: Mon, 28 Jun 2010 07:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209563 - stable/8/sys/boot/ficl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 07:15:31 -0000 Author: brian Date: Mon Jun 28 07:15:30 2010 New Revision: 209563 URL: http://svn.freebsd.org/changeset/base/209563 Log: MFC r209361; Add a missing prototype PR: 145232 Submitted by: gcooper Modified: stable/8/sys/boot/ficl/ficl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/ficl/ficl.h ============================================================================== --- stable/8/sys/boot/ficl/ficl.h Mon Jun 28 07:03:18 2010 (r209562) +++ stable/8/sys/boot/ficl/ficl.h Mon Jun 28 07:15:30 2010 (r209563) @@ -757,6 +757,7 @@ void dictAppendUNS (FICL_DICT *p int dictCellsAvail (FICL_DICT *pDict); int dictCellsUsed (FICL_DICT *pDict); void dictCheck (FICL_DICT *pDict, FICL_VM *pVM, int n); +void dictCheckThreshold(FICL_DICT* dp); FICL_DICT *dictCreate(unsigned nCELLS); FICL_DICT *dictCreateHashed(unsigned nCells, unsigned nHash); FICL_HASH *dictCreateWordlist(FICL_DICT *dp, int nBuckets); From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 08:05:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B57FB1065670; Mon, 28 Jun 2010 08:05:30 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A60C68FC22; Mon, 28 Jun 2010 08:05: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 o5S85UeK043420; Mon, 28 Jun 2010 08:05:30 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S85U62043418; Mon, 28 Jun 2010 08:05:30 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201006280805.o5S85U62043418@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 28 Jun 2010 08:05: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: r209564 - head/etc/mtree X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 08:05:30 -0000 Author: pjd Date: Mon Jun 28 08:05:30 2010 New Revision: 209564 URL: http://svn.freebsd.org/changeset/base/209564 Log: Use spaces, not tabs. Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Mon Jun 28 07:15:30 2010 (r209563) +++ head/etc/mtree/BSD.usr.dist Mon Jun 28 08:05:30 2010 (r209564) @@ -1231,15 +1231,15 @@ pc-sysinstall backend .. - backend-partmanager + backend-partmanager .. - backend-query + backend-query .. - conf + conf license - .. + .. .. - doc + doc .. .. security From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 08:09:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3979C106566B; Mon, 28 Jun 2010 08:09:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 28F508FC0C; Mon, 28 Jun 2010 08:09:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5S89YGU044349; Mon, 28 Jun 2010 08:09:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S89YGI044347; Mon, 28 Jun 2010 08:09:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201006280809.o5S89YGI044347@svn.freebsd.org> From: Alexander Motin Date: Mon, 28 Jun 2010 08:09: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: r209565 - 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: Mon, 28 Jun 2010 08:09:34 -0000 Author: mav Date: Mon Jun 28 08:09:33 2010 New Revision: 209565 URL: http://svn.freebsd.org/changeset/base/209565 Log: MFC r204918 (jkim): Document a new sysctl variable and a loader tunable. Modified: stable/8/share/man/man4/acpi.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/acpi.4 ============================================================================== --- stable/8/share/man/man4/acpi.4 Mon Jun 28 08:05:30 2010 (r209564) +++ stable/8/share/man/man4/acpi.4 Mon Jun 28 08:09:33 2010 (r209565) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2009 +.Dd March 9, 2010 .Dt ACPI 4 .Os .Sh NAME @@ -62,6 +62,10 @@ used to modify or monitor .Nm behavior. .Bl -tag -width indent +.It Va debug.acpi.enable_debug_objects +Enable dumping Debug objects without +.Cd "options ACPI_DEBUG" . +Default is 0, ignore Debug objects. .It Va hw.acpi.acline AC line state (1 means online, 0 means on battery power). .It Va hw.acpi.cpu.cx_usage @@ -197,6 +201,9 @@ Enables loading of a custom ACPI DSDT. Name of the DSDT table to load, if loading is enabled. .It Va debug.acpi.disabled Selectively disables portions of ACPI for debugging purposes. +.It Va debug.acpi.interpreter_slack +Enable less strict ACPI implementations. +Default is 1, ignore common BIOS mistakes. .It Va debug.acpi.max_threads Specify the number of task threads that are started on boot. Limiting this to 1 may help work around various BIOSes that cannot From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 08:10:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03A31106564A; Mon, 28 Jun 2010 08:10:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E77CD8FC0A; Mon, 28 Jun 2010 08:10:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5S8AtJw044695; Mon, 28 Jun 2010 08:10:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S8AtZJ044693; Mon, 28 Jun 2010 08:10:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201006280810.o5S8AtZJ044693@svn.freebsd.org> From: Alexander Motin Date: Mon, 28 Jun 2010 08:10: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: r209566 - 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: Mon, 28 Jun 2010 08:10:56 -0000 Author: mav Date: Mon Jun 28 08:10:55 2010 New Revision: 209566 URL: http://svn.freebsd.org/changeset/base/209566 Log: MFC r208729: Recommend disabling LAPIC timer instead whole APIC for fixing C3 state. PR: docs/147180 Submitted by: Tobias Rehbein Modified: stable/8/share/man/man4/acpi.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/acpi.4 ============================================================================== --- stable/8/share/man/man4/acpi.4 Mon Jun 28 08:09:33 2010 (r209565) +++ stable/8/share/man/man4/acpi.4 Mon Jun 28 08:10:55 2010 (r209566) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 9, 2010 +.Dd June 2, 2010 .Dt ACPI 4 .Os .Sh NAME @@ -599,10 +599,8 @@ The .Nm CPU idle power management drive conflicts with the local APIC (LAPIC) timer. -Disable APIC mode with -.Va hint.apic.0.disabled +Disable the local APIC timer with +.Va hint.apic.0.clock=0 or do not use the -.Li C2 -and .Li C3 -states if APIC mode is enabled. +and deeper states if the local APIC timer is enabled. From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 08:30:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05D2A106566B; Mon, 28 Jun 2010 08:30:11 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA2918FC19; Mon, 28 Jun 2010 08: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 o5S8UAkU048908; Mon, 28 Jun 2010 08:30:10 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S8UA3o048905; Mon, 28 Jun 2010 08:30:10 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201006280830.o5S8UA3o048905@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 28 Jun 2010 08: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: r209567 - head/usr.bin/lock X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 08:30:11 -0000 Author: gavin Date: Mon Jun 28 08:30:10 2010 New Revision: 209567 URL: http://svn.freebsd.org/changeset/base/209567 Log: Make WARNS=6 safe. Tested by: make universe Modified: head/usr.bin/lock/Makefile head/usr.bin/lock/lock.c Modified: head/usr.bin/lock/Makefile ============================================================================== --- head/usr.bin/lock/Makefile Mon Jun 28 08:10:55 2010 (r209566) +++ head/usr.bin/lock/Makefile Mon Jun 28 08:30:10 2010 (r209567) @@ -7,6 +7,4 @@ BINMODE=4555 DPADD= ${LIBCRYPT} LDADD= -lcrypt -WARNS?= 1 - .include Modified: head/usr.bin/lock/lock.c ============================================================================== --- head/usr.bin/lock/lock.c Mon Jun 28 08:10:55 2010 (r209566) +++ head/usr.bin/lock/lock.c Mon Jun 28 08:30:10 2010 (r209567) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -257,9 +258,9 @@ hi(int signo __unused) if (no_timeout) { (void)putchar('\n'); } else { - (void)printf("timeout in %ld:%ld minutes\n", - (nexttime - timval.tv_sec) / 60, - (nexttime - timval.tv_sec) % 60); + (void)printf("timeout in %jd:%jd minutes\n", + (intmax_t)(nexttime - timval.tv_sec) / 60, + (intmax_t)(nexttime - timval.tv_sec) % 60); } } } From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 10:50:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5FC31065677; Mon, 28 Jun 2010 10:50:14 +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 C43168FC17; Mon, 28 Jun 2010 10:50: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 o5SAoEoj081237; Mon, 28 Jun 2010 10:50:14 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SAoEq6081235; Mon, 28 Jun 2010 10:50:14 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201006281050.o5SAoEq6081235@svn.freebsd.org> From: Michael Tuexen Date: Mon, 28 Jun 2010 10:50: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: r209568 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 10:50:15 -0000 Author: tuexen Date: Mon Jun 28 10:50:14 2010 New Revision: 209568 URL: http://svn.freebsd.org/changeset/base/209568 Log: MFC r209470,r209499 * Implement sctp_does_stcb_own_this_addr() correclty. It was taking the wrong side into account. * sctp_findassociation_ep_addr() must check the local address if available. This fixes a bug where ABORT chunks were accepted even in the case where the local was not owned by the endpoint. Thanks to brucec for pointing out a bug in my first version of the fix. Modified: stable/8/sys/netinet/sctp_pcb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Mon Jun 28 08:30:10 2010 (r209567) +++ stable/8/sys/netinet/sctp_pcb.c Mon Jun 28 10:50:14 2010 (r209568) @@ -1010,6 +1010,149 @@ sctp_tcb_special_locate(struct sctp_inpc return (NULL); } +static int +sctp_does_stcb_own_this_addr(struct sctp_tcb *stcb, struct sockaddr *to) +{ + int loopback_scope, ipv4_local_scope, local_scope, site_scope; + int ipv4_addr_legal, ipv6_addr_legal; + struct sctp_vrf *vrf; + struct sctp_ifn *sctp_ifn; + struct sctp_ifa *sctp_ifa; + + loopback_scope = stcb->asoc.loopback_scope; + ipv4_local_scope = stcb->asoc.ipv4_local_scope; + local_scope = stcb->asoc.local_scope; + site_scope = stcb->asoc.site_scope; + ipv4_addr_legal = ipv6_addr_legal = 0; + if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { + ipv6_addr_legal = 1; + if (SCTP_IPV6_V6ONLY(stcb->sctp_ep) == 0) { + ipv4_addr_legal = 1; + } + } else { + ipv4_addr_legal = 1; + } + + SCTP_IPI_ADDR_RLOCK(); + vrf = sctp_find_vrf(stcb->asoc.vrf_id); + if (vrf == NULL) { + /* no vrf, no addresses */ + SCTP_IPI_ADDR_RUNLOCK(); + return (0); + } + if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) { + LIST_FOREACH(sctp_ifn, &vrf->ifnlist, next_ifn) { + if ((loopback_scope == 0) && + SCTP_IFN_IS_IFT_LOOP(sctp_ifn)) { + continue; + } + LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) { + if (sctp_is_addr_restricted(stcb, sctp_ifa)) + continue; + switch (sctp_ifa->address.sa.sa_family) { +#ifdef INET + case AF_INET: + if (ipv4_addr_legal) { + struct sockaddr_in *sin, + *rsin; + + sin = &sctp_ifa->address.sin; + rsin = (struct sockaddr_in *)to; + if ((ipv4_local_scope == 0) && + IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) { + continue; + } + if (sin->sin_addr.s_addr == rsin->sin_addr.s_addr) { + SCTP_IPI_ADDR_RUNLOCK(); + return (1); + } + } + break; +#endif +#ifdef INET6 + case AF_INET6: + if (ipv6_addr_legal) { + struct sockaddr_in6 *sin6, + *rsin6; + + sin6 = &sctp_ifa->address.sin6; + rsin6 = (struct sockaddr_in6 *)to; + if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { + if (local_scope == 0) + continue; + if (sin6->sin6_scope_id == 0) { + if (sa6_recoverscope(sin6) != 0) + continue; + } + } + if ((site_scope == 0) && + (IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr))) { + continue; + } + if (SCTP6_ARE_ADDR_EQUAL(sin6, rsin6)) { + SCTP_IPI_ADDR_RUNLOCK(); + return (1); + } + } + break; +#endif + default: + /* TSNH */ + break; + } + } + } + } else { + struct sctp_laddr *laddr; + + LIST_FOREACH(laddr, &stcb->sctp_ep->sctp_addr_list, sctp_nxt_addr) { + if (sctp_is_addr_restricted(stcb, laddr->ifa)) { + continue; + } + if (laddr->ifa->address.sa.sa_family != to->sa_family) { + continue; + } + switch (to->sa_family) { +#ifdef INET + case AF_INET: + { + struct sockaddr_in *sin, *rsin; + + sin = (struct sockaddr_in *)&laddr->ifa->address.sin; + rsin = (struct sockaddr_in *)to; + if (sin->sin_addr.s_addr == rsin->sin_addr.s_addr) { + SCTP_IPI_ADDR_RUNLOCK(); + return (1); + } + break; + } +#endif +#ifdef INET6 + case AF_INET6: + { + struct sockaddr_in6 *sin6, *rsin6; + + sin6 = (struct sockaddr_in6 *)&laddr->ifa->address.sin6; + rsin6 = (struct sockaddr_in6 *)to; + if (SCTP6_ARE_ADDR_EQUAL(sin6, rsin6)) { + SCTP_IPI_ADDR_RUNLOCK(); + return (1); + } + break; + } + +#endif + default: + /* TSNH */ + break; + } + + } + } + SCTP_IPI_ADDR_RUNLOCK(); + return (0); +} + /* * rules for use * @@ -1090,6 +1233,10 @@ sctp_findassociation_ep_addr(struct sctp SCTP_TCB_UNLOCK(stcb); goto null_return; } + if (local && !sctp_does_stcb_own_this_addr(stcb, local)) { + SCTP_TCB_UNLOCK(stcb); + goto null_return; + } /* now look at the list of remote addresses */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { #ifdef INVARIANTS @@ -1187,6 +1334,10 @@ sctp_findassociation_ep_addr(struct sctp SCTP_TCB_UNLOCK(stcb); continue; } + if (local && !sctp_does_stcb_own_this_addr(stcb, local)) { + SCTP_TCB_UNLOCK(stcb); + continue; + } /* now look at the list of remote addresses */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { #ifdef INVARIANTS @@ -1800,63 +1951,6 @@ sctp_findassociation_special_addr(struct return (NULL); } -static int -sctp_does_stcb_own_this_addr(struct sctp_tcb *stcb, struct sockaddr *to) -{ - struct sctp_nets *net; - - /* - * Simple question, the ports match, does the tcb own the to - * address? - */ - if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL)) { - /* of course */ - return (1); - } - /* have to look at all bound addresses */ - TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { - if (net->ro._l_addr.sa.sa_family != to->sa_family) { - /* not the same family, can't be a match */ - continue; - } - switch (to->sa_family) { - case AF_INET: - { - struct sockaddr_in *sin, *rsin; - - sin = (struct sockaddr_in *)&net->ro._l_addr; - rsin = (struct sockaddr_in *)to; - if (sin->sin_addr.s_addr == - rsin->sin_addr.s_addr) { - /* found it */ - return (1); - } - break; - } -#ifdef INET6 - case AF_INET6: - { - struct sockaddr_in6 *sin6, *rsin6; - - sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; - rsin6 = (struct sockaddr_in6 *)to; - if (SCTP6_ARE_ADDR_EQUAL(sin6, - rsin6)) { - /* Update the endpoint pointer */ - return (1); - } - break; - } -#endif - default: - /* TSNH */ - break; - } - } - /* Nope, do not have the address ;-( */ - return (0); -} - static struct sctp_tcb * sctp_findassoc_by_vtag(struct sockaddr *from, struct sockaddr *to, uint32_t vtag, struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint16_t rport, From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 11:53:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CD12106564A; Mon, 28 Jun 2010 11:53:23 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B8DB8FC16; Mon, 28 Jun 2010 11:53: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 o5SBrN6P095162; Mon, 28 Jun 2010 11:53:23 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SBrNrh095160; Mon, 28 Jun 2010 11:53:23 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201006281153.o5SBrNrh095160@svn.freebsd.org> From: Rui Paulo Date: Mon, 28 Jun 2010 11:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209569 - stable/8/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 11:53:23 -0000 Author: rpaulo Date: Mon Jun 28 11:53:22 2010 New Revision: 209569 URL: http://svn.freebsd.org/changeset/base/209569 Log: MFC r209541, r209548: Fix the AR_SREV_MERLIN_20_OR_LATER() check. Modified: stable/8/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- stable/8/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Mon Jun 28 10:50:14 2010 (r209568) +++ stable/8/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Mon Jun 28 11:53:22 2010 (r209569) @@ -612,7 +612,7 @@ AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_MERLIN_20) #define AR_SREV_MERLIN_20_OR_LATER(_ah) \ (AR_SREV_MERLIN_20(_ah) || \ - AH_PRIVATE((_ah))->ah_macVersion > AR_XSREV_VERSION_MERLIN) + AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_MERLIN) #define AR_SREV_KITE(_ah) \ (AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_KITE) From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 12:00:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 163941065780; Mon, 28 Jun 2010 12:00:21 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAC7B8FC23; Mon, 28 Jun 2010 12:00: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 o5SC0KIB096757; Mon, 28 Jun 2010 12:00:20 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SC0Ktn096754; Mon, 28 Jun 2010 12:00:20 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201006281200.o5SC0Ktn096754@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 28 Jun 2010 12:00: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: r209570 - head/usr.bin/tcopy X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 12:00:21 -0000 Author: gavin Date: Mon Jun 28 12:00:20 2010 New Revision: 209570 URL: http://svn.freebsd.org/changeset/base/209570 Log: Make WARNS=6 safe, mainly by casting to intmax_t and printing with %ju where needed. Also, fix bad indentation on lines already affected by the above changes. Tested with: make universe Modified: head/usr.bin/tcopy/Makefile head/usr.bin/tcopy/tcopy.c Modified: head/usr.bin/tcopy/Makefile ============================================================================== --- head/usr.bin/tcopy/Makefile Mon Jun 28 11:53:22 2010 (r209569) +++ head/usr.bin/tcopy/Makefile Mon Jun 28 12:00:20 2010 (r209570) @@ -3,6 +3,4 @@ PROG= tcopy -WARNS?= 1 - .include Modified: head/usr.bin/tcopy/tcopy.c ============================================================================== --- head/usr.bin/tcopy/tcopy.c Mon Jun 28 11:53:22 2010 (r209569) +++ head/usr.bin/tcopy/tcopy.c Mon Jun 28 12:00:20 2010 (r209570) @@ -87,6 +87,7 @@ main(int argc, char *argv[]) msg = stdout; guesslen = 1; + outp = -1; while ((ch = getopt(argc, argv, "cs:vx")) != -1) switch((char)ch) { case 'c': @@ -157,16 +158,16 @@ main(int argc, char *argv[]) if (nread >= 0) goto r1; } - err(1, "read error, file %d, record %qu", filen, record); + err(1, "read error, file %d, record %ju", filen, (intmax_t)record); } else if (nread != lastnread) { if (lastnread != 0 && lastnread != NOCOUNT) { if (lastrec == 0 && nread == 0) - fprintf(msg, "%qu records\n", record); + fprintf(msg, "%ju records\n", (intmax_t)record); else if (record - lastrec > 1) - fprintf(msg, "records %qu to %qu\n", - lastrec, record); + fprintf(msg, "records %ju to %ju\n", + (intmax_t)lastrec, (intmax_t)record); else - fprintf(msg, "record %qu\n", lastrec); + fprintf(msg, "record %ju\n", (intmax_t)lastrec); } if (nread != 0) fprintf(msg, "file %d: block size %d: ", @@ -184,10 +185,12 @@ r1: guesslen = 0; nw = write(outp, buff, nread); if (nw != nread) { if (nw == -1) { - warn("write error, file %d, record %qu", filen, record); + warn("write error, file %d, record %ju", filen, + (intmax_t)record); } else { - warnx("write error, file %d, record %qu", filen, record); - warnx("write (%d) != read (%d)", nw, nread); + warnx("write error, file %d, record %ju", filen, + (intmax_t)record); + warnx("write (%d) != read (%d)", nw, nread); } errx(5, "copy aborted"); } @@ -200,8 +203,8 @@ r1: guesslen = 0; break; } fprintf(msg, - "file %d: eof after %qu records: %qu bytes\n", - filen, record, size); + "file %d: eof after %ju records: %ju bytes\n", + filen, (intmax_t)record, (intmax_t)size); needeof = 1; filen++; tsize += size; @@ -210,7 +213,7 @@ r1: guesslen = 0; } lastnread = nread; } - fprintf(msg, "total length: %qu bytes\n", tsize); + fprintf(msg, "total length: %ju bytes\n", (intmax_t)tsize); (void)signal(SIGINT, oldsig); if (op == COPY || op == COPYVERIFY) { writeop(outp, MTWEOF); @@ -281,11 +284,11 @@ intr(int signo __unused) { if (record) { if (record - lastrec > 1) - fprintf(msg, "records %qu to %qu\n", lastrec, record); + fprintf(msg, "records %ju to %ju\n", (intmax_t)lastrec, (intmax_t)record); else - fprintf(msg, "record %qu\n", lastrec); + fprintf(msg, "record %ju\n", (intmax_t)lastrec); } - fprintf(msg, "interrupt at file %d: record %qu\n", filen, record); + fprintf(msg, "interrupt at file %d: record %ju\n", filen, (intmax_t)record); fprintf(msg, "total length: %ju bytes\n", (uintmax_t)(tsize + size)); exit(1); } From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 12:04:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51E6F106568C; Mon, 28 Jun 2010 12:04:56 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27D728FC15; Mon, 28 Jun 2010 12:04:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5SC4uoi097851; Mon, 28 Jun 2010 12:04:56 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SC4ulS097848; Mon, 28 Jun 2010 12:04:56 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201006281204.o5SC4ulS097848@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 28 Jun 2010 12:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209571 - in head/usr.bin/locate: bigram code X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 12:04:56 -0000 Author: gavin Date: Mon Jun 28 12:04:55 2010 New Revision: 209571 URL: http://svn.freebsd.org/changeset/base/209571 Log: Various changes to make locate compilable with WARNS=6. Note that there is still one issue on FreeBSD/arm (signed vs unsigned char) which prevents actually bumping this to WARNS=6 - I'm still considering the correct solution to this issue. Tested by: make universe Modified: head/usr.bin/locate/bigram/locate.bigram.c head/usr.bin/locate/code/locate.code.c Modified: head/usr.bin/locate/bigram/locate.bigram.c ============================================================================== --- head/usr.bin/locate/bigram/locate.bigram.c Mon Jun 28 12:00:20 2010 (r209570) +++ head/usr.bin/locate/bigram/locate.bigram.c Mon Jun 28 12:04:55 2010 (r209571) @@ -37,6 +37,7 @@ * $FreeBSD$ */ +#if 0 #ifndef lint static char copyright[] = "@(#) Copyright (c) 1989, 1993\n\ @@ -46,6 +47,7 @@ static char copyright[] = #ifndef lint static char sccsid[] = "@(#)locate.bigram.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ +#endif /* * bigram < sorted_file_names | sort -nr | @@ -67,9 +69,9 @@ u_int bigram[UCHAR_MAX + 1][UCHAR_MAX + int main(void) { - register u_char *cp; - register u_char *oldpath = buf1, *path = buf2; - register u_int i, j; + u_char *cp; + u_char *oldpath = buf1, *path = buf2; + u_int i, j; while (fgets(path, sizeof(buf2), stdin) != NULL) { Modified: head/usr.bin/locate/code/locate.code.c ============================================================================== --- head/usr.bin/locate/code/locate.code.c Mon Jun 28 12:00:20 2010 (r209570) +++ head/usr.bin/locate/code/locate.code.c Mon Jun 28 12:04:55 2010 (r209571) @@ -37,6 +37,7 @@ * $FreeBSD$ */ +#if 0 #ifndef lint static char copyright[] = "@(#) Copyright (c) 1989, 1993\n\ @@ -46,6 +47,7 @@ static char copyright[] = #ifndef lint static char sccsid[] = "@(#)locate.code.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ +#endif /* * PURPOSE: sorted list compressor (works with a modified 'find' @@ -122,14 +124,12 @@ int bgindex(char *); void usage(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { - register u_char *cp, *oldpath, *path; + u_char *cp, *oldpath, *path; int ch, code, count, diffcount, oldcount; + u_int i, j; FILE *fp; - register int i, j; while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { @@ -256,10 +256,9 @@ main(argc, argv) #ifndef LOOKUP int -bgindex(bg) /* Return location of bg in bigrams or -1. */ - char *bg; +bgindex(char *bg) /* Return location of bg in bigrams or -1. */ { - register char bg0, bg1, *p; + char bg0, bg1, *p; bg0 = bg[0]; bg1 = bg[1]; @@ -271,7 +270,7 @@ bgindex(bg) /* Return location of bg i #endif /* !LOOKUP */ void -usage() +usage(void) { (void)fprintf(stderr, "usage: locate.code common_bigrams < list > squozen_list\n"); From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 12:20:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83A82106564A; Mon, 28 Jun 2010 12:20:37 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 728328FC1D; Mon, 28 Jun 2010 12:20: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 o5SCKbIu001483; Mon, 28 Jun 2010 12:20:37 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SCKb8X001481; Mon, 28 Jun 2010 12:20:37 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201006281220.o5SCKb8X001481@svn.freebsd.org> From: Rui Paulo Date: Mon, 28 Jun 2010 12:20: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: r209572 - stable/8/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 12:20:37 -0000 Author: rpaulo Date: Mon Jun 28 12:20:36 2010 New Revision: 209572 URL: http://svn.freebsd.org/changeset/base/209572 Log: MFC r209013: Add missing braces. Modified: stable/8/sys/net80211/ieee80211_hwmp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_hwmp.c ============================================================================== --- stable/8/sys/net80211/ieee80211_hwmp.c Mon Jun 28 12:04:55 2010 (r209571) +++ stable/8/sys/net80211/ieee80211_hwmp.c Mon Jun 28 12:20:36 2010 (r209572) @@ -707,9 +707,10 @@ hwmp_recv_preq(struct ieee80211vap *vap, rtorig = ieee80211_mesh_rt_find(vap, preq->preq_origaddr); if (rtorig == NULL) rtorig = ieee80211_mesh_rt_add(vap, preq->preq_origaddr); - if (rtorig == NULL) + if (rtorig == NULL) { /* XXX stat */ return; + } hrorig = IEEE80211_MESH_ROUTE_PRIV(rtorig, struct ieee80211_hwmp_route); /* * Sequence number validation. From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 13:45:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C784D106566B; Mon, 28 Jun 2010 13:45:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 5AA708FC15; Mon, 28 Jun 2010 13:45:46 +0000 (UTC) Received: from besplex.bde.org (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o5SDjivH026243 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Jun 2010 23:45:45 +1000 Date: Mon, 28 Jun 2010 23:45:44 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gavin Atkinson In-Reply-To: <201006280830.o5S8UA3o048905@svn.freebsd.org> Message-ID: <20100628221613.J1018@besplex.bde.org> References: <201006280830.o5S8UA3o048905@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209567 - head/usr.bin/lock X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 13:45:47 -0000 On Mon, 28 Jun 2010, Gavin Atkinson wrote: > Log: > Make WARNS=6 safe. This mainly breaks the warning. > Modified: head/usr.bin/lock/lock.c > ============================================================================== > --- head/usr.bin/lock/lock.c Mon Jun 28 08:10:55 2010 (r209566) > +++ head/usr.bin/lock/lock.c Mon Jun 28 08:30:10 2010 (r209567) > @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include Include to support bogusness below. > #include > #include > #include > @@ -257,9 +258,9 @@ hi(int signo __unused) > if (no_timeout) { > (void)putchar('\n'); > } else { > - (void)printf("timeout in %ld:%ld minutes\n", > - (nexttime - timval.tv_sec) / 60, > - (nexttime - timval.tv_sec) % 60); > + (void)printf("timeout in %jd:%jd minutes\n", > + (intmax_t)(nexttime - timval.tv_sec) / 60, > + (intmax_t)(nexttime - timval.tv_sec) % 60); Printing time differences using intmax_t is silly. They don't need to work for more than a few days here, but even casting to 16-bit ints lets them work for 32767 minutes = 546 hours here, while the natural casts here (of timeval.tv_sec to long) lets them work for 65536 times longer than that = 4082 years even with 32-bit longs. Any casts here risk breaking the warnings about type mismatches and resulting overflows, and in fact there are many in this program. Here there is just the promotion of timval.tv_sec to time_t causing the printf args to normally not match the printf format. Elsewhere there are overflow bugs caused by incomplete conversion to time_t, and worse. Mainly here: % nexttime = timval.tv_sec + (sectimeout * 60); This has about 10 style, type mismatch and overflow bugs, counting other bugs involving sectimeout, starting with sectimeout not actually being the seconds timeout (it is the minutes timeout, and scaling it to a seconds timeout gives overflow bugs). If the program gets this far without triggering the bugs, then it has few risks of more, since the residual timeout is <= the original timeout which must be small to work. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 14:04:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93AFA1065670; Mon, 28 Jun 2010 14:04:20 +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 696D48FC1C; Mon, 28 Jun 2010 14:04: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 o5SE4KHp024417; Mon, 28 Jun 2010 14:04:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SE4JsZ024414; Mon, 28 Jun 2010 14:04:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201006281404.o5SE4JsZ024414@svn.freebsd.org> From: John Baldwin Date: Mon, 28 Jun 2010 14:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209573 - stable/7/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 14:04:20 -0000 Author: jhb Date: Mon Jun 28 14:04:19 2010 New Revision: 209573 URL: http://svn.freebsd.org/changeset/base/209573 Log: Remove some gratuitous local diffs. Modified: stable/7/sys/dev/e1000/e1000_regs.h stable/7/sys/dev/e1000/if_em.c Modified: stable/7/sys/dev/e1000/e1000_regs.h ============================================================================== --- stable/7/sys/dev/e1000/e1000_regs.h Mon Jun 28 12:20:36 2010 (r209572) +++ stable/7/sys/dev/e1000/e1000_regs.h Mon Jun 28 14:04:19 2010 (r209573) @@ -236,7 +236,7 @@ #define E1000_PRC64 0x0405C /* Packets Rx (64 bytes) - R/clr */ #define E1000_PRC127 0x04060 /* Packets Rx (65-127 bytes) - R/clr */ #define E1000_PRC255 0x04064 /* Packets Rx (128-255 bytes) - R/clr */ -#define E1000_PRC511 0x04068 /* Packets Rx (255-511 bytes) - R/clr */ +#define E1000_PRC511 0x04068 /* Packets Rx (256-511 bytes) - R/clr */ #define E1000_PRC1023 0x0406C /* Packets Rx (512-1023 bytes) - R/clr */ #define E1000_PRC1522 0x04070 /* Packets Rx (1024-1522 bytes) - R/clr */ #define E1000_GPRC 0x04074 /* Good Packets Rx Count - R/clr */ Modified: stable/7/sys/dev/e1000/if_em.c ============================================================================== --- stable/7/sys/dev/e1000/if_em.c Mon Jun 28 12:20:36 2010 (r209572) +++ stable/7/sys/dev/e1000/if_em.c Mon Jun 28 14:04:19 2010 (r209573) @@ -2057,8 +2057,8 @@ static void em_local_timer(void *arg) { struct adapter *adapter = arg; - struct ifnet *ifp = adapter->ifp; struct tx_ring *txr = adapter->tx_rings; + struct ifnet *ifp = adapter->ifp; EM_CORE_LOCK_ASSERT(adapter); @@ -3817,7 +3817,6 @@ em_setup_receive_ring(struct rx_ring *rx bus_dma_segment_t seg[1]; int rsize, nsegs, error; - /* Clear the ring contents */ EM_RX_LOCK(rxr); rsize = roundup2(adapter->num_rx_desc * @@ -3861,7 +3860,6 @@ em_setup_receive_ring(struct rx_ring *rx rxr->rx_base[j].buffer_addr = htole64(seg[0].ds_addr); } - /* Setup our descriptor indices */ rxr->next_to_check = 0; rxr->next_to_refresh = 0; @@ -3984,6 +3982,7 @@ em_free_receive_buffers(struct rx_ring * * Enable receive unit. * **********************************************************************/ + #define MAX_INTS_PER_SEC 8000 #define DEFAULT_ITR 1000000000/(MAX_INTS_PER_SEC * 256) From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 14:06:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 677B3106566B; Mon, 28 Jun 2010 14:06:45 +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 3D6038FC27; Mon, 28 Jun 2010 14:06: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 o5SE6j8w024995; Mon, 28 Jun 2010 14:06:45 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SE6jbN024992; Mon, 28 Jun 2010 14:06:45 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201006281406.o5SE6jbN024992@svn.freebsd.org> From: John Baldwin Date: Mon, 28 Jun 2010 14:06:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209574 - stable/7/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 14:06:45 -0000 Author: jhb Date: Mon Jun 28 14:06:44 2010 New Revision: 209574 URL: http://svn.freebsd.org/changeset/base/209574 Log: Remove gratuitous whitespace changes accidentally added in the previous commit. Modified: stable/7/sys/dev/e1000/e1000_regs.h stable/7/sys/dev/e1000/if_em.c Modified: stable/7/sys/dev/e1000/e1000_regs.h ============================================================================== --- stable/7/sys/dev/e1000/e1000_regs.h Mon Jun 28 14:04:19 2010 (r209573) +++ stable/7/sys/dev/e1000/e1000_regs.h Mon Jun 28 14:06:44 2010 (r209574) @@ -236,7 +236,7 @@ #define E1000_PRC64 0x0405C /* Packets Rx (64 bytes) - R/clr */ #define E1000_PRC127 0x04060 /* Packets Rx (65-127 bytes) - R/clr */ #define E1000_PRC255 0x04064 /* Packets Rx (128-255 bytes) - R/clr */ -#define E1000_PRC511 0x04068 /* Packets Rx (256-511 bytes) - R/clr */ +#define E1000_PRC511 0x04068 /* Packets Rx (255-511 bytes) - R/clr */ #define E1000_PRC1023 0x0406C /* Packets Rx (512-1023 bytes) - R/clr */ #define E1000_PRC1522 0x04070 /* Packets Rx (1024-1522 bytes) - R/clr */ #define E1000_GPRC 0x04074 /* Good Packets Rx Count - R/clr */ Modified: stable/7/sys/dev/e1000/if_em.c ============================================================================== --- stable/7/sys/dev/e1000/if_em.c Mon Jun 28 14:04:19 2010 (r209573) +++ stable/7/sys/dev/e1000/if_em.c Mon Jun 28 14:06:44 2010 (r209574) @@ -2057,8 +2057,8 @@ static void em_local_timer(void *arg) { struct adapter *adapter = arg; + struct ifnet *ifp = adapter->ifp; struct tx_ring *txr = adapter->tx_rings; - struct ifnet *ifp = adapter->ifp; EM_CORE_LOCK_ASSERT(adapter); @@ -3817,6 +3817,7 @@ em_setup_receive_ring(struct rx_ring *rx bus_dma_segment_t seg[1]; int rsize, nsegs, error; + /* Clear the ring contents */ EM_RX_LOCK(rxr); rsize = roundup2(adapter->num_rx_desc * @@ -3860,6 +3861,7 @@ em_setup_receive_ring(struct rx_ring *rx rxr->rx_base[j].buffer_addr = htole64(seg[0].ds_addr); } + /* Setup our descriptor indices */ rxr->next_to_check = 0; rxr->next_to_refresh = 0; @@ -3982,7 +3984,6 @@ em_free_receive_buffers(struct rx_ring * * Enable receive unit. * **********************************************************************/ - #define MAX_INTS_PER_SEC 8000 #define DEFAULT_ITR 1000000000/(MAX_INTS_PER_SEC * 256) From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 14:12:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1360F106564A; Mon, 28 Jun 2010 14:12:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D93418FC13; Mon, 28 Jun 2010 14:12:46 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 832B246B2E; Mon, 28 Jun 2010 10:12:46 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A49908A03C; Mon, 28 Jun 2010 10:12:45 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Mon, 28 Jun 2010 10:12:36 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201006281406.o5SE6jbN024992@svn.freebsd.org> In-Reply-To: <201006281406.o5SE6jbN024992@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201006281012.36602.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 28 Jun 2010 10:12:45 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r209574 - stable/7/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 14:12:47 -0000 On Monday 28 June 2010 10:06:45 am John Baldwin wrote: > Author: jhb > Date: Mon Jun 28 14:06:44 2010 > New Revision: 209574 > URL: http://svn.freebsd.org/changeset/base/209574 > > Log: > Remove gratuitous whitespace changes accidentally added in the previous > commit. *sigh* In case it wasn't obvious, my previous commit was a misfire where I was attempting to remove local diffs to this driver but ended up applying the reverse patch and committing it to the wrong tree instead. :( -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 14:15:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D646106566C; Mon, 28 Jun 2010 14:15:55 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CBEE8FC16; Mon, 28 Jun 2010 14:15: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 o5SEFsso027034; Mon, 28 Jun 2010 14:15:54 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SEFsux027032; Mon, 28 Jun 2010 14:15:54 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201006281415.o5SEFsux027032@svn.freebsd.org> From: Rui Paulo Date: Mon, 28 Jun 2010 14:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209575 - releng/8.1/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 14:15:55 -0000 Author: rpaulo Date: Mon Jun 28 14:15:54 2010 New Revision: 209575 URL: http://svn.freebsd.org/changeset/base/209575 Log: MFC r209541, r209548: Fix the AR_SREV_MERLIN_20_OR_LATER() check. Approved by: re (kensmith) Modified: releng/8.1/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Directory Properties: releng/8.1/sys/ (props changed) releng/8.1/sys/amd64/include/xen/ (props changed) releng/8.1/sys/cddl/contrib/opensolaris/ (props changed) releng/8.1/sys/contrib/dev/acpica/ (props changed) releng/8.1/sys/contrib/pf/ (props changed) releng/8.1/sys/dev/ixgbe/ (props changed) releng/8.1/sys/dev/xen/xenpci/ (props changed) releng/8.1/sys/geom/sched/ (props changed) Modified: releng/8.1/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- releng/8.1/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Mon Jun 28 14:06:44 2010 (r209574) +++ releng/8.1/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Mon Jun 28 14:15:54 2010 (r209575) @@ -612,7 +612,7 @@ AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_MERLIN_20) #define AR_SREV_MERLIN_20_OR_LATER(_ah) \ (AR_SREV_MERLIN_20(_ah) || \ - AH_PRIVATE((_ah))->ah_macVersion > AR_XSREV_VERSION_MERLIN) + AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_MERLIN) #define AR_SREV_KITE(_ah) \ (AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_KITE) From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 17:06:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9F7E106564A; Mon, 28 Jun 2010 17:06:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9FB8E8FC19; Mon, 28 Jun 2010 17:06: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 o5SH6JnY064462; Mon, 28 Jun 2010 17:06:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SH6JVE064460; Mon, 28 Jun 2010 17:06:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201006281706.o5SH6JVE064460@svn.freebsd.org> From: Xin LI Date: Mon, 28 Jun 2010 17:06: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: r209576 - stable/8/bin/pax X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 17:06:20 -0000 Author: delphij Date: Mon Jun 28 17:06:19 2010 New Revision: 209576 URL: http://svn.freebsd.org/changeset/base/209576 Log: MFC r205942: Merge OpenBSD revisions 1.4 through 1.9, mostly style cleanups. Obtained from: OpenBSD Modified: stable/8/bin/pax/getoldopt.c Directory Properties: stable/8/bin/pax/ (props changed) Modified: stable/8/bin/pax/getoldopt.c ============================================================================== --- stable/8/bin/pax/getoldopt.c Mon Jun 28 14:15:54 2010 (r209575) +++ stable/8/bin/pax/getoldopt.c Mon Jun 28 17:06:19 2010 (r209576) @@ -1,4 +1,4 @@ -/* $OpenBSD: getoldopt.c,v 1.4 2000/01/22 20:24:51 deraadt Exp $ */ +/* $OpenBSD: getoldopt.c,v 1.9 2009/10/27 23:59:22 deraadt Exp $ */ /* $NetBSD: getoldopt.c,v 1.3 1995/03/21 09:07:28 cgd Exp $ */ /*- @@ -7,7 +7,7 @@ * otherwise, it uses the old rules used by tar, dump, and ps. * * Written 25 August 1985 by John Gilmore (ihnp4!hoptoad!gnu) and placed - * in the Pubic Domain for your edification and enjoyment. + * in the Public Domain for your edification and enjoyment. */ #include @@ -33,7 +33,8 @@ getoldopt(int argc, char **argv, const c optarg = NULL; if (key == NULL) { /* First time */ - if (argc < 2) return EOF; + if (argc < 2) + return (-1); key = argv[1]; if (*key == '-') use_getopt++; @@ -42,18 +43,18 @@ getoldopt(int argc, char **argv, const c } if (use_getopt) - return getopt(argc, argv, optstring); + return (getopt(argc, argv, optstring)); c = *key++; if (c == '\0') { key--; - return EOF; + return (-1); } place = strchr(optstring, c); if (place == NULL || c == ':') { fprintf(stderr, "%s: unknown option %c\n", argv[0], c); - return('?'); + return ('?'); } place++; @@ -64,9 +65,9 @@ getoldopt(int argc, char **argv, const c } else { fprintf(stderr, "%s: %c argument missing\n", argv[0], c); - return('?'); + return ('?'); } } - return(c); + return (c); } From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 17:45:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39CFC1065674; Mon, 28 Jun 2010 17:45:01 +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 261EC8FC1B; Mon, 28 Jun 2010 17:45:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5SHj1xM072950; Mon, 28 Jun 2010 17:45:01 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SHj1Ph072948; Mon, 28 Jun 2010 17:45:01 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201006281745.o5SHj1Ph072948@svn.freebsd.org> From: Attilio Rao Date: Mon, 28 Jun 2010 17:45:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209577 - 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: Mon, 28 Jun 2010 17:45:01 -0000 Author: attilio Date: Mon Jun 28 17:45:00 2010 New Revision: 209577 URL: http://svn.freebsd.org/changeset/base/209577 Log: Fix a lock leak in the deadlock resolver in case the ticks counter wrapped up. Sponsored by: Sandvine Incorporated Submitted by: pluknet Reported by: Anton Yuzhaninov Reviewed by: jhb MFC after: 3 days Modified: head/sys/kern/kern_clock.c Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Mon Jun 28 17:06:19 2010 (r209576) +++ head/sys/kern/kern_clock.c Mon Jun 28 17:45:00 2010 (r209577) @@ -213,8 +213,10 @@ deadlkres(void) MPASS(td->td_blocked != NULL); /* Handle ticks wrap-up. */ - if (ticks < td->td_blktick) + if (ticks < td->td_blktick) { + thread_unlock(td); continue; + } tticks = ticks - td->td_blktick; thread_unlock(td); if (tticks > blkticks) { @@ -233,8 +235,10 @@ deadlkres(void) } else if (TD_IS_SLEEPING(td)) { /* Handle ticks wrap-up. */ - if (ticks < td->td_blktick) + if (ticks < td->td_blktick) { + thread_unlock(td); continue; + } /* * Check if the thread is sleeping on a From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 17:59:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FF64106566B; Mon, 28 Jun 2010 17:59:46 +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 6074A8FC08; Mon, 28 Jun 2010 17:59: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 o5SHxkuR076209; Mon, 28 Jun 2010 17:59:46 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SHxkoR076207; Mon, 28 Jun 2010 17:59:46 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201006281759.o5SHxkoR076207@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 28 Jun 2010 17:59: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: r209578 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 17:59:46 -0000 Author: kib Date: Mon Jun 28 17:59:45 2010 New Revision: 209578 URL: http://svn.freebsd.org/changeset/base/209578 Log: Use C99 initializers for the struct sysent generated by MAKE_SYSENT(). MFC after: 1 week Modified: head/sys/sys/sysent.h Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Mon Jun 28 17:45:00 2010 (r209577) +++ head/sys/sys/sysent.h Mon Jun 28 17:59:45 2010 (r209578) @@ -144,10 +144,10 @@ struct syscall_module_data { #define MAKE_SYSENT(syscallname) \ static struct sysent syscallname##_sysent = { \ - (sizeof(struct syscallname ## _args ) \ + .sy_narg = (sizeof(struct syscallname ## _args ) \ / sizeof(register_t)), \ - (sy_call_t *)& syscallname, \ - SYS_AUE_##syscallname \ + .sy_call = (sy_call_t *)& syscallname, \ + .sy_auevent = SYS_AUE_##syscallname, \ } #define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) \ From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 18:06:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DFEA106566C; Mon, 28 Jun 2010 18:06:47 +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 1CC4F8FC13; Mon, 28 Jun 2010 18:06: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 o5SI6lIB077828; Mon, 28 Jun 2010 18:06:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SI6kAH077821; Mon, 28 Jun 2010 18:06:46 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201006281806.o5SI6kAH077821@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 28 Jun 2010 18:06: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: r209579 - in head/sys: compat/freebsd32 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: Mon, 28 Jun 2010 18:06:47 -0000 Author: kib Date: Mon Jun 28 18:06:46 2010 New Revision: 209579 URL: http://svn.freebsd.org/changeset/base/209579 Log: Count number of threads that enter and leave dynamically registered syscalls. On the dynamic syscall deregistration, wait until all threads leave the syscall code. This somewhat increases the safety of the loadable modules unloading. Reviewed by: jhb Tested by: pho MFC after: 1 month Modified: head/sys/compat/freebsd32/syscalls.master head/sys/kern/kern_syscalls.c head/sys/kern/makesyscalls.sh head/sys/kern/subr_trap.c head/sys/kern/syscalls.master head/sys/sys/sysent.h Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Mon Jun 28 17:59:45 2010 (r209578) +++ head/sys/compat/freebsd32/syscalls.master Mon Jun 28 18:06:46 2010 (r209579) @@ -386,16 +386,16 @@ ; ; The following are reserved for loadable syscalls ; -210 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -211 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -212 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -213 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -214 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -215 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -216 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -217 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -218 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -219 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int +210 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +211 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +212 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +213 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +214 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +215 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +216 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +217 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +218 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +219 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int ; ; The following were introduced with NetBSD/4.4Lite-2 Modified: head/sys/kern/kern_syscalls.c ============================================================================== --- head/sys/kern/kern_syscalls.c Mon Jun 28 17:59:45 2010 (r209578) +++ head/sys/kern/kern_syscalls.c Mon Jun 28 18:06:46 2010 (r209579) @@ -28,12 +28,15 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include #include #include #include +#include +#include /* * Acts like "nosys" but can be identified in sysent for dynamic call @@ -55,6 +58,51 @@ lkmressys(struct thread *td, struct nosy return (nosys(td, args)); } +static void +syscall_thread_drain(struct sysent *se) +{ + u_int32_t cnt, oldcnt; + + do { + oldcnt = se->sy_thrcnt; + KASSERT((oldcnt & SY_THR_STATIC) == 0, + ("drain on static syscall")); + cnt = oldcnt | SY_THR_DRAINING; + } while (atomic_cmpset_acq_32(&se->sy_thrcnt, oldcnt, cnt) == 0); + while (atomic_cmpset_32(&se->sy_thrcnt, SY_THR_DRAINING, + SY_THR_ABSENT) == 0) + pause("scdrn", hz/2); +} + +int +syscall_thread_enter(struct thread *td, struct sysent *se) +{ + u_int32_t cnt, oldcnt; + + do { + oldcnt = se->sy_thrcnt; + if ((oldcnt & SY_THR_STATIC) != 0) + return (0); + if ((oldcnt & (SY_THR_DRAINING | SY_THR_ABSENT)) != 0) + return (ENOSYS); + cnt = oldcnt + SY_THR_INCR; + } while (atomic_cmpset_acq_32(&se->sy_thrcnt, oldcnt, cnt) == 0); + return (0); +} + +void +syscall_thread_exit(struct thread *td, struct sysent *se) +{ + u_int32_t cnt, oldcnt; + + do { + oldcnt = se->sy_thrcnt; + if ((oldcnt & SY_THR_STATIC) != 0) + return; + cnt = oldcnt - SY_THR_INCR; + } while (atomic_cmpset_rel_32(&se->sy_thrcnt, oldcnt, cnt) == 0); +} + int syscall_register(int *offset, struct sysent *new_sysent, struct sysent *old_sysent) @@ -74,8 +122,12 @@ syscall_register(int *offset, struct sys sysent[*offset].sy_call != (sy_call_t *)lkmressys) return (EEXIST); + KASSERT(sysent[*offset].sy_thrcnt == SY_THR_ABSENT, + ("dynamic syscall is not protected")); *old_sysent = sysent[*offset]; + new_sysent->sy_thrcnt = SY_THR_ABSENT; sysent[*offset] = *new_sysent; + atomic_store_rel_32(&sysent[*offset].sy_thrcnt, 0); return (0); } @@ -83,8 +135,10 @@ int syscall_deregister(int *offset, struct sysent *old_sysent) { - if (*offset) + if (*offset) { + syscall_thread_drain(&sysent[*offset]); sysent[*offset] = *old_sysent; + } return (0); } Modified: head/sys/kern/makesyscalls.sh ============================================================================== --- head/sys/kern/makesyscalls.sh Mon Jun 28 17:59:45 2010 (r209578) +++ head/sys/kern/makesyscalls.sh Mon Jun 28 18:06:46 2010 (r209579) @@ -253,6 +253,10 @@ s/\$//g f=4 # toss number, type, audit event argc= 0; argssize = "0" + thr_flag = "SY_THR_STATIC" + if (flag("NOTSTATIC")) { + thr_flag = "SY_THR_ABSENT" + } if ($NF != "}") { funcalias=$(NF-2) argalias=$(NF-1) @@ -401,10 +405,10 @@ s/\$//g printf("\t{ %s, (sy_call_t *)", argssize) > sysent column = 8 + 2 + length(argssize) + 15 if (flag("NOSTD")) { - printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0, 0") > sysent + printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT") > sysent column = column + length("lkmressys") + length("AUE_NULL") + 3 } else { - printf("%s, %s, NULL, 0, 0, %s },", funcname, auditev, flags) > sysent + printf("%s, %s, NULL, 0, 0, %s, %s },", funcname, auditev, flags, thr_flag) > sysent column = column + length(funcname) + length(auditev) + length(flags) + 3 } align_sysent_comment(column) @@ -472,13 +476,13 @@ s/\$//g prefix, funcname, auditev) > sysaue } if (flag("NOSTD")) { - printf("\t{ %s, (sy_call_t *)%s, %s, NULL, 0, 0, 0 },", + printf("\t{ %s, (sy_call_t *)%s, %s, NULL, 0, 0, 0, SY_THR_ABSENT },", "0", "lkmressys", "AUE_NULL") > sysent align_sysent_comment(8 + 2 + length("0") + 15 + \ length("lkmressys") + length("AUE_NULL") + 3) } else { - printf("\t{ %s(%s,%s), %s, NULL, 0, 0, %s },", - wrap, argssize, funcname, auditev, flags) > sysent + printf("\t{ %s(%s,%s), %s, NULL, 0, 0, %s, %s },", + wrap, argssize, funcname, auditev, flags, thr_flag) > sysent align_sysent_comment(8 + 9 + length(argssize) + 1 + \ length(funcname) + length(auditev) + \ length(flags) + 4) @@ -498,7 +502,7 @@ s/\$//g next } type("OBSOL") { - printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },") > sysent + printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },") > sysent align_sysent_comment(34) printf("/* %d = obsolete %s */\n", syscall, comment) > sysent printf("\t\"obs_%s\",\t\t\t/* %d = obsolete %s */\n", @@ -509,7 +513,7 @@ s/\$//g next } type("UNIMPL") { - printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },\t\t\t/* %d = %s */\n", + printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },\t\t\t/* %d = %s */\n", syscall, comment) > sysent printf("\t\"#%d\",\t\t\t/* %d = %s */\n", syscall, syscall, comment) > sysnames Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Mon Jun 28 17:59:45 2010 (r209578) +++ head/sys/kern/subr_trap.c Mon Jun 28 18:06:46 2010 (r209579) @@ -298,6 +298,9 @@ syscallenter(struct thread *td, struct s if (error != 0) goto retval; } + error = syscall_thread_enter(td, sa->callp); + if (error != 0) + goto retval; #ifdef KDTRACE_HOOKS /* @@ -327,6 +330,7 @@ syscallenter(struct thread *td, struct s (*systrace_probe_func)(sa->callp->sy_return, sa->code, sa->callp, sa->args); #endif + syscall_thread_exit(td, sa->callp); CTR4(KTR_SYSC, "syscall: p=%p error=%d return %#lx %#lx", p, error, td->td_retval[0], td->td_retval[1]); } Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Mon Jun 28 17:59:45 2010 (r209578) +++ head/sys/kern/syscalls.master Mon Jun 28 18:06:46 2010 (r209579) @@ -40,7 +40,7 @@ ; NOPROTO same as STD except do not create structure or ; function prototype in sys/sysproto.h. Does add a ; definition to syscall.h besides adding a sysent. - +; NONSTATIC syscall is loadable ; ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master @@ -403,16 +403,16 @@ ; ; The following are reserved for loadable syscalls ; -210 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -211 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -212 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -213 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -214 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -215 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -216 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -217 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -218 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int -219 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int +210 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +211 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +212 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +213 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +214 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +215 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +216 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +217 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +218 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int +219 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int ; ; The following were introduced with NetBSD/4.4Lite-2 Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Mon Jun 28 17:59:45 2010 (r209578) +++ head/sys/sys/sysent.h Mon Jun 28 18:06:46 2010 (r209579) @@ -61,8 +61,15 @@ struct sysent { /* system call table * u_int32_t sy_entry; /* DTrace entry ID for systrace. */ u_int32_t sy_return; /* DTrace return ID for systrace. */ u_int32_t sy_flags; /* General flags for system calls. */ + u_int32_t sy_thrcnt; }; +#define SY_THR_FLAGMASK 0x7 +#define SY_THR_STATIC 0x1 +#define SY_THR_DRAINING 0x2 +#define SY_THR_ABSENT 0x4 +#define SY_THR_INCR 0x8 + struct image_params; struct __sigset; struct syscall_args; @@ -211,6 +218,9 @@ struct nosys_args; int lkmnosys(struct thread *, struct nosys_args *); int lkmressys(struct thread *, struct nosys_args *); +int syscall_thread_enter(struct thread *td, struct sysent *se); +void syscall_thread_exit(struct thread *td, struct sysent *se); + #endif /* _KERNEL */ #endif /* !_SYS_SYSENT_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 18:12:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4541D106564A; Mon, 28 Jun 2010 18:12:43 +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 359078FC0C; Mon, 28 Jun 2010 18:12: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 o5SIChtW079187; Mon, 28 Jun 2010 18:12:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SIChMc079185; Mon, 28 Jun 2010 18:12:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201006281812.o5SIChMc079185@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 28 Jun 2010 18:12:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209580 - 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: Mon, 28 Jun 2010 18:12:43 -0000 Author: kib Date: Mon Jun 28 18:12:42 2010 New Revision: 209580 URL: http://svn.freebsd.org/changeset/base/209580 Log: Despite system call deregistration drains the threads executing System V shm syscalls, and initial check for the number of allocated segments in the module deinitialization code, the following might happen: after the check for active segment, while waiting for threads to leave some other syscall, shmget(2) is called. Then, we can end up with the shared segment that cannot be detached since sysvshm module is unloaded. Prevent the leak by rechecking and disclaiming a reference to the vm object owned by sysvshm module, that might have grown during the drain. Tested by: pho Reviewed by: jhb MFC after: 1 month Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Mon Jun 28 18:06:46 2010 (r209579) +++ head/sys/kern/sysv_shm.c Mon Jun 28 18:12:42 2010 (r209580) @@ -919,10 +919,18 @@ shmunload() #endif syscall_helper_unregister(shm_syscalls); + for (i = 0; i < shmalloced; i++) { #ifdef MAC - for (i = 0; i < shmalloced; i++) mac_sysvshm_destroy(&shmsegs[i]); #endif + /* + * Objects might be still mapped into the processes + * address spaces. Actual free would happen on the + * last mapping destruction. + */ + if (shmsegs[i].u.shm_perm.mode != SHMSEG_FREE) + vm_object_deallocate(shmsegs[i].object); + } free(shmsegs, M_SHM); shmexit_hook = NULL; shmfork_hook = NULL; From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 18:17:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1823E10656C8; Mon, 28 Jun 2010 18:17:22 +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 046EC8FC2B; Mon, 28 Jun 2010 18:17: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 o5SIHMDB080230; Mon, 28 Jun 2010 18:17:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5SIHLlF080223; Mon, 28 Jun 2010 18:17:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201006281817.o5SIHLlF080223@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 28 Jun 2010 18:17: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: r209581 - in head/sys: amd64/linux32 compat/freebsd32 compat/svr4 i386/ibcs2 i386/linux kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 18:17:22 -0000 Author: kib Date: Mon Jun 28 18:17:21 2010 New Revision: 209581 URL: http://svn.freebsd.org/changeset/base/209581 Log: Regenerate Modified: head/sys/amd64/linux32/linux32_sysent.c head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/svr4/svr4_proto.h head/sys/compat/svr4/svr4_syscall.h head/sys/compat/svr4/svr4_syscallnames.c head/sys/compat/svr4/svr4_sysent.c head/sys/i386/ibcs2/ibcs2_proto.h head/sys/i386/ibcs2/ibcs2_syscall.h head/sys/i386/ibcs2/ibcs2_sysent.c head/sys/i386/linux/linux_sysent.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Mon Jun 28 18:12:42 2010 (r209580) +++ head/sys/amd64/linux32/linux32_sysent.c Mon Jun 28 18:17:21 2010 (r209581) @@ -19,321 +19,321 @@ /* The casts are bogus but will do for now. */ struct sysent linux_sysent[] = { #define nosys linux_nosys - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 0 = setup */ - { AS(sys_exit_args), (sy_call_t *)sys_exit, AUE_EXIT, NULL, 0, 0, 0 }, /* 1 = exit */ - { 0, (sy_call_t *)linux_fork, AUE_FORK, NULL, 0, 0, 0 }, /* 2 = linux_fork */ - { AS(read_args), (sy_call_t *)read, AUE_NULL, NULL, 0, 0, 0 }, /* 3 = read */ - { AS(write_args), (sy_call_t *)write, AUE_NULL, NULL, 0, 0, 0 }, /* 4 = write */ - { AS(linux_open_args), (sy_call_t *)linux_open, AUE_OPEN_RWTC, NULL, 0, 0, 0 }, /* 5 = linux_open */ - { AS(close_args), (sy_call_t *)close, AUE_CLOSE, NULL, 0, 0, 0 }, /* 6 = close */ - { AS(linux_waitpid_args), (sy_call_t *)linux_waitpid, AUE_WAIT4, NULL, 0, 0, 0 }, /* 7 = linux_waitpid */ - { AS(linux_creat_args), (sy_call_t *)linux_creat, AUE_CREAT, NULL, 0, 0, 0 }, /* 8 = linux_creat */ - { AS(linux_link_args), (sy_call_t *)linux_link, AUE_LINK, NULL, 0, 0, 0 }, /* 9 = linux_link */ - { AS(linux_unlink_args), (sy_call_t *)linux_unlink, AUE_UNLINK, NULL, 0, 0, 0 }, /* 10 = linux_unlink */ - { AS(linux_execve_args), (sy_call_t *)linux_execve, AUE_EXECVE, NULL, 0, 0, 0 }, /* 11 = linux_execve */ - { AS(linux_chdir_args), (sy_call_t *)linux_chdir, AUE_CHDIR, NULL, 0, 0, 0 }, /* 12 = linux_chdir */ - { AS(linux_time_args), (sy_call_t *)linux_time, AUE_NULL, NULL, 0, 0, 0 }, /* 13 = linux_time */ - { AS(linux_mknod_args), (sy_call_t *)linux_mknod, AUE_MKNOD, NULL, 0, 0, 0 }, /* 14 = linux_mknod */ - { AS(linux_chmod_args), (sy_call_t *)linux_chmod, AUE_CHMOD, NULL, 0, 0, 0 }, /* 15 = linux_chmod */ - { AS(linux_lchown16_args), (sy_call_t *)linux_lchown16, AUE_LCHOWN, NULL, 0, 0, 0 }, /* 16 = linux_lchown16 */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 17 = break */ - { AS(linux_stat_args), (sy_call_t *)linux_stat, AUE_STAT, NULL, 0, 0, 0 }, /* 18 = linux_stat */ - { AS(linux_lseek_args), (sy_call_t *)linux_lseek, AUE_LSEEK, NULL, 0, 0, 0 }, /* 19 = linux_lseek */ - { 0, (sy_call_t *)linux_getpid, AUE_GETPID, NULL, 0, 0, 0 }, /* 20 = linux_getpid */ - { AS(linux_mount_args), (sy_call_t *)linux_mount, AUE_MOUNT, NULL, 0, 0, 0 }, /* 21 = linux_mount */ - { AS(linux_oldumount_args), (sy_call_t *)linux_oldumount, AUE_UMOUNT, NULL, 0, 0, 0 }, /* 22 = linux_oldumount */ - { AS(linux_setuid16_args), (sy_call_t *)linux_setuid16, AUE_SETUID, NULL, 0, 0, 0 }, /* 23 = linux_setuid16 */ - { 0, (sy_call_t *)linux_getuid16, AUE_GETUID, NULL, 0, 0, 0 }, /* 24 = linux_getuid16 */ - { 0, (sy_call_t *)linux_stime, AUE_SETTIMEOFDAY, NULL, 0, 0, 0 }, /* 25 = linux_stime */ - { AS(linux_ptrace_args), (sy_call_t *)linux_ptrace, AUE_PTRACE, NULL, 0, 0, 0 }, /* 26 = linux_ptrace */ - { AS(linux_alarm_args), (sy_call_t *)linux_alarm, AUE_NULL, NULL, 0, 0, 0 }, /* 27 = linux_alarm */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 28 = fstat */ - { 0, (sy_call_t *)linux_pause, AUE_NULL, NULL, 0, 0, 0 }, /* 29 = linux_pause */ - { AS(linux_utime_args), (sy_call_t *)linux_utime, AUE_UTIME, NULL, 0, 0, 0 }, /* 30 = linux_utime */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 31 = stty */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 32 = gtty */ - { AS(linux_access_args), (sy_call_t *)linux_access, AUE_ACCESS, NULL, 0, 0, 0 }, /* 33 = linux_access */ - { AS(linux_nice_args), (sy_call_t *)linux_nice, AUE_NICE, NULL, 0, 0, 0 }, /* 34 = linux_nice */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 35 = ftime */ - { 0, (sy_call_t *)sync, AUE_SYNC, NULL, 0, 0, 0 }, /* 36 = sync */ - { AS(linux_kill_args), (sy_call_t *)linux_kill, AUE_KILL, NULL, 0, 0, 0 }, /* 37 = linux_kill */ - { AS(linux_rename_args), (sy_call_t *)linux_rename, AUE_RENAME, NULL, 0, 0, 0 }, /* 38 = linux_rename */ - { AS(linux_mkdir_args), (sy_call_t *)linux_mkdir, AUE_MKDIR, NULL, 0, 0, 0 }, /* 39 = linux_mkdir */ - { AS(linux_rmdir_args), (sy_call_t *)linux_rmdir, AUE_RMDIR, NULL, 0, 0, 0 }, /* 40 = linux_rmdir */ - { AS(dup_args), (sy_call_t *)dup, AUE_DUP, NULL, 0, 0, 0 }, /* 41 = dup */ - { AS(linux_pipe_args), (sy_call_t *)linux_pipe, AUE_PIPE, NULL, 0, 0, 0 }, /* 42 = linux_pipe */ - { AS(linux_times_args), (sy_call_t *)linux_times, AUE_NULL, NULL, 0, 0, 0 }, /* 43 = linux_times */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 44 = prof */ - { AS(linux_brk_args), (sy_call_t *)linux_brk, AUE_NULL, NULL, 0, 0, 0 }, /* 45 = linux_brk */ - { AS(linux_setgid16_args), (sy_call_t *)linux_setgid16, AUE_SETGID, NULL, 0, 0, 0 }, /* 46 = linux_setgid16 */ - { 0, (sy_call_t *)linux_getgid16, AUE_GETGID, NULL, 0, 0, 0 }, /* 47 = linux_getgid16 */ - { AS(linux_signal_args), (sy_call_t *)linux_signal, AUE_NULL, NULL, 0, 0, 0 }, /* 48 = linux_signal */ - { 0, (sy_call_t *)linux_geteuid16, AUE_GETEUID, NULL, 0, 0, 0 }, /* 49 = linux_geteuid16 */ - { 0, (sy_call_t *)linux_getegid16, AUE_GETEGID, NULL, 0, 0, 0 }, /* 50 = linux_getegid16 */ - { AS(acct_args), (sy_call_t *)acct, AUE_ACCT, NULL, 0, 0, 0 }, /* 51 = acct */ - { AS(linux_umount_args), (sy_call_t *)linux_umount, AUE_UMOUNT, NULL, 0, 0, 0 }, /* 52 = linux_umount */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 53 = lock */ - { AS(linux_ioctl_args), (sy_call_t *)linux_ioctl, AUE_IOCTL, NULL, 0, 0, 0 }, /* 54 = linux_ioctl */ - { AS(linux_fcntl_args), (sy_call_t *)linux_fcntl, AUE_FCNTL, NULL, 0, 0, 0 }, /* 55 = linux_fcntl */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 56 = mpx */ - { AS(setpgid_args), (sy_call_t *)setpgid, AUE_SETPGRP, NULL, 0, 0, 0 }, /* 57 = setpgid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 58 = ulimit */ - { 0, (sy_call_t *)linux_olduname, AUE_NULL, NULL, 0, 0, 0 }, /* 59 = linux_olduname */ - { AS(umask_args), (sy_call_t *)umask, AUE_UMASK, NULL, 0, 0, 0 }, /* 60 = umask */ - { AS(chroot_args), (sy_call_t *)chroot, AUE_CHROOT, NULL, 0, 0, 0 }, /* 61 = chroot */ - { AS(linux_ustat_args), (sy_call_t *)linux_ustat, AUE_NULL, NULL, 0, 0, 0 }, /* 62 = linux_ustat */ - { AS(dup2_args), (sy_call_t *)dup2, AUE_DUP2, NULL, 0, 0, 0 }, /* 63 = dup2 */ - { 0, (sy_call_t *)linux_getppid, AUE_GETPPID, NULL, 0, 0, 0 }, /* 64 = linux_getppid */ - { 0, (sy_call_t *)getpgrp, AUE_GETPGRP, NULL, 0, 0, 0 }, /* 65 = getpgrp */ - { 0, (sy_call_t *)setsid, AUE_SETSID, NULL, 0, 0, 0 }, /* 66 = setsid */ - { AS(linux_sigaction_args), (sy_call_t *)linux_sigaction, AUE_NULL, NULL, 0, 0, 0 }, /* 67 = linux_sigaction */ - { 0, (sy_call_t *)linux_sgetmask, AUE_NULL, NULL, 0, 0, 0 }, /* 68 = linux_sgetmask */ - { AS(linux_ssetmask_args), (sy_call_t *)linux_ssetmask, AUE_NULL, NULL, 0, 0, 0 }, /* 69 = linux_ssetmask */ - { AS(linux_setreuid16_args), (sy_call_t *)linux_setreuid16, AUE_SETREUID, NULL, 0, 0, 0 }, /* 70 = linux_setreuid16 */ - { AS(linux_setregid16_args), (sy_call_t *)linux_setregid16, AUE_SETREGID, NULL, 0, 0, 0 }, /* 71 = linux_setregid16 */ - { AS(linux_sigsuspend_args), (sy_call_t *)linux_sigsuspend, AUE_NULL, NULL, 0, 0, 0 }, /* 72 = linux_sigsuspend */ - { AS(linux_sigpending_args), (sy_call_t *)linux_sigpending, AUE_NULL, NULL, 0, 0, 0 }, /* 73 = linux_sigpending */ - { AS(linux_sethostname_args), (sy_call_t *)linux_sethostname, AUE_SYSCTL, NULL, 0, 0, 0 }, /* 74 = linux_sethostname */ - { AS(linux_setrlimit_args), (sy_call_t *)linux_setrlimit, AUE_SETRLIMIT, NULL, 0, 0, 0 }, /* 75 = linux_setrlimit */ - { AS(linux_old_getrlimit_args), (sy_call_t *)linux_old_getrlimit, AUE_GETRLIMIT, NULL, 0, 0, 0 }, /* 76 = linux_old_getrlimit */ - { AS(linux_getrusage_args), (sy_call_t *)linux_getrusage, AUE_GETRUSAGE, NULL, 0, 0, 0 }, /* 77 = linux_getrusage */ - { AS(linux_gettimeofday_args), (sy_call_t *)linux_gettimeofday, AUE_NULL, NULL, 0, 0, 0 }, /* 78 = linux_gettimeofday */ - { AS(linux_settimeofday_args), (sy_call_t *)linux_settimeofday, AUE_SETTIMEOFDAY, NULL, 0, 0, 0 }, /* 79 = linux_settimeofday */ - { AS(linux_getgroups16_args), (sy_call_t *)linux_getgroups16, AUE_GETGROUPS, NULL, 0, 0, 0 }, /* 80 = linux_getgroups16 */ - { AS(linux_setgroups16_args), (sy_call_t *)linux_setgroups16, AUE_SETGROUPS, NULL, 0, 0, 0 }, /* 81 = linux_setgroups16 */ - { AS(linux_old_select_args), (sy_call_t *)linux_old_select, AUE_SELECT, NULL, 0, 0, 0 }, /* 82 = linux_old_select */ - { AS(linux_symlink_args), (sy_call_t *)linux_symlink, AUE_SYMLINK, NULL, 0, 0, 0 }, /* 83 = linux_symlink */ - { AS(linux_lstat_args), (sy_call_t *)linux_lstat, AUE_LSTAT, NULL, 0, 0, 0 }, /* 84 = linux_lstat */ - { AS(linux_readlink_args), (sy_call_t *)linux_readlink, AUE_READLINK, NULL, 0, 0, 0 }, /* 85 = linux_readlink */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 86 = linux_uselib */ - { AS(swapon_args), (sy_call_t *)swapon, AUE_SWAPON, NULL, 0, 0, 0 }, /* 87 = swapon */ - { AS(linux_reboot_args), (sy_call_t *)linux_reboot, AUE_REBOOT, NULL, 0, 0, 0 }, /* 88 = linux_reboot */ - { AS(linux_readdir_args), (sy_call_t *)linux_readdir, AUE_GETDIRENTRIES, NULL, 0, 0, 0 }, /* 89 = linux_readdir */ - { AS(linux_mmap_args), (sy_call_t *)linux_mmap, AUE_MMAP, NULL, 0, 0, 0 }, /* 90 = linux_mmap */ - { AS(munmap_args), (sy_call_t *)munmap, AUE_MUNMAP, NULL, 0, 0, 0 }, /* 91 = munmap */ - { AS(linux_truncate_args), (sy_call_t *)linux_truncate, AUE_TRUNCATE, NULL, 0, 0, 0 }, /* 92 = linux_truncate */ - { AS(linux_ftruncate_args), (sy_call_t *)linux_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0 }, /* 93 = linux_ftruncate */ - { AS(fchmod_args), (sy_call_t *)fchmod, AUE_FCHMOD, NULL, 0, 0, 0 }, /* 94 = fchmod */ - { AS(fchown_args), (sy_call_t *)fchown, AUE_FCHOWN, NULL, 0, 0, 0 }, /* 95 = fchown */ - { AS(linux_getpriority_args), (sy_call_t *)linux_getpriority, AUE_GETPRIORITY, NULL, 0, 0, 0 }, /* 96 = linux_getpriority */ - { AS(setpriority_args), (sy_call_t *)setpriority, AUE_SETPRIORITY, NULL, 0, 0, 0 }, /* 97 = setpriority */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 98 = profil */ - { AS(linux_statfs_args), (sy_call_t *)linux_statfs, AUE_STATFS, NULL, 0, 0, 0 }, /* 99 = linux_statfs */ - { AS(linux_fstatfs_args), (sy_call_t *)linux_fstatfs, AUE_FSTATFS, NULL, 0, 0, 0 }, /* 100 = linux_fstatfs */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 101 = ioperm */ - { AS(linux_socketcall_args), (sy_call_t *)linux_socketcall, AUE_NULL, NULL, 0, 0, 0 }, /* 102 = linux_socketcall */ - { AS(linux_syslog_args), (sy_call_t *)linux_syslog, AUE_NULL, NULL, 0, 0, 0 }, /* 103 = linux_syslog */ - { AS(linux_setitimer_args), (sy_call_t *)linux_setitimer, AUE_SETITIMER, NULL, 0, 0, 0 }, /* 104 = linux_setitimer */ - { AS(linux_getitimer_args), (sy_call_t *)linux_getitimer, AUE_GETITIMER, NULL, 0, 0, 0 }, /* 105 = linux_getitimer */ - { AS(linux_newstat_args), (sy_call_t *)linux_newstat, AUE_STAT, NULL, 0, 0, 0 }, /* 106 = linux_newstat */ - { AS(linux_newlstat_args), (sy_call_t *)linux_newlstat, AUE_LSTAT, NULL, 0, 0, 0 }, /* 107 = linux_newlstat */ - { AS(linux_newfstat_args), (sy_call_t *)linux_newfstat, AUE_FSTAT, NULL, 0, 0, 0 }, /* 108 = linux_newfstat */ - { 0, (sy_call_t *)linux_uname, AUE_NULL, NULL, 0, 0, 0 }, /* 109 = linux_uname */ - { AS(linux_iopl_args), (sy_call_t *)linux_iopl, AUE_NULL, NULL, 0, 0, 0 }, /* 110 = linux_iopl */ - { 0, (sy_call_t *)linux_vhangup, AUE_NULL, NULL, 0, 0, 0 }, /* 111 = linux_vhangup */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 112 = idle */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 113 = vm86old */ - { AS(linux_wait4_args), (sy_call_t *)linux_wait4, AUE_WAIT4, NULL, 0, 0, 0 }, /* 114 = linux_wait4 */ - { 0, (sy_call_t *)linux_swapoff, AUE_SWAPOFF, NULL, 0, 0, 0 }, /* 115 = linux_swapoff */ - { AS(linux_sysinfo_args), (sy_call_t *)linux_sysinfo, AUE_NULL, NULL, 0, 0, 0 }, /* 116 = linux_sysinfo */ - { AS(linux_ipc_args), (sy_call_t *)linux_ipc, AUE_NULL, NULL, 0, 0, 0 }, /* 117 = linux_ipc */ - { AS(fsync_args), (sy_call_t *)fsync, AUE_FSYNC, NULL, 0, 0, 0 }, /* 118 = fsync */ - { AS(linux_sigreturn_args), (sy_call_t *)linux_sigreturn, AUE_SIGRETURN, NULL, 0, 0, 0 }, /* 119 = linux_sigreturn */ - { AS(linux_clone_args), (sy_call_t *)linux_clone, AUE_RFORK, NULL, 0, 0, 0 }, /* 120 = linux_clone */ - { AS(linux_setdomainname_args), (sy_call_t *)linux_setdomainname, AUE_SYSCTL, NULL, 0, 0, 0 }, /* 121 = linux_setdomainname */ - { AS(linux_newuname_args), (sy_call_t *)linux_newuname, AUE_NULL, NULL, 0, 0, 0 }, /* 122 = linux_newuname */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 123 = modify_ldt */ - { 0, (sy_call_t *)linux_adjtimex, AUE_ADJTIME, NULL, 0, 0, 0 }, /* 124 = linux_adjtimex */ - { AS(linux_mprotect_args), (sy_call_t *)linux_mprotect, AUE_MPROTECT, NULL, 0, 0, 0 }, /* 125 = linux_mprotect */ - { AS(linux_sigprocmask_args), (sy_call_t *)linux_sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0, 0 }, /* 126 = linux_sigprocmask */ - { 0, (sy_call_t *)linux_create_module, AUE_NULL, NULL, 0, 0, 0 }, /* 127 = linux_create_module */ - { 0, (sy_call_t *)linux_init_module, AUE_NULL, NULL, 0, 0, 0 }, /* 128 = linux_init_module */ - { 0, (sy_call_t *)linux_delete_module, AUE_NULL, NULL, 0, 0, 0 }, /* 129 = linux_delete_module */ - { 0, (sy_call_t *)linux_get_kernel_syms, AUE_NULL, NULL, 0, 0, 0 }, /* 130 = linux_get_kernel_syms */ - { 0, (sy_call_t *)linux_quotactl, AUE_QUOTACTL, NULL, 0, 0, 0 }, /* 131 = linux_quotactl */ - { AS(getpgid_args), (sy_call_t *)getpgid, AUE_GETPGID, NULL, 0, 0, 0 }, /* 132 = getpgid */ - { AS(fchdir_args), (sy_call_t *)fchdir, AUE_FCHDIR, NULL, 0, 0, 0 }, /* 133 = fchdir */ - { 0, (sy_call_t *)linux_bdflush, AUE_BDFLUSH, NULL, 0, 0, 0 }, /* 134 = linux_bdflush */ - { AS(linux_sysfs_args), (sy_call_t *)linux_sysfs, AUE_NULL, NULL, 0, 0, 0 }, /* 135 = linux_sysfs */ - { AS(linux_personality_args), (sy_call_t *)linux_personality, AUE_PERSONALITY, NULL, 0, 0, 0 }, /* 136 = linux_personality */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 137 = afs_syscall */ - { AS(linux_setfsuid16_args), (sy_call_t *)linux_setfsuid16, AUE_SETFSUID, NULL, 0, 0, 0 }, /* 138 = linux_setfsuid16 */ - { AS(linux_setfsgid16_args), (sy_call_t *)linux_setfsgid16, AUE_SETFSGID, NULL, 0, 0, 0 }, /* 139 = linux_setfsgid16 */ - { AS(linux_llseek_args), (sy_call_t *)linux_llseek, AUE_LSEEK, NULL, 0, 0, 0 }, /* 140 = linux_llseek */ - { AS(linux_getdents_args), (sy_call_t *)linux_getdents, AUE_GETDIRENTRIES, NULL, 0, 0, 0 }, /* 141 = linux_getdents */ - { AS(linux_select_args), (sy_call_t *)linux_select, AUE_SELECT, NULL, 0, 0, 0 }, /* 142 = linux_select */ - { AS(flock_args), (sy_call_t *)flock, AUE_FLOCK, NULL, 0, 0, 0 }, /* 143 = flock */ - { AS(linux_msync_args), (sy_call_t *)linux_msync, AUE_MSYNC, NULL, 0, 0, 0 }, /* 144 = linux_msync */ - { AS(linux_readv_args), (sy_call_t *)linux_readv, AUE_READV, NULL, 0, 0, 0 }, /* 145 = linux_readv */ - { AS(linux_writev_args), (sy_call_t *)linux_writev, AUE_WRITEV, NULL, 0, 0, 0 }, /* 146 = linux_writev */ - { AS(linux_getsid_args), (sy_call_t *)linux_getsid, AUE_GETSID, NULL, 0, 0, 0 }, /* 147 = linux_getsid */ - { AS(linux_fdatasync_args), (sy_call_t *)linux_fdatasync, AUE_NULL, NULL, 0, 0, 0 }, /* 148 = linux_fdatasync */ - { AS(linux_sysctl_args), (sy_call_t *)linux_sysctl, AUE_SYSCTL, NULL, 0, 0, 0 }, /* 149 = linux_sysctl */ - { AS(mlock_args), (sy_call_t *)mlock, AUE_MLOCK, NULL, 0, 0, 0 }, /* 150 = mlock */ - { AS(munlock_args), (sy_call_t *)munlock, AUE_MUNLOCK, NULL, 0, 0, 0 }, /* 151 = munlock */ - { AS(mlockall_args), (sy_call_t *)mlockall, AUE_MLOCKALL, NULL, 0, 0, 0 }, /* 152 = mlockall */ - { 0, (sy_call_t *)munlockall, AUE_MUNLOCKALL, NULL, 0, 0, 0 }, /* 153 = munlockall */ - { AS(sched_setparam_args), (sy_call_t *)sched_setparam, AUE_SCHED_SETPARAM, NULL, 0, 0, 0 }, /* 154 = sched_setparam */ - { AS(sched_getparam_args), (sy_call_t *)sched_getparam, AUE_SCHED_GETPARAM, NULL, 0, 0, 0 }, /* 155 = sched_getparam */ - { AS(linux_sched_setscheduler_args), (sy_call_t *)linux_sched_setscheduler, AUE_SCHED_SETSCHEDULER, NULL, 0, 0, 0 }, /* 156 = linux_sched_setscheduler */ - { AS(linux_sched_getscheduler_args), (sy_call_t *)linux_sched_getscheduler, AUE_SCHED_GETSCHEDULER, NULL, 0, 0, 0 }, /* 157 = linux_sched_getscheduler */ - { 0, (sy_call_t *)sched_yield, AUE_NULL, NULL, 0, 0, 0 }, /* 158 = sched_yield */ - { AS(linux_sched_get_priority_max_args), (sy_call_t *)linux_sched_get_priority_max, AUE_SCHED_GET_PRIORITY_MAX, NULL, 0, 0, 0 }, /* 159 = linux_sched_get_priority_max */ - { AS(linux_sched_get_priority_min_args), (sy_call_t *)linux_sched_get_priority_min, AUE_SCHED_GET_PRIORITY_MIN, NULL, 0, 0, 0 }, /* 160 = linux_sched_get_priority_min */ - { AS(linux_sched_rr_get_interval_args), (sy_call_t *)linux_sched_rr_get_interval, AUE_SCHED_RR_GET_INTERVAL, NULL, 0, 0, 0 }, /* 161 = linux_sched_rr_get_interval */ - { AS(linux_nanosleep_args), (sy_call_t *)linux_nanosleep, AUE_NULL, NULL, 0, 0, 0 }, /* 162 = linux_nanosleep */ - { AS(linux_mremap_args), (sy_call_t *)linux_mremap, AUE_NULL, NULL, 0, 0, 0 }, /* 163 = linux_mremap */ - { AS(linux_setresuid16_args), (sy_call_t *)linux_setresuid16, AUE_SETRESUID, NULL, 0, 0, 0 }, /* 164 = linux_setresuid16 */ - { AS(linux_getresuid16_args), (sy_call_t *)linux_getresuid16, AUE_GETRESUID, NULL, 0, 0, 0 }, /* 165 = linux_getresuid16 */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 166 = vm86 */ - { 0, (sy_call_t *)linux_query_module, AUE_NULL, NULL, 0, 0, 0 }, /* 167 = linux_query_module */ - { AS(poll_args), (sy_call_t *)poll, AUE_POLL, NULL, 0, 0, 0 }, /* 168 = poll */ - { 0, (sy_call_t *)linux_nfsservctl, AUE_NULL, NULL, 0, 0, 0 }, /* 169 = linux_nfsservctl */ - { AS(linux_setresgid16_args), (sy_call_t *)linux_setresgid16, AUE_SETRESGID, NULL, 0, 0, 0 }, /* 170 = linux_setresgid16 */ - { AS(linux_getresgid16_args), (sy_call_t *)linux_getresgid16, AUE_GETRESGID, NULL, 0, 0, 0 }, /* 171 = linux_getresgid16 */ - { AS(linux_prctl_args), (sy_call_t *)linux_prctl, AUE_PRCTL, NULL, 0, 0, 0 }, /* 172 = linux_prctl */ - { AS(linux_rt_sigreturn_args), (sy_call_t *)linux_rt_sigreturn, AUE_NULL, NULL, 0, 0, 0 }, /* 173 = linux_rt_sigreturn */ - { AS(linux_rt_sigaction_args), (sy_call_t *)linux_rt_sigaction, AUE_NULL, NULL, 0, 0, 0 }, /* 174 = linux_rt_sigaction */ - { AS(linux_rt_sigprocmask_args), (sy_call_t *)linux_rt_sigprocmask, AUE_NULL, NULL, 0, 0, 0 }, /* 175 = linux_rt_sigprocmask */ - { AS(linux_rt_sigpending_args), (sy_call_t *)linux_rt_sigpending, AUE_NULL, NULL, 0, 0, 0 }, /* 176 = linux_rt_sigpending */ - { AS(linux_rt_sigtimedwait_args), (sy_call_t *)linux_rt_sigtimedwait, AUE_NULL, NULL, 0, 0, 0 }, /* 177 = linux_rt_sigtimedwait */ - { 0, (sy_call_t *)linux_rt_sigqueueinfo, AUE_NULL, NULL, 0, 0, 0 }, /* 178 = linux_rt_sigqueueinfo */ - { AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend, AUE_NULL, NULL, 0, 0, 0 }, /* 179 = linux_rt_sigsuspend */ - { AS(linux_pread_args), (sy_call_t *)linux_pread, AUE_PREAD, NULL, 0, 0, 0 }, /* 180 = linux_pread */ - { AS(linux_pwrite_args), (sy_call_t *)linux_pwrite, AUE_PWRITE, NULL, 0, 0, 0 }, /* 181 = linux_pwrite */ - { AS(linux_chown16_args), (sy_call_t *)linux_chown16, AUE_CHOWN, NULL, 0, 0, 0 }, /* 182 = linux_chown16 */ - { AS(linux_getcwd_args), (sy_call_t *)linux_getcwd, AUE_GETCWD, NULL, 0, 0, 0 }, /* 183 = linux_getcwd */ - { 0, (sy_call_t *)linux_capget, AUE_CAPGET, NULL, 0, 0, 0 }, /* 184 = linux_capget */ - { 0, (sy_call_t *)linux_capset, AUE_CAPSET, NULL, 0, 0, 0 }, /* 185 = linux_capset */ - { AS(linux_sigaltstack_args), (sy_call_t *)linux_sigaltstack, AUE_NULL, NULL, 0, 0, 0 }, /* 186 = linux_sigaltstack */ - { 0, (sy_call_t *)linux_sendfile, AUE_SENDFILE, NULL, 0, 0, 0 }, /* 187 = linux_sendfile */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 188 = getpmsg */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 189 = putpmsg */ - { 0, (sy_call_t *)linux_vfork, AUE_VFORK, NULL, 0, 0, 0 }, /* 190 = linux_vfork */ - { AS(linux_getrlimit_args), (sy_call_t *)linux_getrlimit, AUE_GETRLIMIT, NULL, 0, 0, 0 }, /* 191 = linux_getrlimit */ - { AS(linux_mmap2_args), (sy_call_t *)linux_mmap2, AUE_MMAP, NULL, 0, 0, 0 }, /* 192 = linux_mmap2 */ - { AS(linux_truncate64_args), (sy_call_t *)linux_truncate64, AUE_TRUNCATE, NULL, 0, 0, 0 }, /* 193 = linux_truncate64 */ - { AS(linux_ftruncate64_args), (sy_call_t *)linux_ftruncate64, AUE_FTRUNCATE, NULL, 0, 0, 0 }, /* 194 = linux_ftruncate64 */ - { AS(linux_stat64_args), (sy_call_t *)linux_stat64, AUE_STAT, NULL, 0, 0, 0 }, /* 195 = linux_stat64 */ - { AS(linux_lstat64_args), (sy_call_t *)linux_lstat64, AUE_LSTAT, NULL, 0, 0, 0 }, /* 196 = linux_lstat64 */ - { AS(linux_fstat64_args), (sy_call_t *)linux_fstat64, AUE_FSTAT, NULL, 0, 0, 0 }, /* 197 = linux_fstat64 */ - { AS(linux_lchown_args), (sy_call_t *)linux_lchown, AUE_LCHOWN, NULL, 0, 0, 0 }, /* 198 = linux_lchown */ - { 0, (sy_call_t *)linux_getuid, AUE_GETUID, NULL, 0, 0, 0 }, /* 199 = linux_getuid */ - { 0, (sy_call_t *)linux_getgid, AUE_GETGID, NULL, 0, 0, 0 }, /* 200 = linux_getgid */ - { 0, (sy_call_t *)geteuid, AUE_GETEUID, NULL, 0, 0, 0 }, /* 201 = geteuid */ - { 0, (sy_call_t *)getegid, AUE_GETEGID, NULL, 0, 0, 0 }, /* 202 = getegid */ - { AS(setreuid_args), (sy_call_t *)setreuid, AUE_SETREUID, NULL, 0, 0, 0 }, /* 203 = setreuid */ - { AS(setregid_args), (sy_call_t *)setregid, AUE_SETREGID, NULL, 0, 0, 0 }, /* 204 = setregid */ - { AS(linux_getgroups_args), (sy_call_t *)linux_getgroups, AUE_GETGROUPS, NULL, 0, 0, 0 }, /* 205 = linux_getgroups */ - { AS(linux_setgroups_args), (sy_call_t *)linux_setgroups, AUE_SETGROUPS, NULL, 0, 0, 0 }, /* 206 = linux_setgroups */ - { AS(fchown_args), (sy_call_t *)fchown, AUE_NULL, NULL, 0, 0, 0 }, /* 207 = fchown */ - { AS(setresuid_args), (sy_call_t *)setresuid, AUE_SETRESUID, NULL, 0, 0, 0 }, /* 208 = setresuid */ - { AS(getresuid_args), (sy_call_t *)getresuid, AUE_GETRESUID, NULL, 0, 0, 0 }, /* 209 = getresuid */ - { AS(setresgid_args), (sy_call_t *)setresgid, AUE_SETRESGID, NULL, 0, 0, 0 }, /* 210 = setresgid */ - { AS(getresgid_args), (sy_call_t *)getresgid, AUE_GETRESGID, NULL, 0, 0, 0 }, /* 211 = getresgid */ - { AS(linux_chown_args), (sy_call_t *)linux_chown, AUE_CHOWN, NULL, 0, 0, 0 }, /* 212 = linux_chown */ - { AS(setuid_args), (sy_call_t *)setuid, AUE_SETUID, NULL, 0, 0, 0 }, /* 213 = setuid */ - { AS(setgid_args), (sy_call_t *)setgid, AUE_SETGID, NULL, 0, 0, 0 }, /* 214 = setgid */ - { AS(linux_setfsuid_args), (sy_call_t *)linux_setfsuid, AUE_SETFSUID, NULL, 0, 0, 0 }, /* 215 = linux_setfsuid */ - { AS(linux_setfsgid_args), (sy_call_t *)linux_setfsgid, AUE_SETFSGID, NULL, 0, 0, 0 }, /* 216 = linux_setfsgid */ - { AS(linux_pivot_root_args), (sy_call_t *)linux_pivot_root, AUE_PIVOT_ROOT, NULL, 0, 0, 0 }, /* 217 = linux_pivot_root */ - { AS(linux_mincore_args), (sy_call_t *)linux_mincore, AUE_MINCORE, NULL, 0, 0, 0 }, /* 218 = linux_mincore */ - { AS(madvise_args), (sy_call_t *)madvise, AUE_MADVISE, NULL, 0, 0, 0 }, /* 219 = madvise */ - { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64, AUE_GETDIRENTRIES, NULL, 0, 0, 0 }, /* 220 = linux_getdents64 */ - { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64, AUE_FCNTL, NULL, 0, 0, 0 }, /* 221 = linux_fcntl64 */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 222 = */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 223 = */ - { 0, (sy_call_t *)linux_gettid, AUE_NULL, NULL, 0, 0, 0 }, /* 224 = linux_gettid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 225 = linux_readahead */ - { 0, (sy_call_t *)linux_setxattr, AUE_NULL, NULL, 0, 0, 0 }, /* 226 = linux_setxattr */ - { 0, (sy_call_t *)linux_lsetxattr, AUE_NULL, NULL, 0, 0, 0 }, /* 227 = linux_lsetxattr */ - { 0, (sy_call_t *)linux_fsetxattr, AUE_NULL, NULL, 0, 0, 0 }, /* 228 = linux_fsetxattr */ - { 0, (sy_call_t *)linux_getxattr, AUE_NULL, NULL, 0, 0, 0 }, /* 229 = linux_getxattr */ - { 0, (sy_call_t *)linux_lgetxattr, AUE_NULL, NULL, 0, 0, 0 }, /* 230 = linux_lgetxattr */ - { 0, (sy_call_t *)linux_fgetxattr, AUE_NULL, NULL, 0, 0, 0 }, /* 231 = linux_fgetxattr */ - { 0, (sy_call_t *)linux_listxattr, AUE_NULL, NULL, 0, 0, 0 }, /* 232 = linux_listxattr */ - { 0, (sy_call_t *)linux_llistxattr, AUE_NULL, NULL, 0, 0, 0 }, /* 233 = linux_llistxattr */ - { 0, (sy_call_t *)linux_flistxattr, AUE_NULL, NULL, 0, 0, 0 }, /* 234 = linux_flistxattr */ - { 0, (sy_call_t *)linux_removexattr, AUE_NULL, NULL, 0, 0, 0 }, /* 235 = linux_removexattr */ - { 0, (sy_call_t *)linux_lremovexattr, AUE_NULL, NULL, 0, 0, 0 }, /* 236 = linux_lremovexattr */ - { 0, (sy_call_t *)linux_fremovexattr, AUE_NULL, NULL, 0, 0, 0 }, /* 237 = linux_fremovexattr */ - { AS(linux_tkill_args), (sy_call_t *)linux_tkill, AUE_NULL, NULL, 0, 0, 0 }, /* 238 = linux_tkill */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 239 = linux_sendfile64 */ - { AS(linux_sys_futex_args), (sy_call_t *)linux_sys_futex, AUE_NULL, NULL, 0, 0, 0 }, /* 240 = linux_sys_futex */ - { AS(linux_sched_setaffinity_args), (sy_call_t *)linux_sched_setaffinity, AUE_NULL, NULL, 0, 0, 0 }, /* 241 = linux_sched_setaffinity */ - { AS(linux_sched_getaffinity_args), (sy_call_t *)linux_sched_getaffinity, AUE_NULL, NULL, 0, 0, 0 }, /* 242 = linux_sched_getaffinity */ - { AS(linux_set_thread_area_args), (sy_call_t *)linux_set_thread_area, AUE_NULL, NULL, 0, 0, 0 }, /* 243 = linux_set_thread_area */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 244 = linux_get_thread_area */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 245 = linux_io_setup */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 246 = linux_io_destroy */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 247 = linux_io_getevents */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 248 = inux_io_submit */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 249 = linux_io_cancel */ - { 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0 }, /* 250 = linux_fadvise64 */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 251 = */ - { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0 }, /* 252 = linux_exit_group */ - { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0 }, /* 253 = linux_lookup_dcookie */ - { 0, (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0 }, /* 254 = linux_epoll_create */ - { 0, (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0, 0 }, /* 255 = linux_epoll_ctl */ - { 0, (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0 }, /* 256 = linux_epoll_wait */ - { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0, 0 }, /* 257 = linux_remap_file_pages */ - { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0, 0 }, /* 258 = linux_set_tid_address */ - { 0, (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0, 0 }, /* 259 = linux_timer_create */ - { 0, (sy_call_t *)linux_timer_settime, AUE_NULL, NULL, 0, 0, 0 }, /* 260 = linux_timer_settime */ - { 0, (sy_call_t *)linux_timer_gettime, AUE_NULL, NULL, 0, 0, 0 }, /* 261 = linux_timer_gettime */ - { 0, (sy_call_t *)linux_timer_getoverrun, AUE_NULL, NULL, 0, 0, 0 }, /* 262 = linux_timer_getoverrun */ - { 0, (sy_call_t *)linux_timer_delete, AUE_NULL, NULL, 0, 0, 0 }, /* 263 = linux_timer_delete */ - { AS(linux_clock_settime_args), (sy_call_t *)linux_clock_settime, AUE_CLOCK_SETTIME, NULL, 0, 0, 0 }, /* 264 = linux_clock_settime */ - { AS(linux_clock_gettime_args), (sy_call_t *)linux_clock_gettime, AUE_NULL, NULL, 0, 0, 0 }, /* 265 = linux_clock_gettime */ - { AS(linux_clock_getres_args), (sy_call_t *)linux_clock_getres, AUE_NULL, NULL, 0, 0, 0 }, /* 266 = linux_clock_getres */ - { AS(linux_clock_nanosleep_args), (sy_call_t *)linux_clock_nanosleep, AUE_NULL, NULL, 0, 0, 0 }, /* 267 = linux_clock_nanosleep */ - { AS(linux_statfs64_args), (sy_call_t *)linux_statfs64, AUE_STATFS, NULL, 0, 0, 0 }, /* 268 = linux_statfs64 */ - { 0, (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0, 0 }, /* 269 = linux_fstatfs64 */ - { AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0, 0 }, /* 270 = linux_tgkill */ - { AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0, 0 }, /* 271 = linux_utimes */ - { 0, (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0 }, /* 272 = linux_fadvise64_64 */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 273 = */ - { 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0, 0 }, /* 274 = linux_mbind */ - { 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0, 0 }, /* 275 = linux_get_mempolicy */ - { 0, (sy_call_t *)linux_set_mempolicy, AUE_NULL, NULL, 0, 0, 0 }, /* 276 = linux_set_mempolicy */ - { 0, (sy_call_t *)linux_mq_open, AUE_NULL, NULL, 0, 0, 0 }, /* 277 = linux_mq_open */ - { 0, (sy_call_t *)linux_mq_unlink, AUE_NULL, NULL, 0, 0, 0 }, /* 278 = linux_mq_unlink */ - { 0, (sy_call_t *)linux_mq_timedsend, AUE_NULL, NULL, 0, 0, 0 }, /* 279 = linux_mq_timedsend */ - { 0, (sy_call_t *)linux_mq_timedreceive, AUE_NULL, NULL, 0, 0, 0 }, /* 280 = linux_mq_timedreceive */ - { 0, (sy_call_t *)linux_mq_notify, AUE_NULL, NULL, 0, 0, 0 }, /* 281 = linux_mq_notify */ - { 0, (sy_call_t *)linux_mq_getsetattr, AUE_NULL, NULL, 0, 0, 0 }, /* 282 = linux_mq_getsetattr */ - { 0, (sy_call_t *)linux_kexec_load, AUE_NULL, NULL, 0, 0, 0 }, /* 283 = linux_kexec_load */ - { 0, (sy_call_t *)linux_waitid, AUE_NULL, NULL, 0, 0, 0 }, /* 284 = linux_waitid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 285 = */ - { 0, (sy_call_t *)linux_add_key, AUE_NULL, NULL, 0, 0, 0 }, /* 286 = linux_add_key */ - { 0, (sy_call_t *)linux_request_key, AUE_NULL, NULL, 0, 0, 0 }, /* 287 = linux_request_key */ - { 0, (sy_call_t *)linux_keyctl, AUE_NULL, NULL, 0, 0, 0 }, /* 288 = linux_keyctl */ - { 0, (sy_call_t *)linux_ioprio_set, AUE_NULL, NULL, 0, 0, 0 }, /* 289 = linux_ioprio_set */ - { 0, (sy_call_t *)linux_ioprio_get, AUE_NULL, NULL, 0, 0, 0 }, /* 290 = linux_ioprio_get */ - { 0, (sy_call_t *)linux_inotify_init, AUE_NULL, NULL, 0, 0, 0 }, /* 291 = linux_inotify_init */ - { 0, (sy_call_t *)linux_inotify_add_watch, AUE_NULL, NULL, 0, 0, 0 }, /* 292 = linux_inotify_add_watch */ - { 0, (sy_call_t *)linux_inotify_rm_watch, AUE_NULL, NULL, 0, 0, 0 }, /* 293 = linux_inotify_rm_watch */ - { 0, (sy_call_t *)linux_migrate_pages, AUE_NULL, NULL, 0, 0, 0 }, /* 294 = linux_migrate_pages */ - { AS(linux_openat_args), (sy_call_t *)linux_openat, AUE_OPEN_RWTC, NULL, 0, 0, 0 }, /* 295 = linux_openat */ - { AS(linux_mkdirat_args), (sy_call_t *)linux_mkdirat, AUE_MKDIRAT, NULL, 0, 0, 0 }, /* 296 = linux_mkdirat */ - { AS(linux_mknodat_args), (sy_call_t *)linux_mknodat, AUE_MKNODAT, NULL, 0, 0, 0 }, /* 297 = linux_mknodat */ - { AS(linux_fchownat_args), (sy_call_t *)linux_fchownat, AUE_FCHOWNAT, NULL, 0, 0, 0 }, /* 298 = linux_fchownat */ - { AS(linux_futimesat_args), (sy_call_t *)linux_futimesat, AUE_FUTIMESAT, NULL, 0, 0, 0 }, /* 299 = linux_futimesat */ - { AS(linux_fstatat64_args), (sy_call_t *)linux_fstatat64, AUE_FSTATAT, NULL, 0, 0, 0 }, /* 300 = linux_fstatat64 */ - { AS(linux_unlinkat_args), (sy_call_t *)linux_unlinkat, AUE_UNLINKAT, NULL, 0, 0, 0 }, /* 301 = linux_unlinkat */ - { AS(linux_renameat_args), (sy_call_t *)linux_renameat, AUE_RENAMEAT, NULL, 0, 0, 0 }, /* 302 = linux_renameat */ - { AS(linux_linkat_args), (sy_call_t *)linux_linkat, AUE_LINKAT, NULL, 0, 0, 0 }, /* 303 = linux_linkat */ - { AS(linux_symlinkat_args), (sy_call_t *)linux_symlinkat, AUE_SYMLINKAT, NULL, 0, 0, 0 }, /* 304 = linux_symlinkat */ - { AS(linux_readlinkat_args), (sy_call_t *)linux_readlinkat, AUE_READLINKAT, NULL, 0, 0, 0 }, /* 305 = linux_readlinkat */ - { AS(linux_fchmodat_args), (sy_call_t *)linux_fchmodat, AUE_FCHMODAT, NULL, 0, 0, 0 }, /* 306 = linux_fchmodat */ - { AS(linux_faccessat_args), (sy_call_t *)linux_faccessat, AUE_FACCESSAT, NULL, 0, 0, 0 }, /* 307 = linux_faccessat */ - { 0, (sy_call_t *)linux_pselect6, AUE_NULL, NULL, 0, 0, 0 }, /* 308 = linux_pselect6 */ - { 0, (sy_call_t *)linux_ppoll, AUE_NULL, NULL, 0, 0, 0 }, /* 309 = linux_ppoll */ - { 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0, 0 }, /* 310 = linux_unshare */ - { AS(linux_set_robust_list_args), (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0, 0 }, /* 311 = linux_set_robust_list */ - { AS(linux_get_robust_list_args), (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0, 0 }, /* 312 = linux_get_robust_list */ - { 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0, 0 }, /* 313 = linux_splice */ - { 0, (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0, 0 }, /* 314 = linux_sync_file_range */ - { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0, 0 }, /* 315 = linux_tee */ - { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0, 0 }, /* 316 = linux_vmsplice */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 0 = setup */ + { AS(sys_exit_args), (sy_call_t *)sys_exit, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 1 = exit */ + { 0, (sy_call_t *)linux_fork, AUE_FORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 2 = linux_fork */ + { AS(read_args), (sy_call_t *)read, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 3 = read */ + { AS(write_args), (sy_call_t *)write, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 4 = write */ + { AS(linux_open_args), (sy_call_t *)linux_open, AUE_OPEN_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 5 = linux_open */ + { AS(close_args), (sy_call_t *)close, AUE_CLOSE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 6 = close */ + { AS(linux_waitpid_args), (sy_call_t *)linux_waitpid, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC }, /* 7 = linux_waitpid */ + { AS(linux_creat_args), (sy_call_t *)linux_creat, AUE_CREAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 8 = linux_creat */ + { AS(linux_link_args), (sy_call_t *)linux_link, AUE_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 9 = linux_link */ + { AS(linux_unlink_args), (sy_call_t *)linux_unlink, AUE_UNLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 10 = linux_unlink */ + { AS(linux_execve_args), (sy_call_t *)linux_execve, AUE_EXECVE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 11 = linux_execve */ + { AS(linux_chdir_args), (sy_call_t *)linux_chdir, AUE_CHDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 12 = linux_chdir */ + { AS(linux_time_args), (sy_call_t *)linux_time, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 13 = linux_time */ + { AS(linux_mknod_args), (sy_call_t *)linux_mknod, AUE_MKNOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 14 = linux_mknod */ + { AS(linux_chmod_args), (sy_call_t *)linux_chmod, AUE_CHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 15 = linux_chmod */ + { AS(linux_lchown16_args), (sy_call_t *)linux_lchown16, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 16 = linux_lchown16 */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 17 = break */ + { AS(linux_stat_args), (sy_call_t *)linux_stat, AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 18 = linux_stat */ + { AS(linux_lseek_args), (sy_call_t *)linux_lseek, AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 19 = linux_lseek */ + { 0, (sy_call_t *)linux_getpid, AUE_GETPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 20 = linux_getpid */ + { AS(linux_mount_args), (sy_call_t *)linux_mount, AUE_MOUNT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 21 = linux_mount */ + { AS(linux_oldumount_args), (sy_call_t *)linux_oldumount, AUE_UMOUNT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 22 = linux_oldumount */ + { AS(linux_setuid16_args), (sy_call_t *)linux_setuid16, AUE_SETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 23 = linux_setuid16 */ + { 0, (sy_call_t *)linux_getuid16, AUE_GETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 24 = linux_getuid16 */ + { 0, (sy_call_t *)linux_stime, AUE_SETTIMEOFDAY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 25 = linux_stime */ + { AS(linux_ptrace_args), (sy_call_t *)linux_ptrace, AUE_PTRACE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 26 = linux_ptrace */ + { AS(linux_alarm_args), (sy_call_t *)linux_alarm, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 27 = linux_alarm */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 28 = fstat */ + { 0, (sy_call_t *)linux_pause, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 29 = linux_pause */ + { AS(linux_utime_args), (sy_call_t *)linux_utime, AUE_UTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 30 = linux_utime */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 31 = stty */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 32 = gtty */ + { AS(linux_access_args), (sy_call_t *)linux_access, AUE_ACCESS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 33 = linux_access */ + { AS(linux_nice_args), (sy_call_t *)linux_nice, AUE_NICE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 34 = linux_nice */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 35 = ftime */ + { 0, (sy_call_t *)sync, AUE_SYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 36 = sync */ + { AS(linux_kill_args), (sy_call_t *)linux_kill, AUE_KILL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 37 = linux_kill */ + { AS(linux_rename_args), (sy_call_t *)linux_rename, AUE_RENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 38 = linux_rename */ + { AS(linux_mkdir_args), (sy_call_t *)linux_mkdir, AUE_MKDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 39 = linux_mkdir */ + { AS(linux_rmdir_args), (sy_call_t *)linux_rmdir, AUE_RMDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 40 = linux_rmdir */ + { AS(dup_args), (sy_call_t *)dup, AUE_DUP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 41 = dup */ + { AS(linux_pipe_args), (sy_call_t *)linux_pipe, AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 42 = linux_pipe */ + { AS(linux_times_args), (sy_call_t *)linux_times, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 43 = linux_times */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 44 = prof */ + { AS(linux_brk_args), (sy_call_t *)linux_brk, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 45 = linux_brk */ + { AS(linux_setgid16_args), (sy_call_t *)linux_setgid16, AUE_SETGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 46 = linux_setgid16 */ + { 0, (sy_call_t *)linux_getgid16, AUE_GETGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 47 = linux_getgid16 */ + { AS(linux_signal_args), (sy_call_t *)linux_signal, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 48 = linux_signal */ + { 0, (sy_call_t *)linux_geteuid16, AUE_GETEUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 49 = linux_geteuid16 */ + { 0, (sy_call_t *)linux_getegid16, AUE_GETEGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 50 = linux_getegid16 */ + { AS(acct_args), (sy_call_t *)acct, AUE_ACCT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 51 = acct */ + { AS(linux_umount_args), (sy_call_t *)linux_umount, AUE_UMOUNT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 52 = linux_umount */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 53 = lock */ + { AS(linux_ioctl_args), (sy_call_t *)linux_ioctl, AUE_IOCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 54 = linux_ioctl */ + { AS(linux_fcntl_args), (sy_call_t *)linux_fcntl, AUE_FCNTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 55 = linux_fcntl */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 56 = mpx */ + { AS(setpgid_args), (sy_call_t *)setpgid, AUE_SETPGRP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 57 = setpgid */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 58 = ulimit */ + { 0, (sy_call_t *)linux_olduname, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 59 = linux_olduname */ + { AS(umask_args), (sy_call_t *)umask, AUE_UMASK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 60 = umask */ + { AS(chroot_args), (sy_call_t *)chroot, AUE_CHROOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 61 = chroot */ + { AS(linux_ustat_args), (sy_call_t *)linux_ustat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 62 = linux_ustat */ + { AS(dup2_args), (sy_call_t *)dup2, AUE_DUP2, NULL, 0, 0, 0, SY_THR_STATIC }, /* 63 = dup2 */ + { 0, (sy_call_t *)linux_getppid, AUE_GETPPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 64 = linux_getppid */ + { 0, (sy_call_t *)getpgrp, AUE_GETPGRP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 65 = getpgrp */ + { 0, (sy_call_t *)setsid, AUE_SETSID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 66 = setsid */ + { AS(linux_sigaction_args), (sy_call_t *)linux_sigaction, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 67 = linux_sigaction */ + { 0, (sy_call_t *)linux_sgetmask, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 68 = linux_sgetmask */ + { AS(linux_ssetmask_args), (sy_call_t *)linux_ssetmask, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 69 = linux_ssetmask */ + { AS(linux_setreuid16_args), (sy_call_t *)linux_setreuid16, AUE_SETREUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 70 = linux_setreuid16 */ + { AS(linux_setregid16_args), (sy_call_t *)linux_setregid16, AUE_SETREGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 71 = linux_setregid16 */ + { AS(linux_sigsuspend_args), (sy_call_t *)linux_sigsuspend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = linux_sigsuspend */ + { AS(linux_sigpending_args), (sy_call_t *)linux_sigpending, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 73 = linux_sigpending */ + { AS(linux_sethostname_args), (sy_call_t *)linux_sethostname, AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 74 = linux_sethostname */ + { AS(linux_setrlimit_args), (sy_call_t *)linux_setrlimit, AUE_SETRLIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 75 = linux_setrlimit */ + { AS(linux_old_getrlimit_args), (sy_call_t *)linux_old_getrlimit, AUE_GETRLIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 76 = linux_old_getrlimit */ + { AS(linux_getrusage_args), (sy_call_t *)linux_getrusage, AUE_GETRUSAGE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 77 = linux_getrusage */ + { AS(linux_gettimeofday_args), (sy_call_t *)linux_gettimeofday, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 78 = linux_gettimeofday */ + { AS(linux_settimeofday_args), (sy_call_t *)linux_settimeofday, AUE_SETTIMEOFDAY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 79 = linux_settimeofday */ + { AS(linux_getgroups16_args), (sy_call_t *)linux_getgroups16, AUE_GETGROUPS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 80 = linux_getgroups16 */ + { AS(linux_setgroups16_args), (sy_call_t *)linux_setgroups16, AUE_SETGROUPS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 81 = linux_setgroups16 */ + { AS(linux_old_select_args), (sy_call_t *)linux_old_select, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 82 = linux_old_select */ + { AS(linux_symlink_args), (sy_call_t *)linux_symlink, AUE_SYMLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 83 = linux_symlink */ + { AS(linux_lstat_args), (sy_call_t *)linux_lstat, AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 84 = linux_lstat */ + { AS(linux_readlink_args), (sy_call_t *)linux_readlink, AUE_READLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 85 = linux_readlink */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 86 = linux_uselib */ + { AS(swapon_args), (sy_call_t *)swapon, AUE_SWAPON, NULL, 0, 0, 0, SY_THR_STATIC }, /* 87 = swapon */ + { AS(linux_reboot_args), (sy_call_t *)linux_reboot, AUE_REBOOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 88 = linux_reboot */ + { AS(linux_readdir_args), (sy_call_t *)linux_readdir, AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 89 = linux_readdir */ + { AS(linux_mmap_args), (sy_call_t *)linux_mmap, AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 90 = linux_mmap */ + { AS(munmap_args), (sy_call_t *)munmap, AUE_MUNMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 91 = munmap */ + { AS(linux_truncate_args), (sy_call_t *)linux_truncate, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 92 = linux_truncate */ + { AS(linux_ftruncate_args), (sy_call_t *)linux_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 93 = linux_ftruncate */ + { AS(fchmod_args), (sy_call_t *)fchmod, AUE_FCHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 94 = fchmod */ + { AS(fchown_args), (sy_call_t *)fchown, AUE_FCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 95 = fchown */ + { AS(linux_getpriority_args), (sy_call_t *)linux_getpriority, AUE_GETPRIORITY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 96 = linux_getpriority */ + { AS(setpriority_args), (sy_call_t *)setpriority, AUE_SETPRIORITY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 97 = setpriority */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 98 = profil */ + { AS(linux_statfs_args), (sy_call_t *)linux_statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 99 = linux_statfs */ + { AS(linux_fstatfs_args), (sy_call_t *)linux_fstatfs, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 100 = linux_fstatfs */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 101 = ioperm */ + { AS(linux_socketcall_args), (sy_call_t *)linux_socketcall, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 102 = linux_socketcall */ + { AS(linux_syslog_args), (sy_call_t *)linux_syslog, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 103 = linux_syslog */ + { AS(linux_setitimer_args), (sy_call_t *)linux_setitimer, AUE_SETITIMER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 104 = linux_setitimer */ + { AS(linux_getitimer_args), (sy_call_t *)linux_getitimer, AUE_GETITIMER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 105 = linux_getitimer */ + { AS(linux_newstat_args), (sy_call_t *)linux_newstat, AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 106 = linux_newstat */ + { AS(linux_newlstat_args), (sy_call_t *)linux_newlstat, AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 107 = linux_newlstat */ + { AS(linux_newfstat_args), (sy_call_t *)linux_newfstat, AUE_FSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 108 = linux_newfstat */ + { 0, (sy_call_t *)linux_uname, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 109 = linux_uname */ + { AS(linux_iopl_args), (sy_call_t *)linux_iopl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 110 = linux_iopl */ + { 0, (sy_call_t *)linux_vhangup, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 111 = linux_vhangup */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 112 = idle */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 113 = vm86old */ + { AS(linux_wait4_args), (sy_call_t *)linux_wait4, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC }, /* 114 = linux_wait4 */ + { 0, (sy_call_t *)linux_swapoff, AUE_SWAPOFF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 115 = linux_swapoff */ + { AS(linux_sysinfo_args), (sy_call_t *)linux_sysinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 116 = linux_sysinfo */ + { AS(linux_ipc_args), (sy_call_t *)linux_ipc, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 117 = linux_ipc */ + { AS(fsync_args), (sy_call_t *)fsync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 118 = fsync */ + { AS(linux_sigreturn_args), (sy_call_t *)linux_sigreturn, AUE_SIGRETURN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 119 = linux_sigreturn */ + { AS(linux_clone_args), (sy_call_t *)linux_clone, AUE_RFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 120 = linux_clone */ + { AS(linux_setdomainname_args), (sy_call_t *)linux_setdomainname, AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 121 = linux_setdomainname */ + { AS(linux_newuname_args), (sy_call_t *)linux_newuname, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 122 = linux_newuname */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 123 = modify_ldt */ + { 0, (sy_call_t *)linux_adjtimex, AUE_ADJTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 124 = linux_adjtimex */ + { AS(linux_mprotect_args), (sy_call_t *)linux_mprotect, AUE_MPROTECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 125 = linux_mprotect */ + { AS(linux_sigprocmask_args), (sy_call_t *)linux_sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 126 = linux_sigprocmask */ + { 0, (sy_call_t *)linux_create_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 127 = linux_create_module */ + { 0, (sy_call_t *)linux_init_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 128 = linux_init_module */ + { 0, (sy_call_t *)linux_delete_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 129 = linux_delete_module */ + { 0, (sy_call_t *)linux_get_kernel_syms, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 130 = linux_get_kernel_syms */ + { 0, (sy_call_t *)linux_quotactl, AUE_QUOTACTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 131 = linux_quotactl */ + { AS(getpgid_args), (sy_call_t *)getpgid, AUE_GETPGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 132 = getpgid */ + { AS(fchdir_args), (sy_call_t *)fchdir, AUE_FCHDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 133 = fchdir */ + { 0, (sy_call_t *)linux_bdflush, AUE_BDFLUSH, NULL, 0, 0, 0, SY_THR_STATIC }, /* 134 = linux_bdflush */ + { AS(linux_sysfs_args), (sy_call_t *)linux_sysfs, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 135 = linux_sysfs */ + { AS(linux_personality_args), (sy_call_t *)linux_personality, AUE_PERSONALITY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 136 = linux_personality */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 137 = afs_syscall */ + { AS(linux_setfsuid16_args), (sy_call_t *)linux_setfsuid16, AUE_SETFSUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 138 = linux_setfsuid16 */ + { AS(linux_setfsgid16_args), (sy_call_t *)linux_setfsgid16, AUE_SETFSGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 139 = linux_setfsgid16 */ + { AS(linux_llseek_args), (sy_call_t *)linux_llseek, AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 140 = linux_llseek */ + { AS(linux_getdents_args), (sy_call_t *)linux_getdents, AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 141 = linux_getdents */ + { AS(linux_select_args), (sy_call_t *)linux_select, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 142 = linux_select */ + { AS(flock_args), (sy_call_t *)flock, AUE_FLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 143 = flock */ + { AS(linux_msync_args), (sy_call_t *)linux_msync, AUE_MSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 144 = linux_msync */ + { AS(linux_readv_args), (sy_call_t *)linux_readv, AUE_READV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 145 = linux_readv */ + { AS(linux_writev_args), (sy_call_t *)linux_writev, AUE_WRITEV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 146 = linux_writev */ + { AS(linux_getsid_args), (sy_call_t *)linux_getsid, AUE_GETSID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 147 = linux_getsid */ + { AS(linux_fdatasync_args), (sy_call_t *)linux_fdatasync, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 148 = linux_fdatasync */ + { AS(linux_sysctl_args), (sy_call_t *)linux_sysctl, AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 149 = linux_sysctl */ + { AS(mlock_args), (sy_call_t *)mlock, AUE_MLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 150 = mlock */ + { AS(munlock_args), (sy_call_t *)munlock, AUE_MUNLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 151 = munlock */ + { AS(mlockall_args), (sy_call_t *)mlockall, AUE_MLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 152 = mlockall */ + { 0, (sy_call_t *)munlockall, AUE_MUNLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 153 = munlockall */ + { AS(sched_setparam_args), (sy_call_t *)sched_setparam, AUE_SCHED_SETPARAM, NULL, 0, 0, 0, SY_THR_STATIC }, /* 154 = sched_setparam */ + { AS(sched_getparam_args), (sy_call_t *)sched_getparam, AUE_SCHED_GETPARAM, NULL, 0, 0, 0, SY_THR_STATIC }, /* 155 = sched_getparam */ + { AS(linux_sched_setscheduler_args), (sy_call_t *)linux_sched_setscheduler, AUE_SCHED_SETSCHEDULER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 156 = linux_sched_setscheduler */ + { AS(linux_sched_getscheduler_args), (sy_call_t *)linux_sched_getscheduler, AUE_SCHED_GETSCHEDULER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 157 = linux_sched_getscheduler */ + { 0, (sy_call_t *)sched_yield, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 158 = sched_yield */ + { AS(linux_sched_get_priority_max_args), (sy_call_t *)linux_sched_get_priority_max, AUE_SCHED_GET_PRIORITY_MAX, NULL, 0, 0, 0, SY_THR_STATIC }, /* 159 = linux_sched_get_priority_max */ + { AS(linux_sched_get_priority_min_args), (sy_call_t *)linux_sched_get_priority_min, AUE_SCHED_GET_PRIORITY_MIN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 160 = linux_sched_get_priority_min */ + { AS(linux_sched_rr_get_interval_args), (sy_call_t *)linux_sched_rr_get_interval, AUE_SCHED_RR_GET_INTERVAL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 161 = linux_sched_rr_get_interval */ + { AS(linux_nanosleep_args), (sy_call_t *)linux_nanosleep, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 162 = linux_nanosleep */ + { AS(linux_mremap_args), (sy_call_t *)linux_mremap, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 163 = linux_mremap */ + { AS(linux_setresuid16_args), (sy_call_t *)linux_setresuid16, AUE_SETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 164 = linux_setresuid16 */ + { AS(linux_getresuid16_args), (sy_call_t *)linux_getresuid16, AUE_GETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 165 = linux_getresuid16 */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 166 = vm86 */ + { 0, (sy_call_t *)linux_query_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 167 = linux_query_module */ + { AS(poll_args), (sy_call_t *)poll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 168 = poll */ + { 0, (sy_call_t *)linux_nfsservctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 169 = linux_nfsservctl */ + { AS(linux_setresgid16_args), (sy_call_t *)linux_setresgid16, AUE_SETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 170 = linux_setresgid16 */ + { AS(linux_getresgid16_args), (sy_call_t *)linux_getresgid16, AUE_GETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 171 = linux_getresgid16 */ + { AS(linux_prctl_args), (sy_call_t *)linux_prctl, AUE_PRCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 172 = linux_prctl */ + { AS(linux_rt_sigreturn_args), (sy_call_t *)linux_rt_sigreturn, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 173 = linux_rt_sigreturn */ + { AS(linux_rt_sigaction_args), (sy_call_t *)linux_rt_sigaction, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 174 = linux_rt_sigaction */ + { AS(linux_rt_sigprocmask_args), (sy_call_t *)linux_rt_sigprocmask, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 175 = linux_rt_sigprocmask */ + { AS(linux_rt_sigpending_args), (sy_call_t *)linux_rt_sigpending, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 176 = linux_rt_sigpending */ + { AS(linux_rt_sigtimedwait_args), (sy_call_t *)linux_rt_sigtimedwait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 177 = linux_rt_sigtimedwait */ + { 0, (sy_call_t *)linux_rt_sigqueueinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 178 = linux_rt_sigqueueinfo */ + { AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 179 = linux_rt_sigsuspend */ + { AS(linux_pread_args), (sy_call_t *)linux_pread, AUE_PREAD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 180 = linux_pread */ + { AS(linux_pwrite_args), (sy_call_t *)linux_pwrite, AUE_PWRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 181 = linux_pwrite */ + { AS(linux_chown16_args), (sy_call_t *)linux_chown16, AUE_CHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 182 = linux_chown16 */ + { AS(linux_getcwd_args), (sy_call_t *)linux_getcwd, AUE_GETCWD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 183 = linux_getcwd */ + { 0, (sy_call_t *)linux_capget, AUE_CAPGET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 184 = linux_capget */ + { 0, (sy_call_t *)linux_capset, AUE_CAPSET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 185 = linux_capset */ + { AS(linux_sigaltstack_args), (sy_call_t *)linux_sigaltstack, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 186 = linux_sigaltstack */ + { 0, (sy_call_t *)linux_sendfile, AUE_SENDFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 187 = linux_sendfile */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 188 = getpmsg */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 189 = putpmsg */ + { 0, (sy_call_t *)linux_vfork, AUE_VFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 190 = linux_vfork */ + { AS(linux_getrlimit_args), (sy_call_t *)linux_getrlimit, AUE_GETRLIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 191 = linux_getrlimit */ + { AS(linux_mmap2_args), (sy_call_t *)linux_mmap2, AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 192 = linux_mmap2 */ + { AS(linux_truncate64_args), (sy_call_t *)linux_truncate64, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 193 = linux_truncate64 */ + { AS(linux_ftruncate64_args), (sy_call_t *)linux_ftruncate64, AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 194 = linux_ftruncate64 */ + { AS(linux_stat64_args), (sy_call_t *)linux_stat64, AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 195 = linux_stat64 */ + { AS(linux_lstat64_args), (sy_call_t *)linux_lstat64, AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 196 = linux_lstat64 */ + { AS(linux_fstat64_args), (sy_call_t *)linux_fstat64, AUE_FSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 197 = linux_fstat64 */ + { AS(linux_lchown_args), (sy_call_t *)linux_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 198 = linux_lchown */ + { 0, (sy_call_t *)linux_getuid, AUE_GETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 199 = linux_getuid */ + { 0, (sy_call_t *)linux_getgid, AUE_GETGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 200 = linux_getgid */ + { 0, (sy_call_t *)geteuid, AUE_GETEUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 201 = geteuid */ + { 0, (sy_call_t *)getegid, AUE_GETEGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 202 = getegid */ + { AS(setreuid_args), (sy_call_t *)setreuid, AUE_SETREUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 203 = setreuid */ + { AS(setregid_args), (sy_call_t *)setregid, AUE_SETREGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 204 = setregid */ + { AS(linux_getgroups_args), (sy_call_t *)linux_getgroups, AUE_GETGROUPS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 205 = linux_getgroups */ + { AS(linux_setgroups_args), (sy_call_t *)linux_setgroups, AUE_SETGROUPS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 206 = linux_setgroups */ + { AS(fchown_args), (sy_call_t *)fchown, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 207 = fchown */ + { AS(setresuid_args), (sy_call_t *)setresuid, AUE_SETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 208 = setresuid */ + { AS(getresuid_args), (sy_call_t *)getresuid, AUE_GETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 209 = getresuid */ + { AS(setresgid_args), (sy_call_t *)setresgid, AUE_SETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 210 = setresgid */ + { AS(getresgid_args), (sy_call_t *)getresgid, AUE_GETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 211 = getresgid */ + { AS(linux_chown_args), (sy_call_t *)linux_chown, AUE_CHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 212 = linux_chown */ + { AS(setuid_args), (sy_call_t *)setuid, AUE_SETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 213 = setuid */ + { AS(setgid_args), (sy_call_t *)setgid, AUE_SETGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 214 = setgid */ + { AS(linux_setfsuid_args), (sy_call_t *)linux_setfsuid, AUE_SETFSUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 215 = linux_setfsuid */ + { AS(linux_setfsgid_args), (sy_call_t *)linux_setfsgid, AUE_SETFSGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 216 = linux_setfsgid */ + { AS(linux_pivot_root_args), (sy_call_t *)linux_pivot_root, AUE_PIVOT_ROOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 217 = linux_pivot_root */ + { AS(linux_mincore_args), (sy_call_t *)linux_mincore, AUE_MINCORE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 218 = linux_mincore */ + { AS(madvise_args), (sy_call_t *)madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 219 = madvise */ + { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64, AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 220 = linux_getdents64 */ + { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64, AUE_FCNTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 221 = linux_fcntl64 */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 222 = */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 223 = */ + { 0, (sy_call_t *)linux_gettid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 224 = linux_gettid */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 225 = linux_readahead */ + { 0, (sy_call_t *)linux_setxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 226 = linux_setxattr */ + { 0, (sy_call_t *)linux_lsetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 227 = linux_lsetxattr */ + { 0, (sy_call_t *)linux_fsetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 228 = linux_fsetxattr */ + { 0, (sy_call_t *)linux_getxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 229 = linux_getxattr */ + { 0, (sy_call_t *)linux_lgetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 230 = linux_lgetxattr */ + { 0, (sy_call_t *)linux_fgetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 231 = linux_fgetxattr */ + { 0, (sy_call_t *)linux_listxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 232 = linux_listxattr */ + { 0, (sy_call_t *)linux_llistxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 233 = linux_llistxattr */ + { 0, (sy_call_t *)linux_flistxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 234 = linux_flistxattr */ + { 0, (sy_call_t *)linux_removexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 235 = linux_removexattr */ + { 0, (sy_call_t *)linux_lremovexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 236 = linux_lremovexattr */ + { 0, (sy_call_t *)linux_fremovexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 237 = linux_fremovexattr */ + { AS(linux_tkill_args), (sy_call_t *)linux_tkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 238 = linux_tkill */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 239 = linux_sendfile64 */ + { AS(linux_sys_futex_args), (sy_call_t *)linux_sys_futex, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 240 = linux_sys_futex */ + { AS(linux_sched_setaffinity_args), (sy_call_t *)linux_sched_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 241 = linux_sched_setaffinity */ + { AS(linux_sched_getaffinity_args), (sy_call_t *)linux_sched_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 242 = linux_sched_getaffinity */ + { AS(linux_set_thread_area_args), (sy_call_t *)linux_set_thread_area, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 243 = linux_set_thread_area */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 244 = linux_get_thread_area */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 245 = linux_io_setup */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 246 = linux_io_destroy */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 247 = linux_io_getevents */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 248 = inux_io_submit */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 249 = linux_io_cancel */ + { 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = linux_fadvise64 */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 251 = */ + { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = linux_exit_group */ + { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = linux_lookup_dcookie */ + { 0, (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = linux_epoll_create */ + { 0, (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = linux_epoll_ctl */ + { 0, (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = linux_epoll_wait */ + { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 257 = linux_remap_file_pages */ + { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 258 = linux_set_tid_address */ + { 0, (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 259 = linux_timer_create */ + { 0, (sy_call_t *)linux_timer_settime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 260 = linux_timer_settime */ + { 0, (sy_call_t *)linux_timer_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 261 = linux_timer_gettime */ + { 0, (sy_call_t *)linux_timer_getoverrun, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 262 = linux_timer_getoverrun */ + { 0, (sy_call_t *)linux_timer_delete, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 263 = linux_timer_delete */ + { AS(linux_clock_settime_args), (sy_call_t *)linux_clock_settime, AUE_CLOCK_SETTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 264 = linux_clock_settime */ + { AS(linux_clock_gettime_args), (sy_call_t *)linux_clock_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 265 = linux_clock_gettime */ + { AS(linux_clock_getres_args), (sy_call_t *)linux_clock_getres, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 266 = linux_clock_getres */ + { AS(linux_clock_nanosleep_args), (sy_call_t *)linux_clock_nanosleep, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 267 = linux_clock_nanosleep */ + { AS(linux_statfs64_args), (sy_call_t *)linux_statfs64, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 268 = linux_statfs64 */ + { 0, (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 269 = linux_fstatfs64 */ + { AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 270 = linux_tgkill */ + { AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 271 = linux_utimes */ + { 0, (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 273 = */ + { 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 274 = linux_mbind */ + { 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = linux_get_mempolicy */ + { 0, (sy_call_t *)linux_set_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 276 = linux_set_mempolicy */ + { 0, (sy_call_t *)linux_mq_open, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 277 = linux_mq_open */ + { 0, (sy_call_t *)linux_mq_unlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 278 = linux_mq_unlink */ + { 0, (sy_call_t *)linux_mq_timedsend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 279 = linux_mq_timedsend */ + { 0, (sy_call_t *)linux_mq_timedreceive, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 280 = linux_mq_timedreceive */ + { 0, (sy_call_t *)linux_mq_notify, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 281 = linux_mq_notify */ + { 0, (sy_call_t *)linux_mq_getsetattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 282 = linux_mq_getsetattr */ + { 0, (sy_call_t *)linux_kexec_load, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 283 = linux_kexec_load */ + { 0, (sy_call_t *)linux_waitid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 284 = linux_waitid */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 285 = */ + { 0, (sy_call_t *)linux_add_key, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 286 = linux_add_key */ + { 0, (sy_call_t *)linux_request_key, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 287 = linux_request_key */ + { 0, (sy_call_t *)linux_keyctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 288 = linux_keyctl */ + { 0, (sy_call_t *)linux_ioprio_set, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 289 = linux_ioprio_set */ + { 0, (sy_call_t *)linux_ioprio_get, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 290 = linux_ioprio_get */ + { 0, (sy_call_t *)linux_inotify_init, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 291 = linux_inotify_init */ + { 0, (sy_call_t *)linux_inotify_add_watch, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 292 = linux_inotify_add_watch */ + { 0, (sy_call_t *)linux_inotify_rm_watch, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 293 = linux_inotify_rm_watch */ + { 0, (sy_call_t *)linux_migrate_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 294 = linux_migrate_pages */ + { AS(linux_openat_args), (sy_call_t *)linux_openat, AUE_OPEN_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 295 = linux_openat */ + { AS(linux_mkdirat_args), (sy_call_t *)linux_mkdirat, AUE_MKDIRAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 296 = linux_mkdirat */ + { AS(linux_mknodat_args), (sy_call_t *)linux_mknodat, AUE_MKNODAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 297 = linux_mknodat */ + { AS(linux_fchownat_args), (sy_call_t *)linux_fchownat, AUE_FCHOWNAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 298 = linux_fchownat */ + { AS(linux_futimesat_args), (sy_call_t *)linux_futimesat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 299 = linux_futimesat */ + { AS(linux_fstatat64_args), (sy_call_t *)linux_fstatat64, AUE_FSTATAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 300 = linux_fstatat64 */ + { AS(linux_unlinkat_args), (sy_call_t *)linux_unlinkat, AUE_UNLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 301 = linux_unlinkat */ + { AS(linux_renameat_args), (sy_call_t *)linux_renameat, AUE_RENAMEAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 302 = linux_renameat */ + { AS(linux_linkat_args), (sy_call_t *)linux_linkat, AUE_LINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 303 = linux_linkat */ + { AS(linux_symlinkat_args), (sy_call_t *)linux_symlinkat, AUE_SYMLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 304 = linux_symlinkat */ + { AS(linux_readlinkat_args), (sy_call_t *)linux_readlinkat, AUE_READLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 305 = linux_readlinkat */ + { AS(linux_fchmodat_args), (sy_call_t *)linux_fchmodat, AUE_FCHMODAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 306 = linux_fchmodat */ + { AS(linux_faccessat_args), (sy_call_t *)linux_faccessat, AUE_FACCESSAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 307 = linux_faccessat */ + { 0, (sy_call_t *)linux_pselect6, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 308 = linux_pselect6 */ + { 0, (sy_call_t *)linux_ppoll, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 309 = linux_ppoll */ + { 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 310 = linux_unshare */ + { AS(linux_set_robust_list_args), (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = linux_set_robust_list */ + { AS(linux_get_robust_list_args), (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = linux_get_robust_list */ + { 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 313 = linux_splice */ + { 0, (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 314 = linux_sync_file_range */ + { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = linux_tee */ + { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = linux_vmsplice */ }; Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Mon Jun 28 18:12:42 2010 (r209580) +++ head/sys/compat/freebsd32/freebsd32_proto.h Mon Jun 28 18:17:21 2010 (r209581) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205325 2010-03-19 11:10:24Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 209579 2010-06-28 18:06:46Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Mon Jun 28 18:12:42 2010 (r209580) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Mon Jun 28 18:17:21 2010 (r209581) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205325 2010-03-19 11:10:24Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 209579 2010-06-28 18:06:46Z kib */ #define FREEBSD32_SYS_syscall 0 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Mon Jun 28 18:12:42 2010 (r209580) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Mon Jun 28 18:17:21 2010 (r209581) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205325 2010-03-19 11:10:24Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 209579 2010-06-28 18:06:46Z kib */ const char *freebsd32_syscallnames[] = { Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Mon Jun 28 18:12:42 2010 (r209580) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Mon Jun 28 18:17:21 2010 (r209581) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205325 2010-03-19 11:10:24Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 209579 2010-06-28 18:06:46Z kib */ #include "opt_compat.h" @@ -47,540 +47,540 @@ struct sysent freebsd32_sysent[] = { #if !defined(PAD64_REQUIRED) && defined(__powerpc__) #define PAD64_REQUIRED #endif - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 0 = syscall */ - { AS(sys_exit_args), (sy_call_t *)sys_exit, AUE_EXIT, NULL, 0, 0, 0 }, /* 1 = exit */ - { 0, (sy_call_t *)fork, AUE_FORK, NULL, 0, 0, 0 }, /* 2 = fork */ - { AS(read_args), (sy_call_t *)read, AUE_READ, NULL, 0, 0, 0 }, /* 3 = read */ - { AS(write_args), (sy_call_t *)write, AUE_WRITE, NULL, 0, 0, 0 }, /* 4 = write */ - { AS(open_args), (sy_call_t *)open, AUE_OPEN_RWTC, NULL, 0, 0, 0 }, /* 5 = open */ - { AS(close_args), (sy_call_t *)close, AUE_CLOSE, NULL, 0, 0, 0 }, /* 6 = close */ - { AS(freebsd32_wait4_args), (sy_call_t *)freebsd32_wait4, AUE_WAIT4, NULL, 0, 0, 0 }, /* 7 = freebsd32_wait4 */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 8 = obsolete old creat */ - { AS(link_args), (sy_call_t *)link, AUE_LINK, NULL, 0, 0, 0 }, /* 9 = link */ - { AS(unlink_args), (sy_call_t *)unlink, AUE_UNLINK, NULL, 0, 0, 0 }, /* 10 = unlink */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 11 = obsolete execv */ - { AS(chdir_args), (sy_call_t *)chdir, AUE_CHDIR, NULL, 0, 0, 0 }, /* 12 = chdir */ - { AS(fchdir_args), (sy_call_t *)fchdir, AUE_FCHDIR, NULL, 0, 0, 0 }, /* 13 = fchdir */ - { AS(mknod_args), (sy_call_t *)mknod, AUE_MKNOD, NULL, 0, 0, 0 }, /* 14 = mknod */ - { AS(chmod_args), (sy_call_t *)chmod, AUE_CHMOD, NULL, 0, 0, 0 }, /* 15 = chmod */ - { AS(chown_args), (sy_call_t *)chown, AUE_CHOWN, NULL, 0, 0, 0 }, /* 16 = chown */ - { AS(obreak_args), (sy_call_t *)obreak, AUE_NULL, NULL, 0, 0, 0 }, /* 17 = break */ - { compat4(AS(freebsd4_freebsd32_getfsstat_args),freebsd32_getfsstat), AUE_GETFSSTAT, NULL, 0, 0, 0 }, /* 18 = freebsd4 freebsd32_getfsstat */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 19 = obsolete olseek */ - { 0, (sy_call_t *)getpid, AUE_GETPID, NULL, 0, 0, 0 }, /* 20 = getpid */ - { AS(mount_args), (sy_call_t *)mount, AUE_MOUNT, NULL, 0, 0, 0 }, /* 21 = mount */ - { AS(unmount_args), (sy_call_t *)unmount, AUE_UMOUNT, NULL, 0, 0, 0 }, /* 22 = unmount */ - { AS(setuid_args), (sy_call_t *)setuid, AUE_SETUID, NULL, 0, 0, 0 }, /* 23 = setuid */ - { 0, (sy_call_t *)getuid, AUE_GETUID, NULL, 0, 0, 0 }, /* 24 = getuid */ - { 0, (sy_call_t *)geteuid, AUE_GETEUID, NULL, 0, 0, 0 }, /* 25 = geteuid */ - { AS(ptrace_args), (sy_call_t *)ptrace, AUE_PTRACE, NULL, 0, 0, 0 }, /* 26 = ptrace */ - { AS(freebsd32_recvmsg_args), (sy_call_t *)freebsd32_recvmsg, AUE_RECVMSG, NULL, 0, 0, 0 }, /* 27 = freebsd32_recvmsg */ - { AS(freebsd32_sendmsg_args), (sy_call_t *)freebsd32_sendmsg, AUE_SENDMSG, NULL, 0, 0, 0 }, /* 28 = freebsd32_sendmsg */ - { AS(freebsd32_recvfrom_args), (sy_call_t *)freebsd32_recvfrom, AUE_RECVFROM, NULL, 0, 0, 0 }, /* 29 = freebsd32_recvfrom */ - { AS(accept_args), (sy_call_t *)accept, AUE_ACCEPT, NULL, 0, 0, 0 }, /* 30 = accept */ - { AS(getpeername_args), (sy_call_t *)getpeername, AUE_GETPEERNAME, NULL, 0, 0, 0 }, /* 31 = getpeername */ - { AS(getsockname_args), (sy_call_t *)getsockname, AUE_GETSOCKNAME, NULL, 0, 0, 0 }, /* 32 = getsockname */ - { AS(access_args), (sy_call_t *)access, AUE_ACCESS, NULL, 0, 0, 0 }, /* 33 = access */ - { AS(chflags_args), (sy_call_t *)chflags, AUE_CHFLAGS, NULL, 0, 0, 0 }, /* 34 = chflags */ - { AS(fchflags_args), (sy_call_t *)fchflags, AUE_FCHFLAGS, NULL, 0, 0, 0 }, /* 35 = fchflags */ - { 0, (sy_call_t *)sync, AUE_SYNC, NULL, 0, 0, 0 }, /* 36 = sync */ - { AS(kill_args), (sy_call_t *)kill, AUE_KILL, NULL, 0, 0, 0 }, /* 37 = kill */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 38 = ostat */ - { 0, (sy_call_t *)getppid, AUE_GETPPID, NULL, 0, 0, 0 }, /* 39 = getppid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 40 = olstat */ - { AS(dup_args), (sy_call_t *)dup, AUE_DUP, NULL, 0, 0, 0 }, /* 41 = dup */ - { 0, (sy_call_t *)pipe, AUE_PIPE, NULL, 0, 0, 0 }, /* 42 = pipe */ - { 0, (sy_call_t *)getegid, AUE_GETEGID, NULL, 0, 0, 0 }, /* 43 = getegid */ - { AS(profil_args), (sy_call_t *)profil, AUE_PROFILE, NULL, 0, 0, 0 }, /* 44 = profil */ - { AS(ktrace_args), (sy_call_t *)ktrace, AUE_KTRACE, NULL, 0, 0, 0 }, /* 45 = ktrace */ - { compat(AS(ofreebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0, 0 }, /* 46 = old freebsd32_sigaction */ - { 0, (sy_call_t *)getgid, AUE_GETGID, NULL, 0, 0, 0 }, /* 47 = getgid */ - { compat(AS(ofreebsd32_sigprocmask_args),freebsd32_sigprocmask), AUE_SIGPROCMASK, NULL, 0, 0, 0 }, /* 48 = old freebsd32_sigprocmask */ - { AS(getlogin_args), (sy_call_t *)getlogin, AUE_GETLOGIN, NULL, 0, 0, 0 }, /* 49 = getlogin */ - { AS(setlogin_args), (sy_call_t *)setlogin, AUE_SETLOGIN, NULL, 0, 0, 0 }, /* 50 = setlogin */ - { AS(acct_args), (sy_call_t *)acct, AUE_ACCT, NULL, 0, 0, 0 }, /* 51 = acct */ - { compat(0,freebsd32_sigpending), AUE_SIGPENDING, NULL, 0, 0, 0 }, /* 52 = old freebsd32_sigpending */ - { AS(freebsd32_sigaltstack_args), (sy_call_t *)freebsd32_sigaltstack, AUE_SIGALTSTACK, NULL, 0, 0, 0 }, /* 53 = freebsd32_sigaltstack */ - { AS(freebsd32_ioctl_args), (sy_call_t *)freebsd32_ioctl, AUE_NULL, NULL, 0, 0, 0 }, /* 54 = freebsd32_ioctl */ - { AS(reboot_args), (sy_call_t *)reboot, AUE_REBOOT, NULL, 0, 0, 0 }, /* 55 = reboot */ - { AS(revoke_args), (sy_call_t *)revoke, AUE_REVOKE, NULL, 0, 0, 0 }, /* 56 = revoke */ - { AS(symlink_args), (sy_call_t *)symlink, AUE_SYMLINK, NULL, 0, 0, 0 }, /* 57 = symlink */ - { AS(readlink_args), (sy_call_t *)readlink, AUE_READLINK, NULL, 0, 0, 0 }, /* 58 = readlink */ - { AS(freebsd32_execve_args), (sy_call_t *)freebsd32_execve, AUE_EXECVE, NULL, 0, 0, 0 }, /* 59 = freebsd32_execve */ - { AS(umask_args), (sy_call_t *)umask, AUE_UMASK, NULL, 0, 0, 0 }, /* 60 = umask */ - { AS(chroot_args), (sy_call_t *)chroot, AUE_CHROOT, NULL, 0, 0, 0 }, /* 61 = chroot */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 62 = obsolete ofstat */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 63 = obsolete ogetkerninfo */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 64 = obsolete ogetpagesize */ - { AS(msync_args), (sy_call_t *)msync, AUE_MSYNC, NULL, 0, 0, 0 }, /* 65 = msync */ - { 0, (sy_call_t *)vfork, AUE_VFORK, NULL, 0, 0, 0 }, /* 66 = vfork */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 67 = obsolete vread */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 68 = obsolete vwrite */ - { AS(sbrk_args), (sy_call_t *)sbrk, AUE_SBRK, NULL, 0, 0, 0 }, /* 69 = sbrk */ - { AS(sstk_args), (sy_call_t *)sstk, AUE_SSTK, NULL, 0, 0, 0 }, /* 70 = sstk */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 71 = obsolete ommap */ - { AS(ovadvise_args), (sy_call_t *)ovadvise, AUE_O_VADVISE, NULL, 0, 0, 0 }, /* 72 = vadvise */ - { AS(munmap_args), (sy_call_t *)munmap, AUE_MUNMAP, NULL, 0, 0, 0 }, /* 73 = munmap */ - { AS(mprotect_args), (sy_call_t *)mprotect, AUE_MPROTECT, NULL, 0, 0, 0 }, /* 74 = mprotect */ - { AS(madvise_args), (sy_call_t *)madvise, AUE_MADVISE, NULL, 0, 0, 0 }, /* 75 = madvise */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 76 = obsolete vhangup */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 77 = obsolete vlimit */ - { AS(mincore_args), (sy_call_t *)mincore, AUE_MINCORE, NULL, 0, 0, 0 }, /* 78 = mincore */ - { AS(getgroups_args), (sy_call_t *)getgroups, AUE_GETGROUPS, NULL, 0, 0, 0 }, /* 79 = getgroups */ - { AS(setgroups_args), (sy_call_t *)setgroups, AUE_SETGROUPS, NULL, 0, 0, 0 }, /* 80 = setgroups */ - { 0, (sy_call_t *)getpgrp, AUE_GETPGRP, NULL, 0, 0, 0 }, /* 81 = getpgrp */ - { AS(setpgid_args), (sy_call_t *)setpgid, AUE_SETPGRP, NULL, 0, 0, 0 }, /* 82 = setpgid */ - { AS(freebsd32_setitimer_args), (sy_call_t *)freebsd32_setitimer, AUE_SETITIMER, NULL, 0, 0, 0 }, /* 83 = freebsd32_setitimer */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 84 = obsolete owait */ - { AS(swapon_args), (sy_call_t *)swapon, AUE_SWAPON, NULL, 0, 0, 0 }, /* 85 = swapon */ - { AS(freebsd32_getitimer_args), (sy_call_t *)freebsd32_getitimer, AUE_GETITIMER, NULL, 0, 0, 0 }, /* 86 = freebsd32_getitimer */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 87 = obsolete ogethostname */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 88 = obsolete osethostname */ - { 0, (sy_call_t *)getdtablesize, AUE_GETDTABLESIZE, NULL, 0, 0, 0 }, /* 89 = getdtablesize */ - { AS(dup2_args), (sy_call_t *)dup2, AUE_DUP2, NULL, 0, 0, 0 }, /* 90 = dup2 */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 91 = getdopt */ - { AS(fcntl_args), (sy_call_t *)fcntl, AUE_FCNTL, NULL, 0, 0, 0 }, /* 92 = fcntl */ - { AS(freebsd32_select_args), (sy_call_t *)freebsd32_select, AUE_SELECT, NULL, 0, 0, 0 }, /* 93 = freebsd32_select */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 94 = setdopt */ - { AS(fsync_args), (sy_call_t *)fsync, AUE_FSYNC, NULL, 0, 0, 0 }, /* 95 = fsync */ - { AS(setpriority_args), (sy_call_t *)setpriority, AUE_SETPRIORITY, NULL, 0, 0, 0 }, /* 96 = setpriority */ - { AS(socket_args), (sy_call_t *)socket, AUE_SOCKET, NULL, 0, 0, 0 }, /* 97 = socket */ - { AS(connect_args), (sy_call_t *)connect, AUE_CONNECT, NULL, 0, 0, 0 }, /* 98 = connect */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 99 = obsolete oaccept */ - { AS(getpriority_args), (sy_call_t *)getpriority, AUE_GETPRIORITY, NULL, 0, 0, 0 }, /* 100 = getpriority */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 101 = obsolete osend */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 102 = obsolete orecv */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 103 = obsolete osigreturn */ - { AS(bind_args), (sy_call_t *)bind, AUE_BIND, NULL, 0, 0, 0 }, /* 104 = bind */ - { AS(setsockopt_args), (sy_call_t *)setsockopt, AUE_SETSOCKOPT, NULL, 0, 0, 0 }, /* 105 = setsockopt */ - { AS(listen_args), (sy_call_t *)listen, AUE_LISTEN, NULL, 0, 0, 0 }, /* 106 = listen */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 107 = obsolete vtimes */ - { compat(AS(ofreebsd32_sigvec_args),freebsd32_sigvec), AUE_O_SIGVEC, NULL, 0, 0, 0 }, /* 108 = old freebsd32_sigvec */ - { compat(AS(ofreebsd32_sigblock_args),freebsd32_sigblock), AUE_O_SIGBLOCK, NULL, 0, 0, 0 }, /* 109 = old freebsd32_sigblock */ - { compat(AS(ofreebsd32_sigsetmask_args),freebsd32_sigsetmask), AUE_O_SIGSETMASK, NULL, 0, 0, 0 }, /* 110 = old freebsd32_sigsetmask */ - { compat(AS(ofreebsd32_sigsuspend_args),freebsd32_sigsuspend), AUE_SIGSUSPEND, NULL, 0, 0, 0 }, /* 111 = old freebsd32_sigsuspend */ - { compat(AS(ofreebsd32_sigstack_args),freebsd32_sigstack), AUE_O_SIGSTACK, NULL, 0, 0, 0 }, /* 112 = old freebsd32_sigstack */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 113 = obsolete orecvmsg */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 114 = obsolete osendmsg */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 115 = obsolete vtrace */ - { AS(freebsd32_gettimeofday_args), (sy_call_t *)freebsd32_gettimeofday, AUE_GETTIMEOFDAY, NULL, 0, 0, 0 }, /* 116 = freebsd32_gettimeofday */ - { AS(freebsd32_getrusage_args), (sy_call_t *)freebsd32_getrusage, AUE_GETRUSAGE, NULL, 0, 0, 0 }, /* 117 = freebsd32_getrusage */ - { AS(getsockopt_args), (sy_call_t *)getsockopt, AUE_GETSOCKOPT, NULL, 0, 0, 0 }, /* 118 = getsockopt */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 119 = resuba */ - { AS(freebsd32_readv_args), (sy_call_t *)freebsd32_readv, AUE_READV, NULL, 0, 0, 0 }, /* 120 = freebsd32_readv */ - { AS(freebsd32_writev_args), (sy_call_t *)freebsd32_writev, AUE_WRITEV, NULL, 0, 0, 0 }, /* 121 = freebsd32_writev */ - { AS(freebsd32_settimeofday_args), (sy_call_t *)freebsd32_settimeofday, AUE_SETTIMEOFDAY, NULL, 0, 0, 0 }, /* 122 = freebsd32_settimeofday */ - { AS(fchown_args), (sy_call_t *)fchown, AUE_FCHOWN, NULL, 0, 0, 0 }, /* 123 = fchown */ - { AS(fchmod_args), (sy_call_t *)fchmod, AUE_FCHMOD, NULL, 0, 0, 0 }, /* 124 = fchmod */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 125 = obsolete orecvfrom */ - { AS(setreuid_args), (sy_call_t *)setreuid, AUE_SETREUID, NULL, 0, 0, 0 }, /* 126 = setreuid */ - { AS(setregid_args), (sy_call_t *)setregid, AUE_SETREGID, NULL, 0, 0, 0 }, /* 127 = setregid */ - { AS(rename_args), (sy_call_t *)rename, AUE_RENAME, NULL, 0, 0, 0 }, /* 128 = rename */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 129 = obsolete otruncate */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 130 = obsolete ftruncate */ - { AS(flock_args), (sy_call_t *)flock, AUE_FLOCK, NULL, 0, 0, 0 }, /* 131 = flock */ - { AS(mkfifo_args), (sy_call_t *)mkfifo, AUE_MKFIFO, NULL, 0, 0, 0 }, /* 132 = mkfifo */ - { AS(sendto_args), (sy_call_t *)sendto, AUE_SENDTO, NULL, 0, 0, 0 }, /* 133 = sendto */ - { AS(shutdown_args), (sy_call_t *)shutdown, AUE_SHUTDOWN, NULL, 0, 0, 0 }, /* 134 = shutdown */ - { AS(socketpair_args), (sy_call_t *)socketpair, AUE_SOCKETPAIR, NULL, 0, 0, 0 }, /* 135 = socketpair */ - { AS(mkdir_args), (sy_call_t *)mkdir, AUE_MKDIR, NULL, 0, 0, 0 }, /* 136 = mkdir */ - { AS(rmdir_args), (sy_call_t *)rmdir, AUE_RMDIR, NULL, 0, 0, 0 }, /* 137 = rmdir */ - { AS(freebsd32_utimes_args), (sy_call_t *)freebsd32_utimes, AUE_UTIMES, NULL, 0, 0, 0 }, /* 138 = freebsd32_utimes */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 139 = obsolete 4.2 sigreturn */ - { AS(freebsd32_adjtime_args), (sy_call_t *)freebsd32_adjtime, AUE_ADJTIME, NULL, 0, 0, 0 }, /* 140 = freebsd32_adjtime */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 141 = obsolete ogetpeername */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 142 = obsolete ogethostid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 143 = obsolete sethostid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 144 = obsolete getrlimit */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 145 = obsolete setrlimit */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 146 = obsolete killpg */ - { 0, (sy_call_t *)setsid, AUE_SETSID, NULL, 0, 0, 0 }, /* 147 = setsid */ - { AS(quotactl_args), (sy_call_t *)quotactl, AUE_QUOTACTL, NULL, 0, 0, 0 }, /* 148 = quotactl */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 149 = obsolete oquota */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 150 = obsolete ogetsockname */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 151 = sem_lock */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 152 = sem_wakeup */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 153 = asyncdaemon */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 154 = nlm_syscall */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 155 = nfssvc */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 156 = obsolete ogetdirentries */ - { compat4(AS(freebsd4_freebsd32_statfs_args),freebsd32_statfs), AUE_STATFS, NULL, 0, 0, 0 }, /* 157 = freebsd4 freebsd32_statfs */ - { compat4(AS(freebsd4_freebsd32_fstatfs_args),freebsd32_fstatfs), AUE_FSTATFS, NULL, 0, 0, 0 }, /* 158 = freebsd4 freebsd32_fstatfs */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 159 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 160 = lgetfh */ - { AS(getfh_args), (sy_call_t *)getfh, AUE_NFS_GETFH, NULL, 0, 0, 0 }, /* 161 = getfh */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 162 = obsolete getdomainname */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 163 = obsolete setdomainname */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 164 = obsolete uname */ - { AS(freebsd32_sysarch_args), (sy_call_t *)freebsd32_sysarch, AUE_SYSARCH, NULL, 0, 0, 0 }, /* 165 = freebsd32_sysarch */ - { AS(rtprio_args), (sy_call_t *)rtprio, AUE_RTPRIO, NULL, 0, 0, 0 }, /* 166 = rtprio */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 167 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 168 = nosys */ - { AS(freebsd32_semsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 169 = freebsd32_semsys */ - { AS(freebsd32_msgsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 170 = freebsd32_msgsys */ - { AS(freebsd32_shmsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 171 = freebsd32_shmsys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 172 = nosys */ - { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0, 0 }, /* 173 = freebsd6 freebsd32_pread */ - { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0, 0 }, /* 174 = freebsd6 freebsd32_pwrite */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 175 = nosys */ - { AS(ntp_adjtime_args), (sy_call_t *)ntp_adjtime, AUE_NTP_ADJTIME, NULL, 0, 0, 0 }, /* 176 = ntp_adjtime */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 177 = sfork */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 178 = getdescriptor */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 179 = setdescriptor */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 180 = nosys */ - { AS(setgid_args), (sy_call_t *)setgid, AUE_SETGID, NULL, 0, 0, 0 }, /* 181 = setgid */ - { AS(setegid_args), (sy_call_t *)setegid, AUE_SETEGID, NULL, 0, 0, 0 }, /* 182 = setegid */ - { AS(seteuid_args), (sy_call_t *)seteuid, AUE_SETEUID, NULL, 0, 0, 0 }, /* 183 = seteuid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 184 = lfs_bmapv */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 185 = lfs_markv */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 186 = lfs_segclean */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 187 = lfs_segwait */ - { AS(freebsd32_stat_args), (sy_call_t *)freebsd32_stat, AUE_STAT, NULL, 0, 0, 0 }, /* 188 = freebsd32_stat */ - { AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, 0 }, /* 189 = freebsd32_fstat */ - { AS(freebsd32_lstat_args), (sy_call_t *)freebsd32_lstat, AUE_LSTAT, NULL, 0, 0, 0 }, /* 190 = freebsd32_lstat */ - { AS(pathconf_args), (sy_call_t *)pathconf, AUE_PATHCONF, NULL, 0, 0, 0 }, /* 191 = pathconf */ - { AS(fpathconf_args), (sy_call_t *)fpathconf, AUE_FPATHCONF, NULL, 0, 0, 0 }, /* 192 = fpathconf */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 193 = nosys */ - { AS(__getrlimit_args), (sy_call_t *)getrlimit, AUE_GETRLIMIT, NULL, 0, 0, 0 }, /* 194 = getrlimit */ - { AS(__setrlimit_args), (sy_call_t *)setrlimit, AUE_SETRLIMIT, NULL, 0, 0, 0 }, /* 195 = setrlimit */ - { AS(freebsd32_getdirentries_args), (sy_call_t *)freebsd32_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0, 0 }, /* 196 = freebsd32_getdirentries */ - { compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), AUE_MMAP, NULL, 0, 0, 0 }, /* 197 = freebsd6 freebsd32_mmap */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 198 = __syscall */ - { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, 0 }, /* 199 = freebsd6 freebsd32_lseek */ - { compat6(AS(freebsd6_freebsd32_truncate_args),freebsd32_truncate), AUE_TRUNCATE, NULL, 0, 0, 0 }, /* 200 = freebsd6 freebsd32_truncate */ - { compat6(AS(freebsd6_freebsd32_ftruncate_args),freebsd32_ftruncate), AUE_FTRUNCATE, NULL, 0, 0, 0 }, /* 201 = freebsd6 freebsd32_ftruncate */ - { AS(freebsd32_sysctl_args), (sy_call_t *)freebsd32_sysctl, AUE_SYSCTL, NULL, 0, 0, 0 }, /* 202 = freebsd32_sysctl */ - { AS(mlock_args), (sy_call_t *)mlock, AUE_MLOCK, NULL, 0, 0, 0 }, /* 203 = mlock */ - { AS(munlock_args), (sy_call_t *)munlock, AUE_MUNLOCK, NULL, 0, 0, 0 }, /* 204 = munlock */ - { AS(undelete_args), (sy_call_t *)undelete, AUE_UNDELETE, NULL, 0, 0, 0 }, /* 205 = undelete */ - { AS(freebsd32_futimes_args), (sy_call_t *)freebsd32_futimes, AUE_FUTIMES, NULL, 0, 0, 0 }, /* 206 = freebsd32_futimes */ - { AS(getpgid_args), (sy_call_t *)getpgid, AUE_GETPGID, NULL, 0, 0, 0 }, /* 207 = getpgid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 208 = newreboot */ - { AS(poll_args), (sy_call_t *)poll, AUE_POLL, NULL, 0, 0, 0 }, /* 209 = poll */ - { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 210 = lkmnosys */ - { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 211 = lkmnosys */ - { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 212 = lkmnosys */ - { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 213 = lkmnosys */ - { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 214 = lkmnosys */ - { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 215 = lkmnosys */ - { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 216 = lkmnosys */ - { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 217 = lkmnosys */ - { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 218 = lkmnosys */ - { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 219 = lkmnosys */ - { 0, (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 220 = freebsd7 freebsd32_semctl */ - { AS(semget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 221 = semget */ - { AS(semop_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 222 = semop */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 223 = semconfig */ - { 0, (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 224 = freebsd7 freebsd32_msgctl */ - { AS(msgget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 225 = msgget */ - { AS(freebsd32_msgsnd_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 226 = freebsd32_msgsnd */ - { AS(freebsd32_msgrcv_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 227 = freebsd32_msgrcv */ - { AS(shmat_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 228 = shmat */ - { 0, (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 229 = freebsd7 freebsd32_shmctl */ - { AS(shmdt_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 230 = shmdt */ - { AS(shmget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 231 = shmget */ - { AS(freebsd32_clock_gettime_args), (sy_call_t *)freebsd32_clock_gettime, AUE_NULL, NULL, 0, 0, 0 }, /* 232 = freebsd32_clock_gettime */ - { AS(freebsd32_clock_settime_args), (sy_call_t *)freebsd32_clock_settime, AUE_CLOCK_SETTIME, NULL, 0, 0, 0 }, /* 233 = freebsd32_clock_settime */ - { AS(freebsd32_clock_getres_args), (sy_call_t *)freebsd32_clock_getres, AUE_NULL, NULL, 0, 0, 0 }, /* 234 = freebsd32_clock_getres */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 235 = timer_create */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 236 = timer_delete */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 237 = timer_settime */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 238 = timer_gettime */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 239 = timer_getoverrun */ - { AS(freebsd32_nanosleep_args), (sy_call_t *)freebsd32_nanosleep, AUE_NULL, NULL, 0, 0, 0 }, /* 240 = freebsd32_nanosleep */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 241 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 242 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 243 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 244 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 245 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 246 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 247 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 248 = ntp_gettime */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 249 = nosys */ - { AS(minherit_args), (sy_call_t *)minherit, AUE_MINHERIT, NULL, 0, 0, 0 }, /* 250 = minherit */ - { AS(rfork_args), (sy_call_t *)rfork, AUE_RFORK, NULL, 0, 0, 0 }, /* 251 = rfork */ - { AS(openbsd_poll_args), (sy_call_t *)openbsd_poll, AUE_POLL, NULL, 0, 0, 0 }, /* 252 = openbsd_poll */ - { 0, (sy_call_t *)issetugid, AUE_ISSETUGID, NULL, 0, 0, 0 }, /* 253 = issetugid */ - { AS(lchown_args), (sy_call_t *)lchown, AUE_LCHOWN, NULL, 0, 0, 0 }, /* 254 = lchown */ - { AS(freebsd32_aio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 255 = freebsd32_aio_read */ - { AS(freebsd32_aio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 256 = freebsd32_aio_write */ - { AS(freebsd32_lio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 257 = freebsd32_lio_listio */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 258 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 259 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 260 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 261 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 262 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 263 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 264 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 265 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 266 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 267 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 268 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 269 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 270 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 271 = nosys */ - { AS(getdents_args), (sy_call_t *)getdents, AUE_O_GETDENTS, NULL, 0, 0, 0 }, /* 272 = getdents */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 273 = nosys */ - { AS(lchmod_args), (sy_call_t *)lchmod, AUE_LCHMOD, NULL, 0, 0, 0 }, /* 274 = lchmod */ - { AS(lchown_args), (sy_call_t *)lchown, AUE_LCHOWN, NULL, 0, 0, 0 }, /* 275 = netbsd_lchown */ - { AS(freebsd32_lutimes_args), (sy_call_t *)freebsd32_lutimes, AUE_LUTIMES, NULL, 0, 0, 0 }, /* 276 = freebsd32_lutimes */ - { AS(msync_args), (sy_call_t *)msync, AUE_MSYNC, NULL, 0, 0, 0 }, /* 277 = netbsd_msync */ - { AS(nstat_args), (sy_call_t *)nstat, AUE_STAT, NULL, 0, 0, 0 }, /* 278 = nstat */ - { AS(nfstat_args), (sy_call_t *)nfstat, AUE_FSTAT, NULL, 0, 0, 0 }, /* 279 = nfstat */ - { AS(nlstat_args), (sy_call_t *)nlstat, AUE_LSTAT, NULL, 0, 0, 0 }, /* 280 = nlstat */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 281 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 282 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 283 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 284 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 285 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 286 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 287 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 288 = nosys */ - { AS(freebsd32_preadv_args), (sy_call_t *)freebsd32_preadv, AUE_PREADV, NULL, 0, 0, 0 }, /* 289 = freebsd32_preadv */ - { AS(freebsd32_pwritev_args), (sy_call_t *)freebsd32_pwritev, AUE_PWRITEV, NULL, 0, 0, 0 }, /* 290 = freebsd32_pwritev */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 291 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 292 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 293 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 294 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 295 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 296 = nosys */ - { compat4(AS(freebsd4_freebsd32_fhstatfs_args),freebsd32_fhstatfs), AUE_FHSTATFS, NULL, 0, 0, 0 }, /* 297 = freebsd4 freebsd32_fhstatfs */ - { AS(fhopen_args), (sy_call_t *)fhopen, AUE_FHOPEN, NULL, 0, 0, 0 }, /* 298 = fhopen */ - { AS(fhstat_args), (sy_call_t *)fhstat, AUE_FHSTAT, NULL, 0, 0, 0 }, /* 299 = fhstat */ - { AS(modnext_args), (sy_call_t *)modnext, AUE_NULL, NULL, 0, 0, 0 }, /* 300 = modnext */ - { AS(freebsd32_modstat_args), (sy_call_t *)freebsd32_modstat, AUE_NULL, NULL, 0, 0, 0 }, /* 301 = freebsd32_modstat */ - { AS(modfnext_args), (sy_call_t *)modfnext, AUE_NULL, NULL, 0, 0, 0 }, /* 302 = modfnext */ - { AS(modfind_args), (sy_call_t *)modfind, AUE_NULL, NULL, 0, 0, 0 }, /* 303 = modfind */ - { AS(kldload_args), (sy_call_t *)kldload, AUE_MODLOAD, NULL, 0, 0, 0 }, /* 304 = kldload */ - { AS(kldunload_args), (sy_call_t *)kldunload, AUE_MODUNLOAD, NULL, 0, 0, 0 }, /* 305 = kldunload */ - { AS(kldfind_args), (sy_call_t *)kldfind, AUE_NULL, NULL, 0, 0, 0 }, /* 306 = kldfind */ - { AS(kldnext_args), (sy_call_t *)kldnext, AUE_NULL, NULL, 0, 0, 0 }, /* 307 = kldnext */ - { AS(kldstat_args), (sy_call_t *)kldstat, AUE_NULL, NULL, 0, 0, 0 }, /* 308 = kldstat */ - { AS(kldfirstmod_args), (sy_call_t *)kldfirstmod, AUE_NULL, NULL, 0, 0, 0 }, /* 309 = kldfirstmod */ - { AS(getsid_args), (sy_call_t *)getsid, AUE_GETSID, NULL, 0, 0, 0 }, /* 310 = getsid */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 21:07:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 559081065673; Mon, 28 Jun 2010 21:07:11 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 128808FC1A; Mon, 28 Jun 2010 21:07:10 +0000 (UTC) Received: by pwi5 with SMTP id 5so354525pwi.13 for ; Mon, 28 Jun 2010 14:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=s9HCQcM2dZqkkQOcgOHOdBJwJuG7jNAUmCL43NhD5dk=; b=UnzLsviAoR54f+fRZOhn45Sjt80KMUtb5v+A/hLHNyj3APSldRce0Sj6IMiJlN4XEJ z1LGVPwjvlBLw2Lc9iFkfp9v2+6UMTZCutTs5MLz9j+QoVg8jMynr2N8NiL1nr9zLryr IJKt8kx4L1k0Bjv/5otO69EWJGZ0m5bMaN4Js= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Bv15VKALZz+xy9m2qZ8Jd1/xoMnSO26Mc8UZyMI83btRYAZDEfaa7MDsK25tJVHvtO a/ZdqpuvI5M+HjS67o0QtPmVmgkYOK8+ynh4449uZ7wWUr2q5Nanoquy/NkZEF4LB0vl UG5vfaW26jDgtrn6eHB/k5KLN/TvTg/BSQEII= MIME-Version: 1.0 Received: by 10.142.1.5 with SMTP id 5mr4843051wfa.75.1277759222946; Mon, 28 Jun 2010 14:07:02 -0700 (PDT) Received: by 10.42.5.78 with HTTP; Mon, 28 Jun 2010 14:07:02 -0700 (PDT) In-Reply-To: <201006281759.o5SHxkoR076207@svn.freebsd.org> References: <201006281759.o5SHxkoR076207@svn.freebsd.org> Date: Mon, 28 Jun 2010 14:07:02 -0700 Message-ID: From: Matthew Fleming To: Konstantin Belousov 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: r209578 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 21:07:11 -0000 On Mon, Jun 28, 2010 at 10:59 AM, Konstantin Belousov wro= te: > Author: kib > Date: Mon Jun 28 17:59:45 2010 > New Revision: 209578 > URL: http://svn.freebsd.org/changeset/base/209578 > > Log: > =A0Use C99 initializers for the struct sysent generated by MAKE_SYSENT(). > > =A0MFC after: =A0 =A01 week > > Modified: > =A0head/sys/sys/sysent.h > > Modified: head/sys/sys/sysent.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/sysent.h =A0 =A0 =A0 Mon Jun 28 17:45:00 2010 =A0 =A0 = =A0 =A0(r209577) > +++ head/sys/sys/sysent.h =A0 =A0 =A0 Mon Jun 28 17:59:45 2010 =A0 =A0 = =A0 =A0(r209578) > @@ -144,10 +144,10 @@ struct syscall_module_data { > > =A0#define =A0 =A0 =A0 =A0MAKE_SYSENT(syscallname) =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0static struct sysent syscallname##_sysent =3D { =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0\ > - =A0 =A0 =A0 (sizeof(struct syscallname ## _args ) =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 \ > + =A0 =A0 =A0 .sy_narg =3D (sizeof(struct syscallname ## _args ) =A0 =A0 = =A0 =A0\ > =A0 =A0 =A0 =A0 =A0 =A0/ sizeof(register_t)), =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > - =A0 =A0 =A0 (sy_call_t *)& syscallname, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 \ > - =A0 =A0 =A0 SYS_AUE_##syscallname =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > + =A0 =A0 =A0 .sy_call =3D (sy_call_t *)& syscallname, =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0\ > + =A0 =A0 =A0 .sy_auevent =3D SYS_AUE_##syscallname, =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0\ > =A0} > > =A0#define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) =A0 =A0 \ > This change prevents (I assume) the use of MAKE_SYSENT() in a C++ kernel module, as C++ does not support the .name =3D value style of named initializers. gcc does allow name: value initializers and it's easy to patch it to accept .name =3D value, but it's not strictly conforming C++ code anymore. Thanks, matthew From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 21:23:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C704106566B; Mon, 28 Jun 2010 21:23:15 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from contrabass.post.ru (contrabass.corbina.net [IPv6:2a00:18c0:1:1::b]) by mx1.freebsd.org (Postfix) with ESMTP id EA27E8FC18; Mon, 28 Jun 2010 21:23:13 +0000 (UTC) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id C45286472; Tue, 29 Jun 2010 01:23:10 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.17.3] (HELO dchagin.static.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 226914688; Tue, 29 Jun 2010 01:23:10 +0400 Received: from dchagin.static.corbina.ru (localhost [127.0.0.1]) by dchagin.static.corbina.ru (8.14.4/8.14.4) with ESMTP id o5SLNAbD003105; Tue, 29 Jun 2010 01:23:10 +0400 (MSD) (envelope-from dchagin@dchagin.static.corbina.ru) Received: (from dchagin@localhost) by dchagin.static.corbina.ru (8.14.4/8.14.4/Submit) id o5SLN573003104; Tue, 29 Jun 2010 01:23:05 +0400 (MSD) (envelope-from dchagin) Date: Tue, 29 Jun 2010 01:23:05 +0400 From: Chagin Dmitry To: Matt Jacob Message-ID: <20100628212305.GA2898@dchagin.static.corbina.ru> References: <201006021806.o52I6Wri028466@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VbJkn9YxBvnuCH5J" Content-Disposition: inline In-Reply-To: <201006021806.o52I6Wri028466@svn.freebsd.org> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r208752 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 21:23:15 -0000 --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 02, 2010 at 06:06:32PM +0000, Matt Jacob wrote: > Author: mjacob > Date: Wed Jun 2 18:06:32 2010 > New Revision: 208752 > URL: http://svn.freebsd.org/changeset/base/208752 >=20 > Log: > Protect periph drivers list and rearrange things to minimize the chance= of > stepping oneself during probing. > =20 > Don't blindly decrement a periph probe count. > =20 This commit causes a kernel panic on cdrecord -scanbus: Unread portion of the kernel message buffer: panic: _mtx_lock_sleep: recursed on non-recursive mutex XPT topology lock @ /work/head/sys/cam/cam_xpt.c:4814 #11 0xffffffff80319dd9 in _mtx_lock_flags (m=3D0xffffffff808761d8, opts=3D0x0, file=3D0xffffffff8061ae4f "/work/head/sys/cam/cam_xpt.c", line=3D0x12ce) at /work/head/sys/kern/kern_mutex.c:203 #12 0xffffffff80179adc in xptpdperiphtraverse (pdrv=3D0xffffff000377e600, start_periph=3D0x0, tr_func=3D0xffffffff8017a670 , arg=3D0xffffff006b872000) at /work/head/sys/cam/cam_xpt.c:2151 #13 0xffffffff80179753 in xptpdrvtraverse (start_pdrv=3DVariable "start_pdrv" is not available. ) at /work/head/sys/cam/cam_xpt.c:2132 #14 0xffffffff8017fd09 in xpt_action_default (start_ccb=3D0xffffff006b872000) at /work/head/sys/cam/cam_xpt.c:1967 #15 0xffffffff8017bc63 in xptioctl (dev=3DVariable "dev" is not available. ) at /work/head/sys/cam/cam_xpt.c:598 #16 0xffffffff802bc3c6 in devfs_ioctl_f (fp=3D0xffffff006b4a0a00, com=3D0xc4a81502, data=3DVariable "data" is not available. ) at /work/head/sys/fs/devfs/devfs_vnops.c:669 #17 0xffffffff80379632 in kern_ioctl (td=3D0xffffff006b4b83f0, fd=3DVariable "fd" is not available. ) at file.h:254 #18 0xffffffff80379890 in ioctl (td=3D0xffffff006b4b83f0, uap=3D0xffffff80b1312bf0) at /work/head/sys/kern/sys_generic.c:678 > Reviewed by: scsi@ > Obtained from: Alexander Motin, Atillio Rao, Others > MFC after: 1 month >=20 > Modified: > head/sys/cam/cam_periph.c > head/sys/cam/cam_xpt.c >=20 > Modified: head/sys/cam/cam_periph.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/cam/cam_periph.c Wed Jun 2 17:27:23 2010 (r208751) > +++ head/sys/cam/cam_periph.c Wed Jun 2 18:06:32 2010 (r208752) > @@ -185,17 +185,6 @@ cam_periph_alloc(periph_ctor_t *periph_c > =09 > init_level++; > =20 > - xpt_lock_buses(); > - for (p_drv =3D periph_drivers; *p_drv !=3D NULL; p_drv++) { > - if (strcmp((*p_drv)->driver_name, name) =3D=3D 0) > - break; > - } > - xpt_unlock_buses(); > - if (*p_drv =3D=3D NULL) { > - printf("cam_periph_alloc: invalid periph name '%s'\n", name); > - free(periph, M_CAMPERIPH); > - return (CAM_REQ_INVALID); > - } > =20 > sim =3D xpt_path_sim(path); > path_id =3D xpt_path_path_id(path); > @@ -208,7 +197,6 @@ cam_periph_alloc(periph_ctor_t *periph_c > periph->periph_oninval =3D periph_oninvalidate; > periph->type =3D type; > periph->periph_name =3D name; > - periph->unit_number =3D camperiphunit(*p_drv, path_id, target_id, lun_i= d); > periph->immediate_priority =3D CAM_PRIORITY_NONE; > periph->refcount =3D 0; > periph->sim =3D sim; > @@ -216,26 +204,39 @@ cam_periph_alloc(periph_ctor_t *periph_c > status =3D xpt_create_path(&path, periph, path_id, target_id, lun_id); > if (status !=3D CAM_REQ_CMP) > goto failure; > - > periph->path =3D path; > - init_level++; > - > - status =3D xpt_add_periph(periph); > - > - if (status !=3D CAM_REQ_CMP) > - goto failure; > =20 > + xpt_lock_buses(); > + for (p_drv =3D periph_drivers; *p_drv !=3D NULL; p_drv++) { > + if (strcmp((*p_drv)->driver_name, name) =3D=3D 0) > + break; > + } > + if (*p_drv =3D=3D NULL) { > + printf("cam_periph_alloc: invalid periph name '%s'\n", name); > + xpt_free_path(periph->path); > + free(periph, M_CAMPERIPH); > + xpt_unlock_buses(); > + return (CAM_REQ_INVALID); > + } > + periph->unit_number =3D camperiphunit(*p_drv, path_id, target_id, lun_i= d); > cur_periph =3D TAILQ_FIRST(&(*p_drv)->units); > while (cur_periph !=3D NULL > && cur_periph->unit_number < periph->unit_number) > cur_periph =3D TAILQ_NEXT(cur_periph, unit_links); > - > - if (cur_periph !=3D NULL) > + if (cur_periph !=3D NULL) { > + KASSERT(cur_periph->unit_number !=3D periph->unit_number, ("duplicate = units on periph list")); > TAILQ_INSERT_BEFORE(cur_periph, periph, unit_links); > - else { > + } else { > TAILQ_INSERT_TAIL(&(*p_drv)->units, periph, unit_links); > (*p_drv)->generation++; > } > + xpt_unlock_buses(); > + > + init_level++; > + > + status =3D xpt_add_periph(periph); > + if (status !=3D CAM_REQ_CMP) > + goto failure; > =20 > init_level++; > =20 > @@ -250,10 +251,12 @@ failure: > /* Initialized successfully */ > break; > case 3: > - TAILQ_REMOVE(&(*p_drv)->units, periph, unit_links); > xpt_remove_periph(periph); > /* FALLTHROUGH */ > case 2: > + xpt_lock_buses(); > + TAILQ_REMOVE(&(*p_drv)->units, periph, unit_links); > + xpt_unlock_buses(); > xpt_free_path(periph->path); > /* FALLTHROUGH */ > case 1: > @@ -288,6 +291,7 @@ cam_periph_find(struct cam_path *path, c > TAILQ_FOREACH(periph, &(*p_drv)->units, unit_links) { > if (xpt_path_comp(periph->path, path) =3D=3D 0) { > xpt_unlock_buses(); > + mtx_assert(periph->sim->mtx, MA_OWNED); > return(periph); > } > } > @@ -322,8 +326,13 @@ cam_periph_release_locked(struct cam_per > return; > =20 > xpt_lock_buses(); > - if ((--periph->refcount =3D=3D 0) > - && (periph->flags & CAM_PERIPH_INVALID)) { > + if (periph->refcount !=3D 0) { > + periph->refcount--; > + } else { > + xpt_print(periph->path, "%s: release %p when refcount is zero\n ", __f= unc__, periph); > + } > + if (periph->refcount =3D=3D 0 > + && (periph->flags & CAM_PERIPH_INVALID)) { > camperiphfree(periph); > } > xpt_unlock_buses(); >=20 > Modified: head/sys/cam/cam_xpt.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/cam/cam_xpt.c Wed Jun 2 17:27:23 2010 (r208751) > +++ head/sys/cam/cam_xpt.c Wed Jun 2 18:06:32 2010 (r208752) > @@ -2138,6 +2138,7 @@ xptpdperiphtraverse(struct periph_driver > =20 > retval =3D 1; > =20 > + xpt_lock_buses(); already acquired in xpt_action_default? > for (periph =3D (start_periph ? start_periph : > TAILQ_FIRST(&(*pdrv)->units)); periph !=3D NULL; > periph =3D next_periph) { > @@ -2145,9 +2146,12 @@ xptpdperiphtraverse(struct periph_driver > next_periph =3D TAILQ_NEXT(periph, unit_links); > =20 > retval =3D tr_func(periph, arg); > - if (retval =3D=3D 0) > + if (retval =3D=3D 0) { > + xpt_unlock_buses(); > return(retval); > + } > } > + xpt_unlock_buses(); > return(retval); > } > =20 > @@ -2323,7 +2327,6 @@ xpt_action_default(union ccb *start_ccb) > =20 > CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_action_default\= n")); > =20 > - > switch (start_ccb->ccb_h.func_code) { > case XPT_SCSI_IO: > { > @@ -2670,7 +2673,9 @@ xpt_action_default(union ccb *start_ccb) > xptedtmatch(cdm); > break; > case CAM_DEV_POS_PDRV: > + xpt_lock_buses(); > xptperiphlistmatch(cdm); > + xpt_unlock_buses(); > break; > default: > cdm->status =3D CAM_DEV_MATCH_ERROR; --=20 Have fun! chd --VbJkn9YxBvnuCH5J Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAkwpErgACgkQ0t2Tb3OO/O1ohgCfYxcKPmacEO1JY7DSJoMj7zje gZQAnjTg87cT66OOE85SEHG84S93B7Xc =4vTT -----END PGP SIGNATURE----- --VbJkn9YxBvnuCH5J-- From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 01:04:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF3C7106564A; Tue, 29 Jun 2010 01:04:24 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEE928FC15; Tue, 29 Jun 2010 01:04: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 o5T14OGw069967; Tue, 29 Jun 2010 01:04:24 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5T14OH9069965; Tue, 29 Jun 2010 01:04:24 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201006290104.o5T14OH9069965@svn.freebsd.org> From: Doug Barton Date: Tue, 29 Jun 2010 01:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209582 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 01:04:24 -0000 Author: dougb Date: Tue Jun 29 01:04:24 2010 New Revision: 209582 URL: http://svn.freebsd.org/changeset/base/209582 Log: If i is going to be used in the loop unconditionally the declaration has to be unconditional as well. Conical head covering to: kib Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Mon Jun 28 18:17:21 2010 (r209581) +++ head/sys/kern/sysv_shm.c Tue Jun 29 01:04:24 2010 (r209582) @@ -907,9 +907,7 @@ shminit() static int shmunload() { -#ifdef MAC int i; -#endif if (shm_nused > 0) return (EBUSY); From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 01:42:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E966B1065672 for ; Tue, 29 Jun 2010 01:42:35 +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 792EF8FC19 for ; Tue, 29 Jun 2010 01:42:35 +0000 (UTC) Received: (qmail 15415 invoked by uid 399); 29 Jun 2010 01:42:34 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 29 Jun 2010 01:42:34 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C294F89.5010400@FreeBSD.org> Date: Mon, 28 Jun 2010 18:42:33 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.10) Gecko/20100621 Thunderbird/3.0.5 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201006290104.o5T14OH9069965@svn.freebsd.org> In-Reply-To: <201006290104.o5T14OH9069965@svn.freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r209582 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 01:42:36 -0000 On 06/28/10 18:04, Doug Barton wrote: > Author: dougb > Date: Tue Jun 29 01:04:24 2010 > New Revision: 209582 > URL: http://svn.freebsd.org/changeset/base/209582 > > Log: > If i is going to be used in the loop unconditionally the declaration > has to be unconditional as well. > > Conical head covering to: kib Hopefully it's clear to everyone that this is gentle ribbing, as opposed to criticism. If the fix is so easy even *I* can figure it out, it truly deserves a pointy hat. :) Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 02:59:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2045C1065672; Tue, 29 Jun 2010 02:59:55 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7CE508FC0A; Tue, 29 Jun 2010 02:59:54 +0000 (UTC) Received: by vws13 with SMTP id 13so8690987vws.13 for ; Mon, 28 Jun 2010 19:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2kFGNw1wTxquaTF6BmwC1FkkbPNcuTff0wn50vUvzi4=; b=hMIxFC8vlmDPNkGzzvLNO/yRvaSnzkjOdSlESowFArIl1s9EsAVl/ZHvPPj07rPo78 W74TAnH9QENcBmOO2PiEBj9P4H4O1weiZubm/rQHRplqXsYD27UBD8tW2m6M8Jmmxu81 F3dSSOw7cQT7w0ZKCcT3sNU0liVg+B0DPCtAY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=aoDwuLYUOu0M5CWZ67Ilvjo5y2Uim7sH+fPanUcvaF1hPAHWVF50N2KTo8iDF89EIw Mg/6oEuDKtEXP37OTNDoV3uud8hOIaU4VjUoynPkPkTgAOq7+0R6X0Uscl1Vco31zj9g 8B7km8THhxOECNB+2o6TieQZOlQ1Evd8wY0bw= MIME-Version: 1.0 Received: by 10.229.248.148 with SMTP id mg20mr3343614qcb.165.1277780384514; Mon, 28 Jun 2010 19:59:44 -0700 (PDT) Received: by 10.229.80.75 with HTTP; Mon, 28 Jun 2010 19:59:44 -0700 (PDT) In-Reply-To: <4C294F89.5010400@FreeBSD.org> References: <201006290104.o5T14OH9069965@svn.freebsd.org> <4C294F89.5010400@FreeBSD.org> Date: Mon, 28 Jun 2010 19:59:44 -0700 Message-ID: From: Garrett Cooper To: Doug Barton 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: r209582 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 02:59:55 -0000 On Mon, Jun 28, 2010 at 6:42 PM, Doug Barton wrote: > On 06/28/10 18:04, Doug Barton wrote: >> Author: dougb >> Date: Tue Jun 29 01:04:24 2010 >> New Revision: 209582 >> URL: http://svn.freebsd.org/changeset/base/209582 >> >> Log: >> =A0 If i is going to be used in the loop unconditionally the declaration >> =A0 has to be unconditional as well. >> >> =A0 Conical head covering to: =A0 kib > > Hopefully it's clear to everyone that this is gentle ribbing, as opposed > to criticism. If the fix is so easy even *I* can figure it out, it truly > deserves a pointy hat. :) Ah, but Doug likes hats...! He just hates cones: http://faiththemutt.files.wordpress.com/2010/02/tumblr_kt24jwbmrb1qzyz6ko1_= 500.jpg :(... -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 03:41:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37BEC1065672; Tue, 29 Jun 2010 03:41:08 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 0D9EF8FC0C; Tue, 29 Jun 2010 03:41:07 +0000 (UTC) Received: from [192.168.0.100] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o5T3f7JI091123; Mon, 28 Jun 2010 20:41:07 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4C296B5A.5090307@feral.com> Date: Mon, 28 Jun 2010 20:41:14 -0700 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Chagin Dmitry References: <201006021806.o52I6Wri028466@svn.freebsd.org> <20100628212305.GA2898@dchagin.static.corbina.ru> In-Reply-To: <20100628212305.GA2898@dchagin.static.corbina.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Mon, 28 Jun 2010 20:41:07 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Matt Jacob Subject: Re: svn commit: r208752 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 03:41:08 -0000 On 6/28/2010 2:23 PM, Chagin Dmitry wrote: > On Wed, Jun 02, 2010 at 06:06:32PM +0000, Matt Jacob wrote: > >> Author: mjacob >> Date: Wed Jun 2 18:06:32 2010 >> New Revision: 208752 >> URL: http://svn.freebsd.org/changeset/base/208752 >> >> Log: >> Protect periph drivers list and rearrange things to minimize the chance of >> stepping oneself during probing. >> >> Don't blindly decrement a periph probe count. >> >> > > This commit causes a kernel panic on cdrecord -scanbus: > > > A 'camcontrol devlist -v' on this system would be helpful. From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 03:44:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D80B7106566B; Tue, 29 Jun 2010 03:44:25 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 98F058FC13; Tue, 29 Jun 2010 03:44:25 +0000 (UTC) Received: from [192.168.0.100] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o5T3iPj9091155; Mon, 28 Jun 2010 20:44:25 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4C296C20.6090206@feral.com> Date: Mon, 28 Jun 2010 20:44:32 -0700 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Chagin Dmitry References: <201006021806.o52I6Wri028466@svn.freebsd.org> <20100628212305.GA2898@dchagin.static.corbina.ru> <4C296B5A.5090307@feral.com> In-Reply-To: <4C296B5A.5090307@feral.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Mon, 28 Jun 2010 20:44:25 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Matt Jacob Subject: Re: svn commit: r208752 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 03:44:25 -0000 Never mind, reproduced it. > A 'camcontrol devlist -v' on this system would be helpful. From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 03:52:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0A85106564A; Tue, 29 Jun 2010 03:52:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0E118FC0C; Tue, 29 Jun 2010 03:52: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 o5T3qCnb007111; Tue, 29 Jun 2010 03:52:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5T3qCAr007109; Tue, 29 Jun 2010 03:52:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201006290352.o5T3qCAr007109@svn.freebsd.org> From: Warner Losh Date: Tue, 29 Jun 2010 03:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209583 - head/sbin/devd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 03:52:13 -0000 Author: imp Date: Tue Jun 29 03:52:12 2010 New Revision: 209583 URL: http://svn.freebsd.org/changeset/base/209583 Log: Expand system into my_system, and add the necessary tidyness that we need. Close the pidfile. Then close all descriptors >= 3 to avoid information leakage to children. This solves the problem of not being able to restart devd when you have, for example, a dhclient forked to configure your network... MFC after: 3 days Modified: head/sbin/devd/devd.cc head/sbin/devd/devd.hh Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Tue Jun 29 01:04:24 2010 (r209582) +++ head/sbin/devd/devd.cc Tue Jun 29 03:52:12 2010 (r209583) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2003 M. Warner Losh. + * Copyright (c) 2002-2010 M. Warner Losh. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -22,6 +22,35 @@ * 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. + * + * my_system is a variation on lib/libc/stdlib/system.c: + * + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ /* @@ -41,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -49,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -152,13 +183,67 @@ action::~action() // nothing } +static int +my_system(const char *command) +{ + pid_t pid, savedpid; + int pstat; + struct sigaction ign, intact, quitact; + sigset_t newsigblock, oldsigblock; + + if (!command) /* just checking... */ + return(1); + + /* + * Ignore SIGINT and SIGQUIT, block SIGCHLD. Remember to save + * existing signal dispositions. + */ + ign.sa_handler = SIG_IGN; + ::sigemptyset(&ign.sa_mask); + ign.sa_flags = 0; + ::sigaction(SIGINT, &ign, &intact); + ::sigaction(SIGQUIT, &ign, &quitact); + ::sigemptyset(&newsigblock); + ::sigaddset(&newsigblock, SIGCHLD); + ::sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock); + switch (pid = ::fork()) { + case -1: /* error */ + break; + case 0: /* child */ + /* + * Restore original signal dispositions and exec the command. + */ + ::sigaction(SIGINT, &intact, NULL); + ::sigaction(SIGQUIT, &quitact, NULL); + ::sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + /* + * Close the PID file, and all other open descriptors. + * Inherit std{in,out,err} only. + */ + cfg.close_pidfile(); + ::closefrom(3); + ::execl(_PATH_BSHELL, "sh", "-c", command, (char *)NULL); + ::_exit(127); + default: /* parent */ + savedpid = pid; + do { + pid = ::wait4(savedpid, &pstat, 0, (struct rusage *)0); + } while (pid == -1 && errno == EINTR); + break; + } + ::sigaction(SIGINT, &intact, NULL); + ::sigaction(SIGQUIT, &quitact, NULL); + ::sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + return (pid == -1 ? -1 : pstat); +} + bool action::do_action(config &c) { string s = c.expand_string(_cmd); if (Dflag) fprintf(stderr, "Executing '%s'\n", s.c_str()); - ::system(s.c_str()); + my_system(s.c_str()); return (true); } @@ -391,6 +476,13 @@ config::write_pidfile() } void +config::close_pidfile() +{ + + pidfile_close(pfh); +} + +void config::remove_pidfile() { Modified: head/sbin/devd/devd.hh ============================================================================== --- head/sbin/devd/devd.hh Tue Jun 29 01:04:24 2010 (r209582) +++ head/sbin/devd/devd.hh Tue Jun 29 03:52:12 2010 (r209583) @@ -153,6 +153,7 @@ public: void set_pidfile(const char *); void reset(); void parse(); + void close_pidfile(); void open_pidfile(); void write_pidfile(); void remove_pidfile(); From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 08:06:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9F7B1065673; Tue, 29 Jun 2010 08:06:21 +0000 (UTC) (envelope-from anders@FreeBSD.org) Received: from fupp.net (totem.fix.no [80.91.36.20]) by mx1.freebsd.org (Postfix) with ESMTP id 1B3568FC08; Tue, 29 Jun 2010 08:06:20 +0000 (UTC) Received: from localhost (totem.fix.no [80.91.36.20]) by fupp.net (Postfix) with ESMTP id 376A747B16; Tue, 29 Jun 2010 09:48:32 +0200 (CEST) Received: from fupp.net ([80.91.36.20]) by localhost (totem.fix.no [80.91.36.20]) (amavisd-new, port 10024) with LMTP id oDDW71m9f73e; Tue, 29 Jun 2010 09:48:31 +0200 (CEST) Received: by fupp.net (Postfix, from userid 1000) id D630147B15; Tue, 29 Jun 2010 09:48:31 +0200 (CEST) Date: Tue, 29 Jun 2010 09:48:31 +0200 From: Anders Nordby To: Pyun YongHyeon Message-ID: <20100629074831.GA75332@fupp.net> References: <201006101804.o5AI4PEX024259@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <201006101804.o5AI4PEX024259@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key: http://anders.fix.no/pgp/ X-PGP-Key-FingerPrint: 1E0F C53C D8DF 6A8F EAAD 19C5 D12A BC9F 0083 5956 Cc: marcel@FreeBSD.org, jdc@parodius.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r208995 - stable/7/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2010 08:06:22 -0000 Hi! Is it possible to get this fix into FreeBSD 7.3-RELEASE? Without this fix I have serious issues with my bge NICs: - packet loss around 10%. - transferrate (scp) is 10% of expected, 2 MB/sec instead of 20 when testing. - get "Corrupted MAC on input" while synchronizing large directories using rsync over SSH. It seems we also discussed this matter on -fs, where I had issues on a ZFS+NFS file server. After updating to a newer 8.1 install (which has the fix) the problem went away. If this can not make it into 7.3, I and other people using 7.x have to manually patch this or follow RELENG_7 which not everyone wants to. The bge driver is such a common server driver, I think this should be rolled back into affected releases. Regards, Anders. On Thu, Jun 10, 2010 at 06:04:25PM +0000, Pyun YongHyeon wrote: > Author: yongari > Date: Thu Jun 10 18:04:25 2010 > New Revision: 208995 > URL: http://svn.freebsd.org/changeset/base/208995 > > Log: > MFC r208862: > Fix a bug introduced in r199011. When bge(4) reuses loaded RX > buffers it should also reinitialize RX descriptors otherwise some > stale data could be passed to controller. This could end up with > mbuf double free or unexpected NULL pointer dereference in upper > stack. To fix the issue, save loaded buffer's length and > reinitialize RX descriptors with the saved value whenever bge(4) > reuses the loaded RX buffers. > While I'm here, increase the number of RX buffers to 512 from 256. > This simplifies RX buffer handling as well as giving more RX > buffers. Controller supports just fixed number of RX buffers > (i.e. 512) and bge(4) used to rely on hope that our CPU is fast > enough to keep up with the controller. With this change, bge(4) > will use 1MB for RX buffers but I don't think it would cause > problems in these days. > > Reported by: marcel > Tested by: marcel > > Modified: > stable/7/sys/dev/bge/if_bge.c > stable/7/sys/dev/bge/if_bgereg.h > Directory Properties: > stable/7/sys/ (props changed) > stable/7/sys/cddl/contrib/opensolaris/ (props changed) > stable/7/sys/contrib/dev/acpica/ (props changed) > stable/7/sys/contrib/pf/ (props changed) > > Modified: stable/7/sys/dev/bge/if_bge.c > ============================================================================== > --- stable/7/sys/dev/bge/if_bge.c Thu Jun 10 17:59:47 2010 (r208994) > +++ stable/7/sys/dev/bge/if_bge.c Thu Jun 10 18:04:25 2010 (r208995) > @@ -400,6 +400,8 @@ static void bge_setpromisc(struct bge_so > static void bge_setmulti(struct bge_softc *); > static void bge_setvlan(struct bge_softc *); > > +static __inline void bge_rxreuse_std(struct bge_softc *, int); > +static __inline void bge_rxreuse_jumbo(struct bge_softc *, int); > static int bge_newbuf_std(struct bge_softc *, int); > static int bge_newbuf_jumbo(struct bge_softc *, int); > static int bge_init_rx_ring_std(struct bge_softc *); > @@ -949,6 +951,7 @@ bge_newbuf_std(struct bge_softc *sc, int > sc->bge_cdata.bge_rx_std_dmamap[i] = sc->bge_cdata.bge_rx_std_sparemap; > sc->bge_cdata.bge_rx_std_sparemap = map; > sc->bge_cdata.bge_rx_std_chain[i] = m; > + sc->bge_cdata.bge_rx_std_seglen[i] = segs[0].ds_len; > r = &sc->bge_ldata.bge_rx_std_ring[sc->bge_std]; > r->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[0].ds_addr); > r->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[0].ds_addr); > @@ -1006,6 +1009,11 @@ bge_newbuf_jumbo(struct bge_softc *sc, i > sc->bge_cdata.bge_rx_jumbo_sparemap; > sc->bge_cdata.bge_rx_jumbo_sparemap = map; > sc->bge_cdata.bge_rx_jumbo_chain[i] = m; > + sc->bge_cdata.bge_rx_jumbo_seglen[i][0] = 0; > + sc->bge_cdata.bge_rx_jumbo_seglen[i][1] = 0; > + sc->bge_cdata.bge_rx_jumbo_seglen[i][2] = 0; > + sc->bge_cdata.bge_rx_jumbo_seglen[i][3] = 0; > + > /* > * Fill in the extended RX buffer descriptor. > */ > @@ -1018,18 +1026,22 @@ bge_newbuf_jumbo(struct bge_softc *sc, i > r->bge_addr3.bge_addr_lo = BGE_ADDR_LO(segs[3].ds_addr); > r->bge_addr3.bge_addr_hi = BGE_ADDR_HI(segs[3].ds_addr); > r->bge_len3 = segs[3].ds_len; > + sc->bge_cdata.bge_rx_jumbo_seglen[i][3] = segs[3].ds_len; > case 3: > r->bge_addr2.bge_addr_lo = BGE_ADDR_LO(segs[2].ds_addr); > r->bge_addr2.bge_addr_hi = BGE_ADDR_HI(segs[2].ds_addr); > r->bge_len2 = segs[2].ds_len; > + sc->bge_cdata.bge_rx_jumbo_seglen[i][2] = segs[2].ds_len; > case 2: > r->bge_addr1.bge_addr_lo = BGE_ADDR_LO(segs[1].ds_addr); > r->bge_addr1.bge_addr_hi = BGE_ADDR_HI(segs[1].ds_addr); > r->bge_len1 = segs[1].ds_len; > + sc->bge_cdata.bge_rx_jumbo_seglen[i][1] = segs[1].ds_len; > case 1: > r->bge_addr0.bge_addr_lo = BGE_ADDR_LO(segs[0].ds_addr); > r->bge_addr0.bge_addr_hi = BGE_ADDR_HI(segs[0].ds_addr); > r->bge_len0 = segs[0].ds_len; > + sc->bge_cdata.bge_rx_jumbo_seglen[i][0] = segs[0].ds_len; > break; > default: > panic("%s: %d segments\n", __func__, nsegs); > @@ -1041,12 +1053,6 @@ bge_newbuf_jumbo(struct bge_softc *sc, i > return (0); > } > > -/* > - * The standard receive ring has 512 entries in it. At 2K per mbuf cluster, > - * that's 1MB or memory, which is a lot. For now, we fill only the first > - * 256 ring entries and hope that our CPU is fast enough to keep up with > - * the NIC. > - */ > static int > bge_init_rx_ring_std(struct bge_softc *sc) > { > @@ -1054,7 +1060,7 @@ bge_init_rx_ring_std(struct bge_softc *s > > bzero(sc->bge_ldata.bge_rx_std_ring, BGE_STD_RX_RING_SZ); > sc->bge_std = 0; > - for (i = 0; i < BGE_SSLOTS; i++) { > + for (i = 0; i < BGE_STD_RX_RING_CNT; i++) { > if ((error = bge_newbuf_std(sc, i)) != 0) > return (error); > BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); > @@ -1063,8 +1069,8 @@ bge_init_rx_ring_std(struct bge_softc *s > bus_dmamap_sync(sc->bge_cdata.bge_rx_std_ring_tag, > sc->bge_cdata.bge_rx_std_ring_map, BUS_DMASYNC_PREWRITE); > > - sc->bge_std = i - 1; > - bge_writembx(sc, BGE_MBX_RX_STD_PROD_LO, sc->bge_std); > + sc->bge_std = 0; > + bge_writembx(sc, BGE_MBX_RX_STD_PROD_LO, BGE_STD_RX_RING_CNT - 1); > > return (0); > } > @@ -1106,14 +1112,14 @@ bge_init_rx_ring_jumbo(struct bge_softc > bus_dmamap_sync(sc->bge_cdata.bge_rx_jumbo_ring_tag, > sc->bge_cdata.bge_rx_jumbo_ring_map, BUS_DMASYNC_PREWRITE); > > - sc->bge_jumbo = i - 1; > + sc->bge_jumbo = 0; > > rcb = &sc->bge_ldata.bge_info.bge_jumbo_rx_rcb; > rcb->bge_maxlen_flags = BGE_RCB_MAXLEN_FLAGS(0, > BGE_RCB_FLAG_USE_EXT_RX_BD); > CSR_WRITE_4(sc, BGE_RX_JUMBO_RCB_MAXLEN_FLAGS, rcb->bge_maxlen_flags); > > - bge_writembx(sc, BGE_MBX_RX_JUMBO_PROD_LO, sc->bge_jumbo); > + bge_writembx(sc, BGE_MBX_RX_JUMBO_PROD_LO, BGE_JUMBO_RX_RING_CNT - 1); > > return (0); > } > @@ -3299,6 +3305,33 @@ bge_reset(struct bge_softc *sc) > return(0); > } > > +static __inline void > +bge_rxreuse_std(struct bge_softc *sc, int i) > +{ > + struct bge_rx_bd *r; > + > + r = &sc->bge_ldata.bge_rx_std_ring[sc->bge_std]; > + r->bge_flags = BGE_RXBDFLAG_END; > + r->bge_len = sc->bge_cdata.bge_rx_std_seglen[i]; > + r->bge_idx = i; > + BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); > +} > + > +static __inline void > +bge_rxreuse_jumbo(struct bge_softc *sc, int i) > +{ > + struct bge_extrx_bd *r; > + > + r = &sc->bge_ldata.bge_rx_jumbo_ring[sc->bge_jumbo]; > + r->bge_flags = BGE_RXBDFLAG_JUMBO_RING | BGE_RXBDFLAG_END; > + r->bge_len0 = sc->bge_cdata.bge_rx_jumbo_seglen[i][0]; > + r->bge_len1 = sc->bge_cdata.bge_rx_jumbo_seglen[i][1]; > + r->bge_len2 = sc->bge_cdata.bge_rx_jumbo_seglen[i][2]; > + r->bge_len3 = sc->bge_cdata.bge_rx_jumbo_seglen[i][3]; > + r->bge_idx = i; > + BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); > +} > + > /* > * Frame reception handling. This is called if there's a frame > * on the receive return list. > @@ -3362,24 +3395,24 @@ bge_rxeof(struct bge_softc *sc, uint16_t > jumbocnt++; > m = sc->bge_cdata.bge_rx_jumbo_chain[rxidx]; > if (cur_rx->bge_flags & BGE_RXBDFLAG_ERROR) { > - BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); > + bge_rxreuse_jumbo(sc, rxidx); > continue; > } > if (bge_newbuf_jumbo(sc, rxidx) != 0) { > - BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); > + bge_rxreuse_jumbo(sc, rxidx); > ifp->if_iqdrops++; > continue; > } > BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); > } else { > stdcnt++; > + m = sc->bge_cdata.bge_rx_std_chain[rxidx]; > if (cur_rx->bge_flags & BGE_RXBDFLAG_ERROR) { > - BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); > + bge_rxreuse_std(sc, rxidx); > continue; > } > - m = sc->bge_cdata.bge_rx_std_chain[rxidx]; > if (bge_newbuf_std(sc, rxidx) != 0) { > - BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); > + bge_rxreuse_std(sc, rxidx); > ifp->if_iqdrops++; > continue; > } > > Modified: stable/7/sys/dev/bge/if_bgereg.h > ============================================================================== > --- stable/7/sys/dev/bge/if_bgereg.h Thu Jun 10 17:59:47 2010 (r208994) > +++ stable/7/sys/dev/bge/if_bgereg.h Thu Jun 10 18:04:25 2010 (r208995) > @@ -2561,6 +2561,8 @@ struct bge_chain_data { > struct mbuf *bge_tx_chain[BGE_TX_RING_CNT]; > struct mbuf *bge_rx_std_chain[BGE_STD_RX_RING_CNT]; > struct mbuf *bge_rx_jumbo_chain[BGE_JUMBO_RX_RING_CNT]; > + int bge_rx_std_seglen[BGE_STD_RX_RING_CNT]; > + int bge_rx_jumbo_seglen[BGE_JUMBO_RX_RING_CNT][4]; > }; > > struct bge_dmamap_arg { > _______________________________________________ > svn-src-stable-7@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-stable-7 > To unsubscribe, send any mail to "svn-src-stable-7-unsubscribe@freebsd.org" -- Anders. From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 08:48:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98A951065731; Tue, 29 Jun 2010 08:48:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2C7ED8FC15; Tue, 29 Jun 2010 08:48:29 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o5T8mQ8K039147 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Jun 2010 11:48:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o5T8mQMM080006; Tue, 29 Jun 2010 11:48:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o5T8mQeH080005; Tue, 29 Jun 2010 11:48:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 29 Jun 2010 11:48:26 +0300 From: Kostik Belousov To: Matthew Fleming Message-ID: <20100629084826.GH13238@deviant.kiev.zoral.com.ua> References: <201006281759.o5SHxkoR076207@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HhvjdBU+Fnm6rrzO" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_40, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209578 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 08:48:30 -0000 --HhvjdBU+Fnm6rrzO Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 28, 2010 at 02:07:02PM -0700, Matthew Fleming wrote: > On Mon, Jun 28, 2010 at 10:59 AM, Konstantin Belousov w= rote: > > Author: kib > > Date: Mon Jun 28 17:59:45 2010 > > New Revision: 209578 > > URL: http://svn.freebsd.org/changeset/base/209578 > > > > Log: > > =9AUse C99 initializers for the struct sysent generated by MAKE_SYSENT(= ). > > > > =9AMFC after: =9A =9A1 week > > > > Modified: > > =9Ahead/sys/sys/sysent.h > > > > Modified: head/sys/sys/sysent.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/sys/sysent.h =9A =9A =9A Mon Jun 28 17:45:00 2010 =9A =9A = =9A =9A(r209577) > > +++ head/sys/sys/sysent.h =9A =9A =9A Mon Jun 28 17:59:45 2010 =9A =9A = =9A =9A(r209578) > > @@ -144,10 +144,10 @@ struct syscall_module_data { > > > > =9A#define =9A =9A =9A =9AMAKE_SYSENT(syscallname) =9A =9A =9A =9A =9A = =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A\ > > =9Astatic struct sysent syscallname##_sysent =3D { =9A =9A =9A =9A =9A = =9A =9A =9A =9A\ > > - =9A =9A =9A (sizeof(struct syscallname ## _args ) =9A =9A =9A =9A =9A= =9A =9A =9A =9A \ > > + =9A =9A =9A .sy_narg =3D (sizeof(struct syscallname ## _args ) =9A = =9A =9A =9A\ > > =9A =9A =9A =9A =9A =9A/ sizeof(register_t)), =9A =9A =9A =9A =9A =9A = =9A =9A =9A =9A =9A =9A =9A =9A =9A\ > > - =9A =9A =9A (sy_call_t *)& syscallname, =9A =9A =9A =9A =9A =9A =9A = =9A =9A =9A =9A =9A =9A =9A \ > > - =9A =9A =9A SYS_AUE_##syscallname =9A =9A =9A =9A =9A =9A =9A =9A =9A= =9A =9A =9A =9A =9A =9A =9A =9A \ > > + =9A =9A =9A .sy_call =3D (sy_call_t *)& syscallname, =9A =9A =9A =9A = =9A =9A =9A =9A =9A\ > > + =9A =9A =9A .sy_auevent =3D SYS_AUE_##syscallname, =9A =9A =9A =9A = =9A =9A =9A =9A =9A =9A\ > > =9A} > > > > =9A#define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) =9A =9A \ > > >=20 > This change prevents (I assume) the use of MAKE_SYSENT() in a C++ > kernel module, as C++ does not support the .name =3D value style of > named initializers. >=20 > gcc does allow name: value initializers and it's easy to patch it to > accept .name =3D value, but it's not strictly conforming C++ code > anymore. I do not mind reverting this, I think it would be better then having #ifdef __cplusplus and two definitions. I really wanted to have a way to provide sparce initializator for the struct sysent. I managed to not require it for r209579. --HhvjdBU+Fnm6rrzO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkwps1oACgkQC3+MBN1Mb4jGsQCdFkZBqsnJ+BVTZzJXRaOXtUor ZJ0An0OHU8OF0Xh+UxB4u8s8c+CkMJon =evKS -----END PGP SIGNATURE----- --HhvjdBU+Fnm6rrzO-- From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 13:46:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3543106566C; Tue, 29 Jun 2010 13:46:23 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id 03D268FC0C; Tue, 29 Jun 2010 13:46:22 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 4so238939eyf.3 for ; Tue, 29 Jun 2010 06:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=u/5+yXUSUr6zDeeL4bDwU30vRV/1zwzljOaL1R0sFoQ=; b=j5cgybXTN0rJZLtmSllEwsBk+/xAeJ2d4P+UbIxcXwqJTosH+AhoOOiaXQK1LXHJiH eLpcgI89LKGxHu1u8j2af/famAKUmWuO2SDy6Ul6bFm6K0Mq5Ne+8hbBFblZJRMdvc9k uPo04N8c05HqyyHNdVMtc635TCMKAnyVynglc= 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=lynd8epKHSgjbntHRel+neD+XEa3qwmpqSSpS3IK9kroFR5qWemGQYtVt3eUcpd6GF kIeLLBEdbGLWc0FFVEwZXSMUNqzQ1KBg3dDyHToIdcCApqSO14YWLUoftFBiwXZ+LhbU NqqE9xUTel0LKkjwprquSbAj1cbYWbt/pN1Mg= MIME-Version: 1.0 Received: by 10.213.113.202 with SMTP id b10mr2430762ebq.77.1277819175027; Tue, 29 Jun 2010 06:46:15 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.42.5.78 with HTTP; Tue, 29 Jun 2010 06:46:14 -0700 (PDT) In-Reply-To: <20100629084826.GH13238@deviant.kiev.zoral.com.ua> References: <201006281759.o5SHxkoR076207@svn.freebsd.org> <20100629084826.GH13238@deviant.kiev.zoral.com.ua> Date: Tue, 29 Jun 2010 13:46:14 +0000 X-Google-Sender-Auth: _RN8o0D2fZ5Do05HMHLLh3RlsWw Message-ID: From: mdf@FreeBSD.org To: Kostik Belousov 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: r209578 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 13:46:24 -0000 2010/6/29 Kostik Belousov : > On Mon, Jun 28, 2010 at 02:07:02PM -0700, Matthew Fleming wrote: >> On Mon, Jun 28, 2010 at 10:59 AM, Konstantin Belousov = wrote: >> > Author: kib >> > Date: Mon Jun 28 17:59:45 2010 >> > New Revision: 209578 >> > URL: http://svn.freebsd.org/changeset/base/209578 >> > >> > Log: >> > =A0Use C99 initializers for the struct sysent generated by MAKE_SYSENT= (). >> > >> > =A0MFC after: =A0 =A01 week >> > >> > Modified: >> > =A0head/sys/sys/sysent.h >> > >> > Modified: head/sys/sys/sysent.h >> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >> > --- head/sys/sys/sysent.h =A0 =A0 =A0 Mon Jun 28 17:45:00 2010 =A0 =A0= =A0 =A0(r209577) >> > +++ head/sys/sys/sysent.h =A0 =A0 =A0 Mon Jun 28 17:59:45 2010 =A0 =A0= =A0 =A0(r209578) >> > @@ -144,10 +144,10 @@ struct syscall_module_data { >> > >> > =A0#define =A0 =A0 =A0 =A0MAKE_SYSENT(syscallname) =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ >> > =A0static struct sysent syscallname##_sysent =3D { =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0\ >> > - =A0 =A0 =A0 (sizeof(struct syscallname ## _args ) =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 \ >> > + =A0 =A0 =A0 .sy_narg =3D (sizeof(struct syscallname ## _args ) =A0 = =A0 =A0 =A0\ >> > =A0 =A0 =A0 =A0 =A0 =A0/ sizeof(register_t)), =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ >> > - =A0 =A0 =A0 (sy_call_t *)& syscallname, =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ >> > - =A0 =A0 =A0 SYS_AUE_##syscallname =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ >> > + =A0 =A0 =A0 .sy_call =3D (sy_call_t *)& syscallname, =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0\ >> > + =A0 =A0 =A0 .sy_auevent =3D SYS_AUE_##syscallname, =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0\ >> > =A0} >> > >> > =A0#define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) =A0 =A0 = \ >> > >> >> This change prevents (I assume) the use of MAKE_SYSENT() in a C++ >> kernel module, as C++ does not support the .name =3D value style of >> named initializers. >> >> gcc does allow name: value initializers and it's easy to patch it to >> accept .name =3D value, but it's not strictly conforming C++ code >> anymore. > I do not mind reverting this, I think it would be better then > having #ifdef __cplusplus and two definitions. I really wanted to > have a way to provide sparce initializator for the struct sysent. > I managed to not require it for r209579. I agree it's really handy to have sparse initializers; I just haven't thought of a way to do that and continue to allow 3rd party c++ modules. Perhaps we'll get a new c++ standard soon that supports this syntax. :-) Thanks, matthew From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 14:13:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6242B1065670; Tue, 29 Jun 2010 14:13:52 +0000 (UTC) (envelope-from kensmith@buffalo.edu) Received: from localmailA.acsu.buffalo.edu (localmail.buffalo.edu [128.205.5.196]) by mx1.freebsd.org (Postfix) with ESMTP id 1D69A8FC0C; Tue, 29 Jun 2010 14:13:51 +0000 (UTC) Received: from localmailA.acsu.buffalo.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id D719CB0CD; Tue, 29 Jun 2010 10:13:46 -0400 (EDT) Received: from localmailA.acsu.buffalo.edu (localhost [127.0.0.1]) by localmailA.acsu.buffalo.edu (Postfix) with ESMTP id 483DEB16F; Tue, 29 Jun 2010 10:13:46 -0400 (EDT) Received: from mweb2.acsu.buffalo.edu (mweb2.acsu.buffalo.edu [128.205.5.239]) by localmailA.acsu.buffalo.edu (Prefixe) with ESMTP id 3B594B0CD; Tue, 29 Jun 2010 10:13:46 -0400 (EDT) Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76]) by mweb2.acsu.buffalo.edu (Postfix) with ESMTP id 23678207BD; Tue, 29 Jun 2010 10:13:46 -0400 (EDT) From: Ken Smith To: Anders Nordby In-Reply-To: <20100629074831.GA75332@fupp.net> References: <201006101804.o5AI4PEX024259@svn.freebsd.org> <20100629074831.GA75332@fupp.net> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-njsDQbSSLja+DF9qpdo7" Date: Tue, 29 Jun 2010 10:13:45 -0400 Message-ID: <1277820825.55649.7.camel@bauer.cse.buffalo.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 FreeBSD GNOME Team Port X-PM-EL-Spam-Prob: : 8% Cc: marcel@FreeBSD.org, jdc@parodius.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r208995 - stable/7/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2010 14:13:52 -0000 --=-njsDQbSSLja+DF9qpdo7 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Tue, 2010-06-29 at 09:48 +0200, Anders Nordby wrote: > Is it possible to get this fix into FreeBSD 7.3-RELEASE? We typically rely on developers to decide if fixes might warrant consideration as an Errata Notice and send email to re@ suggesting it. It's hard for us to judge on our own - factors include things like the individual developers' confidence level in the fix, etc. If someone(s) were to send mail to re@ suggesting this be an Errata Notice given your description here we would definitely consider it seriously. As far as the general process goes that's the first step. --=20 Ken Smith - From there to here, from here to | kensmith@buffalo.edu there, funny things are everywhere. | - Theodore Geisel | --=-njsDQbSSLja+DF9qpdo7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEABECAAYFAkwp/5AACgkQ/G14VSmup/aEEQCeKYLV72/yynQ+hjut+9eLClUW oNoAoJiwzuWUlx8LVLlQSYOgwCoghdqv =QT5l -----END PGP SIGNATURE----- --=-njsDQbSSLja+DF9qpdo7-- From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 14:31:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FD9C1065673; Tue, 29 Jun 2010 14:31:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E83F8FC23; Tue, 29 Jun 2010 14:31:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5TEVoTK049496; Tue, 29 Jun 2010 14:31:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TEVoc9049495; Tue, 29 Jun 2010 14:31:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201006291431.o5TEVoc9049495@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 29 Jun 2010 14:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209587 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 14:31:50 -0000 Author: kib Date: Tue Jun 29 14:31:49 2010 New Revision: 209587 URL: http://svn.freebsd.org/changeset/base/209587 Log: Revert r209578: Use C99 initializers for the struct sysent generated by MAKE_SYSENT(). C++ does not have designator-initializer facility of C99, not using this in the header makes us friendly to C++ kernel modules, whoever wants such schism. Requested by: mdf MFC after: 6 days (not really) Modified: head/sys/sys/sysent.h Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Tue Jun 29 10:21:34 2010 (r209586) +++ head/sys/sys/sysent.h Tue Jun 29 14:31:49 2010 (r209587) @@ -151,10 +151,10 @@ struct syscall_module_data { #define MAKE_SYSENT(syscallname) \ static struct sysent syscallname##_sysent = { \ - .sy_narg = (sizeof(struct syscallname ## _args ) \ + (sizeof(struct syscallname ## _args ) \ / sizeof(register_t)), \ - .sy_call = (sy_call_t *)& syscallname, \ - .sy_auevent = SYS_AUE_##syscallname, \ + (sy_call_t *)& syscallname, \ + SYS_AUE_##syscallname \ } #define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) \ From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 14:32:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D529B1065680; Tue, 29 Jun 2010 14:32:01 +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 C3D378FC17; Tue, 29 Jun 2010 14:32:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5TEW1uY049596; Tue, 29 Jun 2010 14:32:01 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TEW1Fi049594; Tue, 29 Jun 2010 14:32:01 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201006291432.o5TEW1Fi049594@svn.freebsd.org> From: John Baldwin Date: Tue, 29 Jun 2010 14:32:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209588 - head/share/man/man3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2010 14:32:01 -0000 Author: jhb Date: Tue Jun 29 14:32:01 2010 New Revision: 209588 URL: http://svn.freebsd.org/changeset/base/209588 Log: - The ETIMEDOUT error applies to pthread_timedjoin_np(), not pthread_join(). - Tweak wording in history section for pthread_timedjoin_np(). MFC after: 3 days Modified: head/share/man/man3/pthread_join.3 Modified: head/share/man/man3/pthread_join.3 ============================================================================== --- head/share/man/man3/pthread_join.3 Tue Jun 29 14:31:49 2010 (r209587) +++ head/share/man/man3/pthread_join.3 Tue Jun 29 14:32:01 2010 (r209588) @@ -116,7 +116,7 @@ The implementation detected that another .El .Pp Additionally, the -.Fn pthread_join +.Fn pthread_timedjoin_np function will fail if: .Bl -tag -width Er .It Bq Er ETIMEDOUT @@ -134,7 +134,7 @@ function conforms to .St -p1003.1-96 . The .Fn pthread_timedjoin_np -is +is a .Fx -extension, first appeared in +extension which first appeared in .Fx 6.1 . From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 16:57:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1468106566C; Tue, 29 Jun 2010 16:57:30 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF12D8FC1B; Tue, 29 Jun 2010 16:57:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5TGvUIT081559; Tue, 29 Jun 2010 16:57:30 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TGvU55081558; Tue, 29 Jun 2010 16:57:30 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201006291657.o5TGvU55081558@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 29 Jun 2010 16:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209589 - 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: Tue, 29 Jun 2010 16:57:31 -0000 Author: glebius Date: Tue Jun 29 16:57:30 2010 New Revision: 209589 URL: http://svn.freebsd.org/changeset/base/209589 Log: After processing the O_SKIPTO opcode our cmd points to the next rule, and "match" processing at the end of inner loop would look ahead into the next rule, which is incorrect. Particularly, in the case when the next rule started with F_NOT opcode it was skipped blindly. To fix this, exit the inner loop with the continue operator forcibly and explicitly. PR: kern/147798 Modified: head/sys/netinet/ipfw/ip_fw2.c Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Tue Jun 29 14:32:01 2010 (r209588) +++ head/sys/netinet/ipfw/ip_fw2.c Tue Jun 29 16:57:30 2010 (r209589) @@ -2012,14 +2012,15 @@ do { \ (1 << chain->map[f_pos]->set)); f_pos++) ; - /* prepare to enter the inner loop */ + /* Re-enter the inner loop at the skipto rule. */ f = chain->map[f_pos]; l = f->cmd_len; cmd = f->cmd; match = 1; cmdlen = 0; skip_or = 0; - break; + continue; + break; /* not reached */ case O_REJECT: /* From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 17:10:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F29961065677; Tue, 29 Jun 2010 17:10:55 +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 A41F98FC1F; Tue, 29 Jun 2010 17:10:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5THAtXM084579; Tue, 29 Jun 2010 17:10:55 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5THAtIC084577; Tue, 29 Jun 2010 17:10:55 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201006291710.o5THAtIC084577@svn.freebsd.org> From: Matt Jacob Date: Tue, 29 Jun 2010 17:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209590 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 17:10:56 -0000 Author: mjacob Date: Tue Jun 29 17:10:55 2010 New Revision: 209590 URL: http://svn.freebsd.org/changeset/base/209590 Log: Don't lock buses around a call to xptperiphlistmatch- the buses will be locked at appropriate places. MFC after: 1 week X-MFC: 208752 Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue Jun 29 16:57:30 2010 (r209589) +++ head/sys/cam/cam_xpt.c Tue Jun 29 17:10:55 2010 (r209590) @@ -2683,9 +2683,7 @@ xpt_action_default(union ccb *start_ccb) xptedtmatch(cdm); break; case CAM_DEV_POS_PDRV: - xpt_lock_buses(); xptperiphlistmatch(cdm); - xpt_unlock_buses(); break; default: cdm->status = CAM_DEV_MATCH_ERROR; From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 19:07:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DE11106566C; Tue, 29 Jun 2010 19:07:45 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D97E8FC08; Tue, 29 Jun 2010 19:07:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5TJ7ias010503; Tue, 29 Jun 2010 19:07:44 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TJ7itx010501; Tue, 29 Jun 2010 19:07:44 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201006291907.o5TJ7itx010501@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 29 Jun 2010 19: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: r209591 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 19:07:45 -0000 Author: marcel Date: Tue Jun 29 19:07:44 2010 New Revision: 209591 URL: http://svn.freebsd.org/changeset/base/209591 Log: Fix profiling (part 1): o Functions are 4-byte aligned for Book-E. o We get compiled with -DPROF and not -DGPROF if profiling is enabled. Modified: head/sys/powerpc/include/asm.h head/sys/powerpc/include/profile.h Modified: head/sys/powerpc/include/asm.h ============================================================================== --- head/sys/powerpc/include/asm.h Tue Jun 29 17:10:55 2010 (r209590) +++ head/sys/powerpc/include/asm.h Tue Jun 29 19:07:44 2010 (r209591) @@ -63,7 +63,7 @@ #define _ENTRY(x) \ .text; .align 4; .globl x; .type x,@function; x: -#ifdef GPROF +#ifdef PROF # define _PROF_PROLOGUE mflr 0; stw 0,4(1); bl _mcount #else # define _PROF_PROLOGUE Modified: head/sys/powerpc/include/profile.h ============================================================================== --- head/sys/powerpc/include/profile.h Tue Jun 29 17:10:55 2010 (r209590) +++ head/sys/powerpc/include/profile.h Tue Jun 29 19:07:44 2010 (r209591) @@ -34,7 +34,7 @@ #define _MCOUNT_DECL void __mcount -#define FUNCTION_ALIGNMENT 16 +#define FUNCTION_ALIGNMENT 4 typedef u_int fptrdiff_t; From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 20:41:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C4CF106566B; Tue, 29 Jun 2010 20:41:52 +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 5BCD78FC08; Tue, 29 Jun 2010 20:41: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 o5TKfqYx031073; Tue, 29 Jun 2010 20:41:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TKfqbv031066; Tue, 29 Jun 2010 20:41:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201006292041.o5TKfqbv031066@svn.freebsd.org> From: John Baldwin Date: Tue, 29 Jun 2010 20:41: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: r209592 - in head/sys: compat/linux kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 20:41:52 -0000 Author: jhb Date: Tue Jun 29 20:41:52 2010 New Revision: 209592 URL: http://svn.freebsd.org/changeset/base/209592 Log: Tweak the in-kernel API for sending signals to threads: - Rename tdsignal() to tdsendsignal() and make it private to kern_sig.c. - Add tdsignal() and tdksignal() routines that mirror psignal() and pksignal() except that they accept a thread as an argument instead of a process. They send a signal to a specific thread rather than to an individual process. Reviewed by: kib Modified: head/sys/compat/linux/linux_signal.c head/sys/kern/kern_exec.c head/sys/kern/kern_exit.c head/sys/kern/kern_sig.c head/sys/kern/kern_thr.c head/sys/sys/signalvar.h Modified: head/sys/compat/linux/linux_signal.c ============================================================================== --- head/sys/compat/linux/linux_signal.c Tue Jun 29 19:07:44 2010 (r209591) +++ head/sys/compat/linux/linux_signal.c Tue Jun 29 20:41:52 2010 (r209592) @@ -501,7 +501,7 @@ linux_rt_sigtimedwait(struct thread *td, /* Repost if we got an error. */ if (error && info.ksi_signo) { PROC_LOCK(td->td_proc); - tdsignal(td->td_proc, td, info.ksi_signo, &info); + tdksignal(td, info.ksi_signo, &info); PROC_UNLOCK(td->td_proc); } else td->td_retval[0] = info.ksi_signo; @@ -587,7 +587,7 @@ linux_do_tkill(struct thread *td, l_int ksi.ksi_pid = proc->p_pid; ksi.ksi_uid = proc->p_ucred->cr_ruid; - error = tdsignal(p, NULL, ksi.ksi_signo, &ksi); + error = pksignal(p, ksi.ksi_signo, &ksi); out: PROC_UNLOCK(p); Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Tue Jun 29 19:07:44 2010 (r209591) +++ head/sys/kern/kern_exec.c Tue Jun 29 20:41:52 2010 (r209592) @@ -755,13 +755,13 @@ interpret: /* * If tracing the process, trap to debugger so breakpoints * can be set before the program executes. - * Use tdsignal to deliver signal to current thread, use + * Use tdsignal to deliver signal to current thread, using * psignal may cause the signal to be delivered to wrong thread * because that thread will exit, remember we are going to enter * single thread mode. */ if (p->p_flag & P_TRACED) - tdsignal(p, td, SIGTRAP, NULL); + tdsignal(td, SIGTRAP); /* clear "fork but no exec" flag, as we _are_ execing */ p->p_acflag &= ~AFORK; Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Tue Jun 29 19:07:44 2010 (r209591) +++ head/sys/kern/kern_exit.c Tue Jun 29 20:41:52 2010 (r209592) @@ -732,7 +732,7 @@ proc_reap(struct thread *td, struct proc p->p_oppid = 0; proc_reparent(p, t); PROC_UNLOCK(p); - tdsignal(t, NULL, SIGCHLD, p->p_ksi); + pksignal(t, SIGCHLD, p->p_ksi); wakeup(t); cv_broadcast(&p->p_pwait); PROC_UNLOCK(t); Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Tue Jun 29 19:07:44 2010 (r209591) +++ head/sys/kern/kern_sig.c Tue Jun 29 20:41:52 2010 (r209592) @@ -107,6 +107,8 @@ static int killpg1(struct thread *td, in ksiginfo_t *ksi); static int issignal(struct thread *td, int stop_allowed); static int sigprop(int sig); +static int tdsendsignal(struct proc *p, struct thread *td, int sig, + ksiginfo_t *ksi); static void tdsigwakeup(struct thread *, int, sig_t, int); static void sig_suspend_threads(struct thread *, struct proc *, int); static int filt_sigattach(struct knote *kn); @@ -1797,7 +1799,7 @@ sigqueue(struct thread *td, struct sigqu ksi.ksi_pid = td->td_proc->p_pid; ksi.ksi_uid = td->td_ucred->cr_ruid; ksi.ksi_value.sival_ptr = uap->value; - error = tdsignal(p, NULL, ksi.ksi_signo, &ksi); + error = pksignal(p, ksi.ksi_signo, &ksi); } PROC_UNLOCK(p); return (error); @@ -1907,7 +1909,7 @@ trapsignal(struct thread *td, ksiginfo_t mtx_unlock(&ps->ps_mtx); p->p_code = code; /* XXX for core dump/debugger */ p->p_sig = sig; /* XXX to verify code */ - tdsignal(p, td, sig, ksi); + tdsendsignal(p, td, sig, ksi); } PROC_UNLOCK(p); } @@ -1962,14 +1964,14 @@ psignal(struct proc *p, int sig) ksiginfo_init(&ksi); ksi.ksi_signo = sig; ksi.ksi_code = SI_KERNEL; - (void) tdsignal(p, NULL, sig, &ksi); + (void) tdsendsignal(p, NULL, sig, &ksi); } -void +int pksignal(struct proc *p, int sig, ksiginfo_t *ksi) { - (void) tdsignal(p, NULL, sig, ksi); + return (tdsendsignal(p, NULL, sig, ksi)); } int @@ -1992,11 +1994,29 @@ psignal_event(struct proc *p, struct sig if (td == NULL) return (ESRCH); } - return (tdsignal(p, td, ksi->ksi_signo, ksi)); + return (tdsendsignal(p, td, ksi->ksi_signo, ksi)); } -int -tdsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) +void +tdsignal(struct thread *td, int sig) +{ + ksiginfo_t ksi; + + ksiginfo_init(&ksi); + ksi.ksi_signo = sig; + ksi.ksi_code = SI_KERNEL; + (void) tdsendsignal(td->td_proc, td, sig, &ksi); +} + +void +tdksignal(struct thread *td, int sig, ksiginfo_t *ksi) +{ + + (void) tdsendsignal(td->td_proc, td, sig, ksi); +} + +static int +tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) { sig_t action; sigqueue_t *sigqueue; @@ -2882,7 +2902,7 @@ sigparent(struct proc *p, int reason, in if (KSI_ONQ(p->p_ksi)) return; } - tdsignal(p->p_pptr, NULL, SIGCHLD, p->p_ksi); + pksignal(p->p_pptr, SIGCHLD, p->p_ksi); } static void Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Tue Jun 29 19:07:44 2010 (r209591) +++ head/sys/kern/kern_thr.c Tue Jun 29 20:41:52 2010 (r209592) @@ -326,7 +326,7 @@ thr_kill(struct thread *td, struct thr_k error = 0; if (uap->sig == 0) break; - tdsignal(p, ttd, uap->sig, &ksi); + tdksignal(ttd, uap->sig, &ksi); } } } @@ -342,7 +342,7 @@ thr_kill(struct thread *td, struct thr_k else if (!_SIG_VALID(uap->sig)) error = EINVAL; else - tdsignal(p, ttd, uap->sig, &ksi); + tdksignal(ttd, uap->sig, &ksi); } PROC_UNLOCK(p); return (error); @@ -384,8 +384,7 @@ thr_kill2(struct thread *td, struct thr_ error = 0; if (uap->sig == 0) break; - tdsignal(p, ttd, uap->sig, - &ksi); + tdksignal(ttd, uap->sig, &ksi); } } } @@ -401,7 +400,7 @@ thr_kill2(struct thread *td, struct thr_ else if (!_SIG_VALID(uap->sig)) error = EINVAL; else - tdsignal(p, ttd, uap->sig, &ksi); + tdksignal(ttd, uap->sig, &ksi); } } PROC_UNLOCK(p); Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Tue Jun 29 19:07:44 2010 (r209591) +++ head/sys/sys/signalvar.h Tue Jun 29 20:41:52 2010 (r209592) @@ -330,7 +330,7 @@ int cursig(struct thread *td, int stop_a void execsigs(struct proc *p); void gsignal(int pgid, int sig, ksiginfo_t *ksi); void killproc(struct proc *p, char *why); -void pksignal(struct proc *p, int sig, ksiginfo_t *ksi); +int pksignal(struct proc *p, int sig, ksiginfo_t *ksi); void pgsigio(struct sigio **, int signum, int checkctty); void pgsignal(struct pgrp *pgrp, int sig, int checkctty, ksiginfo_t *ksi); int postsig(int sig); @@ -346,8 +346,8 @@ int sig_ffs(sigset_t *set); void siginit(struct proc *p); void signotify(struct thread *td); void tdsigcleanup(struct thread *td); -int tdsignal(struct proc *p, struct thread *td, int sig, - ksiginfo_t *ksi); +void tdsignal(struct thread *td, int sig); +void tdksignal(struct thread *td, int sig, ksiginfo_t *ksi); void trapsignal(struct thread *td, ksiginfo_t *); int ptracestop(struct thread *td, int sig); ksiginfo_t * ksiginfo_alloc(int); From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 20:44:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B945106566B; Tue, 29 Jun 2010 20:44:20 +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 1C8F38FC0A; Tue, 29 Jun 2010 20:44: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 o5TKiK5G031770; Tue, 29 Jun 2010 20:44:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TKiJd7031766; Tue, 29 Jun 2010 20:44:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201006292044.o5TKiJd7031766@svn.freebsd.org> From: John Baldwin Date: Tue, 29 Jun 2010 20:44: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: r209595 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 20:44:20 -0000 Author: jhb Date: Tue Jun 29 20:44:19 2010 New Revision: 209595 URL: http://svn.freebsd.org/changeset/base/209595 Log: Send SIGPIPE to the thread that issued the offending system call rather than to the entire process. Reported by: Anit Chakraborty Reviewed by: kib, deischen (concept) MFC after: 1 week Modified: head/sys/kern/sys_generic.c head/sys/kern/sys_socket.c head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Tue Jun 29 20:43:39 2010 (r209594) +++ head/sys/kern/sys_generic.c Tue Jun 29 20:44:19 2010 (r209595) @@ -532,7 +532,7 @@ dofilewrite(td, fd, fp, auio, offset, fl /* Socket layer is responsible for issuing SIGPIPE. */ if (fp->f_type != DTYPE_SOCKET && error == EPIPE) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGPIPE); + tdsignal(td, SIGPIPE); PROC_UNLOCK(td->td_proc); } } Modified: head/sys/kern/sys_socket.c ============================================================================== --- head/sys/kern/sys_socket.c Tue Jun 29 20:43:39 2010 (r209594) +++ head/sys/kern/sys_socket.c Tue Jun 29 20:44:19 2010 (r209595) @@ -102,7 +102,7 @@ soo_write(struct file *fp, struct uio *u error = sosend(so, 0, uio, 0, 0, 0, uio->uio_td); if (error == EPIPE && (so->so_options & SO_NOSIGPIPE) == 0) { PROC_LOCK(uio->uio_td->td_proc); - psignal(uio->uio_td->td_proc, SIGPIPE); + tdsignal(uio->uio_td, SIGPIPE); PROC_UNLOCK(uio->uio_td->td_proc); } return (error); Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Tue Jun 29 20:43:39 2010 (r209594) +++ head/sys/kern/uipc_syscalls.c Tue Jun 29 20:44:19 2010 (r209595) @@ -794,7 +794,7 @@ kern_sendit(td, s, mp, flags, control, s if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && !(flags & MSG_NOSIGNAL)) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGPIPE); + tdsignal(td, SIGPIPE); PROC_UNLOCK(td->td_proc); } } @@ -2444,7 +2444,7 @@ sctp_generic_sendmsg (td, uap) if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && !(uap->flags & MSG_NOSIGNAL)) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGPIPE); + tdsignal(td, SIGPIPE); PROC_UNLOCK(td->td_proc); } } @@ -2562,7 +2562,7 @@ sctp_generic_sendmsg_iov(td, uap) if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && !(uap->flags & MSG_NOSIGNAL)) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGPIPE); + tdsignal(td, SIGPIPE); PROC_UNLOCK(td->td_proc); } } From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 20:55:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DCA31065675; Tue, 29 Jun 2010 20:55:13 +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 E99BD8FC19; Tue, 29 Jun 2010 20:55: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 o5TKtCFn034206; Tue, 29 Jun 2010 20:55:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TKtCi5034204; Tue, 29 Jun 2010 20:55:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201006292055.o5TKtCi5034204@svn.freebsd.org> From: John Baldwin Date: Tue, 29 Jun 2010 20:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209596 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 20:55:13 -0000 Author: jhb Date: Tue Jun 29 20:55:12 2010 New Revision: 209596 URL: http://svn.freebsd.org/changeset/base/209596 Log: Sort function prototypes (since I didn't manage to insert tdksignal() correctly). Modified: head/sys/sys/signalvar.h Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Tue Jun 29 20:44:19 2010 (r209595) +++ head/sys/sys/signalvar.h Tue Jun 29 20:55:12 2010 (r209596) @@ -330,12 +330,15 @@ int cursig(struct thread *td, int stop_a void execsigs(struct proc *p); void gsignal(int pgid, int sig, ksiginfo_t *ksi); void killproc(struct proc *p, char *why); +ksiginfo_t * ksiginfo_alloc(int); +void ksiginfo_free(ksiginfo_t *); int pksignal(struct proc *p, int sig, ksiginfo_t *ksi); void pgsigio(struct sigio **, int signum, int checkctty); void pgsignal(struct pgrp *pgrp, int sig, int checkctty, ksiginfo_t *ksi); int postsig(int sig); void psignal(struct proc *p, int sig); int psignal_event(struct proc *p, struct sigevent *, ksiginfo_t *); +int ptracestop(struct thread *td, int sig); struct sigacts *sigacts_alloc(void); void sigacts_copy(struct sigacts *dest, struct sigacts *src); void sigacts_free(struct sigacts *ps); @@ -345,18 +348,15 @@ void sigexit(struct thread *td, int sign int sig_ffs(sigset_t *set); void siginit(struct proc *p); void signotify(struct thread *td); +void sigqueue_delete(struct sigqueue *queue, int sig); +void sigqueue_delete_proc(struct proc *p, int sig); +void sigqueue_flush(struct sigqueue *queue); +void sigqueue_init(struct sigqueue *queue, struct proc *p); +void sigqueue_take(ksiginfo_t *ksi); +void tdksignal(struct thread *td, int sig, ksiginfo_t *ksi); void tdsigcleanup(struct thread *td); void tdsignal(struct thread *td, int sig); -void tdksignal(struct thread *td, int sig, ksiginfo_t *ksi); void trapsignal(struct thread *td, ksiginfo_t *); -int ptracestop(struct thread *td, int sig); -ksiginfo_t * ksiginfo_alloc(int); -void ksiginfo_free(ksiginfo_t *); -void sigqueue_init(struct sigqueue *queue, struct proc *p); -void sigqueue_flush(struct sigqueue *queue); -void sigqueue_delete_proc(struct proc *p, int sig); -void sigqueue_delete(struct sigqueue *queue, int sig); -void sigqueue_take(ksiginfo_t *ksi); int kern_sigtimedwait(struct thread *, sigset_t, ksiginfo_t *, struct timespec *); int kern_sigprocmask(struct thread *td, int how, From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 21:05:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18E69106564A; Tue, 29 Jun 2010 21:05:25 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2001:4dd0:ff41::b23f:aa]) by mx1.freebsd.org (Postfix) with ESMTP id AE7B28FC0C; Tue, 29 Jun 2010 21:05:24 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id A0B282A29267; Tue, 29 Jun 2010 23:05:22 +0200 (CEST) Date: Tue, 29 Jun 2010 23:05:22 +0200 From: Ed Schouten To: John Baldwin Message-ID: <20100629210522.GY2179@hoeg.nl> References: <201006292044.o5TKiJd7031766@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hgy5D1otryeNPdmY" Content-Disposition: inline In-Reply-To: <201006292044.o5TKiJd7031766@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209595 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 21:05:25 -0000 --hgy5D1otryeNPdmY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * John Baldwin wrote: > Log: > Send SIGPIPE to the thread that issued the offending system call > rather than to the entire process. Should something similar be used inside the TTY layer, where reads/writes may cause signals to be generated? Greetings, --=20 Ed Schouten WWW: http://80386.nl/ --hgy5D1otryeNPdmY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEARECAAYFAkwqYBIACgkQ52SDGA2eCwV5KwCfT1MpL2/x0iteOJAokiR5gnMj NrcAoIFX9gNtBlrjWofeygxsYDjHSRVU =UeWE -----END PGP SIGNATURE----- --hgy5D1otryeNPdmY-- From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 21:52:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D061106564A; Tue, 29 Jun 2010 21:52:41 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DEA78FC0C; Tue, 29 Jun 2010 21:52:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5TLqfFg046927; Tue, 29 Jun 2010 21:52:41 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TLqeEN046925; Tue, 29 Jun 2010 21:52:41 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201006292152.o5TLqeEN046925@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 29 Jun 2010 21:52:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209597 - head/sys/dev/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2010 21:52:41 -0000 Author: weongyo Date: Tue Jun 29 21:52:40 2010 New Revision: 209597 URL: http://svn.freebsd.org/changeset/base/209597 Log: Fixes NULL pointer reference that it's occurred when the state is changed to RUN because ic->ic_newassoc isn't set anywhere now. In the previous bwi_newassoc() is used to initialize AMRR rate routines. Tested by: Warren Block MFC after: 3 days Modified: head/sys/dev/bwi/if_bwi.c Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Tue Jun 29 20:55:12 2010 (r209596) +++ head/sys/dev/bwi/if_bwi.c Tue Jun 29 21:52:40 2010 (r209597) @@ -1774,7 +1774,6 @@ bwi_newstate(struct ieee80211vap *vap, e enum ieee80211_state ostate = vap->iv_state; struct bwi_softc *sc = ifp->if_softc; struct bwi_mac *mac; - struct ieee80211_node *ni = vap->iv_bss; int error; BWI_LOCK(sc); @@ -1822,10 +1821,6 @@ bwi_newstate(struct ieee80211vap *vap, e #else sc->sc_txpwrcb_type = BWI_TXPWR_CALIB; #endif - if (vap->iv_opmode == IEEE80211_M_STA) { - /* fake a join to init the tx rate */ - ic->ic_newassoc(ni, 1); - } callout_reset(&sc->sc_calib_ch, hz, bwi_calibrate, sc); } From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 21:56:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 133551065670; Tue, 29 Jun 2010 21:56:43 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 042908FC12; Tue, 29 Jun 2010 21:56: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 o5TLugNR047855; Tue, 29 Jun 2010 21:56:42 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TLugpT047853; Tue, 29 Jun 2010 21:56:42 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201006292156.o5TLugpT047853@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 29 Jun 2010 21:56: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: r209598 - head/sys/dev/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2010 21:56:43 -0000 Author: weongyo Date: Tue Jun 29 21:56:42 2010 New Revision: 209598 URL: http://svn.freebsd.org/changeset/base/209598 Log: Initializes the ratectl for a node when the state is changed to RUN. This prevents a kernel fault by dividing with zero because the initial rate was 0 and didn't be initialized. Tested by: Warren Block MFC after: 3 days Modified: head/sys/dev/bwi/if_bwi.c Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Tue Jun 29 21:52:40 2010 (r209597) +++ head/sys/dev/bwi/if_bwi.c Tue Jun 29 21:56:42 2010 (r209598) @@ -1769,6 +1769,7 @@ static int bwi_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { struct bwi_vap *bvp = BWI_VAP(vap); + const struct ieee80211_txparam *tp; struct ieee80211com *ic= vap->iv_ic; struct ifnet *ifp = ic->ic_ifp; enum ieee80211_state ostate = vap->iv_state; @@ -1822,6 +1823,11 @@ bwi_newstate(struct ieee80211vap *vap, e sc->sc_txpwrcb_type = BWI_TXPWR_CALIB; #endif + /* Initializes ratectl for a node. */ + tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; + if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) + ieee80211_ratectl_node_init(vap->iv_bss); + callout_reset(&sc->sc_calib_ch, hz, bwi_calibrate, sc); } back: From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 21:57:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00557106566B; Tue, 29 Jun 2010 21:57:44 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id BA9618FC0C; Tue, 29 Jun 2010 21:57:44 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 1D4D035A846; Tue, 29 Jun 2010 23:57:44 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 05F48172B6; Tue, 29 Jun 2010 23:57:44 +0200 (CEST) Date: Tue, 29 Jun 2010 23:57:43 +0200 From: Jilles Tjoelker To: Ed Schouten Message-ID: <20100629215743.GA68788@stack.nl> References: <201006292044.o5TKiJd7031766@svn.freebsd.org> <20100629210522.GY2179@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100629210522.GY2179@hoeg.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r209595 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 21:57:45 -0000 On Tue, Jun 29, 2010 at 11:05:22PM +0200, Ed Schouten wrote: > * John Baldwin wrote: > > Log: > > Send SIGPIPE to the thread that issued the offending system call > > rather than to the entire process. > Should something similar be used inside the TTY layer, where > reads/writes may cause signals to be generated? SIGTTIN and SIGTTOU from read/write/ioctl are sent to the entire process group and are therefore not sent to a specific thread. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 22:07:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12692106566B; Tue, 29 Jun 2010 22:07:54 +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 01A438FC12; Tue, 29 Jun 2010 22:07: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 o5TM7r6Y050345; Tue, 29 Jun 2010 22:07:53 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TM7rcp050339; Tue, 29 Jun 2010 22:07:53 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201006292207.o5TM7rcp050339@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 29 Jun 2010 22:07: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: r209599 - head/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 22:07:54 -0000 Author: ken Date: Tue Jun 29 22:07:53 2010 New Revision: 209599 URL: http://svn.freebsd.org/changeset/base/209599 Log: Change the mpt driver to allow larger I/O sizes. The mpt driver previously didn't report a 'maxio' size to CAM, and so the da(4) driver limited I/O sizes to DFLTPHYS (64K) by default. The number of scatter gather segments allowed, as reported to busdma, was (128K / PAGE_SIZE) + 1, or 33 on architectures with 4K pages. Change things around so that we wait until we've determined how many segments the adapter can support before creating the busdma tag used for buffers, so we can potentially support more S/G segments and therefore larger I/O sizes. Also, fix some things that were broken about the module unload path. It still gets hung up inside CAM, though. mpt.c: Move some busdma initialization calls in here, and call them just after we've gotten the IOCFacts, and know how many S/G segments this adapter can support. mpt.h: Get rid of MPT_MAXPHYS, it is no longer used. Add max_cam_seg_cnt, which is used to report our maximum I/O size up to CAM. mpt_cam.c: Use max_cam_seg_cnt to report our maximum I/O size to CAM. Fix the locking in mpt_cam_detach(). mpt_pci.c: Pull some busdma initialization and teardown out and put it in mpt.c. We now delay it until we know many scatter gather segments the adapter can support, and therefore how to setup our busdma tags. mpt_raid.c: Make sure we wake up the right wait channel to get the raid thread to wake up when we're trying to shut it down. Reviewed by: gibbs, mjacob MFC after: 2 weeks Modified: head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt.h head/sys/dev/mpt/mpt_cam.c head/sys/dev/mpt/mpt_pci.c head/sys/dev/mpt/mpt_raid.c Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Tue Jun 29 21:56:42 2010 (r209598) +++ head/sys/dev/mpt/mpt.c Tue Jun 29 22:07:53 2010 (r209599) @@ -128,6 +128,7 @@ static void mpt_send_event_ack(struct mp static int mpt_send_event_request(struct mpt_softc *mpt, int onoff); static int mpt_soft_reset(struct mpt_softc *mpt); static void mpt_hard_reset(struct mpt_softc *mpt); +static void mpt_dma_buf_free(struct mpt_softc *mpt); static int mpt_configure_ioc(struct mpt_softc *mpt, int, int); static int mpt_enable_ioc(struct mpt_softc *mpt, int); @@ -2246,14 +2247,6 @@ mpt_core_attach(struct mpt_softc *mpt) TAILQ_INIT(&mpt->request_pending_list); TAILQ_INIT(&mpt->request_free_list); TAILQ_INIT(&mpt->request_timeout_list); - MPT_LOCK(mpt); - for (val = 0; val < MPT_MAX_REQUESTS(mpt); val++) { - request_t *req = &mpt->request_pool[val]; - req->state = REQ_STATE_ALLOCATED; - mpt_callout_init(mpt, &req->callout); - mpt_free_request(mpt, req); - } - MPT_UNLOCK(mpt); for (val = 0; val < MPT_MAX_LUNS; val++) { STAILQ_INIT(&mpt->trt[val].atios); STAILQ_INIT(&mpt->trt[val].inots); @@ -2346,6 +2339,8 @@ mpt_core_detach(struct mpt_softc *mpt) request_t *req = &mpt->request_pool[val]; mpt_callout_drain(mpt, &req->callout); } + + mpt_dma_buf_free(mpt); } int @@ -2480,6 +2475,104 @@ mpt_download_fw(struct mpt_softc *mpt) return (0); } +int +mpt_dma_buf_alloc(struct mpt_softc *mpt) +{ + struct mpt_map_info mi; + uint8_t *vptr; + uint32_t pptr, end; + int i, error; + + /* Create a child tag for data buffers */ + if (mpt_dma_tag_create(mpt, mpt->parent_dmat, 1, + 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + NULL, NULL, MAXBSIZE, mpt->max_cam_seg_cnt, + BUS_SPACE_MAXSIZE_32BIT, 0, &mpt->buffer_dmat) != 0) { + mpt_prt(mpt, "cannot create a dma tag for data buffers\n"); + return (1); + } + + /* Create a child tag for request buffers */ + if (mpt_dma_tag_create(mpt, mpt->parent_dmat, PAGE_SIZE, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, + NULL, NULL, MPT_REQ_MEM_SIZE(mpt), 1, BUS_SPACE_MAXSIZE_32BIT, 0, + &mpt->request_dmat) != 0) { + mpt_prt(mpt, "cannot create a dma tag for requests\n"); + return (1); + } + + /* Allocate some DMA accessable memory for requests */ + if (bus_dmamem_alloc(mpt->request_dmat, (void **)&mpt->request, + BUS_DMA_NOWAIT, &mpt->request_dmap) != 0) { + mpt_prt(mpt, "cannot allocate %d bytes of request memory\n", + MPT_REQ_MEM_SIZE(mpt)); + return (1); + } + + mi.mpt = mpt; + mi.error = 0; + + /* Load and lock it into "bus space" */ + bus_dmamap_load(mpt->request_dmat, mpt->request_dmap, mpt->request, + MPT_REQ_MEM_SIZE(mpt), mpt_map_rquest, &mi, 0); + + if (mi.error) { + mpt_prt(mpt, "error %d loading dma map for DMA request queue\n", + mi.error); + return (1); + } + mpt->request_phys = mi.phys; + + /* + * Now create per-request dma maps + */ + i = 0; + pptr = mpt->request_phys; + vptr = mpt->request; + end = pptr + MPT_REQ_MEM_SIZE(mpt); + while(pptr < end) { + request_t *req = &mpt->request_pool[i]; + req->index = i++; + + /* Store location of Request Data */ + req->req_pbuf = pptr; + req->req_vbuf = vptr; + + pptr += MPT_REQUEST_AREA; + vptr += MPT_REQUEST_AREA; + + req->sense_pbuf = (pptr - MPT_SENSE_SIZE); + req->sense_vbuf = (vptr - MPT_SENSE_SIZE); + + error = bus_dmamap_create(mpt->buffer_dmat, 0, &req->dmap); + if (error) { + mpt_prt(mpt, "error %d creating per-cmd DMA maps\n", + error); + return (1); + } + } + + return (0); +} + +static void +mpt_dma_buf_free(struct mpt_softc *mpt) +{ + int i; + if (mpt->request_dmat == 0) { + mpt_lprt(mpt, MPT_PRT_DEBUG, "already released dma memory\n"); + return; + } + for (i = 0; i < MPT_MAX_REQUESTS(mpt); i++) { + bus_dmamap_destroy(mpt->buffer_dmat, mpt->request_pool[i].dmap); + } + bus_dmamap_unload(mpt->request_dmat, mpt->request_dmap); + bus_dmamem_free(mpt->request_dmat, mpt->request, mpt->request_dmap); + bus_dma_tag_destroy(mpt->request_dmat); + mpt->request_dmat = 0; + bus_dma_tag_destroy(mpt->buffer_dmat); +} + /* * Allocate/Initialize data structures for the controller. Called * once at instance startup. @@ -2488,7 +2581,7 @@ static int mpt_configure_ioc(struct mpt_softc *mpt, int tn, int needreset) { PTR_MSG_PORT_FACTS_REPLY pfp; - int error, port; + int error, port, val; size_t len; if (tn == MPT_MAX_TRYS) { @@ -2548,7 +2641,7 @@ mpt_configure_ioc(struct mpt_softc *mpt, /* limited by the number of chain areas the card will support */ if (mpt->max_seg_cnt > mpt->ioc_facts.MaxChainDepth) { - mpt_lprt(mpt, MPT_PRT_DEBUG, + mpt_lprt(mpt, MPT_PRT_INFO, "chain depth limited to %u (from %u)\n", mpt->ioc_facts.MaxChainDepth, mpt->max_seg_cnt); mpt->max_seg_cnt = mpt->ioc_facts.MaxChainDepth; @@ -2557,17 +2650,37 @@ mpt_configure_ioc(struct mpt_softc *mpt, /* converted to the number of simple sges in chain segments. */ mpt->max_seg_cnt *= (MPT_NSGL(mpt) - 1); - mpt_lprt(mpt, MPT_PRT_DEBUG, "Maximum Segment Count: %u\n", - mpt->max_seg_cnt); - mpt_lprt(mpt, MPT_PRT_DEBUG, "MsgLength=%u IOCNumber = %d\n", + /* + * Use this as the basis for reporting the maximum I/O size to CAM. + */ + mpt->max_cam_seg_cnt = min(mpt->max_seg_cnt, (MAXPHYS / PAGE_SIZE) + 1); + + error = mpt_dma_buf_alloc(mpt); + if (error != 0) { + mpt_prt(mpt, "mpt_dma_buf_alloc() failed!\n"); + return (EIO); + } + + for (val = 0; val < MPT_MAX_REQUESTS(mpt); val++) { + request_t *req = &mpt->request_pool[val]; + req->state = REQ_STATE_ALLOCATED; + mpt_callout_init(mpt, &req->callout); + mpt_free_request(mpt, req); + } + + mpt_lprt(mpt, MPT_PRT_INFO, "Maximum Segment Count: %u, Maximum " + "CAM Segment Count: %u\n", mpt->max_seg_cnt, + mpt->max_cam_seg_cnt); + + mpt_lprt(mpt, MPT_PRT_INFO, "MsgLength=%u IOCNumber = %d\n", mpt->ioc_facts.MsgLength, mpt->ioc_facts.IOCNumber); - mpt_lprt(mpt, MPT_PRT_DEBUG, + mpt_lprt(mpt, MPT_PRT_INFO, "IOCFACTS: GlobalCredits=%d BlockSize=%u bytes " "Request Frame Size %u bytes Max Chain Depth %u\n", mpt->ioc_facts.GlobalCredits, mpt->ioc_facts.BlockSize, mpt->ioc_facts.RequestFrameSize << 2, mpt->ioc_facts.MaxChainDepth); - mpt_lprt(mpt, MPT_PRT_DEBUG, "IOCFACTS: Num Ports %d, FWImageSize %d, " + mpt_lprt(mpt, MPT_PRT_INFO, "IOCFACTS: Num Ports %d, FWImageSize %d, " "Flags=%#x\n", mpt->ioc_facts.NumberOfPorts, mpt->ioc_facts.FWImageSize, mpt->ioc_facts.Flags); @@ -2757,7 +2870,7 @@ mpt_enable_ioc(struct mpt_softc *mpt, in mpt_send_event_request(mpt, 1); if (mpt_send_port_enable(mpt, 0) != MPT_OK) { - mpt_prt(mpt, "failed to enable port 0\n"); + mpt_prt(mpt, "%s: failed to enable port 0\n", __func__); return (ENXIO); } } Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Tue Jun 29 21:56:42 2010 (r209598) +++ head/sys/dev/mpt/mpt.h Tue Jun 29 22:07:53 2010 (r209599) @@ -743,6 +743,7 @@ struct mpt_softc { bus_addr_t request_phys; /* BusAddr of request memory */ uint32_t max_seg_cnt; /* calculated after IOC facts */ + uint32_t max_cam_seg_cnt;/* calculated from MAXPHYS*/ /* * Hardware management @@ -995,9 +996,6 @@ mpt_pio_read(struct mpt_softc *mpt, int /* Max MPT Reply we are willing to accept (must be power of 2) */ #define MPT_REPLY_SIZE 256 -/* Max i/o size, based on legacy MAXPHYS. Can be increased. */ -#define MPT_MAXPHYS (128 * 1024) - /* * Must be less than 16384 in order for target mode to work */ @@ -1281,6 +1279,7 @@ void mpt_check_doorbell(struct mpt_soft void mpt_dump_reply_frame(struct mpt_softc *mpt, MSG_DEFAULT_REPLY *reply_frame); +int mpt_dma_buf_alloc(struct mpt_softc *mpt); void mpt_set_config_regs(struct mpt_softc *); int mpt_issue_cfg_req(struct mpt_softc */*mpt*/, request_t */*req*/, cfgparms_t *params, Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Tue Jun 29 21:56:42 2010 (r209598) +++ head/sys/dev/mpt/mpt_cam.c Tue Jun 29 22:07:53 2010 (r209599) @@ -1205,25 +1205,21 @@ mpt_cam_detach(struct mpt_softc *mpt) free(mpt->sas_portinfo, M_DEVBUF); mpt->sas_portinfo = NULL; } - MPT_UNLOCK(mpt); if (mpt->sim != NULL) { xpt_free_path(mpt->path); - MPT_LOCK(mpt); xpt_bus_deregister(cam_sim_path(mpt->sim)); - MPT_UNLOCK(mpt); cam_sim_free(mpt->sim, TRUE); mpt->sim = NULL; } if (mpt->phydisk_sim != NULL) { xpt_free_path(mpt->phydisk_path); - MPT_LOCK(mpt); xpt_bus_deregister(cam_sim_path(mpt->phydisk_sim)); - MPT_UNLOCK(mpt); cam_sim_free(mpt->phydisk_sim, TRUE); mpt->phydisk_sim = NULL; } + MPT_UNLOCK(mpt); } /* This routine is used after a system crash to dump core onto the swap device. @@ -3586,6 +3582,7 @@ mpt_action(struct cam_sim *sim, union cc cpi->target_sprt = 0; cpi->hba_eng_cnt = 0; cpi->max_target = mpt->port_facts[0].MaxDevices - 1; + cpi->maxio = (mpt->max_cam_seg_cnt - 1) * PAGE_SIZE; /* * FC cards report MAX_DEVICES of 512, but * the MSG_SCSI_IO_REQUEST target id field @@ -4226,7 +4223,7 @@ mpt_fc_post_els(struct mpt_softc *mpt, r /* * Okay, set up ELS buffer pointers. ELS buffer pointers * consist of a TE SGL element (with details length of zero) - * followe by a SIMPLE SGL element which holds the address + * followed by a SIMPLE SGL element which holds the address * of the buffer. */ Modified: head/sys/dev/mpt/mpt_pci.c ============================================================================== --- head/sys/dev/mpt/mpt_pci.c Tue Jun 29 21:56:42 2010 (r209598) +++ head/sys/dev/mpt/mpt_pci.c Tue Jun 29 22:07:53 2010 (r209599) @@ -720,9 +720,6 @@ mpt_pci_shutdown(device_t dev) static int mpt_dma_mem_alloc(struct mpt_softc *mpt) { - int i, error, nsegs; - uint8_t *vptr; - uint32_t pptr, end; size_t len; struct mpt_map_info mi; @@ -795,82 +792,6 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) } mpt->reply_phys = mi.phys; - /* Create a child tag for data buffers */ - - /* - * XXX: we should say that nsegs is 'unrestricted, but that - * XXX: tickles a horrible bug in the busdma code. Instead, - * XXX: we'll derive a reasonable segment limit from MPT_MAXPHYS - */ - nsegs = (MPT_MAXPHYS / PAGE_SIZE) + 1; - if (mpt_dma_tag_create(mpt, mpt->parent_dmat, 1, - 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, - NULL, NULL, MAXBSIZE, nsegs, BUS_SPACE_MAXSIZE_32BIT, 0, - &mpt->buffer_dmat) != 0) { - mpt_prt(mpt, "cannot create a dma tag for data buffers\n"); - return (1); - } - - /* Create a child tag for request buffers */ - if (mpt_dma_tag_create(mpt, mpt->parent_dmat, PAGE_SIZE, 0, - BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, - NULL, NULL, MPT_REQ_MEM_SIZE(mpt), 1, BUS_SPACE_MAXSIZE_32BIT, 0, - &mpt->request_dmat) != 0) { - mpt_prt(mpt, "cannot create a dma tag for requests\n"); - return (1); - } - - /* Allocate some DMA accessable memory for requests */ - if (bus_dmamem_alloc(mpt->request_dmat, (void **)&mpt->request, - BUS_DMA_NOWAIT, &mpt->request_dmap) != 0) { - mpt_prt(mpt, "cannot allocate %d bytes of request memory\n", - MPT_REQ_MEM_SIZE(mpt)); - return (1); - } - - mi.mpt = mpt; - mi.error = 0; - - /* Load and lock it into "bus space" */ - bus_dmamap_load(mpt->request_dmat, mpt->request_dmap, mpt->request, - MPT_REQ_MEM_SIZE(mpt), mpt_map_rquest, &mi, 0); - - if (mi.error) { - mpt_prt(mpt, "error %d loading dma map for DMA request queue\n", - mi.error); - return (1); - } - mpt->request_phys = mi.phys; - - /* - * Now create per-request dma maps - */ - i = 0; - pptr = mpt->request_phys; - vptr = mpt->request; - end = pptr + MPT_REQ_MEM_SIZE(mpt); - while(pptr < end) { - request_t *req = &mpt->request_pool[i]; - req->index = i++; - - /* Store location of Request Data */ - req->req_pbuf = pptr; - req->req_vbuf = vptr; - - pptr += MPT_REQUEST_AREA; - vptr += MPT_REQUEST_AREA; - - req->sense_pbuf = (pptr - MPT_SENSE_SIZE); - req->sense_vbuf = (vptr - MPT_SENSE_SIZE); - - error = bus_dmamap_create(mpt->buffer_dmat, 0, &req->dmap); - if (error) { - mpt_prt(mpt, "error %d creating per-cmd DMA maps\n", - error); - return (1); - } - } - return (0); } @@ -881,7 +802,6 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) static void mpt_dma_mem_free(struct mpt_softc *mpt) { - int i; /* Make sure we aren't double destroying */ if (mpt->reply_dmat == 0) { @@ -889,13 +809,6 @@ mpt_dma_mem_free(struct mpt_softc *mpt) return; } - for (i = 0; i < MPT_MAX_REQUESTS(mpt); i++) { - bus_dmamap_destroy(mpt->buffer_dmat, mpt->request_pool[i].dmap); - } - bus_dmamap_unload(mpt->request_dmat, mpt->request_dmap); - bus_dmamem_free(mpt->request_dmat, mpt->request, mpt->request_dmap); - bus_dma_tag_destroy(mpt->request_dmat); - bus_dma_tag_destroy(mpt->buffer_dmat); bus_dmamap_unload(mpt->reply_dmat, mpt->reply_dmap); bus_dmamem_free(mpt->reply_dmat, mpt->reply, mpt->reply_dmap); bus_dma_tag_destroy(mpt->reply_dmat); Modified: head/sys/dev/mpt/mpt_raid.c ============================================================================== --- head/sys/dev/mpt/mpt_raid.c Tue Jun 29 21:56:42 2010 (r209598) +++ head/sys/dev/mpt/mpt_raid.c Tue Jun 29 22:07:53 2010 (r209599) @@ -646,7 +646,7 @@ mpt_terminate_raid_thread(struct mpt_sof return; } mpt->shutdwn_raid = 1; - wakeup(mpt->raid_volumes); + wakeup(&mpt->raid_volumes); /* * Sleep on a slightly different location * for this interlock just for added safety. From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 22:37:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3365B106566B; Tue, 29 Jun 2010 22:37:46 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 235DD8FC1C; Tue, 29 Jun 2010 22:37: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 o5TMbkYc056971; Tue, 29 Jun 2010 22:37:46 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TMbjuC056966; Tue, 29 Jun 2010 22:37:45 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201006292237.o5TMbjuC056966@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 29 Jun 2010 22:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209600 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 22:37:46 -0000 Author: jilles Date: Tue Jun 29 22:37:45 2010 New Revision: 209600 URL: http://svn.freebsd.org/changeset/base/209600 Log: sh: Forget about terminated background processes sooner. Unless $! has been referenced for a particular job or $! still contains that job's pid, forget about it after it has terminated. If $! has been referenced, remember the job until the wait builtin has reported its completion (either with the pid as parameter or without parameters). In interactive mode, jobs are forgotten after termination has been reported, which happens before primary prompts and through the jobs builtin. Even then, though, remember a job if $! has been referenced. This is similar to what is suggested by POSIX and should fix most memory leaks (which also tend to cause sh to use more CPU time) with long running scripts that start background jobs. Caveats: * Repeatedly referencing $! without ever doing 'wait', like while :; do foo & echo started foo: $!; sleep 60; done will still use a lot of memory and CPU time in the long run. * The jobs and jobid builtins do not cause a job to be remembered for longer like expanding $! does. PR: bin/55346 Modified: head/bin/sh/expand.c head/bin/sh/jobs.c head/bin/sh/jobs.h head/bin/sh/sh.1 Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Tue Jun 29 22:07:53 2010 (r209599) +++ head/bin/sh/expand.c Tue Jun 29 22:37:45 2010 (r209600) @@ -818,7 +818,7 @@ varisset(char *name, int nulok) { if (*name == '!') - return backgndpid != -1; + return backgndpidset(); else if (*name == '@' || *name == '*') { if (*shellparam.p == NULL) return 0; @@ -891,7 +891,7 @@ varvalue(char *name, int quoted, int sub num = shellparam.nparam; goto numvar; case '!': - num = backgndpid; + num = backgndpidval(); numvar: expdest = cvtnum(num, expdest); break; Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Tue Jun 29 22:07:53 2010 (r209599) +++ head/bin/sh/jobs.c Tue Jun 29 22:37:45 2010 (r209600) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); STATIC struct job *jobtab; /* array of jobs */ STATIC int njobs; /* size of array */ MKINIT pid_t backgndpid = -1; /* pid of last background process */ +MKINIT struct job *bgjob = NULL; /* last background process */ #if JOBS STATIC struct job *jobmru; /* most recently used job list */ STATIC pid_t initialpgrp; /* pgrp of shell on invocation */ @@ -183,6 +184,7 @@ INCLUDE SHELLPROC { backgndpid = -1; + bgjob = NULL; #if JOBS jobctl = 0; #endif @@ -413,7 +415,11 @@ showjobs(int change, int mode) continue; showjob(jp, 0, mode); jp->changed = 0; - if (jp->state == JOBDONE) { + /* Hack: discard jobs for which $! has not been referenced + * in interactive mode when they terminate. + */ + if (jp->state == JOBDONE && !jp->remembered && + (iflag || jp != bgjob)) { freejob(jp); } } @@ -431,6 +437,8 @@ freejob(struct job *jp) int i; INTOFF; + if (bgjob == jp) + bgjob = NULL; for (i = jp->nprocs, ps = jp->ps ; --i >= 0 ; ps++) { if (ps->cmd != nullstr) ckfree(ps->cmd); @@ -477,12 +485,27 @@ waitcmd(int argc, char **argv) #endif else retval = WTERMSIG(status) + 128; - if (! iflag) + if (! iflag || ! job->changed) freejob(job); + else { + job->remembered = 0; + if (job == bgjob) + bgjob = NULL; + } in_waitcmd--; return retval; } } else { + for (jp = jobtab ; jp < jobtab + njobs; jp++) + if (jp->used && jp->state == JOBDONE) { + if (! iflag || ! jp->changed) + freejob(jp); + else { + jp->remembered = 0; + if (jp == bgjob) + bgjob = NULL; + } + } for (jp = jobtab ; ; jp++) { if (jp >= jobtab + njobs) { /* no running procs */ in_waitcmd--; @@ -623,6 +646,8 @@ makejob(union node *node __unused, int n jp[i].next = &jp[jp[i].next - jobtab]; #endif + if (bgjob != NULL) + bgjob = &jp[bgjob - jobtab]; /* Relocate `ps' pointers */ for (i = 0; i < njobs; i++) if (jp[i].ps == &jobtab[i].ps0) @@ -644,6 +669,7 @@ makejob(union node *node __unused, int n jp->changed = 0; jp->nprocs = 0; jp->foreground = 0; + jp->remembered = 0; #if JOBS jp->jobctl = jobctl; jp->next = NULL; @@ -821,8 +847,13 @@ forkshell(struct job *jp, union node *n, pgrp = jp->ps[0].pid; setpgid(pid, pgrp); } - if (mode == FORK_BG) + if (mode == FORK_BG) { + if (bgjob != NULL && bgjob->state == JOBDONE && + !bgjob->remembered && !iflag) + freejob(bgjob); backgndpid = pid; /* set $! */ + bgjob = jp; + } if (jp) { struct procstat *ps = &jp->ps[jp->nprocs++]; ps->pid = pid; @@ -975,10 +1006,15 @@ dowait(int block, struct job *job) if (jp->state != state) { TRACE(("Job %d: changing state from %d to %d\n", jp - jobtab + 1, jp->state, state)); jp->state = state; + if (jp != job) { + if (done && !jp->remembered && + !iflag && jp != bgjob) + freejob(jp); #if JOBS - if (done) - deljob(jp); + else if (done) + deljob(jp); #endif + } } } } @@ -1074,6 +1110,21 @@ checkzombies(void) } +int +backgndpidset(void) +{ + return backgndpid != -1; +} + + +pid_t +backgndpidval(void) +{ + if (bgjob != NULL) + bgjob->remembered = 1; + return backgndpid; +} + /* * Return a string identifying a command (to be printed by the * jobs command. Modified: head/bin/sh/jobs.h ============================================================================== --- head/bin/sh/jobs.h Tue Jun 29 22:07:53 2010 (r209599) +++ head/bin/sh/jobs.h Tue Jun 29 22:37:45 2010 (r209600) @@ -68,6 +68,7 @@ struct job { char used; /* true if this entry is in used */ char changed; /* true if status has changed */ char foreground; /* true if running in the foreground */ + char remembered; /* true if $! referenced */ #if JOBS char jobctl; /* job running under job control */ struct job *next; /* job used after this one */ @@ -81,7 +82,6 @@ enum { SHOWJOBS_PGIDS /* PID of the group leader only */ }; -extern pid_t backgndpid; /* pid of last background process */ extern int job_warning; /* user was warned about stopped jobs */ extern int in_waitcmd; /* are we in waitcmd()? */ extern int in_dowait; /* are we in dowait()? */ @@ -98,6 +98,8 @@ struct job *makejob(union node *, int); pid_t forkshell(struct job *, union node *, int); int waitforjob(struct job *, int *); int stoppedjobs(void); +int backgndpidset(void); +pid_t backgndpidval(void); char *commandtext(union node *); #if ! JOBS Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Tue Jun 29 22:07:53 2010 (r209599) +++ head/bin/sh/sh.1 Tue Jun 29 22:37:45 2010 (r209600) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd May 24, 2010 +.Dd June 29, 2010 .Dt SH 1 .Os .Sh NAME @@ -1106,6 +1106,10 @@ command executed from the current shell. For a pipeline, the process ID is that of the last command in the pipeline. +If this parameter is referenced, the shell will remember +the process ID and its exit status until the +.Ic wait +built-in command reports completion of the process. .It Li $0 (zero) Expands to the name of the shell or shell script. .El From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 23:08:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC16C1065672; Tue, 29 Jun 2010 23:08:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7259E8FC0C; Tue, 29 Jun 2010 23:08: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 o5TN8XRA064114; Tue, 29 Jun 2010 23:08:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5TN8XSA064112; Tue, 29 Jun 2010 23:08:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201006292308.o5TN8XSA064112@svn.freebsd.org> From: Xin LI Date: Tue, 29 Jun 2010 23:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209601 - in stable/8/tools: build/mk regression/lib/msun regression/usr.bin/pkill tools/ath/common tools/termcap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2010 23:08:33 -0000 Author: delphij Date: Tue Jun 29 23:08:33 2010 New Revision: 209601 URL: http://svn.freebsd.org/changeset/base/209601 Log: MFC r203584,r203711,r203733,r204379: Teach obsolete NO_MAIL* friends. Modified: stable/8/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/8/tools/ (props changed) stable/8/tools/build/mk/ (props changed) stable/8/tools/build/options/ (props changed) stable/8/tools/kerneldoc/subsys/ (props changed) stable/8/tools/regression/acltools/ (props changed) stable/8/tools/regression/aio/aiotest/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) stable/8/tools/regression/fifo/ (props changed) stable/8/tools/regression/geom/ (props changed) stable/8/tools/regression/lib/libc/ (props changed) stable/8/tools/regression/lib/msun/test-conj.t (props changed) stable/8/tools/regression/mqueue/mqtest1/ (props changed) stable/8/tools/regression/mqueue/mqtest2/ (props changed) stable/8/tools/regression/mqueue/mqtest3/ (props changed) stable/8/tools/regression/mqueue/mqtest4/ (props changed) stable/8/tools/regression/mqueue/mqtest5/ (props changed) stable/8/tools/regression/poll/ (props changed) stable/8/tools/regression/posixsem/ (props changed) stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) stable/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/tools/test/ (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) stable/8/tools/tools/nanobsd/ (props changed) stable/8/tools/tools/netrate/tcpp/ (props changed) stable/8/tools/tools/termcap/termcap.pl (props changed) stable/8/tools/tools/vimage/ (props changed) Modified: stable/8/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/8/tools/build/mk/OptionalObsoleteFiles.inc Tue Jun 29 22:37:45 2010 (r209600) +++ stable/8/tools/build/mk/OptionalObsoleteFiles.inc Tue Jun 29 23:08:33 2010 (r209601) @@ -889,9 +889,33 @@ OLD_FILES+=usr/share/man/man8/lpd.8.gz OLD_FILES+=usr/share/man/man8/pac.8.gz .endif -#.if ${MK_MAILWRAPPER} == no -# to be filled in -#.endif +.if ${MK_MAIL} == no +OLD_FILES+=usr/bin/Mail +OLD_FILES+=usr/bin/biff +OLD_FILES+=usr/bin/from +OLD_FILES+=usr/bin/mail +OLD_FILES+=usr/bin/mailx +OLD_FILES+=usr/bin/msgs +OLD_FILES+=usr/libexec/comsat +OLD_FILES+=usr/share/examples/etc/mail.rc +OLD_FILES+=usr/share/man/man1/Mail.1.gz +OLD_FILES+=usr/share/man/man1/biff.1.gz +OLD_FILES+=usr/share/man/man1/from.1.gz +OLD_FILES+=usr/share/man/man1/mail.1.gz +OLD_FILES+=usr/share/man/man1/mailx.1.gz +OLD_FILES+=usr/share/man/man1/msgs.1.gz +OLD_FILES+=usr/share/man/man8/comsat.8.gz +OLD_FILES+=usr/share/misc/mail.help +OLD_FILES+=usr/share/misc/mail.tildehelp +.endif + +.if ${MK_MAILWRAPPER} == no +OLD_FILES+=etc/mail/mailer.conf +.if ${MK_SENDMAIL} == no +OLD_FILES+=usr/sbin/mailwrapper +.endif +OLD_FILES+=usr/share/man/man8/mailwrapper.8.gz +.endif #.if ${MK_MAN} == no # This should add a dependency to a special target which removes all man pages. @@ -1103,9 +1127,220 @@ OLD_FILES+=usr/share/man/man8/rshd.8.gz # to be filled in or replaced with a special target #.endif -#.if ${MK_SENDMAIL} == no -# to be filled in -#.endif +.if ${MK_SENDMAIL} == no +OLD_FILES+=bin/rmail +OLD_FILES+=usr/bin/vacation +OLD_FILES+=usr/include/libmilter/mfapi.h +OLD_FILES+=usr/include/libmilter/mfdef.h +OLD_FILES+=usr/lib/libmilter.a +OLD_LIBS+=usr/lib/libmilter.so.5 +OLD_FILES+=usr/lib/libmilter_p.a +.if ${TARGET_ARCH} == "amd64" +OLD_FILES+=usr/lib32/libmilter.a +OLD_LIBS+=usr/lib32/libmilter.so.5 +OLD_FILES+=usr/lib32/libmilter_p.a +.endif +OLD_FILES+=usr/libexec/mail.local +OLD_FILES+=usr/libexec/sendmail/sendmail +OLD_FILES+=usr/libexec/smrsh +OLD_FILES+=usr/sbin/editmap +OLD_FILES+=usr/sbin/mailstats +OLD_FILES+=usr/sbin/makemap +OLD_FILES+=usr/sbin/praliases +OLD_FILES+=usr/share/doc/smm/08.sendmailop/paper.ascii.gz +OLD_FILES+=usr/share/man/man1/mailq.1.gz +OLD_FILES+=usr/share/man/man1/newaliases.1.gz +OLD_FILES+=usr/share/man/man1/vacation.1.gz +OLD_FILES+=usr/share/man/man5/aliases.5.gz +OLD_FILES+=usr/share/man/man8/editmap.8.gz +OLD_FILES+=usr/share/man/man8/hoststat.8.gz +OLD_FILES+=usr/share/man/man8/mail.local.8.gz +OLD_FILES+=usr/share/man/man8/mailstats.8.gz +OLD_FILES+=usr/share/man/man8/makemap.8.gz +OLD_FILES+=usr/share/man/man8/praliases.8.gz +OLD_FILES+=usr/share/man/man8/purgestat.8.gz +OLD_FILES+=usr/share/man/man8/rmail.8.gz +OLD_FILES+=usr/share/man/man8/sendmail.8.gz +OLD_FILES+=usr/share/man/man8/smrsh.8.gz +OLD_FILES+=usr/share/sendmail/cf/README +OLD_FILES+=usr/share/sendmail/cf/cf/Makefile +OLD_FILES+=usr/share/sendmail/cf/cf/README +OLD_FILES+=usr/share/sendmail/cf/cf/chez.cs.mc +OLD_FILES+=usr/share/sendmail/cf/cf/clientproto.mc +OLD_FILES+=usr/share/sendmail/cf/cf/cs-hpux10.mc +OLD_FILES+=usr/share/sendmail/cf/cf/cs-hpux9.mc +OLD_FILES+=usr/share/sendmail/cf/cf/cs-osf1.mc +OLD_FILES+=usr/share/sendmail/cf/cf/cs-solaris2.mc +OLD_FILES+=usr/share/sendmail/cf/cf/cs-sunos4.1.mc +OLD_FILES+=usr/share/sendmail/cf/cf/cs-ultrix4.mc +OLD_FILES+=usr/share/sendmail/cf/cf/cyrusproto.mc +OLD_FILES+=usr/share/sendmail/cf/cf/generic-bsd4.4.mc +OLD_FILES+=usr/share/sendmail/cf/cf/generic-hpux10.mc +OLD_FILES+=usr/share/sendmail/cf/cf/generic-hpux9.mc +OLD_FILES+=usr/share/sendmail/cf/cf/generic-linux.mc +OLD_FILES+=usr/share/sendmail/cf/cf/generic-mpeix.mc +OLD_FILES+=usr/share/sendmail/cf/cf/generic-nextstep3.3.mc +OLD_FILES+=usr/share/sendmail/cf/cf/generic-osf1.mc +OLD_FILES+=usr/share/sendmail/cf/cf/generic-solaris.mc +OLD_FILES+=usr/share/sendmail/cf/cf/generic-sunos4.1.mc +OLD_FILES+=usr/share/sendmail/cf/cf/generic-ultrix4.mc +OLD_FILES+=usr/share/sendmail/cf/cf/huginn.cs.mc +OLD_FILES+=usr/share/sendmail/cf/cf/knecht.mc +OLD_FILES+=usr/share/sendmail/cf/cf/mail.cs.mc +OLD_FILES+=usr/share/sendmail/cf/cf/mail.eecs.mc +OLD_FILES+=usr/share/sendmail/cf/cf/mailspool.cs.mc +OLD_FILES+=usr/share/sendmail/cf/cf/python.cs.mc +OLD_FILES+=usr/share/sendmail/cf/cf/s2k-osf1.mc +OLD_FILES+=usr/share/sendmail/cf/cf/s2k-ultrix4.mc +OLD_FILES+=usr/share/sendmail/cf/cf/submit.cf +OLD_FILES+=usr/share/sendmail/cf/cf/submit.mc +OLD_FILES+=usr/share/sendmail/cf/cf/tcpproto.mc +OLD_FILES+=usr/share/sendmail/cf/cf/ucbarpa.mc +OLD_FILES+=usr/share/sendmail/cf/cf/ucbvax.mc +OLD_FILES+=usr/share/sendmail/cf/cf/uucpproto.mc +OLD_FILES+=usr/share/sendmail/cf/cf/vangogh.cs.mc +OLD_FILES+=usr/share/sendmail/cf/domain/Berkeley.EDU.m4 +OLD_FILES+=usr/share/sendmail/cf/domain/CS.Berkeley.EDU.m4 +OLD_FILES+=usr/share/sendmail/cf/domain/EECS.Berkeley.EDU.m4 +OLD_FILES+=usr/share/sendmail/cf/domain/S2K.Berkeley.EDU.m4 +OLD_FILES+=usr/share/sendmail/cf/domain/berkeley-only.m4 +OLD_FILES+=usr/share/sendmail/cf/domain/generic.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/accept_unqualified_senders.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/accept_unresolvable_domains.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/access_db.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/allmasquerade.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/always_add_domain.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/authinfo.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/badmx.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/bestmx_is_local.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/bitdomain.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/blacklist_recipients.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/block_bad_helo.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/compat_check.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/conncontrol.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/delay_checks.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/dnsbl.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/domaintable.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/enhdnsbl.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/generics_entire_domain.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/genericstable.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/greet_pause.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/ldap_routing.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/limited_masquerade.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/local_lmtp.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/local_no_masquerade.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/local_procmail.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/lookupdotdomain.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/loose_relay_check.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/mailertable.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/masquerade_entire_domain.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/masquerade_envelope.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/msp.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/mtamark.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/no_default_msa.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/nocanonify.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/notsticky.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/nouucp.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/nullclient.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/preserve_local_plus_detail.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/preserve_luser_host.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/promiscuous_relay.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/queuegroup.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/ratecontrol.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/redirect.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/relay_based_on_MX.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/relay_entire_domain.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/relay_hosts_only.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/relay_local_from.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/relay_mail_from.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/require_rdns.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/smrsh.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/stickyhost.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/use_client_ptr.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/use_ct_file.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/use_cw_file.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/uucpdomain.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/virtuser_entire_domain.m4 +OLD_FILES+=usr/share/sendmail/cf/feature/virtusertable.m4 +OLD_FILES+=usr/share/sendmail/cf/hack/cssubdomain.m4 +OLD_FILES+=usr/share/sendmail/cf/m4/cf.m4 +OLD_FILES+=usr/share/sendmail/cf/m4/cfhead.m4 +OLD_FILES+=usr/share/sendmail/cf/m4/proto.m4 +OLD_FILES+=usr/share/sendmail/cf/m4/version.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/cyrus.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/cyrusv2.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/fax.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/local.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/mail11.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/phquery.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/pop.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/procmail.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/qpage.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/smtp.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/usenet.m4 +OLD_FILES+=usr/share/sendmail/cf/mailer/uucp.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/a-ux.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/aix3.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/aix4.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/aix5.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/altos.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/amdahl-uts.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/bsd4.3.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/bsd4.4.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/bsdi.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/bsdi1.0.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/bsdi2.0.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/darwin.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/dgux.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/domainos.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/dragonfly.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/dynix3.2.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/freebsd4.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/freebsd5.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/freebsd6.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/gnu.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/hpux10.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/hpux11.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/hpux9.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/irix4.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/irix5.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/irix6.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/isc4.1.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/linux.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/maxion.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/mklinux.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/mpeix.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/nextstep.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/openbsd.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/osf1.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/powerux.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/ptx2.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/qnx.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/riscos4.5.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/sco-uw-2.1.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/sco3.2.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/sinix.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/solaris2.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/solaris2.ml.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/solaris2.pre5.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/solaris8.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/sunos3.5.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/sunos4.1.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/svr4.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/ultrix4.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/unicos.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/unicosmk.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/unicosmp.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/unixware7.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/unknown.m4 +OLD_FILES+=usr/share/sendmail/cf/ostype/uxpds.m4 +OLD_FILES+=usr/share/sendmail/cf/sendmail.schema +OLD_FILES+=usr/share/sendmail/cf/sh/makeinfo.sh +OLD_FILES+=usr/share/sendmail/cf/siteconfig/uucp.cogsci.m4 +OLD_FILES+=usr/share/sendmail/cf/siteconfig/uucp.old.arpa.m4 +OLD_FILES+=usr/share/sendmail/cf/siteconfig/uucp.ucbarpa.m4 +OLD_FILES+=usr/share/sendmail/cf/siteconfig/uucp.ucbvax.m4 +.endif #.if ${MK_SHAREDOCS} == no # to be filled in From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 01:01:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA0C5106564A; Wed, 30 Jun 2010 01:01:06 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B87D88FC0C; Wed, 30 Jun 2010 01:01: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 o5U1161O088814; Wed, 30 Jun 2010 01:01:06 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5U116at088812; Wed, 30 Jun 2010 01:01:06 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201006300101.o5U116at088812@svn.freebsd.org> From: Jack F Vogel Date: Wed, 30 Jun 2010 01:01: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: r209602 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 01:01:06 -0000 Author: jfv Date: Wed Jun 30 01:01:06 2010 New Revision: 209602 URL: http://svn.freebsd.org/changeset/base/209602 Log: Add a new sysctl option, this will allow one to limit the advertised speed of an SFP+ to 1G, effectively "forcing" link at that lower speed. It is off by default and is enabled by sysctl dev.ix.0.force_gig=1, 0 will set it back to the norm. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Tue Jun 29 23:08:33 2010 (r209601) +++ head/sys/dev/ixgbe/ixgbe.c Wed Jun 30 01:01:06 2010 (r209602) @@ -239,6 +239,15 @@ static int ixgbe_flow_control = ixgbe_fc TUNABLE_INT("hw.ixgbe.flow_control", &ixgbe_flow_control); /* +** These adapters do not really autoneg, but slower +** speed can be set by forcing the advertised value +** to only 1G. Default to 0, set it to 1 to +** force 1G link. +*/ +static int ixgbe_force_speed = 0; +TUNABLE_INT("hw.ixgbe.force_speed", &ixgbe_force_speed); + +/* ** Smart speed setting, default to on ** this only works as a compile option ** right now as its during attach, set @@ -464,6 +473,11 @@ ixgbe_attach(device_t dev) OID_AUTO, "flow_control", CTLTYPE_INT | CTLFLAG_RW, adapter, 0, ixgbe_set_flowcntl, "I", "Flow Control"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "force_gig", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_set_gigspeed, "I", "Force 1G Speed"); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "enable_aim", CTLTYPE_INT|CTLFLAG_RW, @@ -4942,6 +4956,34 @@ ixgbe_sysctl_debug(SYSCTL_HANDLER_ARGS) } /* +** Set link advertisement to 1G: +** 0 - off +** 1 - off +*/ +static int +ixgbe_set_gigspeed(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter; + struct ixgbe_hw *hw; + int error; + + error = sysctl_handle_int(oidp, &ixgbe_force_speed, 0, req); + + if (error) + return (error); + + adapter = (struct adapter *) arg1; + hw = &adapter->hw; + if (ixgbe_force_speed) + hw->phy.autoneg_advertised = IXGBE_LINK_SPEED_1GB_FULL; + else + hw->phy.autoneg_advertised = IXGBE_LINK_SPEED_10GB_FULL; + + return error; +} + + +/* ** Set flow control using sysctl: ** Flow control values: ** 0 - off From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 01:10:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C81E81065670; Wed, 30 Jun 2010 01:10:08 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABBD68FC0C; Wed, 30 Jun 2010 01: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 o5U1A8FK090812; Wed, 30 Jun 2010 01:10:08 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5U1A8VK090810; Wed, 30 Jun 2010 01:10:08 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201006300110.o5U1A8VK090810@svn.freebsd.org> From: Jack F Vogel Date: Wed, 30 Jun 2010 01:10: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: r209603 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 01:10:09 -0000 Author: jfv Date: Wed Jun 30 01:10:08 2010 New Revision: 209603 URL: http://svn.freebsd.org/changeset/base/209603 Log: BAH, I apologize, the wrong version of the code got fat fingered in place, this is the correct version that actually works... MFC: in a week Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Wed Jun 30 01:01:06 2010 (r209602) +++ head/sys/dev/ixgbe/ixgbe.c Wed Jun 30 01:10:08 2010 (r209603) @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.2.1"; +char ixgbe_driver_version[] = "2.2.3"; /********************************************************************* * PCI Device ID Table @@ -154,6 +154,7 @@ static int ixgbe_xmit(struct tx_rin static int ixgbe_sysctl_stats(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_debug(SYSCTL_HANDLER_ARGS); static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS); +static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS); static int ixgbe_dma_malloc(struct adapter *, bus_size_t, struct ixgbe_dma_alloc *, int); static void ixgbe_dma_free(struct adapter *, struct ixgbe_dma_alloc *); @@ -239,15 +240,6 @@ static int ixgbe_flow_control = ixgbe_fc TUNABLE_INT("hw.ixgbe.flow_control", &ixgbe_flow_control); /* -** These adapters do not really autoneg, but slower -** speed can be set by forcing the advertised value -** to only 1G. Default to 0, set it to 1 to -** force 1G link. -*/ -static int ixgbe_force_speed = 0; -TUNABLE_INT("hw.ixgbe.force_speed", &ixgbe_force_speed); - -/* ** Smart speed setting, default to on ** this only works as a compile option ** right now as its during attach, set @@ -475,8 +467,8 @@ ixgbe_attach(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "force_gig", CTLTYPE_INT | CTLFLAG_RW, - adapter, 0, ixgbe_set_gigspeed, "I", "Force 1G Speed"); + OID_AUTO, "advertise_gig", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_set_advertise, "I", "1G Link"); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), @@ -4956,34 +4948,6 @@ ixgbe_sysctl_debug(SYSCTL_HANDLER_ARGS) } /* -** Set link advertisement to 1G: -** 0 - off -** 1 - off -*/ -static int -ixgbe_set_gigspeed(SYSCTL_HANDLER_ARGS) -{ - struct adapter *adapter; - struct ixgbe_hw *hw; - int error; - - error = sysctl_handle_int(oidp, &ixgbe_force_speed, 0, req); - - if (error) - return (error); - - adapter = (struct adapter *) arg1; - hw = &adapter->hw; - if (ixgbe_force_speed) - hw->phy.autoneg_advertised = IXGBE_LINK_SPEED_1GB_FULL; - else - hw->phy.autoneg_advertised = IXGBE_LINK_SPEED_10GB_FULL; - - return error; -} - - -/* ** Set flow control using sysctl: ** Flow control values: ** 0 - off @@ -5027,3 +4991,44 @@ ixgbe_add_rx_process_limit(struct adapte SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)), OID_AUTO, name, CTLTYPE_INT|CTLFLAG_RW, limit, value, description); } + +/* +** Control link advertise speed: +** 0 - normal +** 1 - advertise only 1G +*/ +static int +ixgbe_set_advertise(SYSCTL_HANDLER_ARGS) +{ + int error; + struct adapter *adapter; + struct ixgbe_hw *hw; + ixgbe_link_speed speed, last; + + adapter = (struct adapter *) arg1; + hw = &adapter->hw; + last = hw->phy.autoneg_advertised; + + error = sysctl_handle_int(oidp, &adapter->advertise, 0, req); + + if ((error) || (adapter->advertise == -1)) + return (error); + + if (!((hw->phy.media_type == ixgbe_media_type_copper) || + (hw->phy.multispeed_fiber))) + return (error); + + if (adapter->advertise == 1) + speed = IXGBE_LINK_SPEED_1GB_FULL; + else + speed = IXGBE_LINK_SPEED_1GB_FULL | + IXGBE_LINK_SPEED_10GB_FULL; + + if (speed == last) /* no change */ + return (error); + + hw->mac.autotry_restart = TRUE; + hw->mac.ops.setup_link(hw, speed, TRUE, TRUE); + + return (error); +} From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 01:40:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FD78106566B; Wed, 30 Jun 2010 01:40:26 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E0E18FC08; Wed, 30 Jun 2010 01:40: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 o5U1eQGj097568; Wed, 30 Jun 2010 01:40:26 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5U1eQVG097566; Wed, 30 Jun 2010 01:40:26 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201006300140.o5U1eQVG097566@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 30 Jun 2010 01:40: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: r209604 - head/lib/libc/gmon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2010 01:40:26 -0000 Author: marcel Date: Wed Jun 30 01:40:25 2010 New Revision: 209604 URL: http://svn.freebsd.org/changeset/base/209604 Log: On powerpc, calculate s_scale using the non-FP version previously specific to hp300. Since FreeBSD does not support hp300, hp300 has been removed from the condition altogether. The FP version broke profiling on powerpc due to invalid results. Casting to double instead of float resolved the issue, but with Book-E not having a FP unit, the non-FP version looked preferrable. Note that even on AIM hardware the FP version yielded an invalid value for s_scale, so the problem is most likely with the compiler or with the expression itself. Modified: head/lib/libc/gmon/gmon.c Modified: head/lib/libc/gmon/gmon.c ============================================================================== --- head/lib/libc/gmon/gmon.c Wed Jun 30 01:10:08 2010 (r209603) +++ head/lib/libc/gmon/gmon.c Wed Jun 30 01:40:25 2010 (r209604) @@ -111,7 +111,7 @@ monstartup(lowpc, highpc) o = p->highpc - p->lowpc; if (p->kcountsize < o) { -#ifndef hp300 +#if !defined(__powerpc__) s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1; #else /* avoid floating point */ int quot = o / p->kcountsize; From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 04:52:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF42510656C3; Wed, 30 Jun 2010 04:52:42 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEFE78FC12; Wed, 30 Jun 2010 04:52:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5U4qgKm040016; Wed, 30 Jun 2010 04:52:42 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5U4qgrw040014; Wed, 30 Jun 2010 04:52:42 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201006300452.o5U4qgrw040014@svn.freebsd.org> From: Alan Cox Date: Wed, 30 Jun 2010 04:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209605 - 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, 30 Jun 2010 04:52:42 -0000 Author: alc Date: Wed Jun 30 04:52:42 2010 New Revision: 209605 URL: http://svn.freebsd.org/changeset/base/209605 Log: Improve bufdone_finish()'s handling of the bogus page. Specifically, if one or more mappings to the bogus page must be replaced, call pmap_qenter() just once. Previously, pmap_qenter() was called for each mapping to the bogus page. MFC after: 3 weeks Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Jun 30 01:40:25 2010 (r209604) +++ head/sys/kern/vfs_bio.c Wed Jun 30 04:52:42 2010 (r209605) @@ -3336,7 +3336,7 @@ bufdone_finish(struct buf *bp) vm_ooffset_t foff; vm_page_t m; vm_object_t obj; - int iosize; + int bogus, iosize; struct vnode *vp = bp->b_vp; obj = bp->b_bufobj->bo_object; @@ -3374,6 +3374,7 @@ bufdone_finish(struct buf *bp) !(bp->b_ioflags & BIO_ERROR)) { bp->b_flags |= B_CACHE; } + bogus = 0; for (i = 0; i < bp->b_npages; i++) { int bogusflag = 0; int resid; @@ -3387,13 +3388,11 @@ bufdone_finish(struct buf *bp) */ m = bp->b_pages[i]; if (m == bogus_page) { - bogusflag = 1; + bogus = bogusflag = 1; m = vm_page_lookup(obj, OFF_TO_IDX(foff)); if (m == NULL) panic("biodone: page disappeared!"); bp->b_pages[i] = m; - pmap_qenter(trunc_page((vm_offset_t)bp->b_data), - bp->b_pages, bp->b_npages); } #if defined(VFS_BIO_DEBUG) if (OFF_TO_IDX(foff) != m->pindex) { @@ -3447,6 +3446,9 @@ bufdone_finish(struct buf *bp) } vm_object_pip_wakeupn(obj, 0); VM_OBJECT_UNLOCK(obj); + if (bogus) + pmap_qenter(trunc_page((vm_offset_t)bp->b_data), + bp->b_pages, bp->b_npages); } /* From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 07:43:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65AA91065670; Wed, 30 Jun 2010 07:43:49 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 558708FC13; Wed, 30 Jun 2010 07:43:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5U7hngA078226; Wed, 30 Jun 2010 07:43:49 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5U7hnUF078224; Wed, 30 Jun 2010 07:43:49 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201006300743.o5U7hnUF078224@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 30 Jun 2010 07:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209606 - stable/7/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 07:43:49 -0000 Author: obrien Date: Wed Jun 30 07:43:49 2010 New Revision: 209606 URL: http://svn.freebsd.org/changeset/base/209606 Log: Cleanup svn merge conflict markers. Modified: stable/7/lib/libpmc/pmc.tsc.3 Modified: stable/7/lib/libpmc/pmc.tsc.3 ============================================================================== --- stable/7/lib/libpmc/pmc.tsc.3 Wed Jun 30 04:52:42 2010 (r209605) +++ stable/7/lib/libpmc/pmc.tsc.3 Wed Jun 30 07:43:49 2010 (r209606) @@ -59,13 +59,10 @@ The alias maps to the TSC. .Sh SEE ALSO .Xr pmc 3 , -<<<<<<< current:lib/libpmc/pmc.tsc.3 .Xr pmc.atom 3 , .Xr pmc.core 3 , .Xr pmc.core2 3 , .Xr pmc.iaf 3 , -======= ->>>>>>> patched:lib/libpmc/pmc.tsc.3 .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 09:40:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41A6C106566B; Wed, 30 Jun 2010 09:40:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id BDFF88FC1C; Wed, 30 Jun 2010 09:40:27 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o5U9eMhA005698 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Jun 2010 19:40:24 +1000 Date: Wed, 30 Jun 2010 19:40:22 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Marcel Moolenaar In-Reply-To: <201006300140.o5U1eQVG097566@svn.freebsd.org> Message-ID: <20100630184517.B51465@delplex.bde.org> References: <201006300140.o5U1eQVG097566@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209604 - head/lib/libc/gmon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2010 09:40:28 -0000 On Wed, 30 Jun 2010, Marcel Moolenaar wrote: > Log: > On powerpc, calculate s_scale using the non-FP version previously > specific to hp300. Since FreeBSD does not support hp300, hp300 has > been removed from the condition altogether. Also, the style of the condition has been regressed from ifndef to if !defined(). > The FP version broke profiling on powerpc due to invalid results. > Casting to double instead of float resolved the issue, but with > Book-E not having a FP unit, the non-FP version looked preferrable. > Note that even on AIM hardware the FP version yielded an invalid > value for s_scale, so the problem is most likely with the compiler > or with the expression itself. Better use the integer code unconditionally if it works. There are minor advantages to never using FP in a program (it saves switching FP state in signal handlers on some arches, where the switch can involve up to 7 or 9 memory accesses to several hundred bytes of state each), but using FP in monstartup() causes every profiled program to use FP for most of its life. This is despite gprof using FP extensivly, so that FP needs to work for profiling to work. > Modified: head/lib/libc/gmon/gmon.c > ============================================================================== > --- head/lib/libc/gmon/gmon.c Wed Jun 30 01:10:08 2010 (r209603) > +++ head/lib/libc/gmon/gmon.c Wed Jun 30 01:40:25 2010 (r209604) > @@ -111,7 +111,7 @@ monstartup(lowpc, highpc) > > o = p->highpc - p->lowpc; > if (p->kcountsize < o) { > -#ifndef hp300 > +#if !defined(__powerpc__) The style regression. > s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1; I can't see any bugs in this expression. p->kcountsize is < o, and the scale factor is only 65536, so there should be no problems with overflow. Using float instead of double is a almost pointless since the expression will be evaluated in double precision on most machines. powerpc claims that FLT_EVAL_METHOD is 1, so powerpc is one of these machines, so changing from float to double should have an especially small effect on it. So the bug is apparently in powerpc's conversion from u_long to float, or in promotion to double. I guess it is in conversion from u_long to float. > #else /* avoid floating point */ > int quot = o / p->kcountsize; > Better still, rewrite the integer method using a C99 type, so that it is as simple as the FP method: s_scale = ((uintmax_t)p->kcountsize << SCALE_SHIFT) / o; C99 uintmax_t now guarantees uintmax_t to have >= 64 bits, and practical considerations guarantee p->kcountsize to fit in many fewer than 48 bits even on 64-bit arches, so the shift cannot overflow. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 11:17:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ECE0106564A; Wed, 30 Jun 2010 11:17:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 548058FC19; Wed, 30 Jun 2010 11:17:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5UBHubk030345; Wed, 30 Jun 2010 11:17:56 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5UBHuQS030344; Wed, 30 Jun 2010 11:17:56 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201006301117.o5UBHuQS030344@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 30 Jun 2010 11:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209607 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 11:17:56 -0000 Author: glebius Date: Wed Jun 30 11:17:55 2010 New Revision: 209607 URL: http://svn.freebsd.org/changeset/base/209607 Log: Fix build. Modified: head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Wed Jun 30 07:43:49 2010 (r209606) +++ head/sys/dev/ixgbe/ixgbe.h Wed Jun 30 11:17:55 2010 (r209607) @@ -381,6 +381,7 @@ struct adapter { u32 link_speed; bool link_up; u32 linkvec; + int advertise; /* Mbuf cluster size */ u32 rx_mbuf_sz; From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 11:47:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E2D9106579F; Wed, 30 Jun 2010 11:47:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AEBB8FC20; Wed, 30 Jun 2010 11:47:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5UBl4Z0036719; Wed, 30 Jun 2010 11:47:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5UBl3Pn036712; Wed, 30 Jun 2010 11:47:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201006301147.o5UBl3Pn036712@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 30 Jun 2010 11:47: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: r209608 - in stable/8/sys: amd64/amd64 amd64/ia32 amd64/include i386/i386 i386/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 11:47:04 -0000 Author: kib Date: Wed Jun 30 11:47:03 2010 New Revision: 209608 URL: http://svn.freebsd.org/changeset/base/209608 Log: MFC r209483: Clear DF bit in eflags/rflags on the kernel entry. Modified: stable/8/sys/amd64/amd64/exception.S stable/8/sys/amd64/ia32/ia32_exception.S stable/8/sys/amd64/include/asmacros.h stable/8/sys/i386/i386/apic_vector.s stable/8/sys/i386/i386/exception.s stable/8/sys/i386/isa/atpic_vector.s Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Wed Jun 30 11:17:55 2010 (r209607) +++ stable/8/sys/amd64/amd64/exception.S Wed Jun 30 11:47:03 2010 (r209608) @@ -191,6 +191,7 @@ alltraps_pushregs_no_rdi: movq %r14,TF_R14(%rsp) movq %r15,TF_R15(%rsp) movl $TF_HASSEGS,TF_FLAGS(%rsp) + cld FAKE_MCOUNT(TF_RIP(%rsp)) #ifdef KDTRACE_HOOKS /* @@ -270,6 +271,7 @@ IDTVEC(dblfault) movw %es,TF_ES(%rsp) movw %ds,TF_DS(%rsp) movl $TF_HASSEGS,TF_FLAGS(%rsp) + cld testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ jz 1f /* already running with kernel GS.base */ swapgs @@ -369,6 +371,7 @@ IDTVEC(fast_syscall) movq %r14,TF_R14(%rsp) /* C preserved */ movq %r15,TF_R15(%rsp) /* C preserved */ movl $TF_HASSEGS,TF_FLAGS(%rsp) + cld FAKE_MCOUNT(TF_RIP(%rsp)) movq %rsp,%rdi call syscall @@ -434,6 +437,7 @@ IDTVEC(nmi) movw %es,TF_ES(%rsp) movw %ds,TF_DS(%rsp) movl $TF_HASSEGS,TF_FLAGS(%rsp) + cld xorl %ebx,%ebx testb $SEL_RPL_MASK,TF_CS(%rsp) jnz nmi_fromuserspace Modified: stable/8/sys/amd64/ia32/ia32_exception.S ============================================================================== --- stable/8/sys/amd64/ia32/ia32_exception.S Wed Jun 30 11:17:55 2010 (r209607) +++ stable/8/sys/amd64/ia32/ia32_exception.S Wed Jun 30 11:47:03 2010 (r209608) @@ -67,6 +67,7 @@ IDTVEC(int0x80_syscall) movq %r14,TF_R14(%rsp) movq %r15,TF_R15(%rsp) movl $TF_HASSEGS,TF_FLAGS(%rsp) + cld FAKE_MCOUNT(TF_RIP(%rsp)) movq %rsp, %rdi call ia32_syscall Modified: stable/8/sys/amd64/include/asmacros.h ============================================================================== --- stable/8/sys/amd64/include/asmacros.h Wed Jun 30 11:17:55 2010 (r209607) +++ stable/8/sys/amd64/include/asmacros.h Wed Jun 30 11:47:03 2010 (r209608) @@ -166,7 +166,8 @@ movw %gs,TF_GS(%rsp) ; \ movw %es,TF_ES(%rsp) ; \ movw %ds,TF_DS(%rsp) ; \ - movl $TF_HASSEGS,TF_FLAGS(%rsp) + movl $TF_HASSEGS,TF_FLAGS(%rsp) ; \ + cld #define POP_FRAME \ movq TF_RDI(%rsp),%rdi ; \ Modified: stable/8/sys/i386/i386/apic_vector.s ============================================================================== --- stable/8/sys/i386/i386/apic_vector.s Wed Jun 30 11:17:55 2010 (r209607) +++ stable/8/sys/i386/i386/apic_vector.s Wed Jun 30 11:47:03 2010 (r209608) @@ -56,6 +56,7 @@ IDTVEC(vec_name) ; \ PUSH_FRAME ; \ SET_KERNEL_SREGS ; \ + cld ; \ FAKE_MCOUNT(TF_EIP(%esp)) ; \ movl lapic, %edx ; /* pointer to local APIC */ \ movl LA_ISR + 16 * (index)(%edx), %eax ; /* load ISR */ \ @@ -103,6 +104,7 @@ IDTVEC(spuriousint) IDTVEC(timerint) PUSH_FRAME SET_KERNEL_SREGS + cld FAKE_MCOUNT(TF_EIP(%esp)) pushl %esp call lapic_handle_timer @@ -118,6 +120,7 @@ IDTVEC(timerint) IDTVEC(errorint) PUSH_FRAME SET_KERNEL_SREGS + cld FAKE_MCOUNT(TF_EIP(%esp)) call lapic_handle_error MEXITCOUNT @@ -289,6 +292,7 @@ IDTVEC(invlcache) IDTVEC(ipi_intr_bitmap_handler) PUSH_FRAME SET_KERNEL_SREGS + cld movl lapic, %edx movl $0, LA_EOI(%edx) /* End Of Interrupt to APIC */ @@ -307,6 +311,7 @@ IDTVEC(ipi_intr_bitmap_handler) IDTVEC(cpustop) PUSH_FRAME SET_KERNEL_SREGS + cld movl lapic, %eax movl $0, LA_EOI(%eax) /* End Of Interrupt to APIC */ @@ -326,6 +331,7 @@ IDTVEC(cpustop) IDTVEC(rendezvous) PUSH_FRAME SET_KERNEL_SREGS + cld #ifdef COUNT_IPIS movl PCPU(CPUID), %eax @@ -347,6 +353,7 @@ IDTVEC(rendezvous) IDTVEC(lazypmap) PUSH_FRAME SET_KERNEL_SREGS + cld call pmap_lazyfix_action Modified: stable/8/sys/i386/i386/exception.s ============================================================================== --- stable/8/sys/i386/i386/exception.s Wed Jun 30 11:17:55 2010 (r209607) +++ stable/8/sys/i386/i386/exception.s Wed Jun 30 11:47:03 2010 (r209608) @@ -159,6 +159,7 @@ alltraps: pushl %fs alltraps_with_regs_pushed: SET_KERNEL_SREGS + cld FAKE_MCOUNT(TF_EIP(%esp)) calltrap: pushl %esp @@ -233,6 +234,7 @@ IDTVEC(lcall_syscall) pushl %es pushl %fs SET_KERNEL_SREGS + cld FAKE_MCOUNT(TF_EIP(%esp)) pushl %esp call syscall @@ -256,6 +258,7 @@ IDTVEC(int0x80_syscall) pushl %es pushl %fs SET_KERNEL_SREGS + cld FAKE_MCOUNT(TF_EIP(%esp)) pushl %esp call syscall Modified: stable/8/sys/i386/isa/atpic_vector.s ============================================================================== --- stable/8/sys/i386/isa/atpic_vector.s Wed Jun 30 11:17:55 2010 (r209607) +++ stable/8/sys/i386/isa/atpic_vector.s Wed Jun 30 11:47:03 2010 (r209608) @@ -49,6 +49,7 @@ IDTVEC(vec_name) ; \ PUSH_FRAME ; \ SET_KERNEL_SREGS ; \ + cld ; \ ; \ FAKE_MCOUNT(TF_EIP(%esp)) ; \ pushl %esp ; \ From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 13:43:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8CCE1065678; Wed, 30 Jun 2010 13:43:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 799508FC16; Wed, 30 Jun 2010 13:43:44 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 259BA46B2D; Wed, 30 Jun 2010 09:43:44 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 65C738A04E; Wed, 30 Jun 2010 09:43:43 -0400 (EDT) From: John Baldwin To: Ed Schouten Date: Wed, 30 Jun 2010 09:34:47 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201006292044.o5TKiJd7031766@svn.freebsd.org> <20100629210522.GY2179@hoeg.nl> In-Reply-To: <20100629210522.GY2179@hoeg.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201006300934.47629.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 30 Jun 2010 09:43:43 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209595 - 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, 30 Jun 2010 13:43:44 -0000 On Tuesday 29 June 2010 5:05:22 pm Ed Schouten wrote: > * John Baldwin wrote: > > Log: > > Send SIGPIPE to the thread that issued the offending system call > > rather than to the entire process. > > Should something similar be used inside the TTY layer, where > reads/writes may cause signals to be generated? Hmm, I'm not sure. I do think you want to stop the entire process for SIGTTOU or SIGTTIN (often the entire process group it seems), so I'm not sure if it matters if the signal is sent to only the current thread versus sending it to any thread in the process. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 16:28:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC887106566B; Wed, 30 Jun 2010 16:28:28 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC8E78FC13; Wed, 30 Jun 2010 16:28:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5UGSSLW098956; Wed, 30 Jun 2010 16:28:28 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5UGSS3B098954; Wed, 30 Jun 2010 16:28:28 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201006301628.o5UGSS3B098954@svn.freebsd.org> From: Jack F Vogel Date: Wed, 30 Jun 2010 16:28: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: r209609 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 16:28:28 -0000 Author: jfv Date: Wed Jun 30 16:28:28 2010 New Revision: 209609 URL: http://svn.freebsd.org/changeset/base/209609 Log: Left out header change in last delta - new member in adapter so that advertise changes can be done to one port without the other changing. Modified: head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Wed Jun 30 11:47:03 2010 (r209608) +++ head/sys/dev/ixgbe/ixgbe.h Wed Jun 30 16:28:28 2010 (r209609) @@ -376,6 +376,7 @@ struct adapter { /* Info about the board itself */ u32 optics; + int advertise; /* link speeds */ bool link_active; u16 max_frame_size; u32 link_speed; From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 17:20:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B2C5106566B; Wed, 30 Jun 2010 17:20:33 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B3588FC16; Wed, 30 Jun 2010 17:20: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 o5UHKXRN010508; Wed, 30 Jun 2010 17:20:33 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5UHKXlm010506; Wed, 30 Jun 2010 17:20:33 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201006301720.o5UHKXlm010506@svn.freebsd.org> From: Alan Cox Date: Wed, 30 Jun 2010 17:20: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: r209610 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 17:20:33 -0000 Author: alc Date: Wed Jun 30 17:20:33 2010 New Revision: 209610 URL: http://svn.freebsd.org/changeset/base/209610 Log: Simplify entry to vm_pageout_clean(). Expect the page to be locked. Previously, the caller unlocked the page, and vm_pageout_clean() immediately reacquired the page lock. Also, assert rather than test that the page is neither busy nor held. Since vm_pageout_clean() is called with the object and page locked, the page can't have changed state since the caller verified that the page is neither busy nor held. Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Wed Jun 30 16:28:28 2010 (r209609) +++ head/sys/vm/vm_pageout.c Wed Jun 30 17:20:33 2010 (r209610) @@ -325,8 +325,7 @@ vm_pageout_clean(vm_page_t m) int ib, is, page_base; vm_pindex_t pindex = m->pindex; - vm_page_lock_assert(m, MA_NOTOWNED); - vm_page_lock(m); + vm_page_lock_assert(m, MA_OWNED); VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); /* @@ -341,11 +340,9 @@ vm_pageout_clean(vm_page_t m) /* * Can't clean the page if it's busy or held. */ - if ((m->hold_count != 0) || - ((m->busy != 0) || (m->oflags & VPO_BUSY))) { - vm_page_unlock(m); - return 0; - } + KASSERT(m->busy == 0 && (m->oflags & VPO_BUSY) == 0, + ("vm_pageout_clean: page %p is busy", m)); + KASSERT(m->hold_count == 0, ("vm_pageout_clean: page %p is held", m)); mc[vm_pageout_page_count] = pb = ps = m; pageout_count = 1; @@ -1060,7 +1057,6 @@ rescan0: goto unlock_and_continue; } } - vm_page_unlock(m); /* * If a page is dirty, then it is either being washed From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 17:26:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87CC3106564A; Wed, 30 Jun 2010 17:26:47 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 765F28FC08; Wed, 30 Jun 2010 17:26: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 o5UHQlvY011938; Wed, 30 Jun 2010 17:26:47 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5UHQl7n011935; Wed, 30 Jun 2010 17:26:47 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201006301726.o5UHQl7n011935@svn.freebsd.org> From: Jack F Vogel Date: Wed, 30 Jun 2010 17:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209611 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 17:26:47 -0000 Author: jfv Date: Wed Jun 30 17:26:47 2010 New Revision: 209611 URL: http://svn.freebsd.org/changeset/base/209611 Log: SR-IOV support added to igb What this provides is support for the 'virtual function' interface that a FreeBSD VM may be assigned from a host like KVM on Linux, or newer versions of Xen with such support. When the guest is set up with the capability, a special limited function 82576 PCI device is present in its virtual PCI space, so with this driver installed in the guest that device will be detected and function nearly like the bare metal, as it were. The interface is only allowed a single queue in this configuration however initial performance tests have looked very good. Enjoy!! Modified: head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_igb.h Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Jun 30 17:20:33 2010 (r209610) +++ head/sys/dev/e1000/if_igb.c Wed Jun 30 17:26:47 2010 (r209611) @@ -99,7 +99,7 @@ int igb_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char igb_driver_version[] = "version - 1.9.6"; +char igb_driver_version[] = "version - 2.0.1"; /********************************************************************* @@ -128,6 +128,7 @@ static igb_vendor_info_t igb_vendor_info PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, E1000_DEV_ID_82576_QUAD_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, + { 0x8086, E1000_DEV_ID_82576_VF, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, E1000_DEV_ID_82580_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, E1000_DEV_ID_82580_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, E1000_DEV_ID_82580_SERDES, PCI_ANY_ID, PCI_ANY_ID, 0}, @@ -226,7 +227,11 @@ static void igb_dma_free(struct adapter static int igb_sysctl_nvm_info(SYSCTL_HANDLER_ARGS); static void igb_print_nvm_info(struct adapter *); static int igb_is_valid_ether_addr(u8 *); -static void igb_add_hw_stats(struct adapter *adapter); +static void igb_add_hw_stats(struct adapter *); + +static void igb_vf_init_stats(struct adapter *); +static void igb_update_vf_stats_counters(struct adapter *); + /* Management and WOL Support */ static void igb_init_manageability(struct adapter *); static void igb_release_manageability(struct adapter *); @@ -494,6 +499,17 @@ igb_attach(device_t dev) goto err_pci; } + /* Allocate the appropriate stats memory */ + if (adapter->hw.mac.type == e1000_vfadapt) { + adapter->stats = + (struct e1000_vf_stats *)malloc(sizeof \ + (struct e1000_vf_stats), M_DEVBUF, M_NOWAIT | M_ZERO); + igb_vf_init_stats(adapter); + } else + adapter->stats = + (struct e1000_hw_stats *)malloc(sizeof \ + (struct e1000_hw_stats), M_DEVBUF, M_NOWAIT | M_ZERO); + /* ** Start from a known state, this is ** important in reading the nvm and @@ -1788,30 +1804,39 @@ static void igb_set_promisc(struct adapter *adapter) { struct ifnet *ifp = adapter->ifp; - uint32_t reg_rctl; + struct e1000_hw *hw = &adapter->hw; + u32 reg; - reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL); + if (hw->mac.type == e1000_vfadapt) { + e1000_promisc_set_vf(hw, e1000_promisc_enabled); + return; + } + reg = E1000_READ_REG(hw, E1000_RCTL); if (ifp->if_flags & IFF_PROMISC) { - reg_rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE); - E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); + reg |= (E1000_RCTL_UPE | E1000_RCTL_MPE); + E1000_WRITE_REG(hw, E1000_RCTL, reg); } else if (ifp->if_flags & IFF_ALLMULTI) { - reg_rctl |= E1000_RCTL_MPE; - reg_rctl &= ~E1000_RCTL_UPE; - E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); + reg |= E1000_RCTL_MPE; + reg &= ~E1000_RCTL_UPE; + E1000_WRITE_REG(hw, E1000_RCTL, reg); } } static void igb_disable_promisc(struct adapter *adapter) { - uint32_t reg_rctl; - - reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL); + struct e1000_hw *hw = &adapter->hw; + u32 reg; - reg_rctl &= (~E1000_RCTL_UPE); - reg_rctl &= (~E1000_RCTL_MPE); - E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); + if (hw->mac.type == e1000_vfadapt) { + e1000_promisc_set_vf(hw, e1000_promisc_disabled); + return; + } + reg = E1000_READ_REG(hw, E1000_RCTL); + reg &= (~E1000_RCTL_UPE); + reg &= (~E1000_RCTL_MPE); + E1000_WRITE_REG(hw, E1000_RCTL, reg); } @@ -1939,8 +1964,12 @@ igb_update_link_status(struct adapter *a e1000_check_for_link(hw); link_check = adapter->hw.mac.serdes_has_link; break; - default: + /* VF device is type_unknown */ case e1000_media_type_unknown: + e1000_check_for_link(hw); + link_check = !hw->mac.get_link_status; + /* Fall thru */ + default: break; } @@ -2025,8 +2054,8 @@ igb_identify_hardware(struct adapter *ad adapter->hw.bus.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); if (!((adapter->hw.bus.pci_cmd_word & PCIM_CMD_BUSMASTEREN) && (adapter->hw.bus.pci_cmd_word & PCIM_CMD_MEMEN))) { - device_printf(dev, "Memory Access and/or Bus Master bits " - "were not set!\n"); + INIT_DEBUGOUT("Memory Access and/or Bus Master " + "bits were not set!\n"); adapter->hw.bus.pci_cmd_word |= (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN); pci_write_config(dev, PCIR_COMMAND, @@ -2041,12 +2070,6 @@ igb_identify_hardware(struct adapter *ad pci_read_config(dev, PCIR_SUBVEND_0, 2); adapter->hw.subsystem_device_id = pci_read_config(dev, PCIR_SUBDEV_0, 2); - - /* Do Shared Code Init and Setup */ - if (e1000_set_mac_type(&adapter->hw)) { - device_printf(dev, "Setup init failure\n"); - return; - } } static int @@ -2225,6 +2248,7 @@ igb_configure_queues(struct adapter *ada /* Turn on MSIX */ switch (adapter->hw.mac.type) { case e1000_82580: + case e1000_vfadapt: /* RX entries */ for (int i = 0; i < adapter->num_queues; i++) { u32 index = i >> 1; @@ -2446,6 +2470,10 @@ igb_setup_msix(struct adapter *adapter) if ((adapter->hw.mac.type == e1000_82575) && (queues > 4)) queues = 4; + /* Limit the VF adapter to one queues */ + if ((adapter->hw.mac.type == e1000_vfadapt) && (queues > 2)) + queues = 1; + /* ** One vector (RX/TX pair) per queue ** plus an additional for Link interrupt @@ -2503,6 +2531,7 @@ igb_reset(struct adapter *adapter) pba = E1000_PBA_32K; break; case e1000_82576: + case e1000_vfadapt: pba = E1000_PBA_64K; break; case e1000_82580: @@ -3074,7 +3103,8 @@ igb_initialize_transmit_units(struct ada struct e1000_hw *hw = &adapter->hw; u32 tctl, txdctl; - INIT_DEBUGOUT("igb_initialize_transmit_units: begin"); + INIT_DEBUGOUT("igb_initialize_transmit_units: begin"); + tctl = txdctl = 0; /* Setup the Tx Descriptor Rings */ for (int i = 0; i < adapter->num_queues; i++, txr++) { @@ -3097,7 +3127,6 @@ igb_initialize_transmit_units(struct ada txr->watchdog_check = FALSE; - txdctl = E1000_READ_REG(hw, E1000_TXDCTL(i)); txdctl |= IGB_TX_PTHRESH; txdctl |= IGB_TX_HTHRESH << 8; txdctl |= IGB_TX_WTHRESH << 16; @@ -3105,6 +3134,9 @@ igb_initialize_transmit_units(struct ada E1000_WRITE_REG(hw, E1000_TXDCTL(i), txdctl); } + if (adapter->hw.mac.type == e1000_vfadapt) + return; + /* Program the Transmit Control Register */ tctl = E1000_READ_REG(hw, E1000_TCTL); tctl &= ~E1000_TCTL_CT; @@ -3505,7 +3537,7 @@ igb_txeof(struct tx_ring *txr) /* All clean, turn off the watchdog */ if (txr->tx_avail == adapter->num_tx_desc) { txr->watchdog_check = FALSE; - return FALSE; + return (FALSE); } } @@ -4504,23 +4536,32 @@ igb_setup_vlan_hw_support(struct adapter ** we need to repopulate it now. */ for (int i = 0; i < IGB_VFTA_SIZE; i++) - if (igb_shadow_vfta[i] != 0) - E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, - i, igb_shadow_vfta[i]); - - reg = E1000_READ_REG(hw, E1000_CTRL); - reg |= E1000_CTRL_VME; - E1000_WRITE_REG(hw, E1000_CTRL, reg); - - /* Enable the Filter Table */ - reg = E1000_READ_REG(hw, E1000_RCTL); - reg &= ~E1000_RCTL_CFIEN; - reg |= E1000_RCTL_VFE; - E1000_WRITE_REG(hw, E1000_RCTL, reg); + if (igb_shadow_vfta[i] != 0) { + if (hw->mac.type == e1000_vfadapt) + e1000_vfta_set_vf(hw, igb_shadow_vfta[i], TRUE); + else + E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, + i, igb_shadow_vfta[i]); + } - /* Update the frame size */ - E1000_WRITE_REG(&adapter->hw, E1000_RLPML, - adapter->max_frame_size + VLAN_TAG_SIZE); + if (hw->mac.type == e1000_vfadapt) + e1000_rlpml_set_vf(hw, + adapter->max_frame_size + VLAN_TAG_SIZE); + else { + reg = E1000_READ_REG(hw, E1000_CTRL); + reg |= E1000_CTRL_VME; + E1000_WRITE_REG(hw, E1000_CTRL, reg); + + /* Enable the Filter Table */ + reg = E1000_READ_REG(hw, E1000_RCTL); + reg &= ~E1000_RCTL_CFIEN; + reg |= E1000_RCTL_VFE; + E1000_WRITE_REG(hw, E1000_RCTL, reg); + + /* Update the frame size */ + E1000_WRITE_REG(&adapter->hw, E1000_RLPML, + adapter->max_frame_size + VLAN_TAG_SIZE); + } } static void @@ -4610,6 +4651,9 @@ igb_get_hw_control(struct adapter *adapt { u32 ctrl_ext; + if (adapter->hw.mac.type == e1000_vfadapt) + return; + /* Let firmware know the driver has taken over */ ctrl_ext = E1000_READ_REG(&adapter->hw, E1000_CTRL_EXT); E1000_WRITE_REG(&adapter->hw, E1000_CTRL_EXT, @@ -4627,6 +4671,9 @@ igb_release_hw_control(struct adapter *a { u32 ctrl_ext; + if (adapter->hw.mac.type == e1000_vfadapt) + return; + /* Let firmware taken over control of h/w */ ctrl_ext = E1000_READ_REG(&adapter->hw, E1000_CTRL_EXT); E1000_WRITE_REG(&adapter->hw, E1000_CTRL_EXT, @@ -4694,138 +4741,190 @@ igb_led_func(void *arg, int onoff) static void igb_update_stats_counters(struct adapter *adapter) { - struct ifnet *ifp; + struct ifnet *ifp; + struct e1000_hw *hw = &adapter->hw; + struct e1000_hw_stats *stats; - if (adapter->hw.phy.media_type == e1000_media_type_copper || - (E1000_READ_REG(&adapter->hw, E1000_STATUS) & E1000_STATUS_LU)) { - adapter->stats.symerrs += - E1000_READ_REG(&adapter->hw, E1000_SYMERRS); - adapter->stats.sec += - E1000_READ_REG(&adapter->hw, E1000_SEC); - } - adapter->stats.crcerrs += E1000_READ_REG(&adapter->hw, E1000_CRCERRS); - adapter->stats.mpc += E1000_READ_REG(&adapter->hw, E1000_MPC); - adapter->stats.scc += E1000_READ_REG(&adapter->hw, E1000_SCC); - adapter->stats.ecol += E1000_READ_REG(&adapter->hw, E1000_ECOL); - - adapter->stats.mcc += E1000_READ_REG(&adapter->hw, E1000_MCC); - adapter->stats.latecol += E1000_READ_REG(&adapter->hw, E1000_LATECOL); - adapter->stats.colc += E1000_READ_REG(&adapter->hw, E1000_COLC); - adapter->stats.dc += E1000_READ_REG(&adapter->hw, E1000_DC); - adapter->stats.rlec += E1000_READ_REG(&adapter->hw, E1000_RLEC); - adapter->stats.xonrxc += E1000_READ_REG(&adapter->hw, E1000_XONRXC); - adapter->stats.xontxc += E1000_READ_REG(&adapter->hw, E1000_XONTXC); - adapter->stats.xoffrxc += E1000_READ_REG(&adapter->hw, E1000_XOFFRXC); - adapter->stats.xofftxc += E1000_READ_REG(&adapter->hw, E1000_XOFFTXC); - adapter->stats.fcruc += E1000_READ_REG(&adapter->hw, E1000_FCRUC); - adapter->stats.prc64 += E1000_READ_REG(&adapter->hw, E1000_PRC64); - adapter->stats.prc127 += E1000_READ_REG(&adapter->hw, E1000_PRC127); - adapter->stats.prc255 += E1000_READ_REG(&adapter->hw, E1000_PRC255); - adapter->stats.prc511 += E1000_READ_REG(&adapter->hw, E1000_PRC511); - adapter->stats.prc1023 += E1000_READ_REG(&adapter->hw, E1000_PRC1023); - adapter->stats.prc1522 += E1000_READ_REG(&adapter->hw, E1000_PRC1522); - adapter->stats.gprc += E1000_READ_REG(&adapter->hw, E1000_GPRC); - adapter->stats.bprc += E1000_READ_REG(&adapter->hw, E1000_BPRC); - adapter->stats.mprc += E1000_READ_REG(&adapter->hw, E1000_MPRC); - adapter->stats.gptc += E1000_READ_REG(&adapter->hw, E1000_GPTC); + /* + ** The virtual function adapter has only a + ** small controlled set of stats, do only + ** those and return. + */ + if (adapter->hw.mac.type == e1000_vfadapt) { + igb_update_vf_stats_counters(adapter); + return; + } + + stats = (struct e1000_hw_stats *)adapter->stats; + + if(adapter->hw.phy.media_type == e1000_media_type_copper || + (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)) { + stats->symerrs += + E1000_READ_REG(hw,E1000_SYMERRS); + stats->sec += E1000_READ_REG(hw, E1000_SEC); + } + + stats->crcerrs += E1000_READ_REG(hw, E1000_CRCERRS); + stats->mpc += E1000_READ_REG(hw, E1000_MPC); + stats->scc += E1000_READ_REG(hw, E1000_SCC); + stats->ecol += E1000_READ_REG(hw, E1000_ECOL); + + stats->mcc += E1000_READ_REG(hw, E1000_MCC); + stats->latecol += E1000_READ_REG(hw, E1000_LATECOL); + stats->colc += E1000_READ_REG(hw, E1000_COLC); + stats->dc += E1000_READ_REG(hw, E1000_DC); + stats->rlec += E1000_READ_REG(hw, E1000_RLEC); + stats->xonrxc += E1000_READ_REG(hw, E1000_XONRXC); + stats->xontxc += E1000_READ_REG(hw, E1000_XONTXC); + stats->xoffrxc += E1000_READ_REG(hw, E1000_XOFFRXC); + stats->xofftxc += E1000_READ_REG(hw, E1000_XOFFTXC); + stats->fcruc += E1000_READ_REG(hw, E1000_FCRUC); + stats->prc64 += E1000_READ_REG(hw, E1000_PRC64); + stats->prc127 += E1000_READ_REG(hw, E1000_PRC127); + stats->prc255 += E1000_READ_REG(hw, E1000_PRC255); + stats->prc511 += E1000_READ_REG(hw, E1000_PRC511); + stats->prc1023 += E1000_READ_REG(hw, E1000_PRC1023); + stats->prc1522 += E1000_READ_REG(hw, E1000_PRC1522); + stats->gprc += E1000_READ_REG(hw, E1000_GPRC); + stats->bprc += E1000_READ_REG(hw, E1000_BPRC); + stats->mprc += E1000_READ_REG(hw, E1000_MPRC); + stats->gptc += E1000_READ_REG(hw, E1000_GPTC); /* For the 64-bit byte counters the low dword must be read first. */ /* Both registers clear on the read of the high dword */ - adapter->stats.gorc += E1000_READ_REG(&adapter->hw, E1000_GORCL) + - ((u64)E1000_READ_REG(&adapter->hw, E1000_GORCH) << 32); - adapter->stats.gotc += E1000_READ_REG(&adapter->hw, E1000_GOTCL) + - ((u64)E1000_READ_REG(&adapter->hw, E1000_GOTCH) << 32) ; - - adapter->stats.rnbc += E1000_READ_REG(&adapter->hw, E1000_RNBC); - adapter->stats.ruc += E1000_READ_REG(&adapter->hw, E1000_RUC); - adapter->stats.rfc += E1000_READ_REG(&adapter->hw, E1000_RFC); - adapter->stats.roc += E1000_READ_REG(&adapter->hw, E1000_ROC); - adapter->stats.rjc += E1000_READ_REG(&adapter->hw, E1000_RJC); - - adapter->stats.tor += E1000_READ_REG(&adapter->hw, E1000_TORH); - adapter->stats.tot += E1000_READ_REG(&adapter->hw, E1000_TOTH); - - adapter->stats.tpr += E1000_READ_REG(&adapter->hw, E1000_TPR); - adapter->stats.tpt += E1000_READ_REG(&adapter->hw, E1000_TPT); - adapter->stats.ptc64 += E1000_READ_REG(&adapter->hw, E1000_PTC64); - adapter->stats.ptc127 += E1000_READ_REG(&adapter->hw, E1000_PTC127); - adapter->stats.ptc255 += E1000_READ_REG(&adapter->hw, E1000_PTC255); - adapter->stats.ptc511 += E1000_READ_REG(&adapter->hw, E1000_PTC511); - adapter->stats.ptc1023 += E1000_READ_REG(&adapter->hw, E1000_PTC1023); - adapter->stats.ptc1522 += E1000_READ_REG(&adapter->hw, E1000_PTC1522); - adapter->stats.mptc += E1000_READ_REG(&adapter->hw, E1000_MPTC); - adapter->stats.bptc += E1000_READ_REG(&adapter->hw, E1000_BPTC); + stats->gorc += E1000_READ_REG(hw, E1000_GORCL) + + ((u64)E1000_READ_REG(hw, E1000_GORCH) << 32); + stats->gotc += E1000_READ_REG(hw, E1000_GOTCL) + + ((u64)E1000_READ_REG(hw, E1000_GOTCH) << 32) ; + + stats->rnbc += E1000_READ_REG(hw, E1000_RNBC); + stats->ruc += E1000_READ_REG(hw, E1000_RUC); + stats->rfc += E1000_READ_REG(hw, E1000_RFC); + stats->roc += E1000_READ_REG(hw, E1000_ROC); + stats->rjc += E1000_READ_REG(hw, E1000_RJC); + + stats->tor += E1000_READ_REG(hw, E1000_TORH); + stats->tot += E1000_READ_REG(hw, E1000_TOTH); + + stats->tpr += E1000_READ_REG(hw, E1000_TPR); + stats->tpt += E1000_READ_REG(hw, E1000_TPT); + stats->ptc64 += E1000_READ_REG(hw, E1000_PTC64); + stats->ptc127 += E1000_READ_REG(hw, E1000_PTC127); + stats->ptc255 += E1000_READ_REG(hw, E1000_PTC255); + stats->ptc511 += E1000_READ_REG(hw, E1000_PTC511); + stats->ptc1023 += E1000_READ_REG(hw, E1000_PTC1023); + stats->ptc1522 += E1000_READ_REG(hw, E1000_PTC1522); + stats->mptc += E1000_READ_REG(hw, E1000_MPTC); + stats->bptc += E1000_READ_REG(hw, E1000_BPTC); /* Interrupt Counts */ - adapter->stats.iac += E1000_READ_REG(&adapter->hw, E1000_IAC); - adapter->stats.icrxptc += E1000_READ_REG(&adapter->hw, E1000_ICRXPTC); - adapter->stats.icrxatc += E1000_READ_REG(&adapter->hw, E1000_ICRXATC); - adapter->stats.ictxptc += E1000_READ_REG(&adapter->hw, E1000_ICTXPTC); - adapter->stats.ictxatc += E1000_READ_REG(&adapter->hw, E1000_ICTXATC); - adapter->stats.ictxqec += E1000_READ_REG(&adapter->hw, E1000_ICTXQEC); - adapter->stats.ictxqmtc += E1000_READ_REG(&adapter->hw, E1000_ICTXQMTC); - adapter->stats.icrxdmtc += E1000_READ_REG(&adapter->hw, E1000_ICRXDMTC); - adapter->stats.icrxoc += E1000_READ_REG(&adapter->hw, E1000_ICRXOC); + stats->iac += E1000_READ_REG(hw, E1000_IAC); + stats->icrxptc += E1000_READ_REG(hw, E1000_ICRXPTC); + stats->icrxatc += E1000_READ_REG(hw, E1000_ICRXATC); + stats->ictxptc += E1000_READ_REG(hw, E1000_ICTXPTC); + stats->ictxatc += E1000_READ_REG(hw, E1000_ICTXATC); + stats->ictxqec += E1000_READ_REG(hw, E1000_ICTXQEC); + stats->ictxqmtc += E1000_READ_REG(hw, E1000_ICTXQMTC); + stats->icrxdmtc += E1000_READ_REG(hw, E1000_ICRXDMTC); + stats->icrxoc += E1000_READ_REG(hw, E1000_ICRXOC); /* Host to Card Statistics */ - adapter->stats.cbtmpc += E1000_READ_REG(&adapter->hw, E1000_CBTMPC); - adapter->stats.htdpmc += E1000_READ_REG(&adapter->hw, E1000_HTDPMC); - adapter->stats.cbrdpc += E1000_READ_REG(&adapter->hw, E1000_CBRDPC); - adapter->stats.cbrmpc += E1000_READ_REG(&adapter->hw, E1000_CBRMPC); - adapter->stats.rpthc += E1000_READ_REG(&adapter->hw, E1000_RPTHC); - adapter->stats.hgptc += E1000_READ_REG(&adapter->hw, E1000_HGPTC); - adapter->stats.htcbdpc += E1000_READ_REG(&adapter->hw, E1000_HTCBDPC); - adapter->stats.hgorc += (E1000_READ_REG(&adapter->hw, E1000_HGORCL) + - ((u64)E1000_READ_REG(&adapter->hw, - E1000_HGORCH) << 32)); - - adapter->stats.hgotc += (E1000_READ_REG(&adapter->hw, E1000_HGOTCL) + - ((u64)E1000_READ_REG(&adapter->hw, - E1000_HGOTCH) << 32)); - adapter->stats.lenerrs += E1000_READ_REG(&adapter->hw, E1000_LENERRS); - adapter->stats.scvpc += E1000_READ_REG(&adapter->hw, E1000_SCVPC); - adapter->stats.hrmpc += E1000_READ_REG(&adapter->hw, E1000_HRMPC); - - adapter->stats.algnerrc += - E1000_READ_REG(&adapter->hw, E1000_ALGNERRC); - adapter->stats.rxerrc += - E1000_READ_REG(&adapter->hw, E1000_RXERRC); - adapter->stats.tncrs += - E1000_READ_REG(&adapter->hw, E1000_TNCRS); - adapter->stats.cexterr += - E1000_READ_REG(&adapter->hw, E1000_CEXTERR); - adapter->stats.tsctc += - E1000_READ_REG(&adapter->hw, E1000_TSCTC); - adapter->stats.tsctfc += - E1000_READ_REG(&adapter->hw, E1000_TSCTFC); + stats->cbtmpc += E1000_READ_REG(hw, E1000_CBTMPC); + stats->htdpmc += E1000_READ_REG(hw, E1000_HTDPMC); + stats->cbrdpc += E1000_READ_REG(hw, E1000_CBRDPC); + stats->cbrmpc += E1000_READ_REG(hw, E1000_CBRMPC); + stats->rpthc += E1000_READ_REG(hw, E1000_RPTHC); + stats->hgptc += E1000_READ_REG(hw, E1000_HGPTC); + stats->htcbdpc += E1000_READ_REG(hw, E1000_HTCBDPC); + stats->hgorc += (E1000_READ_REG(hw, E1000_HGORCL) + + ((u64)E1000_READ_REG(hw, E1000_HGORCH) << 32)); + stats->hgotc += (E1000_READ_REG(hw, E1000_HGOTCL) + + ((u64)E1000_READ_REG(hw, E1000_HGOTCH) << 32)); + stats->lenerrs += E1000_READ_REG(hw, E1000_LENERRS); + stats->scvpc += E1000_READ_REG(hw, E1000_SCVPC); + stats->hrmpc += E1000_READ_REG(hw, E1000_HRMPC); + + stats->algnerrc += E1000_READ_REG(hw, E1000_ALGNERRC); + stats->rxerrc += E1000_READ_REG(hw, E1000_RXERRC); + stats->tncrs += E1000_READ_REG(hw, E1000_TNCRS); + stats->cexterr += E1000_READ_REG(hw, E1000_CEXTERR); + stats->tsctc += E1000_READ_REG(hw, E1000_TSCTC); + stats->tsctfc += E1000_READ_REG(hw, E1000_TSCTFC); ifp = adapter->ifp; - ifp->if_collisions = adapter->stats.colc; + ifp = adapter->ifp; + ifp->if_collisions = stats->colc; /* Rx Errors */ - ifp->if_ierrors = adapter->dropped_pkts + adapter->stats.rxerrc + - adapter->stats.crcerrs + adapter->stats.algnerrc + - adapter->stats.ruc + adapter->stats.roc + - adapter->stats.mpc + adapter->stats.cexterr; + ifp->if_ierrors = adapter->dropped_pkts + stats->rxerrc + + stats->crcerrs + stats->algnerrc + + stats->ruc + stats->roc + stats->mpc + stats->cexterr; /* Tx Errors */ - ifp->if_oerrors = adapter->stats.ecol + - adapter->stats.latecol + adapter->watchdog_events; + ifp->if_oerrors = stats->ecol + + stats->latecol + adapter->watchdog_events; /* Driver specific counters */ - adapter->device_control = E1000_READ_REG(&adapter->hw, E1000_CTRL); - adapter->rx_control = E1000_READ_REG(&adapter->hw, E1000_RCTL); - adapter->int_mask = E1000_READ_REG(&adapter->hw, E1000_IMS); - adapter->eint_mask = E1000_READ_REG(&adapter->hw, E1000_EIMS); - adapter->packet_buf_alloc_tx = ((E1000_READ_REG(&adapter->hw, E1000_PBA) - & 0xffff0000) >> 16); + adapter->device_control = E1000_READ_REG(hw, E1000_CTRL); + adapter->rx_control = E1000_READ_REG(hw, E1000_RCTL); + adapter->int_mask = E1000_READ_REG(hw, E1000_IMS); + adapter->eint_mask = E1000_READ_REG(hw, E1000_EIMS); + adapter->packet_buf_alloc_tx = + ((E1000_READ_REG(hw, E1000_PBA) & 0xffff0000) >> 16); + adapter->packet_buf_alloc_rx = + ((E1000_READ_REG(hw, E1000_PBA) & 0xffff); +} - adapter->packet_buf_alloc_rx = (E1000_READ_REG(&adapter->hw, E1000_PBA) - & 0xffff); +/********************************************************************** + * + * Initialize the VF board statistics counters. + * + **********************************************************************/ +static void +igb_vf_init_stats(struct adapter *adapter) +{ + struct e1000_hw *hw = &adapter->hw; + struct e1000_vf_stats *stats; + + stats = (struct e1000_vf_stats *)adapter->stats; + + stats->last_gprc = E1000_READ_REG(hw, E1000_VFGPRC); + stats->last_gorc = E1000_READ_REG(hw, E1000_VFGORC); + stats->last_gptc = E1000_READ_REG(hw, E1000_VFGPTC); + stats->last_gotc = E1000_READ_REG(hw, E1000_VFGOTC); + stats->last_mprc = E1000_READ_REG(hw, E1000_VFMPRC); +} + +/********************************************************************** + * + * Update the VF board statistics counters. + * + **********************************************************************/ +static void +igb_update_vf_stats_counters(struct adapter *adapter) +{ + struct e1000_hw *hw = &adapter->hw; + struct e1000_vf_stats *stats; + + if (adapter->link_speed == 0) + return; + + stats = (struct e1000_vf_stats *)adapter->stats; + + UPDATE_VF_REG(E1000_VFGPRC, + stats->last_gprc, stats->gprc); + UPDATE_VF_REG(E1000_VFGORC, + stats->last_gorc, stats->gorc); + UPDATE_VF_REG(E1000_VFGPTC, + stats->last_gptc, stats->gptc); + UPDATE_VF_REG(E1000_VFGOTC, + stats->last_gotc, stats->gotc); + UPDATE_VF_REG(E1000_VFMPRC, + stats->last_mprc, stats->mprc); } @@ -4895,10 +4994,14 @@ igb_add_hw_stats(struct adapter *adapter queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "txd_head", - CTLFLAG_RD, &txr->tdh, 0, + CTLFLAG_RD, + E1000_READ_REG(&adapter->hw, + E1000_TDH(txr->me)), 0, "Transmit Descriptor Head"); SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "txd_tail", - CTLFLAG_RD, &txr->tdt, 0, + CTLFLAG_RD, + E1000_READ_REG(&adapter->hw, + E1000_TDT(txr->me))), 0, "Transmit Descriptor Tail"); SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "no_desc_avail", CTLFLAG_RD, &txr->no_desc_avail, @@ -4947,6 +5050,29 @@ igb_add_hw_stats(struct adapter *adapter CTLFLAG_RD, NULL, "MAC Statistics"); stat_list = SYSCTL_CHILDREN(stat_node); + /* + ** VF adapter has a very limited set of stats + ** since its not managing the metal, so to speak. + */ + if (adapter->hw.mac.type == e1000_vfadapt) { + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", + CTLFLAG_RD, &adapter->stats.gprc, + "Good Packets Received"); + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", + CTLFLAG_RD, &adapter->stats.gptc, + "Good Packets Transmitted"); + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", + CTLFLAG_RD, &adapter->stats.gorc, + "Good Octets Received"); + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octest_txd", + CTLFLAG_RD, &adapter->stats.gotc, + "Good Octest Transmitted"); + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", + CTLFLAG_RD, &adapter->stats.mprc, + "Multicast Packets Received"); + return; + } + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "excess_coll", CTLFLAG_RD, &stats->ecol, "Excessive collisions"); @@ -4989,12 +5115,6 @@ igb_add_hw_stats(struct adapter *adapter SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_jabber", CTLFLAG_RD, &adapter->stats.rjc, "Recevied Jabber"); - - /* RLEC is inaccurate on some hardware, calculate our own. */ -/* SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_len_errs", */ -/* CTLFLAG_RD, adapter->stats.roc + adapter->stats.ruc, */ -/* "Receive Length Errors"); */ - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_errs", CTLFLAG_RD, &adapter->stats.rxerrc, "Receive Errors"); @@ -5200,9 +5320,9 @@ igb_add_hw_stats(struct adapter *adapter SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "header_redir_missed", CTLFLAG_RD, &adapter->stats.hrmpc, "Header Redirection Missed Packet Count"); +} -} /********************************************************************** * * This routine provides a way to dump out the adapter eeprom, Modified: head/sys/dev/e1000/if_igb.h ============================================================================== --- head/sys/dev/e1000/if_igb.h Wed Jun 30 17:20:33 2010 (r209610) +++ head/sys/dev/e1000/if_igb.h Wed Jun 30 17:26:47 2010 (r209611) @@ -180,7 +180,8 @@ #define IGB_TX_PTHRESH 8 #define IGB_TX_HTHRESH 1 -#define IGB_TX_WTHRESH ((hw->mac.type == e1000_82576 && \ +#define IGB_TX_WTHRESH (((hw->mac.type == e1000_82576 || \ + hw->mac.type == e1000_vfadapt) && \ adapter->msix_mem) ? 1 : 16) #define MAX_NUM_MULTICAST_ADDRESSES 128 @@ -317,9 +318,6 @@ struct tx_ring { int watchdog_time; u64 no_desc_avail; u64 tx_packets; - /* Statistics for reporting, ONLY. */ - u32 tdh; /* Transmit Descriptor Head */ - u32 tdt; /* Transmit Descriptor Tail */ }; /* @@ -356,9 +354,6 @@ struct rx_ring { u64 rx_discarded; u64 rx_packets; u64 rx_bytes; - /* Statistics for reporting, ONLY. */ - u32 rdh; /* Transmit Descriptor Head */ - u32 rdt; /* Transmit Descriptor Tail */ }; struct adapter { @@ -449,7 +444,7 @@ struct adapter { struct hwtstamp_ctrl hwtstamp; #endif - struct e1000_hw_stats stats; + void *stats; }; /* ****************************************************************************** @@ -497,7 +492,17 @@ struct igb_rx_buf { #define IGB_RX_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->rx_mtx) #define IGB_RX_LOCK(_sc) mtx_lock(&(_sc)->rx_mtx) #define IGB_RX_UNLOCK(_sc) mtx_unlock(&(_sc)->rx_mtx) -#define IGB_TX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->tx_mtx, MA_OWNED) +#define IGB_RX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_mtx, MA_OWNED) + +#define UPDATE_VF_REG(reg, last, cur) \ +{ \ + u32 new = E1000_READ_REG(hw, reg); \ + if (new < last) \ + cur += 0x100000000LL; \ + last = new; \ + cur &= 0xFFFFFFFF00000000LL; \ + cur |= new; \ +} #endif /* _IGB_H_DEFINED_ */ From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 18:00:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 513C4106564A; Wed, 30 Jun 2010 18:00:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 410AB8FC15; Wed, 30 Jun 2010 18:00: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 o5UI0k8B019390; Wed, 30 Jun 2010 18:00:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5UI0k98019388; Wed, 30 Jun 2010 18:00:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201006301800.o5UI0k98019388@svn.freebsd.org> From: John Baldwin Date: Wed, 30 Jun 2010 18:00: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: r209612 - 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, 30 Jun 2010 18:00:46 -0000 Author: jhb Date: Wed Jun 30 18:00:45 2010 New Revision: 209612 URL: http://svn.freebsd.org/changeset/base/209612 Log: Update comment for tdsignal() -> tdsendsignal() rename. Forgot to include this in 209592. Modified: head/sys/kern/subr_sleepqueue.c Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Wed Jun 30 17:26:47 2010 (r209611) +++ head/sys/kern/subr_sleepqueue.c Wed Jun 30 18:00:45 2010 (r209612) @@ -442,7 +442,7 @@ sleepq_catch_signals(void *wchan, int pr /* * Lock the per-process spinlock prior to dropping the PROC_LOCK * to avoid a signal delivery race. PROC_LOCK, PROC_SLOCK, and - * thread_lock() are currently held in tdsignal(). + * thread_lock() are currently held in tdsendsignal(). */ PROC_SLOCK(p); mtx_lock_spin(&sc->sc_lock); From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 18:03:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 970771065672; Wed, 30 Jun 2010 18:03:42 +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 839888FC13; Wed, 30 Jun 2010 18:03: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 o5UI3gc6020086; Wed, 30 Jun 2010 18:03:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5UI3gIA020070; Wed, 30 Jun 2010 18:03:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201006301803.o5UI3gIA020070@svn.freebsd.org> From: John Baldwin Date: Wed, 30 Jun 2010 18:03: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: r209613 - in head/sys: amd64/amd64 amd64/ia32 arm/arm i386/i386 ia64/ia64 kern mips/mips pc98/pc98 powerpc/aim powerpc/booke sparc64/sparc64 sun4v/sun4v 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, 30 Jun 2010 18:03:42 -0000 Author: jhb Date: Wed Jun 30 18:03:42 2010 New Revision: 209613 URL: http://svn.freebsd.org/changeset/base/209613 Log: Move prototypes for kern_sigtimedwait() and kern_sigprocmask() to where all other kern_ prototypes live. Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/ia32/ia32_signal.c head/sys/arm/arm/machdep.c head/sys/i386/i386/machdep.c head/sys/ia64/ia64/machdep.c head/sys/kern/kern_context.c head/sys/kern/subr_trap.c head/sys/mips/mips/pm_machdep.c head/sys/pc98/pc98/machdep.c head/sys/powerpc/aim/machdep.c head/sys/powerpc/booke/machdep.c head/sys/sparc64/sparc64/machdep.c head/sys/sun4v/sun4v/machdep.c head/sys/sys/signalvar.h head/sys/sys/syscallsubr.h Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/amd64/amd64/machdep.c Wed Jun 30 18:03:42 2010 (r209613) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/amd64/ia32/ia32_signal.c ============================================================================== --- head/sys/amd64/ia32/ia32_signal.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/amd64/ia32/ia32_signal.c Wed Jun 30 18:03:42 2010 (r209613) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/arm/arm/machdep.c Wed Jun 30 18:03:42 2010 (r209613) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/i386/i386/machdep.c Wed Jun 30 18:03:42 2010 (r209613) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/ia64/ia64/machdep.c ============================================================================== --- head/sys/ia64/ia64/machdep.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/ia64/ia64/machdep.c Wed Jun 30 18:03:42 2010 (r209613) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/kern/kern_context.c ============================================================================== --- head/sys/kern/kern_context.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/kern/kern_context.c Wed Jun 30 18:03:42 2010 (r209613) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/kern/subr_trap.c Wed Jun 30 18:03:42 2010 (r209613) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/mips/mips/pm_machdep.c Wed Jun 30 18:03:42 2010 (r209613) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/pc98/pc98/machdep.c Wed Jun 30 18:03:42 2010 (r209613) @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/powerpc/aim/machdep.c Wed Jun 30 18:03:42 2010 (r209613) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/powerpc/booke/machdep.c Wed Jun 30 18:03:42 2010 (r209613) @@ -104,6 +104,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/sparc64/sparc64/machdep.c Wed Jun 30 18:03:42 2010 (r209613) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/sun4v/sun4v/machdep.c ============================================================================== --- head/sys/sun4v/sun4v/machdep.c Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/sun4v/sun4v/machdep.c Wed Jun 30 18:03:42 2010 (r209613) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/sys/signalvar.h Wed Jun 30 18:03:42 2010 (r209613) @@ -357,10 +357,7 @@ void tdksignal(struct thread *td, int si void tdsigcleanup(struct thread *td); void tdsignal(struct thread *td, int sig); void trapsignal(struct thread *td, ksiginfo_t *); -int kern_sigtimedwait(struct thread *, sigset_t, - ksiginfo_t *, struct timespec *); -int kern_sigprocmask(struct thread *td, int how, - sigset_t *set, sigset_t *oset, int flags); + /* * Machine-dependent functions: */ Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Wed Jun 30 18:00:45 2010 (r209612) +++ head/sys/sys/syscallsubr.h Wed Jun 30 18:03:42 2010 (r209613) @@ -48,6 +48,7 @@ struct sockaddr; struct stat; struct kevent; struct kevent_copyops; +struct ksiginfo; struct sendfile_args; struct thr_param; @@ -192,7 +193,11 @@ int kern_shmctl(struct thread *td, int s int kern_sigaction(struct thread *td, int sig, struct sigaction *act, struct sigaction *oact, int flags); int kern_sigaltstack(struct thread *td, stack_t *ss, stack_t *oss); +int kern_sigprocmask(struct thread *td, int how, + sigset_t *set, sigset_t *oset, int flags); int kern_sigsuspend(struct thread *td, sigset_t mask); +int kern_sigtimedwait(struct thread *td, sigset_t waitset, + struct ksiginfo *ksi, struct timespec *timeout); int kern_stat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp); int kern_statat(struct thread *td, int flag, int fd, char *path, From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 18:15:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD1F7106564A; Wed, 30 Jun 2010 18:15:25 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout027.mac.com (asmtpout027.mac.com [17.148.16.102]) by mx1.freebsd.org (Postfix) with ESMTP id BDC1E8FC0C; Wed, 30 Jun 2010 18:15:25 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp027.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0L4U00KHGAPNJH80@asmtp027.mac.com>; Wed, 30 Jun 2010 11:15:24 -0700 (PDT) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1004200000 definitions=main-1006300101 X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.8161:2.4.5,1.2.40,4.0.166 definitions=2010-06-29_03:2010-02-06, 2010-06-29, 2010-06-30 signatures=0 From: Marcel Moolenaar In-reply-to: <20100630184517.B51465@delplex.bde.org> Date: Wed, 30 Jun 2010 11:15:23 -0700 Message-id: <79DD181D-3885-45F5-9E9D-753553D19891@mac.com> References: <201006300140.o5U1eQVG097566@svn.freebsd.org> <20100630184517.B51465@delplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1081) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org Subject: Re: svn commit: r209604 - head/lib/libc/gmon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2010 18:15:26 -0000 On Jun 30, 2010, at 2:40 AM, Bruce Evans wrote: > On Wed, 30 Jun 2010, Marcel Moolenaar wrote: > >> Log: >> On powerpc, calculate s_scale using the non-FP version previously >> specific to hp300. Since FreeBSD does not support hp300, hp300 has >> been removed from the condition altogether. > > Also, the style of the condition has been regressed from ifndef to > if !defined(). That's on purpose. Either we eliminate the whole conditional or we end up adding other platforms to it. >> The FP version broke profiling on powerpc due to invalid results. >> Casting to double instead of float resolved the issue, but with >> Book-E not having a FP unit, the non-FP version looked preferrable. >> Note that even on AIM hardware the FP version yielded an invalid >> value for s_scale, so the problem is most likely with the compiler >> or with the expression itself. > > Better use the integer code unconditionally if it works. I tested it on amd64 and it works. My initial thought was to remove the conditional entirely and always use the non-FP version, but I changed my mind and instead went with a targeted change only. The feedback would then guide me to the right implementation. I believe that the non-FP works on all platforms. At least ARM also has a problem with the FP version. > There are > minor advantages to never using FP in a program (it saves switching > FP state in signal handlers on some arches, where the switch can involve > up to 7 or 9 memory accesses to several hundred bytes of state each), > but using FP in monstartup() causes every profiled program to use FP > for most of its life. This is despite gprof using FP extensivly, so > that FP needs to work for profiling to work. *nod* >> Modified: head/lib/libc/gmon/gmon.c >> ============================================================================== >> --- head/lib/libc/gmon/gmon.c Wed Jun 30 01:10:08 2010 (r209603) >> +++ head/lib/libc/gmon/gmon.c Wed Jun 30 01:40:25 2010 (r209604) >> @@ -111,7 +111,7 @@ monstartup(lowpc, highpc) >> >> o = p->highpc - p->lowpc; >> if (p->kcountsize < o) { >> -#ifndef hp300 >> +#if !defined(__powerpc__) > > The style regression. > >> s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1; > > I can't see any bugs in this expression. p->kcountsize is < o, and the > scale factor is only 65536, so there should be no problems with overflow. This leaves GCC a the problem. > Using float instead of double is a almost pointless since the expression > will be evaluated in double precision on most machines. powerpc claims > that FLT_EVAL_METHOD is 1, so powerpc is one of these machines, so > changing from float to double should have an especially small effect > on it. The effect is enormous actually. Casting to float yields the wrong result. Casting to double yields the right result. This is on both FP-capable PowerPC CPUs as well has non-FP PowerPC CPUs. > So the bug is apparently in powerpc's conversion from u_long > to float, or in promotion to double. I guess it is in conversion from > u_long to float. Possible. Then again, I see the same histogram problems on ARM that I saw on PowerPC, so this doesn't look like a PowerPC-specific bug. > Better still, rewrite the integer method using a C99 type, so that it > is as simple as the FP method: > > s_scale = ((uintmax_t)p->kcountsize << SCALE_SHIFT) / o; > > C99 uintmax_t now guarantees uintmax_t to have >= 64 bits, and practical > considerations guarantee p->kcountsize to fit in many fewer than 48 bits > even on 64-bit arches, so the shift cannot overflow. I like this. What about the following (white-space corrupted) simplification: Index: gmon.c =================================================================== --- gmon.c (revision 209604) +++ gmon.c (working copy) @@ -110,24 +110,9 @@ p->tos[0].link = 0; o = p->highpc - p->lowpc; - if (p->kcountsize < o) { -#if !defined(__powerpc__) - s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1; -#else /* avoid floating point */ - int quot = o / p->kcountsize; + s_scale = (p->kcountsize < o) ? + ((uintmax_t)p->kcountsize << SCALE_1_TO_1) / o : SCALE_1_TO_1; - if (quot >= 0x10000) - s_scale = 1; - else if (quot >= 0x100) - s_scale = 0x10000 / quot; - else if (o >= 0x800000) - s_scale = 0x1000000 / (o / (p->kcountsize >> 8)); - else - s_scale = 0x1000000 / ((o << 8) / p->kcountsize); -#endif - } else - s_scale = SCALE_1_TO_1; - moncontrol(1); } -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 18:34:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 953F1106566B; Wed, 30 Jun 2010 18:34:46 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B8038FC13; Wed, 30 Jun 2010 18:34: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 o5UIYks3026914; Wed, 30 Jun 2010 18:34:46 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5UIYk2l026903; Wed, 30 Jun 2010 18:34:46 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201006301834.o5UIYk2l026903@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 30 Jun 2010 18:34: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: r209614 - head/sbin/bsdlabel X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2010 18:34:46 -0000 Author: jh Date: Wed Jun 30 18:34:45 2010 New Revision: 209614 URL: http://svn.freebsd.org/changeset/base/209614 Log: - Don't assign the return value from read(2) to a variable of type int. - Use errx(3) instead of err(3) to print the error message on short reads in readlabel(). errno won't be set on short reads which can easily occur here due to the fixed size read request. PR: 144307 Reviewed by: bde Modified: head/sbin/bsdlabel/bsdlabel.c Modified: head/sbin/bsdlabel/bsdlabel.c ============================================================================== --- head/sbin/bsdlabel/bsdlabel.c Wed Jun 30 18:03:42 2010 (r209613) +++ head/sbin/bsdlabel/bsdlabel.c Wed Jun 30 18:34:45 2010 (r209614) @@ -347,7 +347,7 @@ makelabel(const char *type, struct diskl static void readboot(void) { - int fd, i; + int fd; struct stat st; uint64_t *p; @@ -358,8 +358,7 @@ readboot(void) err(1, "cannot open %s", xxboot); fstat(fd, &st); if (alphacksum && st.st_size <= BBSIZE - 512) { - i = read(fd, bootarea + 512, st.st_size); - if (i != st.st_size) + if (read(fd, bootarea + 512, st.st_size) != st.st_size) err(1, "read error %s", xxboot); /* @@ -372,8 +371,7 @@ readboot(void) p[62] = 0; return; } else if ((!alphacksum) && st.st_size <= BBSIZE) { - i = read(fd, bootarea, st.st_size); - if (i != st.st_size) + if (read(fd, bootarea, st.st_size) != st.st_size) err(1, "read error %s", xxboot); return; } @@ -479,6 +477,7 @@ get_file_parms(int f) static int readlabel(int flag) { + ssize_t nbytes; uint32_t lba; int f, i; int error; @@ -498,8 +497,11 @@ readlabel(int flag) errx(1, "disks with more than 2^32-1 sectors are not supported"); (void)lseek(f, (off_t)0, SEEK_SET); - if (read(f, bootarea, BBSIZE) != BBSIZE) + nbytes = read(f, bootarea, BBSIZE); + if (nbytes == -1) err(4, "%s read", specname); + if (nbytes != BBSIZE) + errx(4, "couldn't read %d bytes from %s", BBSIZE, specname); close (f); error = bsd_disklabel_le_dec( bootarea + (labeloffset + labelsoffset * secsize), From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 19:17:53 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FB0E1065670; Wed, 30 Jun 2010 19:17:53 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 03FA98FC13; Wed, 30 Jun 2010 19:17:52 +0000 (UTC) Received: from besplex.bde.org (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o5UJHnx8001986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Jul 2010 05:17:50 +1000 Date: Thu, 1 Jul 2010 05:17:49 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Marcel Moolenaar In-Reply-To: <79DD181D-3885-45F5-9E9D-753553D19891@mac.com> Message-ID: <20100701050124.J4356@besplex.bde.org> References: <201006300140.o5U1eQVG097566@svn.freebsd.org> <20100630184517.B51465@delplex.bde.org> <79DD181D-3885-45F5-9E9D-753553D19891@mac.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Marcel Moolenaar , Bruce Evans , src-committers@FreeBSD.org Subject: Re: svn commit: r209604 - head/lib/libc/gmon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2010 19:17:53 -0000 On Wed, 30 Jun 2010, Marcel Moolenaar wrote: > On Jun 30, 2010, at 2:40 AM, Bruce Evans wrote: > >> On Wed, 30 Jun 2010, Marcel Moolenaar wrote: >> >>> Log: >>> On powerpc, calculate s_scale using the non-FP version previously >>> specific to hp300. Since FreeBSD does not support hp300, hp300 has >>> been removed from the condition altogether. >> >> Also, the style of the condition has been regressed from ifndef to >> if !defined(). > > That's on purpose. Either we eliminate the whole conditional or we > end up adding other platforms to it. Better to inhibit such mistakes. It's almost a sign of a mistake that there is a long list of platforms in an ifdef. > ... >> Better still, rewrite the integer method using a C99 type, so that it >> is as simple as the FP method: >> >> s_scale = ((uintmax_t)p->kcountsize << SCALE_SHIFT) / o; >> >> C99 uintmax_t now guarantees uintmax_t to have >= 64 bits, and practical >> considerations guarantee p->kcountsize to fit in many fewer than 48 bits >> even on 64-bit arches, so the shift cannot overflow. > > I like this. What about the following (white-space corrupted) > simplification: Almost OK. I orginally wrote it with a conditional operator, but decided that that might be harder to understand. > Index: gmon.c > =================================================================== > --- gmon.c (revision 209604) > +++ gmon.c (working copy) > @@ -110,24 +110,9 @@ > p->tos[0].link = 0; > > o = p->highpc - p->lowpc; > - if (p->kcountsize < o) { > -#if !defined(__powerpc__) > - s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1; > -#else /* avoid floating point */ > - int quot = o / p->kcountsize; > + s_scale = (p->kcountsize < o) ? > + ((uintmax_t)p->kcountsize << SCALE_1_TO_1) / o : SCALE_1_TO_1; Shifting by 65536 is a bit much :-). Multiplication by 65536 might give the same code as shifting by 16, but I think shifting is clearer. The kernel uses shifting for the reverse conversion, with `16' hard-coded in 2 statements and 2 comments, and with too much duplication in the comments. > Remove this blank line too. > - if (quot >= 0x10000) > - s_scale = 1; > ... Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 19:34:26 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91EB9106564A; Wed, 30 Jun 2010 19:34:26 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout024.mac.com (asmtpout024.mac.com [17.148.16.99]) by mx1.freebsd.org (Postfix) with ESMTP id 7456A8FC14; Wed, 30 Jun 2010 19:34:26 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from [172.24.241.135] (natint3.juniper.net [66.129.224.36]) by asmtp024.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0L4U00904EDCEB20@asmtp024.mac.com>; Wed, 30 Jun 2010 12:34:26 -0700 (PDT) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1004200000 definitions=main-1006300112 X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.8161:2.4.5,1.2.40,4.0.166 definitions=2010-06-29_03:2010-02-06, 2010-06-29, 2010-06-30 signatures=0 From: Marcel Moolenaar In-reply-to: <20100701050124.J4356@besplex.bde.org> Date: Wed, 30 Jun 2010 12:34:24 -0700 Message-id: References: <201006300140.o5U1eQVG097566@svn.freebsd.org> <20100630184517.B51465@delplex.bde.org> <79DD181D-3885-45F5-9E9D-753553D19891@mac.com> <20100701050124.J4356@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1081) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Marcel Moolenaar , src-committers@FreeBSD.org Subject: Re: svn commit: r209604 - head/lib/libc/gmon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2010 19:34:26 -0000 On Jun 30, 2010, at 12:17 PM, Bruce Evans wrote: >> I like this. What about the following (white-space corrupted) >> simplification: > > Almost OK. I orginally wrote it with a conditional operator, but decided > that that might be harder to understand. > >> Index: gmon.c >> =================================================================== >> --- gmon.c (revision 209604) >> +++ gmon.c (working copy) >> @@ -110,24 +110,9 @@ >> p->tos[0].link = 0; >> >> o = p->highpc - p->lowpc; >> - if (p->kcountsize < o) { >> -#if !defined(__powerpc__) >> - s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1; >> -#else /* avoid floating point */ >> - int quot = o / p->kcountsize; >> + s_scale = (p->kcountsize < o) ? >> + ((uintmax_t)p->kcountsize << SCALE_1_TO_1) / o : SCALE_1_TO_1; > > Shifting by 65536 is a bit much :-). Multiplication by 65536 might > give the same code as shifting by 16, but I think shifting is clearer. Doh... :-) Ok. I'll remove SCALE_1_TO_1 and instead define SCALE_SHIFT. Substitutions in expressions as expected. Thanks, -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 20:37:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F37F1106566C; Wed, 30 Jun 2010 20:37:08 +0000 (UTC) (envelope-from fabien.thomas@netasq.com) Received: from work.netasq.com (mars.netasq.com [91.212.116.3]) by mx1.freebsd.org (Postfix) with ESMTP id B7E0E8FC08; Wed, 30 Jun 2010 20:37:07 +0000 (UTC) Received: from [192.168.0.1] (unknown [172.16.0.46]) by work.netasq.com (Postfix) with ESMTPSA id F3607740004; Wed, 30 Jun 2010 22:36:56 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Fabien Thomas In-Reply-To: <201006301726.o5UHQl7n011935@svn.freebsd.org> Date: Wed, 30 Jun 2010 22:37:05 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201006301726.o5UHQl7n011935@svn.freebsd.org> To: Jack F Vogel X-Mailer: Apple Mail (2.1081) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209611 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 20:37:09 -0000 great! have you some plan to do it on ixgbe too ? fabien On 30 juin 2010, at 19:26, Jack F Vogel wrote: > Author: jfv > Date: Wed Jun 30 17:26:47 2010 > New Revision: 209611 > URL: http://svn.freebsd.org/changeset/base/209611 >=20 > Log: > SR-IOV support added to igb >=20 > What this provides is support for the 'virtual function' > interface that a FreeBSD VM may be assigned from a host > like KVM on Linux, or newer versions of Xen with such > support. >=20 > When the guest is set up with the capability, a special > limited function 82576 PCI device is present in its virtual > PCI space, so with this driver installed in the guest that > device will be detected and function nearly like the bare > metal, as it were. >=20 > The interface is only allowed a single queue in this configuration > however initial performance tests have looked very good. >=20 > Enjoy!! >=20 > Modified: > head/sys/dev/e1000/if_igb.c > head/sys/dev/e1000/if_igb.h >=20 > Modified: head/sys/dev/e1000/if_igb.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/e1000/if_igb.c Wed Jun 30 17:20:33 2010 = (r209610) > +++ head/sys/dev/e1000/if_igb.c Wed Jun 30 17:26:47 2010 = (r209611) > @@ -99,7 +99,7 @@ int igb_display_debug_stats =3D 0; > /********************************************************************* > * Driver version: > = *********************************************************************/ > -char igb_driver_version[] =3D "version - 1.9.6"; > +char igb_driver_version[] =3D "version - 2.0.1"; >=20 >=20 > /********************************************************************* > @@ -128,6 +128,7 @@ static igb_vendor_info_t igb_vendor_info > PCI_ANY_ID, PCI_ANY_ID, = 0}, > { 0x8086, E1000_DEV_ID_82576_QUAD_COPPER, > PCI_ANY_ID, PCI_ANY_ID, = 0}, > + { 0x8086, E1000_DEV_ID_82576_VF, PCI_ANY_ID, PCI_ANY_ID, = 0}, > { 0x8086, E1000_DEV_ID_82580_COPPER, PCI_ANY_ID, PCI_ANY_ID, = 0}, > { 0x8086, E1000_DEV_ID_82580_FIBER, PCI_ANY_ID, PCI_ANY_ID, = 0}, > { 0x8086, E1000_DEV_ID_82580_SERDES, PCI_ANY_ID, PCI_ANY_ID, = 0}, > @@ -226,7 +227,11 @@ static void igb_dma_free(struct adapter=20 > static int igb_sysctl_nvm_info(SYSCTL_HANDLER_ARGS); > static void igb_print_nvm_info(struct adapter *); > static int igb_is_valid_ether_addr(u8 *); > -static void igb_add_hw_stats(struct adapter *adapter); > +static void igb_add_hw_stats(struct adapter *); > + > +static void igb_vf_init_stats(struct adapter *); > +static void igb_update_vf_stats_counters(struct adapter *); > + > /* Management and WOL Support */ > static void igb_init_manageability(struct adapter *); > static void igb_release_manageability(struct adapter *); > @@ -494,6 +499,17 @@ igb_attach(device_t dev) > goto err_pci; > } >=20 > + /* Allocate the appropriate stats memory */ > + if (adapter->hw.mac.type =3D=3D e1000_vfadapt) { > + adapter->stats =3D > + (struct e1000_vf_stats *)malloc(sizeof \ > + (struct e1000_vf_stats), M_DEVBUF, M_NOWAIT | = M_ZERO); > + igb_vf_init_stats(adapter); > + } else > + adapter->stats =3D > + (struct e1000_hw_stats *)malloc(sizeof \ > + (struct e1000_hw_stats), M_DEVBUF, M_NOWAIT | = M_ZERO); > + > /* > ** Start from a known state, this is > ** important in reading the nvm and > @@ -1788,30 +1804,39 @@ static void > igb_set_promisc(struct adapter *adapter) > { > struct ifnet *ifp =3D adapter->ifp; > - uint32_t reg_rctl; > + struct e1000_hw *hw =3D &adapter->hw; > + u32 reg; >=20 > - reg_rctl =3D E1000_READ_REG(&adapter->hw, E1000_RCTL); > + if (hw->mac.type =3D=3D e1000_vfadapt) { > + e1000_promisc_set_vf(hw, e1000_promisc_enabled); > + return; > + } >=20 > + reg =3D E1000_READ_REG(hw, E1000_RCTL); > if (ifp->if_flags & IFF_PROMISC) { > - reg_rctl |=3D (E1000_RCTL_UPE | E1000_RCTL_MPE); > - E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); > + reg |=3D (E1000_RCTL_UPE | E1000_RCTL_MPE); > + E1000_WRITE_REG(hw, E1000_RCTL, reg); > } else if (ifp->if_flags & IFF_ALLMULTI) { > - reg_rctl |=3D E1000_RCTL_MPE; > - reg_rctl &=3D ~E1000_RCTL_UPE; > - E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); > + reg |=3D E1000_RCTL_MPE; > + reg &=3D ~E1000_RCTL_UPE; > + E1000_WRITE_REG(hw, E1000_RCTL, reg); > } > } >=20 > static void > igb_disable_promisc(struct adapter *adapter) > { > - uint32_t reg_rctl; > - > - reg_rctl =3D E1000_READ_REG(&adapter->hw, E1000_RCTL); > + struct e1000_hw *hw =3D &adapter->hw; > + u32 reg; >=20 > - reg_rctl &=3D (~E1000_RCTL_UPE); > - reg_rctl &=3D (~E1000_RCTL_MPE); > - E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); > + if (hw->mac.type =3D=3D e1000_vfadapt) { > + e1000_promisc_set_vf(hw, e1000_promisc_disabled); > + return; > + } > + reg =3D E1000_READ_REG(hw, E1000_RCTL); > + reg &=3D (~E1000_RCTL_UPE); > + reg &=3D (~E1000_RCTL_MPE); > + E1000_WRITE_REG(hw, E1000_RCTL, reg); > } >=20 >=20 > @@ -1939,8 +1964,12 @@ igb_update_link_status(struct adapter *a > e1000_check_for_link(hw); > link_check =3D adapter->hw.mac.serdes_has_link; > break; > - default: > + /* VF device is type_unknown */ > case e1000_media_type_unknown: > + e1000_check_for_link(hw); > + link_check =3D !hw->mac.get_link_status; > + /* Fall thru */ > + default: > break; > } >=20 > @@ -2025,8 +2054,8 @@ igb_identify_hardware(struct adapter *ad > adapter->hw.bus.pci_cmd_word =3D pci_read_config(dev, = PCIR_COMMAND, 2); > if (!((adapter->hw.bus.pci_cmd_word & PCIM_CMD_BUSMASTEREN) && > (adapter->hw.bus.pci_cmd_word & PCIM_CMD_MEMEN))) { > - device_printf(dev, "Memory Access and/or Bus Master bits = " > - "were not set!\n"); > + INIT_DEBUGOUT("Memory Access and/or Bus Master " > + "bits were not set!\n"); > adapter->hw.bus.pci_cmd_word |=3D > (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN); > pci_write_config(dev, PCIR_COMMAND, > @@ -2041,12 +2070,6 @@ igb_identify_hardware(struct adapter *ad > pci_read_config(dev, PCIR_SUBVEND_0, 2); > adapter->hw.subsystem_device_id =3D > pci_read_config(dev, PCIR_SUBDEV_0, 2); > - > - /* Do Shared Code Init and Setup */ > - if (e1000_set_mac_type(&adapter->hw)) { > - device_printf(dev, "Setup init failure\n"); > - return; > - } > } >=20 > static int > @@ -2225,6 +2248,7 @@ igb_configure_queues(struct adapter *ada > /* Turn on MSIX */ > switch (adapter->hw.mac.type) { > case e1000_82580: > + case e1000_vfadapt: > /* RX entries */ > for (int i =3D 0; i < adapter->num_queues; i++) { > u32 index =3D i >> 1; > @@ -2446,6 +2470,10 @@ igb_setup_msix(struct adapter *adapter) > if ((adapter->hw.mac.type =3D=3D e1000_82575) && (queues > 4)) > queues =3D 4; >=20 > + /* Limit the VF adapter to one queues */ > + if ((adapter->hw.mac.type =3D=3D e1000_vfadapt) && (queues > 2)) > + queues =3D 1; > + > /* > ** One vector (RX/TX pair) per queue > ** plus an additional for Link interrupt > @@ -2503,6 +2531,7 @@ igb_reset(struct adapter *adapter) > pba =3D E1000_PBA_32K; > break; > case e1000_82576: > + case e1000_vfadapt: > pba =3D E1000_PBA_64K; > break; > case e1000_82580: > @@ -3074,7 +3103,8 @@ igb_initialize_transmit_units(struct ada > struct e1000_hw *hw =3D &adapter->hw; > u32 tctl, txdctl; >=20 > - INIT_DEBUGOUT("igb_initialize_transmit_units: begin"); > + INIT_DEBUGOUT("igb_initialize_transmit_units: begin"); > + tctl =3D txdctl =3D 0; >=20 > /* Setup the Tx Descriptor Rings */ > for (int i =3D 0; i < adapter->num_queues; i++, txr++) { > @@ -3097,7 +3127,6 @@ igb_initialize_transmit_units(struct ada >=20 > txr->watchdog_check =3D FALSE; >=20 > - txdctl =3D E1000_READ_REG(hw, E1000_TXDCTL(i)); > txdctl |=3D IGB_TX_PTHRESH; > txdctl |=3D IGB_TX_HTHRESH << 8; > txdctl |=3D IGB_TX_WTHRESH << 16; > @@ -3105,6 +3134,9 @@ igb_initialize_transmit_units(struct ada > E1000_WRITE_REG(hw, E1000_TXDCTL(i), txdctl); > } >=20 > + if (adapter->hw.mac.type =3D=3D e1000_vfadapt) > + return; > + > /* Program the Transmit Control Register */ > tctl =3D E1000_READ_REG(hw, E1000_TCTL); > tctl &=3D ~E1000_TCTL_CT; > @@ -3505,7 +3537,7 @@ igb_txeof(struct tx_ring *txr) > /* All clean, turn off the watchdog */ > if (txr->tx_avail =3D=3D adapter->num_tx_desc) { > txr->watchdog_check =3D FALSE; > - return FALSE; > + return (FALSE); > } > } >=20 > @@ -4504,23 +4536,32 @@ igb_setup_vlan_hw_support(struct adapter > ** we need to repopulate it now. > */ > for (int i =3D 0; i < IGB_VFTA_SIZE; i++) > - if (igb_shadow_vfta[i] !=3D 0) > - E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, > - i, igb_shadow_vfta[i]); > - > - reg =3D E1000_READ_REG(hw, E1000_CTRL); > - reg |=3D E1000_CTRL_VME; > - E1000_WRITE_REG(hw, E1000_CTRL, reg); > - > - /* Enable the Filter Table */ > - reg =3D E1000_READ_REG(hw, E1000_RCTL); > - reg &=3D ~E1000_RCTL_CFIEN; > - reg |=3D E1000_RCTL_VFE; > - E1000_WRITE_REG(hw, E1000_RCTL, reg); > + if (igb_shadow_vfta[i] !=3D 0) { > + if (hw->mac.type =3D=3D e1000_vfadapt) > + e1000_vfta_set_vf(hw, = igb_shadow_vfta[i], TRUE); > + else > + E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, > + i, igb_shadow_vfta[i]); > + } >=20 > - /* Update the frame size */ > - E1000_WRITE_REG(&adapter->hw, E1000_RLPML, > - adapter->max_frame_size + VLAN_TAG_SIZE); > + if (hw->mac.type =3D=3D e1000_vfadapt) > + e1000_rlpml_set_vf(hw, > + adapter->max_frame_size + VLAN_TAG_SIZE); > + else { > + reg =3D E1000_READ_REG(hw, E1000_CTRL); > + reg |=3D E1000_CTRL_VME; > + E1000_WRITE_REG(hw, E1000_CTRL, reg); > + > + /* Enable the Filter Table */ > + reg =3D E1000_READ_REG(hw, E1000_RCTL); > + reg &=3D ~E1000_RCTL_CFIEN; > + reg |=3D E1000_RCTL_VFE; > + E1000_WRITE_REG(hw, E1000_RCTL, reg); > + > + /* Update the frame size */ > + E1000_WRITE_REG(&adapter->hw, E1000_RLPML, > + adapter->max_frame_size + VLAN_TAG_SIZE); > + } > } >=20 > static void > @@ -4610,6 +4651,9 @@ igb_get_hw_control(struct adapter *adapt > { > u32 ctrl_ext; >=20 > + if (adapter->hw.mac.type =3D=3D e1000_vfadapt) > + return; > + > /* Let firmware know the driver has taken over */ > ctrl_ext =3D E1000_READ_REG(&adapter->hw, E1000_CTRL_EXT); > E1000_WRITE_REG(&adapter->hw, E1000_CTRL_EXT, > @@ -4627,6 +4671,9 @@ igb_release_hw_control(struct adapter *a > { > u32 ctrl_ext; >=20 > + if (adapter->hw.mac.type =3D=3D e1000_vfadapt) > + return; > + > /* Let firmware taken over control of h/w */ > ctrl_ext =3D E1000_READ_REG(&adapter->hw, E1000_CTRL_EXT); > E1000_WRITE_REG(&adapter->hw, E1000_CTRL_EXT, > @@ -4694,138 +4741,190 @@ igb_led_func(void *arg, int onoff) > static void > igb_update_stats_counters(struct adapter *adapter) > { > - struct ifnet *ifp; > + struct ifnet *ifp; > + struct e1000_hw *hw =3D &adapter->hw; > + struct e1000_hw_stats *stats; >=20 > - if (adapter->hw.phy.media_type =3D=3D e1000_media_type_copper || > - (E1000_READ_REG(&adapter->hw, E1000_STATUS) & = E1000_STATUS_LU)) { > - adapter->stats.symerrs +=3D > - E1000_READ_REG(&adapter->hw, E1000_SYMERRS); > - adapter->stats.sec +=3D > - E1000_READ_REG(&adapter->hw, E1000_SEC); > - } > - adapter->stats.crcerrs +=3D E1000_READ_REG(&adapter->hw, = E1000_CRCERRS); > - adapter->stats.mpc +=3D E1000_READ_REG(&adapter->hw, E1000_MPC); > - adapter->stats.scc +=3D E1000_READ_REG(&adapter->hw, E1000_SCC); > - adapter->stats.ecol +=3D E1000_READ_REG(&adapter->hw, = E1000_ECOL); > - > - adapter->stats.mcc +=3D E1000_READ_REG(&adapter->hw, E1000_MCC); > - adapter->stats.latecol +=3D E1000_READ_REG(&adapter->hw, = E1000_LATECOL); > - adapter->stats.colc +=3D E1000_READ_REG(&adapter->hw, = E1000_COLC); > - adapter->stats.dc +=3D E1000_READ_REG(&adapter->hw, E1000_DC); > - adapter->stats.rlec +=3D E1000_READ_REG(&adapter->hw, = E1000_RLEC); > - adapter->stats.xonrxc +=3D E1000_READ_REG(&adapter->hw, = E1000_XONRXC); > - adapter->stats.xontxc +=3D E1000_READ_REG(&adapter->hw, = E1000_XONTXC); > - adapter->stats.xoffrxc +=3D E1000_READ_REG(&adapter->hw, = E1000_XOFFRXC); > - adapter->stats.xofftxc +=3D E1000_READ_REG(&adapter->hw, = E1000_XOFFTXC); > - adapter->stats.fcruc +=3D E1000_READ_REG(&adapter->hw, = E1000_FCRUC); > - adapter->stats.prc64 +=3D E1000_READ_REG(&adapter->hw, = E1000_PRC64); > - adapter->stats.prc127 +=3D E1000_READ_REG(&adapter->hw, = E1000_PRC127); > - adapter->stats.prc255 +=3D E1000_READ_REG(&adapter->hw, = E1000_PRC255); > - adapter->stats.prc511 +=3D E1000_READ_REG(&adapter->hw, = E1000_PRC511); > - adapter->stats.prc1023 +=3D E1000_READ_REG(&adapter->hw, = E1000_PRC1023); > - adapter->stats.prc1522 +=3D E1000_READ_REG(&adapter->hw, = E1000_PRC1522); > - adapter->stats.gprc +=3D E1000_READ_REG(&adapter->hw, = E1000_GPRC); > - adapter->stats.bprc +=3D E1000_READ_REG(&adapter->hw, = E1000_BPRC); > - adapter->stats.mprc +=3D E1000_READ_REG(&adapter->hw, = E1000_MPRC); > - adapter->stats.gptc +=3D E1000_READ_REG(&adapter->hw, = E1000_GPTC); > + /*=20 > + ** The virtual function adapter has only a > + ** small controlled set of stats, do only=20 > + ** those and return. > + */ > + if (adapter->hw.mac.type =3D=3D e1000_vfadapt) { > + igb_update_vf_stats_counters(adapter); > + return; > + } > + > + stats =3D (struct e1000_hw_stats *)adapter->stats; > + > + if(adapter->hw.phy.media_type =3D=3D e1000_media_type_copper || > + (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)) { > + stats->symerrs +=3D > + E1000_READ_REG(hw,E1000_SYMERRS); > + stats->sec +=3D E1000_READ_REG(hw, E1000_SEC); > + } > + > + stats->crcerrs +=3D E1000_READ_REG(hw, E1000_CRCERRS); > + stats->mpc +=3D E1000_READ_REG(hw, E1000_MPC); > + stats->scc +=3D E1000_READ_REG(hw, E1000_SCC); > + stats->ecol +=3D E1000_READ_REG(hw, E1000_ECOL); > + > + stats->mcc +=3D E1000_READ_REG(hw, E1000_MCC); > + stats->latecol +=3D E1000_READ_REG(hw, E1000_LATECOL); > + stats->colc +=3D E1000_READ_REG(hw, E1000_COLC); > + stats->dc +=3D E1000_READ_REG(hw, E1000_DC); > + stats->rlec +=3D E1000_READ_REG(hw, E1000_RLEC); > + stats->xonrxc +=3D E1000_READ_REG(hw, E1000_XONRXC); > + stats->xontxc +=3D E1000_READ_REG(hw, E1000_XONTXC); > + stats->xoffrxc +=3D E1000_READ_REG(hw, E1000_XOFFRXC); > + stats->xofftxc +=3D E1000_READ_REG(hw, E1000_XOFFTXC); > + stats->fcruc +=3D E1000_READ_REG(hw, E1000_FCRUC); > + stats->prc64 +=3D E1000_READ_REG(hw, E1000_PRC64); > + stats->prc127 +=3D E1000_READ_REG(hw, E1000_PRC127); > + stats->prc255 +=3D E1000_READ_REG(hw, E1000_PRC255); > + stats->prc511 +=3D E1000_READ_REG(hw, E1000_PRC511); > + stats->prc1023 +=3D E1000_READ_REG(hw, E1000_PRC1023); > + stats->prc1522 +=3D E1000_READ_REG(hw, E1000_PRC1522); > + stats->gprc +=3D E1000_READ_REG(hw, E1000_GPRC); > + stats->bprc +=3D E1000_READ_REG(hw, E1000_BPRC); > + stats->mprc +=3D E1000_READ_REG(hw, E1000_MPRC); > + stats->gptc +=3D E1000_READ_REG(hw, E1000_GPTC); >=20 > /* For the 64-bit byte counters the low dword must be read = first. */ > /* Both registers clear on the read of the high dword */ >=20 > - adapter->stats.gorc +=3D E1000_READ_REG(&adapter->hw, = E1000_GORCL) + > - ((u64)E1000_READ_REG(&adapter->hw, E1000_GORCH) << 32); > - adapter->stats.gotc +=3D E1000_READ_REG(&adapter->hw, = E1000_GOTCL) + > - ((u64)E1000_READ_REG(&adapter->hw, E1000_GOTCH) << 32) ; > - > - adapter->stats.rnbc +=3D E1000_READ_REG(&adapter->hw, = E1000_RNBC); > - adapter->stats.ruc +=3D E1000_READ_REG(&adapter->hw, E1000_RUC); > - adapter->stats.rfc +=3D E1000_READ_REG(&adapter->hw, E1000_RFC); > - adapter->stats.roc +=3D E1000_READ_REG(&adapter->hw, E1000_ROC); > - adapter->stats.rjc +=3D E1000_READ_REG(&adapter->hw, E1000_RJC); > - > - adapter->stats.tor +=3D E1000_READ_REG(&adapter->hw, = E1000_TORH); > - adapter->stats.tot +=3D E1000_READ_REG(&adapter->hw, = E1000_TOTH); > - > - adapter->stats.tpr +=3D E1000_READ_REG(&adapter->hw, E1000_TPR); > - adapter->stats.tpt +=3D E1000_READ_REG(&adapter->hw, E1000_TPT); > - adapter->stats.ptc64 +=3D E1000_READ_REG(&adapter->hw, = E1000_PTC64); > - adapter->stats.ptc127 +=3D E1000_READ_REG(&adapter->hw, = E1000_PTC127); > - adapter->stats.ptc255 +=3D E1000_READ_REG(&adapter->hw, = E1000_PTC255); > - adapter->stats.ptc511 +=3D E1000_READ_REG(&adapter->hw, = E1000_PTC511); > - adapter->stats.ptc1023 +=3D E1000_READ_REG(&adapter->hw, = E1000_PTC1023); > - adapter->stats.ptc1522 +=3D E1000_READ_REG(&adapter->hw, = E1000_PTC1522); > - adapter->stats.mptc +=3D E1000_READ_REG(&adapter->hw, = E1000_MPTC); > - adapter->stats.bptc +=3D E1000_READ_REG(&adapter->hw, = E1000_BPTC); > + stats->gorc +=3D E1000_READ_REG(hw, E1000_GORCL) + > + ((u64)E1000_READ_REG(hw, E1000_GORCH) << 32); > + stats->gotc +=3D E1000_READ_REG(hw, E1000_GOTCL) + > + ((u64)E1000_READ_REG(hw, E1000_GOTCH) << 32) ; > + > + stats->rnbc +=3D E1000_READ_REG(hw, E1000_RNBC); > + stats->ruc +=3D E1000_READ_REG(hw, E1000_RUC); > + stats->rfc +=3D E1000_READ_REG(hw, E1000_RFC); > + stats->roc +=3D E1000_READ_REG(hw, E1000_ROC); > + stats->rjc +=3D E1000_READ_REG(hw, E1000_RJC); > + > + stats->tor +=3D E1000_READ_REG(hw, E1000_TORH); > + stats->tot +=3D E1000_READ_REG(hw, E1000_TOTH); > + > + stats->tpr +=3D E1000_READ_REG(hw, E1000_TPR); > + stats->tpt +=3D E1000_READ_REG(hw, E1000_TPT); > + stats->ptc64 +=3D E1000_READ_REG(hw, E1000_PTC64); > + stats->ptc127 +=3D E1000_READ_REG(hw, E1000_PTC127); > + stats->ptc255 +=3D E1000_READ_REG(hw, E1000_PTC255); > + stats->ptc511 +=3D E1000_READ_REG(hw, E1000_PTC511); > + stats->ptc1023 +=3D E1000_READ_REG(hw, E1000_PTC1023); > + stats->ptc1522 +=3D E1000_READ_REG(hw, E1000_PTC1522); > + stats->mptc +=3D E1000_READ_REG(hw, E1000_MPTC); > + stats->bptc +=3D E1000_READ_REG(hw, E1000_BPTC); >=20 > /* Interrupt Counts */ >=20 > - adapter->stats.iac +=3D E1000_READ_REG(&adapter->hw, E1000_IAC); > - adapter->stats.icrxptc +=3D E1000_READ_REG(&adapter->hw, = E1000_ICRXPTC); > - adapter->stats.icrxatc +=3D E1000_READ_REG(&adapter->hw, = E1000_ICRXATC); > - adapter->stats.ictxptc +=3D E1000_READ_REG(&adapter->hw, = E1000_ICTXPTC); > - adapter->stats.ictxatc +=3D E1000_READ_REG(&adapter->hw, = E1000_ICTXATC); > - adapter->stats.ictxqec +=3D E1000_READ_REG(&adapter->hw, = E1000_ICTXQEC); > - adapter->stats.ictxqmtc +=3D E1000_READ_REG(&adapter->hw, = E1000_ICTXQMTC); > - adapter->stats.icrxdmtc +=3D E1000_READ_REG(&adapter->hw, = E1000_ICRXDMTC); > - adapter->stats.icrxoc +=3D E1000_READ_REG(&adapter->hw, = E1000_ICRXOC); > + stats->iac +=3D E1000_READ_REG(hw, E1000_IAC); > + stats->icrxptc +=3D E1000_READ_REG(hw, E1000_ICRXPTC); > + stats->icrxatc +=3D E1000_READ_REG(hw, E1000_ICRXATC); > + stats->ictxptc +=3D E1000_READ_REG(hw, E1000_ICTXPTC); > + stats->ictxatc +=3D E1000_READ_REG(hw, E1000_ICTXATC); > + stats->ictxqec +=3D E1000_READ_REG(hw, E1000_ICTXQEC); > + stats->ictxqmtc +=3D E1000_READ_REG(hw, E1000_ICTXQMTC); > + stats->icrxdmtc +=3D E1000_READ_REG(hw, E1000_ICRXDMTC); > + stats->icrxoc +=3D E1000_READ_REG(hw, E1000_ICRXOC); >=20 > /* Host to Card Statistics */ >=20 > - adapter->stats.cbtmpc +=3D E1000_READ_REG(&adapter->hw, = E1000_CBTMPC); > - adapter->stats.htdpmc +=3D E1000_READ_REG(&adapter->hw, = E1000_HTDPMC); > - adapter->stats.cbrdpc +=3D E1000_READ_REG(&adapter->hw, = E1000_CBRDPC); > - adapter->stats.cbrmpc +=3D E1000_READ_REG(&adapter->hw, = E1000_CBRMPC); > - adapter->stats.rpthc +=3D E1000_READ_REG(&adapter->hw, = E1000_RPTHC); > - adapter->stats.hgptc +=3D E1000_READ_REG(&adapter->hw, = E1000_HGPTC); > - adapter->stats.htcbdpc +=3D E1000_READ_REG(&adapter->hw, = E1000_HTCBDPC); > - adapter->stats.hgorc +=3D (E1000_READ_REG(&adapter->hw, = E1000_HGORCL) + > - ((u64)E1000_READ_REG(&adapter->hw,=20 > - E1000_HGORCH) << = 32)); > - > - adapter->stats.hgotc +=3D (E1000_READ_REG(&adapter->hw, = E1000_HGOTCL) + > - ((u64)E1000_READ_REG(&adapter->hw,=20 > - E1000_HGOTCH) << = 32)); > - adapter->stats.lenerrs +=3D E1000_READ_REG(&adapter->hw, = E1000_LENERRS); > - adapter->stats.scvpc +=3D E1000_READ_REG(&adapter->hw, = E1000_SCVPC); > - adapter->stats.hrmpc +=3D E1000_READ_REG(&adapter->hw, = E1000_HRMPC); > - > - adapter->stats.algnerrc +=3D=20 > - E1000_READ_REG(&adapter->hw, E1000_ALGNERRC); > - adapter->stats.rxerrc +=3D=20 > - E1000_READ_REG(&adapter->hw, E1000_RXERRC); > - adapter->stats.tncrs +=3D=20 > - E1000_READ_REG(&adapter->hw, E1000_TNCRS); > - adapter->stats.cexterr +=3D=20 > - E1000_READ_REG(&adapter->hw, E1000_CEXTERR); > - adapter->stats.tsctc +=3D=20 > - E1000_READ_REG(&adapter->hw, E1000_TSCTC); > - adapter->stats.tsctfc +=3D=20 > - E1000_READ_REG(&adapter->hw, E1000_TSCTFC); > + stats->cbtmpc +=3D E1000_READ_REG(hw, E1000_CBTMPC); > + stats->htdpmc +=3D E1000_READ_REG(hw, E1000_HTDPMC); > + stats->cbrdpc +=3D E1000_READ_REG(hw, E1000_CBRDPC); > + stats->cbrmpc +=3D E1000_READ_REG(hw, E1000_CBRMPC); > + stats->rpthc +=3D E1000_READ_REG(hw, E1000_RPTHC); > + stats->hgptc +=3D E1000_READ_REG(hw, E1000_HGPTC); > + stats->htcbdpc +=3D E1000_READ_REG(hw, E1000_HTCBDPC); > + stats->hgorc +=3D (E1000_READ_REG(hw, E1000_HGORCL) + > + ((u64)E1000_READ_REG(hw, E1000_HGORCH) << 32)); > + stats->hgotc +=3D (E1000_READ_REG(hw, E1000_HGOTCL) + > + ((u64)E1000_READ_REG(hw, E1000_HGOTCH) << 32)); > + stats->lenerrs +=3D E1000_READ_REG(hw, E1000_LENERRS); > + stats->scvpc +=3D E1000_READ_REG(hw, E1000_SCVPC); > + stats->hrmpc +=3D E1000_READ_REG(hw, E1000_HRMPC); > + > + stats->algnerrc +=3D E1000_READ_REG(hw, E1000_ALGNERRC); > + stats->rxerrc +=3D E1000_READ_REG(hw, E1000_RXERRC); > + stats->tncrs +=3D E1000_READ_REG(hw, E1000_TNCRS); > + stats->cexterr +=3D E1000_READ_REG(hw, E1000_CEXTERR); > + stats->tsctc +=3D E1000_READ_REG(hw, E1000_TSCTC); > + stats->tsctfc +=3D E1000_READ_REG(hw, E1000_TSCTFC); > ifp =3D adapter->ifp; >=20 > - ifp->if_collisions =3D adapter->stats.colc; > + ifp =3D adapter->ifp; > + ifp->if_collisions =3D stats->colc; >=20 > /* Rx Errors */ > - ifp->if_ierrors =3D adapter->dropped_pkts + = adapter->stats.rxerrc + > - adapter->stats.crcerrs + adapter->stats.algnerrc + > - adapter->stats.ruc + adapter->stats.roc + > - adapter->stats.mpc + adapter->stats.cexterr; > + ifp->if_ierrors =3D adapter->dropped_pkts + stats->rxerrc + > + stats->crcerrs + stats->algnerrc + > + stats->ruc + stats->roc + stats->mpc + stats->cexterr; >=20 > /* Tx Errors */ > - ifp->if_oerrors =3D adapter->stats.ecol + > - adapter->stats.latecol + adapter->watchdog_events; > + ifp->if_oerrors =3D stats->ecol + > + stats->latecol + adapter->watchdog_events; >=20 > /* Driver specific counters */ > - adapter->device_control =3D E1000_READ_REG(&adapter->hw, = E1000_CTRL); > - adapter->rx_control =3D E1000_READ_REG(&adapter->hw, = E1000_RCTL); > - adapter->int_mask =3D E1000_READ_REG(&adapter->hw, E1000_IMS); > - adapter->eint_mask =3D E1000_READ_REG(&adapter->hw, E1000_EIMS); > - adapter->packet_buf_alloc_tx =3D ((E1000_READ_REG(&adapter->hw, = E1000_PBA) > - & 0xffff0000) >> 16); > + adapter->device_control =3D E1000_READ_REG(hw, E1000_CTRL); > + adapter->rx_control =3D E1000_READ_REG(hw, E1000_RCTL); > + adapter->int_mask =3D E1000_READ_REG(hw, E1000_IMS); > + adapter->eint_mask =3D E1000_READ_REG(hw, E1000_EIMS); > + adapter->packet_buf_alloc_tx =3D > + ((E1000_READ_REG(hw, E1000_PBA) & 0xffff0000) >> 16); > + adapter->packet_buf_alloc_rx =3D > + ((E1000_READ_REG(hw, E1000_PBA) & 0xffff); > +} >=20 > - adapter->packet_buf_alloc_rx =3D (E1000_READ_REG(&adapter->hw, = E1000_PBA)=20 > - & 0xffff); >=20 > = +/********************************************************************** > + * > + * Initialize the VF board statistics counters. > + * > + = **********************************************************************/ > +static void > +igb_vf_init_stats(struct adapter *adapter) > +{ > + struct e1000_hw *hw =3D &adapter->hw; > + struct e1000_vf_stats *stats; > + > + stats =3D (struct e1000_vf_stats *)adapter->stats; > + > + stats->last_gprc =3D E1000_READ_REG(hw, E1000_VFGPRC); > + stats->last_gorc =3D E1000_READ_REG(hw, E1000_VFGORC); > + stats->last_gptc =3D E1000_READ_REG(hw, E1000_VFGPTC); > + stats->last_gotc =3D E1000_READ_REG(hw, E1000_VFGOTC); > + stats->last_mprc =3D E1000_READ_REG(hw, E1000_VFMPRC); > +} > +=20 > = +/********************************************************************** > + * > + * Update the VF board statistics counters. > + * > + = **********************************************************************/ > +static void > +igb_update_vf_stats_counters(struct adapter *adapter) > +{ > + struct e1000_hw *hw =3D &adapter->hw; > + struct e1000_vf_stats *stats; > + > + if (adapter->link_speed =3D=3D 0) > + return; > + > + stats =3D (struct e1000_vf_stats *)adapter->stats; > + > + UPDATE_VF_REG(E1000_VFGPRC, > + stats->last_gprc, stats->gprc); > + UPDATE_VF_REG(E1000_VFGORC, > + stats->last_gorc, stats->gorc); > + UPDATE_VF_REG(E1000_VFGPTC, > + stats->last_gptc, stats->gptc); > + UPDATE_VF_REG(E1000_VFGOTC, > + stats->last_gotc, stats->gotc); > + UPDATE_VF_REG(E1000_VFMPRC, > + stats->last_mprc, stats->mprc); > } >=20 >=20 > @@ -4895,10 +4994,14 @@ igb_add_hw_stats(struct adapter *adapter > queue_list =3D SYSCTL_CHILDREN(queue_node); >=20 > SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "txd_head", > - CTLFLAG_RD, &txr->tdh, 0, > + CTLFLAG_RD, > + E1000_READ_REG(&adapter->hw, > + E1000_TDH(txr->me)), 0, > "Transmit Descriptor Head"); > SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "txd_tail", > - CTLFLAG_RD, &txr->tdt, 0, > + CTLFLAG_RD, > + E1000_READ_REG(&adapter->hw, > + E1000_TDT(txr->me))), 0, > "Transmit Descriptor Tail"); > SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, = "no_desc_avail",=20 > CTLFLAG_RD, &txr->no_desc_avail, > @@ -4947,6 +5050,29 @@ igb_add_hw_stats(struct adapter *adapter > CTLFLAG_RD, NULL, "MAC Statistics"); > stat_list =3D SYSCTL_CHILDREN(stat_node); >=20 > + /* > + ** VF adapter has a very limited set of stats > + ** since its not managing the metal, so to speak. > + */ > + if (adapter->hw.mac.type =3D=3D e1000_vfadapt) { > + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", > + CTLFLAG_RD, &adapter->stats.gprc, > + "Good Packets Received"); > + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", > + CTLFLAG_RD, &adapter->stats.gptc, > + "Good Packets Transmitted"); > + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd",=20= > + CTLFLAG_RD, &adapter->stats.gorc,=20 > + "Good Octets Received");=20 > + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octest_txd",=20 > + CTLFLAG_RD, &adapter->stats.gotc,=20 > + "Good Octest Transmitted");=20 > + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", > + CTLFLAG_RD, &adapter->stats.mprc, > + "Multicast Packets Received"); > + return; > + } > + > SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "excess_coll",=20 > CTLFLAG_RD, &stats->ecol, > "Excessive collisions"); > @@ -4989,12 +5115,6 @@ igb_add_hw_stats(struct adapter *adapter > SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_jabber", > CTLFLAG_RD, &adapter->stats.rjc, > "Recevied Jabber"); > - > - /* RLEC is inaccurate on some hardware, calculate our own. */ > -/* SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_len_errs", */ > -/* CTLFLAG_RD, adapter->stats.roc + = adapter->stats.ruc, */ > -/* "Receive Length Errors"); */ > - > SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_errs", > CTLFLAG_RD, &adapter->stats.rxerrc, > "Receive Errors"); > @@ -5200,9 +5320,9 @@ igb_add_hw_stats(struct adapter *adapter > SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "header_redir_missed", > CTLFLAG_RD, &adapter->stats.hrmpc, > "Header Redirection Missed Packet Count"); > +} >=20 >=20 > -} > = /********************************************************************** > * > * This routine provides a way to dump out the adapter eeprom, >=20 > Modified: head/sys/dev/e1000/if_igb.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/e1000/if_igb.h Wed Jun 30 17:20:33 2010 = (r209610) > +++ head/sys/dev/e1000/if_igb.h Wed Jun 30 17:26:47 2010 = (r209611) > @@ -180,7 +180,8 @@ >=20 > #define IGB_TX_PTHRESH 8 > #define IGB_TX_HTHRESH 1 > -#define IGB_TX_WTHRESH ((hw->mac.type =3D=3D = e1000_82576 && \ > +#define IGB_TX_WTHRESH (((hw->mac.type =3D=3D = e1000_82576 || \ > + hw->mac.type =3D=3D = e1000_vfadapt) && \ > adapter->msix_mem) ? 1 : 16) >=20 > #define MAX_NUM_MULTICAST_ADDRESSES 128 > @@ -317,9 +318,6 @@ struct tx_ring { > int watchdog_time; > u64 no_desc_avail; > u64 tx_packets; > - /* Statistics for reporting, ONLY. */ > - u32 tdh; /* Transmit Descriptor Head */ > - u32 tdt; /* Transmit Descriptor Tail */ > }; >=20 > /* > @@ -356,9 +354,6 @@ struct rx_ring { > u64 rx_discarded; > u64 rx_packets; > u64 rx_bytes; > - /* Statistics for reporting, ONLY. */ > - u32 rdh; /* Transmit Descriptor Head */ > - u32 rdt; /* Transmit Descriptor Tail */ > }; >=20 > struct adapter { > @@ -449,7 +444,7 @@ struct adapter { > struct hwtstamp_ctrl hwtstamp; > #endif >=20 > - struct e1000_hw_stats stats; > + void *stats; > }; >=20 > /* = **************************************************************************= **** > @@ -497,7 +492,17 @@ struct igb_rx_buf { > #define IGB_RX_LOCK_DESTROY(_sc) = mtx_destroy(&(_sc)->rx_mtx) > #define IGB_RX_LOCK(_sc) mtx_lock(&(_sc)->rx_mtx) > #define IGB_RX_UNLOCK(_sc) = mtx_unlock(&(_sc)->rx_mtx) > -#define IGB_TX_LOCK_ASSERT(_sc) = mtx_assert(&(_sc)->tx_mtx, MA_OWNED) > +#define IGB_RX_LOCK_ASSERT(_sc) = mtx_assert(&(_sc)->rx_mtx, MA_OWNED) > + > +#define UPDATE_VF_REG(reg, last, cur) \ > +{ \ > + u32 new =3D E1000_READ_REG(hw, reg); \ > + if (new < last) \ > + cur +=3D 0x100000000LL; \ > + last =3D new; \ > + cur &=3D 0xFFFFFFFF00000000LL; \ > + cur |=3D new; \ > +} >=20 > #endif /* _IGB_H_DEFINED_ */ >=20 From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 20:41:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED4D6106564A; Wed, 30 Jun 2010 20:41:09 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1D88F8FC14; Wed, 30 Jun 2010 20:41:08 +0000 (UTC) Received: by vws6 with SMTP id 6so388897vws.13 for ; Wed, 30 Jun 2010 13:41:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=xbfcYhtKVWmM4Jdi6Z89DP55MM/kf3Il5gQ6A/OKn/Q=; b=d3G5ojEXBYoTjGyyeLgTJqLDOSEvrUUInuQGepF3usyo4zFKCKXVFR3gg14wSITez/ f+cmFAsmDgfdDoYs5lFLsw5aY8Xi53/vRpJrH9sR9Uc32yUplQ1JkeS7xvK6h/g2Qciq JwO8u97eAzJ2cvR7hU0N8lpfgb36e2VjV1bgU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=cmdL40Q6WYMzpDSF0MRXTJVfOxGJt86WgHUh9PPgvWT0r6bF5HLec1CDr51s7x2iXj oK1WgSepSQVHDXflPzK34bvcpBi2FBSD/dwSK5KHk7Awbs2TCNiQbnHosYdmzJC8smM+ BL8zX2Lp4rVXuCWIZHJ59T1pDsnwuQ3YKq4H4= MIME-Version: 1.0 Received: by 10.224.44.90 with SMTP id z26mr6671423qae.170.1277930460538; Wed, 30 Jun 2010 13:41:00 -0700 (PDT) Received: by 10.229.250.197 with HTTP; Wed, 30 Jun 2010 13:41:00 -0700 (PDT) In-Reply-To: References: <201006301726.o5UHQl7n011935@svn.freebsd.org> Date: Wed, 30 Jun 2010 13:41:00 -0700 Message-ID: From: Jack Vogel To: Fabien Thomas Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Jack F Vogel , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209611 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 20:41:10 -0000 Yes, work is in progress to add it to ixgbe as well, it turned out to be a bit messier because the owners of the shared code did things a bit differently. I am still designing it so that its just a special case in the main driver, this is different than Linux which made both of them as seperate 'vf' driver. Of course in Linux they actually have the host side support, ala PF, if the day ever comes that FreeBSD has such ability maybe I'll have to change it again... but not holding my breath. I'd say the ixgbe changes might be ready in a few weeks. Jack On Wed, Jun 30, 2010 at 1:37 PM, Fabien Thomas wrote: > great! > have you some plan to do it on ixgbe too ? > > fabien > > On 30 juin 2010, at 19:26, Jack F Vogel wrote: > > > Author: jfv > > Date: Wed Jun 30 17:26:47 2010 > > New Revision: 209611 > > URL: http://svn.freebsd.org/changeset/base/209611 > > > > Log: > > SR-IOV support added to igb > > > > What this provides is support for the 'virtual function' > > interface that a FreeBSD VM may be assigned from a host > > like KVM on Linux, or newer versions of Xen with such > > support. > > > > When the guest is set up with the capability, a special > > limited function 82576 PCI device is present in its virtual > > PCI space, so with this driver installed in the guest that > > device will be detected and function nearly like the bare > > metal, as it were. > > > > The interface is only allowed a single queue in this configuration > > however initial performance tests have looked very good. > > > > Enjoy!! > > > > Modified: > > head/sys/dev/e1000/if_igb.c > > head/sys/dev/e1000/if_igb.h > > > > Modified: head/sys/dev/e1000/if_igb.c > > > ============================================================================== > > --- head/sys/dev/e1000/if_igb.c Wed Jun 30 17:20:33 2010 > (r209610) > > +++ head/sys/dev/e1000/if_igb.c Wed Jun 30 17:26:47 2010 > (r209611) > > @@ -99,7 +99,7 @@ int igb_display_debug_stats = 0; > > /********************************************************************* > > * Driver version: > > *********************************************************************/ > > -char igb_driver_version[] = "version - 1.9.6"; > > +char igb_driver_version[] = "version - 2.0.1"; > > > > > > /********************************************************************* > > @@ -128,6 +128,7 @@ static igb_vendor_info_t igb_vendor_info > > PCI_ANY_ID, PCI_ANY_ID, 0}, > > { 0x8086, E1000_DEV_ID_82576_QUAD_COPPER, > > PCI_ANY_ID, PCI_ANY_ID, 0}, > > + { 0x8086, E1000_DEV_ID_82576_VF, PCI_ANY_ID, PCI_ANY_ID, 0}, > > { 0x8086, E1000_DEV_ID_82580_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, > > { 0x8086, E1000_DEV_ID_82580_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, > > { 0x8086, E1000_DEV_ID_82580_SERDES, PCI_ANY_ID, PCI_ANY_ID, 0}, > > @@ -226,7 +227,11 @@ static void igb_dma_free(struct adapter > > static int igb_sysctl_nvm_info(SYSCTL_HANDLER_ARGS); > > static void igb_print_nvm_info(struct adapter *); > > static int igb_is_valid_ether_addr(u8 *); > > -static void igb_add_hw_stats(struct adapter *adapter); > > +static void igb_add_hw_stats(struct adapter *); > > + > > +static void igb_vf_init_stats(struct adapter *); > > +static void igb_update_vf_stats_counters(struct adapter *); > > + > > /* Management and WOL Support */ > > static void igb_init_manageability(struct adapter *); > > static void igb_release_manageability(struct adapter *); > > @@ -494,6 +499,17 @@ igb_attach(device_t dev) > > goto err_pci; > > } > > > > + /* Allocate the appropriate stats memory */ > > + if (adapter->hw.mac.type == e1000_vfadapt) { > > + adapter->stats = > > + (struct e1000_vf_stats *)malloc(sizeof \ > > + (struct e1000_vf_stats), M_DEVBUF, M_NOWAIT | M_ZERO); > > + igb_vf_init_stats(adapter); > > + } else > > + adapter->stats = > > + (struct e1000_hw_stats *)malloc(sizeof \ > > + (struct e1000_hw_stats), M_DEVBUF, M_NOWAIT | M_ZERO); > > + > > /* > > ** Start from a known state, this is > > ** important in reading the nvm and > > @@ -1788,30 +1804,39 @@ static void > > igb_set_promisc(struct adapter *adapter) > > { > > struct ifnet *ifp = adapter->ifp; > > - uint32_t reg_rctl; > > + struct e1000_hw *hw = &adapter->hw; > > + u32 reg; > > > > - reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL); > > + if (hw->mac.type == e1000_vfadapt) { > > + e1000_promisc_set_vf(hw, e1000_promisc_enabled); > > + return; > > + } > > > > + reg = E1000_READ_REG(hw, E1000_RCTL); > > if (ifp->if_flags & IFF_PROMISC) { > > - reg_rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE); > > - E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); > > + reg |= (E1000_RCTL_UPE | E1000_RCTL_MPE); > > + E1000_WRITE_REG(hw, E1000_RCTL, reg); > > } else if (ifp->if_flags & IFF_ALLMULTI) { > > - reg_rctl |= E1000_RCTL_MPE; > > - reg_rctl &= ~E1000_RCTL_UPE; > > - E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); > > + reg |= E1000_RCTL_MPE; > > + reg &= ~E1000_RCTL_UPE; > > + E1000_WRITE_REG(hw, E1000_RCTL, reg); > > } > > } > > > > static void > > igb_disable_promisc(struct adapter *adapter) > > { > > - uint32_t reg_rctl; > > - > > - reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL); > > + struct e1000_hw *hw = &adapter->hw; > > + u32 reg; > > > > - reg_rctl &= (~E1000_RCTL_UPE); > > - reg_rctl &= (~E1000_RCTL_MPE); > > - E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); > > + if (hw->mac.type == e1000_vfadapt) { > > + e1000_promisc_set_vf(hw, e1000_promisc_disabled); > > + return; > > + } > > + reg = E1000_READ_REG(hw, E1000_RCTL); > > + reg &= (~E1000_RCTL_UPE); > > + reg &= (~E1000_RCTL_MPE); > > + E1000_WRITE_REG(hw, E1000_RCTL, reg); > > } > > > > > > @@ -1939,8 +1964,12 @@ igb_update_link_status(struct adapter *a > > e1000_check_for_link(hw); > > link_check = adapter->hw.mac.serdes_has_link; > > break; > > - default: > > + /* VF device is type_unknown */ > > case e1000_media_type_unknown: > > + e1000_check_for_link(hw); > > + link_check = !hw->mac.get_link_status; > > + /* Fall thru */ > > + default: > > break; > > } > > > > @@ -2025,8 +2054,8 @@ igb_identify_hardware(struct adapter *ad > > adapter->hw.bus.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, > 2); > > if (!((adapter->hw.bus.pci_cmd_word & PCIM_CMD_BUSMASTEREN) && > > (adapter->hw.bus.pci_cmd_word & PCIM_CMD_MEMEN))) { > > - device_printf(dev, "Memory Access and/or Bus Master bits " > > - "were not set!\n"); > > + INIT_DEBUGOUT("Memory Access and/or Bus Master " > > + "bits were not set!\n"); > > adapter->hw.bus.pci_cmd_word |= > > (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN); > > pci_write_config(dev, PCIR_COMMAND, > > @@ -2041,12 +2070,6 @@ igb_identify_hardware(struct adapter *ad > > pci_read_config(dev, PCIR_SUBVEND_0, 2); > > adapter->hw.subsystem_device_id = > > pci_read_config(dev, PCIR_SUBDEV_0, 2); > > - > > - /* Do Shared Code Init and Setup */ > > - if (e1000_set_mac_type(&adapter->hw)) { > > - device_printf(dev, "Setup init failure\n"); > > - return; > > - } > > } > > > > static int > > @@ -2225,6 +2248,7 @@ igb_configure_queues(struct adapter *ada > > /* Turn on MSIX */ > > switch (adapter->hw.mac.type) { > > case e1000_82580: > > + case e1000_vfadapt: > > /* RX entries */ > > for (int i = 0; i < adapter->num_queues; i++) { > > u32 index = i >> 1; > > @@ -2446,6 +2470,10 @@ igb_setup_msix(struct adapter *adapter) > > if ((adapter->hw.mac.type == e1000_82575) && (queues > 4)) > > queues = 4; > > > > + /* Limit the VF adapter to one queues */ > > + if ((adapter->hw.mac.type == e1000_vfadapt) && (queues > 2)) > > + queues = 1; > > + > > /* > > ** One vector (RX/TX pair) per queue > > ** plus an additional for Link interrupt > > @@ -2503,6 +2531,7 @@ igb_reset(struct adapter *adapter) > > pba = E1000_PBA_32K; > > break; > > case e1000_82576: > > + case e1000_vfadapt: > > pba = E1000_PBA_64K; > > break; > > case e1000_82580: > > @@ -3074,7 +3103,8 @@ igb_initialize_transmit_units(struct ada > > struct e1000_hw *hw = &adapter->hw; > > u32 tctl, txdctl; > > > > - INIT_DEBUGOUT("igb_initialize_transmit_units: begin"); > > + INIT_DEBUGOUT("igb_initialize_transmit_units: begin"); > > + tctl = txdctl = 0; > > > > /* Setup the Tx Descriptor Rings */ > > for (int i = 0; i < adapter->num_queues; i++, txr++) { > > @@ -3097,7 +3127,6 @@ igb_initialize_transmit_units(struct ada > > > > txr->watchdog_check = FALSE; > > > > - txdctl = E1000_READ_REG(hw, E1000_TXDCTL(i)); > > txdctl |= IGB_TX_PTHRESH; > > txdctl |= IGB_TX_HTHRESH << 8; > > txdctl |= IGB_TX_WTHRESH << 16; > > @@ -3105,6 +3134,9 @@ igb_initialize_transmit_units(struct ada > > E1000_WRITE_REG(hw, E1000_TXDCTL(i), txdctl); > > } > > > > + if (adapter->hw.mac.type == e1000_vfadapt) > > + return; > > + > > /* Program the Transmit Control Register */ > > tctl = E1000_READ_REG(hw, E1000_TCTL); > > tctl &= ~E1000_TCTL_CT; > > @@ -3505,7 +3537,7 @@ igb_txeof(struct tx_ring *txr) > > /* All clean, turn off the watchdog */ > > if (txr->tx_avail == adapter->num_tx_desc) { > > txr->watchdog_check = FALSE; > > - return FALSE; > > + return (FALSE); > > } > > } > > > > @@ -4504,23 +4536,32 @@ igb_setup_vlan_hw_support(struct adapter > > ** we need to repopulate it now. > > */ > > for (int i = 0; i < IGB_VFTA_SIZE; i++) > > - if (igb_shadow_vfta[i] != 0) > > - E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, > > - i, igb_shadow_vfta[i]); > > - > > - reg = E1000_READ_REG(hw, E1000_CTRL); > > - reg |= E1000_CTRL_VME; > > - E1000_WRITE_REG(hw, E1000_CTRL, reg); > > - > > - /* Enable the Filter Table */ > > - reg = E1000_READ_REG(hw, E1000_RCTL); > > - reg &= ~E1000_RCTL_CFIEN; > > - reg |= E1000_RCTL_VFE; > > - E1000_WRITE_REG(hw, E1000_RCTL, reg); > > + if (igb_shadow_vfta[i] != 0) { > > + if (hw->mac.type == e1000_vfadapt) > > + e1000_vfta_set_vf(hw, igb_shadow_vfta[i], > TRUE); > > + else > > + E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, > > + i, igb_shadow_vfta[i]); > > + } > > > > - /* Update the frame size */ > > - E1000_WRITE_REG(&adapter->hw, E1000_RLPML, > > - adapter->max_frame_size + VLAN_TAG_SIZE); > > + if (hw->mac.type == e1000_vfadapt) > > + e1000_rlpml_set_vf(hw, > > + adapter->max_frame_size + VLAN_TAG_SIZE); > > + else { > > + reg = E1000_READ_REG(hw, E1000_CTRL); > > + reg |= E1000_CTRL_VME; > > + E1000_WRITE_REG(hw, E1000_CTRL, reg); > > + > > + /* Enable the Filter Table */ > > + reg = E1000_READ_REG(hw, E1000_RCTL); > > + reg &= ~E1000_RCTL_CFIEN; > > + reg |= E1000_RCTL_VFE; > > + E1000_WRITE_REG(hw, E1000_RCTL, reg); > > + > > + /* Update the frame size */ > > + E1000_WRITE_REG(&adapter->hw, E1000_RLPML, > > + adapter->max_frame_size + VLAN_TAG_SIZE); > > + } > > } > > > > static void > > @@ -4610,6 +4651,9 @@ igb_get_hw_control(struct adapter *adapt > > { > > u32 ctrl_ext; > > > > + if (adapter->hw.mac.type == e1000_vfadapt) > > + return; > > + > > /* Let firmware know the driver has taken over */ > > ctrl_ext = E1000_READ_REG(&adapter->hw, E1000_CTRL_EXT); > > E1000_WRITE_REG(&adapter->hw, E1000_CTRL_EXT, > > @@ -4627,6 +4671,9 @@ igb_release_hw_control(struct adapter *a > > { > > u32 ctrl_ext; > > > > + if (adapter->hw.mac.type == e1000_vfadapt) > > + return; > > + > > /* Let firmware taken over control of h/w */ > > ctrl_ext = E1000_READ_REG(&adapter->hw, E1000_CTRL_EXT); > > E1000_WRITE_REG(&adapter->hw, E1000_CTRL_EXT, > > @@ -4694,138 +4741,190 @@ igb_led_func(void *arg, int onoff) > > static void > > igb_update_stats_counters(struct adapter *adapter) > > { > > - struct ifnet *ifp; > > + struct ifnet *ifp; > > + struct e1000_hw *hw = &adapter->hw; > > + struct e1000_hw_stats *stats; > > > > - if (adapter->hw.phy.media_type == e1000_media_type_copper || > > - (E1000_READ_REG(&adapter->hw, E1000_STATUS) & E1000_STATUS_LU)) > { > > - adapter->stats.symerrs += > > - E1000_READ_REG(&adapter->hw, E1000_SYMERRS); > > - adapter->stats.sec += > > - E1000_READ_REG(&adapter->hw, E1000_SEC); > > - } > > - adapter->stats.crcerrs += E1000_READ_REG(&adapter->hw, > E1000_CRCERRS); > > - adapter->stats.mpc += E1000_READ_REG(&adapter->hw, E1000_MPC); > > - adapter->stats.scc += E1000_READ_REG(&adapter->hw, E1000_SCC); > > - adapter->stats.ecol += E1000_READ_REG(&adapter->hw, E1000_ECOL); > > - > > - adapter->stats.mcc += E1000_READ_REG(&adapter->hw, E1000_MCC); > > - adapter->stats.latecol += E1000_READ_REG(&adapter->hw, > E1000_LATECOL); > > - adapter->stats.colc += E1000_READ_REG(&adapter->hw, E1000_COLC); > > - adapter->stats.dc += E1000_READ_REG(&adapter->hw, E1000_DC); > > - adapter->stats.rlec += E1000_READ_REG(&adapter->hw, E1000_RLEC); > > - adapter->stats.xonrxc += E1000_READ_REG(&adapter->hw, > E1000_XONRXC); > > - adapter->stats.xontxc += E1000_READ_REG(&adapter->hw, > E1000_XONTXC); > > - adapter->stats.xoffrxc += E1000_READ_REG(&adapter->hw, > E1000_XOFFRXC); > > - adapter->stats.xofftxc += E1000_READ_REG(&adapter->hw, > E1000_XOFFTXC); > > - adapter->stats.fcruc += E1000_READ_REG(&adapter->hw, E1000_FCRUC); > > - adapter->stats.prc64 += E1000_READ_REG(&adapter->hw, E1000_PRC64); > > - adapter->stats.prc127 += E1000_READ_REG(&adapter->hw, > E1000_PRC127); > > - adapter->stats.prc255 += E1000_READ_REG(&adapter->hw, > E1000_PRC255); > > - adapter->stats.prc511 += E1000_READ_REG(&adapter->hw, > E1000_PRC511); > > - adapter->stats.prc1023 += E1000_READ_REG(&adapter->hw, > E1000_PRC1023); > > - adapter->stats.prc1522 += E1000_READ_REG(&adapter->hw, > E1000_PRC1522); > > - adapter->stats.gprc += E1000_READ_REG(&adapter->hw, E1000_GPRC); > > - adapter->stats.bprc += E1000_READ_REG(&adapter->hw, E1000_BPRC); > > - adapter->stats.mprc += E1000_READ_REG(&adapter->hw, E1000_MPRC); > > - adapter->stats.gptc += E1000_READ_REG(&adapter->hw, E1000_GPTC); > > + /* > > + ** The virtual function adapter has only a > > + ** small controlled set of stats, do only > > + ** those and return. > > + */ > > + if (adapter->hw.mac.type == e1000_vfadapt) { > > + igb_update_vf_stats_counters(adapter); > > + return; > > + } > > + > > + stats = (struct e1000_hw_stats *)adapter->stats; > > + > > + if(adapter->hw.phy.media_type == e1000_media_type_copper || > > + (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)) { > > + stats->symerrs += > > + E1000_READ_REG(hw,E1000_SYMERRS); > > + stats->sec += E1000_READ_REG(hw, E1000_SEC); > > + } > > + > > + stats->crcerrs += E1000_READ_REG(hw, E1000_CRCERRS); > > + stats->mpc += E1000_READ_REG(hw, E1000_MPC); > > + stats->scc += E1000_READ_REG(hw, E1000_SCC); > > + stats->ecol += E1000_READ_REG(hw, E1000_ECOL); > > + > > + stats->mcc += E1000_READ_REG(hw, E1000_MCC); > > + stats->latecol += E1000_READ_REG(hw, E1000_LATECOL); > > + stats->colc += E1000_READ_REG(hw, E1000_COLC); > > + stats->dc += E1000_READ_REG(hw, E1000_DC); > > + stats->rlec += E1000_READ_REG(hw, E1000_RLEC); > > + stats->xonrxc += E1000_READ_REG(hw, E1000_XONRXC); > > + stats->xontxc += E1000_READ_REG(hw, E1000_XONTXC); > > + stats->xoffrxc += E1000_READ_REG(hw, E1000_XOFFRXC); > > + stats->xofftxc += E1000_READ_REG(hw, E1000_XOFFTXC); > > + stats->fcruc += E1000_READ_REG(hw, E1000_FCRUC); > > + stats->prc64 += E1000_READ_REG(hw, E1000_PRC64); > > + stats->prc127 += E1000_READ_REG(hw, E1000_PRC127); > > + stats->prc255 += E1000_READ_REG(hw, E1000_PRC255); > > + stats->prc511 += E1000_READ_REG(hw, E1000_PRC511); > > + stats->prc1023 += E1000_READ_REG(hw, E1000_PRC1023); > > + stats->prc1522 += E1000_READ_REG(hw, E1000_PRC1522); > > + stats->gprc += E1000_READ_REG(hw, E1000_GPRC); > > + stats->bprc += E1000_READ_REG(hw, E1000_BPRC); > > + stats->mprc += E1000_READ_REG(hw, E1000_MPRC); > > + stats->gptc += E1000_READ_REG(hw, E1000_GPTC); > > > > /* For the 64-bit byte counters the low dword must be read first. > */ > > /* Both registers clear on the read of the high dword */ > > > > - adapter->stats.gorc += E1000_READ_REG(&adapter->hw, E1000_GORCL) + > > - ((u64)E1000_READ_REG(&adapter->hw, E1000_GORCH) << 32); > > - adapter->stats.gotc += E1000_READ_REG(&adapter->hw, E1000_GOTCL) + > > - ((u64)E1000_READ_REG(&adapter->hw, E1000_GOTCH) << 32) ; > > - > > - adapter->stats.rnbc += E1000_READ_REG(&adapter->hw, E1000_RNBC); > > - adapter->stats.ruc += E1000_READ_REG(&adapter->hw, E1000_RUC); > > - adapter->stats.rfc += E1000_READ_REG(&adapter->hw, E1000_RFC); > > - adapter->stats.roc += E1000_READ_REG(&adapter->hw, E1000_ROC); > > - adapter->stats.rjc += E1000_READ_REG(&adapter->hw, E1000_RJC); > > - > > - adapter->stats.tor += E1000_READ_REG(&adapter->hw, E1000_TORH); > > - adapter->stats.tot += E1000_READ_REG(&adapter->hw, E1000_TOTH); > > - > > - adapter->stats.tpr += E1000_READ_REG(&adapter->hw, E1000_TPR); > > - adapter->stats.tpt += E1000_READ_REG(&adapter->hw, E1000_TPT); > > - adapter->stats.ptc64 += E1000_READ_REG(&adapter->hw, E1000_PTC64); > > - adapter->stats.ptc127 += E1000_READ_REG(&adapter->hw, > E1000_PTC127); > > - adapter->stats.ptc255 += E1000_READ_REG(&adapter->hw, > E1000_PTC255); > > - adapter->stats.ptc511 += E1000_READ_REG(&adapter->hw, > E1000_PTC511); > > - adapter->stats.ptc1023 += E1000_READ_REG(&adapter->hw, > E1000_PTC1023); > > - adapter->stats.ptc1522 += E1000_READ_REG(&adapter->hw, > E1000_PTC1522); > > - adapter->stats.mptc += E1000_READ_REG(&adapter->hw, E1000_MPTC); > > - adapter->stats.bptc += E1000_READ_REG(&adapter->hw, E1000_BPTC); > > + stats->gorc += E1000_READ_REG(hw, E1000_GORCL) + > > + ((u64)E1000_READ_REG(hw, E1000_GORCH) << 32); > > + stats->gotc += E1000_READ_REG(hw, E1000_GOTCL) + > > + ((u64)E1000_READ_REG(hw, E1000_GOTCH) << 32) ; > > + > > + stats->rnbc += E1000_READ_REG(hw, E1000_RNBC); > > + stats->ruc += E1000_READ_REG(hw, E1000_RUC); > > + stats->rfc += E1000_READ_REG(hw, E1000_RFC); > > + stats->roc += E1000_READ_REG(hw, E1000_ROC); > > + stats->rjc += E1000_READ_REG(hw, E1000_RJC); > > + > > + stats->tor += E1000_READ_REG(hw, E1000_TORH); > > + stats->tot += E1000_READ_REG(hw, E1000_TOTH); > > + > > + stats->tpr += E1000_READ_REG(hw, E1000_TPR); > > + stats->tpt += E1000_READ_REG(hw, E1000_TPT); > > + stats->ptc64 += E1000_READ_REG(hw, E1000_PTC64); > > + stats->ptc127 += E1000_READ_REG(hw, E1000_PTC127); > > + stats->ptc255 += E1000_READ_REG(hw, E1000_PTC255); > > + stats->ptc511 += E1000_READ_REG(hw, E1000_PTC511); > > + stats->ptc1023 += E1000_READ_REG(hw, E1000_PTC1023); > > + stats->ptc1522 += E1000_READ_REG(hw, E1000_PTC1522); > > + stats->mptc += E1000_READ_REG(hw, E1000_MPTC); > > + stats->bptc += E1000_READ_REG(hw, E1000_BPTC); > > > > /* Interrupt Counts */ > > > > - adapter->stats.iac += E1000_READ_REG(&adapter->hw, E1000_IAC); > > - adapter->stats.icrxptc += E1000_READ_REG(&adapter->hw, > E1000_ICRXPTC); > > - adapter->stats.icrxatc += E1000_READ_REG(&adapter->hw, > E1000_ICRXATC); > > - adapter->stats.ictxptc += E1000_READ_REG(&adapter->hw, > E1000_ICTXPTC); > > - adapter->stats.ictxatc += E1000_READ_REG(&adapter->hw, > E1000_ICTXATC); > > - adapter->stats.ictxqec += E1000_READ_REG(&adapter->hw, > E1000_ICTXQEC); > > - adapter->stats.ictxqmtc += E1000_READ_REG(&adapter->hw, > E1000_ICTXQMTC); > > - adapter->stats.icrxdmtc += E1000_READ_REG(&adapter->hw, > E1000_ICRXDMTC); > > - adapter->stats.icrxoc += E1000_READ_REG(&adapter->hw, > E1000_ICRXOC); > > + stats->iac += E1000_READ_REG(hw, E1000_IAC); > > + stats->icrxptc += E1000_READ_REG(hw, E1000_ICRXPTC); > > + stats->icrxatc += E1000_READ_REG(hw, E1000_ICRXATC); > > + stats->ictxptc += E1000_READ_REG(hw, E1000_ICTXPTC); > > + stats->ictxatc += E1000_READ_REG(hw, E1000_ICTXATC); > > + stats->ictxqec += E1000_READ_REG(hw, E1000_ICTXQEC); > > + stats->ictxqmtc += E1000_READ_REG(hw, E1000_ICTXQMTC); > > + stats->icrxdmtc += E1000_READ_REG(hw, E1000_ICRXDMTC); > > + stats->icrxoc += E1000_READ_REG(hw, E1000_ICRXOC); > > > > /* Host to Card Statistics */ > > > > - adapter->stats.cbtmpc += E1000_READ_REG(&adapter->hw, > E1000_CBTMPC); > > - adapter->stats.htdpmc += E1000_READ_REG(&adapter->hw, > E1000_HTDPMC); > > - adapter->stats.cbrdpc += E1000_READ_REG(&adapter->hw, > E1000_CBRDPC); > > - adapter->stats.cbrmpc += E1000_READ_REG(&adapter->hw, > E1000_CBRMPC); > > - adapter->stats.rpthc += E1000_READ_REG(&adapter->hw, E1000_RPTHC); > > - adapter->stats.hgptc += E1000_READ_REG(&adapter->hw, E1000_HGPTC); > > - adapter->stats.htcbdpc += E1000_READ_REG(&adapter->hw, > E1000_HTCBDPC); > > - adapter->stats.hgorc += (E1000_READ_REG(&adapter->hw, E1000_HGORCL) > + > > - ((u64)E1000_READ_REG(&adapter->hw, > > - E1000_HGORCH) << > 32)); > > - > > - adapter->stats.hgotc += (E1000_READ_REG(&adapter->hw, E1000_HGOTCL) > + > > - ((u64)E1000_READ_REG(&adapter->hw, > > - E1000_HGOTCH) << > 32)); > > - adapter->stats.lenerrs += E1000_READ_REG(&adapter->hw, > E1000_LENERRS); > > - adapter->stats.scvpc += E1000_READ_REG(&adapter->hw, E1000_SCVPC); > > - adapter->stats.hrmpc += E1000_READ_REG(&adapter->hw, E1000_HRMPC); > > - > > - adapter->stats.algnerrc += > > - E1000_READ_REG(&adapter->hw, E1000_ALGNERRC); > > - adapter->stats.rxerrc += > > - E1000_READ_REG(&adapter->hw, E1000_RXERRC); > > - adapter->stats.tncrs += > > - E1000_READ_REG(&adapter->hw, E1000_TNCRS); > > - adapter->stats.cexterr += > > - E1000_READ_REG(&adapter->hw, E1000_CEXTERR); > > - adapter->stats.tsctc += > > - E1000_READ_REG(&adapter->hw, E1000_TSCTC); > > - adapter->stats.tsctfc += > > - E1000_READ_REG(&adapter->hw, E1000_TSCTFC); > > + stats->cbtmpc += E1000_READ_REG(hw, E1000_CBTMPC); > > + stats->htdpmc += E1000_READ_REG(hw, E1000_HTDPMC); > > + stats->cbrdpc += E1000_READ_REG(hw, E1000_CBRDPC); > > + stats->cbrmpc += E1000_READ_REG(hw, E1000_CBRMPC); > > + stats->rpthc += E1000_READ_REG(hw, E1000_RPTHC); > > + stats->hgptc += E1000_READ_REG(hw, E1000_HGPTC); > > + stats->htcbdpc += E1000_READ_REG(hw, E1000_HTCBDPC); > > + stats->hgorc += (E1000_READ_REG(hw, E1000_HGORCL) + > > + ((u64)E1000_READ_REG(hw, E1000_HGORCH) << 32)); > > + stats->hgotc += (E1000_READ_REG(hw, E1000_HGOTCL) + > > + ((u64)E1000_READ_REG(hw, E1000_HGOTCH) << 32)); > > + stats->lenerrs += E1000_READ_REG(hw, E1000_LENERRS); > > + stats->scvpc += E1000_READ_REG(hw, E1000_SCVPC); > > + stats->hrmpc += E1000_READ_REG(hw, E1000_HRMPC); > > + > > + stats->algnerrc += E1000_READ_REG(hw, E1000_ALGNERRC); > > + stats->rxerrc += E1000_READ_REG(hw, E1000_RXERRC); > > + stats->tncrs += E1000_READ_REG(hw, E1000_TNCRS); > > + stats->cexterr += E1000_READ_REG(hw, E1000_CEXTERR); > > + stats->tsctc += E1000_READ_REG(hw, E1000_TSCTC); > > + stats->tsctfc += E1000_READ_REG(hw, E1000_TSCTFC); > > ifp = adapter->ifp; > > > > - ifp->if_collisions = adapter->stats.colc; > > + ifp = adapter->ifp; > > + ifp->if_collisions = stats->colc; > > > > /* Rx Errors */ > > - ifp->if_ierrors = adapter->dropped_pkts + adapter->stats.rxerrc + > > - adapter->stats.crcerrs + adapter->stats.algnerrc + > > - adapter->stats.ruc + adapter->stats.roc + > > - adapter->stats.mpc + adapter->stats.cexterr; > > + ifp->if_ierrors = adapter->dropped_pkts + stats->rxerrc + > > + stats->crcerrs + stats->algnerrc + > > + stats->ruc + stats->roc + stats->mpc + stats->cexterr; > > > > /* Tx Errors */ > > - ifp->if_oerrors = adapter->stats.ecol + > > - adapter->stats.latecol + adapter->watchdog_events; > > + ifp->if_oerrors = stats->ecol + > > + stats->latecol + adapter->watchdog_events; > > > > /* Driver specific counters */ > > - adapter->device_control = E1000_READ_REG(&adapter->hw, E1000_CTRL); > > - adapter->rx_control = E1000_READ_REG(&adapter->hw, E1000_RCTL); > > - adapter->int_mask = E1000_READ_REG(&adapter->hw, E1000_IMS); > > - adapter->eint_mask = E1000_READ_REG(&adapter->hw, E1000_EIMS); > > - adapter->packet_buf_alloc_tx = ((E1000_READ_REG(&adapter->hw, > E1000_PBA) > > - & 0xffff0000) >> 16); > > + adapter->device_control = E1000_READ_REG(hw, E1000_CTRL); > > + adapter->rx_control = E1000_READ_REG(hw, E1000_RCTL); > > + adapter->int_mask = E1000_READ_REG(hw, E1000_IMS); > > + adapter->eint_mask = E1000_READ_REG(hw, E1000_EIMS); > > + adapter->packet_buf_alloc_tx = > > + ((E1000_READ_REG(hw, E1000_PBA) & 0xffff0000) >> 16); > > + adapter->packet_buf_alloc_rx = > > + ((E1000_READ_REG(hw, E1000_PBA) & 0xffff); > > +} > > > > - adapter->packet_buf_alloc_rx = (E1000_READ_REG(&adapter->hw, > E1000_PBA) > > - & 0xffff); > > > > +/********************************************************************** > > + * > > + * Initialize the VF board statistics counters. > > + * > > + **********************************************************************/ > > +static void > > +igb_vf_init_stats(struct adapter *adapter) > > +{ > > + struct e1000_hw *hw = &adapter->hw; > > + struct e1000_vf_stats *stats; > > + > > + stats = (struct e1000_vf_stats *)adapter->stats; > > + > > + stats->last_gprc = E1000_READ_REG(hw, E1000_VFGPRC); > > + stats->last_gorc = E1000_READ_REG(hw, E1000_VFGORC); > > + stats->last_gptc = E1000_READ_REG(hw, E1000_VFGPTC); > > + stats->last_gotc = E1000_READ_REG(hw, E1000_VFGOTC); > > + stats->last_mprc = E1000_READ_REG(hw, E1000_VFMPRC); > > +} > > + > > +/********************************************************************** > > + * > > + * Update the VF board statistics counters. > > + * > > + **********************************************************************/ > > +static void > > +igb_update_vf_stats_counters(struct adapter *adapter) > > +{ > > + struct e1000_hw *hw = &adapter->hw; > > + struct e1000_vf_stats *stats; > > + > > + if (adapter->link_speed == 0) > > + return; > > + > > + stats = (struct e1000_vf_stats *)adapter->stats; > > + > > + UPDATE_VF_REG(E1000_VFGPRC, > > + stats->last_gprc, stats->gprc); > > + UPDATE_VF_REG(E1000_VFGORC, > > + stats->last_gorc, stats->gorc); > > + UPDATE_VF_REG(E1000_VFGPTC, > > + stats->last_gptc, stats->gptc); > > + UPDATE_VF_REG(E1000_VFGOTC, > > + stats->last_gotc, stats->gotc); > > + UPDATE_VF_REG(E1000_VFMPRC, > > + stats->last_mprc, stats->mprc); > > } > > > > > > @@ -4895,10 +4994,14 @@ igb_add_hw_stats(struct adapter *adapter > > queue_list = SYSCTL_CHILDREN(queue_node); > > > > SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "txd_head", > > - CTLFLAG_RD, &txr->tdh, 0, > > + CTLFLAG_RD, > > + E1000_READ_REG(&adapter->hw, > > + E1000_TDH(txr->me)), 0, > > "Transmit Descriptor Head"); > > SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "txd_tail", > > - CTLFLAG_RD, &txr->tdt, 0, > > + CTLFLAG_RD, > > + E1000_READ_REG(&adapter->hw, > > + E1000_TDT(txr->me))), 0, > > "Transmit Descriptor Tail"); > > SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "no_desc_avail", > > CTLFLAG_RD, &txr->no_desc_avail, > > @@ -4947,6 +5050,29 @@ igb_add_hw_stats(struct adapter *adapter > > CTLFLAG_RD, NULL, "MAC Statistics"); > > stat_list = SYSCTL_CHILDREN(stat_node); > > > > + /* > > + ** VF adapter has a very limited set of stats > > + ** since its not managing the metal, so to speak. > > + */ > > + if (adapter->hw.mac.type == e1000_vfadapt) { > > + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", > > + CTLFLAG_RD, &adapter->stats.gprc, > > + "Good Packets Received"); > > + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", > > + CTLFLAG_RD, &adapter->stats.gptc, > > + "Good Packets Transmitted"); > > + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", > > + CTLFLAG_RD, &adapter->stats.gorc, > > + "Good Octets Received"); > > + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octest_txd", > > + CTLFLAG_RD, &adapter->stats.gotc, > > + "Good Octest Transmitted"); > > + SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", > > + CTLFLAG_RD, &adapter->stats.mprc, > > + "Multicast Packets Received"); > > + return; > > + } > > + > > SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "excess_coll", > > CTLFLAG_RD, &stats->ecol, > > "Excessive collisions"); > > @@ -4989,12 +5115,6 @@ igb_add_hw_stats(struct adapter *adapter > > SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_jabber", > > CTLFLAG_RD, &adapter->stats.rjc, > > "Recevied Jabber"); > > - > > - /* RLEC is inaccurate on some hardware, calculate our own. */ > > -/* SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_len_errs", */ > > -/* CTLFLAG_RD, adapter->stats.roc + > adapter->stats.ruc, */ > > -/* "Receive Length Errors"); */ > > - > > SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_errs", > > CTLFLAG_RD, &adapter->stats.rxerrc, > > "Receive Errors"); > > @@ -5200,9 +5320,9 @@ igb_add_hw_stats(struct adapter *adapter > > SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "header_redir_missed", > > CTLFLAG_RD, &adapter->stats.hrmpc, > > "Header Redirection Missed Packet Count"); > > +} > > > > > > -} > > /********************************************************************** > > * > > * This routine provides a way to dump out the adapter eeprom, > > > > Modified: head/sys/dev/e1000/if_igb.h > > > ============================================================================== > > --- head/sys/dev/e1000/if_igb.h Wed Jun 30 17:20:33 2010 > (r209610) > > +++ head/sys/dev/e1000/if_igb.h Wed Jun 30 17:26:47 2010 > (r209611) > > @@ -180,7 +180,8 @@ > > > > #define IGB_TX_PTHRESH 8 > > #define IGB_TX_HTHRESH 1 > > -#define IGB_TX_WTHRESH ((hw->mac.type == > e1000_82576 && \ > > +#define IGB_TX_WTHRESH (((hw->mac.type == > e1000_82576 || \ > > + hw->mac.type == e1000_vfadapt) && > \ > > adapter->msix_mem) ? 1 : 16) > > > > #define MAX_NUM_MULTICAST_ADDRESSES 128 > > @@ -317,9 +318,6 @@ struct tx_ring { > > int watchdog_time; > > u64 no_desc_avail; > > u64 tx_packets; > > - /* Statistics for reporting, ONLY. */ > > - u32 tdh; /* Transmit Descriptor Head */ > > - u32 tdt; /* Transmit Descriptor Tail */ > > }; > > > > /* > > @@ -356,9 +354,6 @@ struct rx_ring { > > u64 rx_discarded; > > u64 rx_packets; > > u64 rx_bytes; > > - /* Statistics for reporting, ONLY. */ > > - u32 rdh; /* Transmit Descriptor Head */ > > - u32 rdt; /* Transmit Descriptor Tail */ > > }; > > > > struct adapter { > > @@ -449,7 +444,7 @@ struct adapter { > > struct hwtstamp_ctrl hwtstamp; > > #endif > > > > - struct e1000_hw_stats stats; > > + void *stats; > > }; > > > > /* > ****************************************************************************** > > @@ -497,7 +492,17 @@ struct igb_rx_buf { > > #define IGB_RX_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->rx_mtx) > > #define IGB_RX_LOCK(_sc) mtx_lock(&(_sc)->rx_mtx) > > #define IGB_RX_UNLOCK(_sc) mtx_unlock(&(_sc)->rx_mtx) > > -#define IGB_TX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->tx_mtx, > MA_OWNED) > > +#define IGB_RX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_mtx, > MA_OWNED) > > + > > +#define UPDATE_VF_REG(reg, last, cur) \ > > +{ \ > > + u32 new = E1000_READ_REG(hw, reg); \ > > + if (new < last) \ > > + cur += 0x100000000LL; \ > > + last = new; \ > > + cur &= 0xFFFFFFFF00000000LL; \ > > + cur |= new; \ > > +} > > > > #endif /* _IGB_H_DEFINED_ */ > > > > From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 21:05:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 041181065670; Wed, 30 Jun 2010 21:05:52 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E63268FC16; Wed, 30 Jun 2010 21:05:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5UL5pYe060343; Wed, 30 Jun 2010 21:05:51 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5UL5pE2060304; Wed, 30 Jun 2010 21:05:51 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201006302105.o5UL5pE2060304@svn.freebsd.org> From: Jack F Vogel Date: Wed, 30 Jun 2010 21:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209616 - in head/sys: conf dev/e1000 modules/igb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2010 21:05:52 -0000 Author: jfv Date: Wed Jun 30 21:05:51 2010 New Revision: 209616 URL: http://svn.freebsd.org/changeset/base/209616 Log: OK, I was a bit sleep this morning and checked in the core changes but left out the shared code, lol. Well, and a couple fixes to the core... hopefully this will all be complete now. Happy happy joy joy :) Added: head/sys/dev/e1000/e1000_mbx.c (contents, props changed) head/sys/dev/e1000/e1000_mbx.h (contents, props changed) head/sys/dev/e1000/e1000_vf.c (contents, props changed) head/sys/dev/e1000/e1000_vf.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_api.c head/sys/dev/e1000/e1000_api.h head/sys/dev/e1000/e1000_hw.h head/sys/dev/e1000/e1000_regs.h head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_igb.h head/sys/modules/igb/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jun 30 19:51:19 2010 (r209615) +++ head/sys/conf/files Wed Jun 30 21:05:51 2010 (r209616) @@ -963,6 +963,10 @@ dev/e1000/e1000_nvm.c optional em | igb compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_phy.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" +dev/e1000/e1000_vf.c optional em | igb \ + compile-with "${NORMAL_C} -I$S/dev/e1000" +dev/e1000/e1000_mbx.c optional em | igb \ + compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_osdep.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/et/if_et.c optional et Modified: head/sys/dev/e1000/e1000_82575.h ============================================================================== --- head/sys/dev/e1000/e1000_82575.h Wed Jun 30 19:51:19 2010 (r209615) +++ head/sys/dev/e1000/e1000_82575.h Wed Jun 30 21:05:51 2010 (r209616) @@ -459,5 +459,16 @@ struct e1000_adv_tx_context_desc { #define E1000_RXPBS_SIZE_MASK_82576 0x0000007F void e1000_vmdq_set_loopback_pf(struct e1000_hw *hw, bool enable); void e1000_vmdq_set_replication_pf(struct e1000_hw *hw, bool enable); +enum e1000_promisc_type { + e1000_promisc_disabled = 0, /* all promisc modes disabled */ + e1000_promisc_unicast = 1, /* unicast promiscuous enabled */ + e1000_promisc_multicast = 2, /* multicast promiscuous enabled */ + e1000_promisc_enabled = 3, /* both uni and multicast promisc */ + e1000_num_promisc_types +}; + +void e1000_vfta_set_vf(struct e1000_hw *, u16, bool); +void e1000_rlpml_set_vf(struct e1000_hw *, u16); +s32 e1000_promisc_set_vf(struct e1000_hw *, enum e1000_promisc_type type); u16 e1000_rxpbs_adjust_82580(u32 data); #endif /* _E1000_82575_H_ */ Modified: head/sys/dev/e1000/e1000_api.c ============================================================================== --- head/sys/dev/e1000/e1000_api.c Wed Jun 30 19:51:19 2010 (r209615) +++ head/sys/dev/e1000/e1000_api.c Wed Jun 30 21:05:51 2010 (r209616) @@ -112,6 +112,31 @@ out: return ret_val; } +/** + * e1000_init_mbx_params - Initialize mailbox function pointers + * @hw: pointer to the HW structure + * + * This function initializes the function pointers for the PHY + * set of functions. Called by drivers or by e1000_setup_init_funcs. + **/ +s32 e1000_init_mbx_params(struct e1000_hw *hw) +{ + s32 ret_val = E1000_SUCCESS; + + if (hw->mbx.ops.init_params) { + ret_val = hw->mbx.ops.init_params(hw); + if (ret_val) { + DEBUGOUT("Mailbox Initialization Error\n"); + goto out; + } + } else { + DEBUGOUT("mbx.init_mbx_params was NULL\n"); + ret_val = -E1000_ERR_CONFIG; + } + +out: + return ret_val; +} /** * e1000_set_mac_type - Sets MAC type @@ -281,6 +306,9 @@ s32 e1000_set_mac_type(struct e1000_hw * case E1000_DEV_ID_82580_COPPER_DUAL: mac->type = e1000_82580; break; + case E1000_DEV_ID_82576_VF: + mac->type = e1000_vfadapt; + break; default: /* Should never have loaded on this device */ ret_val = -E1000_ERR_MAC_INIT; @@ -326,6 +354,7 @@ s32 e1000_setup_init_funcs(struct e1000_ e1000_init_mac_ops_generic(hw); e1000_init_phy_ops_generic(hw); e1000_init_nvm_ops_generic(hw); + e1000_init_mbx_ops_generic(hw); /* * Set up the init function pointers. These are functions within the @@ -374,6 +403,9 @@ s32 e1000_setup_init_funcs(struct e1000_ case e1000_82580: e1000_init_function_pointers_82575(hw); break; + case e1000_vfadapt: + e1000_init_function_pointers_vf(hw); + break; default: DEBUGOUT("Hardware not supported\n"); ret_val = -E1000_ERR_CONFIG; @@ -396,6 +428,10 @@ s32 e1000_setup_init_funcs(struct e1000_ ret_val = e1000_init_phy_params(hw); if (ret_val) goto out; + + ret_val = e1000_init_mbx_params(hw); + if (ret_val) + goto out; } out: Modified: head/sys/dev/e1000/e1000_api.h ============================================================================== --- head/sys/dev/e1000/e1000_api.h Wed Jun 30 19:51:19 2010 (r209615) +++ head/sys/dev/e1000/e1000_api.h Wed Jun 30 21:05:51 2010 (r209616) @@ -55,6 +55,7 @@ s32 e1000_setup_init_funcs(struct e1000 s32 e1000_init_mac_params(struct e1000_hw *hw); s32 e1000_init_nvm_params(struct e1000_hw *hw); s32 e1000_init_phy_params(struct e1000_hw *hw); +s32 e1000_init_mbx_params(struct e1000_hw *hw); s32 e1000_get_bus_info(struct e1000_hw *hw); void e1000_clear_vfta(struct e1000_hw *hw); void e1000_write_vfta(struct e1000_hw *hw, u32 offset, u32 value); Modified: head/sys/dev/e1000/e1000_hw.h ============================================================================== --- head/sys/dev/e1000/e1000_hw.h Wed Jun 30 19:51:19 2010 (r209615) +++ head/sys/dev/e1000/e1000_hw.h Wed Jun 30 21:05:51 2010 (r209616) @@ -134,6 +134,7 @@ struct e1000_hw; #define E1000_DEV_ID_82576_NS 0x150A #define E1000_DEV_ID_82576_NS_SERDES 0x1518 #define E1000_DEV_ID_82576_SERDES_QUAD 0x150D +#define E1000_DEV_ID_82576_VF 0x10CA #define E1000_DEV_ID_82575EB_COPPER 0x10A7 #define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9 #define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6 @@ -186,6 +187,7 @@ enum e1000_mac_type { e1000_82575, e1000_82576, e1000_82580, + e1000_vfadapt, e1000_num_macs /* List is 1-based, so subtract 1 for TRUE count. */ }; @@ -531,6 +533,37 @@ struct e1000_hw_stats { u64 doosync; }; +struct e1000_vf_stats { + u64 base_gprc; + u64 base_gptc; + u64 base_gorc; + u64 base_gotc; + u64 base_mprc; + u64 base_gotlbc; + u64 base_gptlbc; + u64 base_gorlbc; + u64 base_gprlbc; + + u32 last_gprc; + u32 last_gptc; + u32 last_gorc; + u32 last_gotc; + u32 last_mprc; + u32 last_gotlbc; + u32 last_gptlbc; + u32 last_gorlbc; + u32 last_gprlbc; + + u64 gprc; + u64 gptc; + u64 gorc; + u64 gotc; + u64 mprc; + u64 gotlbc; + u64 gptlbc; + u64 gorlbc; + u64 gprlbc; +}; struct e1000_phy_stats { u32 idle_errors; @@ -581,6 +614,7 @@ struct e1000_host_mng_command_info { #include "e1000_phy.h" #include "e1000_nvm.h" #include "e1000_manage.h" +#include "e1000_mbx.h" struct e1000_mac_operations { /* Function pointers for the MAC. */ @@ -758,6 +792,7 @@ struct e1000_fc_info { u32 high_water; /* Flow control high-water mark */ u32 low_water; /* Flow control low-water mark */ u16 pause_time; /* Flow control pause timer */ + u16 refresh_time; /* Flow control refresh timer */ bool send_xon; /* Flow control send XON */ bool strict_ieee; /* Strict IEEE mode */ enum e1000_fc_mode current_mode; /* FC mode in effect */ @@ -805,6 +840,33 @@ struct e1000_dev_spec_ich8lan { bool nvm_k1_enabled; }; +struct e1000_mbx_operations { + s32 (*init_params)(struct e1000_hw *hw); + s32 (*read)(struct e1000_hw *, u32 *, u16, u16); + s32 (*write)(struct e1000_hw *, u32 *, u16, u16); + s32 (*read_posted)(struct e1000_hw *, u32 *, u16, u16); + s32 (*write_posted)(struct e1000_hw *, u32 *, u16, u16); + s32 (*check_for_msg)(struct e1000_hw *, u16); + s32 (*check_for_ack)(struct e1000_hw *, u16); + s32 (*check_for_rst)(struct e1000_hw *, u16); +}; + +struct e1000_mbx_stats { + u32 msgs_tx; + u32 msgs_rx; + u32 acks; + u32 reqs; + u32 rsts; +}; + +struct e1000_mbx_info { + struct e1000_mbx_operations ops; + struct e1000_mbx_stats stats; + u32 timeout; + u32 usec_delay; + u16 size; +}; + struct e1000_dev_spec_82575 { bool sgmii_active; bool global_device_reset; @@ -828,6 +890,7 @@ struct e1000_hw { struct e1000_phy_info phy; struct e1000_nvm_info nvm; struct e1000_bus_info bus; + struct e1000_mbx_info mbx; struct e1000_host_mng_dhcp_cookie mng_cookie; union { Added: head/sys/dev/e1000/e1000_mbx.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/e1000/e1000_mbx.c Wed Jun 30 21:05:51 2010 (r209616) @@ -0,0 +1,762 @@ +/****************************************************************************** + + Copyright (c) 2001-2010, Intel Corporation + 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. Neither the name of the Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ +/*$FreeBSD$*/ + +#include "e1000_mbx.h" + +/** + * e1000_null_mbx_check_for_flag - No-op function, return 0 + * @hw: pointer to the HW structure + **/ +static s32 e1000_null_mbx_check_for_flag(struct e1000_hw *hw, u16 mbx_id) +{ + DEBUGFUNC("e1000_null_mbx_check_flag"); + + return E1000_SUCCESS; +} + +/** + * e1000_null_mbx_transact - No-op function, return 0 + * @hw: pointer to the HW structure + **/ +static s32 e1000_null_mbx_transact(struct e1000_hw *hw, u32 *msg, u16 size, + u16 mbx_id) +{ + DEBUGFUNC("e1000_null_mbx_rw_msg"); + + return E1000_SUCCESS; +} + +/** + * e1000_read_mbx - Reads a message from the mailbox + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to read + * + * returns SUCCESS if it successfuly read message from buffer + **/ +s32 e1000_read_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_read_mbx"); + + /* limit read to size of mailbox */ + if (size > mbx->size) + size = mbx->size; + + if (mbx->ops.read) + ret_val = mbx->ops.read(hw, msg, size, mbx_id); + + return ret_val; +} + +/** + * e1000_write_mbx - Write a message to the mailbox + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to write + * + * returns SUCCESS if it successfully copied message into the buffer + **/ +s32 e1000_write_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + s32 ret_val = E1000_SUCCESS; + + DEBUGFUNC("e1000_write_mbx"); + + if (size > mbx->size) + ret_val = -E1000_ERR_MBX; + + else if (mbx->ops.write) + ret_val = mbx->ops.write(hw, msg, size, mbx_id); + + return ret_val; +} + +/** + * e1000_check_for_msg - checks to see if someone sent us mail + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to check + * + * returns SUCCESS if the Status bit was found or else ERR_MBX + **/ +s32 e1000_check_for_msg(struct e1000_hw *hw, u16 mbx_id) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_check_for_msg"); + + if (mbx->ops.check_for_msg) + ret_val = mbx->ops.check_for_msg(hw, mbx_id); + + return ret_val; +} + +/** + * e1000_check_for_ack - checks to see if someone sent us ACK + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to check + * + * returns SUCCESS if the Status bit was found or else ERR_MBX + **/ +s32 e1000_check_for_ack(struct e1000_hw *hw, u16 mbx_id) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_check_for_ack"); + + if (mbx->ops.check_for_ack) + ret_val = mbx->ops.check_for_ack(hw, mbx_id); + + return ret_val; +} + +/** + * e1000_check_for_rst - checks to see if other side has reset + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to check + * + * returns SUCCESS if the Status bit was found or else ERR_MBX + **/ +s32 e1000_check_for_rst(struct e1000_hw *hw, u16 mbx_id) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_check_for_rst"); + + if (mbx->ops.check_for_rst) + ret_val = mbx->ops.check_for_rst(hw, mbx_id); + + return ret_val; +} + +/** + * e1000_poll_for_msg - Wait for message notification + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to write + * + * returns SUCCESS if it successfully received a message notification + **/ +static s32 e1000_poll_for_msg(struct e1000_hw *hw, u16 mbx_id) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + int countdown = mbx->timeout; + + DEBUGFUNC("e1000_poll_for_msg"); + + if (!countdown || !mbx->ops.check_for_msg) + goto out; + + while (countdown && mbx->ops.check_for_msg(hw, mbx_id)) { + countdown--; + if (!countdown) + break; + usec_delay(mbx->usec_delay); + } + + /* if we failed, all future posted messages fail until reset */ + if (!countdown) + mbx->timeout = 0; +out: + return countdown ? E1000_SUCCESS : -E1000_ERR_MBX; +} + +/** + * e1000_poll_for_ack - Wait for message acknowledgement + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to write + * + * returns SUCCESS if it successfully received a message acknowledgement + **/ +static s32 e1000_poll_for_ack(struct e1000_hw *hw, u16 mbx_id) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + int countdown = mbx->timeout; + + DEBUGFUNC("e1000_poll_for_ack"); + + if (!countdown || !mbx->ops.check_for_ack) + goto out; + + while (countdown && mbx->ops.check_for_ack(hw, mbx_id)) { + countdown--; + if (!countdown) + break; + usec_delay(mbx->usec_delay); + } + + /* if we failed, all future posted messages fail until reset */ + if (!countdown) + mbx->timeout = 0; +out: + return countdown ? E1000_SUCCESS : -E1000_ERR_MBX; +} + +/** + * e1000_read_posted_mbx - Wait for message notification and receive message + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to write + * + * returns SUCCESS if it successfully received a message notification and + * copied it into the receive buffer. + **/ +s32 e1000_read_posted_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_read_posted_mbx"); + + if (!mbx->ops.read) + goto out; + + ret_val = e1000_poll_for_msg(hw, mbx_id); + + /* if ack received read message, otherwise we timed out */ + if (!ret_val) + ret_val = mbx->ops.read(hw, msg, size, mbx_id); +out: + return ret_val; +} + +/** + * e1000_write_posted_mbx - Write a message to the mailbox, wait for ack + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to write + * + * returns SUCCESS if it successfully copied message into the buffer and + * received an ack to that message within delay * timeout period + **/ +s32 e1000_write_posted_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_write_posted_mbx"); + + /* exit if either we can't write or there isn't a defined timeout */ + if (!mbx->ops.write || !mbx->timeout) + goto out; + + /* send msg */ + ret_val = mbx->ops.write(hw, msg, size, mbx_id); + + /* if msg sent wait until we receive an ack */ + if (!ret_val) + ret_val = e1000_poll_for_ack(hw, mbx_id); +out: + return ret_val; +} + +/** + * e1000_init_mbx_ops_generic - Initialize mbx function pointers + * @hw: pointer to the HW structure + * + * Sets the function pointers to no-op functions + **/ +void e1000_init_mbx_ops_generic(struct e1000_hw *hw) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + mbx->ops.init_params = e1000_null_ops_generic; + mbx->ops.read = e1000_null_mbx_transact; + mbx->ops.write = e1000_null_mbx_transact; + mbx->ops.check_for_msg = e1000_null_mbx_check_for_flag; + mbx->ops.check_for_ack = e1000_null_mbx_check_for_flag; + mbx->ops.check_for_rst = e1000_null_mbx_check_for_flag; + mbx->ops.read_posted = e1000_read_posted_mbx; + mbx->ops.write_posted = e1000_write_posted_mbx; +} + +/** + * e1000_read_v2p_mailbox - read v2p mailbox + * @hw: pointer to the HW structure + * + * This function is used to read the v2p mailbox without losing the read to + * clear status bits. + **/ +static u32 e1000_read_v2p_mailbox(struct e1000_hw *hw) +{ + u32 v2p_mailbox = E1000_READ_REG(hw, E1000_V2PMAILBOX(0)); + + v2p_mailbox |= hw->dev_spec.vf.v2p_mailbox; + hw->dev_spec.vf.v2p_mailbox |= v2p_mailbox & E1000_V2PMAILBOX_R2C_BITS; + + return v2p_mailbox; +} + +/** + * e1000_check_for_bit_vf - Determine if a status bit was set + * @hw: pointer to the HW structure + * @mask: bitmask for bits to be tested and cleared + * + * This function is used to check for the read to clear bits within + * the V2P mailbox. + **/ +static s32 e1000_check_for_bit_vf(struct e1000_hw *hw, u32 mask) +{ + u32 v2p_mailbox = e1000_read_v2p_mailbox(hw); + s32 ret_val = -E1000_ERR_MBX; + + if (v2p_mailbox & mask) + ret_val = E1000_SUCCESS; + + hw->dev_spec.vf.v2p_mailbox &= ~mask; + + return ret_val; +} + +/** + * e1000_check_for_msg_vf - checks to see if the PF has sent mail + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to check + * + * returns SUCCESS if the PF has set the Status bit or else ERR_MBX + **/ +static s32 e1000_check_for_msg_vf(struct e1000_hw *hw, u16 mbx_id) +{ + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_check_for_msg_vf"); + + if (!e1000_check_for_bit_vf(hw, E1000_V2PMAILBOX_PFSTS)) { + ret_val = E1000_SUCCESS; + hw->mbx.stats.reqs++; + } + + return ret_val; +} + +/** + * e1000_check_for_ack_vf - checks to see if the PF has ACK'd + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to check + * + * returns SUCCESS if the PF has set the ACK bit or else ERR_MBX + **/ +static s32 e1000_check_for_ack_vf(struct e1000_hw *hw, u16 mbx_id) +{ + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_check_for_ack_vf"); + + if (!e1000_check_for_bit_vf(hw, E1000_V2PMAILBOX_PFACK)) { + ret_val = E1000_SUCCESS; + hw->mbx.stats.acks++; + } + + return ret_val; +} + +/** + * e1000_check_for_rst_vf - checks to see if the PF has reset + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to check + * + * returns TRUE if the PF has set the reset done bit or else FALSE + **/ +static s32 e1000_check_for_rst_vf(struct e1000_hw *hw, u16 mbx_id) +{ + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_check_for_rst_vf"); + + if (!e1000_check_for_bit_vf(hw, (E1000_V2PMAILBOX_RSTD | + E1000_V2PMAILBOX_RSTI))) { + ret_val = E1000_SUCCESS; + hw->mbx.stats.rsts++; + } + + return ret_val; +} + +/** + * e1000_obtain_mbx_lock_vf - obtain mailbox lock + * @hw: pointer to the HW structure + * + * return SUCCESS if we obtained the mailbox lock + **/ +static s32 e1000_obtain_mbx_lock_vf(struct e1000_hw *hw) +{ + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_obtain_mbx_lock_vf"); + + /* Take ownership of the buffer */ + E1000_WRITE_REG(hw, E1000_V2PMAILBOX(0), E1000_V2PMAILBOX_VFU); + + /* reserve mailbox for vf use */ + if (e1000_read_v2p_mailbox(hw) & E1000_V2PMAILBOX_VFU) + ret_val = E1000_SUCCESS; + + return ret_val; +} + +/** + * e1000_write_mbx_vf - Write a message to the mailbox + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to write + * + * returns SUCCESS if it successfully copied message into the buffer + **/ +static s32 e1000_write_mbx_vf(struct e1000_hw *hw, u32 *msg, u16 size, + u16 mbx_id) +{ + s32 ret_val; + u16 i; + + + DEBUGFUNC("e1000_write_mbx_vf"); + + /* lock the mailbox to prevent pf/vf race condition */ + ret_val = e1000_obtain_mbx_lock_vf(hw); + if (ret_val) + goto out_no_write; + + /* flush msg and acks as we are overwriting the message buffer */ + e1000_check_for_msg_vf(hw, 0); + e1000_check_for_ack_vf(hw, 0); + + /* copy the caller specified message to the mailbox memory buffer */ + for (i = 0; i < size; i++) + E1000_WRITE_REG_ARRAY(hw, E1000_VMBMEM(0), i, msg[i]); + + /* update stats */ + hw->mbx.stats.msgs_tx++; + + /* Drop VFU and interrupt the PF to tell it a message has been sent */ + E1000_WRITE_REG(hw, E1000_V2PMAILBOX(0), E1000_V2PMAILBOX_REQ); + +out_no_write: + return ret_val; +} + +/** + * e1000_read_mbx_vf - Reads a message from the inbox intended for vf + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to read + * + * returns SUCCESS if it successfuly read message from buffer + **/ +static s32 e1000_read_mbx_vf(struct e1000_hw *hw, u32 *msg, u16 size, + u16 mbx_id) +{ + s32 ret_val = E1000_SUCCESS; + u16 i; + + DEBUGFUNC("e1000_read_mbx_vf"); + + /* lock the mailbox to prevent pf/vf race condition */ + ret_val = e1000_obtain_mbx_lock_vf(hw); + if (ret_val) + goto out_no_read; + + /* copy the message from the mailbox memory buffer */ + for (i = 0; i < size; i++) + msg[i] = E1000_READ_REG_ARRAY(hw, E1000_VMBMEM(0), i); + + /* Acknowledge receipt and release mailbox, then we're done */ + E1000_WRITE_REG(hw, E1000_V2PMAILBOX(0), E1000_V2PMAILBOX_ACK); + + /* update stats */ + hw->mbx.stats.msgs_rx++; + +out_no_read: + return ret_val; +} + +/** + * e1000_init_mbx_params_vf - set initial values for vf mailbox + * @hw: pointer to the HW structure + * + * Initializes the hw->mbx struct to correct values for vf mailbox + */ +s32 e1000_init_mbx_params_vf(struct e1000_hw *hw) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + + /* start mailbox as timed out and let the reset_hw call set the timeout + * value to begin communications */ + mbx->timeout = 0; + mbx->usec_delay = E1000_VF_MBX_INIT_DELAY; + + mbx->size = E1000_VFMAILBOX_SIZE; + + mbx->ops.read = e1000_read_mbx_vf; + mbx->ops.write = e1000_write_mbx_vf; + mbx->ops.read_posted = e1000_read_posted_mbx; + mbx->ops.write_posted = e1000_write_posted_mbx; + mbx->ops.check_for_msg = e1000_check_for_msg_vf; + mbx->ops.check_for_ack = e1000_check_for_ack_vf; + mbx->ops.check_for_rst = e1000_check_for_rst_vf; + + mbx->stats.msgs_tx = 0; + mbx->stats.msgs_rx = 0; + mbx->stats.reqs = 0; + mbx->stats.acks = 0; + mbx->stats.rsts = 0; + + return E1000_SUCCESS; +} + +static s32 e1000_check_for_bit_pf(struct e1000_hw *hw, u32 mask) +{ + u32 mbvficr = E1000_READ_REG(hw, E1000_MBVFICR); + s32 ret_val = -E1000_ERR_MBX; + + if (mbvficr & mask) { + ret_val = E1000_SUCCESS; + E1000_WRITE_REG(hw, E1000_MBVFICR, mask); + } + + return ret_val; +} + +/** + * e1000_check_for_msg_pf - checks to see if the VF has sent mail + * @hw: pointer to the HW structure + * @vf_number: the VF index + * + * returns SUCCESS if the VF has set the Status bit or else ERR_MBX + **/ +static s32 e1000_check_for_msg_pf(struct e1000_hw *hw, u16 vf_number) +{ + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_check_for_msg_pf"); + + if (!e1000_check_for_bit_pf(hw, E1000_MBVFICR_VFREQ_VF1 << vf_number)) { + ret_val = E1000_SUCCESS; + hw->mbx.stats.reqs++; + } + + return ret_val; +} + +/** + * e1000_check_for_ack_pf - checks to see if the VF has ACKed + * @hw: pointer to the HW structure + * @vf_number: the VF index + * + * returns SUCCESS if the VF has set the Status bit or else ERR_MBX + **/ +static s32 e1000_check_for_ack_pf(struct e1000_hw *hw, u16 vf_number) +{ + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_check_for_ack_pf"); + + if (!e1000_check_for_bit_pf(hw, E1000_MBVFICR_VFACK_VF1 << vf_number)) { + ret_val = E1000_SUCCESS; + hw->mbx.stats.acks++; + } + + return ret_val; +} + +/** + * e1000_check_for_rst_pf - checks to see if the VF has reset + * @hw: pointer to the HW structure + * @vf_number: the VF index + * + * returns SUCCESS if the VF has set the Status bit or else ERR_MBX + **/ +static s32 e1000_check_for_rst_pf(struct e1000_hw *hw, u16 vf_number) +{ + u32 vflre = E1000_READ_REG(hw, E1000_VFLRE); + s32 ret_val = -E1000_ERR_MBX; + + DEBUGFUNC("e1000_check_for_rst_pf"); + + if (vflre & (1 << vf_number)) { + ret_val = E1000_SUCCESS; + E1000_WRITE_REG(hw, E1000_VFLRE, (1 << vf_number)); + hw->mbx.stats.rsts++; + } + + return ret_val; +} + +/** + * e1000_obtain_mbx_lock_pf - obtain mailbox lock + * @hw: pointer to the HW structure + * @vf_number: the VF index + * + * return SUCCESS if we obtained the mailbox lock + **/ +static s32 e1000_obtain_mbx_lock_pf(struct e1000_hw *hw, u16 vf_number) +{ + s32 ret_val = -E1000_ERR_MBX; + u32 p2v_mailbox; + + DEBUGFUNC("e1000_obtain_mbx_lock_pf"); + + /* Take ownership of the buffer */ + E1000_WRITE_REG(hw, E1000_P2VMAILBOX(vf_number), E1000_P2VMAILBOX_PFU); + + /* reserve mailbox for vf use */ + p2v_mailbox = E1000_READ_REG(hw, E1000_P2VMAILBOX(vf_number)); + if (p2v_mailbox & E1000_P2VMAILBOX_PFU) + ret_val = E1000_SUCCESS; + + return ret_val; +} + +/** + * e1000_write_mbx_pf - Places a message in the mailbox + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @vf_number: the VF index + * + * returns SUCCESS if it successfully copied message into the buffer + **/ +static s32 e1000_write_mbx_pf(struct e1000_hw *hw, u32 *msg, u16 size, + u16 vf_number) +{ + s32 ret_val; + u16 i; + + DEBUGFUNC("e1000_write_mbx_pf"); + + /* lock the mailbox to prevent pf/vf race condition */ + ret_val = e1000_obtain_mbx_lock_pf(hw, vf_number); + if (ret_val) + goto out_no_write; + + /* flush msg and acks as we are overwriting the message buffer */ + e1000_check_for_msg_pf(hw, vf_number); + e1000_check_for_ack_pf(hw, vf_number); + + /* copy the caller specified message to the mailbox memory buffer */ + for (i = 0; i < size; i++) + E1000_WRITE_REG_ARRAY(hw, E1000_VMBMEM(vf_number), i, msg[i]); + + /* Interrupt VF to tell it a message has been sent and release buffer*/ + E1000_WRITE_REG(hw, E1000_P2VMAILBOX(vf_number), E1000_P2VMAILBOX_STS); + + /* update stats */ + hw->mbx.stats.msgs_tx++; + +out_no_write: + return ret_val; + +} + +/** + * e1000_read_mbx_pf - Read a message from the mailbox + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @vf_number: the VF index + * + * This function copies a message from the mailbox buffer to the caller's + * memory buffer. The presumption is that the caller knows that there was + * a message due to a VF request so no polling for message is needed. + **/ +static s32 e1000_read_mbx_pf(struct e1000_hw *hw, u32 *msg, u16 size, + u16 vf_number) +{ + s32 ret_val; + u16 i; + + DEBUGFUNC("e1000_read_mbx_pf"); + + /* lock the mailbox to prevent pf/vf race condition */ + ret_val = e1000_obtain_mbx_lock_pf(hw, vf_number); + if (ret_val) + goto out_no_read; + + /* copy the message to the mailbox memory buffer */ + for (i = 0; i < size; i++) + msg[i] = E1000_READ_REG_ARRAY(hw, E1000_VMBMEM(vf_number), i); + + /* Acknowledge the message and release buffer */ + E1000_WRITE_REG(hw, E1000_P2VMAILBOX(vf_number), E1000_P2VMAILBOX_ACK); + + /* update stats */ + hw->mbx.stats.msgs_rx++; + +out_no_read: + return ret_val; +} + +/** + * e1000_init_mbx_params_pf - set initial values for pf mailbox + * @hw: pointer to the HW structure + * + * Initializes the hw->mbx struct to correct values for pf mailbox + */ +s32 e1000_init_mbx_params_pf(struct e1000_hw *hw) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + + if (hw->mac.type == e1000_82576) { + mbx->timeout = 0; + mbx->usec_delay = 0; + + mbx->size = E1000_VFMAILBOX_SIZE; + + mbx->ops.read = e1000_read_mbx_pf; + mbx->ops.write = e1000_write_mbx_pf; + mbx->ops.read_posted = e1000_read_posted_mbx; + mbx->ops.write_posted = e1000_write_posted_mbx; + mbx->ops.check_for_msg = e1000_check_for_msg_pf; + mbx->ops.check_for_ack = e1000_check_for_ack_pf; + mbx->ops.check_for_rst = e1000_check_for_rst_pf; + + mbx->stats.msgs_tx = 0; + mbx->stats.msgs_rx = 0; + mbx->stats.reqs = 0; + mbx->stats.acks = 0; + mbx->stats.rsts = 0; + } + + return E1000_SUCCESS; +} + Added: head/sys/dev/e1000/e1000_mbx.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/e1000/e1000_mbx.h Wed Jun 30 21:05:51 2010 (r209616) @@ -0,0 +1,106 @@ +/****************************************************************************** + + Copyright (c) 2001-2010, Intel Corporation *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 21:43:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B32BA1065673; Wed, 30 Jun 2010 21:43:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 83A798FC21; Wed, 30 Jun 2010 21:43:45 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 334C746B17; Wed, 30 Jun 2010 17:43:45 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 425238A03C; Wed, 30 Jun 2010 17:43:34 -0400 (EDT) From: John Baldwin To: Jack F Vogel Date: Wed, 30 Jun 2010 17:39:18 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201006301628.o5UGSS3B098954@svn.freebsd.org> In-Reply-To: <201006301628.o5UGSS3B098954@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201006301739.18212.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 30 Jun 2010 17:43:34 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209609 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 21:43:45 -0000 On Wednesday 30 June 2010 12:28:28 pm Jack F Vogel wrote: > Author: jfv > Date: Wed Jun 30 16:28:28 2010 > New Revision: 209609 > URL: http://svn.freebsd.org/changeset/base/209609 > > Log: > Left out header change in last delta - new member > in adapter so that advertise changes can be done > to one port without the other changing. Should 209607 be reverted now? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 21:50:03 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 779DD106564A; Wed, 30 Jun 2010 21:50:03 +0000 (UTC) (envelope-from julian@elischer.org) Received: from out-0.mx.aerioconnect.net (outv.internet-mail-service.net [216.240.47.245]) by mx1.freebsd.org (Postfix) with ESMTP id 50EE68FC0A; Wed, 30 Jun 2010 21:50:03 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id o5ULo2WP010539; Wed, 30 Jun 2010 14:50:02 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 1E2DC2D601B; Wed, 30 Jun 2010 14:50:00 -0700 (PDT) Message-ID: <4C2BBC1F.6020405@elischer.org> Date: Wed, 30 Jun 2010 14:50:23 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Jack F Vogel References: <201006301726.o5UHQl7n011935@svn.freebsd.org> In-Reply-To: <201006301726.o5UHQl7n011935@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209611 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 21:50:03 -0000 On 6/30/10 10:26 AM, Jack F Vogel wrote: > Author: jfv > Date: Wed Jun 30 17:26:47 2010 > New Revision: 209611 > URL: http://svn.freebsd.org/changeset/base/209611 > > Log: > SR-IOV support added to igb > > What this provides is support for the 'virtual function' > interface that a FreeBSD VM may be assigned from a host > like KVM on Linux, or newer versions of Xen with such > support. > > When the guest is set up with the capability, a special > limited function 82576 PCI device is present in its virtual > PCI space, so with this driver installed in the guest that > device will be detected and function nearly like the bare > metal, as it were. > > The interface is only allowed a single queue in this configuration > however initial performance tests have looked very good. > > Enjoy!! > do these extra devices turn up in a standard ifconfig output? in other words, can we assign them to jails using vimage? From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 22:04:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4D59106566B; Wed, 30 Jun 2010 22:04:04 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4FAC58FC0C; Wed, 30 Jun 2010 22:04:04 +0000 (UTC) Received: by gxk7 with SMTP id 7so940931gxk.13 for ; Wed, 30 Jun 2010 15:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=bz+J2qHEs/Ia1qR3nSjNFsusywLPWOkbVEtMVbjzhAQ=; b=Xu0wbP8Ez7fMoXRSu//6zktXUyOjj1jgl0u431GdsipXb12bdj+TWWXvl0f8g6LIey veORqkgAj5B5Lf44iYu+mr7yL7KLIVfyeQT2KgvAloxYP51oUhk17MqS+7a1kd3IsVUO IkFRlBaTCstOM1P4ZxXXvd+WYbAf126tOH2vo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=V4eA5p8d8E2PF0Sq372YS2Y/dT8dqvTAdKqG8YCj964f1kLnaqs9qXyAlm9XQo1VhF UK8Xpnk7pq1VIushQjeiztHgEc080FAMiucX6t6R6rptWYHxoJ9rDNMgm2Ae0x+7EYMR El3mzCVfDWAyvwJIMoHAmD0h5ijeb7rwo85n4= MIME-Version: 1.0 Received: by 10.229.91.196 with SMTP id o4mr5519254qcm.267.1277935440807; Wed, 30 Jun 2010 15:04:00 -0700 (PDT) Received: by 10.229.250.197 with HTTP; Wed, 30 Jun 2010 15:04:00 -0700 (PDT) In-Reply-To: <201006301739.18212.jhb@freebsd.org> References: <201006301628.o5UGSS3B098954@svn.freebsd.org> <201006301739.18212.jhb@freebsd.org> Date: Wed, 30 Jun 2010 15:04:00 -0700 Message-ID: From: Jack Vogel To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Jack F Vogel , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209609 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 22:04:05 -0000 It wont work as a delta, I figured just putting the new delta over it was ok, but if you think it should be reverted then by all means... Jack On Wed, Jun 30, 2010 at 2:39 PM, John Baldwin wrote: > On Wednesday 30 June 2010 12:28:28 pm Jack F Vogel wrote: > > Author: jfv > > Date: Wed Jun 30 16:28:28 2010 > > New Revision: 209609 > > URL: http://svn.freebsd.org/changeset/base/209609 > > > > Log: > > Left out header change in last delta - new member > > in adapter so that advertise changes can be done > > to one port without the other changing. > > Should 209607 be reverted now? > > -- > John Baldwin > From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 22:13:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B163E1065677; Wed, 30 Jun 2010 22:13:24 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2E8B88FC2D; Wed, 30 Jun 2010 22:13:23 +0000 (UTC) Received: by gxk7 with SMTP id 7so946229gxk.13 for ; Wed, 30 Jun 2010 15:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=XIJRx51XeTiBO+J3ieTjTss4KVLdApG6ODJRjYywt6U=; b=v0DdBNyvkXwI5BQeCqykUu/mSJFTOdFfkrd2DSOqmGXszxkxItbE9D0AtiecupzSpP LWPqi+k6nShMhX1EmBMtILs8TPNiH+Ck5Yfsw3kTVRJu9zODfS+5AqRj2ftq/6KIoQ5a h+B6LeXhsQnQ/nlxnWcJQa11QFaQfUN7pf1Ck= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=AY3jVN46Ba3j5aEMSei8B0BuZeX2X+DK4TeyQ0sUbbEF/pZvIzPrxK2lIg6Ov1kVUo +h2MMPLqAFozFRdDd8WH7iI7Gg2c3jHgjGH4dXklOfXEGD9qwzFQrxpjun1TXULmOIFA rH8I00+cpIrAuaR8webpmC3Hh5yD4dqUhzo10= MIME-Version: 1.0 Received: by 10.229.185.19 with SMTP id cm19mr5604826qcb.249.1277935999212; Wed, 30 Jun 2010 15:13:19 -0700 (PDT) Received: by 10.229.250.197 with HTTP; Wed, 30 Jun 2010 15:13:19 -0700 (PDT) In-Reply-To: <4C2BBC1F.6020405@elischer.org> References: <201006301726.o5UHQl7n011935@svn.freebsd.org> <4C2BBC1F.6020405@elischer.org> Date: Wed, 30 Jun 2010 15:13:19 -0700 Message-ID: From: Jack Vogel To: Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Jack F Vogel , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209611 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 22:13:24 -0000 On Wed, Jun 30, 2010 at 2:50 PM, Julian Elischer wrote: > On 6/30/10 10:26 AM, Jack F Vogel wrote: > >> Author: jfv >> Date: Wed Jun 30 17:26:47 2010 >> New Revision: 209611 >> URL: http://svn.freebsd.org/changeset/base/209611 >> >> Log: >> SR-IOV support added to igb >> >> What this provides is support for the 'virtual function' >> interface that a FreeBSD VM may be assigned from a host >> like KVM on Linux, or newer versions of Xen with such >> support. >> >> When the guest is set up with the capability, a special >> limited function 82576 PCI device is present in its virtual >> PCI space, so with this driver installed in the guest that >> device will be detected and function nearly like the bare >> metal, as it were. >> >> The interface is only allowed a single queue in this configuration >> however initial performance tests have looked very good. >> >> Enjoy!! >> >> > do these extra devices turn up in a standard ifconfig output? > in other words, can we assign them to jails using vimage? > > They only show up if configured in the PF host, for instance if using Linux and KVM (I did develop and test with Fedora 13) you must load the igb driver there specifying that you want vf's created and how many. Next in the management of the guest you need to assign one of these vf devices to the guest. After you do all that and load this igb driver then yes, it will look just like a standard igbX device. Not sure if I understand your question, did any of that help? If you mean can FreeBSD make multiple VF's and then manage them with jails, no, that would be to have PF support, and to do that I need SRIOV support in the kernel/pci subsystem. Now, if someone were interested in actually doing that then I'd be happy to implement the full PF/VF capability the way Linux has, but that's a bigger lift. Just let me know if we want to go in that direction. Jack From owner-svn-src-all@FreeBSD.ORG Wed Jun 30 22:29:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADDF61065670; Wed, 30 Jun 2010 22:29:02 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CE4D8FC1A; Wed, 30 Jun 2010 22:29:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5UMT2wO078679; Wed, 30 Jun 2010 22:29:02 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5UMT2Jp078677; Wed, 30 Jun 2010 22:29:02 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201006302229.o5UMT2Jp078677@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 30 Jun 2010 22:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209617 - head/sys/ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 22:29:02 -0000 Author: marcel Date: Wed Jun 30 22:29:02 2010 New Revision: 209617 URL: http://svn.freebsd.org/changeset/base/209617 Log: While functions are ideally aligned to a 32-byte boundary, don't assume this to be the case. Modified: head/sys/ia64/include/profile.h Modified: head/sys/ia64/include/profile.h ============================================================================== --- head/sys/ia64/include/profile.h Wed Jun 30 21:05:51 2010 (r209616) +++ head/sys/ia64/include/profile.h Wed Jun 30 22:29:02 2010 (r209617) @@ -32,7 +32,7 @@ #define _MCOUNT_DECL void __mcount #define MCOUNT -#define FUNCTION_ALIGNMENT 32 +#define FUNCTION_ALIGNMENT 16 typedef unsigned long fptrdiff_t; From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 00:30:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC583106564A; Thu, 1 Jul 2010 00:30:35 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB1938FC19; Thu, 1 Jul 2010 00:30: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 o610UZgb005771; Thu, 1 Jul 2010 00:30:35 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o610UZth005769; Thu, 1 Jul 2010 00:30:35 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201007010030.o610UZth005769@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 1 Jul 2010 00:30:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209618 - head/sys/ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 00:30:36 -0000 Author: marcel Date: Thu Jul 1 00:30:35 2010 New Revision: 209618 URL: http://svn.freebsd.org/changeset/base/209618 Log: When compiling with profiling, we define PROF for userspace and GPROF for the kernel. Modified: head/sys/ia64/include/asm.h Modified: head/sys/ia64/include/asm.h ============================================================================== --- head/sys/ia64/include/asm.h Wed Jun 30 22:29:02 2010 (r209617) +++ head/sys/ia64/include/asm.h Thu Jul 1 00:30:35 2010 (r209618) @@ -43,7 +43,7 @@ /* * MCOUNT */ -#if defined(GPROF) +#if defined(PROF) || (defined(_KERNEL) && defined(GPROF)) #define MCOUNT \ alloc out0 = ar.pfs, 8, 0, 4, 0; \ mov out1 = r1; \ From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 00:33:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A86D106564A; Thu, 1 Jul 2010 00:33:50 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 596B38FC13; Thu, 1 Jul 2010 00:33:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o610XovQ006507; Thu, 1 Jul 2010 00:33:50 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o610Xo0x006505; Thu, 1 Jul 2010 00:33:50 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201007010033.o610Xo0x006505@svn.freebsd.org> From: Weongyo Jeong Date: Thu, 1 Jul 2010 00:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209619 - 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: Thu, 01 Jul 2010 00:33:50 -0000 Author: weongyo Date: Thu Jul 1 00:33:50 2010 New Revision: 209619 URL: http://svn.freebsd.org/changeset/base/209619 Log: Adds `Dell Truemobile 1300' to the supported list. Submitted by: Warren Block Modified: head/share/man/man4/bwi.4 Modified: head/share/man/man4/bwi.4 ============================================================================== --- head/share/man/man4/bwi.4 Thu Jul 1 00:30:35 2010 (r209618) +++ head/share/man/man4/bwi.4 Thu Jul 1 00:33:50 2010 (r209619) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2009 +.Dd June 30, 2009 .Dt BWI 4 .Os .Sh NAME @@ -82,6 +82,7 @@ driver supports Broadcom BCM43xx based w .It "Buffalo WLI-PCI-G54S BCM4306 PCI b/g" .It "Compaq R4035 onboard BCM4306 PCI b/g" .It "Dell Wireless 1470 BCM4318 Mini PCI b/g" +.It "Dell Truemobile 1300 r2 BCM4306 Mini PCI b/g" .It "Dell Truemobile 1400 BCM4309 Mini PCI b/g" .It "HP nx6125 BCM4319 PCI b/g" .It "Linksys WPC54G Ver 3 BCM4318 CardBus b/g" From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 00:48:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43681065670; Thu, 1 Jul 2010 00:48:00 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B30218FC08; Thu, 1 Jul 2010 00:48:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o610m0JF009654; Thu, 1 Jul 2010 00:48:00 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o610m06K009652; Thu, 1 Jul 2010 00:48:00 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201007010048.o610m06K009652@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 1 Jul 2010 00:48: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: r209620 - head/lib/libc/gmon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Jul 2010 00:48:00 -0000 Author: marcel Date: Thu Jul 1 00:48:00 2010 New Revision: 209620 URL: http://svn.freebsd.org/changeset/base/209620 Log: Simplify the calculation of s_scale by rewriting the FP expression to use uintmax_t instead of float and thereby eliminating the need for a non-FP version. Tested on: amd64, ia64 & powerpc (book-E) Suggested by: bde MFC after: 1 month Modified: head/lib/libc/gmon/gmon.c Modified: head/lib/libc/gmon/gmon.c ============================================================================== --- head/lib/libc/gmon/gmon.c Thu Jul 1 00:33:50 2010 (r209619) +++ head/lib/libc/gmon/gmon.c Thu Jul 1 00:48:00 2010 (r209620) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -58,8 +59,8 @@ extern char *minbrk __asm ("minbrk"); struct gmonparam _gmonparam = { GMON_PROF_OFF }; static int s_scale; -/* see profil(2) where this is describe (incorrectly) */ -#define SCALE_1_TO_1 0x10000L +/* See profil(2) where this is described (incorrectly). */ +#define SCALE_SHIFT 16 #define ERR(s) _write(2, s, sizeof(s)) @@ -110,24 +111,8 @@ monstartup(lowpc, highpc) p->tos[0].link = 0; o = p->highpc - p->lowpc; - if (p->kcountsize < o) { -#if !defined(__powerpc__) - s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1; -#else /* avoid floating point */ - int quot = o / p->kcountsize; - - if (quot >= 0x10000) - s_scale = 1; - else if (quot >= 0x100) - s_scale = 0x10000 / quot; - else if (o >= 0x800000) - s_scale = 0x1000000 / (o / (p->kcountsize >> 8)); - else - s_scale = 0x1000000 / ((o << 8) / p->kcountsize); -#endif - } else - s_scale = SCALE_1_TO_1; - + s_scale = (p->kcountsize < o) ? + ((uintmax_t)p->kcountsize << SCALE_SHIFT) / o : (1 << SCALE_SHIFT); moncontrol(1); } From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 03:48:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1753106564A; Thu, 1 Jul 2010 03:48:45 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B15628FC08; Thu, 1 Jul 2010 03:48: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 o613mjOW049655; Thu, 1 Jul 2010 03:48:45 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o613mjLW049654; Thu, 1 Jul 2010 03:48:45 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201007010348.o613mjLW049654@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 1 Jul 2010 03:48: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: r209621 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 03:48:45 -0000 Author: marcel Date: Thu Jul 1 03:48:45 2010 New Revision: 209621 URL: http://svn.freebsd.org/changeset/base/209621 Log: MFia64: When compiling with profiling, we define PROF for userspace and GPROF for the kernel. Modified: head/sys/powerpc/include/asm.h Modified: head/sys/powerpc/include/asm.h ============================================================================== --- head/sys/powerpc/include/asm.h Thu Jul 1 00:48:00 2010 (r209620) +++ head/sys/powerpc/include/asm.h Thu Jul 1 03:48:45 2010 (r209621) @@ -63,7 +63,7 @@ #define _ENTRY(x) \ .text; .align 4; .globl x; .type x,@function; x: -#ifdef PROF +#if defined(PROF) || (defined(_KERNEL) && defined(GPROF)) # define _PROF_PROLOGUE mflr 0; stw 0,4(1); bl _mcount #else # define _PROF_PROLOGUE From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 05:03:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BCDB106601A; Thu, 1 Jul 2010 05:03:24 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6318E8FC18; Thu, 1 Jul 2010 05:03: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 o6153ONV066278; Thu, 1 Jul 2010 05:03:24 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6153O78066276; Thu, 1 Jul 2010 05:03:24 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201007010503.o6153O78066276@svn.freebsd.org> From: Kevin Lo Date: Thu, 1 Jul 2010 05:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209622 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 05:03:24 -0000 Author: kevlo Date: Thu Jul 1 05:03:24 2010 New Revision: 209622 URL: http://svn.freebsd.org/changeset/base/209622 Log: Fix build Modified: head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Thu Jul 1 03:48:45 2010 (r209621) +++ head/sys/dev/ixgbe/ixgbe.h Thu Jul 1 05:03:24 2010 (r209622) @@ -382,7 +382,6 @@ struct adapter { u32 link_speed; bool link_up; u32 linkvec; - int advertise; /* Mbuf cluster size */ u32 rx_mbuf_sz; From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 05:09:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E9871065B4C; Thu, 1 Jul 2010 05:09:36 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id CC6718FC14; Thu, 1 Jul 2010 05:09:35 +0000 (UTC) Received: by qyk32 with SMTP id 32so449980qyk.13 for ; Wed, 30 Jun 2010 22:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=tH6rSZtLw0Lvva9JDzCqh6WvI0s/5UVTSGS6IOc+IrE=; b=PeYNh2+dni3mZKa6UDJZFw80/A9NRGjwRzelcYw3unpVR5tYHSrKcKkLjrZUBQvvoY eghWfp93l3MLIiFbzFCeH2MevY70TfYDcDfL9UDAMzBvlcBK2Q/TEqcwcbah/+a/XkgW jUqTxUyzmJ+SIzoCwaCGfocX1G8P2MgWAYRS0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Z/Fq5Zo6W8iJy6rxrQ42MOP8fxCYwzx5dPrBuN6iCIRgSiMBlN5o4w0KuwUO5ssxQr gNPFwAjo8WPklTlxzQE/esboICcEhcbo5khLcSpie9ZDnib2+mmXI68Sky5jYhTvX88I sjjvgkuEwDCUWl4J2Sy4KyRKg8yjIj9xxBqvM= MIME-Version: 1.0 Received: by 10.224.79.147 with SMTP id p19mr7033349qak.88.1277960963024; Wed, 30 Jun 2010 22:09:23 -0700 (PDT) Received: by 10.229.250.197 with HTTP; Wed, 30 Jun 2010 22:09:22 -0700 (PDT) In-Reply-To: <201007010503.o6153O78066276@svn.freebsd.org> References: <201007010503.o6153O78066276@svn.freebsd.org> Date: Wed, 30 Jun 2010 22:09:22 -0700 Message-ID: From: Jack Vogel To: Kevin Lo Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209622 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 05:09:42 -0000 I went to a LOT of trouble setting up a mirror at home and just as I went to commit the change its updated. While I understand the good intentions, please don't do this again. If I had been unresponsive for days or something I understand, but its been hours, and I was fixing it. Jack On Wed, Jun 30, 2010 at 10:03 PM, Kevin Lo wrote: > Author: kevlo > Date: Thu Jul 1 05:03:24 2010 > New Revision: 209622 > URL: http://svn.freebsd.org/changeset/base/209622 > > Log: > Fix build > > Modified: > head/sys/dev/ixgbe/ixgbe.h > > Modified: head/sys/dev/ixgbe/ixgbe.h > > ============================================================================== > --- head/sys/dev/ixgbe/ixgbe.h Thu Jul 1 03:48:45 2010 (r209621) > +++ head/sys/dev/ixgbe/ixgbe.h Thu Jul 1 05:03:24 2010 (r209622) > @@ -382,7 +382,6 @@ struct adapter { > u32 link_speed; > bool link_up; > u32 linkvec; > - int advertise; > > /* Mbuf cluster size */ > u32 rx_mbuf_sz; > From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 07:38:17 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EE6D106564A; Thu, 1 Jul 2010 07:38:17 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 1FF948FC0A; Thu, 1 Jul 2010 07:38:16 +0000 (UTC) Received: from [127.0.0.1] (kevlo@kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.3/8.14.3) with ESMTP id o617MCRc017034; Thu, 1 Jul 2010 15:22:13 +0800 (CST) From: Kevin Lo To: Jack Vogel In-Reply-To: References: <201007010503.o6153O78066276@svn.freebsd.org> Content-Type: text/plain; charset="UTF-8" Date: Thu, 01 Jul 2010 15:22:12 +0800 Message-ID: <1277968932.2050.37.camel@nsl> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Kevin Lo , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209622 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 07:38:17 -0000 Jack, This is YOUR problem. First, you committed the code without testing, glebius@ fixed it after 17 hours. Second, you didn't bring your working copy into sync with the latest revision in the repository and didn't notice build broken was fixed. I just updated the source and recompiled kernel, found there's broken on ixgbe(4). Since the fix is trivial, so I fixed it and wanted to test something with the latest kernel. Kevin Jack Vogel wrote: > I went to a LOT of trouble setting up a mirror at home and just as I > went to commit > the change its updated. > > While I understand the good intentions, please don't do this again. If > I had been > unresponsive for days or something I understand, but its been hours, > and I was > fixing it. > > Jack > > > On Wed, Jun 30, 2010 at 10:03 PM, Kevin Lo wrote: > Author: kevlo > Date: Thu Jul 1 05:03:24 2010 > New Revision: 209622 > URL: http://svn.freebsd.org/changeset/base/209622 > > Log: > Fix build > > Modified: > head/sys/dev/ixgbe/ixgbe.h > > Modified: head/sys/dev/ixgbe/ixgbe.h > ============================================================================== > --- head/sys/dev/ixgbe/ixgbe.h Thu Jul 1 03:48:45 2010 > (r209621) > +++ head/sys/dev/ixgbe/ixgbe.h Thu Jul 1 05:03:24 2010 > (r209622) > @@ -382,7 +382,6 @@ struct adapter { > u32 link_speed; > bool link_up; > u32 linkvec; > - int advertise; > > /* Mbuf cluster size */ > u32 rx_mbuf_sz; > From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 07:56:14 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09AC0106564A; Thu, 1 Jul 2010 07:56:14 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 635718FC1B; Thu, 1 Jul 2010 07:56:12 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id o617uBn8072152; Thu, 1 Jul 2010 11:56:11 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id o617uBKV072151; Thu, 1 Jul 2010 11:56:11 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 1 Jul 2010 11:56:11 +0400 From: Gleb Smirnoff To: Jack Vogel Message-ID: <20100701075611.GG63689@FreeBSD.org> References: <201007010503.o6153O78066276@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209622 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 07:56:14 -0000 Jack, On Wed, Jun 30, 2010 at 10:09:22PM -0700, Jack Vogel wrote: J> I went to a LOT of trouble setting up a mirror at home and just as I went to J> commit J> the change its updated. J> J> While I understand the good intentions, please don't do this again. If I had J> been J> unresponsive for days or something I understand, but its been hours, and I J> was J> fixing it. We can't forecast future. Yesterday, I couldn't tell whether you will be unresponsive for days or for hours. Do you propose a policy to wait for days before putting an obvious fix? Live for days with a broken build? Waste peoples time, receive mails from tinderbox, receive mails on current@ from real people? Every time you^Wsomeone breaks build, a lot of manhours are wasted. Dozens of developers encounter breakage and spend their time on fixing it in their working trees. Not mentioning common FreeBSD users, who are brave enough to run CURRENT. If the first committer, who encountered the breakage, commits a fix, then a lot of manhours are saved, avoiding all others doing this job for their own trees. And the breakage passes by almost unnoticed. So, anytime I update sources and encounter an obvious error, I WILL FIX IT, to save time of other people, since I respect time of other people. And you do not, because you never do even a simple test build of changes you commit, not speaking about run tests. Skipping these important steps, you save your own time, for the price of other peoples time in the order of magnitude. Look at the commit history of your drivers: every second check in, or even more often, either build is broken, or some important change is backed out, or functionality of the driver is broken. Don't you think you should do more testing before checking in? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 09:15:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 648881065673 for ; Thu, 1 Jul 2010 09:15:03 +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 010CF8FC25 for ; Thu, 1 Jul 2010 09:15:02 +0000 (UTC) Received: (qmail 9233 invoked by uid 399); 1 Jul 2010 09:15:00 -0000 Received: from localhost (HELO ?192.168.0.145?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 1 Jul 2010 09:15:00 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Date: Thu, 1 Jul 2010 02:14:41 -0700 (PDT) From: Doug Barton To: Jack Vogel In-Reply-To: Message-ID: References: <201007010503.o6153O78066276@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-message-flag: Outlook -- Not just for spreading viruses anymore! OpenPGP: id=1A1ABC84 Organization: http://SupersetSolutions.com/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Kevin Lo , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209622 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 09:15:03 -0000 On Wed, 30 Jun 2010, Jack Vogel wrote: > I went to a LOT of trouble setting up a mirror at home and just as I > went to commit the change its updated. Not sure if you mean "mirror" literally here or not. I assume that you mean "local tree checked out from the master svn server." In any case, I'm sure that we all appreciate your efforts, and the timing of the various commits was was unfortunate. In situations like this it's usually a good idea to both double check the sources, as well as the svn mailing list to see if someone has already gotten around to fixing it. > While I understand the good intentions, please don't do this again. If > I had been unresponsive for days or something I understand, but its > been hours, and I was fixing it. I can certainly understand your frustration here, so I'm going to (once again) assume (and you know what they say about that ...) that you didn't mean "days" literally since clearly it would not be Ok to have the build broken (and tinderbox error messages, etc.) for days. In situations like this what's generally done is to respond to a relevant tinderbox message to the effect of "I see the problem, I'm working on the fix, and it should be done by $TIME." That way people know you're on the case and can let you do your thing in peace. Of course, the gold standard is to test changes before committing them, but it's not at all uncommon to have test builds complete successfully under your normal working conditions but fail in the tinderbox. It even happened to me once ... hth, Doug (Ok, maybe more than once) -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 10:26:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 947AB1065672; Thu, 1 Jul 2010 10:26:23 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83D5D8FC08; Thu, 1 Jul 2010 10:26: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 o61AQNXp037935; Thu, 1 Jul 2010 10:26:23 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61AQNKQ037933; Thu, 1 Jul 2010 10:26:23 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007011026.o61AQNKQ037933@svn.freebsd.org> From: Maxim Konovalov Date: Thu, 1 Jul 2010 10:26: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: r209623 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 10:26:23 -0000 Author: maxim Date: Thu Jul 1 10:26:23 2010 New Revision: 209623 URL: http://svn.freebsd.org/changeset/base/209623 Log: o Add taras@. Submitted by: taras Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Thu Jul 1 05:03:24 2010 (r209622) +++ head/share/misc/committers-doc.dot Thu Jul 1 10:26:23 2010 (r209623) @@ -61,6 +61,7 @@ linimon [label="Mark Linimon\nlinimon@Fr manolis [label="Manolis Kiagias\nmanolis@FreeBSD.org\n2008/05/24"] marcel [label="Marcel Moolenaar\nmarcel@FreeBSD.org\n1999/07/03"] marck [label="Dmitry Morozovsky\nmarck@FreeBSD.org\n2004/08/10"] +maxim [label="Maxim Konovalov\nmaxim@FreeBSD.org\n2002/02/07"] miwi [label="Martin Wilke\nmiwi@FreeBSD.org\n2007/10/26"] murray [label="Murray Stokely\nmurray@FreeBSD.org\n2000/04/05"] nik [label="Nik Clayton\nnik@FreeBSD.org\n1998/02/26"] @@ -70,6 +71,7 @@ remko [label="Remko Lodder\nremko@FreeBS rene [label="Rene Ladan\nrene@FreeBSD.org\n2008/11/03"] roam [label="Peter Pentchev\nroam@FreeBSD.org\n2003/02/14"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2003/07/20"] +taras [label="Taras Korenko\ntaras@FreeBSD.org\n2010/06/25"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/03/25"] # Here are the mentor/mentee relationships. @@ -93,6 +95,7 @@ delphij -> loader gabor -> pgj gabor -> manolis +gabor -> taras jesusr -> jcamou @@ -109,6 +112,9 @@ keramida -> garys keramida -> pav marck -> bvs +marck -> taras + +maxim -> taras mheinen -> jkois From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 12:55:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85F0E1065677; Thu, 1 Jul 2010 12:55:34 +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 748BA8FC1A; Thu, 1 Jul 2010 12:55: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 o61CtYgt072852; Thu, 1 Jul 2010 12:55:34 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61CtYYl072850; Thu, 1 Jul 2010 12:55:34 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201007011255.o61CtYYl072850@svn.freebsd.org> From: Michael Tuexen Date: Thu, 1 Jul 2010 12:55: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: r209624 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 12:55:34 -0000 Author: tuexen Date: Thu Jul 1 12:55:34 2010 New Revision: 209624 URL: http://svn.freebsd.org/changeset/base/209624 Log: MFC r209540 * Do not dereference a NULL pointer when calling an SCTP send syscall not providing a destination address and using ktrace. * Do not copy out kernel memory when providing sinfo for sctp_recvmsg(). Both bug where reported by Valentin Nechayev. The first bug results in a kernel panic. Modified: stable/8/sys/kern/uipc_syscalls.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/uipc_syscalls.c ============================================================================== --- stable/8/sys/kern/uipc_syscalls.c Thu Jul 1 10:26:23 2010 (r209623) +++ stable/8/sys/kern/uipc_syscalls.c Thu Jul 1 12:55:34 2010 (r209624) @@ -2413,7 +2413,7 @@ sctp_generic_sendmsg (td, uap) if (error) goto sctp_bad; #ifdef KTRACE - if (KTRPOINT(td, KTR_STRUCT)) + if (to && (KTRPOINT(td, KTR_STRUCT))) ktrsockaddr(to); #endif @@ -2527,7 +2527,7 @@ sctp_generic_sendmsg_iov(td, uap) if (error) goto sctp_bad1; #ifdef KTRACE - if (KTRPOINT(td, KTR_STRUCT)) + if (to && (KTRPOINT(td, KTR_STRUCT))) ktrsockaddr(to); #endif @@ -2681,6 +2681,7 @@ sctp_generic_recvmsg(td, uap) if (KTRPOINT(td, KTR_GENIO)) ktruio = cloneuio(&auio); #endif /* KTRACE */ + memset(&sinfo, 0, sizeof(struct sctp_sndrcvinfo)); CURVNET_SET(so->so_vnet); error = sctp_sorecvmsg(so, &auio, (struct mbuf **)NULL, fromsa, fromlen, &msg_flags, From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 14:10:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A154F1065670; Thu, 1 Jul 2010 14:10:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90AF88FC0A; Thu, 1 Jul 2010 14:10:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o61EAt12089567; Thu, 1 Jul 2010 14:10:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61EAtVk089565; Thu, 1 Jul 2010 14:10:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007011410.o61EAtVk089565@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Jul 2010 14:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209625 - head/sbin/camcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 14:10:55 -0000 Author: mav Date: Thu Jul 1 14:10:55 2010 New Revision: 209625 URL: http://svn.freebsd.org/changeset/base/209625 Log: Correct explanation for idle and standby subcommands' -t argument. Modified: head/sbin/camcontrol/camcontrol.8 Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Thu Jul 1 12:55:34 2010 (r209624) +++ head/sbin/camcontrol/camcontrol.8 Thu Jul 1 14:10:55 2010 (r209625) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 2, 2010 +.Dd July 1, 2010 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -846,11 +846,13 @@ will not be asked about the timeout if a command line. .El .It Ic idle -Put ATA device into IDLE state. Optional parameter specifies automatic -idle timer value in seconds. +Put ATA device into IDLE state. Optional parameter +.Pq Fl t +specifies automatic standby timer value in seconds. Value 0 disables timer. .It Ic standby -Put ATA device into STANDBY state. Optional parameter specifies automatic -standby timer value in seconds. +Put ATA device into STANDBY state. Optional parameter +.Pq Fl t +specifies automatic standby timer value in seconds. Value 0 disables timer. .It Ic sleep Put ATA device into SLEEP state. Note that the only way get device out of this state may be reset. From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 17:44:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A0281065678; Thu, 1 Jul 2010 17:44:34 +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 38F288FC23; Thu, 1 Jul 2010 17:44: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 o61HiYkA039345; Thu, 1 Jul 2010 17:44:34 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61HiYS2039343; Thu, 1 Jul 2010 17:44:34 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201007011744.o61HiYS2039343@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 1 Jul 2010 17:44: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: r209632 - head/lib/libfetch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 17:44:34 -0000 Author: des Date: Thu Jul 1 17:44:33 2010 New Revision: 209632 URL: http://svn.freebsd.org/changeset/base/209632 Log: If the A flag is supplied, http_request() will attempt the request only once, even if authentication is required, instead of retrying with the proper credentials. Fix this by bumping the countdown if the origin or proxy server requests authentication so that the initial unauthenticated request does not count as an attempt. PR: 148087 Submitted by: Tom Evans MFC after: 2 weeks Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Thu Jul 1 15:23:29 2010 (r209631) +++ head/lib/libfetch/http.c Thu Jul 1 17:44:33 2010 (r209632) @@ -1786,12 +1786,14 @@ http_request(struct url *URL, const char case hdr_www_authenticate: if (conn->err != HTTP_NEED_AUTH) break; - http_parse_authenticate(p, &server_challenges); + if (http_parse_authenticate(p, &server_challenges)) + ++n; break; case hdr_proxy_authenticate: if (conn->err != HTTP_NEED_PROXY_AUTH) break; - http_parse_authenticate(p, &proxy_challenges); + if (http_parse_authenticate(p, &proxy_challenges) == 0); + ++n; break; case hdr_end: /* fall through */ From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 17:46:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1759F106566B; Thu, 1 Jul 2010 17:46:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06BAA8FC16; Thu, 1 Jul 2010 17:46: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 o61HkC6j039773; Thu, 1 Jul 2010 17:46:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61HkCr4039771; Thu, 1 Jul 2010 17:46:12 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201007011746.o61HkCr4039771@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 1 Jul 2010 17:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209633 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 17:46:13 -0000 Author: glebius Date: Thu Jul 1 17:46:12 2010 New Revision: 209633 URL: http://svn.freebsd.org/changeset/base/209633 Log: The struct ipfw_rule_ref follows the struct m_tag. Deal with this correctly. This fixes breakage of ng_ipfw(4) in r201527. Submitted by: Alexander Zagrebin Modified: head/sys/netgraph/ng_ipfw.c Modified: head/sys/netgraph/ng_ipfw.c ============================================================================== --- head/sys/netgraph/ng_ipfw.c Thu Jul 1 17:44:33 2010 (r209632) +++ head/sys/netgraph/ng_ipfw.c Thu Jul 1 17:46:12 2010 (r209633) @@ -221,20 +221,21 @@ ng_ipfw_findhook1(node_p node, u_int16_t static int ng_ipfw_rcvdata(hook_p hook, item_p item) { - struct ipfw_rule_ref *tag; + struct m_tag *tag; + struct ipfw_rule_ref *r; struct mbuf *m; NGI_GET_M(item, m); NG_FREE_ITEM(item); - tag = (struct ipfw_rule_ref *) - m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); + tag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); if (tag == NULL) { NG_FREE_M(m); return (EINVAL); /* XXX: find smth better */ }; - if (tag->info & IPFW_INFO_IN) { + r = (struct ipfw_rule_ref *)(tag + 1); + if (r->info & IPFW_INFO_IN) { ip_input(m); return (0); } else { From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 18:51:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C2D81065675; Thu, 1 Jul 2010 18:51:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BBF18FC19; Thu, 1 Jul 2010 18:51: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 o61IpI2E054348; Thu, 1 Jul 2010 18:51:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61IpI9r054345; Thu, 1 Jul 2010 18:51:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007011851.o61IpI9r054345@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Jul 2010 18:51:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209634 - head/sys/x86/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 18:51:18 -0000 Author: mav Date: Thu Jul 1 18:51:18 2010 New Revision: 209634 URL: http://svn.freebsd.org/changeset/base/209634 Log: Rework r209456: Instead of using fake rid (which ISA doesn't like), delete untrusted IRQ resource and let it be recreated. Modified: head/sys/x86/isa/atrtc.c head/sys/x86/isa/clock.c Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Thu Jul 1 17:46:12 2010 (r209633) +++ head/sys/x86/isa/atrtc.c Thu Jul 1 18:51:18 2010 (r209634) @@ -259,7 +259,8 @@ atrtc_attach(device_t dev) if (!atrtcclock_disable && (resource_int_value(device_get_name(dev), device_get_unit(dev), "clock", &i) != 0 || i != 0)) { - sc->intr_rid = -1; + sc->intr_rid = 0; + bus_delete_resource(dev, SYS_RES_IRQ, sc->intr_rid); if (!(sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->intr_rid, 8, 8, 1, RF_ACTIVE))) { device_printf(dev,"Can't map interrupt.\n"); Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Thu Jul 1 17:46:12 2010 (r209633) +++ head/sys/x86/isa/clock.c Thu Jul 1 18:51:18 2010 (r209634) @@ -535,7 +535,8 @@ attimer_attach(device_t dev) tc_init(&sc->tc); if (resource_int_value(device_get_name(dev), device_get_unit(dev), "clock", &i) != 0 || i != 0) { - sc->intr_rid = -1; + sc->intr_rid = 0; + bus_delete_resource(dev, SYS_RES_IRQ, sc->intr_rid); if (!(sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->intr_rid, 0, 0, 1, RF_ACTIVE))) { device_printf(dev,"Can't map interrupt.\n"); From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 18:59:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F21B1065675; Thu, 1 Jul 2010 18:59:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2CDE8FC12; Thu, 1 Jul 2010 18:59: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 o61Ix5LB056166; Thu, 1 Jul 2010 18:59:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61Ix558056163; Thu, 1 Jul 2010 18:59:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007011859.o61Ix558056163@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Jul 2010 18:59: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: r209635 - head/sys/x86/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 18:59:06 -0000 Author: mav Date: Thu Jul 1 18:59:05 2010 New Revision: 209635 URL: http://svn.freebsd.org/changeset/base/209635 Log: Allow attimer to be hinted at ISA if not reported by ISA PNP or ACPI. Rephrase respective atrtc code same way to be more readable. Modified: head/sys/x86/isa/atrtc.c head/sys/x86/isa/clock.c Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Thu Jul 1 18:51:18 2010 (r209634) +++ head/sys/x86/isa/atrtc.c Thu Jul 1 18:59:05 2010 (r209635) @@ -231,13 +231,13 @@ atrtc_probe(device_t dev) { int result; - device_set_desc(dev, "AT Real Time Clock"); result = ISA_PNP_PROBE(device_get_parent(dev), dev, atrtc_ids); - /* ENXIO if wrong PnP-ID, ENOENT ifno PnP-ID, zero if good PnP-iD */ - if (result != ENOENT) - return(result); - /* All PC's have an RTC, and we're hosed without it, so... */ - return (BUS_PROBE_LOW_PRIORITY); + /* ENOENT means no PnP-ID, device is hinted. */ + if (result == ENOENT) { + device_set_desc(dev, "AT realtime clock"); + return (BUS_PROBE_LOW_PRIORITY); + } + return (result); } static int Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Thu Jul 1 18:51:18 2010 (r209634) +++ head/sys/x86/isa/clock.c Thu Jul 1 18:59:05 2010 (r209635) @@ -511,7 +511,12 @@ attimer_probe(device_t dev) int result; result = ISA_PNP_PROBE(device_get_parent(dev), dev, attimer_ids); - return(result); + /* ENOENT means no PnP-ID, device is hinted. */ + if (result == ENOENT) { + device_set_desc(dev, "AT timer"); + return (BUS_PROBE_LOW_PRIORITY); + } + return (result); } static int From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 20:50:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 802131065672; Thu, 1 Jul 2010 20:50:12 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EFC58FC0A; Thu, 1 Jul 2010 20:50:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o61KoCSH080826; Thu, 1 Jul 2010 20:50:12 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61KoCG1080821; Thu, 1 Jul 2010 20:50:12 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007012050.o61KoCG1080821@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 1 Jul 2010 20:50:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209636 - in head: sys/net80211 usr.sbin/wpa/wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Jul 2010 20:50:12 -0000 Author: bschmidt Date: Thu Jul 1 20:50:12 2010 New Revision: 209636 URL: http://svn.freebsd.org/changeset/base/209636 Log: - Introduce IEEE80211_KEY_NOREPLAY, a per-key flag to ignore replay violations. - Use SIOCGIFMEDIA to determine VAP's opmode, cache it and set IEEE80211_KEY_NOREPLAY for AHDEMO and IBSS. Approved by: rpaulo (mentor) Modified: head/sys/net80211/ieee80211_crypto.h head/sys/net80211/ieee80211_crypto_ccmp.c head/sys/net80211/ieee80211_crypto_tkip.c head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c Modified: head/sys/net80211/ieee80211_crypto.h ============================================================================== --- head/sys/net80211/ieee80211_crypto.h Thu Jul 1 18:59:05 2010 (r209635) +++ head/sys/net80211/ieee80211_crypto.h Thu Jul 1 20:50:12 2010 (r209636) @@ -78,6 +78,7 @@ struct ieee80211_key { #define IEEE80211_KEY_XMIT 0x0001 /* key used for xmit */ #define IEEE80211_KEY_RECV 0x0002 /* key used for recv */ #define IEEE80211_KEY_GROUP 0x0004 /* key used for WPA group operation */ +#define IEEE80211_KEY_NOREPLAY 0x0008 /* ignore replay failures */ #define IEEE80211_KEY_SWENCRYPT 0x0010 /* host-based encrypt */ #define IEEE80211_KEY_SWDECRYPT 0x0020 /* host-based decrypt */ #define IEEE80211_KEY_SWENMIC 0x0040 /* host-based enmic */ @@ -98,7 +99,8 @@ struct ieee80211_key { uint8_t wk_macaddr[IEEE80211_ADDR_LEN]; }; #define IEEE80211_KEY_COMMON /* common flags passed in by apps */\ - (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV | IEEE80211_KEY_GROUP) + (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV | IEEE80211_KEY_GROUP | \ + IEEE80211_KEY_NOREPLAY) #define IEEE80211_KEY_DEVICE /* flags owned by device driver */\ (IEEE80211_KEY_DEVKEY|IEEE80211_KEY_CIPHER0|IEEE80211_KEY_CIPHER1) Modified: head/sys/net80211/ieee80211_crypto_ccmp.c ============================================================================== --- head/sys/net80211/ieee80211_crypto_ccmp.c Thu Jul 1 18:59:05 2010 (r209635) +++ head/sys/net80211/ieee80211_crypto_ccmp.c Thu Jul 1 20:50:12 2010 (r209636) @@ -226,14 +226,8 @@ ccmp_decap(struct ieee80211_key *k, stru } tid = ieee80211_gettid(wh); pn = READ_6(ivp[0], ivp[1], ivp[4], ivp[5], ivp[6], ivp[7]); - /* - * NB: Multiple stations are using the same key in - * IBSS mode, there is currently no way to sync keyrsc - * counters without discarding too many frames. - */ - if (vap->iv_opmode != IEEE80211_M_IBSS && - vap->iv_opmode != IEEE80211_M_AHDEMO && - pn <= k->wk_keyrsc[tid]) { + if (pn <= k->wk_keyrsc[tid] && + (k->wk_flags & IEEE80211_KEY_NOREPLAY) == 0) { /* * Replay violation. */ Modified: head/sys/net80211/ieee80211_crypto_tkip.c ============================================================================== --- head/sys/net80211/ieee80211_crypto_tkip.c Thu Jul 1 18:59:05 2010 (r209635) +++ head/sys/net80211/ieee80211_crypto_tkip.c Thu Jul 1 20:50:12 2010 (r209636) @@ -281,14 +281,8 @@ tkip_decap(struct ieee80211_key *k, stru tid = ieee80211_gettid(wh); ctx->rx_rsc = READ_6(ivp[2], ivp[0], ivp[4], ivp[5], ivp[6], ivp[7]); - /* - * NB: Multiple stations are using the same key in - * IBSS mode, there is currently no way to sync keyrsc - * counters without discarding too many frames. - */ - if (vap->iv_opmode != IEEE80211_M_IBSS && - vap->iv_opmode != IEEE80211_M_AHDEMO && - ctx->rx_rsc <= k->wk_keyrsc[tid]) { + if (ctx->rx_rsc <= k->wk_keyrsc[tid] && + (k->wk_flags & IEEE80211_KEY_NOREPLAY) == 0) { /* * Replay violation; notify upper layer. */ Modified: head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c Thu Jul 1 18:59:05 2010 (r209635) +++ head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c Thu Jul 1 20:50:12 2010 (r209636) @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -47,8 +48,34 @@ struct wpa_driver_bsd_data { int lastssid_len; uint32_t drivercaps; /* general driver capabilities */ uint32_t cryptocaps; /* hardware crypto support */ + enum ieee80211_opmode opmode; /* operation mode */ }; +static enum ieee80211_opmode +get80211opmode(struct wpa_driver_bsd_data *drv) +{ + struct ifmediareq ifmr; + + (void) memset(&ifmr, 0, sizeof(ifmr)); + (void) strncpy(ifmr.ifm_name, drv->ifname, sizeof(ifmr.ifm_name)); + + if (ioctl(drv->sock, SIOCGIFMEDIA, (caddr_t)&ifmr) >= 0) { + if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) { + if (ifmr.ifm_current & IFM_FLAG0) + return IEEE80211_M_AHDEMO; + else + return IEEE80211_M_IBSS; + } + if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) + return IEEE80211_M_HOSTAP; + if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) + return IEEE80211_M_MONITOR; + if (ifmr.ifm_current & IFM_IEEE80211_MBSS) + return IEEE80211_M_MBSS; + } + return IEEE80211_M_STA; +} + static int set80211var(struct wpa_driver_bsd_data *drv, int op, const void *arg, int arg_len) { @@ -332,6 +359,12 @@ wpa_driver_bsd_set_key(void *priv, wpa_a } if (wk.ik_keyix != IEEE80211_KEYIX_NONE && set_tx) wk.ik_flags |= IEEE80211_KEY_DEFAULT; + /* + * Ignore replay failures in IBSS and AHDEMO mode. + */ + if (drv->opmode == IEEE80211_M_IBSS || + drv->opmode == IEEE80211_M_AHDEMO) + wk.ik_flags |= IEEE80211_KEY_NOREPLAY; wk.ik_keylen = key_len; memcpy(&wk.ik_keyrsc, seq, seq_len); wk.ik_keyrsc = le64toh(wk.ik_keyrsc); @@ -861,6 +894,7 @@ wpa_driver_bsd_init(void *ctx, const cha __func__, strerror(errno)); goto fail; } + drv->opmode = get80211opmode(drv); return drv; fail: From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 21:03:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1315106566C; Thu, 1 Jul 2010 21:03:30 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B13588FC15; Thu, 1 Jul 2010 21:03: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 o61L3UFT083884; Thu, 1 Jul 2010 21:03:30 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61L3UeU083882; Thu, 1 Jul 2010 21:03:30 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201007012103.o61L3UeU083882@svn.freebsd.org> From: Jack F Vogel Date: Thu, 1 Jul 2010 21:03: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: r209637 - head/sys/modules/em X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Jul 2010 21:03:30 -0000 Author: jfv Date: Thu Jul 1 21:03:30 2010 New Revision: 209637 URL: http://svn.freebsd.org/changeset/base/209637 Log: Add new source to the loadable em build, thought it wasnt needed but it is. Modified: head/sys/modules/em/Makefile Modified: head/sys/modules/em/Makefile ============================================================================== --- head/sys/modules/em/Makefile Thu Jul 1 20:50:12 2010 (r209636) +++ head/sys/modules/em/Makefile Thu Jul 1 21:03:30 2010 (r209637) @@ -8,7 +8,8 @@ CORE_SRC = if_em.c e1000_osdep.c # This is the Legacy, pre-PCIE source, it can be # undefined when using modular driver if not needed LEGACY_SRC += if_lem.c -COMMON_SHARED = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c e1000_manage.c +COMMON_SHARED = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c \ + e1000_manage.c e1000_vf.c e1000_mbx.c PCIE_SHARED = e1000_80003es2lan.c e1000_ich8lan.c e1000_82571.c e1000_82575.c LEGACY_SHARED = e1000_82540.c e1000_82542.c e1000_82541.c e1000_82543.c From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 21:52:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9888106566C; Thu, 1 Jul 2010 21:52:58 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6770D8FC0C; Thu, 1 Jul 2010 21:52:58 +0000 (UTC) Received: by pxi3 with SMTP id 3so1120070pxi.13 for ; Thu, 01 Jul 2010 14:52:46 -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=r1u/TYkeqCevVZ4iaSqg34tZFCqzi1xajeY9m3cwusg=; b=HwFrLQ3jWZq3KNGodF9QzVFVqosJjvrcC5EuACSmakIwWJIma2qu1RBBxdwmeWpLyB xSBzC8wVsHlmsRl5LQ1fW43Ck9xVl/LK04UnHAoTuKrrIRC/CbdvtN5cQEk7432zqJQb /CDQ6YbqqreoMck7gwngpQo4N72z/zWH2xxHI= 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=N9wihFJSyhl9rfRBQM2Boi6CiRKLRiTkeCzr5VUrRbMNfbcIA+WRlDdI8rSuMRViuU I9nnyX8p+jSlFPxj9LFoZFTL6jjTePPBxWHNGS2yspAQM3SpZJxO5JnwHsqExhrsrUy1 xCT05Oqy7W4vdKSFX2132ZMQnbwzEgOiOlXHg= Received: by 10.142.215.6 with SMTP id n6mr205154wfg.7.1278021166596; Thu, 01 Jul 2010 14:52:46 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id v38sm13453wfh.0.2010.07.01.14.52.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 01 Jul 2010 14:52:45 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Thu, 1 Jul 2010 14:52:18 -0700 From: Pyun YongHyeon Date: Thu, 1 Jul 2010 14:52:18 -0700 To: Ken Smith Message-ID: <20100701215218.GC7090@michelle.cdnetworks.com> References: <201006101804.o5AI4PEX024259@svn.freebsd.org> <20100629074831.GA75332@fupp.net> <1277820825.55649.7.camel@bauer.cse.buffalo.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1277820825.55649.7.camel@bauer.cse.buffalo.edu> User-Agent: Mutt/1.4.2.3i Cc: Anders Nordby , src-committers@freebsd.org, jdc@parodius.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-7@freebsd.org, marcel@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r208995 - stable/7/sys/dev/bge 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: Thu, 01 Jul 2010 21:52:58 -0000 On Tue, Jun 29, 2010 at 10:13:45AM -0400, Ken Smith wrote: > On Tue, 2010-06-29 at 09:48 +0200, Anders Nordby wrote: > > Is it possible to get this fix into FreeBSD 7.3-RELEASE? > > We typically rely on developers to decide if fixes might warrant > consideration as an Errata Notice and send email to re@ suggesting > it. It's hard for us to judge on our own - factors include things > like the individual developers' confidence level in the fix, etc. > Even though I didn't receive positive feedback from jumbo frame users I'm pretty sure the change set will fix regression introduced in r199011. As you might know, the bug was not detected for a very long time(about 6 months) so I think it's better to wait 2 or 3 weeks to get more confidence on the patch. > If someone(s) were to send mail to re@ suggesting this be an > Errata Notice given your description here we would definitely > consider it seriously. As far as the general process goes that's > the first step. > > -- > Ken Smith > - From there to here, from here to | kensmith@buffalo.edu > there, funny things are everywhere. | > - Theodore Geisel | > From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 21:58:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D57D1065672; Thu, 1 Jul 2010 21:58:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CCA08FC0A; Thu, 1 Jul 2010 21:58: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 o61Lwl4b096568; Thu, 1 Jul 2010 21:58:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61LwkJW096565; Thu, 1 Jul 2010 21:58:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007012158.o61LwkJW096565@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Jul 2010 21:58: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: r209638 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 21:58:47 -0000 Author: mav Date: Thu Jul 1 21:58:46 2010 New Revision: 209638 URL: http://svn.freebsd.org/changeset/base/209638 Log: Make stray irq counters have format alike to other counters. Unified format makes string processing (for example by `systat -vm`) easier. Modified: head/sys/amd64/amd64/intr_machdep.c head/sys/i386/i386/intr_machdep.c Modified: head/sys/amd64/amd64/intr_machdep.c ============================================================================== --- head/sys/amd64/amd64/intr_machdep.c Thu Jul 1 21:03:30 2010 (r209637) +++ head/sys/amd64/amd64/intr_machdep.c Thu Jul 1 21:58:46 2010 (r209638) @@ -346,8 +346,8 @@ intrcnt_register(struct intsrc *is) mtx_lock_spin(&intrcnt_lock); is->is_index = intrcnt_index; intrcnt_index += 2; - snprintf(straystr, MAXCOMLEN + 1, "stray irq%d", - is->is_pic->pic_vector(is)); + snprintf(straystr, MAXCOMLEN + 1, "%s stray", + is->is_event->ie_name); intrcnt_updatename(is); is->is_count = &intrcnt[is->is_index]; intrcnt_setname(straystr, is->is_index + 1); Modified: head/sys/i386/i386/intr_machdep.c ============================================================================== --- head/sys/i386/i386/intr_machdep.c Thu Jul 1 21:03:30 2010 (r209637) +++ head/sys/i386/i386/intr_machdep.c Thu Jul 1 21:58:46 2010 (r209638) @@ -334,8 +334,8 @@ intrcnt_register(struct intsrc *is) mtx_lock_spin(&intrcnt_lock); is->is_index = intrcnt_index; intrcnt_index += 2; - snprintf(straystr, MAXCOMLEN + 1, "stray irq%d", - is->is_pic->pic_vector(is)); + snprintf(straystr, MAXCOMLEN + 1, "%s stray", + is->is_event->ie_name); intrcnt_updatename(is); is->is_count = &intrcnt[is->is_index]; intrcnt_setname(straystr, is->is_index + 1); From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 22:22:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8485106564A; Thu, 1 Jul 2010 22:22:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 99CBE8FC16; Thu, 1 Jul 2010 22:22:07 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 31FB746B03; Thu, 1 Jul 2010 18:22:07 -0400 (EDT) Received: from zion.baldwin.cx (c-68-45-19-154.hsd1.nj.comcast.net [68.45.19.154]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AB7D68A03C; Thu, 1 Jul 2010 18:22:04 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Thu, 1 Jul 2010 18:22:02 -0400 User-Agent: KMail/1.12.4 (FreeBSD/7.3-PRERELEASE; KDE/4.3.4; i386; ; ) References: <201007012158.o61LwkJW096565@svn.freebsd.org> In-Reply-To: <201007012158.o61LwkJW096565@svn.freebsd.org> MIME-Version: 1.0 Message-Id: <201007011822.02280.jhb@freebsd.org> Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 01 Jul 2010 18:22:04 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=BAYES_00,RDNS_DYNAMIC autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209638 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 22:22:07 -0000 On Thursday 01 July 2010 05:58:46 pm Alexander Motin wrote: > Author: mav > Date: Thu Jul 1 21:58:46 2010 > New Revision: 209638 > URL: http://svn.freebsd.org/changeset/base/209638 > > Log: > Make stray irq counters have format alike to other counters. Unified > format makes string processing (for example by `systat -vm`) easier. As I said on the mailing lists, I actually think that the old way is a feature. I believe bde@ also has useful input on appropriately parsing interrupt names for systat -vmstat output. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 23:59:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9808F1065670; Thu, 1 Jul 2010 23:59:04 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id 377D08FC08; Thu, 1 Jul 2010 23:59:03 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id D1AB1157549; Thu, 1 Jul 2010 18:59:01 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id S7O1EAU6BV1B; Thu, 01 Jul 2010 18:58:59 -0500 Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <201007011822.02280.jhb@freebsd.org> Date: Fri, 2 Jul 2010 00:58:56 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201007012158.o61LwkJW096565@svn.freebsd.org> <201007011822.02280.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1081) Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r209638 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 23:59:04 -0000 On 1 Jul 2010, at 23:22, John Baldwin wrote: > On Thursday 01 July 2010 05:58:46 pm Alexander Motin wrote: >> Author: mav >> Date: Thu Jul 1 21:58:46 2010 >> New Revision: 209638 >> URL: http://svn.freebsd.org/changeset/base/209638 >>=20 >> Log: >> Make stray irq counters have format alike to other counters. Unified >> format makes string processing (for example by `systat -vm`) easier. >=20 > As I said on the mailing lists, I actually think that the old way is a=20= > feature. I believe bde@ also has useful input on appropriately = parsing=20 > interrupt names for systat -vmstat output. I forgot to voice my opinion on the mailing list, but I prefer the old = way too. Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 01:14:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2762106564A; Fri, 2 Jul 2010 01:14:11 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2178E8FC0A; Fri, 2 Jul 2010 01:14:10 +0000 (UTC) Received: by vws6 with SMTP id 6so2443986vws.13 for ; Thu, 01 Jul 2010 18:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=RsLfjGMV352rhh2Rnp3z1uzbBwY467hhgtP1PU2B6Yo=; b=AZTEFHfJsRWSUe9NZ2syRFOigVym2e/MByZp4rOOLclzyoaRmcJu2qiSrgjk4eoKVT CXYm9vvHfiijFlWKLZQoKVSjEfcAI337zYjH996Tq/gj8I5jR6u90XiHjRCAdVwFR0aK nCdDUUh7+NqhlVCNGmW/LDqIsa5mYSITSoiI0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=XU77l0XY83Y2aSMQ37MfAZx0Wj1uy5jzsPzVaNWABvrBLQpZGhuuAhU3/N9XuswMUa wWg++2asTqAo8iW+NM80SGNnrb3iYZIGRBTOoNSCoBBlrJq2DnwzeRG94Qt2WiBQA9P/ lEC661y8xKPMKzAK00logLni8hLIHmouEtavk= MIME-Version: 1.0 Received: by 10.229.251.67 with SMTP id mr3mr181324qcb.215.1278033245922; Thu, 01 Jul 2010 18:14:05 -0700 (PDT) Received: by 10.229.221.83 with HTTP; Thu, 1 Jul 2010 18:14:05 -0700 (PDT) In-Reply-To: References: <201007012158.o61LwkJW096565@svn.freebsd.org> <201007011822.02280.jhb@freebsd.org> Date: Thu, 1 Jul 2010 18:14:05 -0700 Message-ID: From: Garrett Cooper To: Rui Paulo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, John Baldwin Subject: Re: svn commit: r209638 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 01:14:12 -0000 On Thu, Jul 1, 2010 at 4:58 PM, Rui Paulo wrote: > > On 1 Jul 2010, at 23:22, John Baldwin wrote: > >> On Thursday 01 July 2010 05:58:46 pm Alexander Motin wrote: >>> Author: mav >>> Date: Thu Jul =A01 21:58:46 2010 >>> New Revision: 209638 >>> URL: http://svn.freebsd.org/changeset/base/209638 >>> >>> Log: >>> =A0Make stray irq counters have format alike to other counters. Unified >>> format makes string processing (for example by `systat -vm`) easier. >> >> As I said on the mailing lists, I actually think that the old way is a >> feature. =A0I believe bde@ also has useful input on appropriately parsin= g >> interrupt names for systat -vmstat output. > > I forgot to voice my opinion on the mailing list, but I prefer the old wa= y too. I agree. The new way is a bit ambiguous and taken out of context it should be 19 stray cats, not stray irq19 :D. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 02:17:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 461C5106566C; Fri, 2 Jul 2010 02:17:40 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33DD48FC12; Fri, 2 Jul 2010 02:17: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 o622HdMK053570; Fri, 2 Jul 2010 02:17:39 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o622HdrO053560; Fri, 2 Jul 2010 02:17:39 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201007020217.o622HdrO053560@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 2 Jul 2010 02:17: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: r209639 - in head/sys/powerpc: aim booke include mpc85xx powermac powerpc psim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Jul 2010 02:17:40 -0000 Author: marcel Date: Fri Jul 2 02:17:39 2010 New Revision: 209639 URL: http://svn.freebsd.org/changeset/base/209639 Log: Remove the unneeded header . Deleted: head/sys/powerpc/include/intr.h Modified: head/sys/powerpc/aim/clock.c head/sys/powerpc/booke/clock.c head/sys/powerpc/mpc85xx/atpic.c head/sys/powerpc/mpc85xx/opic.c head/sys/powerpc/powermac/cuda.c head/sys/powerpc/powermac/hrowpic.c head/sys/powerpc/powermac/openpic_macio.c head/sys/powerpc/powermac/pmu.c head/sys/powerpc/powerpc/openpic.c head/sys/powerpc/psim/openpic_iobus.c Modified: head/sys/powerpc/aim/clock.c ============================================================================== --- head/sys/powerpc/aim/clock.c Thu Jul 1 21:58:46 2010 (r209638) +++ head/sys/powerpc/aim/clock.c Fri Jul 2 02:17:39 2010 (r209639) @@ -71,7 +71,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/powerpc/booke/clock.c ============================================================================== --- head/sys/powerpc/booke/clock.c Thu Jul 1 21:58:46 2010 (r209638) +++ head/sys/powerpc/booke/clock.c Fri Jul 2 02:17:39 2010 (r209639) @@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: head/sys/powerpc/mpc85xx/atpic.c ============================================================================== --- head/sys/powerpc/mpc85xx/atpic.c Thu Jul 1 21:58:46 2010 (r209638) +++ head/sys/powerpc/mpc85xx/atpic.c Fri Jul 2 02:17:39 2010 (r209639) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/powerpc/mpc85xx/opic.c ============================================================================== --- head/sys/powerpc/mpc85xx/opic.c Thu Jul 1 21:58:46 2010 (r209638) +++ head/sys/powerpc/mpc85xx/opic.c Fri Jul 2 02:17:39 2010 (r209639) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/powerpc/powermac/cuda.c ============================================================================== --- head/sys/powerpc/powermac/cuda.c Thu Jul 1 21:58:46 2010 (r209638) +++ head/sys/powerpc/powermac/cuda.c Fri Jul 2 02:17:39 2010 (r209639) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/powerpc/powermac/hrowpic.c ============================================================================== --- head/sys/powerpc/powermac/hrowpic.c Thu Jul 1 21:58:46 2010 (r209638) +++ head/sys/powerpc/powermac/hrowpic.c Fri Jul 2 02:17:39 2010 (r209639) @@ -45,7 +45,6 @@ #include #include -#include #include #include #include Modified: head/sys/powerpc/powermac/openpic_macio.c ============================================================================== --- head/sys/powerpc/powermac/openpic_macio.c Thu Jul 1 21:58:46 2010 (r209638) +++ head/sys/powerpc/powermac/openpic_macio.c Fri Jul 2 02:17:39 2010 (r209639) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/powerpc/powermac/pmu.c ============================================================================== --- head/sys/powerpc/powermac/pmu.c Thu Jul 1 21:58:46 2010 (r209638) +++ head/sys/powerpc/powermac/pmu.c Fri Jul 2 02:17:39 2010 (r209639) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/powerpc/powerpc/openpic.c ============================================================================== --- head/sys/powerpc/powerpc/openpic.c Thu Jul 1 21:58:46 2010 (r209638) +++ head/sys/powerpc/powerpc/openpic.c Fri Jul 2 02:17:39 2010 (r209639) @@ -35,7 +35,6 @@ #include #include -#include #include #include #include Modified: head/sys/powerpc/psim/openpic_iobus.c ============================================================================== --- head/sys/powerpc/psim/openpic_iobus.c Thu Jul 1 21:58:46 2010 (r209638) +++ head/sys/powerpc/psim/openpic_iobus.c Fri Jul 2 02:17:39 2010 (r209639) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 02:20:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2765C106564A; Fri, 2 Jul 2010 02:20:26 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16B828FC1E; Fri, 2 Jul 2010 02:20: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 o622KPrZ054205; Fri, 2 Jul 2010 02:20:25 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o622KPlO054203; Fri, 2 Jul 2010 02:20:25 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201007020220.o622KPlO054203@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 2 Jul 2010 02:20: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: r209640 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 02:20:26 -0000 Author: marcel Date: Fri Jul 2 02:20:25 2010 New Revision: 209640 URL: http://svn.freebsd.org/changeset/base/209640 Log: removed on powerpc. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Jul 2 02:17:39 2010 (r209639) +++ head/ObsoleteFiles.inc Fri Jul 2 02:20:25 2010 (r209640) @@ -14,6 +14,10 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100701: [powerpc] removed +.if ${TARGET_ARCH} == "powerpc" +OLD_FILES+=usr/include/machine/intr.h +.endif # 20100514: library version bump for versioned symbols for liblzma OLD_LIBS+=usr/lib/liblzma.so.0 .if ${TARGET_ARCH} == "amd64" From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 01:28:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B852106566B; Fri, 2 Jul 2010 01:28:53 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9A5BE8FC08; Fri, 2 Jul 2010 01:28:52 +0000 (UTC) Received: by qwg5 with SMTP id 5so1156752qwg.13 for ; Thu, 01 Jul 2010 18:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/DMaoxCKeleW8rZSJnZcGIw4e1fQnoMqM8rZPhSGbIM=; b=lBPwMdUkIZ7x97H05cmJVzJmlx1Y1tCtNIOgJ9DfaO0dcMZQ5feTXktLB5ZHtO+/ic G7sh9atGcp3dzWLpVA7+V2CgXxaNPjTlCaNltzh3oEBu5rsAluNJ4F5MQSzV2aeeifIi ug55cWdkXEX5K0BDZJW7RrUKdGLqB5aCgtroQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AtlGKDVrJvYCaiDOiFHqXB/tqCJtvYuXjvLoPPVh37Psm5rMzAxHmTHoGfgU3cbD4D YczBZUkoh63HdcsFBffuF8jc1UGVVz0gcn6IhcucZICpMC0gbKbB3550rNqPJl6xCZRj NbQymQu+GJ9G5bLUfzomNrUnoF/CshpmJeUvM= MIME-Version: 1.0 Received: by 10.229.241.200 with SMTP id lf8mr5900qcb.53.1278034115719; Thu, 01 Jul 2010 18:28:35 -0700 (PDT) Received: by 10.229.221.83 with HTTP; Thu, 1 Jul 2010 18:28:35 -0700 (PDT) In-Reply-To: <20100701215218.GC7090@michelle.cdnetworks.com> References: <201006101804.o5AI4PEX024259@svn.freebsd.org> <20100629074831.GA75332@fupp.net> <1277820825.55649.7.camel@bauer.cse.buffalo.edu> <20100701215218.GC7090@michelle.cdnetworks.com> Date: Thu, 1 Jul 2010 18:28:35 -0700 Message-ID: From: Garrett Cooper To: pyunyh@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 02 Jul 2010 04:21:38 +0000 Cc: Anders Nordby , src-committers@freebsd.org, Ken Smith , jdc@parodius.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-7@freebsd.org, marcel@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r208995 - stable/7/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Jul 2010 01:28:53 -0000 On Thu, Jul 1, 2010 at 2:52 PM, Pyun YongHyeon wrote: > On Tue, Jun 29, 2010 at 10:13:45AM -0400, Ken Smith wrote: >> On Tue, 2010-06-29 at 09:48 +0200, Anders Nordby wrote: >> > Is it possible to get this fix into FreeBSD 7.3-RELEASE? >> >> We typically rely on developers to decide if fixes might warrant >> consideration as an Errata Notice and send email to re@ suggesting >> it. =A0It's hard for us to judge on our own - factors include things >> like the individual developers' confidence level in the fix, etc. >> > > Even though I didn't receive positive feedback from jumbo frame > users I'm pretty sure the change set will fix regression introduced > in r199011. As you might know, the bug was not detected for a very > long time(about 6 months) so I think it's better to wait 2 or 3 > weeks to get more confidence on the patch. If you have jumbo packet functional tests, I'll gladly run it on some r200 machines we have in the lab with bge(4) cards sometime in the next couple of weeks. If not, I'll have to produce the tests which will take longer. I'll see whether or not some of the test code in http://wiki.freebsd.org/VictorBilouro/TCP-IP_regression_test_suite addresses this. >> If someone(s) were to send mail to re@ suggesting this be an >> Errata Notice given your description here we would definitely >> consider it seriously. =A0As far as the general process goes that's >> the first step. Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 01:57:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33F7C1065672; Fri, 2 Jul 2010 01:57:14 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id C7F538FC08; Fri, 2 Jul 2010 01:57:13 +0000 (UTC) Received: by pvb32 with SMTP id 32so1163282pvb.13 for ; Thu, 01 Jul 2010 18:57:07 -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=iUgvey10AuB9XayWDICG+Ql6ZMZUzes53fW28vKw1e0=; b=UK4UAcIrxt1hOLSxAs1X4YcSka2HepZDP2ErmOIaE8N7IrxKc1Wp/bIv/6kECHWYrY ERTvpo/Th+sPL15HSyC8ci+fxhNLV+A2++Lb9kEqvOiD3C2XPHowjG713eOx0sFc20Tu J0CWhCd/erdvSTyeknc9GH0Ho5DICgSaRSyAs= 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=njS42ZtAqMk49Y7dlHEpSQpCCNmPpQaHi7kVyMqcE/XPGr27L2ddnPSggP1+o3kt4M sMX0Qi+F1ggopScWS8l1S0T82VSEq+2FdgJj5sRbSGPiIm+qFwdrND3A4OvQsiu6chbl wzcgy1OC9oNOY/0Jto8TUT8k6IpzTrJw2n1/s= Received: by 10.114.81.11 with SMTP id e11mr18026wab.140.1278035825763; Thu, 01 Jul 2010 18:57:05 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id d38sm1946511wam.8.2010.07.01.18.57.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 01 Jul 2010 18:57:04 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Thu, 1 Jul 2010 18:56:38 -0700 From: Pyun YongHyeon Date: Thu, 1 Jul 2010 18:56:38 -0700 To: Garrett Cooper Message-ID: <20100702015638.GM7090@michelle.cdnetworks.com> References: <201006101804.o5AI4PEX024259@svn.freebsd.org> <20100629074831.GA75332@fupp.net> <1277820825.55649.7.camel@bauer.cse.buffalo.edu> <20100701215218.GC7090@michelle.cdnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Mailman-Approved-At: Fri, 02 Jul 2010 04:38:25 +0000 Cc: Anders Nordby , src-committers@freebsd.org, Ken Smith , jdc@parodius.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-7@freebsd.org, marcel@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r208995 - stable/7/sys/dev/bge 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: Fri, 02 Jul 2010 01:57:14 -0000 On Thu, Jul 01, 2010 at 06:28:35PM -0700, Garrett Cooper wrote: > On Thu, Jul 1, 2010 at 2:52 PM, Pyun YongHyeon wrote: > > On Tue, Jun 29, 2010 at 10:13:45AM -0400, Ken Smith wrote: > >> On Tue, 2010-06-29 at 09:48 +0200, Anders Nordby wrote: > >> > Is it possible to get this fix into FreeBSD 7.3-RELEASE? > >> > >> We typically rely on developers to decide if fixes might warrant > >> consideration as an Errata Notice and send email to re@ suggesting > >> it. ?It's hard for us to judge on our own - factors include things > >> like the individual developers' confidence level in the fix, etc. > >> > > > > Even though I didn't receive positive feedback from jumbo frame > > users I'm pretty sure the change set will fix regression introduced > > in r199011. As you might know, the bug was not detected for a very > > long time(about 6 months) so I think it's better to wait 2 or 3 > > weeks to get more confidence on the patch. > > If you have jumbo packet functional tests, I'll gladly run it on some > r200 machines we have in the lab with bge(4) cards sometime in the > next couple of weeks. If not, I'll have to produce the tests which > will take longer. I'll see whether or not some of the test code in > http://wiki.freebsd.org/VictorBilouro/TCP-IP_regression_test_suite > addresses this. > To reproduce the issue you should be able to generate very high rate of PPS and make kernel resource shortage condition. It would be hard to trigger the issue with self-clocking protocols like TCP. Alternatively, patching driver to add intentional delays and reducing number of available mbufs may help to trigger the issue. > >> If someone(s) were to send mail to re@ suggesting this be an > >> Errata Notice given your description here we would definitely > >> consider it seriously. ?As far as the general process goes that's > >> the first step. > > Thanks! > -Garrett From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 06:48:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BD9D106564A; Fri, 2 Jul 2010 06:48:50 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 37D288FC19; Fri, 2 Jul 2010 06:48:48 +0000 (UTC) Received: by fxm13 with SMTP id 13so2171318fxm.13 for ; Thu, 01 Jul 2010 23:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=VTDG4uPyxmmy5qUP8yJwoZEKvTuGEbFBe8cb/8gCS4Y=; b=GSUXg+uS7X1enDiKllZTtXreqrYTPuIx1Tmv/sMxjhI/WU3JKnMH3s3L3GAug7fciT VtsjLcww6l1+4szX16Ub2O53VrTp9iFyY77HVp4alDVA6gL9aUaF19Hhy1DX87/90ZEp QW8KHhaelIgWO0Kg58AavxZlRSrOp5BAQACnA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=VD57FMkf4hHEyNjAfwMCVh2umlqdHlHfzu8hbqzE0qMQyO1xOkbi9xa/7RQm/JISd2 xMabB9MkeZsh/W2FR3s7A+s8e+GWxjTHakmURpPFbn7+jRyg4+8AvRzMCsMg4bG4gVFN 7/vIDZje0Q5LaMW2/AjprBSXUcosx8wacuRmY= Received: by 10.223.126.200 with SMTP id d8mr207018fas.101.1278053322262; Thu, 01 Jul 2010 23:48:42 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id g15sm742346faa.12.2010.07.01.23.48.40 (version=SSLv3 cipher=RC4-MD5); Thu, 01 Jul 2010 23:48:41 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C2D8BC6.8000603@FreeBSD.org> Date: Fri, 02 Jul 2010 09:48:38 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: John Baldwin References: <201007012158.o61LwkJW096565@svn.freebsd.org> <201007011822.02280.jhb@freebsd.org> In-Reply-To: <201007011822.02280.jhb@freebsd.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: r209638 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 06:48:50 -0000 John Baldwin wrote: > On Thursday 01 July 2010 05:58:46 pm Alexander Motin wrote: >> Author: mav >> Date: Thu Jul 1 21:58:46 2010 >> New Revision: 209638 >> URL: http://svn.freebsd.org/changeset/base/209638 >> >> Log: >> Make stray irq counters have format alike to other counters. Unified >> format makes string processing (for example by `systat -vm`) easier. > > As I said on the mailing lists, I actually think that the old way is a > feature. I believe bde@ also has useful input on appropriately parsing > interrupt names for systat -vmstat output. Yes, we had a long conversation with Bruce. Stray interrupts on x86 were the only case found, where some other text, unrelated to event source name, printed before "irqX". I would prefer not to have such special cases instead of trying to handle them all. With more people objecting now, despite my arguments, I'll have to obey. But I still don't think that attempts to parse unformatted string is a good idea. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 09:02:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04A1B106566B; Fri, 2 Jul 2010 09:02:40 +0000 (UTC) (envelope-from flo@smeets.im) Received: from mail.solomo.de (mail.solomo.de [IPv6:2a01:238:43fa:7100::2]) by mx1.freebsd.org (Postfix) with ESMTP id 87DEE8FC0A; Fri, 2 Jul 2010 09:02:39 +0000 (UTC) Received: from mail.solomo.de (localhost [127.0.0.1]) by mail.solomo.de (Postfix) with ESMTP id A930561C72; Fri, 2 Jul 2010 11:02:38 +0200 (CEST) X-Virus-Scanned: amavisd-new at vistream.de Received: from mail.solomo.de ([127.0.0.1]) by mail.solomo.de (mail.solomo.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2wu18EXvsSkf; Fri, 2 Jul 2010 11:02:36 +0200 (CEST) Received: from nibbler.vistream.local (relay3.vistream.de [87.139.10.28]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.solomo.de (Postfix) with ESMTPSA id 6A83661C6B; Fri, 2 Jul 2010 11:02:36 +0200 (CEST) Message-ID: <4C2DAB2B.2060907@smeets.im> Date: Fri, 02 Jul 2010 11:02:35 +0200 From: Florian Smeets User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: Alexander Motin References: <201007011851.o61IpI9r054345@svn.freebsd.org> In-Reply-To: <201007011851.o61IpI9r054345@svn.freebsd.org> 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: r209634 - head/sys/x86/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 09:02:40 -0000 On 7/1/10 8:51 PM, Alexander Motin wrote: > Author: mav > Date: Thu Jul 1 18:51:18 2010 > New Revision: 209634 > URL: http://svn.freebsd.org/changeset/base/209634 > > Log: > Rework r209456: > Instead of using fake rid (which ISA doesn't like), delete untrusted > IRQ resource and let it be recreated. > JFYI: This change allows my Soekris net5501 to boot again. It was broken by r209456, i just finished binary searching when this change flew by. :-) Thanks, Florian From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 09:17:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64B4B1065677; Fri, 2 Jul 2010 09:17:19 +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 53BCB8FC27; Fri, 2 Jul 2010 09:17:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o629HJE7045938; Fri, 2 Jul 2010 09:17:19 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o629HIfX045936; Fri, 2 Jul 2010 09:17:19 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007020917.o629HIfX045936@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 2 Jul 2010 09:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209641 - stable/8/gnu/lib/csu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Jul 2010 09:17:19 -0000 Author: kib Date: Fri Jul 2 09:17:18 2010 New Revision: 209641 URL: http://svn.freebsd.org/changeset/base/209641 Log: MFC r209294: Add -fno-asynchronous-unwind-tables to disable unwind table generation for crtbegin/crtend. While there, disable omitting the frame pointer. Modified: stable/8/gnu/lib/csu/Makefile Directory Properties: stable/8/gnu/lib/csu/ (props changed) Modified: stable/8/gnu/lib/csu/Makefile ============================================================================== --- stable/8/gnu/lib/csu/Makefile Fri Jul 2 02:20:25 2010 (r209640) +++ stable/8/gnu/lib/csu/Makefile Fri Jul 2 09:17:18 2010 (r209641) @@ -17,7 +17,8 @@ CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 CFLAGS+= -finhibit-size-directive -fno-inline-functions \ -fno-exceptions -fno-zero-initialized-in-bss \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder + -fno-zero-initialized-in-bss -fno-toplevel-reorder \ + -fno-asynchronous-unwind-tables -fno-omit-frame-pointer CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \ -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 09:19:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3D2E106566B; Fri, 2 Jul 2010 09:19:27 +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 B2D8C8FC12; Fri, 2 Jul 2010 09:19: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 o629JRgu046444; Fri, 2 Jul 2010 09:19:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o629JR4m046442; Fri, 2 Jul 2010 09:19:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007020919.o629JR4m046442@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 2 Jul 2010 09:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209642 - stable/8/lib/csu/i386-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 09:19:27 -0000 Author: kib Date: Fri Jul 2 09:19:27 2010 New Revision: 209642 URL: http://svn.freebsd.org/changeset/base/209642 Log: MFC r209295: Add unwind annotations to the asm part of crt1 on i386. Terminate the process with SIGTRAP if _start1() unexpectedly returns. Modified: stable/8/lib/csu/i386-elf/crt1_s.S Directory Properties: stable/8/lib/csu/ (props changed) Modified: stable/8/lib/csu/i386-elf/crt1_s.S ============================================================================== --- stable/8/lib/csu/i386-elf/crt1_s.S Fri Jul 2 09:17:18 2010 (r209641) +++ stable/8/lib/csu/i386-elf/crt1_s.S Fri Jul 2 09:19:27 2010 (r209642) @@ -30,15 +30,22 @@ .align 4 .globl _start .type _start, @function -_start: xorl %ebp,%ebp +_start: + .cfi_startproc + xorl %ebp,%ebp pushl %ebp + .cfi_def_cfa_offset 4 movl %esp,%ebp + .cfi_offset %ebp,-8 + .cfi_def_cfa_register %ebp andl $0xfffffff0,%esp # align stack leal 8(%ebp),%eax pushl %eax # argv pushl 4(%ebp) # argc pushl %edx # rtld cleanup call _start1 + int3 + .cfi_endproc .size _start, . - _start .ident "$FreeBSD$" From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 09:23:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 684481065674; Fri, 2 Jul 2010 09:23:06 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 578B78FC18; Fri, 2 Jul 2010 09:23:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o629N6ED047287; Fri, 2 Jul 2010 09:23:06 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o629N6ju047285; Fri, 2 Jul 2010 09:23:06 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007020923.o629N6ju047285@svn.freebsd.org> From: Maxim Konovalov Date: Fri, 2 Jul 2010 09:23: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: r209643 - stable/8/lib/libc/nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 09:23:06 -0000 Author: maxim Date: Fri Jul 2 09:23:06 2010 New Revision: 209643 URL: http://svn.freebsd.org/changeset/base/209643 Log: MFC r209360: add C message catalogue entries for newer errnos. Modified: stable/8/lib/libc/nls/ru_RU.KOI8-R.msg (contents, props changed) Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/nls/ru_RU.KOI8-R.msg ============================================================================== --- stable/8/lib/libc/nls/ru_RU.KOI8-R.msg Fri Jul 2 09:19:27 2010 (r209642) +++ stable/8/lib/libc/nls/ru_RU.KOI8-R.msg Fri Jul 2 09:23:06 2010 (r209643) @@ -183,6 +183,16 @@ $ ENOATTR 87 áÔÒÉÂÕÔ ÎÅ ÎÁÊÄÅÎ $ EDOOFUS 88 ïÛÉÂËÁ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ +$ EBADMSG +89 ðÌÏÈÏÊ ÆÏÒÍÁÔ ÓÏÏÂÝÅÎÉÑ +$ EMULTIHOP +90 ðÏÐÙÔËÁ ÍÕÌØÔÉÈÏÐÁ +$ ENOLINK +91 ëÁÎÁÌ ÒÁÚÏÒ×ÁÎ +$ EPROTO +92 ïÛÉÂËÁ ÐÒÏÔÏËÏÌÁ +$ ENOTCAPABLE +93 îÅÄÏÓÔÁÔÏÞÎÏ ×ÏÚÍÏÖÎÏÓÔÅÊ $ $ strsignal() support catalog $ From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 09:53:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE14D106566C; Fri, 2 Jul 2010 09:53:26 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D8BC8FC12; Fri, 2 Jul 2010 09:53: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 o629rQvQ053963; Fri, 2 Jul 2010 09:53:26 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o629rQHI053961; Fri, 2 Jul 2010 09:53:26 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201007020953.o629rQHI053961@svn.freebsd.org> From: Randall Stewart Date: Fri, 2 Jul 2010 09:53: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: r209644 - 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, 02 Jul 2010 09:53:26 -0000 Author: rrs Date: Fri Jul 2 09:53:26 2010 New Revision: 209644 URL: http://svn.freebsd.org/changeset/base/209644 Log: Fix a bug that WILL cause a panic. Basically a read-lock is being called to check the vtag-timewait cache. Then in two cases (where a vtag is bad i.e. in the time-wait state) the write-unlock is called NOT the read-unlock. Under conditions where lots of associations are coming and going this will cause the system to panic at some point. MFC after: 3 days Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Fri Jul 2 09:23:06 2010 (r209643) +++ head/sys/netinet/sctp_pcb.c Fri Jul 2 09:53:26 2010 (r209644) @@ -6499,7 +6499,7 @@ sctp_is_vtag_good(struct sctp_inpcb *inp continue; } /* Its a used tag set */ - SCTP_INP_INFO_WUNLOCK(); + SCTP_INP_INFO_RUNLOCK(); return (0); } } @@ -6528,7 +6528,7 @@ skip_vtag_check: (twait_block->vtag_block[i].lport == lport) && (twait_block->vtag_block[i].rport == rport)) { /* Bad tag, sorry :< */ - SCTP_INP_INFO_WUNLOCK(); + SCTP_INP_INFO_RUNLOCK(); return (0); } } From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 10:23:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AF4A1065676; Fri, 2 Jul 2010 10:23:07 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED198FC0C; Fri, 2 Jul 2010 10:23:06 +0000 (UTC) Received: by qyk7 with SMTP id 7so372379qyk.13 for ; Fri, 02 Jul 2010 03:23:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/DMaoxCKeleW8rZSJnZcGIw4e1fQnoMqM8rZPhSGbIM=; b=lBPwMdUkIZ7x97H05cmJVzJmlx1Y1tCtNIOgJ9DfaO0dcMZQ5feTXktLB5ZHtO+/ic G7sh9atGcp3dzWLpVA7+V2CgXxaNPjTlCaNltzh3oEBu5rsAluNJ4F5MQSzV2aeeifIi ug55cWdkXEX5K0BDZJW7RrUKdGLqB5aCgtroQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AtlGKDVrJvYCaiDOiFHqXB/tqCJtvYuXjvLoPPVh37Psm5rMzAxHmTHoGfgU3cbD4D YczBZUkoh63HdcsFBffuF8jc1UGVVz0gcn6IhcucZICpMC0gbKbB3550rNqPJl6xCZRj NbQymQu+GJ9G5bLUfzomNrUnoF/CshpmJeUvM= MIME-Version: 1.0 Received: by 10.229.241.200 with SMTP id lf8mr5900qcb.53.1278034115719; Thu, 01 Jul 2010 18:28:35 -0700 (PDT) Received: by 10.229.221.83 with HTTP; Thu, 1 Jul 2010 18:28:35 -0700 (PDT) In-Reply-To: <20100701215218.GC7090@michelle.cdnetworks.com> References: <201006101804.o5AI4PEX024259@svn.freebsd.org> <20100629074831.GA75332@fupp.net> <1277820825.55649.7.camel@bauer.cse.buffalo.edu> <20100701215218.GC7090@michelle.cdnetworks.com> Date: Thu, 1 Jul 2010 18:28:35 -0700 Message-ID: From: Garrett Cooper To: pyunyh@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 02 Jul 2010 11:12:18 +0000 Cc: Anders Nordby , src-committers@freebsd.org, Ken Smith , jdc@parodius.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-7@freebsd.org, marcel@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r208995 - stable/7/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Jul 2010 10:23:07 -0000 On Thu, Jul 1, 2010 at 2:52 PM, Pyun YongHyeon wrote: > On Tue, Jun 29, 2010 at 10:13:45AM -0400, Ken Smith wrote: >> On Tue, 2010-06-29 at 09:48 +0200, Anders Nordby wrote: >> > Is it possible to get this fix into FreeBSD 7.3-RELEASE? >> >> We typically rely on developers to decide if fixes might warrant >> consideration as an Errata Notice and send email to re@ suggesting >> it. =A0It's hard for us to judge on our own - factors include things >> like the individual developers' confidence level in the fix, etc. >> > > Even though I didn't receive positive feedback from jumbo frame > users I'm pretty sure the change set will fix regression introduced > in r199011. As you might know, the bug was not detected for a very > long time(about 6 months) so I think it's better to wait 2 or 3 > weeks to get more confidence on the patch. If you have jumbo packet functional tests, I'll gladly run it on some r200 machines we have in the lab with bge(4) cards sometime in the next couple of weeks. If not, I'll have to produce the tests which will take longer. I'll see whether or not some of the test code in http://wiki.freebsd.org/VictorBilouro/TCP-IP_regression_test_suite addresses this. >> If someone(s) were to send mail to re@ suggesting this be an >> Errata Notice given your description here we would definitely >> consider it seriously. =A0As far as the general process goes that's >> the first step. Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 12:01:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 314B1106567A; Fri, 2 Jul 2010 12:01:47 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 166568FC2A; Fri, 2 Jul 2010 12:01:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o62C1ka3086241; Fri, 2 Jul 2010 12:01:46 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o62C1khS086240; Fri, 2 Jul 2010 12:01:46 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007021201.o62C1khS086240@svn.freebsd.org> From: "Jayachandran C." Date: Fri, 2 Jul 2010 12:01: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: r209645 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 12:01:47 -0000 Author: jchandra Date: Fri Jul 2 12:01:46 2010 New Revision: 209645 URL: http://svn.freebsd.org/changeset/base/209645 Log: Remove save/restore of PageMask in tlb.c functions introduced in r209243. If we save/restore the PageMask, the value set by the bootloader will persist, and will cause problems later in TLB exception handler. This caused a crash in AR71xx boards. Also fixes the EntryHi mask in pte.h Reported by: Luiz Otavio O Souza Tested by: Luiz Otavio O Souza Approved by: rrs (mentor) Modified: head/sys/mips/include/pte.h head/sys/mips/mips/tlb.c Modified: head/sys/mips/include/pte.h ============================================================================== --- head/sys/mips/include/pte.h Fri Jul 2 09:53:26 2010 (r209644) +++ head/sys/mips/include/pte.h Fri Jul 2 12:01:46 2010 (r209645) @@ -73,7 +73,8 @@ * Note that in FreeBSD, we map 2 TLB pages is equal to 1 VM page. */ #define TLBHI_ASID_MASK (0xff) -#define TLBHI_ENTRY(va, asid) (((va) & ~PAGE_MASK) | ((asid) & TLBHI_ASID_MASK)) +#define TLBHI_PAGE_MASK (2 * PAGE_SIZE - 1) +#define TLBHI_ENTRY(va, asid) (((va) & ~TLBHI_PAGE_MASK) | ((asid) & TLBHI_ASID_MASK)) #ifndef _LOCORE typedef uint32_t pt_entry_t; Modified: head/sys/mips/mips/tlb.c ============================================================================== --- head/sys/mips/mips/tlb.c Fri Jul 2 09:53:26 2010 (r209644) +++ head/sys/mips/mips/tlb.c Fri Jul 2 12:01:46 2010 (r209645) @@ -91,13 +91,12 @@ static void tlb_invalidate_one(unsigned) void tlb_insert_wired(unsigned i, vm_offset_t va, pt_entry_t pte0, pt_entry_t pte1) { - register_t mask, asid; + register_t asid; register_t s; va &= ~PAGE_MASK; s = intr_disable(); - mask = mips_rd_pagemask(); asid = mips_rd_entryhi() & TLBHI_ASID_MASK; mips_wr_index(i); @@ -108,21 +107,19 @@ tlb_insert_wired(unsigned i, vm_offset_t tlb_write_indexed(); mips_wr_entryhi(asid); - mips_wr_pagemask(mask); intr_restore(s); } void tlb_invalidate_address(struct pmap *pmap, vm_offset_t va) { - register_t mask, asid; + register_t asid; register_t s; int i; va &= ~PAGE_MASK; s = intr_disable(); - mask = mips_rd_pagemask(); asid = mips_rd_entryhi() & TLBHI_ASID_MASK; mips_wr_pagemask(0); @@ -133,38 +130,34 @@ tlb_invalidate_address(struct pmap *pmap tlb_invalidate_one(i); mips_wr_entryhi(asid); - mips_wr_pagemask(mask); intr_restore(s); } void tlb_invalidate_all(void) { - register_t mask, asid; + register_t asid; register_t s; unsigned i; s = intr_disable(); - mask = mips_rd_pagemask(); asid = mips_rd_entryhi() & TLBHI_ASID_MASK; for (i = mips_rd_wired(); i < num_tlbentries; i++) tlb_invalidate_one(i); mips_wr_entryhi(asid); - mips_wr_pagemask(mask); intr_restore(s); } void tlb_invalidate_all_user(struct pmap *pmap) { - register_t mask, asid; + register_t asid; register_t s; unsigned i; s = intr_disable(); - mask = mips_rd_pagemask(); asid = mips_rd_entryhi() & TLBHI_ASID_MASK; for (i = mips_rd_wired(); i < num_tlbentries; i++) { @@ -191,7 +184,6 @@ tlb_invalidate_all_user(struct pmap *pma } mips_wr_entryhi(asid); - mips_wr_pagemask(mask); intr_restore(s); } @@ -217,7 +209,7 @@ tlb_save(void) void tlb_update(struct pmap *pmap, vm_offset_t va, pt_entry_t pte) { - register_t mask, asid; + register_t asid; register_t s; int i; @@ -225,7 +217,6 @@ tlb_update(struct pmap *pmap, vm_offset_ pte &= ~TLBLO_SWBITS_MASK; s = intr_disable(); - mask = mips_rd_pagemask(); asid = mips_rd_entryhi() & TLBHI_ASID_MASK; mips_wr_pagemask(0); @@ -244,7 +235,6 @@ tlb_update(struct pmap *pmap, vm_offset_ } mips_wr_entryhi(asid); - mips_wr_pagemask(mask); intr_restore(s); } From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 13:30:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EC6F106566C; Fri, 2 Jul 2010 13:30:27 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E10A8FC13; Fri, 2 Jul 2010 13: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 o62DURo1006770; Fri, 2 Jul 2010 13:30:27 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o62DUR19006767; Fri, 2 Jul 2010 13:30:27 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007021330.o62DUR19006767@svn.freebsd.org> From: "Jayachandran C." Date: Fri, 2 Jul 2010 13:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209646 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 13:30:27 -0000 Author: jchandra Date: Fri Jul 2 13:30:26 2010 New Revision: 209646 URL: http://svn.freebsd.org/changeset/base/209646 Log: Add support for XLS 108 chips - update board.c/board.h to setup GMAC driver parameters correctly. Approved by: rrs (mentor) Obtained from: Sriram Gorti Modified: head/sys/mips/rmi/board.c head/sys/mips/rmi/board.h Modified: head/sys/mips/rmi/board.c ============================================================================== --- head/sys/mips/rmi/board.c Fri Jul 2 12:01:46 2010 (r209645) +++ head/sys/mips/rmi/board.c Fri Jul 2 13:30:26 2010 (r209646) @@ -127,7 +127,7 @@ xlr_board_info_setup() /* network block 1 */ xlr_board_info.gmac_block[1].type = XLR_GMAC; - xlr_board_info.gmac_block[1].enabled = 0xf; + xlr_board_info.gmac_block[1].enabled = xlr_is_xls1xx() ? 0 : 0xf; if (xlr_is_xls4xx_lite()) { xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_GPIO_OFFSET); uint32_t tmp; Modified: head/sys/mips/rmi/board.h ============================================================================== --- head/sys/mips/rmi/board.h Fri Jul 2 12:01:46 2010 (r209645) +++ head/sys/mips/rmi/board.h Fri Jul 2 13:30:26 2010 (r209646) @@ -77,7 +77,8 @@ xlr_is_xls(void) { uint32_t prid = mips_rd_prid(); - return (prid & 0xf000) == 0x8000 || (prid & 0xf000) == 0x4000; + return ((prid & 0xf000) == 0x8000 || (prid & 0xf000) == 0x4000 || + (prid & 0xf000) == 0xc000); } /* @@ -110,6 +111,14 @@ xlr_board_pci(void) } static __inline__ int +xlr_is_xls1xx(void) +{ + uint32_t chipid = xlr_processor_id(); + + return (chipid == 0xce || chipid == 0xcf); +} + +static __inline__ int xlr_is_xls2xx(void) { uint32_t chipid = xlr_processor_id(); From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 15:02:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7F65106566B; Fri, 2 Jul 2010 15:02:51 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C721B8FC16; Fri, 2 Jul 2010 15:02: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 o62F2pCZ026985; Fri, 2 Jul 2010 15:02:51 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o62F2p1f026980; Fri, 2 Jul 2010 15:02:51 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201007021502.o62F2p1f026980@svn.freebsd.org> From: Alan Cox Date: Fri, 2 Jul 2010 15:02: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: r209647 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 15:02:51 -0000 Author: alc Date: Fri Jul 2 15:02:51 2010 New Revision: 209647 URL: http://svn.freebsd.org/changeset/base/209647 Log: With the demise of page coloring, the page queue macros no longer serve any useful purpose. Eliminate them. Reviewed by: kib Modified: head/sys/vm/vm_contig.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Fri Jul 2 13:30:26 2010 (r209646) +++ head/sys/vm/vm_contig.c Fri Jul 2 15:02:51 2010 (r209647) @@ -175,7 +175,7 @@ vm_contig_launder(int queue, vm_paddr_t vm_page_unlock(m); continue; } - KASSERT(VM_PAGE_INQUEUE2(m, queue), + KASSERT(m->queue == queue, ("vm_contig_launder: page %p's queue is not %d", m, queue)); error = vm_contig_launder_page(m, &next); vm_page_lock_assert(m, MA_NOTOWNED); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Jul 2 13:30:26 2010 (r209646) +++ head/sys/vm/vm_page.c Fri Jul 2 15:02:51 2010 (r209647) @@ -592,7 +592,7 @@ vm_page_unhold(vm_page_t mem) vm_page_lock_assert(mem, MA_OWNED); --mem->hold_count; KASSERT(mem->hold_count >= 0, ("vm_page_unhold: hold count < 0!!!")); - if (mem->hold_count == 0 && VM_PAGE_INQUEUE2(mem, PQ_HOLD)) + if (mem->hold_count == 0 && mem->queue == PQ_HOLD) vm_page_free_toq(mem); } @@ -1381,10 +1381,11 @@ vm_waitpfault(void) void vm_page_requeue(vm_page_t m) { - int queue = VM_PAGE_GETQUEUE(m); struct vpgqueues *vpq; + int queue; mtx_assert(&vm_page_queue_mtx, MA_OWNED); + queue = m->queue; KASSERT(queue != PQ_NONE, ("vm_page_requeue: page %p is not queued", m)); vpq = &vm_page_queues[queue]; @@ -1422,12 +1423,12 @@ vm_page_queue_remove(int queue, vm_page_ void vm_pageq_remove(vm_page_t m) { - int queue = VM_PAGE_GETQUEUE(m); + int queue; vm_page_lock_assert(m, MA_OWNED); - if (queue != PQ_NONE) { + if ((queue = m->queue) != PQ_NONE) { vm_page_lock_queues(); - VM_PAGE_SETQUEUE2(m, PQ_NONE); + m->queue = PQ_NONE; vm_page_queue_remove(queue, m); vm_page_unlock_queues(); } @@ -1446,7 +1447,7 @@ vm_page_enqueue(int queue, vm_page_t m) struct vpgqueues *vpq; vpq = &vm_page_queues[queue]; - VM_PAGE_SETQUEUE2(m, queue); + m->queue = queue; TAILQ_INSERT_TAIL(&vpq->pl, m, pageq); ++*vpq->cnt; } @@ -1467,7 +1468,7 @@ vm_page_activate(vm_page_t m) int queue; vm_page_lock_assert(m, MA_OWNED); - if ((queue = VM_PAGE_GETKNOWNQUEUE2(m)) != PQ_ACTIVE) { + if ((queue = m->queue) != PQ_ACTIVE) { if (m->wire_count == 0 && (m->flags & PG_UNMANAGED) == 0) { if (m->act_count < ACT_INIT) m->act_count = ACT_INIT; @@ -1728,7 +1729,7 @@ _vm_page_deactivate(vm_page_t m, int ath /* * Ignore if already inactive. */ - if ((queue = VM_PAGE_GETKNOWNQUEUE2(m)) == PQ_INACTIVE) + if ((queue = m->queue) == PQ_INACTIVE) return; if (m->wire_count == 0 && (m->flags & PG_UNMANAGED) == 0) { vm_page_lock_queues(); @@ -1741,7 +1742,7 @@ _vm_page_deactivate(vm_page_t m, int ath else TAILQ_INSERT_TAIL(&vm_page_queues[PQ_INACTIVE].pl, m, pageq); - VM_PAGE_SETQUEUE2(m, PQ_INACTIVE); + m->queue = PQ_INACTIVE; cnt.v_inactive_count++; vm_page_unlock_queues(); } @@ -1954,8 +1955,7 @@ vm_page_dontneed(vm_page_t m) /* * Occasionally leave the page alone. */ - if ((dnw & 0x01F0) == 0 || - VM_PAGE_INQUEUE2(m, PQ_INACTIVE)) { + if ((dnw & 0x01F0) == 0 || m->queue == PQ_INACTIVE) { if (m->act_count >= ACT_INIT) --m->act_count; return; Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Fri Jul 2 13:30:26 2010 (r209646) +++ head/sys/vm/vm_page.h Fri Jul 2 15:02:51 2010 (r209647) @@ -153,18 +153,6 @@ struct vm_page { #define PQ_HOLD 3 #define PQ_COUNT 4 -/* Returns the real queue a page is on. */ -#define VM_PAGE_GETQUEUE(m) ((m)->queue) - -/* Returns the well known queue a page is on. */ -#define VM_PAGE_GETKNOWNQUEUE2(m) VM_PAGE_GETQUEUE(m) - -/* Returns true if the page is in the named well known queue. */ -#define VM_PAGE_INQUEUE2(m, q) (VM_PAGE_GETKNOWNQUEUE2(m) == (q)) - -/* Sets the queue a page is on. */ -#define VM_PAGE_SETQUEUE2(m, q) (VM_PAGE_GETQUEUE(m) = (q)) - struct vpgqueues { struct pglist pl; int *cnt; Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri Jul 2 13:30:26 2010 (r209646) +++ head/sys/vm/vm_pageout.c Fri Jul 2 15:02:51 2010 (r209647) @@ -773,9 +773,8 @@ rescan0: cnt.v_pdpages++; - if (VM_PAGE_GETQUEUE(m) != PQ_INACTIVE) { + if (m->queue != PQ_INACTIVE) goto rescan0; - } next = TAILQ_NEXT(m, pageq); @@ -1025,7 +1024,7 @@ rescan0: * above. The page might have been freed and * reused for another vnode. */ - if (VM_PAGE_GETQUEUE(m) != PQ_INACTIVE || + if (m->queue != PQ_INACTIVE || m->object != object || TAILQ_NEXT(m, pageq) != &marker) { vm_page_unlock(m); @@ -1115,7 +1114,7 @@ unlock_and_continue: while ((m != NULL) && (pcount-- > 0) && (page_shortage > 0)) { - KASSERT(VM_PAGE_INQUEUE2(m, PQ_ACTIVE), + KASSERT(m->queue == PQ_ACTIVE, ("vm_pageout_scan: page %p isn't active", m)); next = TAILQ_NEXT(m, pageq); @@ -1379,7 +1378,7 @@ vm_pageout_page_stats() while ((m != NULL) && (pcount-- > 0)) { int actcount; - KASSERT(VM_PAGE_INQUEUE2(m, PQ_ACTIVE), + KASSERT(m->queue == PQ_ACTIVE, ("vm_pageout_page_stats: page %p isn't active", m)); next = TAILQ_NEXT(m, pageq); From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 15:50:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8861D106564A; Fri, 2 Jul 2010 15:50:30 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 785268FC1E; Fri, 2 Jul 2010 15:50: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 o62FoUjQ037412; Fri, 2 Jul 2010 15:50:30 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o62FoUH7037410; Fri, 2 Jul 2010 15:50:30 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201007021550.o62FoUH7037410@svn.freebsd.org> From: Alan Cox Date: Fri, 2 Jul 2010 15:50: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: r209648 - 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, 02 Jul 2010 15:50:30 -0000 Author: alc Date: Fri Jul 2 15:50:30 2010 New Revision: 209648 URL: http://svn.freebsd.org/changeset/base/209648 Log: Use vm_page_next() instead of vm_page_lookup() in exec_map_first_page() because vm_page_next() is faster. Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Fri Jul 2 15:02:51 2010 (r209647) +++ head/sys/kern/kern_exec.c Fri Jul 2 15:50:30 2010 (r209648) @@ -935,7 +935,7 @@ exec_map_first_page(imgp) if (initial_pagein > object->size) initial_pagein = object->size; for (i = 1; i < initial_pagein; i++) { - if ((ma[i] = vm_page_lookup(object, i)) != NULL) { + if ((ma[i] = vm_page_next(ma[i - 1])) != NULL) { if (ma[i]->valid) break; if ((ma[i]->oflags & VPO_BUSY) || ma[i]->busy) From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 17:22:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04E55106566C; Fri, 2 Jul 2010 17:22:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E86D28FC13; Fri, 2 Jul 2010 17:22: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 o62HMFCR057511; Fri, 2 Jul 2010 17:22:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o62HMFTs057508; Fri, 2 Jul 2010 17:22:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007021722.o62HMFTs057508@svn.freebsd.org> From: Alexander Motin Date: Fri, 2 Jul 2010 17:22: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: r209649 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 17:22:16 -0000 Author: mav Date: Fri Jul 2 17:22:15 2010 New Revision: 209649 URL: http://svn.freebsd.org/changeset/base/209649 Log: Revert r209638. After commit, there appeared to be more people who liked previous name of stray interrupt counters, then responded to the list. Modified: head/sys/amd64/amd64/intr_machdep.c head/sys/i386/i386/intr_machdep.c Modified: head/sys/amd64/amd64/intr_machdep.c ============================================================================== --- head/sys/amd64/amd64/intr_machdep.c Fri Jul 2 15:50:30 2010 (r209648) +++ head/sys/amd64/amd64/intr_machdep.c Fri Jul 2 17:22:15 2010 (r209649) @@ -346,8 +346,8 @@ intrcnt_register(struct intsrc *is) mtx_lock_spin(&intrcnt_lock); is->is_index = intrcnt_index; intrcnt_index += 2; - snprintf(straystr, MAXCOMLEN + 1, "%s stray", - is->is_event->ie_name); + snprintf(straystr, MAXCOMLEN + 1, "stray irq%d", + is->is_pic->pic_vector(is)); intrcnt_updatename(is); is->is_count = &intrcnt[is->is_index]; intrcnt_setname(straystr, is->is_index + 1); Modified: head/sys/i386/i386/intr_machdep.c ============================================================================== --- head/sys/i386/i386/intr_machdep.c Fri Jul 2 15:50:30 2010 (r209648) +++ head/sys/i386/i386/intr_machdep.c Fri Jul 2 17:22:15 2010 (r209649) @@ -334,8 +334,8 @@ intrcnt_register(struct intsrc *is) mtx_lock_spin(&intrcnt_lock); is->is_index = intrcnt_index; intrcnt_index += 2; - snprintf(straystr, MAXCOMLEN + 1, "%s stray", - is->is_event->ie_name); + snprintf(straystr, MAXCOMLEN + 1, "stray irq%d", + is->is_pic->pic_vector(is)); intrcnt_updatename(is); is->is_count = &intrcnt[is->is_index]; intrcnt_setname(straystr, is->is_index + 1); From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 19:59:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 867FE106564A; Fri, 2 Jul 2010 19:59:18 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B8DB8FC0C; Fri, 2 Jul 2010 19: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 o62JxIWJ091919; Fri, 2 Jul 2010 19:59:18 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o62JxIYH091917; Fri, 2 Jul 2010 19:59:18 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201007021959.o62JxIYH091917@svn.freebsd.org> From: Alan Cox Date: Fri, 2 Jul 2010 19:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209650 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 19:59:18 -0000 Author: alc Date: Fri Jul 2 19:59:18 2010 New Revision: 209650 URL: http://svn.freebsd.org/changeset/base/209650 Log: Use vm_page_prev() instead of vm_page_lookup() in the implementation of vm_fault()'s automatic delete-behind heuristic. vm_page_prev() is typically faster. Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri Jul 2 17:22:15 2010 (r209649) +++ head/sys/vm/vm_fault.c Fri Jul 2 19:59:18 2010 (r209650) @@ -214,7 +214,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr boolean_t growstack, wired; int map_generation; vm_object_t next_object; - vm_page_t marray[VM_FAULT_READ]; + vm_page_t marray[VM_FAULT_READ], mt, mt_prev; int hardfault; int faultcount, ahead, behind, alloc_req; struct faultstate fs; @@ -465,26 +465,28 @@ readrest: fs.first_object->type != OBJT_DEVICE && fs.first_object->type != OBJT_PHYS && fs.first_object->type != OBJT_SG) { - vm_pindex_t firstpindex, tmppindex; + vm_pindex_t firstpindex; if (fs.first_pindex < 2 * VM_FAULT_READ) firstpindex = 0; else firstpindex = fs.first_pindex - 2 * VM_FAULT_READ; + mt = fs.first_object != fs.object ? + fs.first_m : fs.m; + KASSERT(mt != NULL, ("vm_fault: missing mt")); + KASSERT((mt->oflags & VPO_BUSY) != 0, + ("vm_fault: mt %p not busy", mt)); + mt_prev = vm_page_prev(mt); /* * note: partially valid pages cannot be * included in the lookahead - NFS piecemeal * writes will barf on it badly. */ - for (tmppindex = fs.first_pindex - 1; - tmppindex >= firstpindex; - --tmppindex) { - vm_page_t mt; - - mt = vm_page_lookup(fs.first_object, tmppindex); - if (mt == NULL || (mt->valid != VM_PAGE_BITS_ALL)) - break; + while ((mt = mt_prev) != NULL && + mt->pindex >= firstpindex && + mt->valid == VM_PAGE_BITS_ALL) { + mt_prev = vm_page_prev(mt); if (mt->busy || (mt->oflags & VPO_BUSY)) continue; From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 20:56:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C29F51065670; Fri, 2 Jul 2010 20:56:22 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B254F8FC0C; Fri, 2 Jul 2010 20:56: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 o62KuMFV004627; Fri, 2 Jul 2010 20:56:22 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o62KuMWN004625; Fri, 2 Jul 2010 20:56:22 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201007022056.o62KuMWN004625@svn.freebsd.org> From: Alan Cox Date: Fri, 2 Jul 2010 20:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209651 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 20:56:22 -0000 Author: alc Date: Fri Jul 2 20:56:22 2010 New Revision: 209651 URL: http://svn.freebsd.org/changeset/base/209651 Log: Push down the acquisition of the page queues lock into vm_pageout_page_stats(). In particular, avoid acquiring the page queues lock unless iterating over the active queue. Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri Jul 2 19:59:18 2010 (r209650) +++ head/sys/vm/vm_pageout.c Fri Jul 2 20:56:22 2010 (r209651) @@ -1355,7 +1355,6 @@ vm_pageout_page_stats() static int fullintervalcount = 0; int page_shortage; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); page_shortage = (cnt.v_inactive_target + cnt.v_cache_max + cnt.v_free_min) - (cnt.v_free_count + cnt.v_inactive_count + cnt.v_cache_count); @@ -1363,6 +1362,7 @@ vm_pageout_page_stats() if (page_shortage <= 0) return; + vm_page_lock_queues(); pcount = cnt.v_active_count; fullintervalcount += vm_pageout_stats_interval; if (fullintervalcount < vm_pageout_full_stats_interval) { @@ -1448,6 +1448,7 @@ vm_pageout_page_stats() VM_OBJECT_UNLOCK(object); m = next; } + vm_page_unlock_queues(); } /* @@ -1569,9 +1570,7 @@ vm_pageout() if (error && !vm_pages_needed) { mtx_unlock(&vm_page_queue_free_mtx); pass = 0; - vm_page_lock_queues(); vm_pageout_page_stats(); - vm_page_unlock_queues(); continue; } } From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 21:31:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7400F106564A; Fri, 2 Jul 2010 21:31:24 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 631F98FC16; Fri, 2 Jul 2010 21:31: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 o62LVOfE012323; Fri, 2 Jul 2010 21:31:24 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o62LVOI1012321; Fri, 2 Jul 2010 21:31:24 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201007022131.o62LVOI1012321@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 2 Jul 2010 21:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209652 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Jul 2010 21:31:24 -0000 Author: jilles Date: Fri Jul 2 21:31:24 2010 New Revision: 209652 URL: http://svn.freebsd.org/changeset/base/209652 Log: sh: Remove comment that the comma operator is missing in arithmetic expansion. The comma operator is not listed in POSIX.1-2008 XCU 1.1.2.1 Arithmetic Precision and Operations (referenced by XCU 2.6.4 Arithmetic Expansion) and is therefore not required. Modified: head/tools/regression/bin/sh/expansion/arith2.0 Modified: head/tools/regression/bin/sh/expansion/arith2.0 ============================================================================== --- head/tools/regression/bin/sh/expansion/arith2.0 Fri Jul 2 20:56:22 2010 (r209651) +++ head/tools/regression/bin/sh/expansion/arith2.0 Fri Jul 2 21:31:24 2010 (r209652) @@ -72,6 +72,6 @@ check "v" 10 check "(v=42)&&(v|=32)==42" 1 check "v" 42 -# missing: ternary, comma +# missing: ternary exit $((failures != 0)) From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 22:16:40 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACCDA1065670; Fri, 2 Jul 2010 22:16:40 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 6812D8FC08; Fri, 2 Jul 2010 22:16:40 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o62MGdiU031428; Fri, 2 Jul 2010 18:16:39 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o62MGcWD031427; Fri, 2 Jul 2010 18:16:38 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Fri, 2 Jul 2010 18:16:38 -0400 From: David Schultz To: Marcel Moolenaar Message-ID: <20100702221638.GA31280@zim.MIT.EDU> Mail-Followup-To: Marcel Moolenaar , Bruce Evans , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201006300140.o5U1eQVG097566@svn.freebsd.org> <20100630184517.B51465@delplex.bde.org> <79DD181D-3885-45F5-9E9D-753553D19891@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79DD181D-3885-45F5-9E9D-753553D19891@mac.com> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, Marcel Moolenaar , src-committers@FreeBSD.ORG, Bruce Evans Subject: Re: svn commit: r209604 - head/lib/libc/gmon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Jul 2010 22:16:40 -0000 On Wed, Jun 30, 2010, Marcel Moolenaar wrote: > >> s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1; > > > > I can't see any bugs in this expression. p->kcountsize is < o, and the > > scale factor is only 65536, so there should be no problems with overflow. > > This leaves GCC a the problem. What does the generated assembly look like, and what are the inputs that screw up? PowerPC doesn't have an instruction to convert integer types to floats, so that's done in software. The hardest/most esoteric is the conversion from a 64-bit int to a float (as above with kcountsize), so it wouldn't be surprising if that's buggy. From owner-svn-src-all@FreeBSD.ORG Fri Jul 2 22:17:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F37F1065670; Fri, 2 Jul 2010 22:17:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E72D8FC1B; Fri, 2 Jul 2010 22:17: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 o62MHEXL023660; Fri, 2 Jul 2010 22:17:14 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o62MHE58023658; Fri, 2 Jul 2010 22:17:14 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201007022217.o62MHE58023658@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 2 Jul 2010 22:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209653 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 22:17:14 -0000 Author: jilles Date: Fri Jul 2 22:17:13 2010 New Revision: 209653 URL: http://svn.freebsd.org/changeset/base/209653 Log: sh: Use $PWD instead of getcwd() for the \w and \W prompt expansions. This ensures that the logical working directory (which may include symlinks) is shown and is similar to the default behaviour of the pwd builtin. Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Fri Jul 2 21:31:24 2010 (r209652) +++ head/bin/sh/parser.c Fri Jul 2 22:17:13 2010 (r209653) @@ -1734,7 +1734,8 @@ getprompt(void *unused __unused) { static char ps[PROMPTLEN]; char *fmt; - int i, j, trim; + const char *pwd; + int i, trim; static char internal_error[] = ""; /* @@ -1785,17 +1786,15 @@ getprompt(void *unused __unused) */ case 'W': case 'w': - ps[i] = '\0'; - getcwd(&ps[i], PROMPTLEN - i); - if (*fmt == 'W' && ps[i + 1] != '\0') { - /* Final path component only. */ - trim = 1; - for (j = i; ps[j] != '\0'; j++) - if (ps[j] == '/') - trim = j + 1; - memmove(&ps[i], &ps[trim], - j - trim + 1); - } + pwd = lookupvar("PWD"); + if (pwd == NULL) + pwd = "?"; + if (*fmt == 'W' && + *pwd == '/' && pwd[1] != '\0') + strlcpy(&ps[i], strrchr(pwd, '/') + 1, + PROMPTLEN - i); + else + strlcpy(&ps[i], pwd, PROMPTLEN - i); /* Skip to end of path. */ while (ps[i + 1] != '\0') i++; From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 09:42:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E717C1065673; Sat, 3 Jul 2010 09:42:15 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5ACA8FC1A; Sat, 3 Jul 2010 09:42: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 o639gFZP073593; Sat, 3 Jul 2010 09:42:15 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o639gFOd073591; Sat, 3 Jul 2010 09:42:15 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201007030942.o639gFOd073591@svn.freebsd.org> From: Christian Brueffer Date: Sat, 3 Jul 2010 09:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209655 - stable/8/contrib/ipfilter/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 09:42:16 -0000 Author: brueffer Date: Sat Jul 3 09:42:15 2010 New Revision: 209655 URL: http://svn.freebsd.org/changeset/base/209655 Log: MFC: r207945 Comment in the BUGS section header. Matches what's in ipfilter 5.10. Modified: stable/8/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/8/contrib/ipfilter/ (props changed) Modified: stable/8/contrib/ipfilter/man/ipmon.8 ============================================================================== --- stable/8/contrib/ipfilter/man/ipmon.8 Sat Jul 3 09:41:12 2010 (r209654) +++ stable/8/contrib/ipfilter/man/ipmon.8 Sat Jul 3 09:42:15 2010 (r209655) @@ -181,6 +181,6 @@ recorded data. /etc/services .SH SEE ALSO ipl(4), ipf(8), ipfstat(8), ipnat(8) -.\".SH BUGS +.SH BUGS .PP If you find any, please send email to me at darrenr@pobox.com From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 09:47:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD58B1065673; Sat, 3 Jul 2010 09:47:12 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBDB28FC1E; Sat, 3 Jul 2010 09:47: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 o639lC1R074749; Sat, 3 Jul 2010 09:47:12 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o639lCVc074747; Sat, 3 Jul 2010 09:47:12 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201007030947.o639lCVc074747@svn.freebsd.org> From: Christian Brueffer Date: Sat, 3 Jul 2010 09:47: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: r209656 - stable/7/contrib/ipfilter/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 09:47:13 -0000 Author: brueffer Date: Sat Jul 3 09:47:12 2010 New Revision: 209656 URL: http://svn.freebsd.org/changeset/base/209656 Log: MFC: r207945 Comment in the BUGS section header. Matches what's in ipfilter 5.10. Modified: stable/7/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/7/contrib/ipfilter/ (props changed) Modified: stable/7/contrib/ipfilter/man/ipmon.8 ============================================================================== --- stable/7/contrib/ipfilter/man/ipmon.8 Sat Jul 3 09:42:15 2010 (r209655) +++ stable/7/contrib/ipfilter/man/ipmon.8 Sat Jul 3 09:47:12 2010 (r209656) @@ -181,6 +181,6 @@ recorded data. /etc/services .SH SEE ALSO ipl(4), ipf(8), ipfstat(8), ipnat(8) -.\".SH BUGS +.SH BUGS .PP If you find any, please send email to me at darrenr@pobox.com From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 09:50:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1815F106566C; Sat, 3 Jul 2010 09:50:49 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06CC18FC1C; Sat, 3 Jul 2010 09:50:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o639omN3075583; Sat, 3 Jul 2010 09:50:48 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o639omOq075581; Sat, 3 Jul 2010 09:50:48 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201007030950.o639omOq075581@svn.freebsd.org> From: Christian Brueffer Date: Sat, 3 Jul 2010 09:50:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209657 - stable/8/usr.sbin/uathload X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2010 09:50:49 -0000 Author: brueffer Date: Sat Jul 3 09:50:48 2010 New Revision: 209657 URL: http://svn.freebsd.org/changeset/base/209657 Log: MFC: r207947 The -d flag is non-optional. Modified: stable/8/usr.sbin/uathload/uathload.8 Directory Properties: stable/8/usr.sbin/uathload/ (props changed) Modified: stable/8/usr.sbin/uathload/uathload.8 ============================================================================== --- stable/8/usr.sbin/uathload/uathload.8 Sat Jul 3 09:47:12 2010 (r209656) +++ stable/8/usr.sbin/uathload/uathload.8 Sat Jul 3 09:50:48 2010 (r209657) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 7, 2009 +.Dd May 11, 2010 .Dt UATHLOAD 8 .Os .Sh NAME @@ -34,7 +34,7 @@ .Sh SYNOPSIS .Nm .Op Fl v -.Op Fl d Ar ugen-device +.Fl d Ar ugen-device .Op Ar firmware-file .Sh DESCRIPTION The From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 09:53:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19D8C10656CB; Sat, 3 Jul 2010 09:53:36 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0847E8FC12; Sat, 3 Jul 2010 09:53:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o639rZgA076214; Sat, 3 Jul 2010 09:53:35 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o639rZPa076212; Sat, 3 Jul 2010 09:53:35 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201007030953.o639rZPa076212@svn.freebsd.org> From: Christian Brueffer Date: Sat, 3 Jul 2010 09:53:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209658 - 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, 03 Jul 2010 09:53:36 -0000 Author: brueffer Date: Sat Jul 3 09:53:35 2010 New Revision: 209658 URL: http://svn.freebsd.org/changeset/base/209658 Log: MFC: r207975 IBM ServeRAID M5015 SAS/SATA works. Modified: stable/8/share/man/man4/mfi.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/mfi.4 ============================================================================== --- stable/8/share/man/man4/mfi.4 Sat Jul 3 09:50:48 2010 (r209657) +++ stable/8/share/man/man4/mfi.4 Sat Jul 3 09:53:35 2010 (r209658) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 2010 +.Dd May 12, 2010 .Dt MFI 4 .Os .Sh NAME @@ -91,6 +91,8 @@ Dell PERC5 .It Dell PERC6 .It +IBM ServeRAID M5015 SAS/SATA +.It IBM ServeRAID-MR10i .It Intel RAID Controller SROMBSAS18E From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 09:54:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06F9E1065673; Sat, 3 Jul 2010 09:54:15 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9FBC8FC2B; Sat, 3 Jul 2010 09:54: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 o639sE3f076427; Sat, 3 Jul 2010 09:54:14 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o639sEe8076425; Sat, 3 Jul 2010 09:54:14 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201007030954.o639sEe8076425@svn.freebsd.org> From: Christian Brueffer Date: Sat, 3 Jul 2010 09:54: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: r209659 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 09:54:15 -0000 Author: brueffer Date: Sat Jul 3 09:54:14 2010 New Revision: 209659 URL: http://svn.freebsd.org/changeset/base/209659 Log: MFC: r207975 IBM ServeRAID M5015 SAS/SATA works. Modified: stable/7/share/man/man4/mfi.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/mfi.4 ============================================================================== --- stable/7/share/man/man4/mfi.4 Sat Jul 3 09:53:35 2010 (r209658) +++ stable/7/share/man/man4/mfi.4 Sat Jul 3 09:54:14 2010 (r209659) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 2010 +.Dd May 12, 2010 .Dt MFI 4 .Os .Sh NAME @@ -91,6 +91,8 @@ Dell PERC5 .It Dell PERC6 .It +IBM ServeRAID M5015 SAS/SATA +.It IBM ServeRAID-MR10i .It Intel RAID Controller SROMBSAS18E From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 12:09:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0FE51065674; Sat, 3 Jul 2010 12:09:45 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A00DC8FC12; Sat, 3 Jul 2010 12:09: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 o63C9juK007608; Sat, 3 Jul 2010 12:09:45 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63C9jcJ007606; Sat, 3 Jul 2010 12:09:45 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201007031209.o63C9jcJ007606@svn.freebsd.org> From: Christian Brueffer Date: Sat, 3 Jul 2010 12:09: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: r209660 - stable/8/sbin/kldstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2010 12:09:45 -0000 Author: brueffer Date: Sat Jul 3 12:09:45 2010 New Revision: 209660 URL: http://svn.freebsd.org/changeset/base/209660 Log: MFC: r207964 Casting size_t to uintmax_t is not necessary anymore. This also removes the need for stdint.h inclusion. Modified: stable/8/sbin/kldstat/kldstat.c Directory Properties: stable/8/sbin/kldstat/ (props changed) Modified: stable/8/sbin/kldstat/kldstat.c ============================================================================== --- stable/8/sbin/kldstat/kldstat.c Sat Jul 3 09:54:14 2010 (r209659) +++ stable/8/sbin/kldstat/kldstat.c Sat Jul 3 12:09:45 2010 (r209660) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -60,8 +59,8 @@ static void printfile(int fileid, int ve if (kldstat(fileid, &stat) < 0) warn("can't stat file id %d", fileid); else - printf("%2d %4d %p %-8jx %s", - stat.id, stat.refs, stat.address, (uintmax_t)stat.size, + printf("%2d %4d %p %-8zx %s", + stat.id, stat.refs, stat.address, stat.size, stat.name); if (verbose) { From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 12:14:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B050106564A; Sat, 3 Jul 2010 12:14:02 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13A138FC1B; Sat, 3 Jul 2010 12:14:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o63CE1JB008628; Sat, 3 Jul 2010 12:14:01 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63CE13Z008626; Sat, 3 Jul 2010 12:14:01 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201007031214.o63CE13Z008626@svn.freebsd.org> From: Christian Brueffer Date: Sat, 3 Jul 2010 12:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209661 - stable/8/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 12:14:02 -0000 Author: brueffer Date: Sat Jul 3 12:14:01 2010 New Revision: 209661 URL: http://svn.freebsd.org/changeset/base/209661 Log: MFC: r207923 Document FIONREAD, FIONWRITE and FIONSPACE. Modified: stable/8/lib/libc/sys/ioctl.2 Directory Properties: stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/sys/ioctl.2 ============================================================================== --- stable/8/lib/libc/sys/ioctl.2 Sat Jul 3 12:09:45 2010 (r209660) +++ stable/8/lib/libc/sys/ioctl.2 Sat Jul 3 12:14:01 2010 (r209661) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2007 +.Dd May 11, 2010 .Dt IOCTL 2 .Os .Sh NAME @@ -80,6 +80,30 @@ Macros and defines used in specifying an .Fa request are located in the file .In sys/ioctl.h . +.Sh GENERIC IOCTLS +Some generic ioctls are not implemented for all types of file +descriptors. +These include: +.Bl -tag -width "xxxxxx" +.It Dv FIONREAD int +Get the number of bytes that are immediately available for reading. +.It Dv FIONWRITE int +Get the number of bytes in the descriptor's send queue. +These bytes are data which has been written to the descriptor but +which are being held by the kernel for further processing. +The nature of the required processing depends on the underlying device. +For TCP sockets, these bytes have not yet been acknowledged by the +other side of the connection. +.It Dv FIONSPACE int +Get the free space in the descriptor's send queue. +This value is the size of the send queue minus the number of bytes +being held in the queue. +Note: while this value represents the number of bytes that may be +added to the queue, other resource limitations may cause a write +not larger than the send queue's space to be blocked. +One such limitation would be a lack of network buffers for a write +to a network connection. +.El .Sh RETURN VALUES If an error has occurred, a value of -1 is returned and .Va errno From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 13:32:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AA1A106564A; Sat, 3 Jul 2010 13:32:40 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 175BB8FC15; Sat, 3 Jul 2010 13:32: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 o63DWeYh025849; Sat, 3 Jul 2010 13:32:40 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63DWebe025844; Sat, 3 Jul 2010 13:32:40 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007031332.o63DWebe025844@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 3 Jul 2010 13:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209662 - in head: share/man/man4 sys/modules sys/modules/siftr 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, 03 Jul 2010 13:32:40 -0000 Author: lstewart Date: Sat Jul 3 13:32:39 2010 New Revision: 209662 URL: http://svn.freebsd.org/changeset/base/209662 Log: Import the Statistical Information For TCP Research (SIFTR) kernel module into FreeBSD. SIFTR logs a range of statistics on active TCP connections to a log file, providing the ability to make highly granular measurements of TCP connection state. The tool is aimed at system administrators, developers and researchers alike. Please take it for a spin and test it out - the man page should have all the information required to get you going. Many thanks go to the Cisco University Research Program Fund at Community Foundation Silicon Valley and the FreeBSD Foundation. Their support of our work at the Centre for Advanced Internet Architectures, Swinburne University of Technology is greatly appreciated. Sponsored by: Cisco URP, FreeBSD Foundation Reviewed by: dwmalone, gnn, rpaulo Tested by: Many on freebsd-current@ and elsewhere over the years MFC after: 1 month Added: head/share/man/man4/siftr.4 (contents, props changed) head/sys/modules/siftr/ head/sys/modules/siftr/Makefile (contents, props changed) head/sys/netinet/siftr.c (contents, props changed) Modified: head/sys/modules/Makefile Added: head/share/man/man4/siftr.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/siftr.4 Sat Jul 3 13:32:39 2010 (r209662) @@ -0,0 +1,752 @@ +.\" +.\" Copyright (c) 2010 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Portions of this software were developed at the Centre for Advanced +.\" Internet Architectures, Swinburne University of Technology, Melbourne, +.\" Australia by Lawrence Stewart under sponsorship from the FreeBSD +.\" Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions, and the following disclaimer, +.\" without modification, immediately at the beginning of the file. +.\" 2. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 23, 2010 +.Dt SIFTR 4 +.Os +.Sh NAME +.Nm SIFTR +.Nd Statistical Information For TCP Research +.Sh SYNOPSIS +To load +.Ns Nm +as a module at run-time, run the following command as root: +.Bd -literal -offset indent +kldload siftr +.Ed +.Pp +Alternatively, to load +.Ns Nm +as a module at boot time, add the following line into the +.Xr loader.conf 5 +file: +.Bd -literal -offset indent +siftr_load="YES" +.Ed +.Sh DESCRIPTION +.Nm +.Ns ( Em S Ns tatistical +.Em I Ns nformation +.Em F Ns or +.Em T Ns CP +.Em R Ns esearch ) +is a kernel module that logs a range of statistics on active TCP connections to +a log file. +It provides the ability to make highly granular measurements of TCP connection +state, aimed at system administrators, developers and researchers. +.Ss Compile-time Configuration +The default operation of +.Nm +is to capture IPv4 TCP/IP packets. +.Nm +can be configured to support IPv4 and IPv6 by uncommenting: +.Bd -literal -offset indent +CFLAGS+=-DSIFTR_IPV6 +.Ed +.Pp +in +.Aq sys/modules/siftr/Makefile +and recompiling. +.Pp +In the IPv4-only (default) mode, standard dotted decimal notation (e.g. +"136.186.229.95") is used to format IPv4 addresses for logging. +In IPv6 mode, standard dotted decimal notation is used to format IPv4 addresses, +and standard colon-separated hex notation (see RFC 4291) is used to format IPv6 +addresses for logging. Note that SIFTR uses uncompressed notation to format IPv6 +addresses. +For example, the address "fe80::20f:feff:fea2:531b" would be logged as +"fe80:0:0:0:20f:feff:fea2:531b". +.Ss Run-time Configuration +.Nm +utilises the +.Xr sysctl 8 +interface to export its configuration variables to user-space. +The following variables are available: +.Bl -tag -offset indent +.It Va net.inet.siftr.enabled +controls whether the module performs its +measurements or not. +By default, the value is set to 0, which means the module +will not be taking any measurements. +Having the module loaded with +.Va net.inet.siftr.enabled +set to 0 will have no impact on the performance of the network stack, as the +packet filtering hooks are only inserted when +.Va net.inet.siftr.enabled +is set to 1. +.El +.Bl -tag -offset indent +.It Va net.inet.siftr.ppl +controls how many inbound/outbound packets for a given TCP connection will cause +a log message to be generated for the connection. +By default, the value is set to 1, which means the module will log a message for +every packet of every TCP connection. +The value can be set to any integer in the range [1,2^32], and can be changed at +any time, even while the module is enabled. +.El +.Bl -tag -offset indent +.It Va net.inet.siftr.logfile +controls the path to the file that the module writes its log messages to. +By default, the file /var/log/siftr.log is used. +The path can be changed at any time, even while the module is enabled. +.El +.Bl -tag -offset indent +.It Va net.inet.siftr.genhashes +controls whether a hash is generated for each TCP packet seen by +.Nm . +By default, the value is set to 0, which means no hashes are generated. +The hashes are useful to correlate which TCP packet triggered the generation of +a particular log message, but calculating them adds additional computational +overhead into the fast path. +.El +.Ss Log Format +A typical +.Nm +log file will contain 3 different types of log message. +All messages are written in plain ASCII text. +.Pp +Note: The +.Qq \e +present in the example log messages in this section indicates a +line continuation and is not part of the actual log message +.Pp +The first type of log message is written to the file when the module is +enabled and starts collecting data from the running kernel. The text below +shows an example module enable log. The fields are tab delimited key-value +pairs which describe some basic information about the system. +.Bd -literal -offset indent +enable_time_secs=1238556193 enable_time_usecs=462104 \\ +siftrver=1.2.2 hz=1000 tcp_rtt_scale=32 \\ +sysname=FreeBSD sysver=604000 ipmode=4 +.Ed +.Pp +Field descriptions are as follows: +.Bl -tag -offset indent +.It Va enable_time_secs +time at which the module was enabled, in seconds since the UNIX epoch. +.El +.Bl -tag -offset indent +.It Va enable_time_usecs +time at which the module was enabled, in microseconds since enable_time_secs. +.El +.Bl -tag -offset indent +.It Va siftrver +version of +.Nm . +.El +.Bl -tag -offset indent +.It Va hz +tick rate of the kernel in ticks per second. +.El +.Bl -tag -offset indent +.It Va tcp_rtt_scale +smoothed RTT estimate scaling factor +.El +.Bl -tag -offset indent +.It Va sysname +operating system name +.El +.Bl -tag -offset indent +.It Va sysver +operating system version +.El +.Bl -tag -offset indent +.It Va ipmode +IP mode as defined at compile time. +An ipmode of "4" means IPv6 is not supported and IP addresses are logged in +regular dotted quad format. +An ipmode of "6" means IPv6 is supported, and IP addresses are logged in dotted +quad or hex format, as described in the +.Qq Compile-time Configuration +subsection. +.El +.Pp +The second type of log message is written to the file when a data log message +is generated. +The text below shows an example data log triggered by an IPv4 +TCP/IP packet. +The data is CSV formatted. +.Bd -literal -offset indent +o,0xbec491a5,1238556193.463551,172.16.7.28,22,172.16.2.5,55931, \\ +1073725440,172312,6144,66560,66608,8,1,4,1448,936,1,996,255, \\ +33304,208,66608,0,208 +.Ed +.Pp +Field descriptions are as follows: +.Bl -tag -offset indent +.It Va 1 +Direction of packet that triggered the log message. +Either +.Qq i +for in, or +.Qq o +for out. +.El +.Bl -tag -offset indent +.It Va 2 +Hash of the packet that triggered the log message. +.El +.Bl -tag -offset indent +.It Va 3 +Time at which the packet that triggered the log message was processed by +the +.Xr pfil 9 +hook function, in seconds and microseconds since the UNIX epoch. +.El +.Bl -tag -offset indent +.It Va 4 +The IPv4 or IPv6 address of the local host, in dotted quad (IPv4 packet) +or colon-separated hex (IPv6 packet) notation. +.El +.Bl -tag -offset indent +.It Va 5 +The TCP port that the local host is communicating via. +.El +.Bl -tag -offset indent +.It Va 6 +The IPv4 or IPv6 address of the foreign host, in dotted quad (IPv4 packet) +or colon-separated hex (IPv6 packet) notation. +.El +.Bl -tag -offset indent +.It Va 7 +The TCP port that the foreign host is communicating via. +.El +.Bl -tag -offset indent +.It Va 8 +The slow start threshold for the flow, in bytes. +.El +.Bl -tag -offset indent +.It Va 9 +The current congestion window for the flow, in bytes. +.El +.Bl -tag -offset indent +.It Va 10 +The current bandwidth-controlled window for the flow, in bytes. +.El +.Bl -tag -offset indent +.It Va 11 +The current sending window for the flow, in bytes. +The post scaled value is reported, except during the initial handshake (first +few packets), during which time the unscaled value is reported. +.El +.Bl -tag -offset indent +.It Va 12 +The current receive window for the flow, in bytes. +The post scaled value is always reported. +.El +.Bl -tag -offset indent +.It Va 13 +The current window scaling factor for the sending window. +.El +.Bl -tag -offset indent +.It Va 14 +The current window scaling factor for the receiving window. +.El +.Bl -tag -offset indent +.It Va 15 +The current state of the TCP finite state machine, as defined +in +.Aq Pa netinet/tcp_fsm.h . +.El +.Bl -tag -offset indent +.It Va 16 +The maximum segment size for the flow, in bytes. +.El +.Bl -tag -offset indent +.It Va 17 +The current smoothed RTT estimate for the flow, in units of TCP_RTT_SCALE * HZ, +where TCP_RTT_SCALE is a define found in tcp_var.h, and HZ is the kernel's tick +timer. +Divide by TCP_RTT_SCALE * HZ to get the RTT in secs. TCP_RTT_SCALE and HZ are +reported in the enable log message. +.El +.Bl -tag -offset indent +.It Va 18 +SACK enabled indicator. 1 if SACK enabled, 0 otherwise. +.El +.Bl -tag -offset indent +.It Va 19 +The current state of the TCP flags for the flow. +See +.Aq Pa netinet/tcp_var.h +for information about the various flags. +.El +.Bl -tag -offset indent +.It Va 20 +The current retransmission timeout length for the flow, in units of HZ, where HZ +is the kernel's tick timer. +Divide by HZ to get the timeout length in seconds. HZ is reported in the +enable log message. +.El +.Bl -tag -offset indent +.It Va 21 +The current size of the socket send buffer in bytes. +.El +.Bl -tag -offset indent +.It Va 22 +The current number of bytes in the socket send buffer. +.El +.Bl -tag -offset indent +.It Va 23 +The current size of the socket receive buffer in bytes. +.El +.Bl -tag -offset indent +.It Va 24 +The current number of bytes in the socket receive buffer. +.El +.Bl -tag -offset indent +.It Va 25 +The current number of unacknowledged bytes in-flight. +Bytes acknowledged via SACK are not excluded from this count. +.El +.Pp +The third type of log message is written to the file when the module is disabled +and ceases collecting data from the running kernel. +The text below shows an example module disable log. +The fields are tab delimited key-value pairs which provide statistics about +operations since the module was most recently enabled. +.Bd -literal -offset indent +disable_time_secs=1238556197 disable_time_usecs=933607 \\ +num_inbound_tcp_pkts=356 num_outbound_tcp_pkts=627 \\ +total_tcp_pkts=983 num_inbound_skipped_pkts_malloc=0 \\ +num_outbound_skipped_pkts_malloc=0 num_inbound_skipped_pkts_mtx=0 \\ +num_outbound_skipped_pkts_mtx=0 num_inbound_skipped_pkts_tcb=0 \\ +num_outbound_skipped_pkts_tcb=0 num_inbound_skipped_pkts_icb=0 \\ +num_outbound_skipped_pkts_icb=0 total_skipped_tcp_pkts=0 \\ +flow_list=172.16.7.28;22-172.16.2.5;55931, +.Ed +.Pp +Field descriptions are as follows: +.Bl -tag -offset indent +.It Va disable_time_secs +Time at which the module was disabled, in seconds since the UNIX epoch. +.El +.Bl -tag -offset indent +.It Va disable_time_usecs +Time at which the module was disabled, in microseconds since disable_time_secs. +.El +.Bl -tag -offset indent +.It Va num_inbound_tcp_pkts +Number of TCP packets that traversed up the network stack. +This only includes inbound TCP packets during the periods when +.Nm +was enabled. +.El +.Bl -tag -offset indent +.It Va num_outbound_tcp_pkts +Number of TCP packets that traversed down the network stack. +This only includes outbound TCP packets during the periods when +.Nm +was enabled. +.El +.Bl -tag -offset indent +.It Va total_tcp_pkts +The summation of num_inbound_tcp_pkts and num_outbound_tcp_pkts. +.El +.Bl -tag -offset indent +.It Va num_inbound_skipped_pkts_malloc +Number of inbound packets that were not processed because of failed malloc() calls. +.El +.Bl -tag -offset indent +.It Va num_outbound_skipped_pkts_malloc +Number of outbound packets that were not processed because of failed malloc() calls. +.El +.Bl -tag -offset indent +.It Va num_inbound_skipped_pkts_mtx +Number of inbound packets that were not processed because of failure to add the +packet to the packet processing queue. +.El +.Bl -tag -offset indent +.It Va num_outbound_skipped_pkts_mtx +Number of outbound packets that were not processed because of failure to add the +packet to the packet processing queue. +.El +.Bl -tag -offset indent +.It Va num_inbound_skipped_pkts_tcb +Number of inbound packets that were not processed because of failure to find the +TCP control block associated with the packet. +.El +.Bl -tag -offset indent +.It Va num_outbound_skipped_pkts_tcb +Number of outbound packets that were not processed because of failure to find +the TCP control block associated with the packet. +.El +.Bl -tag -offset indent +.It Va num_inbound_skipped_pkts_icb +Number of inbound packets that were not processed because of failure to find the +IP control block associated with the packet. +.El +.Bl -tag -offset indent +.It Va num_outbound_skipped_pkts_icb +Number of outbound packets that were not processed because of failure to find +the IP control block associated with the packet. +.El +.Bl -tag -offset indent +.It Va total_skipped_tcp_pkts +The summation of all skipped packet counters. +.El +.Bl -tag -offset indent +.It Va flow_list +A CSV list of TCP flows that triggered data log messages to be generated since +the module was loaded. +Each flow entry in the CSV list is +formatted as +.Qq local_ip;local_port-foreign_ip;foreign_port . +If there are no entries in the list (i.e. no data log messages were generated), +the value will be blank. +If there is at least one entry in the list, a trailing comma will always be +present. +.El +.Pp +The total number of data log messages found in the log file for a module +enable/disable cycle should equate to total_tcp_pkts - total_skipped_tcp_pkts. +.Sh IMPLEMENTATION NOTES +.Nm +hooks into the network stack using the +.Xr pfil 9 +interface. +In its current incarnation, it hooks into the AF_INET/AF_INET6 (IPv4/IPv6) +.Xr pfil 9 +filtering points, which means it sees packets at the IP layer of the network +stack. +This means that TCP packets inbound to the stack are intercepted before +they have been processed by the TCP layer. +Packets outbound from the stack are intercepted after they have been processed +by the TCP layer. +.Pp +The diagram below illustrates how +.Nm +inserts itself into the stack. +.Bd -literal -offset indent +---------------------------------- + Upper Layers +---------------------------------- + ^ | + | | + | | + | v + TCP in TCP out +---------------------------------- + ^ | + |________ _________| + | | + | v + --------- + | SIFTR | + --------- + ^ | + ________| |__________ + | | + | v +IPv{4/6} in IPv{4/6} out +---------------------------------- + ^ | + | | + | v +Layer 2 in Layer 2 out +---------------------------------- + Physical Layer +---------------------------------- +.Ed +.Pp +.Nm +uses the +.Xr alq 9 +interface to manage writing data to disk. +.Pp +At first glance, you might mistakenly think that +.Nm +extracts information from +individual TCP packets. +This is not the case. +.Nm +uses TCP packet events (inbound and outbound) for each TCP flow originating from +the system to trigger a dump of the state of the TCP control block for that +flow. +With the PPL set to 1, we are in effect sampling each TCP flow's control block +state as frequently as flow packets enter/leave the system. +For example, setting PPL to 2 halves the sampling rate i.e. every second flow +packet (inbound OR outbound) causes a dump of the control block state. +.Pp +The distinction between interrogating individual packets vs interrogating the +control block is important, because +.Nm +does not remove the need for packet capturing tools like +.Xr tcpdump 1 . +.Nm +allows you to correlate and observe the cause-and-affect relationship between +what you see on the wire (captured using a tool like +.Xr tcpdump 1 Ns ) +and changes in the TCP control block corresponding to the flow of interest. +It is therefore useful to use +.Nm +and a tool like +.Xr tcpdump 1 +to gather the necessary data to piece together the complete picture. +Use of either tool on its own will not be able to provide all of the necessary +data. +.Pp +As a result of needing to interrogate the TCP control block, certain packets +during the lifecycle of a connection are unable to trigger a +.Nm +log message. +The initial handshake takes place without the existence of a control block and +the final ACK is exchanged when the connection is in the TIMEWAIT state. +.Pp +.Nm +was designed to minimise the delay introduced to packets traversing the network +stack. +This design called for a highly optimised and minimal hook function that +extracted the minimal details necessary whilst holding the packet up, and +passing these details to another thread for actual processing and logging. +.Pp +This multithreaded design does introduce some contention issues when accessing +the data structure shared between the threads of operation. +When the hook function tries to place details in the structure, it must first +acquire an exclusive lock. +Likewise, when the processing thread tries to read details from the structure, +it must also acquire an exclusive lock to do so. +If one thread holds the lock, the other must wait before it can obtain it. +This does introduce some additional bounded delay into the kernel's packet +processing code path. +.Pp +In some cases (e.g. low memory, connection termination), TCP packets that enter +the +.Nm +.Xr pfil 9 +hook function will not trigger a log message to be generated. +.Nm +refers to this outcome as a +.Qq skipped packet . +Note that +.Nm +always ensures that packets are allowed to continue through the stack, even if +they could not successfully trigger a data log message. +.Nm +will therefore not introduce any packet loss for TCP/IP packets traversing the +network stack. +.Ss Important Behaviours +The behaviour of a log file path change whilst the module is enabled is as +follows: +.Bl -enum +.It +Attempt to open the new file path for writing. +If this fails, the path change will fail and the existing path will continue to +be used. +.It +Assuming the new path is valid and opened successfully: +.Bl -dash +.It +Flush all pending log messages to the old file path. +.It +Close the old file path. +.It +Switch the active log file pointer to point at the new file path. +.It +Commence logging to the new file. +.El +.El +.Pp +During the time between the flush of pending log messages to the old file and +commencing logging to the new file, new log messages will still be generated and +buffered. +As soon as the new file path is ready for writing, the accumulated log messages +will be written out to the file. +.Sh EXAMPLES +To enable the module's operations, run the following command as root: +sysctl net.inet.siftr.enabled=1 +.Pp +To change the granularity of log messages such that 1 log message is +generated for every 10 TCP packets per connection, run the following +command as root: +sysctl net.inet.siftr.ppl=10 +.Pp +To change the log file location to /tmp/siftr.log, run the following +command as root: +sysctl net.inet.siftr.logfile=/tmp/siftr.log +.Sh SEE ALSO +.Xr alq 9 , +.Xr pfil 9 +.Xr sysctl 8 , +.Xr tcp 4 , +.Xr tcpdump 1 , +.Sh ACKNOWLEDGEMENTS +Development of this software was made possible in part by grants from the +Cisco University Research Program Fund at Community Foundation Silicon Valley, +and the FreeBSD Foundation. +.Sh HISTORY +.Nm +first appeared in +.Fx 9.0 . +.Pp +.Nm +was first released in 2007 by Lawrence Stewart and James Healy whilst working on +the NewTCP research project at Swinburne University's Centre for Advanced +Internet Architectures, Melbourne, Australia, which was made possible in part by +a grant from the Cisco University Research Program Fund at Community Foundation +Silicon Valley. +More details are available at: +.Pp +http://caia.swin.edu.au/urp/newtcp/ +.Pp +Work on +.Nm +v1.2.x was sponsored by the FreeBSD Foundation as part of +the +.Qq Enhancing the FreeBSD TCP Implementation +project 2008-2009. +More details are available at: +.Pp +http://www.freebsdfoundation.org/ +.Pp +http://caia.swin.edu.au/freebsd/etcp09/ +.Sh AUTHORS +.An -nosplit +.Nm +was written by +.An Lawrence Stewart Aq lstewart@FreeBSD.org +and +.An James Healy Aq jimmy@deefa.com . +.Pp +This manual page was written by +.An Lawrence Stewart Aq lstewart@FreeBSD.org . +.Sh BUGS +Current known limitations and any relevant workarounds are outlined below: +.Bl -dash +.It +The internal queue used to pass information between the threads of operation is +currently unbounded. +This allows +.Nm +to cope with bursty network traffic, but sustained high packet-per-second +traffic can cause exhaustion of kernel memory if the processing thread cannot +keep up with the packet rate. +.It +If using +.Nm +on a machine that is also running other modules utilising the +.Xr pfil 9 +framework e.g. +.Xr dummynet 4 , +.Xr ipfw 8 , +.Xr pf 4 Ns , +the order in which you load the modules is important. +You should kldload the other modules first, as this will ensure TCP packets +undergo any necessary manipulations before +.Nm +.Qq sees +and processes them. +.It +There is a known, harmless lock order reversal warning between the +.Xr pfil 9 +mutex and tcbinfo TCP lock reported by +.Xr witness 4 +when +.Nm +is enabled in a kernel compiled with +.Xr witness 4 +support. +.It +There is no way to filter which TCP flows you wish to capture data for. +Post processing is required to separate out data belonging to particular flows +of interest. +.It +The module does not detect deletion of the log file path. +New log messages will simply be lost if the log file being used by +.Nm +is deleted whilst the module is set to use the file. +Switching to a new log file using the +.Em net.inet.siftr.logfile +variable will create the new file and allow log messages to begin being written +to disk again. +The new log file path must differ from the path to the deleted file. +.It +The hash table used within the code is sized to hold 65536 flows. This is not a +hard limit, because chaining is used to handle collisions within the hash table +structure. +However, we suspect (based on analogies with other hash table performance data) +that the hash table look up performance (and therefore the module's packet +processing performance) will degrade in an exponential manner as the number of +unique flows handled in a module enable/disable cycle approaches and surpasses +65536. +.It +There is no garbage collection performed on the flow hash table. +The only way currently to flush it is to disable +.Nm . +.It +The PPL variable applies to packets that make it into the processing thread, +not total packets received in the hook function. +Packets are skipped before the PPL variable is applied, which means there may be +a slight discrepancy in the triggering of log messages. +For example, if PPL was set to 10, and the 8th packet since the last log message +is skipped, the 11th packet will actually trigger the log message to be +generated. +This is discussed in greater depth in CAIA technical report 070824A. +.It +At the time of writing, there was no simple way to hook into the TCP layer +to intercept packets. +.Nm Ap s +use of IP layer hook points means all IP +traffic will be processed by the +.Nm +.Xr pfil 9 +hook function, which introduces minor, but nonetheless unnecessary packet delay +and processing overhead on the system for non-TCP packets as well. +Hooking in at the IP layer is also not ideal from the data gathering point of +view. +Packets traversing up the stack will be intercepted and cause a log message +generation BEFORE they have been processed by the TCP layer, which means we +cannot observe the cause-and-affect relationship between inbound events and the +corresponding TCP control block as precisely as could be. +Ideally, +.Nm +should intercept packets after they have been processed by the TCP layer i.e. +intercept packets coming up the stack after they have been processed by +tcp_input(), and intercept packets coming down the stack after they have been +processed by tcp_output(). +The current code still gives satisfactory granularity though, as inbound events +tend to trigger outbound events, allowing the cause-and-effect to be observed +indirectly by capturing the state on outbound events as well. +.It +The +.Qq inflight bytes +value logged by +.Nm +does not take into account bytes that have been +.No SACK Ap ed +by the receiving host. +.It +Packet hash generation does not currently work for IPv6 based TCP packets. +.It +Compressed notation is not used for IPv6 address representation. +This consumes more bytes than is necessary in log output. +.El Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jul 3 12:14:01 2010 (r209661) +++ head/sys/modules/Makefile Sat Jul 3 13:32:39 2010 (r209662) @@ -257,6 +257,7 @@ SUBDIR= ${_3dfx} \ sf \ sge \ siba_bwn \ + siftr \ siis \ sis \ sk \ Added: head/sys/modules/siftr/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/siftr/Makefile Sat Jul 3 13:32:39 2010 (r209662) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.include + +.PATH: ${.CURDIR}/../../netinet +KMOD= siftr +SRCS= siftr.c + +# Uncomment to add IPv6 support +#CFLAGS+=-DSIFTR_IPV6 + +.include Added: head/sys/netinet/siftr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netinet/siftr.c Sat Jul 3 13:32:39 2010 (r209662) @@ -0,0 +1,1568 @@ +/*- + * Copyright (c) 2007-2009, Centre for Advanced Internet Architectures + * Swinburne University of Technology, Melbourne, Australia + * (CRICOS number 00111D). + * Copyright (c) 2009-2010, The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed at the Centre for Advanced + * Internet Architectures, Swinburne University of Technology, Melbourne, + * Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/****************************************************** + * Statistical Information For TCP Research (SIFTR) + * + * A FreeBSD kernel module that adds very basic intrumentation to the + * TCP stack, allowing internal stats to be recorded to a log file + * for experimental, debugging and performance analysis purposes. + * + * SIFTR was first released in 2007 by James Healy and Lawrence Stewart whilst + * working on the NewTCP research project at Swinburne University's Centre for + * Advanced Internet Architectures, Melbourne, Australia, which was made + * possible in part by a grant from the Cisco University Research Program Fund + * at Community Foundation Silicon Valley. More details are available at: + * http://caia.swin.edu.au/urp/newtcp/ + * + * Work on SIFTR v1.2.x was sponsored by the FreeBSD Foundation as part of + * the "Enhancing the FreeBSD TCP Implementation" project 2008-2009. + * More details are available at: + * http://www.freebsdfoundation.org/ + * http://caia.swin.edu.au/freebsd/etcp09/ + * + * Lawrence Stewart is the current maintainer, and all contact regarding + * SIFTR should be directed to him via email: lastewart@swin.edu.au + * + * Initial release date: June 2007 + * Most recent update: June 2010 + ******************************************************/ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifdef SIFTR_IPV6 +#include +#include +#endif /* SIFTR_IPV6 */ + +#include + +/* + * Three digit version number refers to X.Y.Z where: + * X is the major version number + * Y is bumped to mark backwards incompatible changes + * Z is bumped to mark backwards compatible changes + */ +#define V_MAJOR 1 +#define V_BACKBREAK 2 +#define V_BACKCOMPAT 3 +#define MODVERSION __CONCAT(V_MAJOR, __CONCAT(V_BACKBREAK, V_BACKCOMPAT)) +#define MODVERSION_STR __XSTRING(V_MAJOR) "." __XSTRING(V_BACKBREAK) "." \ + __XSTRING(V_BACKCOMPAT) + +#define HOOK 0 +#define UNHOOK 1 +#define SIFTR_EXPECTED_MAX_TCP_FLOWS 65536 +#define SYS_NAME "FreeBSD" +#define PACKET_TAG_SIFTR 100 +#define PACKET_COOKIE_SIFTR 21749576 +#define SIFTR_LOG_FILE_MODE 0644 +#define SIFTR_DISABLE 0 +#define SIFTR_ENABLE 1 + +/* + * Hard upper limit on the length of log messages. Bump this up if you add new + * data fields such that the line length could exceed the below value. + */ +#define MAX_LOG_MSG_LEN 200 +/* XXX: Make this a sysctl tunable. */ +#define SIFTR_ALQ_BUFLEN (1000*MAX_LOG_MSG_LEN) + +/* + * 1 byte for IP version + * IPv4: src/dst IP (4+4) + src/dst port (2+2) = 12 bytes + * IPv6: src/dst IP (16+16) + src/dst port (2+2) = 36 bytes + */ +#ifdef SIFTR_IPV6 +#define FLOW_KEY_LEN 37 +#else +#define FLOW_KEY_LEN 13 +#endif + +#ifdef SIFTR_IPV6 +#define SIFTR_IPMODE 6 +#else +#define SIFTR_IPMODE 4 +#endif + +/* useful macros */ +#define CAST_PTR_INT(X) (*((int*)(X))) + +#define UPPER_SHORT(X) (((X) & 0xFFFF0000) >> 16) +#define LOWER_SHORT(X) ((X) & 0x0000FFFF) + +#define FIRST_OCTET(X) (((X) & 0xFF000000) >> 24) +#define SECOND_OCTET(X) (((X) & 0x00FF0000) >> 16) +#define THIRD_OCTET(X) (((X) & 0x0000FF00) >> 8) +#define FOURTH_OCTET(X) ((X) & 0x000000FF) + +MALLOC_DECLARE(M_SIFTR); +MALLOC_DEFINE(M_SIFTR, "siftr", "dynamic memory used by SIFTR"); + +MALLOC_DECLARE(M_SIFTR_PKTNODE); +MALLOC_DEFINE(M_SIFTR_PKTNODE, "siftr_pktnode", "SIFTR pkt_node struct"); + +MALLOC_DECLARE(M_SIFTR_HASHNODE); +MALLOC_DEFINE(M_SIFTR_HASHNODE, "siftr_hashnode", "SIFTR flow_hash_node struct"); + +/* Used as links in the pkt manager queue. */ +struct pkt_node { + /* Timestamp of pkt as noted in the pfil hook. */ + struct timeval tval; + /* Direction pkt is travelling; either PFIL_IN or PFIL_OUT. */ + uint8_t direction; + /* IP version pkt_node relates to; either INP_IPV4 or INP_IPV6. */ + uint8_t ipver; + /* Hash of the pkt which triggered the log message. */ + uint32_t hash; + /* Local/foreign IP address. */ +#ifdef SIFTR_IPV6 + uint32_t ip_laddr[4]; + uint32_t ip_faddr[4]; +#else + uint8_t ip_laddr[4]; + uint8_t ip_faddr[4]; +#endif + /* Local TCP port. */ + uint16_t tcp_localport; + /* Foreign TCP port. */ + uint16_t tcp_foreignport; + /* Congestion Window (bytes). */ + u_long snd_cwnd; + /* Sending Window (bytes). */ + u_long snd_wnd; + /* Receive Window (bytes). */ + u_long rcv_wnd; + /* Bandwidth Controlled Window (bytes). */ + u_long snd_bwnd; + /* Slow Start Threshold (bytes). */ + u_long snd_ssthresh; + /* Current state of the TCP FSM. */ + int conn_state; + /* Max Segment Size (bytes). */ + u_int max_seg_size; + /* + * Smoothed RTT stored as found in the TCP control block + * in units of (TCP_RTT_SCALE*hz). + */ + int smoothed_rtt; + /* Is SACK enabled? */ + u_char sack_enabled; + /* Window scaling for snd window. */ + u_char snd_scale; + /* Window scaling for recv window. */ + u_char rcv_scale; + /* TCP control block flags. */ + u_int flags; + /* Retransmit timeout length. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 14:03:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20677106566C; Sat, 3 Jul 2010 14:03:32 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 104248FC08; Sat, 3 Jul 2010 14:03: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 o63E3VIe032636; Sat, 3 Jul 2010 14:03:31 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63E3VvY032634; Sat, 3 Jul 2010 14:03:31 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201007031403.o63E3VvY032634@svn.freebsd.org> From: Randall Stewart Date: Sat, 3 Jul 2010 14:03: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: r209663 - 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, 03 Jul 2010 14:03:32 -0000 Author: rrs Date: Sat Jul 3 14:03:31 2010 New Revision: 209663 URL: http://svn.freebsd.org/changeset/base/209663 Log: This fixes a crash in SCTP. It was possible to have a large number of packets queued to a crashing process. In a specific case you may get 2 ABORT's back (from say two packets in flight). If the aborts happened to be processed at the same time its possible to have one free the association while the other is trying to report all the outbound packets. When this occured it could lead to a crash. MFC after: 3 days Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sat Jul 3 13:32:39 2010 (r209662) +++ head/sys/netinet/sctputil.c Sat Jul 3 14:03:31 2010 (r209663) @@ -3694,6 +3694,10 @@ sctp_report_all_outbound(struct sctp_tcb if (stcb == NULL) { return; } + if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { + /* already being freed */ + return; + } if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) { @@ -3753,11 +3757,13 @@ sctp_report_all_outbound(struct sctp_tcb stcb->asoc.stream_queue_cnt--; TAILQ_REMOVE(&outs->outqueue, sp, next); sctp_free_spbufspace(stcb, asoc, sp); - sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, (void *)sp, so_locked); if (sp->data) { - sctp_m_freem(sp->data); - sp->data = NULL; + sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, + SCTP_NOTIFY_DATAGRAM_UNSENT, (void *)sp, so_locked); + if (sp->data) { + sctp_m_freem(sp->data); + sp->data = NULL; + } } if (sp->net) sctp_free_remote_addr(sp->net); From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 14:14:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4B9E106564A; Sat, 3 Jul 2010 14:14:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A362C8FC1A; Sat, 3 Jul 2010 14:14: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 o63EEgwc035127; Sat, 3 Jul 2010 14:14:42 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63EEgH7035123; Sat, 3 Jul 2010 14:14:42 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007031414.o63EEgH7035123@svn.freebsd.org> From: Alexander Motin Date: Sat, 3 Jul 2010 14:14:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209664 - in head: share/man/man4 sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 14:14:42 -0000 Author: mav Date: Sat Jul 3 14:14:42 2010 New Revision: 209664 URL: http://svn.freebsd.org/changeset/base/209664 Log: Add ata(4) ability to limit initial ATA mode for devices via device hints. After boot this mode can be changed with atacontrol/camcontrol as usual. It works for both legacy and ATA_CAM wrapper mode. PR: kern/123980 Modified: head/share/man/man4/ata.4 head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Sat Jul 3 14:03:31 2010 (r209663) +++ head/share/man/man4/ata.4 Sat Jul 3 14:14:42 2010 (r209664) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 3, 2010 +.Dd July 3, 2010 .Dt ATA 4 .Os .Sh NAME @@ -103,6 +103,10 @@ can cause data loss on power failures an .It Va hint.atapci.X.msi set to 1 to allow Message Signalled Interrupts (MSI) to be used by specified PCI ATA controller, if supported. +.It Va hint.ata.X.devX.mode +limits initial ATA mode for specified device on specified channel. +.It Va hint.ata.X.mode +limits initial ATA mode for every device on specified channel. .It Va hint.ata.X.pm_level controls SATA interface Power Management for specified channel, allowing to save some power by the cost of additional command latency. Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sat Jul 3 14:03:31 2010 (r209663) +++ head/sys/dev/ata/ata-all.c Sat Jul 3 14:14:42 2010 (r209664) @@ -133,7 +133,9 @@ ata_attach(device_t dev) int error, rid; #ifdef ATA_CAM struct cam_devq *devq; - int i; + const char *res; + char buf[64]; + int i, mode; #endif /* check that we have a virgin channel to attach */ @@ -152,6 +154,17 @@ ata_attach(device_t dev) #ifdef ATA_CAM for (i = 0; i < 16; i++) { ch->user[i].mode = 0; + snprintf(buf, sizeof(buf), "dev%d.mode", i); + if (resource_string_value(device_get_name(dev), + device_get_unit(dev), buf, &res) == 0) + mode = ata_str2mode(res); + else if (resource_string_value(device_get_name(dev), + device_get_unit(dev), "mode", &res) == 0) + mode = ata_str2mode(res); + else + mode = -1; + if (mode >= 0) + ch->user[i].mode = mode; if (ch->flags & ATA_SATA) ch->user[i].bytecount = 8192; else @@ -826,8 +839,10 @@ ata_getparam(struct ata_device *atadev, { struct ata_channel *ch = device_get_softc(device_get_parent(atadev->dev)); struct ata_request *request; + const char *res; + char buf[64]; u_int8_t command = 0; - int error = ENOMEM, retries = 2; + int error = ENOMEM, retries = 2, mode = -1; if (ch->devices & (ATA_ATA_MASTER << atadev->unit)) command = ATA_ATA_IDENTIFY; @@ -907,6 +922,15 @@ ata_getparam(struct ata_device *atadev, ata_wmode(&atadev->param) > 0)) atadev->mode = ATA_DMA_MAX; } + snprintf(buf, sizeof(buf), "dev%d.mode", atadev->unit); + if (resource_string_value(device_get_name(ch->dev), + device_get_unit(ch->dev), buf, &res) == 0) + mode = ata_str2mode(res); + else if (resource_string_value(device_get_name(ch->dev), + device_get_unit(ch->dev), "mode", &res) == 0) + mode = ata_str2mode(res); + if (mode >= 0) + atadev->mode = mode; } } else { @@ -1163,6 +1187,35 @@ ata_mode2str(int mode) } } +int +ata_str2mode(const char *str) +{ + + if (!strcasecmp(str, "PIO0")) return (ATA_PIO0); + if (!strcasecmp(str, "PIO1")) return (ATA_PIO1); + if (!strcasecmp(str, "PIO2")) return (ATA_PIO2); + if (!strcasecmp(str, "PIO3")) return (ATA_PIO3); + if (!strcasecmp(str, "PIO4")) return (ATA_PIO4); + if (!strcasecmp(str, "WDMA0")) return (ATA_WDMA0); + if (!strcasecmp(str, "WDMA1")) return (ATA_WDMA1); + if (!strcasecmp(str, "WDMA2")) return (ATA_WDMA2); + if (!strcasecmp(str, "UDMA0")) return (ATA_UDMA0); + if (!strcasecmp(str, "UDMA16")) return (ATA_UDMA0); + if (!strcasecmp(str, "UDMA1")) return (ATA_UDMA1); + if (!strcasecmp(str, "UDMA25")) return (ATA_UDMA1); + if (!strcasecmp(str, "UDMA2")) return (ATA_UDMA2); + if (!strcasecmp(str, "UDMA33")) return (ATA_UDMA2); + if (!strcasecmp(str, "UDMA3")) return (ATA_UDMA3); + if (!strcasecmp(str, "UDMA44")) return (ATA_UDMA3); + if (!strcasecmp(str, "UDMA4")) return (ATA_UDMA4); + if (!strcasecmp(str, "UDMA66")) return (ATA_UDMA4); + if (!strcasecmp(str, "UDMA5")) return (ATA_UDMA5); + if (!strcasecmp(str, "UDMA100")) return (ATA_UDMA5); + if (!strcasecmp(str, "UDMA6")) return (ATA_UDMA6); + if (!strcasecmp(str, "UDMA133")) return (ATA_UDMA6); + return (-1); +} + const char * ata_satarev2str(int rev) { Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Sat Jul 3 14:03:31 2010 (r209663) +++ head/sys/dev/ata/ata-all.h Sat Jul 3 14:14:42 2010 (r209664) @@ -625,6 +625,7 @@ void ata_modify_if_48bit(struct ata_requ void ata_udelay(int interval); char *ata_unit2str(struct ata_device *atadev); const char *ata_mode2str(int mode); +int ata_str2mode(const char *str); const char *ata_satarev2str(int rev); int ata_atapi(device_t dev, int target); int ata_pmode(struct ata_params *ap); From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 15:05:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 928EC106564A; Sat, 3 Jul 2010 15:05:14 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81A5A8FC19; Sat, 3 Jul 2010 15:05: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 o63F5EJF046189; Sat, 3 Jul 2010 15:05:14 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63F5EoX046187; Sat, 3 Jul 2010 15:05:14 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007031505.o63F5EoX046187@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 3 Jul 2010 15:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209665 - 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, 03 Jul 2010 15:05:14 -0000 Author: lstewart Date: Sat Jul 3 15:05:14 2010 New Revision: 209665 URL: http://svn.freebsd.org/changeset/base/209665 Log: Hook the siftr.4 man page up to the build and alphabetically sort siis into its correct place whilst there. Sponsored by: FreeBSD Foundation Submitted by: pluknet Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sat Jul 3 14:14:42 2010 (r209664) +++ head/share/man/man4/Makefile Sat Jul 3 15:05:14 2010 (r209665) @@ -356,8 +356,9 @@ MAN= aac.4 \ sge.4 \ si.4 \ siba.4 \ - sio.4 \ + siftr.4 \ siis.4 \ + sio.4 \ sis.4 \ sk.4 \ smb.4 \ From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 17:58:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61343106566C; Sat, 3 Jul 2010 17:58:00 +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 44C598FC08; Sat, 3 Jul 2010 17:58:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o63HvxoG083850; Sat, 3 Jul 2010 17:57:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63HvxGY083849; Sat, 3 Jul 2010 17:57:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007031757.o63HvxGY083849@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 3 Jul 2010 17:57: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: r209666 - in stable/8/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, 03 Jul 2010 17:58:00 -0000 Author: kib Date: Sat Jul 3 17:57:59 2010 New Revision: 209666 URL: http://svn.freebsd.org/changeset/base/209666 Log: MFC r209104: Add modifications of devctl_notify(9) functions that take flags. Use flags to specify M_WAITOK/M_NOWAIT. M_WAITOK allows devctl to sleep for the memory allocation. Modified: stable/8/sys/kern/subr_bus.c stable/8/sys/sys/bus.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/subr_bus.c ============================================================================== --- stable/8/sys/kern/subr_bus.c Sat Jul 3 15:05:14 2010 (r209665) +++ stable/8/sys/kern/subr_bus.c Sat Jul 3 17:57:59 2010 (r209666) @@ -539,7 +539,7 @@ devctl_process_running(void) * that @p data is allocated using the M_BUS malloc type. */ void -devctl_queue_data(char *data) +devctl_queue_data_f(char *data, int flags) { struct dev_event_info *n1 = NULL, *n2 = NULL; struct proc *p; @@ -548,7 +548,7 @@ devctl_queue_data(char *data) goto out; if (devctl_queue_length == 0) goto out; - n1 = malloc(sizeof(*n1), M_BUS, M_NOWAIT); + n1 = malloc(sizeof(*n1), M_BUS, flags); if (n1 == NULL) goto out; n1->dei_data = data; @@ -588,12 +588,19 @@ out: return; } +void +devctl_queue_data(char *data) +{ + + devctl_queue_data_f(data, M_NOWAIT); +} + /** * @brief Send a 'notification' to userland, using standard ways */ void -devctl_notify(const char *system, const char *subsystem, const char *type, - const char *data) +devctl_notify_f(const char *system, const char *subsystem, const char *type, + const char *data, int flags) { int len = 0; char *msg; @@ -611,7 +618,7 @@ devctl_notify(const char *system, const if (data != NULL) len += strlen(data); len += 3; /* '!', '\n', and NUL */ - msg = malloc(len, M_BUS, M_NOWAIT); + msg = malloc(len, M_BUS, flags); if (msg == NULL) return; /* Drop it on the floor */ if (data != NULL) @@ -620,7 +627,15 @@ devctl_notify(const char *system, const else snprintf(msg, len, "!system=%s subsystem=%s type=%s\n", system, subsystem, type); - devctl_queue_data(msg); + devctl_queue_data_f(msg, flags); +} + +void +devctl_notify(const char *system, const char *subsystem, const char *type, + const char *data) +{ + + devctl_notify_f(system, subsystem, type, data, M_NOWAIT); } /* Modified: stable/8/sys/sys/bus.h ============================================================================== --- stable/8/sys/sys/bus.h Sat Jul 3 15:05:14 2010 (r209665) +++ stable/8/sys/sys/bus.h Sat Jul 3 17:57:59 2010 (r209666) @@ -85,8 +85,11 @@ struct u_device { * included in case devctl_notify isn't sufficiently general. */ boolean_t devctl_process_running(void); +void devctl_notify_f(const char *__system, const char *__subsystem, + const char *__type, const char *__data, int __flags); void devctl_notify(const char *__system, const char *__subsystem, const char *__type, const char *__data); +void devctl_queue_data_f(char *__data, int __flags); void devctl_queue_data(char *__data); /** From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 18:09:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61CF4106566C; Sat, 3 Jul 2010 18:09:12 +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 4FCE98FC12; Sat, 3 Jul 2010 18:09: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 o63I9Bwc086366; Sat, 3 Jul 2010 18:09:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63I9BER086364; Sat, 3 Jul 2010 18:09:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007031809.o63I9BER086364@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 3 Jul 2010 18:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209667 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 18:09:12 -0000 Author: kib Date: Sat Jul 3 18:09:11 2010 New Revision: 209667 URL: http://svn.freebsd.org/changeset/base/209667 Log: MFC r209105: When make_dev_credf(MAKEDEV_WAITOK) is called, use devctl_notify_f(M_WAITOK) for devfs notifications. Modified: stable/8/sys/kern/kern_conf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_conf.c ============================================================================== --- stable/8/sys/kern/kern_conf.c Sat Jul 3 17:57:59 2010 (r209666) +++ stable/8/sys/kern/kern_conf.c Sat Jul 3 18:09:11 2010 (r209667) @@ -512,18 +512,18 @@ notify(struct cdev *dev, const char *ev, { static const char prefix[] = "cdev="; char *data; - int namelen; + int namelen, mflags; if (cold) return; + mflags = (flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK; namelen = strlen(dev->si_name); - data = malloc(namelen + sizeof(prefix), M_TEMP, - (flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK); + data = malloc(namelen + sizeof(prefix), M_TEMP, mflags); if (data == NULL) return; memcpy(data, prefix, sizeof(prefix) - 1); memcpy(data + sizeof(prefix) - 1, dev->si_name, namelen + 1); - devctl_notify("DEVFS", "CDEV", ev, data); + devctl_notify_f("DEVFS", "CDEV", ev, data, mflags); free(data, M_TEMP); } From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 18:19:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 641D1106566B; Sat, 3 Jul 2010 18:19:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 513178FC0C; Sat, 3 Jul 2010 18:19:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o63IJxm3088734; Sat, 3 Jul 2010 18:19:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63IJxaS088731; Sat, 3 Jul 2010 18:19:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007031819.o63IJxaS088731@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 3 Jul 2010 18:19:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209668 - in stable/8/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, 03 Jul 2010 18:19:59 -0000 Author: kib Date: Sat Jul 3 18:19:59 2010 New Revision: 209668 URL: http://svn.freebsd.org/changeset/base/209668 Log: MFC r209106: Add another variation of make_dev(9), make_dev_p(9), that is allowed to fail and can return useful error code. MFC r209237 (by jh): Correct the function name in a KASSERT. MFC r209244 (by ed): Remove the unit argument from the recently added make_dev_p(). Modified: stable/8/sys/kern/kern_conf.c stable/8/sys/sys/conf.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_conf.c ============================================================================== --- stable/8/sys/kern/kern_conf.c Sat Jul 3 18:09:11 2010 (r209667) +++ stable/8/sys/kern/kern_conf.c Sat Jul 3 18:19:59 2010 (r209668) @@ -55,9 +55,8 @@ struct mtx devmtx; static void destroy_devl(struct cdev *dev); static int destroy_dev_sched_cbl(struct cdev *dev, void (*cb)(void *), void *arg); -static struct cdev *make_dev_credv(int flags, - struct cdevsw *devsw, int unit, - struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt, +static int make_dev_credv(int flags, struct cdev **dres, struct cdevsw *devsw, + int unit, struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt, va_list ap); static struct cdev_priv_list cdevp_free_list = @@ -583,20 +582,20 @@ prep_cdevsw(struct cdevsw *devsw, int fl mtx_assert(&devmtx, MA_OWNED); if (devsw->d_flags & D_INIT) - return (1); + return (0); if (devsw->d_flags & D_NEEDGIANT) { dev_unlock(); dsw2 = malloc(sizeof *dsw2, M_DEVT, (flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK); dev_lock(); if (dsw2 == NULL && !(devsw->d_flags & D_INIT)) - return (0); + return (ENOMEM); } else dsw2 = NULL; if (devsw->d_flags & D_INIT) { if (dsw2 != NULL) cdevsw_free_devlocked(dsw2); - return (1); + return (0); } if (devsw->d_version != D_VERSION_01 && @@ -657,25 +656,28 @@ prep_cdevsw(struct cdevsw *devsw, int fl if (dsw2 != NULL) cdevsw_free_devlocked(dsw2); - return (1); + return (0); } -static struct cdev * -make_dev_credv(int flags, struct cdevsw *devsw, int unit, - struct ucred *cr, uid_t uid, - gid_t gid, int mode, const char *fmt, va_list ap) +static int +make_dev_credv(int flags, struct cdev **dres, struct cdevsw *devsw, int unit, + struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt, + va_list ap) { struct cdev *dev; - int i; + int i, res; + KASSERT((flags & MAKEDEV_WAITOK) == 0 || (flags & MAKEDEV_NOWAIT) == 0, + ("make_dev_credv: both WAITOK and NOWAIT specified")); dev = devfs_alloc(flags); if (dev == NULL) - return (NULL); + return (ENOMEM); dev_lock(); - if (!prep_cdevsw(devsw, flags)) { + res = prep_cdevsw(devsw, flags); + if (res != 0) { dev_unlock(); devfs_free(dev); - return (NULL); + return (res); } dev = newdev(devsw, unit, dev); if (flags & MAKEDEV_REF) @@ -688,7 +690,8 @@ make_dev_credv(int flags, struct cdevsw * XXX: still ?? */ dev_unlock_and_free(); - return (dev); + *dres = dev; + return (0); } KASSERT(!(dev->si_flags & SI_NAMED), ("make_dev() by driver %s on pre-existing device (min=%x, name=%s)", @@ -713,7 +716,8 @@ make_dev_credv(int flags, struct cdevsw notify_create(dev, flags); - return (dev); + *dres = dev; + return (0); } struct cdev * @@ -722,10 +726,13 @@ make_dev(struct cdevsw *devsw, int unit, { struct cdev *dev; va_list ap; + int res; va_start(ap, fmt); - dev = make_dev_credv(0, devsw, unit, NULL, uid, gid, mode, fmt, ap); + res = make_dev_credv(0, &dev, devsw, unit, NULL, uid, gid, mode, fmt, + ap); va_end(ap); + KASSERT(res == 0 && dev != NULL, ("make_dev: failed make_dev_credv")); return (dev); } @@ -735,28 +742,50 @@ make_dev_cred(struct cdevsw *devsw, int { struct cdev *dev; va_list ap; + int res; va_start(ap, fmt); - dev = make_dev_credv(0, devsw, unit, cr, uid, gid, mode, fmt, ap); + res = make_dev_credv(0, &dev, devsw, unit, cr, uid, gid, mode, fmt, ap); va_end(ap); + KASSERT(res == 0 && dev != NULL, + ("make_dev_cred: failed make_dev_credv")); return (dev); } struct cdev * -make_dev_credf(int flags, struct cdevsw *devsw, int unit, - struct ucred *cr, uid_t uid, - gid_t gid, int mode, const char *fmt, ...) +make_dev_credf(int flags, struct cdevsw *devsw, int unit, struct ucred *cr, + uid_t uid, gid_t gid, int mode, const char *fmt, ...) { struct cdev *dev; va_list ap; + int res; va_start(ap, fmt); - dev = make_dev_credv(flags, devsw, unit, cr, uid, gid, mode, + res = make_dev_credv(flags, &dev, devsw, unit, cr, uid, gid, mode, fmt, ap); va_end(ap); - return (dev); + KASSERT((flags & MAKEDEV_NOWAIT) != 0 || res == 0, + ("make_dev_credf: failed make_dev_credv")); + return (res == 0 ? dev : NULL); +} + +int +make_dev_p(int flags, struct cdev **cdev, struct cdevsw *devsw, + struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt, ...) +{ + va_list ap; + int res; + + va_start(ap, fmt); + res = make_dev_credv(flags, cdev, devsw, 0, cr, uid, gid, mode, + fmt, ap); + va_end(ap); + + KASSERT((flags & MAKEDEV_NOWAIT) != 0 || res == 0, + ("make_dev_p: failed make_dev_credv")); + return (res); } static void Modified: stable/8/sys/sys/conf.h ============================================================================== --- stable/8/sys/sys/conf.h Sat Jul 3 18:09:11 2010 (r209667) +++ stable/8/sys/sys/conf.h Sat Jul 3 18:19:59 2010 (r209668) @@ -279,7 +279,11 @@ struct cdev *make_dev_credf(int _flags, struct cdevsw *_devsw, int _unit, struct ucred *_cr, uid_t _uid, gid_t _gid, int _mode, const char *_fmt, ...) __printflike(8, 9); -struct cdev *make_dev_alias(struct cdev *_pdev, const char *_fmt, ...) __printflike(2, 3); +int make_dev_p(int _flags, struct cdev **_cdev, struct cdevsw *_devsw, + struct ucred *_cr, uid_t _uid, gid_t _gid, int _mode, + const char *_fmt, ...) __printflike(8, 9); +struct cdev *make_dev_alias(struct cdev *_pdev, const char *_fmt, ...) + __printflike(2, 3); void dev_lock(void); void dev_unlock(void); void setconf(void); From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 18:25:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 833C4106566B; Sat, 3 Jul 2010 18:25:37 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 716408FC0C; Sat, 3 Jul 2010 18:25:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o63IPb4U090050; Sat, 3 Jul 2010 18:25:37 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63IPbkT090047; Sat, 3 Jul 2010 18:25:37 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201007031825.o63IPbkT090047@svn.freebsd.org> From: Alan Cox Date: Sat, 3 Jul 2010 18:25: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: r209669 - in head: share/man/man9 sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 18:25:37 -0000 Author: alc Date: Sat Jul 3 18:25:37 2010 New Revision: 209669 URL: http://svn.freebsd.org/changeset/base/209669 Log: Improve the comment and man page for vm_page_alloc(). Specifically, document one of the optional flags; clarify which of the flags are optional (and which are not), and remove mention of a restriction on the reclamation of cached pages that no longer holds since version 7. MFC after: 1 week Modified: head/share/man/man9/vm_page_alloc.9 head/sys/vm/vm_page.c Modified: head/share/man/man9/vm_page_alloc.9 ============================================================================== --- head/share/man/man9/vm_page_alloc.9 Sat Jul 3 18:19:59 2010 (r209668) +++ head/share/man/man9/vm_page_alloc.9 Sat Jul 3 18:25:37 2010 (r209669) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 27, 2010 +.Dd July 3, 2010 .Dt VM_PAGE_ALLOC 9 .Os .Sh NAME @@ -38,7 +38,7 @@ .In vm/vm.h .In vm/vm_page.h .Ft vm_page_t -.Fn vm_page_alloc "vm_object_t object" "vm_pindex_t pindex" "int page_req" +.Fn vm_page_alloc "vm_object_t object" "vm_pindex_t pindex" "int req" .Sh DESCRIPTION The .Fn vm_page_alloc @@ -51,16 +51,15 @@ It is assumed that a page has not alread The page returned is inserted into the object, unless .Dv VM_ALLOC_NOOBJ is specified in the -.Fa page_req , -but is not inserted into a pmap. -The page may exists in the vm object cache, in which case it will +.Fa req . +The page may exist in the vm object cache, in which case it will be reactivated instead, moving from the cache into the object page list. .Pp .Fn vm_page_alloc will not sleep. .Pp Its arguments are: -.Bl -tag -width ".Fa page_req" +.Bl -tag -width ".Fa object" .It Fa object The VM object to allocate the page for. The @@ -70,40 +69,48 @@ must be locked if is not specified. .It Fa pindex The index into the object at which the page should be inserted. -.It Fa page_req -A flag indicating how the page should be allocated. +.It Fa req +The bitwise-inclusive OR of a class and any optional flags indicating +how the page should be allocated. +.Pp +Exactly one of the following classes must be specified: .Bl -tag -width ".Dv VM_ALLOC_INTERRUPT" .It Dv VM_ALLOC_NORMAL The page should be allocated with no special treatment. .It Dv VM_ALLOC_SYSTEM -The page can be allocated if the cache queue is empty and the free +The page can be allocated if the cache is empty and the free page count is above the interrupt reserved water mark. -If -.Dv VM_ALLOC_INTERRUPT -is set, the page can be allocated as long as the free page count is -greater than zero. This flag should be used only when the system really needs the page. .It Dv VM_ALLOC_INTERRUPT .Fn vm_page_alloc -is being called during an interrupt and therefore the cache cannot -be accessed. -The page will only be returned successfully if the free count is greater +is being called during an interrupt. +A page will be returned successfully if the free page count is greater than zero. +.El +.Pp +The optional flags are: +.Bl -tag -width ".Dv VM_ALLOC_IFNOTCACHED" .It Dv VM_ALLOC_ZERO Indicate a preference for a pre-zeroed page. -There is no guarantee that the page thus returned will be zeroed, but -it will be marked by +There is no guarantee that the returned page will be zeroed, but it +will have the .Dv PG_ZERO -flag if it is zeroed. +flag set if it is zeroed. .It Dv VM_ALLOC_NOOBJ Do not associate the allocated page with a vm object. The .Fa object argument is ignored. .It Dv VM_ALLOC_NOBUSY -The page returned will not be busied. +The returned page will not have the +.Dv VPO_BUSY +flag set. .It Dv VM_ALLOC_WIRED -The returned page is wired. +The returned page will be wired. +.It Dv VM_ALLOC_IFCACHED +Allocate the page only if it is cached. +Otherwise, return +.Dv NULL . .It Dv VM_ALLOC_IFNOTCACHED Only allocate the page if it is not cached in the .Fa object . Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat Jul 3 18:19:59 2010 (r209668) +++ head/sys/vm/vm_page.c Sat Jul 3 18:25:37 2010 (r209669) @@ -1144,14 +1144,19 @@ vm_page_cache_transfer(vm_object_t orig_ * Allocate and return a memory cell associated * with this VM object/offset pair. * - * page_req classes: + * The caller must always specify an allocation class. + * + * allocation classes: * VM_ALLOC_NORMAL normal process request * VM_ALLOC_SYSTEM system *really* needs a page * VM_ALLOC_INTERRUPT interrupt time request - * VM_ALLOC_ZERO zero page + * + * optional allocation flags: + * VM_ALLOC_ZERO prefer a zeroed page * VM_ALLOC_WIRED wire the allocated page * VM_ALLOC_NOOBJ page is not associated with a vm object * VM_ALLOC_NOBUSY do not set the page busy + * VM_ALLOC_IFCACHED return page only if it is cached * VM_ALLOC_IFNOTCACHED return NULL, do not reactivate if the page * is cached * From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 20:11:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAE8C106566B; Sat, 3 Jul 2010 20:11:04 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9ABD8FC17; Sat, 3 Jul 2010 20:11: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 o63KB4fu013219; Sat, 3 Jul 2010 20:11:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63KB4h2013217; Sat, 3 Jul 2010 20:11:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007032011.o63KB4h2013217@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 3 Jul 2010 20:11: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: r209670 - head/sys/powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 20:11:05 -0000 Author: nwhitehorn Date: Sat Jul 3 20:11:04 2010 New Revision: 209670 URL: http://svn.freebsd.org/changeset/base/209670 Log: Add a missing conditional. We should not bind the PIC interrupt unless the interrupt's PIC (a) exists and (b) is the root PIC. Reported by: Andreas Tobler Modified: head/sys/powerpc/powerpc/intr_machdep.c Modified: head/sys/powerpc/powerpc/intr_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/intr_machdep.c Sat Jul 3 18:25:37 2010 (r209669) +++ head/sys/powerpc/powerpc/intr_machdep.c Sat Jul 3 20:11:04 2010 (r209670) @@ -415,7 +415,8 @@ powerpc_bind_intr(u_int irq, u_char cpu) else i->cpu = 1 << cpu; - PIC_BIND(i->pic, i->intline, i->cpu); + if (!cold && i->pic != NULL && i->pic == root_pic) + PIC_BIND(i->pic, i->intline, i->cpu); return (intr_event_bind(i->event, cpu)); } From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 20:19:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF107106566C; Sat, 3 Jul 2010 20:19:20 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C52A08FC87; Sat, 3 Jul 2010 20: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 o63KJKa6015041; Sat, 3 Jul 2010 20:19:20 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63KJKN6015037; Sat, 3 Jul 2010 20:19:20 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201007032019.o63KJKN6015037@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 3 Jul 2010 20:19:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209671 - in head/sys/ia64: ia64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 20:19:21 -0000 Author: marcel Date: Sat Jul 3 20:19:20 2010 New Revision: 209671 URL: http://svn.freebsd.org/changeset/base/209671 Log: Allocate and setup an interrupt vector for corrected machine checks. For now, just print when we get the interrupt, but eventually we need to collect the details and provide a more useful report. Modified: head/sys/ia64/ia64/mca.c head/sys/ia64/ia64/mp_machdep.c head/sys/ia64/include/mca.h Modified: head/sys/ia64/ia64/mca.c ============================================================================== --- head/sys/ia64/ia64/mca.c Sat Jul 3 20:11:04 2010 (r209670) +++ head/sys/ia64/ia64/mca.c Sat Jul 3 20:19:20 2010 (r209671) @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -36,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -72,6 +74,8 @@ SYSCTL_INT(_hw_mca, OID_AUTO, last, CTLF static struct mtx mca_sysctl_lock; +static u_int mca_xiv_cmc; + static int mca_sysctl_inject(SYSCTL_HANDLER_ARGS) { @@ -227,6 +231,26 @@ ia64_mca_save_state(int type) } } +static u_int +ia64_mca_intr(struct thread *td, u_int xiv, struct trapframe *tf) +{ + + if (xiv == mca_xiv_cmc) { + printf("MCA: corrected machine check (CMC) interrupt\n"); + return (0); + } + + return (0); +} + +void +ia64_mca_init_ap(void) +{ + + if (mca_xiv_cmc != 0) + ia64_set_cmcv(mca_xiv_cmc); +} + void ia64_mca_init(void) { @@ -289,4 +313,14 @@ ia64_mca_init(void) */ for (i = 0; i < SAL_INFO_TYPES; i++) ia64_mca_save_state(i); + + /* + * Allocate a XIV for CMC interrupts, so that we can collect and save + * the corrected processor checks. + */ + mca_xiv_cmc = ia64_xiv_alloc(PI_SOFT, IA64_XIV_PLAT, ia64_mca_intr); + if (mca_xiv_cmc != 0) + ia64_set_cmcv(mca_xiv_cmc); + else + printf("MCA: CMC vector could not be allocated\n"); } Modified: head/sys/ia64/ia64/mp_machdep.c ============================================================================== --- head/sys/ia64/ia64/mp_machdep.c Sat Jul 3 20:11:04 2010 (r209670) +++ head/sys/ia64/ia64/mp_machdep.c Sat Jul 3 20:19:20 2010 (r209671) @@ -163,6 +163,8 @@ ia64_store_mca_state(void* arg) sched_bind(td, pc->pc_cpuid); thread_unlock(td); + ia64_mca_init_ap(); + /* * Get and save the CPU specific MCA records. Should we get the * MCA state for each processor, or just the CMC state? Modified: head/sys/ia64/include/mca.h ============================================================================== --- head/sys/ia64/include/mca.h Sat Jul 3 20:11:04 2010 (r209670) +++ head/sys/ia64/include/mca.h Sat Jul 3 20:19:20 2010 (r209671) @@ -240,6 +240,7 @@ struct mca_pcidev_reg { #ifdef _KERNEL void ia64_mca_init(void); +void ia64_mca_init_ap(void); void ia64_mca_save_state(int); #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 21:06:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0ABA1065672; Sat, 3 Jul 2010 21:06:48 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEE358FC13; Sat, 3 Jul 2010 21:06: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 o63L6mBp025641; Sat, 3 Jul 2010 21:06:48 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63L6m8O025638; Sat, 3 Jul 2010 21:06:48 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201007032106.o63L6m8O025638@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Jul 2010 21:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209675 - in stable/7: bin/sh tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2010 21:06:48 -0000 Author: jilles Date: Sat Jul 3 21:06:48 2010 New Revision: 209675 URL: http://svn.freebsd.org/changeset/base/209675 Log: MFC r207944: sh: Fix pathname expansion with quoted slashes like *\/. These are git commits 36f0fa8fcbc8c7b2b194addd29100fb40e73e4e9 and d6d06ff5c2ea0fa44becc5ef4340e5f2f15073e4 in dash. Because this is the first code I'm importing from dash to expand.c, add the Herbert Xu copyright notice which is in dash's expand.c. When pathname expanding *\/, the CTLESC representing the quoted state was erroneously taken as part of the * pathname component. This CTLESC was then seen by the pattern matching code as escaping the '\0' terminating the string. The code is slightly different because dash converts the CTLESC characters to backslashes and removes all the other CTL* characters to allow substituting glob(3). The effect of the bug was also slightly different from dash (where nothing matched at all). Because a CTLESC can escape a '\0' in some way, whether files were included despite the bug depended on memory that should not be read. In particular, on many machines /*\/ expanded to a strict subset of what /*/ expanded to. Example: echo /*"/null" This should print /dev/null, not /*/null. PR: bin/146378 Obtained from: dash Added: stable/7/tools/regression/bin/sh/expansion/ stable/7/tools/regression/bin/sh/expansion/pathname2.0 - copied unchanged from r207944, head/tools/regression/bin/sh/expansion/pathname2.0 Modified: stable/7/bin/sh/expand.c Directory Properties: stable/7/bin/sh/ (props changed) stable/7/tools/regression/bin/sh/ (props changed) Modified: stable/7/bin/sh/expand.c ============================================================================== --- stable/7/bin/sh/expand.c Sat Jul 3 21:02:11 2010 (r209674) +++ stable/7/bin/sh/expand.c Sat Jul 3 21:06:48 2010 (r209675) @@ -1,6 +1,8 @@ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. + * Copyright (c) 1997-2005 + * Herbert Xu . All rights reserved. * * This code is derived from software contributed to Berkeley by * Kenneth Almquist. @@ -1122,10 +1124,11 @@ expmeta(char *enddir, char *name) struct dirent *dp; int atend; int matchdot; + int esc; metaflag = 0; start = name; - for (p = name ; ; p++) { + for (p = name; esc = 0, *p; p += esc + 1) { if (*p == '*' || *p == '?') metaflag = 1; else if (*p == '[') { @@ -1150,12 +1153,14 @@ expmeta(char *enddir, char *name) break; else if (*p == CTLQUOTEMARK) continue; - else if (*p == CTLESC) - p++; - if (*p == '/') { - if (metaflag) - break; - start = p + 1; + else { + if (*p == CTLESC) + esc++; + if (p[esc] == '/') { + if (metaflag) + break; + start = p + esc + 1; + } } } if (metaflag == 0) { /* we've reached the end of the file name */ @@ -1201,7 +1206,8 @@ expmeta(char *enddir, char *name) atend = 1; } else { atend = 0; - *endname++ = '\0'; + *endname = '\0'; + endname += esc + 1; } matchdot = 0; p = start; @@ -1229,7 +1235,7 @@ expmeta(char *enddir, char *name) } closedir(dirp); if (! atend) - endname[-1] = '/'; + endname[-esc - 1] = esc ? CTLESC : '/'; } Copied: stable/7/tools/regression/bin/sh/expansion/pathname2.0 (from r207944, head/tools/regression/bin/sh/expansion/pathname2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/regression/bin/sh/expansion/pathname2.0 Sat Jul 3 21:06:48 2010 (r209675, copy of r207944, head/tools/regression/bin/sh/expansion/pathname2.0) @@ -0,0 +1,31 @@ +# $FreeBSD$ + +failures=0 + +check() { + testcase=$1 + expect=$2 + eval "set -- $testcase" + actual="$*" + if [ "$actual" != "$expect" ]; then + failures=$((failures+1)) + printf '%s\n' "For $testcase, expected $expect actual $actual" + fi +} + +set -e +T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) +trap 'rm -rf $T' 0 +cd -P $T + +mkdir testdir testdir2 'testdir/*' 'testdir/?' testdir/a testdir/b testdir2/b +mkdir testdir2/.c +touch testf 'testdir/*/1' 'testdir/?/1' testdir/a/1 testdir/b/1 testdir2/b/.a + +check '*\/' 'testdir/ testdir2/' +check '"testdir/"*"/1"' 'testdir/*/1 testdir/?/1 testdir/a/1 testdir/b/1' +check '"testdir/"*"/"*' 'testdir/*/1 testdir/?/1 testdir/a/1 testdir/b/1' +check '"testdir/"*\/*' 'testdir/*/1 testdir/?/1 testdir/a/1 testdir/b/1' +check '"testdir"*"/"*"/"*' 'testdir/*/1 testdir/?/1 testdir/a/1 testdir/b/1' + +exit $((failures != 0)) From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 21:31:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 550B1106564A; Sat, 3 Jul 2010 21:31:06 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 447BC8FC17; Sat, 3 Jul 2010 21:31:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o63LV5iO030949; Sat, 3 Jul 2010 21:31:05 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63LV5PT030947; Sat, 3 Jul 2010 21:31:05 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201007032131.o63LV5PT030947@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Jul 2010 21:31: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: r209676 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 21:31:06 -0000 Author: jilles Date: Sat Jul 3 21:31:05 2010 New Revision: 209676 URL: http://svn.freebsd.org/changeset/base/209676 Log: MFC r209337: sh: Fix compilation with -DNO_HISTORY. The LINENO code uses snprintf() and relied on "myhistedit.h" to pull in the necessary . Compiling with -DNO_HISTORY disables all editing and history support and allows linking without -ledit -ltermcap. This may be useful for embedded systems. Modified: stable/8/bin/sh/parser.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/parser.c ============================================================================== --- stable/8/bin/sh/parser.c Sat Jul 3 21:06:48 2010 (r209675) +++ stable/8/bin/sh/parser.c Sat Jul 3 21:31:05 2010 (r209676) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "shell.h" #include "parser.h" From owner-svn-src-all@FreeBSD.ORG Sat Jul 3 22:02:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 824B4106566C; Sat, 3 Jul 2010 22:02:29 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 724FD8FC14; Sat, 3 Jul 2010 22:02:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o63M2T6r037841; Sat, 3 Jul 2010 22:02:29 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o63M2TZt037839; Sat, 3 Jul 2010 22:02:29 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201007032202.o63M2TZt037839@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 3 Jul 2010 22:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209677 - head/sbin/mca X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 22:02:29 -0000 Author: marcel Date: Sat Jul 3 22:02:29 2010 New Revision: 209677 URL: http://svn.freebsd.org/changeset/base/209677 Log: sysctlbyname() returns -1 on error and sets errno. It does not return the error itself. Modified: head/sbin/mca/mca.c Modified: head/sbin/mca/mca.c ============================================================================== --- head/sbin/mca/mca.c Sat Jul 3 21:31:05 2010 (r209676) +++ head/sbin/mca/mca.c Sat Jul 3 22:02:29 2010 (r209677) @@ -469,29 +469,28 @@ main(int argc, char **argv) if (file == NULL || fl_dump) { len = sizeof(count); - error = sysctlbyname(hw_mca_count, &count, &len, NULL, 0); - if (error) + if (sysctlbyname(hw_mca_count, &count, &len, NULL, 0) == -1) err(1, hw_mca_count); if (count == 0) errx(0, "no error records found"); len = sizeof(first); - error = sysctlbyname(hw_mca_first, &first, &len, NULL, 0); - if (error) + if (sysctlbyname(hw_mca_first, &first, &len, NULL, 0) == -1) err(1, hw_mca_first); len = sizeof(last); - error = sysctlbyname(hw_mca_last, &last, &len, NULL, 0); - if (error) + if (sysctlbyname(hw_mca_last, &last, &len, NULL, 0) == -1) err(1, hw_mca_last); cpuid = 0; + error = 0; while (count && first <= last) { do { sprintf(mib, hw_mca_recid, first, cpuid); len = 0; - error = sysctlbyname(mib, NULL, &len, NULL, 0); + ch = sysctlbyname(mib, NULL, &len, NULL, 0); + error = (ch == -1) ? errno : 0; if (error != ENOENT) break; cpuid++; @@ -502,14 +501,13 @@ main(int argc, char **argv) continue; } if (error) - err(1, "%s(1)", mib); + errc(1, error, "%s(1)", mib); buf = malloc(len); if (buf == NULL) err(1, "buffer"); - error = sysctlbyname(mib, buf, &len, NULL, 0); - if (error) + if (sysctlbyname(mib, buf, &len, NULL, 0) == -1) err(1, "%s(2)", mib); if (fl_dump)