From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 00:33:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6504B1065670; Sun, 11 Mar 2012 00:33:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E85F8FC14; Sun, 11 Mar 2012 00:33:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B0XtRP085444; Sun, 11 Mar 2012 00:33:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B0XtCC085442; Sun, 11 Mar 2012 00:33:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203110033.q2B0XtCC085442@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 00:33:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232802 - stable/9/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 00:33:55 -0000 Author: kib Date: Sun Mar 11 00:33:54 2012 New Revision: 232802 URL: http://svn.freebsd.org/changeset/base/232802 Log: MFC r232694: Document P_ORPHAN. Modified: stable/9/bin/ps/ps.1 Directory Properties: stable/9/bin/ps/ (props changed) Modified: stable/9/bin/ps/ps.1 ============================================================================== --- stable/9/bin/ps/ps.1 Sat Mar 10 23:27:03 2012 (r232801) +++ stable/9/bin/ps/ps.1 Sun Mar 11 00:33:54 2012 (r232802) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd November 22, 2011 +.Dd March 8, 2012 .Dt PS 1 .Os .Sh NAME @@ -317,6 +317,7 @@ the include file .It Dv "P_SINGLE_BOUNDARY" Ta No "0x400000 Threads should suspend at user boundary" .It Dv "P_HWPMC" Ta No "0x800000 Process is using HWPMCs" .It Dv "P_JAILED" Ta No "0x1000000 Process is in jail" +.It Dv "P_ORPHAN" Ta No "0x2000000 Orphaned by original parent, reparented to debugger" .It Dv "P_INEXEC" Ta No "0x4000000 Process is in execve()" .It Dv "P_STATCHILD" Ta No "0x8000000 Child process stopped or exited" .It Dv "P_INMEM" Ta No "0x10000000 Loaded into memory" From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 00:34:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DD1C1065672; Sun, 11 Mar 2012 00:34:15 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E0FA8FC08; Sun, 11 Mar 2012 00:34:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B0YFZE085497; Sun, 11 Mar 2012 00:34:15 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B0YFDX085495; Sun, 11 Mar 2012 00:34:15 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203110034.q2B0YFDX085495@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 00:34: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: r232803 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 00:34:15 -0000 Author: jmallett Date: Sun Mar 11 00:34:14 2012 New Revision: 232803 URL: http://svn.freebsd.org/changeset/base/232803 Log: Fix promiscuous mode with if_octm: o) The MAC set must occur before the multicast list is set up as the former will enable the CAM unconditionally, while promiscuous mode disables it, so if promiscuous mode is to be set this must occur after the MAC is programmed. o) The multicast list must be set up unconditionally as even if flags have not changed, if the interface has gone through a reinitialization, the state of the CAM as changed by the MAC initialization could be incorrect. o) Call octm_init when flags change, even if the interface is already running. Modified: head/sys/mips/cavium/if_octm.c Modified: head/sys/mips/cavium/if_octm.c ============================================================================== --- head/sys/mips/cavium/if_octm.c Sun Mar 11 00:33:54 2012 (r232802) +++ head/sys/mips/cavium/if_octm.c Sun Mar 11 00:34:14 2012 (r232803) @@ -298,19 +298,27 @@ octm_init(void *arg) ifp->if_drv_flags &= ~IFF_DRV_RUNNING; } - if (((ifp->if_flags ^ sc->sc_flags) & (IFF_ALLMULTI | IFF_MULTICAST | IFF_PROMISC)) != 0) { - flags = 0; - if ((ifp->if_flags & IFF_ALLMULTI) != 0) - flags |= CVMX_IFF_ALLMULTI; - if ((ifp->if_flags & IFF_PROMISC) != 0) - flags |= CVMX_IFF_PROMISC; - cvmx_mgmt_port_set_multicast_list(sc->sc_port, flags); - } - + /* + * NB: + * MAC must be set before allmulti and promisc below, as + * cvmx_mgmt_port_set_mac will always enable the CAM, and turning on + * promiscuous mode only works with the CAM disabled. + */ mac = 0; memcpy((u_int8_t *)&mac + 2, IF_LLADDR(ifp), 6); cvmx_mgmt_port_set_mac(sc->sc_port, mac); + /* + * This is done unconditionally, rather than only if sc_flags have + * changed because of set_mac's effect on the CAM noted above. + */ + flags = 0; + if ((ifp->if_flags & IFF_ALLMULTI) != 0) + flags |= CVMX_IFF_ALLMULTI; + if ((ifp->if_flags & IFF_PROMISC) != 0) + flags |= CVMX_IFF_PROMISC; + cvmx_mgmt_port_set_multicast_list(sc->sc_port, flags); + /* XXX link state? */ if ((ifp->if_flags & IFF_UP) != 0) @@ -444,8 +452,7 @@ octm_ioctl(struct ifnet *ifp, u_long cmd if (ifp->if_flags == sc->sc_flags) return (0); if ((ifp->if_flags & IFF_UP) != 0) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - octm_init(sc); + octm_init(sc); } else { if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { cvmx_mgmt_port_disable(sc->sc_port); From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 00:43:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9933F1065672; Sun, 11 Mar 2012 00:43:02 +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 6A4118FC16; Sun, 11 Mar 2012 00:43:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B0h2E7085858; Sun, 11 Mar 2012 00:43:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B0h2dA085856; Sun, 11 Mar 2012 00:43:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203110043.q2B0h2dA085856@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 00:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232804 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 00:43:02 -0000 Author: kib Date: Sun Mar 11 00:43:01 2012 New Revision: 232804 URL: http://svn.freebsd.org/changeset/base/232804 Log: MFC r232178: Remove apparently redundand checks for socket so_proto being non-NULL from sosetopt() and sogetopt(). Modified: stable/9/sys/kern/uipc_socket.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_socket.c ============================================================================== --- stable/9/sys/kern/uipc_socket.c Sun Mar 11 00:34:14 2012 (r232803) +++ stable/9/sys/kern/uipc_socket.c Sun Mar 11 00:43:01 2012 (r232804) @@ -2442,7 +2442,7 @@ sosetopt(struct socket *so, struct socko CURVNET_SET(so->so_vnet); error = 0; if (sopt->sopt_level != SOL_SOCKET) { - if (so->so_proto && so->so_proto->pr_ctloutput) { + if (so->so_proto->pr_ctloutput != NULL) { error = (*so->so_proto->pr_ctloutput)(so, sopt); CURVNET_RESTORE(); return (error); @@ -2503,8 +2503,7 @@ sosetopt(struct socket *so, struct socko error = EINVAL; goto bad; } - if (so->so_proto != NULL && - ((so->so_proto->pr_domain->dom_family == PF_INET) || + if (((so->so_proto->pr_domain->dom_family == PF_INET) || (so->so_proto->pr_domain->dom_family == PF_INET6) || (so->so_proto->pr_domain->dom_family == PF_ROUTE))) { so->so_fibnum = optval; @@ -2636,11 +2635,8 @@ sosetopt(struct socket *so, struct socko error = ENOPROTOOPT; break; } - if (error == 0 && so->so_proto != NULL && - so->so_proto->pr_ctloutput != NULL) { - (void) ((*so->so_proto->pr_ctloutput) - (so, sopt)); - } + if (error == 0 && so->so_proto->pr_ctloutput != NULL) + (void)(*so->so_proto->pr_ctloutput)(so, sopt); } bad: CURVNET_RESTORE(); @@ -2690,7 +2686,7 @@ sogetopt(struct socket *so, struct socko CURVNET_SET(so->so_vnet); error = 0; if (sopt->sopt_level != SOL_SOCKET) { - if (so->so_proto && so->so_proto->pr_ctloutput) + if (so->so_proto->pr_ctloutput != NULL) error = (*so->so_proto->pr_ctloutput)(so, sopt); else error = ENOPROTOOPT; From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 00:48:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E9434106566B; Sun, 11 Mar 2012 00:48:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D39C18FC0A; Sun, 11 Mar 2012 00:48:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B0msvO086108; Sun, 11 Mar 2012 00:48:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B0ms5c086105; Sun, 11 Mar 2012 00:48:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203110048.q2B0ms5c086105@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 00:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232805 - in stable/9/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: Sun, 11 Mar 2012 00:48:55 -0000 Author: kib Date: Sun Mar 11 00:48:54 2012 New Revision: 232805 URL: http://svn.freebsd.org/changeset/base/232805 Log: MFC r232179: Add SO_PROTOCOL/SO_PROTOTYPE socket SOL_SOCKET-level option to get the socket protocol number. PR: kern/162352 Modified: stable/9/sys/kern/uipc_socket.c stable/9/sys/sys/socket.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_socket.c ============================================================================== --- stable/9/sys/kern/uipc_socket.c Sun Mar 11 00:43:01 2012 (r232804) +++ stable/9/sys/kern/uipc_socket.c Sun Mar 11 00:48:54 2012 (r232805) @@ -2728,6 +2728,10 @@ integer: optval = so->so_type; goto integer; + case SO_PROTOCOL: + optval = so->so_proto->pr_protocol; + goto integer; + case SO_ERROR: SOCK_LOCK(so); optval = so->so_error; Modified: stable/9/sys/sys/socket.h ============================================================================== --- stable/9/sys/sys/socket.h Sun Mar 11 00:43:01 2012 (r232804) +++ stable/9/sys/sys/socket.h Sun Mar 11 00:48:54 2012 (r232805) @@ -138,6 +138,8 @@ typedef __uid_t uid_t; #define SO_LISTENINCQLEN 0x1013 /* socket's incomplete queue length */ #define SO_SETFIB 0x1014 /* use this FIB to route */ #define SO_USER_COOKIE 0x1015 /* user cookie (dummynet etc.) */ +#define SO_PROTOCOL 0x1016 /* get socket protocol (Linux name) */ +#define SO_PROTOTYPE SO_PROTOCOL /* alias for SO_PROTOCOL (SunOS name) */ #endif /* From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 00:51:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2371106566B; Sun, 11 Mar 2012 00:51:16 +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 8B8908FC17; Sun, 11 Mar 2012 00:51:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B0pGXr086235; Sun, 11 Mar 2012 00:51:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B0pGgW086233; Sun, 11 Mar 2012 00:51:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203110051.q2B0pGgW086233@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 00:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232806 - stable/9/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, 11 Mar 2012 00:51:16 -0000 Author: kib Date: Sun Mar 11 00:51:16 2012 New Revision: 232806 URL: http://svn.freebsd.org/changeset/base/232806 Log: MFC r232180: Document SO_PROTOCOL socket option. Modified: stable/9/lib/libc/sys/getsockopt.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/getsockopt.2 ============================================================================== --- stable/9/lib/libc/sys/getsockopt.2 Sun Mar 11 00:48:54 2012 (r232805) +++ stable/9/lib/libc/sys/getsockopt.2 Sun Mar 11 00:51:16 2012 (r232806) @@ -28,7 +28,7 @@ .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd November 21, 2011 +.Dd February 26, 2012 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -172,6 +172,8 @@ for the socket .It Dv SO_BINTIME Ta "enables reception of a timestamp with datagrams" .It Dv SO_ACCEPTCONN Ta "get listening status of the socket (get only)" .It Dv SO_TYPE Ta "get the type of the socket (get only)" +.It Dv SO_PROTOCOL Ta "get the protocol number for the socket (get only)" +.It Dv SO_PROTOTYPE Ta "SunOS alias for the Linux SO_PROTOCOL (get only)" .It Dv SO_ERROR Ta "get and clear error on the socket (get only)" .It Dv SO_SETFIB Ta "set the associated FIB (routing table) for the socket (set only)" .El @@ -449,7 +451,10 @@ and for .Ed .Pp .Dv SO_ACCEPTCONN , -.Dv SO_TYPE +.Dv SO_TYPE , +.Dv SO_PROTOCOL +(and its alias +.Dv SO_PROTOTYPE ) and .Dv SO_ERROR are options used only with @@ -463,6 +468,12 @@ system call was invoked on the socket. returns the type of the socket, such as .Dv SOCK_STREAM ; it is useful for servers that inherit sockets on startup. +.Dv SO_PROTOCOL +returns the protocol number for the socket, for +.Dv AF_INET +and +.Dv AF_INET6 +address families. .Dv SO_ERROR returns any pending error on the socket and clears the error status. From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 02:00:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6189106566C; Sun, 11 Mar 2012 02:00:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C04D08FC16; Sun, 11 Mar 2012 02:00:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B20xsJ088437; Sun, 11 Mar 2012 02:00:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B20xhO088434; Sun, 11 Mar 2012 02:00:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203110200.q2B20xhO088434@svn.freebsd.org> From: Adrian Chadd Date: Sun, 11 Mar 2012 02:00:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232807 - head/tools/tools/ath/ath_ee_v14_print X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 02:00:59 -0000 Author: adrian Date: Sun Mar 11 02:00:59 2012 New Revision: 232807 URL: http://svn.freebsd.org/changeset/base/232807 Log: Stop some of the output from wrapping at 80 characters. Modified: head/tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c Modified: head/tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c ============================================================================== --- head/tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c Sun Mar 11 00:51:16 2012 (r232806) +++ head/tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c Sun Mar 11 02:00:59 2012 (r232807) @@ -91,8 +91,10 @@ eeprom_v14_base_print(uint16_t *buf) printf("| Version: 0x%.4x | Length: 0x%.4x | Checksum: 0x%.4x ", eh->version, eh->length, eh->checksum); - printf("| CapFlags: 0x%.2x | eepMisc: 0x%.2x | RegDomain: 0x%.4x 0x%.4x | \n", - eh->opCapFlags, eh->eepMisc, eh->regDmn[0], eh->regDmn[1]); + printf("| CapFlags: 0x%.2x\n", eh->opCapFlags); + + printf("| eepMisc: 0x%.2x | RegDomain: 0x%.4x 0x%.4x | \n", + eh->eepMisc, eh->regDmn[0], eh->regDmn[1]); printf("| MAC: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x ", eh->macAddr[0], eh->macAddr[1], eh->macAddr[2], eh->macAddr[3], eh->macAddr[4], eh->macAddr[5]); @@ -105,7 +107,7 @@ eeprom_v14_base_print(uint16_t *buf) (int) eh->pwdclkind, (int) eh->fastClk5g, (int) eh->divChain, (int) eh->rxGainType); - printf("| dacHiPwrMode_5G: 0x%.2x | openLoopPwrCntl: 0x%.2x | dacLpMode: 0x%.2x ", + printf("| dacHiPwrMode_5G: 0x%.2x | openLoopPwrCntl: 0x%.2x | dacLpMode: 0x%.2x\n", (int) eh->dacHiPwrMode_5G, (int) eh->openLoopPwrCntl, (int) eh->dacLpMode); printf("| txGainType: 0x%.2x | rcChainMask: 0x%.2x |\n", (int) eh->txGainType, (int) eh->rcChainMask); From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 04:13:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86A5F1065670; Sun, 11 Mar 2012 04:13:00 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C1178FC15; Sun, 11 Mar 2012 04:13:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B4D0uI092837; Sun, 11 Mar 2012 04:13:00 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B4D0HJ092835; Sun, 11 Mar 2012 04:13:00 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203110413.q2B4D0HJ092835@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 04:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232808 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 04:13:00 -0000 Author: jmallett Date: Sun Mar 11 04:12:59 2012 New Revision: 232808 URL: http://svn.freebsd.org/changeset/base/232808 Log: Raise my limit for Octeon SDK 2.3.0 import. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Sun Mar 11 02:00:59 2012 (r232807) +++ svnadmin/conf/sizelimit.conf Sun Mar 11 04:12:59 2012 (r232808) @@ -27,6 +27,7 @@ gonzo imp jb jeff +jmallett kmacy lstewart obrien From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 04:14:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F5BD106566B; Sun, 11 Mar 2012 04:14:01 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF64D8FC20; Sun, 11 Mar 2012 04:14:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B4E0Yk092906; Sun, 11 Mar 2012 04:14:00 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B4E0Te092897; Sun, 11 Mar 2012 04:14:00 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203110414.q2B4E0Te092897@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 04:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232809 - in vendor-sys/octeon-sdk/dist: . cvmx-malloc libfdt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 04:14:01 -0000 Author: jmallett Date: Sun Mar 11 04:14:00 2012 New Revision: 232809 URL: http://svn.freebsd.org/changeset/base/232809 Log: Import Cavium Octeon SDK 2.3.0 Simple Executive from cnusers.org. Added: vendor-sys/octeon-sdk/dist/README.txt vendor-sys/octeon-sdk/dist/cvmx-ciu2-defs.h vendor-sys/octeon-sdk/dist/cvmx-endor-defs.h vendor-sys/octeon-sdk/dist/cvmx-eoi-defs.h vendor-sys/octeon-sdk/dist/cvmx-error-init-cn61xx.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn66xx.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn68xx.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn68xxp1.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cnf71xx.c vendor-sys/octeon-sdk/dist/cvmx-helper-cfg.c vendor-sys/octeon-sdk/dist/cvmx-helper-cfg.h vendor-sys/octeon-sdk/dist/cvmx-helper-ilk.c vendor-sys/octeon-sdk/dist/cvmx-helper-ilk.h vendor-sys/octeon-sdk/dist/cvmx-hfa.c vendor-sys/octeon-sdk/dist/cvmx-hfa.h vendor-sys/octeon-sdk/dist/cvmx-ilk-defs.h vendor-sys/octeon-sdk/dist/cvmx-ilk.c vendor-sys/octeon-sdk/dist/cvmx-ilk.h vendor-sys/octeon-sdk/dist/cvmx-iob1-defs.h vendor-sys/octeon-sdk/dist/cvmx-ipd.c vendor-sys/octeon-sdk/dist/cvmx-malloc/ vendor-sys/octeon-sdk/dist/cvmx-malloc/README-malloc vendor-sys/octeon-sdk/dist/cvmx-malloc/arena.c vendor-sys/octeon-sdk/dist/cvmx-malloc/malloc.c vendor-sys/octeon-sdk/dist/cvmx-malloc/malloc.h vendor-sys/octeon-sdk/dist/cvmx-malloc/thread-m.h vendor-sys/octeon-sdk/dist/cvmx-profiler.c vendor-sys/octeon-sdk/dist/cvmx-profiler.h vendor-sys/octeon-sdk/dist/cvmx-qlm-tables.c vendor-sys/octeon-sdk/dist/cvmx-qlm.c vendor-sys/octeon-sdk/dist/cvmx-qlm.h vendor-sys/octeon-sdk/dist/cvmx-resources.config vendor-sys/octeon-sdk/dist/cvmx-shared-linux-n32.ld vendor-sys/octeon-sdk/dist/cvmx-shared-linux-o32.ld vendor-sys/octeon-sdk/dist/cvmx-shared-linux.ld vendor-sys/octeon-sdk/dist/cvmx-sso-defs.h vendor-sys/octeon-sdk/dist/cvmx-trax-defs.h vendor-sys/octeon-sdk/dist/cvmx.mk vendor-sys/octeon-sdk/dist/executive-config.h.template vendor-sys/octeon-sdk/dist/libfdt/ vendor-sys/octeon-sdk/dist/libfdt/fdt.c vendor-sys/octeon-sdk/dist/libfdt/fdt.h vendor-sys/octeon-sdk/dist/libfdt/fdt_ro.c vendor-sys/octeon-sdk/dist/libfdt/fdt_rw.c vendor-sys/octeon-sdk/dist/libfdt/fdt_strerror.c vendor-sys/octeon-sdk/dist/libfdt/fdt_sw.c vendor-sys/octeon-sdk/dist/libfdt/fdt_wip.c vendor-sys/octeon-sdk/dist/libfdt/libfdt.h vendor-sys/octeon-sdk/dist/libfdt/libfdt.mk vendor-sys/octeon-sdk/dist/libfdt/libfdt_env.h vendor-sys/octeon-sdk/dist/libfdt/libfdt_internal.h vendor-sys/octeon-sdk/dist/octeon-feature.c Modified: vendor-sys/octeon-sdk/dist/cvmip.h vendor-sys/octeon-sdk/dist/cvmx-abi.h vendor-sys/octeon-sdk/dist/cvmx-access-native.h vendor-sys/octeon-sdk/dist/cvmx-access.h vendor-sys/octeon-sdk/dist/cvmx-address.h vendor-sys/octeon-sdk/dist/cvmx-agl-defs.h vendor-sys/octeon-sdk/dist/cvmx-app-hotplug.c vendor-sys/octeon-sdk/dist/cvmx-app-hotplug.h vendor-sys/octeon-sdk/dist/cvmx-app-init-linux.c vendor-sys/octeon-sdk/dist/cvmx-app-init.c vendor-sys/octeon-sdk/dist/cvmx-app-init.h vendor-sys/octeon-sdk/dist/cvmx-asm.h vendor-sys/octeon-sdk/dist/cvmx-asx0-defs.h vendor-sys/octeon-sdk/dist/cvmx-asxx-defs.h vendor-sys/octeon-sdk/dist/cvmx-atomic.h vendor-sys/octeon-sdk/dist/cvmx-bootloader.h vendor-sys/octeon-sdk/dist/cvmx-bootmem.c vendor-sys/octeon-sdk/dist/cvmx-bootmem.h vendor-sys/octeon-sdk/dist/cvmx-ciu-defs.h vendor-sys/octeon-sdk/dist/cvmx-clock.c vendor-sys/octeon-sdk/dist/cvmx-clock.h vendor-sys/octeon-sdk/dist/cvmx-cmd-queue.c vendor-sys/octeon-sdk/dist/cvmx-cmd-queue.h vendor-sys/octeon-sdk/dist/cvmx-cn3010-evb-hs5.c vendor-sys/octeon-sdk/dist/cvmx-cn3010-evb-hs5.h vendor-sys/octeon-sdk/dist/cvmx-compactflash.c vendor-sys/octeon-sdk/dist/cvmx-compactflash.h vendor-sys/octeon-sdk/dist/cvmx-core.c vendor-sys/octeon-sdk/dist/cvmx-core.h vendor-sys/octeon-sdk/dist/cvmx-coremask.c vendor-sys/octeon-sdk/dist/cvmx-coremask.h vendor-sys/octeon-sdk/dist/cvmx-crypto.c vendor-sys/octeon-sdk/dist/cvmx-crypto.h vendor-sys/octeon-sdk/dist/cvmx-csr-db-support.c vendor-sys/octeon-sdk/dist/cvmx-csr-db.c vendor-sys/octeon-sdk/dist/cvmx-csr-db.h vendor-sys/octeon-sdk/dist/cvmx-csr-enums.h vendor-sys/octeon-sdk/dist/cvmx-csr-typedefs.h vendor-sys/octeon-sdk/dist/cvmx-csr.h vendor-sys/octeon-sdk/dist/cvmx-dbg-defs.h vendor-sys/octeon-sdk/dist/cvmx-debug-handler.S vendor-sys/octeon-sdk/dist/cvmx-debug-remote.c vendor-sys/octeon-sdk/dist/cvmx-debug-uart.c vendor-sys/octeon-sdk/dist/cvmx-debug.c vendor-sys/octeon-sdk/dist/cvmx-debug.h vendor-sys/octeon-sdk/dist/cvmx-dfa-defs.h vendor-sys/octeon-sdk/dist/cvmx-dfa.c vendor-sys/octeon-sdk/dist/cvmx-dfa.h vendor-sys/octeon-sdk/dist/cvmx-dfm-defs.h vendor-sys/octeon-sdk/dist/cvmx-dma-engine.c vendor-sys/octeon-sdk/dist/cvmx-dma-engine.h vendor-sys/octeon-sdk/dist/cvmx-dpi-defs.h vendor-sys/octeon-sdk/dist/cvmx-ebt3000.c vendor-sys/octeon-sdk/dist/cvmx-ebt3000.h vendor-sys/octeon-sdk/dist/cvmx-error-custom.c vendor-sys/octeon-sdk/dist/cvmx-error-custom.h vendor-sys/octeon-sdk/dist/cvmx-error-init-cn30xx.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn31xx.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn38xx.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn38xxp2.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn50xx.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn52xx.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn52xxp1.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn56xx.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn56xxp1.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn58xx.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn58xxp1.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn63xx.c vendor-sys/octeon-sdk/dist/cvmx-error-init-cn63xxp1.c vendor-sys/octeon-sdk/dist/cvmx-error.c vendor-sys/octeon-sdk/dist/cvmx-error.h vendor-sys/octeon-sdk/dist/cvmx-fau.h vendor-sys/octeon-sdk/dist/cvmx-flash.c vendor-sys/octeon-sdk/dist/cvmx-flash.h vendor-sys/octeon-sdk/dist/cvmx-fpa-defs.h vendor-sys/octeon-sdk/dist/cvmx-fpa.c vendor-sys/octeon-sdk/dist/cvmx-fpa.h vendor-sys/octeon-sdk/dist/cvmx-gmx.h vendor-sys/octeon-sdk/dist/cvmx-gmxx-defs.h vendor-sys/octeon-sdk/dist/cvmx-gpio-defs.h vendor-sys/octeon-sdk/dist/cvmx-gpio.h vendor-sys/octeon-sdk/dist/cvmx-helper-board.c vendor-sys/octeon-sdk/dist/cvmx-helper-board.h vendor-sys/octeon-sdk/dist/cvmx-helper-check-defines.h vendor-sys/octeon-sdk/dist/cvmx-helper-errata.c vendor-sys/octeon-sdk/dist/cvmx-helper-errata.h vendor-sys/octeon-sdk/dist/cvmx-helper-fpa.c vendor-sys/octeon-sdk/dist/cvmx-helper-fpa.h vendor-sys/octeon-sdk/dist/cvmx-helper-jtag.c vendor-sys/octeon-sdk/dist/cvmx-helper-jtag.h vendor-sys/octeon-sdk/dist/cvmx-helper-loop.c vendor-sys/octeon-sdk/dist/cvmx-helper-loop.h vendor-sys/octeon-sdk/dist/cvmx-helper-npi.c vendor-sys/octeon-sdk/dist/cvmx-helper-npi.h vendor-sys/octeon-sdk/dist/cvmx-helper-rgmii.c vendor-sys/octeon-sdk/dist/cvmx-helper-rgmii.h vendor-sys/octeon-sdk/dist/cvmx-helper-sgmii.c vendor-sys/octeon-sdk/dist/cvmx-helper-sgmii.h vendor-sys/octeon-sdk/dist/cvmx-helper-spi.c vendor-sys/octeon-sdk/dist/cvmx-helper-spi.h vendor-sys/octeon-sdk/dist/cvmx-helper-srio.c vendor-sys/octeon-sdk/dist/cvmx-helper-srio.h vendor-sys/octeon-sdk/dist/cvmx-helper-util.c vendor-sys/octeon-sdk/dist/cvmx-helper-util.h vendor-sys/octeon-sdk/dist/cvmx-helper-xaui.c vendor-sys/octeon-sdk/dist/cvmx-helper-xaui.h vendor-sys/octeon-sdk/dist/cvmx-helper.c vendor-sys/octeon-sdk/dist/cvmx-helper.h vendor-sys/octeon-sdk/dist/cvmx-higig.h vendor-sys/octeon-sdk/dist/cvmx-interrupt-handler.S vendor-sys/octeon-sdk/dist/cvmx-interrupt.c vendor-sys/octeon-sdk/dist/cvmx-interrupt.h vendor-sys/octeon-sdk/dist/cvmx-iob-defs.h vendor-sys/octeon-sdk/dist/cvmx-ipd-defs.h vendor-sys/octeon-sdk/dist/cvmx-ipd.h vendor-sys/octeon-sdk/dist/cvmx-ixf18201.c vendor-sys/octeon-sdk/dist/cvmx-ixf18201.h vendor-sys/octeon-sdk/dist/cvmx-key-defs.h vendor-sys/octeon-sdk/dist/cvmx-key.h vendor-sys/octeon-sdk/dist/cvmx-l2c-defs.h vendor-sys/octeon-sdk/dist/cvmx-l2c.c vendor-sys/octeon-sdk/dist/cvmx-l2c.h vendor-sys/octeon-sdk/dist/cvmx-l2d-defs.h vendor-sys/octeon-sdk/dist/cvmx-l2t-defs.h vendor-sys/octeon-sdk/dist/cvmx-led-defs.h vendor-sys/octeon-sdk/dist/cvmx-llm.c vendor-sys/octeon-sdk/dist/cvmx-llm.h vendor-sys/octeon-sdk/dist/cvmx-lmcx-defs.h vendor-sys/octeon-sdk/dist/cvmx-log-arc.S vendor-sys/octeon-sdk/dist/cvmx-log.c vendor-sys/octeon-sdk/dist/cvmx-log.h vendor-sys/octeon-sdk/dist/cvmx-malloc.h vendor-sys/octeon-sdk/dist/cvmx-mdio.h vendor-sys/octeon-sdk/dist/cvmx-mgmt-port.c vendor-sys/octeon-sdk/dist/cvmx-mgmt-port.h vendor-sys/octeon-sdk/dist/cvmx-mio-defs.h vendor-sys/octeon-sdk/dist/cvmx-mixx-defs.h vendor-sys/octeon-sdk/dist/cvmx-mpi-defs.h vendor-sys/octeon-sdk/dist/cvmx-nand.c vendor-sys/octeon-sdk/dist/cvmx-nand.h vendor-sys/octeon-sdk/dist/cvmx-ndf-defs.h vendor-sys/octeon-sdk/dist/cvmx-npei-defs.h vendor-sys/octeon-sdk/dist/cvmx-npi-defs.h vendor-sys/octeon-sdk/dist/cvmx-npi.h vendor-sys/octeon-sdk/dist/cvmx-packet.h vendor-sys/octeon-sdk/dist/cvmx-pci-defs.h vendor-sys/octeon-sdk/dist/cvmx-pci.h vendor-sys/octeon-sdk/dist/cvmx-pcie.c vendor-sys/octeon-sdk/dist/cvmx-pcie.h vendor-sys/octeon-sdk/dist/cvmx-pcieepx-defs.h vendor-sys/octeon-sdk/dist/cvmx-pciercx-defs.h vendor-sys/octeon-sdk/dist/cvmx-pcm-defs.h vendor-sys/octeon-sdk/dist/cvmx-pcmx-defs.h vendor-sys/octeon-sdk/dist/cvmx-pcsx-defs.h vendor-sys/octeon-sdk/dist/cvmx-pcsxx-defs.h vendor-sys/octeon-sdk/dist/cvmx-pemx-defs.h vendor-sys/octeon-sdk/dist/cvmx-pescx-defs.h vendor-sys/octeon-sdk/dist/cvmx-pexp-defs.h vendor-sys/octeon-sdk/dist/cvmx-pip-defs.h vendor-sys/octeon-sdk/dist/cvmx-pip.h vendor-sys/octeon-sdk/dist/cvmx-pko-defs.h vendor-sys/octeon-sdk/dist/cvmx-pko.c vendor-sys/octeon-sdk/dist/cvmx-pko.h vendor-sys/octeon-sdk/dist/cvmx-platform.h vendor-sys/octeon-sdk/dist/cvmx-pow-defs.h vendor-sys/octeon-sdk/dist/cvmx-pow.c vendor-sys/octeon-sdk/dist/cvmx-pow.h vendor-sys/octeon-sdk/dist/cvmx-power-throttle.c vendor-sys/octeon-sdk/dist/cvmx-power-throttle.h vendor-sys/octeon-sdk/dist/cvmx-rad-defs.h vendor-sys/octeon-sdk/dist/cvmx-raid.c vendor-sys/octeon-sdk/dist/cvmx-raid.h vendor-sys/octeon-sdk/dist/cvmx-rng.h vendor-sys/octeon-sdk/dist/cvmx-rnm-defs.h vendor-sys/octeon-sdk/dist/cvmx-rtc.h vendor-sys/octeon-sdk/dist/cvmx-rwlock.h vendor-sys/octeon-sdk/dist/cvmx-scratch.h vendor-sys/octeon-sdk/dist/cvmx-shmem.c vendor-sys/octeon-sdk/dist/cvmx-shmem.h vendor-sys/octeon-sdk/dist/cvmx-sim-magic.h vendor-sys/octeon-sdk/dist/cvmx-sli-defs.h vendor-sys/octeon-sdk/dist/cvmx-smi-defs.h vendor-sys/octeon-sdk/dist/cvmx-smix-defs.h vendor-sys/octeon-sdk/dist/cvmx-spi.c vendor-sys/octeon-sdk/dist/cvmx-spi.h vendor-sys/octeon-sdk/dist/cvmx-spi4000.c vendor-sys/octeon-sdk/dist/cvmx-spinlock.h vendor-sys/octeon-sdk/dist/cvmx-spx0-defs.h vendor-sys/octeon-sdk/dist/cvmx-spxx-defs.h vendor-sys/octeon-sdk/dist/cvmx-srio.c vendor-sys/octeon-sdk/dist/cvmx-srio.h vendor-sys/octeon-sdk/dist/cvmx-sriomaintx-defs.h vendor-sys/octeon-sdk/dist/cvmx-sriox-defs.h vendor-sys/octeon-sdk/dist/cvmx-srxx-defs.h vendor-sys/octeon-sdk/dist/cvmx-stxx-defs.h vendor-sys/octeon-sdk/dist/cvmx-swap.h vendor-sys/octeon-sdk/dist/cvmx-sysinfo.c vendor-sys/octeon-sdk/dist/cvmx-sysinfo.h vendor-sys/octeon-sdk/dist/cvmx-thunder.c vendor-sys/octeon-sdk/dist/cvmx-thunder.h vendor-sys/octeon-sdk/dist/cvmx-tim-defs.h vendor-sys/octeon-sdk/dist/cvmx-tim.c vendor-sys/octeon-sdk/dist/cvmx-tim.h vendor-sys/octeon-sdk/dist/cvmx-tlb.c vendor-sys/octeon-sdk/dist/cvmx-tlb.h vendor-sys/octeon-sdk/dist/cvmx-tra-defs.h vendor-sys/octeon-sdk/dist/cvmx-tra.c vendor-sys/octeon-sdk/dist/cvmx-tra.h vendor-sys/octeon-sdk/dist/cvmx-twsi.c vendor-sys/octeon-sdk/dist/cvmx-twsi.h vendor-sys/octeon-sdk/dist/cvmx-uahcx-defs.h vendor-sys/octeon-sdk/dist/cvmx-uart.c vendor-sys/octeon-sdk/dist/cvmx-uart.h vendor-sys/octeon-sdk/dist/cvmx-uctlx-defs.h vendor-sys/octeon-sdk/dist/cvmx-usb.c vendor-sys/octeon-sdk/dist/cvmx-usb.h vendor-sys/octeon-sdk/dist/cvmx-usbcx-defs.h vendor-sys/octeon-sdk/dist/cvmx-usbd.c vendor-sys/octeon-sdk/dist/cvmx-usbd.h vendor-sys/octeon-sdk/dist/cvmx-usbnx-defs.h vendor-sys/octeon-sdk/dist/cvmx-utils.h vendor-sys/octeon-sdk/dist/cvmx-version.h vendor-sys/octeon-sdk/dist/cvmx-warn.c vendor-sys/octeon-sdk/dist/cvmx-warn.h vendor-sys/octeon-sdk/dist/cvmx-wqe.h vendor-sys/octeon-sdk/dist/cvmx-zip-defs.h vendor-sys/octeon-sdk/dist/cvmx-zip.c vendor-sys/octeon-sdk/dist/cvmx-zip.h vendor-sys/octeon-sdk/dist/cvmx-zone.c vendor-sys/octeon-sdk/dist/cvmx.h vendor-sys/octeon-sdk/dist/octeon-boot-info.h vendor-sys/octeon-sdk/dist/octeon-feature.h vendor-sys/octeon-sdk/dist/octeon-model.c vendor-sys/octeon-sdk/dist/octeon-model.h vendor-sys/octeon-sdk/dist/octeon-pci-console.c vendor-sys/octeon-sdk/dist/octeon-pci-console.h Added: vendor-sys/octeon-sdk/dist/README.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/octeon-sdk/dist/README.txt Sun Mar 11 04:14:00 2012 (r232809) @@ -0,0 +1,43 @@ +Readme for the OCTEON Executive Library + + +The OCTEON Executive Library provides runtime support and hardware +abstraction for the OCTEON processor. The executive is composed of the +libcvmx.a library as well as header files that provide +functionality with inline functions. + + +Usage: + +The libcvmx.a library is built for every application as part of the +application build. (Please refer to the 'related pages' section of the +HTML documentation for more information on the build system.) +Applications using the executive should include the header files from +$OCTEON_ROOT/target/include and link against the library that is built in +the local obj directory. Each file using the executive +should include the following two header files in order: + +#include "cvmx-config.h" +#include "cvmx.h" + +The cvmx-config.h file contains configuration information for the +executive and is generated by the cvmx-config script from an +'executive-config.h' file. A sample version of this file is provided +in the executive directory as 'executive-config.h.template'. + +Copy this file to 'executive-config.h' into the 'config' subdirectory +of the application directory and customize as required by the application. +Applications that don't use any simple executive functionality can omit +the cvmx-config.h header file. Please refer to the examples for a +demonstration of where to put the executive-config.h file and for an +example of generated cvmx-config.h. + +For file specific information please see the documentation within the +source files or the HTML documentation provided in docs/html/index.html. +The HTML documentation is automatically generated by Doxygen from the +source files. + + + +========================================================================== +Please see the release notes for version specific information. Modified: vendor-sys/octeon-sdk/dist/cvmip.h ============================================================================== --- vendor-sys/octeon-sdk/dist/cvmip.h Sun Mar 11 04:12:59 2012 (r232808) +++ vendor-sys/octeon-sdk/dist/cvmip.h Sun Mar 11 04:14:00 2012 (r232809) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -46,11 +46,11 @@ /** * @file * - * Cavium Networks Internet Protocol (IP) + * Cavium Inc. Internet Protocol (IP) * * Definitions for the Internet Protocol (IP) support. * - *
$Revision: 49448 $
+ *
$Revision: 70030 $
* */ Modified: vendor-sys/octeon-sdk/dist/cvmx-abi.h ============================================================================== --- vendor-sys/octeon-sdk/dist/cvmx-abi.h Sun Mar 11 04:12:59 2012 (r232808) +++ vendor-sys/octeon-sdk/dist/cvmx-abi.h Sun Mar 11 04:14:00 2012 (r232809) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -39,21 +39,21 @@ - - - - /** * @file * * This file defines macros for use in determining the current calling ABI. * - *
$Revision: 49448 $
+ *
$Revision: 70030 $
*/ #ifndef __CVMX_ABI_H__ #define __CVMX_ABI_H__ +#ifndef __U_BOOT__ +#include +#endif + #ifdef __cplusplus extern "C" { #endif @@ -87,6 +87,20 @@ extern "C" { #endif #endif +/* For compatibility with Linux definitions... */ +#if __BYTE_ORDER == __BIG_ENDIAN +# ifndef __BIG_ENDIAN_BITFIELD +# define __BIG_ENDIAN_BITFIELD +# endif +#else +# ifndef __LITTLE_ENDIAN_BITFIELD +# define __LITTLE_ENDIAN_BITFIELD +# endif +#endif +#if defined(__BIG_ENDIAN_BITFIELD) && defined(__LITTLE_ENDIAN_BITFIELD) +# error Cannot define both __BIG_ENDIAN_BITFIELD and __LITTLE_ENDIAN_BITFIELD +#endif + #ifdef __cplusplus } #endif Modified: vendor-sys/octeon-sdk/dist/cvmx-access-native.h ============================================================================== --- vendor-sys/octeon-sdk/dist/cvmx-access-native.h Sun Mar 11 04:12:59 2012 (r232808) +++ vendor-sys/octeon-sdk/dist/cvmx-access-native.h Sun Mar 11 04:14:00 2012 (r232809) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -181,12 +181,6 @@ static inline void *cvmx_phys_to_ptr(uin cvmx_warn_if(physical_address==0, "cvmx_phys_to_ptr() passed a zero address\n"); #ifdef CVMX_BUILD_FOR_UBOOT -#if !CONFIG_OCTEON_UBOOT_TLB - if (physical_address >= 0x80000000) - return NULL; - else - return CASTPTR(void, (physical_address & 0x7FFFFFFF)); -#endif /* U-boot is a special case, as it is running in 32 bit mode, using the TLB to map code/data ** which can have a physical address above the 32 bit address space. 1-1 mappings are used @@ -249,8 +243,9 @@ static inline void *cvmx_phys_to_ptr(uin 2nd 256MB is mapped at 0x10000000 and the rest of memory is 1:1 */ if ((physical_address >= 0x10000000) && (physical_address < 0x20000000)) return CASTPTR(void, CVMX_ADD_SEG32(CVMX_MIPS32_SPACE_KSEG0, physical_address)); - else if (!OCTEON_IS_MODEL(OCTEON_CN6XXX) && (physical_address >= 0x410000000ull) && - (physical_address < 0x420000000ull)) + else if ((OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX)) + && (physical_address >= 0x410000000ull) + && (physical_address < 0x420000000ull)) return CASTPTR(void, physical_address - 0x400000000ull); else return CASTPTR(void, physical_address); Modified: vendor-sys/octeon-sdk/dist/cvmx-access.h ============================================================================== --- vendor-sys/octeon-sdk/dist/cvmx-access.h Sun Mar 11 04:12:59 2012 (r232808) +++ vendor-sys/octeon-sdk/dist/cvmx-access.h Sun Mar 11 04:14:00 2012 (r232809) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM Modified: vendor-sys/octeon-sdk/dist/cvmx-address.h ============================================================================== --- vendor-sys/octeon-sdk/dist/cvmx-address.h Sun Mar 11 04:12:59 2012 (r232808) +++ vendor-sys/octeon-sdk/dist/cvmx-address.h Sun Mar 11 04:14:00 2012 (r232809) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -47,6 +47,10 @@ #ifndef __CVMX_ADDRESS_H__ #define __CVMX_ADDRESS_H__ +#ifndef CVMX_BUILD_FOR_LINUX_KERNEL +#include "cvmx-abi.h" +#endif + #ifdef __cplusplus extern "C" { #endif @@ -233,6 +237,7 @@ typedef union { #define CVMX_OCT_DID_TAG_TAG2 CVMX_FULL_DID(CVMX_OCT_DID_TAG,2ULL) #define CVMX_OCT_DID_TAG_TAG3 CVMX_FULL_DID(CVMX_OCT_DID_TAG,3ULL) #define CVMX_OCT_DID_TAG_NULL_RD CVMX_FULL_DID(CVMX_OCT_DID_TAG,4ULL) +#define CVMX_OCT_DID_TAG_TAG5 CVMX_FULL_DID(CVMX_OCT_DID_TAG,5ULL) #define CVMX_OCT_DID_TAG_CSR CVMX_FULL_DID(CVMX_OCT_DID_TAG,7ULL) #define CVMX_OCT_DID_FAU_FAI CVMX_FULL_DID(CVMX_OCT_DID_IOB,0ULL) #define CVMX_OCT_DID_TIM_CSR CVMX_FULL_DID(CVMX_OCT_DID_TIM,0ULL) @@ -245,6 +250,14 @@ typedef union { #define CVMX_OCT_DID_MIS_CSR CVMX_FULL_DID(CVMX_OCT_DID_MIS,7ULL) #define CVMX_OCT_DID_ZIP_CSR CVMX_FULL_DID(CVMX_OCT_DID_ZIP,0ULL) +#ifndef CVMX_BUILD_FOR_LINUX_KERNEL +#ifdef CVMX_ABI_N32 +#define UNMAPPED_PTR(x) ( (1U << 31) | x ) +#else +#define UNMAPPED_PTR(x) ( (1ULL << 63) | x ) +#endif +#endif + #ifdef __cplusplus } #endif Modified: vendor-sys/octeon-sdk/dist/cvmx-agl-defs.h ============================================================================== --- vendor-sys/octeon-sdk/dist/cvmx-agl-defs.h Sun Mar 11 04:12:59 2012 (r232808) +++ vendor-sys/octeon-sdk/dist/cvmx-agl-defs.h Sun Mar 11 04:14:00 2012 (r232809) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2012 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -49,14 +49,14 @@ *
$Revision$
* */ -#ifndef __CVMX_AGL_TYPEDEFS_H__ -#define __CVMX_AGL_TYPEDEFS_H__ +#ifndef __CVMX_AGL_DEFS_H__ +#define __CVMX_AGL_DEFS_H__ #if CVMX_ENABLE_CSR_ADDRESS_CHECKING #define CVMX_AGL_GMX_BAD_REG CVMX_AGL_GMX_BAD_REG_FUNC() static inline uint64_t CVMX_AGL_GMX_BAD_REG_FUNC(void) { - if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))) + if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))) cvmx_warn("CVMX_AGL_GMX_BAD_REG not supported on this chip\n"); return CVMX_ADD_IO_SEG(0x00011800E0000518ull); } @@ -67,7 +67,7 @@ static inline uint64_t CVMX_AGL_GMX_BAD_ #define CVMX_AGL_GMX_BIST CVMX_AGL_GMX_BIST_FUNC() static inline uint64_t CVMX_AGL_GMX_BIST_FUNC(void) { - if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))) + if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))) cvmx_warn("CVMX_AGL_GMX_BIST not supported on this chip\n"); return CVMX_ADD_IO_SEG(0x00011800E0000400ull); } @@ -102,7 +102,10 @@ static inline uint64_t CVMX_AGL_GMX_PRTX if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_PRTX_CFG(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000010ull) + ((offset) & 1) * 2048; } @@ -115,7 +118,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM0(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000180ull) + ((offset) & 1) * 2048; } @@ -128,7 +134,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM1(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000188ull) + ((offset) & 1) * 2048; } @@ -141,7 +150,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM2(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000190ull) + ((offset) & 1) * 2048; } @@ -154,7 +166,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM3(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000198ull) + ((offset) & 1) * 2048; } @@ -167,7 +182,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM4(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00001A0ull) + ((offset) & 1) * 2048; } @@ -180,7 +198,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM5(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00001A8ull) + ((offset) & 1) * 2048; } @@ -193,7 +214,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM_EN(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000108ull) + ((offset) & 1) * 2048; } @@ -206,7 +230,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000100ull) + ((offset) & 1) * 2048; } @@ -219,7 +246,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_DECISION(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000040ull) + ((offset) & 1) * 2048; } @@ -232,7 +262,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_FRM_CHK(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000020ull) + ((offset) & 1) * 2048; } @@ -245,7 +278,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_FRM_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000018ull) + ((offset) & 1) * 2048; } @@ -258,7 +294,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_FRM_MAX(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000030ull) + ((offset) & 1) * 2048; } @@ -271,7 +310,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_FRM_MIN(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000028ull) + ((offset) & 1) * 2048; } @@ -284,7 +326,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_IFG(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000058ull) + ((offset) & 1) * 2048; } @@ -297,7 +342,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_INT_EN(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000008ull) + ((offset) & 1) * 2048; } @@ -310,7 +358,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_INT_REG(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000000ull) + ((offset) & 1) * 2048; } @@ -323,7 +374,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_JABBER(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000038ull) + ((offset) & 1) * 2048; } @@ -336,7 +390,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_PAUSE_DROP_TIME(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000068ull) + ((offset) & 1) * 2048; } @@ -347,7 +404,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ static inline uint64_t CVMX_AGL_GMX_RXX_RX_INBND(unsigned long offset) { if (!( - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_RX_INBND(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000060ull) + ((offset) & 1) * 2048; } @@ -360,7 +420,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000050ull) + ((offset) & 1) * 2048; } @@ -373,7 +436,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_OCTS(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000088ull) + ((offset) & 1) * 2048; } @@ -386,7 +452,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_OCTS_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000098ull) + ((offset) & 1) * 2048; } @@ -399,7 +468,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_OCTS_DMAC(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00000A8ull) + ((offset) & 1) * 2048; } @@ -412,7 +484,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_OCTS_DRP(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00000B8ull) + ((offset) & 1) * 2048; } @@ -425,7 +500,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_PKTS(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000080ull) + ((offset) & 1) * 2048; } @@ -438,7 +516,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_PKTS_BAD(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00000C0ull) + ((offset) & 1) * 2048; } @@ -451,7 +532,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_PKTS_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000090ull) + ((offset) & 1) * 2048; } @@ -464,7 +548,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_PKTS_DMAC(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00000A0ull) + ((offset) & 1) * 2048; } @@ -477,7 +564,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_PKTS_DRP(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00000B0ull) + ((offset) & 1) * 2048; } @@ -490,7 +580,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_UDD_SKP(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000048ull) + ((offset) & 1) * 2048; } @@ -503,7 +596,10 @@ static inline uint64_t CVMX_AGL_GMX_RX_B if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RX_BP_DROPX(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000420ull) + ((offset) & 1) * 8; } @@ -516,7 +612,10 @@ static inline uint64_t CVMX_AGL_GMX_RX_B if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RX_BP_OFFX(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000460ull) + ((offset) & 1) * 8; } @@ -529,7 +628,10 @@ static inline uint64_t CVMX_AGL_GMX_RX_B if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RX_BP_ONX(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000440ull) + ((offset) & 1) * 8; } @@ -540,7 +642,7 @@ static inline uint64_t CVMX_AGL_GMX_RX_B #define CVMX_AGL_GMX_RX_PRT_INFO CVMX_AGL_GMX_RX_PRT_INFO_FUNC() static inline uint64_t CVMX_AGL_GMX_RX_PRT_INFO_FUNC(void) { - if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))) + if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))) cvmx_warn("CVMX_AGL_GMX_RX_PRT_INFO not supported on this chip\n"); return CVMX_ADD_IO_SEG(0x00011800E00004E8ull); } @@ -551,7 +653,7 @@ static inline uint64_t CVMX_AGL_GMX_RX_P #define CVMX_AGL_GMX_RX_TX_STATUS CVMX_AGL_GMX_RX_TX_STATUS_FUNC() static inline uint64_t CVMX_AGL_GMX_RX_TX_STATUS_FUNC(void) { - if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))) + if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))) cvmx_warn("CVMX_AGL_GMX_RX_TX_STATUS not supported on this chip\n"); return CVMX_ADD_IO_SEG(0x00011800E00007E8ull); } @@ -564,7 +666,10 @@ static inline uint64_t CVMX_AGL_GMX_SMAC if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_SMACX(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000230ull) + ((offset) & 1) * 2048; } @@ -575,7 +680,7 @@ static inline uint64_t CVMX_AGL_GMX_SMAC #define CVMX_AGL_GMX_STAT_BP CVMX_AGL_GMX_STAT_BP_FUNC() static inline uint64_t CVMX_AGL_GMX_STAT_BP_FUNC(void) { - if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))) + if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))) cvmx_warn("CVMX_AGL_GMX_STAT_BP not supported on this chip\n"); return CVMX_ADD_IO_SEG(0x00011800E0000520ull); } @@ -588,7 +693,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_APPEND(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000218ull) + ((offset) & 1) * 2048; } @@ -599,7 +707,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ static inline uint64_t CVMX_AGL_GMX_TXX_CLK(unsigned long offset) { if (!( - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_CLK(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000208ull) + ((offset) & 1) * 2048; } @@ -612,7 +723,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000270ull) + ((offset) & 1) * 2048; } @@ -625,7 +739,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_MIN_PKT(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000240ull) + ((offset) & 1) * 2048; } @@ -638,7 +755,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_PAUSE_PKT_INTERVAL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000248ull) + ((offset) & 1) * 2048; } @@ -651,7 +771,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_PAUSE_PKT_TIME(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000238ull) + ((offset) & 1) * 2048; } @@ -664,7 +787,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_PAUSE_TOGO(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000258ull) + ((offset) & 1) * 2048; } @@ -677,7 +803,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_PAUSE_ZERO(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000260ull) + ((offset) & 1) * 2048; } @@ -690,7 +819,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_SOFT_PAUSE(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000250ull) + ((offset) & 1) * 2048; } @@ -703,7 +835,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT0(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000280ull) + ((offset) & 1) * 2048; } @@ -716,7 +851,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT1(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000288ull) + ((offset) & 1) * 2048; } @@ -729,7 +867,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT2(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000290ull) + ((offset) & 1) * 2048; } @@ -742,7 +883,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT3(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000298ull) + ((offset) & 1) * 2048; } @@ -755,7 +899,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT4(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00002A0ull) + ((offset) & 1) * 2048; } @@ -768,7 +915,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT5(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00002A8ull) + ((offset) & 1) * 2048; } @@ -781,7 +931,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT6(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00002B0ull) + ((offset) & 1) * 2048; } @@ -794,7 +947,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 04:16:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EF4F106566B; Sun, 11 Mar 2012 04:16:42 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5433A8FC18; Sun, 11 Mar 2012 04:16:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B4GglN093053; Sun, 11 Mar 2012 04:16:42 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B4GgGl093052; Sun, 11 Mar 2012 04:16:42 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203110416.q2B4GgGl093052@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 04:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232810 - vendor-sys/octeon-sdk/2.3.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 04:16:42 -0000 Author: jmallett Date: Sun Mar 11 04:16:42 2012 New Revision: 232810 URL: http://svn.freebsd.org/changeset/base/232810 Log: Tag Cavium Octeon SDK 2.3.0 Simple Executive. Added: vendor-sys/octeon-sdk/2.3.0/ - copied from r232809, vendor-sys/octeon-sdk/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 06:11:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AEA7A106564A; Sun, 11 Mar 2012 06:11:31 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DC828FC08; Sun, 11 Mar 2012 06:11:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B6BVL3096576; Sun, 11 Mar 2012 06:11:31 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B6BVs8096574; Sun, 11 Mar 2012 06:11:31 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203110611.q2B6BVs8096574@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 06:11: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: r232811 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 06:11:31 -0000 Author: jmallett Date: Sun Mar 11 06:11:31 2012 New Revision: 232811 URL: http://svn.freebsd.org/changeset/base/232811 Log: Disable -Winline on MIPS in preparation for the import of the latest version of the Cavium Simple Executive, which violates large function growth rules in such a way that simply increasing the large function growth parameter is insufficient. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sun Mar 11 04:16:42 2012 (r232810) +++ head/sys/conf/kern.mk Sun Mar 11 06:11:31 2012 (r232811) @@ -131,6 +131,9 @@ CFLAGS+= -mcall-aixdesc .if ${MACHINE_CPUARCH} == "mips" CFLAGS+= -msoft-float INLINE_LIMIT?= 8000 +# XXX Disable -Winline. This is needed because of the monstrous code that is +# the Cavium Octeon Simple Executive. +CWARNFLAGS:= ${CWARNFLAGS:N-Winline} .endif # From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 06:17:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B122106566B; Sun, 11 Mar 2012 06:17:50 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 659EB8FC15; Sun, 11 Mar 2012 06:17:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B6HoXb096841; Sun, 11 Mar 2012 06:17:50 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B6Hohx096832; Sun, 11 Mar 2012 06:17:50 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203110617.q2B6Hohx096832@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 06:17: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: r232812 - in head/sys: contrib/octeon-sdk contrib/octeon-sdk/cvmx-malloc contrib/octeon-sdk/libfdt mips/cavium mips/cavium/octe mips/cavium/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 06:17:50 -0000 Author: jmallett Date: Sun Mar 11 06:17:49 2012 New Revision: 232812 URL: http://svn.freebsd.org/changeset/base/232812 Log: Merge the Cavium Octeon SDK 2.3.0 Simple Executive code and update FreeBSD to make use of it where possible. This primarily brings in support for newer hardware, and FreeBSD is not yet able to support the abundance of IRQs on new hardware and many features in the Ethernet driver. Because of the changes to IRQs in the Simple Executive, we have to maintain our own list of Octeon IRQs now, which probably can be pared-down and be specific to the CIU interrupt unit soon, and when other interrupt mechanisms are added they can maintain their own definitions. Remove unmasking of interrupts from within the UART device now that the function used is no longer present in the Simple Executive. The unmasking seems to have been gratuitous as this is more properly handled by the buses above the UART device, and seems to work on that basis. Added: head/sys/contrib/octeon-sdk/README.txt - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/README.txt head/sys/contrib/octeon-sdk/cvmx-ciu2-defs.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-ciu2-defs.h head/sys/contrib/octeon-sdk/cvmx-endor-defs.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-endor-defs.h head/sys/contrib/octeon-sdk/cvmx-eoi-defs.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-eoi-defs.h head/sys/contrib/octeon-sdk/cvmx-error-init-cn61xx.c - copied, changed from r232809, vendor-sys/octeon-sdk/dist/cvmx-error-init-cn61xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn66xx.c - copied, changed from r232809, vendor-sys/octeon-sdk/dist/cvmx-error-init-cn66xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn68xx.c - copied, changed from r232809, vendor-sys/octeon-sdk/dist/cvmx-error-init-cn68xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn68xxp1.c - copied, changed from r232809, vendor-sys/octeon-sdk/dist/cvmx-error-init-cn68xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cnf71xx.c - copied, changed from r232809, vendor-sys/octeon-sdk/dist/cvmx-error-init-cnf71xx.c head/sys/contrib/octeon-sdk/cvmx-helper-cfg.c - copied, changed from r232809, vendor-sys/octeon-sdk/dist/cvmx-helper-cfg.c head/sys/contrib/octeon-sdk/cvmx-helper-cfg.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-helper-cfg.h head/sys/contrib/octeon-sdk/cvmx-helper-ilk.c - copied, changed from r232809, vendor-sys/octeon-sdk/dist/cvmx-helper-ilk.c head/sys/contrib/octeon-sdk/cvmx-helper-ilk.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-helper-ilk.h head/sys/contrib/octeon-sdk/cvmx-hfa.c - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-hfa.c head/sys/contrib/octeon-sdk/cvmx-hfa.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-hfa.h head/sys/contrib/octeon-sdk/cvmx-ilk-defs.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-ilk-defs.h head/sys/contrib/octeon-sdk/cvmx-ilk.c - copied, changed from r232809, vendor-sys/octeon-sdk/dist/cvmx-ilk.c head/sys/contrib/octeon-sdk/cvmx-ilk.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-ilk.h head/sys/contrib/octeon-sdk/cvmx-iob1-defs.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-iob1-defs.h head/sys/contrib/octeon-sdk/cvmx-ipd.c - copied, changed from r232809, vendor-sys/octeon-sdk/dist/cvmx-ipd.c head/sys/contrib/octeon-sdk/cvmx-malloc/ - copied from r232809, vendor-sys/octeon-sdk/dist/cvmx-malloc/ head/sys/contrib/octeon-sdk/cvmx-profiler.c - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-profiler.c head/sys/contrib/octeon-sdk/cvmx-profiler.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-profiler.h head/sys/contrib/octeon-sdk/cvmx-qlm-tables.c - copied, changed from r232809, vendor-sys/octeon-sdk/dist/cvmx-qlm-tables.c head/sys/contrib/octeon-sdk/cvmx-qlm.c - copied, changed from r232809, vendor-sys/octeon-sdk/dist/cvmx-qlm.c head/sys/contrib/octeon-sdk/cvmx-qlm.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-qlm.h head/sys/contrib/octeon-sdk/cvmx-resources.config - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-resources.config head/sys/contrib/octeon-sdk/cvmx-shared-linux-n32.ld - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-shared-linux-n32.ld head/sys/contrib/octeon-sdk/cvmx-shared-linux-o32.ld - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-shared-linux-o32.ld head/sys/contrib/octeon-sdk/cvmx-shared-linux.ld - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-shared-linux.ld head/sys/contrib/octeon-sdk/cvmx-sso-defs.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-sso-defs.h head/sys/contrib/octeon-sdk/cvmx-trax-defs.h - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx-trax-defs.h head/sys/contrib/octeon-sdk/cvmx.mk - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/cvmx.mk head/sys/contrib/octeon-sdk/executive-config.h.template - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/executive-config.h.template head/sys/contrib/octeon-sdk/libfdt/ - copied from r232809, vendor-sys/octeon-sdk/dist/libfdt/ head/sys/contrib/octeon-sdk/octeon-feature.c - copied unchanged from r232809, vendor-sys/octeon-sdk/dist/octeon-feature.c head/sys/mips/cavium/octeon_irq.h (contents, props changed) Modified: head/sys/contrib/octeon-sdk/cvmip.h head/sys/contrib/octeon-sdk/cvmx-abi.h head/sys/contrib/octeon-sdk/cvmx-access-native.h head/sys/contrib/octeon-sdk/cvmx-access.h head/sys/contrib/octeon-sdk/cvmx-address.h head/sys/contrib/octeon-sdk/cvmx-agl-defs.h head/sys/contrib/octeon-sdk/cvmx-app-hotplug.c head/sys/contrib/octeon-sdk/cvmx-app-hotplug.h head/sys/contrib/octeon-sdk/cvmx-app-init-linux.c head/sys/contrib/octeon-sdk/cvmx-app-init.c head/sys/contrib/octeon-sdk/cvmx-app-init.h head/sys/contrib/octeon-sdk/cvmx-asm.h head/sys/contrib/octeon-sdk/cvmx-asx0-defs.h head/sys/contrib/octeon-sdk/cvmx-asxx-defs.h head/sys/contrib/octeon-sdk/cvmx-atomic.h head/sys/contrib/octeon-sdk/cvmx-bootloader.h head/sys/contrib/octeon-sdk/cvmx-bootmem.c head/sys/contrib/octeon-sdk/cvmx-bootmem.h head/sys/contrib/octeon-sdk/cvmx-ciu-defs.h head/sys/contrib/octeon-sdk/cvmx-clock.c head/sys/contrib/octeon-sdk/cvmx-clock.h head/sys/contrib/octeon-sdk/cvmx-cmd-queue.c head/sys/contrib/octeon-sdk/cvmx-cmd-queue.h head/sys/contrib/octeon-sdk/cvmx-cn3010-evb-hs5.c head/sys/contrib/octeon-sdk/cvmx-cn3010-evb-hs5.h head/sys/contrib/octeon-sdk/cvmx-compactflash.c head/sys/contrib/octeon-sdk/cvmx-compactflash.h head/sys/contrib/octeon-sdk/cvmx-core.c head/sys/contrib/octeon-sdk/cvmx-core.h head/sys/contrib/octeon-sdk/cvmx-coremask.c head/sys/contrib/octeon-sdk/cvmx-coremask.h head/sys/contrib/octeon-sdk/cvmx-crypto.c head/sys/contrib/octeon-sdk/cvmx-crypto.h head/sys/contrib/octeon-sdk/cvmx-csr-db-support.c head/sys/contrib/octeon-sdk/cvmx-csr-db.c head/sys/contrib/octeon-sdk/cvmx-csr-db.h head/sys/contrib/octeon-sdk/cvmx-csr-enums.h head/sys/contrib/octeon-sdk/cvmx-csr-typedefs.h head/sys/contrib/octeon-sdk/cvmx-csr.h head/sys/contrib/octeon-sdk/cvmx-dbg-defs.h head/sys/contrib/octeon-sdk/cvmx-debug-handler.S head/sys/contrib/octeon-sdk/cvmx-debug-remote.c head/sys/contrib/octeon-sdk/cvmx-debug-uart.c head/sys/contrib/octeon-sdk/cvmx-debug.c head/sys/contrib/octeon-sdk/cvmx-debug.h head/sys/contrib/octeon-sdk/cvmx-dfa-defs.h head/sys/contrib/octeon-sdk/cvmx-dfa.c head/sys/contrib/octeon-sdk/cvmx-dfa.h head/sys/contrib/octeon-sdk/cvmx-dfm-defs.h head/sys/contrib/octeon-sdk/cvmx-dma-engine.c head/sys/contrib/octeon-sdk/cvmx-dma-engine.h head/sys/contrib/octeon-sdk/cvmx-dpi-defs.h head/sys/contrib/octeon-sdk/cvmx-ebt3000.c head/sys/contrib/octeon-sdk/cvmx-ebt3000.h head/sys/contrib/octeon-sdk/cvmx-error-custom.c head/sys/contrib/octeon-sdk/cvmx-error-custom.h head/sys/contrib/octeon-sdk/cvmx-error-init-cn30xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn31xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn38xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn38xxp2.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn50xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn52xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn52xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn56xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn56xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn58xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn58xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn63xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn63xxp1.c head/sys/contrib/octeon-sdk/cvmx-error.c head/sys/contrib/octeon-sdk/cvmx-error.h head/sys/contrib/octeon-sdk/cvmx-fau.h head/sys/contrib/octeon-sdk/cvmx-flash.c head/sys/contrib/octeon-sdk/cvmx-flash.h head/sys/contrib/octeon-sdk/cvmx-fpa-defs.h head/sys/contrib/octeon-sdk/cvmx-fpa.c head/sys/contrib/octeon-sdk/cvmx-fpa.h head/sys/contrib/octeon-sdk/cvmx-gmx.h head/sys/contrib/octeon-sdk/cvmx-gmxx-defs.h head/sys/contrib/octeon-sdk/cvmx-gpio-defs.h head/sys/contrib/octeon-sdk/cvmx-gpio.h head/sys/contrib/octeon-sdk/cvmx-helper-board.c head/sys/contrib/octeon-sdk/cvmx-helper-board.h head/sys/contrib/octeon-sdk/cvmx-helper-check-defines.h head/sys/contrib/octeon-sdk/cvmx-helper-errata.c head/sys/contrib/octeon-sdk/cvmx-helper-errata.h head/sys/contrib/octeon-sdk/cvmx-helper-fpa.c head/sys/contrib/octeon-sdk/cvmx-helper-fpa.h head/sys/contrib/octeon-sdk/cvmx-helper-jtag.c head/sys/contrib/octeon-sdk/cvmx-helper-jtag.h head/sys/contrib/octeon-sdk/cvmx-helper-loop.c head/sys/contrib/octeon-sdk/cvmx-helper-loop.h head/sys/contrib/octeon-sdk/cvmx-helper-npi.c head/sys/contrib/octeon-sdk/cvmx-helper-npi.h head/sys/contrib/octeon-sdk/cvmx-helper-rgmii.c head/sys/contrib/octeon-sdk/cvmx-helper-rgmii.h head/sys/contrib/octeon-sdk/cvmx-helper-sgmii.c head/sys/contrib/octeon-sdk/cvmx-helper-sgmii.h head/sys/contrib/octeon-sdk/cvmx-helper-spi.c head/sys/contrib/octeon-sdk/cvmx-helper-spi.h head/sys/contrib/octeon-sdk/cvmx-helper-srio.c head/sys/contrib/octeon-sdk/cvmx-helper-srio.h head/sys/contrib/octeon-sdk/cvmx-helper-util.c head/sys/contrib/octeon-sdk/cvmx-helper-util.h head/sys/contrib/octeon-sdk/cvmx-helper-xaui.c head/sys/contrib/octeon-sdk/cvmx-helper-xaui.h head/sys/contrib/octeon-sdk/cvmx-helper.c head/sys/contrib/octeon-sdk/cvmx-helper.h head/sys/contrib/octeon-sdk/cvmx-higig.h head/sys/contrib/octeon-sdk/cvmx-interrupt-handler.S head/sys/contrib/octeon-sdk/cvmx-interrupt.c head/sys/contrib/octeon-sdk/cvmx-interrupt.h head/sys/contrib/octeon-sdk/cvmx-iob-defs.h head/sys/contrib/octeon-sdk/cvmx-ipd-defs.h head/sys/contrib/octeon-sdk/cvmx-ipd.h head/sys/contrib/octeon-sdk/cvmx-ixf18201.c head/sys/contrib/octeon-sdk/cvmx-ixf18201.h head/sys/contrib/octeon-sdk/cvmx-key-defs.h head/sys/contrib/octeon-sdk/cvmx-key.h head/sys/contrib/octeon-sdk/cvmx-l2c-defs.h head/sys/contrib/octeon-sdk/cvmx-l2c.c head/sys/contrib/octeon-sdk/cvmx-l2c.h head/sys/contrib/octeon-sdk/cvmx-l2d-defs.h head/sys/contrib/octeon-sdk/cvmx-l2t-defs.h head/sys/contrib/octeon-sdk/cvmx-led-defs.h head/sys/contrib/octeon-sdk/cvmx-llm.c head/sys/contrib/octeon-sdk/cvmx-llm.h head/sys/contrib/octeon-sdk/cvmx-lmcx-defs.h head/sys/contrib/octeon-sdk/cvmx-log-arc.S head/sys/contrib/octeon-sdk/cvmx-log.c head/sys/contrib/octeon-sdk/cvmx-log.h head/sys/contrib/octeon-sdk/cvmx-malloc.h head/sys/contrib/octeon-sdk/cvmx-mdio.h head/sys/contrib/octeon-sdk/cvmx-mgmt-port.c head/sys/contrib/octeon-sdk/cvmx-mgmt-port.h head/sys/contrib/octeon-sdk/cvmx-mio-defs.h head/sys/contrib/octeon-sdk/cvmx-mixx-defs.h head/sys/contrib/octeon-sdk/cvmx-mpi-defs.h head/sys/contrib/octeon-sdk/cvmx-nand.c head/sys/contrib/octeon-sdk/cvmx-nand.h head/sys/contrib/octeon-sdk/cvmx-ndf-defs.h head/sys/contrib/octeon-sdk/cvmx-npei-defs.h head/sys/contrib/octeon-sdk/cvmx-npi-defs.h head/sys/contrib/octeon-sdk/cvmx-npi.h head/sys/contrib/octeon-sdk/cvmx-packet.h head/sys/contrib/octeon-sdk/cvmx-pci-defs.h head/sys/contrib/octeon-sdk/cvmx-pci.h head/sys/contrib/octeon-sdk/cvmx-pcie.c head/sys/contrib/octeon-sdk/cvmx-pcie.h head/sys/contrib/octeon-sdk/cvmx-pcieepx-defs.h head/sys/contrib/octeon-sdk/cvmx-pciercx-defs.h head/sys/contrib/octeon-sdk/cvmx-pcm-defs.h head/sys/contrib/octeon-sdk/cvmx-pcmx-defs.h head/sys/contrib/octeon-sdk/cvmx-pcsx-defs.h head/sys/contrib/octeon-sdk/cvmx-pcsxx-defs.h head/sys/contrib/octeon-sdk/cvmx-pemx-defs.h head/sys/contrib/octeon-sdk/cvmx-pescx-defs.h head/sys/contrib/octeon-sdk/cvmx-pexp-defs.h head/sys/contrib/octeon-sdk/cvmx-pip-defs.h head/sys/contrib/octeon-sdk/cvmx-pip.h head/sys/contrib/octeon-sdk/cvmx-pko-defs.h head/sys/contrib/octeon-sdk/cvmx-pko.c head/sys/contrib/octeon-sdk/cvmx-pko.h head/sys/contrib/octeon-sdk/cvmx-platform.h head/sys/contrib/octeon-sdk/cvmx-pow-defs.h head/sys/contrib/octeon-sdk/cvmx-pow.c head/sys/contrib/octeon-sdk/cvmx-pow.h head/sys/contrib/octeon-sdk/cvmx-power-throttle.c head/sys/contrib/octeon-sdk/cvmx-power-throttle.h head/sys/contrib/octeon-sdk/cvmx-rad-defs.h head/sys/contrib/octeon-sdk/cvmx-raid.c head/sys/contrib/octeon-sdk/cvmx-raid.h head/sys/contrib/octeon-sdk/cvmx-rng.h head/sys/contrib/octeon-sdk/cvmx-rnm-defs.h head/sys/contrib/octeon-sdk/cvmx-rtc.h head/sys/contrib/octeon-sdk/cvmx-rwlock.h head/sys/contrib/octeon-sdk/cvmx-scratch.h head/sys/contrib/octeon-sdk/cvmx-shmem.c head/sys/contrib/octeon-sdk/cvmx-shmem.h head/sys/contrib/octeon-sdk/cvmx-sim-magic.h head/sys/contrib/octeon-sdk/cvmx-sli-defs.h head/sys/contrib/octeon-sdk/cvmx-smi-defs.h head/sys/contrib/octeon-sdk/cvmx-smix-defs.h head/sys/contrib/octeon-sdk/cvmx-spi.c head/sys/contrib/octeon-sdk/cvmx-spi.h head/sys/contrib/octeon-sdk/cvmx-spi4000.c head/sys/contrib/octeon-sdk/cvmx-spinlock.h head/sys/contrib/octeon-sdk/cvmx-spx0-defs.h head/sys/contrib/octeon-sdk/cvmx-spxx-defs.h head/sys/contrib/octeon-sdk/cvmx-srio.c head/sys/contrib/octeon-sdk/cvmx-srio.h head/sys/contrib/octeon-sdk/cvmx-sriomaintx-defs.h head/sys/contrib/octeon-sdk/cvmx-sriox-defs.h head/sys/contrib/octeon-sdk/cvmx-srxx-defs.h head/sys/contrib/octeon-sdk/cvmx-stxx-defs.h head/sys/contrib/octeon-sdk/cvmx-swap.h head/sys/contrib/octeon-sdk/cvmx-sysinfo.c head/sys/contrib/octeon-sdk/cvmx-sysinfo.h head/sys/contrib/octeon-sdk/cvmx-thunder.c head/sys/contrib/octeon-sdk/cvmx-thunder.h head/sys/contrib/octeon-sdk/cvmx-tim-defs.h head/sys/contrib/octeon-sdk/cvmx-tim.c head/sys/contrib/octeon-sdk/cvmx-tim.h head/sys/contrib/octeon-sdk/cvmx-tlb.c head/sys/contrib/octeon-sdk/cvmx-tlb.h head/sys/contrib/octeon-sdk/cvmx-tra-defs.h head/sys/contrib/octeon-sdk/cvmx-tra.c head/sys/contrib/octeon-sdk/cvmx-tra.h head/sys/contrib/octeon-sdk/cvmx-twsi.c head/sys/contrib/octeon-sdk/cvmx-twsi.h head/sys/contrib/octeon-sdk/cvmx-uahcx-defs.h head/sys/contrib/octeon-sdk/cvmx-uart.c head/sys/contrib/octeon-sdk/cvmx-uart.h head/sys/contrib/octeon-sdk/cvmx-uctlx-defs.h head/sys/contrib/octeon-sdk/cvmx-usb.c head/sys/contrib/octeon-sdk/cvmx-usb.h head/sys/contrib/octeon-sdk/cvmx-usbcx-defs.h head/sys/contrib/octeon-sdk/cvmx-usbd.c head/sys/contrib/octeon-sdk/cvmx-usbd.h head/sys/contrib/octeon-sdk/cvmx-usbnx-defs.h head/sys/contrib/octeon-sdk/cvmx-utils.h head/sys/contrib/octeon-sdk/cvmx-version.h head/sys/contrib/octeon-sdk/cvmx-warn.c head/sys/contrib/octeon-sdk/cvmx-warn.h head/sys/contrib/octeon-sdk/cvmx-wqe.h head/sys/contrib/octeon-sdk/cvmx-zip-defs.h head/sys/contrib/octeon-sdk/cvmx-zip.c head/sys/contrib/octeon-sdk/cvmx-zip.h head/sys/contrib/octeon-sdk/cvmx-zone.c head/sys/contrib/octeon-sdk/cvmx.h head/sys/contrib/octeon-sdk/octeon-boot-info.h head/sys/contrib/octeon-sdk/octeon-feature.h head/sys/contrib/octeon-sdk/octeon-model.c head/sys/contrib/octeon-sdk/octeon-model.h head/sys/contrib/octeon-sdk/octeon-pci-console.c head/sys/contrib/octeon-sdk/octeon-pci-console.h head/sys/mips/cavium/ciu.c head/sys/mips/cavium/files.octeon1 head/sys/mips/cavium/if_octm.c head/sys/mips/cavium/obio.c head/sys/mips/cavium/octe/ethernet-rgmii.c head/sys/mips/cavium/octe/ethernet-rx.c head/sys/mips/cavium/octe/ethernet-spi.c head/sys/mips/cavium/octe/ethernet.c head/sys/mips/cavium/octe/wrapper-cvmx-includes.h head/sys/mips/cavium/octeon_gpio.c head/sys/mips/cavium/octeon_machdep.c head/sys/mips/cavium/octeon_mp.c head/sys/mips/cavium/octeon_wdog.c head/sys/mips/cavium/octopci.c head/sys/mips/cavium/uart_dev_oct16550.c head/sys/mips/cavium/usb/octusb_octeon.c Directory Properties: head/sys/contrib/octeon-sdk/ (props changed) Copied: head/sys/contrib/octeon-sdk/README.txt (from r232809, vendor-sys/octeon-sdk/dist/README.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/octeon-sdk/README.txt Sun Mar 11 06:17:49 2012 (r232812, copy of r232809, vendor-sys/octeon-sdk/dist/README.txt) @@ -0,0 +1,43 @@ +Readme for the OCTEON Executive Library + + +The OCTEON Executive Library provides runtime support and hardware +abstraction for the OCTEON processor. The executive is composed of the +libcvmx.a library as well as header files that provide +functionality with inline functions. + + +Usage: + +The libcvmx.a library is built for every application as part of the +application build. (Please refer to the 'related pages' section of the +HTML documentation for more information on the build system.) +Applications using the executive should include the header files from +$OCTEON_ROOT/target/include and link against the library that is built in +the local obj directory. Each file using the executive +should include the following two header files in order: + +#include "cvmx-config.h" +#include "cvmx.h" + +The cvmx-config.h file contains configuration information for the +executive and is generated by the cvmx-config script from an +'executive-config.h' file. A sample version of this file is provided +in the executive directory as 'executive-config.h.template'. + +Copy this file to 'executive-config.h' into the 'config' subdirectory +of the application directory and customize as required by the application. +Applications that don't use any simple executive functionality can omit +the cvmx-config.h header file. Please refer to the examples for a +demonstration of where to put the executive-config.h file and for an +example of generated cvmx-config.h. + +For file specific information please see the documentation within the +source files or the HTML documentation provided in docs/html/index.html. +The HTML documentation is automatically generated by Doxygen from the +source files. + + + +========================================================================== +Please see the release notes for version specific information. Modified: head/sys/contrib/octeon-sdk/cvmip.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmip.h Sun Mar 11 06:11:31 2012 (r232811) +++ head/sys/contrib/octeon-sdk/cvmip.h Sun Mar 11 06:17:49 2012 (r232812) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -46,11 +46,11 @@ /** * @file * - * Cavium Networks Internet Protocol (IP) + * Cavium Inc. Internet Protocol (IP) * * Definitions for the Internet Protocol (IP) support. * - *
$Revision: 49448 $
+ *
$Revision: 70030 $
* */ Modified: head/sys/contrib/octeon-sdk/cvmx-abi.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-abi.h Sun Mar 11 06:11:31 2012 (r232811) +++ head/sys/contrib/octeon-sdk/cvmx-abi.h Sun Mar 11 06:17:49 2012 (r232812) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -39,21 +39,25 @@ - - - - /** * @file * * This file defines macros for use in determining the current calling ABI. * - *
$Revision: 49448 $
+ *
$Revision: 70030 $
*/ #ifndef __CVMX_ABI_H__ #define __CVMX_ABI_H__ +#if defined(__FreeBSD__) && defined(_KERNEL) +#include +#else +#ifndef __U_BOOT__ +#include +#endif +#endif + #ifdef __cplusplus extern "C" { #endif @@ -87,6 +91,20 @@ extern "C" { #endif #endif +/* For compatibility with Linux definitions... */ +#if __BYTE_ORDER == __BIG_ENDIAN +# ifndef __BIG_ENDIAN_BITFIELD +# define __BIG_ENDIAN_BITFIELD +# endif +#else +# ifndef __LITTLE_ENDIAN_BITFIELD +# define __LITTLE_ENDIAN_BITFIELD +# endif +#endif +#if defined(__BIG_ENDIAN_BITFIELD) && defined(__LITTLE_ENDIAN_BITFIELD) +# error Cannot define both __BIG_ENDIAN_BITFIELD and __LITTLE_ENDIAN_BITFIELD +#endif + #ifdef __cplusplus } #endif Modified: head/sys/contrib/octeon-sdk/cvmx-access-native.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-access-native.h Sun Mar 11 06:11:31 2012 (r232811) +++ head/sys/contrib/octeon-sdk/cvmx-access-native.h Sun Mar 11 06:17:49 2012 (r232812) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -183,12 +183,6 @@ static inline void *cvmx_phys_to_ptr(uin cvmx_warn_if(physical_address==0, "cvmx_phys_to_ptr() passed a zero address\n"); #ifdef CVMX_BUILD_FOR_UBOOT -#if !CONFIG_OCTEON_UBOOT_TLB - if (physical_address >= 0x80000000) - return NULL; - else - return CASTPTR(void, (physical_address & 0x7FFFFFFF)); -#endif /* U-boot is a special case, as it is running in 32 bit mode, using the TLB to map code/data ** which can have a physical address above the 32 bit address space. 1-1 mappings are used @@ -251,8 +245,9 @@ static inline void *cvmx_phys_to_ptr(uin 2nd 256MB is mapped at 0x10000000 and the rest of memory is 1:1 */ if ((physical_address >= 0x10000000) && (physical_address < 0x20000000)) return CASTPTR(void, CVMX_ADD_SEG32(CVMX_MIPS32_SPACE_KSEG0, physical_address)); - else if (!OCTEON_IS_MODEL(OCTEON_CN6XXX) && (physical_address >= 0x410000000ull) && - (physical_address < 0x420000000ull)) + else if ((OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX)) + && (physical_address >= 0x410000000ull) + && (physical_address < 0x420000000ull)) return CASTPTR(void, physical_address - 0x400000000ull); else return CASTPTR(void, physical_address); Modified: head/sys/contrib/octeon-sdk/cvmx-access.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-access.h Sun Mar 11 06:11:31 2012 (r232811) +++ head/sys/contrib/octeon-sdk/cvmx-access.h Sun Mar 11 06:17:49 2012 (r232812) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM Modified: head/sys/contrib/octeon-sdk/cvmx-address.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-address.h Sun Mar 11 06:11:31 2012 (r232811) +++ head/sys/contrib/octeon-sdk/cvmx-address.h Sun Mar 11 06:17:49 2012 (r232812) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -47,6 +47,10 @@ #ifndef __CVMX_ADDRESS_H__ #define __CVMX_ADDRESS_H__ +#ifndef CVMX_BUILD_FOR_LINUX_KERNEL +#include "cvmx-abi.h" +#endif + #ifdef __cplusplus extern "C" { #endif @@ -233,6 +237,7 @@ typedef union { #define CVMX_OCT_DID_TAG_TAG2 CVMX_FULL_DID(CVMX_OCT_DID_TAG,2ULL) #define CVMX_OCT_DID_TAG_TAG3 CVMX_FULL_DID(CVMX_OCT_DID_TAG,3ULL) #define CVMX_OCT_DID_TAG_NULL_RD CVMX_FULL_DID(CVMX_OCT_DID_TAG,4ULL) +#define CVMX_OCT_DID_TAG_TAG5 CVMX_FULL_DID(CVMX_OCT_DID_TAG,5ULL) #define CVMX_OCT_DID_TAG_CSR CVMX_FULL_DID(CVMX_OCT_DID_TAG,7ULL) #define CVMX_OCT_DID_FAU_FAI CVMX_FULL_DID(CVMX_OCT_DID_IOB,0ULL) #define CVMX_OCT_DID_TIM_CSR CVMX_FULL_DID(CVMX_OCT_DID_TIM,0ULL) @@ -245,6 +250,14 @@ typedef union { #define CVMX_OCT_DID_MIS_CSR CVMX_FULL_DID(CVMX_OCT_DID_MIS,7ULL) #define CVMX_OCT_DID_ZIP_CSR CVMX_FULL_DID(CVMX_OCT_DID_ZIP,0ULL) +#ifndef CVMX_BUILD_FOR_LINUX_KERNEL +#ifdef CVMX_ABI_N32 +#define UNMAPPED_PTR(x) ( (1U << 31) | x ) +#else +#define UNMAPPED_PTR(x) ( (1ULL << 63) | x ) +#endif +#endif + #ifdef __cplusplus } #endif Modified: head/sys/contrib/octeon-sdk/cvmx-agl-defs.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-agl-defs.h Sun Mar 11 06:11:31 2012 (r232811) +++ head/sys/contrib/octeon-sdk/cvmx-agl-defs.h Sun Mar 11 06:17:49 2012 (r232812) @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2012 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -49,14 +49,14 @@ *
$Revision$
* */ -#ifndef __CVMX_AGL_TYPEDEFS_H__ -#define __CVMX_AGL_TYPEDEFS_H__ +#ifndef __CVMX_AGL_DEFS_H__ +#define __CVMX_AGL_DEFS_H__ #if CVMX_ENABLE_CSR_ADDRESS_CHECKING #define CVMX_AGL_GMX_BAD_REG CVMX_AGL_GMX_BAD_REG_FUNC() static inline uint64_t CVMX_AGL_GMX_BAD_REG_FUNC(void) { - if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))) + if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))) cvmx_warn("CVMX_AGL_GMX_BAD_REG not supported on this chip\n"); return CVMX_ADD_IO_SEG(0x00011800E0000518ull); } @@ -67,7 +67,7 @@ static inline uint64_t CVMX_AGL_GMX_BAD_ #define CVMX_AGL_GMX_BIST CVMX_AGL_GMX_BIST_FUNC() static inline uint64_t CVMX_AGL_GMX_BIST_FUNC(void) { - if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))) + if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))) cvmx_warn("CVMX_AGL_GMX_BIST not supported on this chip\n"); return CVMX_ADD_IO_SEG(0x00011800E0000400ull); } @@ -102,7 +102,10 @@ static inline uint64_t CVMX_AGL_GMX_PRTX if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_PRTX_CFG(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000010ull) + ((offset) & 1) * 2048; } @@ -115,7 +118,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM0(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000180ull) + ((offset) & 1) * 2048; } @@ -128,7 +134,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM1(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000188ull) + ((offset) & 1) * 2048; } @@ -141,7 +150,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM2(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000190ull) + ((offset) & 1) * 2048; } @@ -154,7 +166,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM3(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000198ull) + ((offset) & 1) * 2048; } @@ -167,7 +182,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM4(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00001A0ull) + ((offset) & 1) * 2048; } @@ -180,7 +198,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM5(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00001A8ull) + ((offset) & 1) * 2048; } @@ -193,7 +214,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CAM_EN(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000108ull) + ((offset) & 1) * 2048; } @@ -206,7 +230,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_ADR_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000100ull) + ((offset) & 1) * 2048; } @@ -219,7 +246,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_DECISION(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000040ull) + ((offset) & 1) * 2048; } @@ -232,7 +262,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_FRM_CHK(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000020ull) + ((offset) & 1) * 2048; } @@ -245,7 +278,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_FRM_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000018ull) + ((offset) & 1) * 2048; } @@ -258,7 +294,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_FRM_MAX(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000030ull) + ((offset) & 1) * 2048; } @@ -271,7 +310,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_FRM_MIN(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000028ull) + ((offset) & 1) * 2048; } @@ -284,7 +326,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_IFG(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000058ull) + ((offset) & 1) * 2048; } @@ -297,7 +342,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_INT_EN(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000008ull) + ((offset) & 1) * 2048; } @@ -310,7 +358,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_INT_REG(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000000ull) + ((offset) & 1) * 2048; } @@ -323,7 +374,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_JABBER(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000038ull) + ((offset) & 1) * 2048; } @@ -336,7 +390,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_PAUSE_DROP_TIME(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000068ull) + ((offset) & 1) * 2048; } @@ -347,7 +404,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ static inline uint64_t CVMX_AGL_GMX_RXX_RX_INBND(unsigned long offset) { if (!( - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_RX_INBND(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000060ull) + ((offset) & 1) * 2048; } @@ -360,7 +420,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000050ull) + ((offset) & 1) * 2048; } @@ -373,7 +436,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_OCTS(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000088ull) + ((offset) & 1) * 2048; } @@ -386,7 +452,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_OCTS_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000098ull) + ((offset) & 1) * 2048; } @@ -399,7 +468,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_OCTS_DMAC(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00000A8ull) + ((offset) & 1) * 2048; } @@ -412,7 +484,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_OCTS_DRP(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00000B8ull) + ((offset) & 1) * 2048; } @@ -425,7 +500,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_PKTS(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000080ull) + ((offset) & 1) * 2048; } @@ -438,7 +516,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_PKTS_BAD(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00000C0ull) + ((offset) & 1) * 2048; } @@ -451,7 +532,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_PKTS_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000090ull) + ((offset) & 1) * 2048; } @@ -464,7 +548,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_PKTS_DMAC(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00000A0ull) + ((offset) & 1) * 2048; } @@ -477,7 +564,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_STATS_PKTS_DRP(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00000B0ull) + ((offset) & 1) * 2048; } @@ -490,7 +580,10 @@ static inline uint64_t CVMX_AGL_GMX_RXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RXX_UDD_SKP(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000048ull) + ((offset) & 1) * 2048; } @@ -503,7 +596,10 @@ static inline uint64_t CVMX_AGL_GMX_RX_B if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RX_BP_DROPX(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000420ull) + ((offset) & 1) * 8; } @@ -516,7 +612,10 @@ static inline uint64_t CVMX_AGL_GMX_RX_B if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RX_BP_OFFX(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000460ull) + ((offset) & 1) * 8; } @@ -529,7 +628,10 @@ static inline uint64_t CVMX_AGL_GMX_RX_B if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_RX_BP_ONX(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000440ull) + ((offset) & 1) * 8; } @@ -540,7 +642,7 @@ static inline uint64_t CVMX_AGL_GMX_RX_B #define CVMX_AGL_GMX_RX_PRT_INFO CVMX_AGL_GMX_RX_PRT_INFO_FUNC() static inline uint64_t CVMX_AGL_GMX_RX_PRT_INFO_FUNC(void) { - if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))) + if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))) cvmx_warn("CVMX_AGL_GMX_RX_PRT_INFO not supported on this chip\n"); return CVMX_ADD_IO_SEG(0x00011800E00004E8ull); } @@ -551,7 +653,7 @@ static inline uint64_t CVMX_AGL_GMX_RX_P #define CVMX_AGL_GMX_RX_TX_STATUS CVMX_AGL_GMX_RX_TX_STATUS_FUNC() static inline uint64_t CVMX_AGL_GMX_RX_TX_STATUS_FUNC(void) { - if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))) + if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))) cvmx_warn("CVMX_AGL_GMX_RX_TX_STATUS not supported on this chip\n"); return CVMX_ADD_IO_SEG(0x00011800E00007E8ull); } @@ -564,7 +666,10 @@ static inline uint64_t CVMX_AGL_GMX_SMAC if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_SMACX(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000230ull) + ((offset) & 1) * 2048; } @@ -575,7 +680,7 @@ static inline uint64_t CVMX_AGL_GMX_SMAC #define CVMX_AGL_GMX_STAT_BP CVMX_AGL_GMX_STAT_BP_FUNC() static inline uint64_t CVMX_AGL_GMX_STAT_BP_FUNC(void) { - if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))) + if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))) cvmx_warn("CVMX_AGL_GMX_STAT_BP not supported on this chip\n"); return CVMX_ADD_IO_SEG(0x00011800E0000520ull); } @@ -588,7 +693,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_APPEND(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000218ull) + ((offset) & 1) * 2048; } @@ -599,7 +707,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ static inline uint64_t CVMX_AGL_GMX_TXX_CLK(unsigned long offset) { if (!( - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_CLK(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000208ull) + ((offset) & 1) * 2048; } @@ -612,7 +723,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_CTL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000270ull) + ((offset) & 1) * 2048; } @@ -625,7 +739,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_MIN_PKT(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000240ull) + ((offset) & 1) * 2048; } @@ -638,7 +755,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_PAUSE_PKT_INTERVAL(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000248ull) + ((offset) & 1) * 2048; } @@ -651,7 +771,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_PAUSE_PKT_TIME(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000238ull) + ((offset) & 1) * 2048; } @@ -664,7 +787,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_PAUSE_TOGO(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000258ull) + ((offset) & 1) * 2048; } @@ -677,7 +803,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_PAUSE_ZERO(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000260ull) + ((offset) & 1) * 2048; } @@ -690,7 +819,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_SOFT_PAUSE(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000250ull) + ((offset) & 1) * 2048; } @@ -703,7 +835,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT0(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000280ull) + ((offset) & 1) * 2048; } @@ -716,7 +851,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT1(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000288ull) + ((offset) & 1) * 2048; } @@ -729,7 +867,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT2(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000290ull) + ((offset) & 1) * 2048; } @@ -742,7 +883,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT3(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E0000298ull) + ((offset) & 1) * 2048; } @@ -755,7 +899,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT4(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00002A0ull) + ((offset) & 1) * 2048; } @@ -768,7 +915,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT5(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00002A8ull) + ((offset) & 1) * 2048; } @@ -781,7 +931,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ if (!( (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) || (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) || - (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))))) + (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 1))) || + (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset == 0))))) cvmx_warn("CVMX_AGL_GMX_TXX_STAT6(%lu) is invalid on this chip\n", offset); return CVMX_ADD_IO_SEG(0x00011800E00002B0ull) + ((offset) & 1) * 2048; } @@ -794,7 +947,10 @@ static inline uint64_t CVMX_AGL_GMX_TXX_ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 06:18:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 226B4106568D; Sun, 11 Mar 2012 06:18:39 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED34A8FC1F; Sun, 11 Mar 2012 06:18:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B6Ic7f096901; Sun, 11 Mar 2012 06:18:38 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B6IcK6096900; Sun, 11 Mar 2012 06:18:38 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203110618.q2B6IcK6096900@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 06:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232813 - in head/sys/contrib/octeon-sdk: . libfdt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 06:18:39 -0000 Author: jmallett Date: Sun Mar 11 06:18:38 2012 New Revision: 232813 URL: http://svn.freebsd.org/changeset/base/232813 Log: Remove files not needed by FreeBSD. Deleted: head/sys/contrib/octeon-sdk/README.txt head/sys/contrib/octeon-sdk/cvmx.mk head/sys/contrib/octeon-sdk/executive-config.h.template head/sys/contrib/octeon-sdk/libfdt/ From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 06:18:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 755CC1065686; Sun, 11 Mar 2012 06:18:57 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B5D08FC0A; Sun, 11 Mar 2012 06:18:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B6Iva8096948; Sun, 11 Mar 2012 06:18:57 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B6IvPw096946; Sun, 11 Mar 2012 06:18:57 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203110618.q2B6IvPw096946@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 06:18:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232814 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 06:18:57 -0000 Author: jmallett Date: Sun Mar 11 06:18:56 2012 New Revision: 232814 URL: http://svn.freebsd.org/changeset/base/232814 Log: Reenable foot-shooting protection for myself. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Sun Mar 11 06:18:38 2012 (r232813) +++ svnadmin/conf/sizelimit.conf Sun Mar 11 06:18:56 2012 (r232814) @@ -27,7 +27,6 @@ gonzo imp jb jeff -jmallett kmacy lstewart obrien From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 06:49:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 863F11065672; Sun, 11 Mar 2012 06:49:31 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 755708FC17; Sun, 11 Mar 2012 06:49:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B6nVbg097918; Sun, 11 Mar 2012 06:49:31 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B6nV7c097916; Sun, 11 Mar 2012 06:49:31 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203110649.q2B6nV7c097916@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 06:49: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: r232815 - head/sys/contrib/octeon-sdk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 06:49:31 -0000 Author: jmallett Date: Sun Mar 11 06:49:31 2012 New Revision: 232815 URL: http://svn.freebsd.org/changeset/base/232815 Log: Do not try to use libfdt in FreeBSD. Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Sun Mar 11 06:18:56 2012 (r232814) +++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Sun Mar 11 06:49:31 2012 (r232815) @@ -73,11 +73,13 @@ #include "cvmx-helper-util.h" #include "cvmx-helper-board.h" #include "cvmx-gpio.h" +#if !defined(__FreeBSD__) || !defined(_KERNEL) #ifdef __U_BOOT__ # include #else # include "libfdt/libfdt.h" #endif +#endif #include "cvmx-swap.h" #endif From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 06:55:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD1351065675; Sun, 11 Mar 2012 06:55:17 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AD588FC15; Sun, 11 Mar 2012 06:55:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B6tH5m098160; Sun, 11 Mar 2012 06:55:17 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B6tHi0098151; Sun, 11 Mar 2012 06:55:17 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203110655.q2B6tHi0098151@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 06:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232816 - in head/sys: contrib/octeon-sdk mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 06:55:17 -0000 Author: jmallett Date: Sun Mar 11 06:55:17 2012 New Revision: 232816 URL: http://svn.freebsd.org/changeset/base/232816 Log: Disable the Simple Executive's error decoding/reporting code. Modified: head/sys/contrib/octeon-sdk/cvmx-helper.c head/sys/contrib/octeon-sdk/cvmx-ipd.c head/sys/contrib/octeon-sdk/cvmx-mgmt-port.c head/sys/contrib/octeon-sdk/cvmx-pcie.c head/sys/contrib/octeon-sdk/cvmx-profiler.c head/sys/contrib/octeon-sdk/cvmx-srio.c head/sys/contrib/octeon-sdk/cvmx-usb.c head/sys/mips/cavium/files.octeon1 Modified: head/sys/contrib/octeon-sdk/cvmx-helper.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper.c Sun Mar 11 06:49:31 2012 (r232815) +++ head/sys/contrib/octeon-sdk/cvmx-helper.c Sun Mar 11 06:55:17 2012 (r232816) @@ -87,8 +87,8 @@ #include "cvmx-version.h" #include "cvmx-helper-check-defines.h" #include "cvmx-gmx.h" -#include "cvmx-error.h" #if !defined(__FreeBSD__) || !defined(_KERNEL) +#include "cvmx-error.h" #include "cvmx-config.h" #endif Modified: head/sys/contrib/octeon-sdk/cvmx-ipd.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-ipd.c Sun Mar 11 06:49:31 2012 (r232815) +++ head/sys/contrib/octeon-sdk/cvmx-ipd.c Sun Mar 11 06:55:17 2012 (r232816) @@ -74,8 +74,8 @@ #include "cvmx-bootmem.h" #include "cvmx-version.h" #include "cvmx-helper-check-defines.h" -#include "cvmx-error.h" #if !defined(__FreeBSD__) || !defined(_KERNEL) +#include "cvmx-error.h" #include "cvmx-config.h" #endif Modified: head/sys/contrib/octeon-sdk/cvmx-mgmt-port.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-mgmt-port.c Sun Mar 11 06:49:31 2012 (r232815) +++ head/sys/contrib/octeon-sdk/cvmx-mgmt-port.c Sun Mar 11 06:55:17 2012 (r232816) @@ -56,7 +56,9 @@ #include "cvmx-mdio.h" #include "cvmx-mgmt-port.h" #include "cvmx-sysinfo.h" +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include "cvmx-error.h" +#endif /** * Enum of MIX interface modes @@ -389,7 +391,9 @@ cvmx_mgmt_port_result_t cvmx_mgmt_port_i cvmx_write_csr(CVMX_AGL_GMX_DRV_CTL, drv_ctl.u64); } } +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) cvmx_error_enable_group(CVMX_ERROR_GROUP_MGMT_PORT, port); +#endif return CVMX_MGMT_PORT_SUCCESS; } @@ -408,7 +412,9 @@ cvmx_mgmt_port_result_t cvmx_mgmt_port_s if ((port < 0) || (port >= __cvmx_mgmt_port_num_ports())) return CVMX_MGMT_PORT_INVALID_PARAM; +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) cvmx_error_disable_group(CVMX_ERROR_GROUP_MGMT_PORT, port); +#endif /* Stop packets from comming in */ cvmx_mgmt_port_disable(port); Modified: head/sys/contrib/octeon-sdk/cvmx-pcie.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-pcie.c Sun Mar 11 06:49:31 2012 (r232815) +++ head/sys/contrib/octeon-sdk/cvmx-pcie.c Sun Mar 11 06:55:17 2012 (r232816) @@ -81,7 +81,9 @@ #include "cvmx-sysinfo.h" #include "cvmx-swap.h" #include "cvmx-wqe.h" +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include "cvmx-error.h" +#endif #include "cvmx-helper-errata.h" #include "cvmx-qlm.h" #endif @@ -1193,7 +1195,7 @@ int cvmx_pcie_rc_initialize(int pcie_por result = __cvmx_pcie_rc_initialize_gen1(pcie_port); else result = __cvmx_pcie_rc_initialize_gen2(pcie_port); -#if !defined(CVMX_BUILD_FOR_LINUX_KERNEL) || defined(CONFIG_CAVIUM_DECODE_RSL) +#if (!defined(CVMX_BUILD_FOR_LINUX_KERNEL) && !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL)) || defined(CONFIG_CAVIUM_DECODE_RSL) if (result == 0) cvmx_error_enable_group(CVMX_ERROR_GROUP_PCI, pcie_port); #endif @@ -1210,7 +1212,7 @@ int cvmx_pcie_rc_initialize(int pcie_por */ int cvmx_pcie_rc_shutdown(int pcie_port) { -#if !defined(CVMX_BUILD_FOR_LINUX_KERNEL) || defined(CONFIG_CAVIUM_DECODE_RSL) +#if (!defined(CVMX_BUILD_FOR_LINUX_KERNEL) && !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL)) || defined(CONFIG_CAVIUM_DECODE_RSL) cvmx_error_disable_group(CVMX_ERROR_GROUP_PCI, pcie_port); #endif /* Wait for all pending operations to complete */ Modified: head/sys/contrib/octeon-sdk/cvmx-profiler.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-profiler.c Sun Mar 11 06:49:31 2012 (r232815) +++ head/sys/contrib/octeon-sdk/cvmx-profiler.c Sun Mar 11 06:55:17 2012 (r232816) @@ -51,7 +51,9 @@ #include "cvmx-coremask.h" #include "cvmx-spinlock.h" #include "cvmx-atomic.h" +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include "cvmx-error.h" +#endif #include "cvmx-asm.h" #include "cvmx-bootmem.h" #include "cvmx-profiler.h" Modified: head/sys/contrib/octeon-sdk/cvmx-srio.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-srio.c Sun Mar 11 06:49:31 2012 (r232815) +++ head/sys/contrib/octeon-sdk/cvmx-srio.c Sun Mar 11 06:55:17 2012 (r232816) @@ -68,7 +68,9 @@ #include "cvmx-helper.h" #ifndef CVMX_BUILD_FOR_LINUX_HOST #include "cvmx-atomic.h" +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include "cvmx-error.h" +#endif #include "cvmx-helper-errata.h" #endif #include "cvmx-qlm.h" @@ -770,7 +772,7 @@ int cvmx_srio_initialize(int srio_port, cvmx_write_csr(CVMX_SRIOX_INT_REG(srio_port), cvmx_read_csr(CVMX_SRIOX_INT_REG(srio_port))); /* Enable error reporting */ -#if (!defined(CVMX_BUILD_FOR_LINUX_HOST) && !defined(CVMX_BUILD_FOR_LINUX_KERNEL)) || defined(CONFIG_CAVIUM_DECODE_RSL) +#if (!defined(CVMX_BUILD_FOR_LINUX_HOST) && !defined(CVMX_BUILD_FOR_LINUX_KERNEL) && !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL)) || defined(CONFIG_CAVIUM_DECODE_RSL) cvmx_error_enable_group(CVMX_ERROR_GROUP_SRIO, srio_port); #endif Modified: head/sys/contrib/octeon-sdk/cvmx-usb.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-usb.c Sun Mar 11 06:49:31 2012 (r232815) +++ head/sys/contrib/octeon-sdk/cvmx-usb.c Sun Mar 11 06:55:17 2012 (r232816) @@ -74,8 +74,10 @@ #include "cvmx-helper-board.h" #include "cvmx-csr-db.h" #include "cvmx-swap.h" +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include "cvmx-error.h" #endif +#endif #define MAX_RETRIES 3 /* Maximum number of times to retry failed transactions */ #define MAX_PIPES 32 /* Maximum number of pipes that can be open at once */ Modified: head/sys/mips/cavium/files.octeon1 ============================================================================== --- head/sys/mips/cavium/files.octeon1 Sun Mar 11 06:49:31 2012 (r232815) +++ head/sys/mips/cavium/files.octeon1 Sun Mar 11 06:55:17 2012 (r232816) @@ -57,26 +57,6 @@ mips/cavium/octeon_gpio.c optional gpi contrib/octeon-sdk/cvmx-cmd-queue.c standard contrib/octeon-sdk/cvmx-bootmem.c standard contrib/octeon-sdk/cvmx-clock.c standard -contrib/octeon-sdk/cvmx-error.c standard -contrib/octeon-sdk/cvmx-error-custom.c standard -contrib/octeon-sdk/cvmx-error-init-cn30xx.c standard -contrib/octeon-sdk/cvmx-error-init-cn31xx.c standard -contrib/octeon-sdk/cvmx-error-init-cn38xx.c standard -contrib/octeon-sdk/cvmx-error-init-cn38xxp2.c standard -contrib/octeon-sdk/cvmx-error-init-cn50xx.c standard -contrib/octeon-sdk/cvmx-error-init-cn52xx.c standard -contrib/octeon-sdk/cvmx-error-init-cn52xxp1.c standard -contrib/octeon-sdk/cvmx-error-init-cn56xx.c standard -contrib/octeon-sdk/cvmx-error-init-cn56xxp1.c standard -contrib/octeon-sdk/cvmx-error-init-cn58xx.c standard -contrib/octeon-sdk/cvmx-error-init-cn58xxp1.c standard -contrib/octeon-sdk/cvmx-error-init-cn61xx.c standard -contrib/octeon-sdk/cvmx-error-init-cn63xx.c standard -contrib/octeon-sdk/cvmx-error-init-cn63xxp1.c standard -contrib/octeon-sdk/cvmx-error-init-cn66xx.c standard -contrib/octeon-sdk/cvmx-error-init-cn68xx.c standard -contrib/octeon-sdk/cvmx-error-init-cn68xxp1.c standard -contrib/octeon-sdk/cvmx-error-init-cnf71xx.c standard contrib/octeon-sdk/cvmx-fpa.c standard contrib/octeon-sdk/cvmx-helper.c standard contrib/octeon-sdk/cvmx-helper-board.c standard From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 08:12:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 356EB106566C; Sun, 11 Mar 2012 08:12:31 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 248BD8FC0C; Sun, 11 Mar 2012 08:12:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B8CV2B000718; Sun, 11 Mar 2012 08:12:31 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B8CVQ9000716; Sun, 11 Mar 2012 08:12:31 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203110812.q2B8CVQ9000716@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 08:12: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: r232817 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 08:12:31 -0000 Author: jmallett Date: Sun Mar 11 08:12:30 2012 New Revision: 232817 URL: http://svn.freebsd.org/changeset/base/232817 Log: Reenable -Winline on MIPS now that we're not compiling Cavium's error decoding stuff, which is impossibly-huge. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sun Mar 11 06:55:17 2012 (r232816) +++ head/sys/conf/kern.mk Sun Mar 11 08:12:30 2012 (r232817) @@ -131,9 +131,6 @@ CFLAGS+= -mcall-aixdesc .if ${MACHINE_CPUARCH} == "mips" CFLAGS+= -msoft-float INLINE_LIMIT?= 8000 -# XXX Disable -Winline. This is needed because of the monstrous code that is -# the Cavium Octeon Simple Executive. -CWARNFLAGS:= ${CWARNFLAGS:N-Winline} .endif # From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 09:22:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 258C71065676; Sun, 11 Mar 2012 09:22:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF6CB8FC15; Sun, 11 Mar 2012 09:22:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B9M5AY002993; Sun, 11 Mar 2012 09:22:05 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B9M57e002991; Sun, 11 Mar 2012 09:22:05 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203110922.q2B9M57e002991@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 09:22: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: r232818 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 09:22:06 -0000 Author: kib Date: Sun Mar 11 09:22:05 2012 New Revision: 232818 URL: http://svn.freebsd.org/changeset/base/232818 Log: MFC r232178: Remove apparently redundand checks for socket so_proto being non-NULL from sosetopt() and sogetopt(). Modified: stable/8/sys/kern/uipc_socket.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/uipc_socket.c ============================================================================== --- stable/8/sys/kern/uipc_socket.c Sun Mar 11 08:12:30 2012 (r232817) +++ stable/8/sys/kern/uipc_socket.c Sun Mar 11 09:22:05 2012 (r232818) @@ -2436,7 +2436,7 @@ sosetopt(struct socket *so, struct socko CURVNET_SET(so->so_vnet); error = 0; if (sopt->sopt_level != SOL_SOCKET) { - if (so->so_proto && so->so_proto->pr_ctloutput) { + if (so->so_proto->pr_ctloutput != NULL) { error = (*so->so_proto->pr_ctloutput)(so, sopt); CURVNET_RESTORE(); return (error); @@ -2497,8 +2497,7 @@ sosetopt(struct socket *so, struct socko error = EINVAL; goto bad; } - if (so->so_proto != NULL && - ((so->so_proto->pr_domain->dom_family == PF_INET) || + if (((so->so_proto->pr_domain->dom_family == PF_INET) || (so->so_proto->pr_domain->dom_family == PF_INET6) || (so->so_proto->pr_domain->dom_family == PF_ROUTE))) { so->so_fibnum = optval; @@ -2621,11 +2620,8 @@ sosetopt(struct socket *so, struct socko error = ENOPROTOOPT; break; } - if (error == 0 && so->so_proto != NULL && - so->so_proto->pr_ctloutput != NULL) { - (void) ((*so->so_proto->pr_ctloutput) - (so, sopt)); - } + if (error == 0 && so->so_proto->pr_ctloutput != NULL) + (void)(*so->so_proto->pr_ctloutput)(so, sopt); } bad: CURVNET_RESTORE(); @@ -2675,7 +2671,7 @@ sogetopt(struct socket *so, struct socko CURVNET_SET(so->so_vnet); error = 0; if (sopt->sopt_level != SOL_SOCKET) { - if (so->so_proto && so->so_proto->pr_ctloutput) + if (so->so_proto->pr_ctloutput != NULL) error = (*so->so_proto->pr_ctloutput)(so, sopt); else error = ENOPROTOOPT; From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 09:27:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 77867106564A; Sun, 11 Mar 2012 09:27:09 +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 662AA8FC14; Sun, 11 Mar 2012 09:27:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B9R9OB003192; Sun, 11 Mar 2012 09:27:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B9R9t7003189; Sun, 11 Mar 2012 09:27:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203110927.q2B9R9t7003189@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 09:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232819 - 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: Sun, 11 Mar 2012 09:27:09 -0000 Author: kib Date: Sun Mar 11 09:27:09 2012 New Revision: 232819 URL: http://svn.freebsd.org/changeset/base/232819 Log: MFC r232179: Add SO_PROTOCOL/SO_PROTOTYPE socket SOL_SOCKET-level option to get the socket protocol number. PR: kern/162352 Modified: stable/8/sys/kern/uipc_socket.c stable/8/sys/sys/socket.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/uipc_socket.c ============================================================================== --- stable/8/sys/kern/uipc_socket.c Sun Mar 11 09:22:05 2012 (r232818) +++ stable/8/sys/kern/uipc_socket.c Sun Mar 11 09:27:09 2012 (r232819) @@ -2713,6 +2713,10 @@ integer: optval = so->so_type; goto integer; + case SO_PROTOCOL: + optval = so->so_proto->pr_protocol; + goto integer; + case SO_ERROR: SOCK_LOCK(so); optval = so->so_error; Modified: stable/8/sys/sys/socket.h ============================================================================== --- stable/8/sys/sys/socket.h Sun Mar 11 09:22:05 2012 (r232818) +++ stable/8/sys/sys/socket.h Sun Mar 11 09:27:09 2012 (r232819) @@ -139,6 +139,8 @@ typedef __uid_t uid_t; #define SO_LISTENQLEN 0x1012 /* socket's complete queue length */ #define SO_LISTENINCQLEN 0x1013 /* socket's incomplete queue length */ #define SO_SETFIB 0x1014 /* use this FIB to route */ +#define SO_PROTOCOL 0x1016 /* get socket protocol (Linux name) */ +#define SO_PROTOTYPE SO_PROTOCOL /* alias for SO_PROTOCOL (SunOS name) */ #endif /* From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 09:29:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FCEC1065670; Sun, 11 Mar 2012 09:29:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F266F8FC17; Sun, 11 Mar 2012 09:29:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B9T22Z003297; Sun, 11 Mar 2012 09:29:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B9T2GF003295; Sun, 11 Mar 2012 09:29:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203110929.q2B9T2GF003295@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 09:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232820 - 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: Sun, 11 Mar 2012 09:29:03 -0000 Author: kib Date: Sun Mar 11 09:29:02 2012 New Revision: 232820 URL: http://svn.freebsd.org/changeset/base/232820 Log: MFC r232180: Document SO_PROTOCOL socket option. Modified: stable/8/lib/libc/sys/getsockopt.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/sys/getsockopt.2 ============================================================================== --- stable/8/lib/libc/sys/getsockopt.2 Sun Mar 11 09:27:09 2012 (r232819) +++ stable/8/lib/libc/sys/getsockopt.2 Sun Mar 11 09:29:02 2012 (r232820) @@ -28,7 +28,7 @@ .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd November 21, 2011 +.Dd February 26, 2012 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -172,6 +172,8 @@ for the socket .It Dv SO_BINTIME Ta "enables reception of a timestamp with datagrams" .It Dv SO_ACCEPTCONN Ta "get listening status of the socket (get only)" .It Dv SO_TYPE Ta "get the type of the socket (get only)" +.It Dv SO_PROTOCOL Ta "get the protocol number for the socket (get only)" +.It Dv SO_PROTOTYPE Ta "SunOS alias for the Linux SO_PROTOCOL (get only)" .It Dv SO_ERROR Ta "get and clear error on the socket (get only)" .It Dv SO_SETFIB Ta "set the associated FIB (routing table) for the socket (set only)" .El @@ -431,7 +433,10 @@ and for .Ed .Pp .Dv SO_ACCEPTCONN , -.Dv SO_TYPE +.Dv SO_TYPE , +.Dv SO_PROTOCOL +(and its alias +.Dv SO_PROTOTYPE ) and .Dv SO_ERROR are options used only with @@ -445,6 +450,12 @@ system call was invoked on the socket. returns the type of the socket, such as .Dv SOCK_STREAM ; it is useful for servers that inherit sockets on startup. +.Dv SO_PROTOCOL +returns the protocol number for the socket, for +.Dv AF_INET +and +.Dv AF_INET6 +address families. .Dv SO_ERROR returns any pending error on the socket and clears the error status. From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 12:19:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7893B106564A; Sun, 11 Mar 2012 12: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 6468C8FC0A; Sun, 11 Mar 2012 12:19:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BCJxvv009342; Sun, 11 Mar 2012 12:19:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BCJwGN009328; Sun, 11 Mar 2012 12:19:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203111219.q2BCJwGN009328@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 12:19:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232821 - in head: . include sys/fs/cd9660 sys/fs/ext2fs sys/fs/fifofs sys/fs/nfs sys/fs/tmpfs sys/fs/udf sys/gnu/fs/xfs/FreeBSD sys/kern sys/nfsclient sys/sys 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: Sun, 11 Mar 2012 12:19:59 -0000 Author: kib Date: Sun Mar 11 12:19:58 2012 New Revision: 232821 URL: http://svn.freebsd.org/changeset/base/232821 Log: Remove fifo.h. The only used function declaration from the header is migrated to sys/vnode.h. Submitted by: gianni Deleted: head/sys/fs/fifofs/fifo.h Modified: head/ObsoleteFiles.inc head/include/Makefile head/sys/fs/cd9660/cd9660_vnops.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/fifofs/fifo_vnops.c head/sys/fs/nfs/nfsport.h head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/fs/udf/udf_vnops.c head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c head/sys/kern/sys_pipe.c head/sys/nfsclient/nfs_vnops.c head/sys/sys/vnode.h head/sys/ufs/ufs/ufs_vnops.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 11 09:29:02 2012 (r232820) +++ head/ObsoleteFiles.inc Sun Mar 11 12:19:58 2012 (r232821) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20120309: Remove fifofs header files. +OLD_FILES+=usr/include/fs/fifofs/fifo.h +OLD_DIRS+=usr/include/fs/fifofs # 20120225: libarchive 3.0.3 OLD_FILES+=usr/share/man/man3/archive_read_data_into_buffer.3.gz \ usr/share/man/man3/archive_read_support_compression_all.3.gz \ Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sun Mar 11 09:29:02 2012 (r232820) +++ head/include/Makefile Sun Mar 11 12:19:58 2012 (r232821) @@ -43,7 +43,7 @@ LSUBDIRS= cam/ata cam/scsi \ dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/ofw \ dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ - fs/devfs fs/fdescfs fs/fifofs fs/msdosfs fs/nfs fs/ntfs fs/nullfs \ + fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/ntfs fs/nullfs \ ${_fs_nwfs} fs/portalfs fs/procfs fs/smbfs fs/udf fs/unionfs \ geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ geom/mirror geom/mountver geom/multipath geom/nop \ Modified: head/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vnops.c Sun Mar 11 09:29:02 2012 (r232820) +++ head/sys/fs/cd9660/cd9660_vnops.c Sun Mar 11 12:19:58 2012 (r232821) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Sun Mar 11 09:29:02 2012 (r232820) +++ head/sys/fs/ext2fs/ext2_vnops.c Sun Mar 11 12:19:58 2012 (r232821) @@ -71,8 +71,6 @@ #include "opt_directio.h" -#include - #include #include Modified: head/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- head/sys/fs/fifofs/fifo_vnops.c Sun Mar 11 09:29:02 2012 (r232820) +++ head/sys/fs/fifofs/fifo_vnops.c Sun Mar 11 12:19:58 2012 (r232821) @@ -52,7 +52,6 @@ #include #include #include -#include /* * This structure is associated with the FIFO vnode and stores Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Sun Mar 11 09:29:02 2012 (r232820) +++ head/sys/fs/nfs/nfsport.h Sun Mar 11 12:19:58 2012 (r232821) @@ -78,7 +78,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Sun Mar 11 09:29:02 2012 (r232820) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Sun Mar 11 12:19:58 2012 (r232821) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/fs/udf/udf_vnops.c ============================================================================== --- head/sys/fs/udf/udf_vnops.c Sun Mar 11 09:29:02 2012 (r232820) +++ head/sys/fs/udf/udf_vnops.c Sun Mar 11 12:19:58 2012 (r232821) @@ -48,7 +48,6 @@ #include -#include #include #include #include Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c Sun Mar 11 09:29:02 2012 (r232820) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c Sun Mar 11 12:19:58 2012 (r232821) @@ -46,8 +46,6 @@ #include #include -#include - #define NO_VFS_MACROS #include "xfs.h" #include "xfs_types.h" Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Sun Mar 11 09:29:02 2012 (r232820) +++ head/sys/kern/sys_pipe.c Sun Mar 11 12:19:58 2012 (r232821) @@ -129,8 +129,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - /* * Use this define if you want to disable *fancy* VM things. Expect an * approx 30% decrease in transfer rate. This could be useful for Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Sun Mar 11 09:29:02 2012 (r232820) +++ head/sys/nfsclient/nfs_vnops.c Sun Mar 11 12:19:58 2012 (r232821) @@ -67,8 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include #include Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Sun Mar 11 09:29:02 2012 (r232820) +++ head/sys/sys/vnode.h Sun Mar 11 12:19:58 2012 (r232821) @@ -782,6 +782,9 @@ extern struct vop_vector default_vnodeop #define VOP_ENOENT ((void*)(uintptr_t)vop_enoent) #define VOP_EOPNOTSUPP ((void*)(uintptr_t)vop_eopnotsupp) +/* fifo_vnops.c */ +int fifo_printinfo(struct vnode *); + /* vfs_hash.c */ typedef int vfs_hash_cmp_t(struct vnode *vp, void *arg); Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Sun Mar 11 09:29:02 2012 (r232820) +++ head/sys/ufs/ufs/ufs_vnops.c Sun Mar 11 12:19:58 2012 (r232821) @@ -68,8 +68,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 13:39:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEA381065670; Sun, 11 Mar 2012 13:39:19 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C42C58FC0C; Sun, 11 Mar 2012 13:39:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BDdJZK011772; Sun, 11 Mar 2012 13:39:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BDdJOX011770; Sun, 11 Mar 2012 13:39:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201203111339.q2BDdJOX011770@svn.freebsd.org> From: Marius Strobl Date: Sun, 11 Mar 2012 13:39: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: r232822 - head/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 13:39:20 -0000 Author: marius Date: Sun Mar 11 13:39:19 2012 New Revision: 232822 URL: http://svn.freebsd.org/changeset/base/232822 Log: Fix a bug introduced in r223938; on big-endian machines coping a 32-bit quantum bytewise to the address of a 64-bit variable results in writing to the "wrong" 32-bit half so adjust the address accordingly. This fix is implemented in a hackish way for two reasons: o in order to be able to get it into 8.3 with zero impact on the little- endian architectures where this bug has no effect and o to avoid blowing the x86 boot2 out of the water again when compiling it with clang, which all sane versions of this fix tested do. This change fixes booting from UFS1 file systems on big-endian machines. MFC after: 3 days Modified: head/sys/boot/common/ufsread.c Modified: head/sys/boot/common/ufsread.c ============================================================================== --- head/sys/boot/common/ufsread.c Sun Mar 11 12:19:58 2012 (r232821) +++ head/sys/boot/common/ufsread.c Sun Mar 11 13:39:19 2012 (r232822) @@ -46,6 +46,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include #include @@ -262,15 +264,28 @@ fsread(ino_t inode, void *buf, size_t nb } n = (lbn - NDADDR) & (n - 1); #if defined(UFS1_ONLY) +#if BYTE_ORDER == BIG_ENDIAN + memcpy((char *)&addr + sizeof(addr) - + sizeof(ufs1_daddr_t), (ufs1_daddr_t *)indbuf + n, + sizeof(ufs1_daddr_t)); +#else memcpy(&addr, (ufs1_daddr_t *)indbuf + n, sizeof(ufs1_daddr_t)); +#endif #elif defined(UFS2_ONLY) memcpy(&addr, (ufs2_daddr_t *)indbuf + n, sizeof(ufs2_daddr_t)); #else if (fs.fs_magic == FS_UFS1_MAGIC) +#if BYTE_ORDER == BIG_ENDIAN + memcpy((char *)&addr + sizeof(addr) - + sizeof(ufs1_daddr_t), + (ufs1_daddr_t *)indbuf + n, + sizeof(ufs1_daddr_t)); +#else memcpy(&addr, (ufs1_daddr_t *)indbuf + n, sizeof(ufs1_daddr_t)); +#endif else memcpy(&addr, (ufs2_daddr_t *)indbuf + n, sizeof(ufs2_daddr_t)); From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 15:58:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3382E1065670; Sun, 11 Mar 2012 15:58:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2253C8FC0C; Sun, 11 Mar 2012 15:58:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BFwRtM015997; Sun, 11 Mar 2012 15:58:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BFwR7B015994; Sun, 11 Mar 2012 15:58:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203111558.q2BFwR7B015994@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 15:58: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: r232823 - head/sys/fs/fifofs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 15:58:28 -0000 Author: kib Date: Sun Mar 11 15:58:27 2012 New Revision: 232823 URL: http://svn.freebsd.org/changeset/base/232823 Log: Update comment. Submitted by: gianni Modified: head/sys/fs/fifofs/fifo_vnops.c Modified: head/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- head/sys/fs/fifofs/fifo_vnops.c Sun Mar 11 13:39:19 2012 (r232822) +++ head/sys/fs/fifofs/fifo_vnops.c Sun Mar 11 15:58:27 2012 (r232823) @@ -59,7 +59,7 @@ * Notes about locking: * - fi_pipe is invariant since init time. * - fi_readers and fi_writers are protected by the vnode lock. - * - fi_wgen is protected by the pipe mutex. + * - fi_wgen and fi_seqcount are protected by the pipe mutex. */ struct fifoinfo { struct pipe *fi_pipe; From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 17:35:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5236106564A; Sun, 11 Mar 2012 17:35:12 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90EFC8FC08; Sun, 11 Mar 2012 17:35:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BHZC8h019972; Sun, 11 Mar 2012 17:35:12 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BHZCww019970; Sun, 11 Mar 2012 17:35:12 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201203111735.q2BHZCww019970@svn.freebsd.org> From: Luigi Rizzo Date: Sun, 11 Mar 2012 17:35: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: r232824 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 17:35:12 -0000 Author: luigi Date: Sun Mar 11 17:35:12 2012 New Revision: 232824 URL: http://svn.freebsd.org/changeset/base/232824 Log: - remove an extra parenthesis in a closing brace; - add the macro NETMAP_RING_FIRST_RESERVED() which returns the index of the first non-released buffer in the ring (this is useful for code that retains buffers for some time instead of processing them immediately) Modified: head/sys/net/netmap_user.h Modified: head/sys/net/netmap_user.h ============================================================================== --- head/sys/net/netmap_user.h Sun Mar 11 15:58:27 2012 (r232823) +++ head/sys/net/netmap_user.h Sun Mar 11 17:35:12 2012 (r232824) @@ -77,11 +77,16 @@ #define NETMAP_BUF_IDX(ring, buf) \ ( ((char *)(buf) - ((char *)(ring) + (ring)->buf_ofs) ) / \ - (ring)->nr_buf_size) ) + (ring)->nr_buf_size ) #define NETMAP_RING_NEXT(r, i) \ ((i)+1 == (r)->num_slots ? 0 : (i) + 1 ) +#define NETMAP_RING_FIRST_RESERVED(r) \ + ( (r)->cur < (r)->reserved ? \ + (r)->cur + (r)->num_slots - (r)->reserved : \ + (r)->cur - (r)->reserved ) + /* * Return 1 if the given tx ring is empty. */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 19:08:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20DBD106566C; Sun, 11 Mar 2012 19:08:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A8BA8FC0C; Sun, 11 Mar 2012 19:08:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BJ8ujg022872; Sun, 11 Mar 2012 19:08:56 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BJ8uUY022869; Sun, 11 Mar 2012 19:08:56 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203111908.q2BJ8uUY022869@svn.freebsd.org> From: Adrian Chadd Date: Sun, 11 Mar 2012 19:08: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: r232825 - 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: Sun, 11 Mar 2012 19:08:57 -0000 Author: adrian Date: Sun Mar 11 19:08:56 2012 New Revision: 232825 URL: http://svn.freebsd.org/changeset/base/232825 Log: Upgrade the netgraph vlan node to support 802.1q, encapsulation type, PCP and CFI fields. * Ethernet_type for VLAN encapsulation is tunable, default is 0x8100; * PCP (Priority code point) and CFI (canonical format indicator) is tunable per VID; * Tunable encapsulation to support 802.1q * Encapsulation/Decapsulation code improvements New messages have been added for this netgraph node to support the new features. However, the legacy "vlan" id is still supported and compiled in by default. It can be disabled in a future release. TODO: * Documentation * Examples PR: kern/161908 Submitted by: Ivan Modified: head/sys/netgraph/ng_vlan.c head/sys/netgraph/ng_vlan.h Modified: head/sys/netgraph/ng_vlan.c ============================================================================== --- head/sys/netgraph/ng_vlan.c Sun Mar 11 17:35:12 2012 (r232824) +++ head/sys/netgraph/ng_vlan.c Sun Mar 11 19:08:56 2012 (r232825) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2003 IPNET Internet Communication Company + * Copyright (c) 2011 - 2012 Rozhuk Ivan * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,6 +47,22 @@ #include #include +struct ng_vlan_private { + hook_p downstream_hook; + hook_p nomatch_hook; + uint32_t decap_enable; + uint32_t encap_enable; + uint16_t encap_proto; + hook_p vlan_hook[(EVL_VLID_MASK + 1)]; +}; +typedef struct ng_vlan_private *priv_p; + +#define ETHER_VLAN_HDR_LEN (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) +#define VLAN_TAG_MASK 0xFFFF +#define HOOK_VLAN_TAG_SET_MASK ((uintptr_t)((~0) & ~(VLAN_TAG_MASK))) +#define IS_HOOK_VLAN_SET(hdata) \ + ((((uintptr_t)hdata) & HOOK_VLAN_TAG_SET_MASK) == HOOK_VLAN_TAG_SET_MASK) + static ng_constructor_t ng_vlan_constructor; static ng_rcvmsg_t ng_vlan_rcvmsg; static ng_shutdown_t ng_vlan_shutdown; @@ -110,6 +127,55 @@ static const struct ng_cmdlist ng_vlan_c NULL, &ng_vlan_table_type }, + { + NGM_VLAN_COOKIE, + NGM_VLAN_DEL_VID_FLT, + "delvidflt", + &ng_parse_uint16_type, + NULL + }, + { + NGM_VLAN_COOKIE, + NGM_VLAN_GET_DECAP, + "getdecap", + NULL, + &ng_parse_hint32_type + }, + { + NGM_VLAN_COOKIE, + NGM_VLAN_SET_DECAP, + "setdecap", + &ng_parse_hint32_type, + NULL + }, + { + NGM_VLAN_COOKIE, + NGM_VLAN_GET_ENCAP, + "getencap", + NULL, + &ng_parse_hint32_type + }, + { + NGM_VLAN_COOKIE, + NGM_VLAN_SET_ENCAP, + "setencap", + &ng_parse_hint32_type, + NULL + }, + { + NGM_VLAN_COOKIE, + NGM_VLAN_GET_ENCAP_PROTO, + "getencapproto", + NULL, + &ng_parse_hint16_type + }, + { + NGM_VLAN_COOKIE, + NGM_VLAN_SET_ENCAP_PROTO, + "setencapproto", + &ng_parse_hint16_type, + NULL + }, { 0 } }; @@ -126,44 +192,40 @@ static struct ng_type ng_vlan_typestruct }; NETGRAPH_INIT(vlan, &ng_vlan_typestruct); -struct filter { - LIST_ENTRY(filter) next; - u_int16_t vlan; - hook_p hook; -}; -#define HASHSIZE 16 -#define HASH(id) ((((id) >> 8) ^ ((id) >> 4) ^ (id)) & 0x0f) -LIST_HEAD(filterhead, filter); - -typedef struct { - hook_p downstream_hook; - hook_p nomatch_hook; - struct filterhead hashtable[HASHSIZE]; - u_int32_t nent; -} *priv_p; +/* + * Helper functions. + */ -static struct filter * -ng_vlan_findentry(priv_p priv, u_int16_t vlan) +static __inline int +m_chk(struct mbuf **mp, int len) { - struct filterhead *chain = &priv->hashtable[HASH(vlan)]; - struct filter *f; - LIST_FOREACH(f, chain, next) - if (f->vlan == vlan) - return (f); - return (NULL); + if ((*mp)->m_pkthdr.len < len) { + m_freem((*mp)); + (*mp) = NULL; + return (EINVAL); + } + if ((*mp)->m_len < len && ((*mp) = m_pullup((*mp), len)) == NULL) + return (ENOBUFS); + + return (0); } + +/* + * Netgraph node functions. + */ + static int ng_vlan_constructor(node_p node) { priv_p priv; - int i; priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); - for (i = 0; i < HASHSIZE; i++) - LIST_INIT(&priv->hashtable[i]); + priv->decap_enable = 0; + priv->encap_enable = VLAN_ENCAP_FROM_FILTER; + priv->encap_proto = htons(ETHERTYPE_VLAN); NG_NODE_SET_PRIVATE(node, priv); return (0); } @@ -191,13 +253,14 @@ static int ng_vlan_rcvmsg(node_p node, item_p item, hook_p lasthook) { const priv_p priv = NG_NODE_PRIVATE(node); - int error = 0; struct ng_mesg *msg, *resp = NULL; struct ng_vlan_filter *vf; - struct filter *f; hook_p hook; struct ng_vlan_table *t; - int i; + uintptr_t hook_data; + int i, vlan_count; + uint16_t vid; + int error = 0; NGI_GET_MSG(item, msg); /* Deal with message according to cookie and command. */ @@ -212,12 +275,23 @@ ng_vlan_rcvmsg(node_p node, item_p item, } vf = (struct ng_vlan_filter *)msg->data; /* Sanity check the VLAN ID value. */ - if (vf->vlan & ~EVL_VLID_MASK) { +#ifdef NG_VLAN_USE_OLD_VLAN_NAME + if (vf->vid == 0 && vf->vid != vf->vlan) { + vf->vid = vf->vlan; + } else if (vf->vid != 0 && vf->vlan != 0 && + vf->vid != vf->vlan) { + error = EINVAL; + break; + } +#endif + if (vf->vid & ~EVL_VLID_MASK || + vf->pcp & ~7 || + vf->cfi & ~1) { error = EINVAL; break; } /* Check that a referenced hook exists. */ - hook = ng_findhook(node, vf->hook); + hook = ng_findhook(node, vf->hook_name); if (hook == NULL) { error = ENOENT; break; @@ -229,30 +303,20 @@ ng_vlan_rcvmsg(node_p node, item_p item, break; } /* And is not already in service. */ - if (NG_HOOK_PRIVATE(hook) != NULL) { + if (IS_HOOK_VLAN_SET(NG_HOOK_PRIVATE(hook))) { error = EEXIST; break; } /* Check we don't already trap this VLAN. */ - if (ng_vlan_findentry(priv, vf->vlan)) { + if (priv->vlan_hook[vf->vid] != NULL) { error = EEXIST; break; } - /* Create filter. */ - f = malloc(sizeof(*f), - M_NETGRAPH, M_NOWAIT | M_ZERO); - if (f == NULL) { - error = ENOMEM; - break; - } - /* Link filter and hook together. */ - f->hook = hook; - f->vlan = vf->vlan; - NG_HOOK_SET_PRIVATE(hook, f); - /* Register filter in a hash table. */ - LIST_INSERT_HEAD( - &priv->hashtable[HASH(f->vlan)], f, next); - priv->nent++; + /* Link vlan and hook together. */ + NG_HOOK_SET_PRIVATE(hook, + (void *)(HOOK_VLAN_TAG_SET_MASK | + EVL_MAKETAG(vf->vid, vf->pcp, vf->cfi))); + priv->vlan_hook[vf->vid] = hook; break; case NGM_VLAN_DEL_FILTER: /* Check that message is long enough. */ @@ -262,37 +326,151 @@ ng_vlan_rcvmsg(node_p node, item_p item, } /* Check that hook exists and is active. */ hook = ng_findhook(node, (char *)msg->data); - if (hook == NULL || - (f = NG_HOOK_PRIVATE(hook)) == NULL) { + if (hook == NULL) { + error = ENOENT; + break; + } + hook_data = (uintptr_t)NG_HOOK_PRIVATE(hook); + if (IS_HOOK_VLAN_SET(hook_data) == 0) { error = ENOENT; break; } + + KASSERT(priv->vlan_hook[EVL_VLANOFTAG(hook_data)] == hook, + ("%s: NGM_VLAN_DEL_FILTER: Invalid VID for Hook = %s\n", + __func__, (char *)msg->data)); + /* Purge a rule that refers to this hook. */ + priv->vlan_hook[EVL_VLANOFTAG(hook_data)] = NULL; + NG_HOOK_SET_PRIVATE(hook, NULL); + break; + case NGM_VLAN_DEL_VID_FLT: + /* Check that message is long enough. */ + if (msg->header.arglen != sizeof(uint16_t)) { + error = EINVAL; + break; + } + vid = (*((uint16_t *)msg->data)); + /* Sanity check the VLAN ID value. */ + if (vid & ~EVL_VLID_MASK) { + error = EINVAL; + break; + } + /* Check that hook exists and is active. */ + hook = priv->vlan_hook[vid]; + if (hook == NULL) { + error = ENOENT; + break; + } + hook_data = (uintptr_t)NG_HOOK_PRIVATE(hook); + if (IS_HOOK_VLAN_SET(hook_data) == 0) { + error = ENOENT; + break; + } + + KASSERT(EVL_VLANOFTAG(hook_data) == vid, + ("%s: NGM_VLAN_DEL_VID_FLT:" + " Invalid VID Hook = %us, must be: %us\n", + __func__, (uint16_t )EVL_VLANOFTAG(hook_data), + vid)); + + /* Purge a rule that refers to this hook. */ + priv->vlan_hook[vid] = NULL; NG_HOOK_SET_PRIVATE(hook, NULL); - LIST_REMOVE(f, next); - priv->nent--; - free(f, M_NETGRAPH); break; case NGM_VLAN_GET_TABLE: + /* Calculate vlans. */ + vlan_count = 0; + for (i = 0; i < (EVL_VLID_MASK + 1); i ++) { + if (priv->vlan_hook[i] != NULL && + NG_HOOK_IS_VALID(priv->vlan_hook[i])) + vlan_count ++; + } + + /* Allocate memory for responce. */ NG_MKRESPONSE(resp, msg, sizeof(*t) + - priv->nent * sizeof(*t->filter), M_NOWAIT); + vlan_count * sizeof(*t->filter), M_NOWAIT); if (resp == NULL) { error = ENOMEM; break; } + + /* Pack data to responce. */ t = (struct ng_vlan_table *)resp->data; - t->n = priv->nent; + t->n = 0; vf = &t->filter[0]; - for (i = 0; i < HASHSIZE; i++) { - LIST_FOREACH(f, &priv->hashtable[i], next) { - vf->vlan = f->vlan; - strncpy(vf->hook, NG_HOOK_NAME(f->hook), - NG_HOOKSIZ); - vf++; - } + for (i = 0; i < (EVL_VLID_MASK + 1); i ++) { + hook = priv->vlan_hook[i]; + if (hook == NULL || NG_HOOK_NOT_VALID(hook)) + continue; + hook_data = (uintptr_t)NG_HOOK_PRIVATE(hook); + if (IS_HOOK_VLAN_SET(hook_data) == 0) + continue; + + KASSERT(EVL_VLANOFTAG(hook_data) == i, + ("%s: NGM_VLAN_GET_TABLE:" + " hook %s VID = %us, must be: %i\n", + __func__, NG_HOOK_NAME(hook), + (uint16_t)EVL_VLANOFTAG(hook_data), i)); + +#ifdef NG_VLAN_USE_OLD_VLAN_NAME + vf->vlan = i; +#endif + vf->vid = i; + vf->pcp = EVL_PRIOFTAG(hook_data); + vf->cfi = EVL_CFIOFTAG(hook_data); + strncpy(vf->hook_name, + NG_HOOK_NAME(hook), NG_HOOKSIZ); + vf ++; + t->n ++; + } + break; + case NGM_VLAN_GET_DECAP: + NG_MKRESPONSE(resp, msg, sizeof(uint32_t), M_NOWAIT); + if (resp == NULL) { + error = ENOMEM; + break; + } + (*((uint32_t *)resp->data)) = priv->decap_enable; + break; + case NGM_VLAN_SET_DECAP: + if (msg->header.arglen != sizeof(uint32_t)) { + error = EINVAL; + break; + } + priv->decap_enable = (*((uint32_t *)msg->data)); + break; + case NGM_VLAN_GET_ENCAP: + NG_MKRESPONSE(resp, msg, sizeof(uint32_t), M_NOWAIT); + if (resp == NULL) { + error = ENOMEM; + break; + } + (*((uint32_t *)resp->data)) = priv->encap_enable; + break; + case NGM_VLAN_SET_ENCAP: + if (msg->header.arglen != sizeof(uint32_t)) { + error = EINVAL; + break; } + priv->encap_enable = (*((uint32_t *)msg->data)); break; - default: /* Unknown command. */ + case NGM_VLAN_GET_ENCAP_PROTO: + NG_MKRESPONSE(resp, msg, sizeof(uint16_t), M_NOWAIT); + if (resp == NULL) { + error = ENOMEM; + break; + } + (*((uint16_t *)resp->data)) = ntohs(priv->encap_proto); + break; + case NGM_VLAN_SET_ENCAP_PROTO: + if (msg->header.arglen != sizeof(uint16_t)) { + error = EINVAL; + break; + } + priv->encap_proto = htons((*((uint16_t *)msg->data))); + break; + default: /* Unknown command. */ error = EINVAL; break; } @@ -300,8 +478,6 @@ ng_vlan_rcvmsg(node_p node, item_p item, case NGM_FLOW_COOKIE: { struct ng_mesg *copy; - struct filterhead *chain; - struct filter *f; /* * Flow control messages should come only @@ -312,20 +488,20 @@ ng_vlan_rcvmsg(node_p node, item_p item, break; if (lasthook != priv->downstream_hook) break; - /* Broadcast the event to all uplinks. */ - for (i = 0, chain = priv->hashtable; i < HASHSIZE; - i++, chain++) - LIST_FOREACH(f, chain, next) { + for (i = 0; i < (EVL_VLID_MASK + 1); i ++) { + if (priv->vlan_hook[i] == NULL) + continue; + NG_COPYMESSAGE(copy, msg, M_NOWAIT); if (copy == NULL) continue; - NG_SEND_MSG_HOOK(error, node, copy, f->hook, 0); + NG_SEND_MSG_HOOK(error, node, copy, + priv->vlan_hook[i], 0); } - break; } - default: /* Unknown type cookie. */ + default: /* Unknown type cookie. */ error = EINVAL; break; } @@ -339,93 +515,163 @@ ng_vlan_rcvdata(hook_p hook, item_p item { const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); struct ether_header *eh; - struct ether_vlan_header *evl = NULL; + struct ether_vlan_header *evl; int error; - u_int16_t vlan; + uintptr_t hook_data; + uint16_t vid, eth_vtag; struct mbuf *m; - struct filter *f; + hook_p dst_hook; + - /* Make sure we have an entire header. */ NGI_GET_M(item, m); - if (m->m_len < sizeof(*eh) && - (m = m_pullup(m, sizeof(*eh))) == NULL) { - NG_FREE_ITEM(item); - return (EINVAL); - } + + /* Make sure we have an entire header. */ + error = m_chk(&m, ETHER_HDR_LEN); + if (error != 0) + goto mchk_err; + eh = mtod(m, struct ether_header *); if (hook == priv->downstream_hook) { /* * If from downstream, select between a match hook * or the nomatch hook. */ - if (m->m_flags & M_VLANTAG || - eh->ether_type == htons(ETHERTYPE_VLAN)) { - if (m->m_flags & M_VLANTAG) { - /* - * Packet is tagged, m contains a normal - * Ethernet frame; tag is stored out-of-band. - */ - vlan = EVL_VLANOFTAG(m->m_pkthdr.ether_vtag); - } else { - if (m->m_len < sizeof(*evl) && - (m = m_pullup(m, sizeof(*evl))) == NULL) { - NG_FREE_ITEM(item); - return (EINVAL); - } - evl = mtod(m, struct ether_vlan_header *); - vlan = EVL_VLANOFTAG(ntohs(evl->evl_tag)); - } - if ((f = ng_vlan_findentry(priv, vlan)) != NULL) { - if (m->m_flags & M_VLANTAG) { - m->m_pkthdr.ether_vtag = 0; - m->m_flags &= ~M_VLANTAG; - } else { - evl->evl_encap_proto = evl->evl_proto; - bcopy(mtod(m, caddr_t), - mtod(m, caddr_t) + - ETHER_VLAN_ENCAP_LEN, - ETHER_HDR_LEN); - m_adj(m, ETHER_VLAN_ENCAP_LEN); - } - } - } else - f = NULL; - if (f != NULL) - NG_FWD_NEW_DATA(error, item, f->hook, m); - else - NG_FWD_NEW_DATA(error, item, priv->nomatch_hook, m); + + dst_hook = priv->nomatch_hook; + + /* Skip packets without tag. */ + if ((m->m_flags & M_VLANTAG) == 0 && + eh->ether_type != priv->encap_proto) { + if (dst_hook == NULL) + goto net_down; + goto send_packet; + } + + /* Process packets with tag. */ + if (m->m_flags & M_VLANTAG) { + /* + * Packet is tagged, m contains a normal + * Ethernet frame; tag is stored out-of-band. + */ + evl = NULL; + vid = EVL_VLANOFTAG(m->m_pkthdr.ether_vtag); + } else { /* eh->ether_type == priv->encap_proto */ + error = m_chk(&m, ETHER_VLAN_HDR_LEN); + if (error != 0) + goto mchk_err; + evl = mtod(m, struct ether_vlan_header *); + vid = EVL_VLANOFTAG(ntohs(evl->evl_tag)); + } + + if (priv->vlan_hook[vid] != NULL) { + /* + * VLAN filter: allways remove vlan tags and + * decapsulate packet. + */ + dst_hook = priv->vlan_hook[vid]; + if (evl == NULL) { /* m->m_flags & M_VLANTAG */ + m->m_pkthdr.ether_vtag = 0; + m->m_flags &= ~M_VLANTAG; + goto send_packet; + } + } else { /* nomatch_hook */ + if (dst_hook == NULL) + goto net_down; + if (evl == NULL || priv->decap_enable == 0) + goto send_packet; + /* Save tag out-of-band. */ + m->m_pkthdr.ether_vtag = ntohs(evl->evl_tag); + m->m_flags |= M_VLANTAG; + } + + /* + * Decapsulate: + * TPID = ether type encap + * Move DstMAC and SrcMAC to ETHER_TYPE. + * Before: + * [dmac] [smac] [TPID] [PCP/CFI/VID] [ether_type] [payload] + * |-----------| >>>>>>>>>>>>>>>>>>>> |--------------------| + * After: + * [free space ] [dmac] [smac] [ether_type] [payload] + * |-----------| |--------------------| + */ + bcopy((char *)evl, ((char *)evl + ETHER_VLAN_ENCAP_LEN), + (ETHER_ADDR_LEN * 2)); + m_adj(m, ETHER_VLAN_ENCAP_LEN); } else { /* * It is heading towards the downstream. * If from nomatch, pass it unmodified. * Otherwise, do the VLAN encapsulation. */ - if (hook != priv->nomatch_hook) { - if ((f = NG_HOOK_PRIVATE(hook)) == NULL) { - NG_FREE_ITEM(item); - NG_FREE_M(m); - return (EOPNOTSUPP); - } - M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_DONTWAIT); - /* M_PREPEND takes care of m_len and m_pkthdr.len. */ - if (m == NULL || (m->m_len < sizeof(*evl) && - (m = m_pullup(m, sizeof(*evl))) == NULL)) { - NG_FREE_ITEM(item); - return (ENOMEM); + dst_hook = priv->downstream_hook; + if (dst_hook == NULL) + goto net_down; + if (hook != priv->nomatch_hook) {/* Filter hook. */ + hook_data = (uintptr_t)NG_HOOK_PRIVATE(hook); + if (IS_HOOK_VLAN_SET(hook_data) == 0) { + /* + * Packet from hook not in filter + * call addfilter for this hook to fix. + */ + error = EOPNOTSUPP; + goto drop; } - /* - * Transform the Ethernet header into an Ethernet header - * with 802.1Q encapsulation. - */ - bcopy(mtod(m, char *) + ETHER_VLAN_ENCAP_LEN, - mtod(m, char *), ETHER_HDR_LEN); - evl = mtod(m, struct ether_vlan_header *); - evl->evl_proto = evl->evl_encap_proto; - evl->evl_encap_proto = htons(ETHERTYPE_VLAN); - evl->evl_tag = htons(f->vlan); + eth_vtag = (hook_data & VLAN_TAG_MASK); + if ((priv->encap_enable & VLAN_ENCAP_FROM_FILTER) == 0) { + /* Just set packet header tag and send. */ + m->m_flags |= M_VLANTAG; + m->m_pkthdr.ether_vtag = eth_vtag; + goto send_packet; + } + } else { /* nomatch_hook */ + if ((priv->encap_enable & VLAN_ENCAP_FROM_NOMATCH) == 0 || + (m->m_flags & M_VLANTAG) == 0) + goto send_packet; + /* Encapsulate tagged packet. */ + eth_vtag = m->m_pkthdr.ether_vtag; + m->m_pkthdr.ether_vtag = 0; + m->m_flags &= ~M_VLANTAG; } - NG_FWD_NEW_DATA(error, item, priv->downstream_hook, m); + + /* + * Transform the Ethernet header into an Ethernet header + * with 802.1Q encapsulation. + * Mod of: ether_vlanencap. + * + * TPID = ether type encap + * Move DstMAC and SrcMAC from ETHER_TYPE. + * Before: + * [free space ] [dmac] [smac] [ether_type] [payload] + * <<<<<<<<<<<<< |-----------| |--------------------| + * After: + * [dmac] [smac] [TPID] [PCP/CFI/VID] [ether_type] [payload] + * |-----------| |-- inserted tag --| |--------------------| + */ + M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_DONTWAIT); + if (m == NULL) + error = ENOMEM; + else + error = m_chk(&m, ETHER_VLAN_HDR_LEN); + if (error != 0) + goto mchk_err; + + evl = mtod(m, struct ether_vlan_header *); + bcopy(((char *)evl + ETHER_VLAN_ENCAP_LEN), + (char *)evl, (ETHER_ADDR_LEN * 2)); + evl->evl_encap_proto = priv->encap_proto; + evl->evl_tag = htons(eth_vtag); } + +send_packet: + NG_FWD_NEW_DATA(error, item, dst_hook, m); + return (error); +net_down: + error = ENETDOWN; +drop: + m_freem(m); +mchk_err: + NG_FREE_ITEM(item); return (error); } @@ -444,7 +690,7 @@ static int ng_vlan_disconnect(hook_p hook) { const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); - struct filter *f; + uintptr_t hook_data; if (hook == priv->downstream_hook) priv->downstream_hook = NULL; @@ -452,11 +698,9 @@ ng_vlan_disconnect(hook_p hook) priv->nomatch_hook = NULL; else { /* Purge a rule that refers to this hook. */ - if ((f = NG_HOOK_PRIVATE(hook)) != NULL) { - LIST_REMOVE(f, next); - priv->nent--; - free(f, M_NETGRAPH); - } + hook_data = (uintptr_t)NG_HOOK_PRIVATE(hook); + if (IS_HOOK_VLAN_SET(hook_data)) + priv->vlan_hook[EVL_VLANOFTAG(hook_data)] = NULL; } NG_HOOK_SET_PRIVATE(hook, NULL); if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) && Modified: head/sys/netgraph/ng_vlan.h ============================================================================== --- head/sys/netgraph/ng_vlan.h Sun Mar 11 17:35:12 2012 (r232824) +++ head/sys/netgraph/ng_vlan.h Sun Mar 11 19:08:56 2012 (r232825) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2003 IPNET Internet Communication Company + * Copyright (c) 2011 - 2012 Rozhuk Ivan * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +32,9 @@ #ifndef _NETGRAPH_NG_VLAN_H_ #define _NETGRAPH_NG_VLAN_H_ +/* Using "vlan" in addfilter and gettable messages. 2012.01 */ +#define NG_VLAN_USE_OLD_VLAN_NAME 1 + /* Node type name and magic cookie. */ #define NG_VLAN_NODE_TYPE "vlan" #define NGM_VLAN_COOKIE 1068486472 @@ -43,21 +47,50 @@ enum { NGM_VLAN_ADD_FILTER = 1, NGM_VLAN_DEL_FILTER, - NGM_VLAN_GET_TABLE + NGM_VLAN_GET_TABLE, + NGM_VLAN_DEL_VID_FLT, + NGM_VLAN_GET_DECAP, + NGM_VLAN_SET_DECAP, + NGM_VLAN_GET_ENCAP, + NGM_VLAN_SET_ENCAP, + NGM_VLAN_GET_ENCAP_PROTO, + NGM_VLAN_SET_ENCAP_PROTO, }; +#define VLAN_ENCAP_FROM_FILTER 0x00000001 +#define VLAN_ENCAP_FROM_NOMATCH 0x00000002 + /* For NGM_VLAN_ADD_FILTER control message. */ struct ng_vlan_filter { - char hook[NG_HOOKSIZ]; - u_int16_t vlan; -}; + char hook_name[NG_HOOKSIZ]; +#ifdef NG_VLAN_USE_OLD_VLAN_NAME + uint16_t vlan; /* VLAN - same as vid, oldname, deprecated. */ +#endif + uint16_t vid; /* VID - VLAN Identifier. */ + uint8_t pcp; /* PCP - Priority Code Point. */ + uint8_t cfi; /* CFI - Canonical Format Indicator. */ +}; /* Keep this in sync with the above structure definition. */ +#ifdef NG_VLAN_USE_OLD_VLAN_NAME #define NG_VLAN_FILTER_FIELDS { \ - { "hook", &ng_parse_hookbuf_type }, \ - { "vlan", &ng_parse_uint16_type }, \ + { "hook", &ng_parse_hookbuf_type }, \ + { "vlan", &ng_parse_uint16_type }, \ + { "vid", &ng_parse_uint16_type }, \ + { "pcp", &ng_parse_uint8_type }, \ + { "cfi", &ng_parse_uint8_type }, \ { NULL } \ } +#else +#define NG_VLAN_FILTER_FIELDS { \ + { "hook", &ng_parse_hookbuf_type }, \ + { "vid", &ng_parse_uint16_type }, \ + { "pcp", &ng_parse_uint8_type }, \ + { "cfi", &ng_parse_uint8_type }, \ + { NULL } \ +} +#endif + /* Structure returned by NGM_VLAN_GET_TABLE. */ struct ng_vlan_table { From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 19:23:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F7131065678; Sun, 11 Mar 2012 19:23:38 +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 EE9698FC1F; Sun, 11 Mar 2012 19:23:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BJNbta023379; Sun, 11 Mar 2012 19:23:37 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BJNbLs023377; Sun, 11 Mar 2012 19:23:37 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201203111923.q2BJNbLs023377@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 11 Mar 2012 19:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232826 - stable/9/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 19:23:38 -0000 Author: gavin Date: Sun Mar 11 19:23:37 2012 New Revision: 232826 URL: http://svn.freebsd.org/changeset/base/232826 Log: Merge r226862 from head: Remove example for linking /dev/vga to /dev/ttyv0, this hasn't been required since X version 4.3.0. PR: conf/161847 Submitted by: eadler Modified: stable/9/etc/devfs.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/devfs.conf ============================================================================== --- stable/9/etc/devfs.conf Sun Mar 11 19:08:56 2012 (r232825) +++ stable/9/etc/devfs.conf Sun Mar 11 19:23:37 2012 (r232826) @@ -31,9 +31,6 @@ # # Examples: -# Historically X depended on this, but version 4.3.0 doesn't seem to anymore -#link ttyv0 vga - # Commonly used by many ports #link cd0 cdrom #link cd0 dvd From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 19:23:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A38D1065677; Sun, 11 Mar 2012 19:23:43 +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 E79908FC20; Sun, 11 Mar 2012 19:23:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BJNgRf023418; Sun, 11 Mar 2012 19:23:42 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BJNg0Q023416; Sun, 11 Mar 2012 19:23:42 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201203111923.q2BJNg0Q023416@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 11 Mar 2012 19:23:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232827 - stable/8/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 19:23:43 -0000 Author: gavin Date: Sun Mar 11 19:23:42 2012 New Revision: 232827 URL: http://svn.freebsd.org/changeset/base/232827 Log: Merge r226862 from head: Remove example for linking /dev/vga to /dev/ttyv0, this hasn't been required since X version 4.3.0. PR: conf/161847 Submitted by: eadler Modified: stable/8/etc/devfs.conf Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/devfs.conf ============================================================================== --- stable/8/etc/devfs.conf Sun Mar 11 19:23:37 2012 (r232826) +++ stable/8/etc/devfs.conf Sun Mar 11 19:23:42 2012 (r232827) @@ -31,9 +31,6 @@ # # Examples: -# Historically X depended on this, but version 4.3.0 doesn't seem to anymore -#link ttyv0 vga - # Commonly used by many ports #link acd0 cdrom From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 19:38:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B268D106566C; Sun, 11 Mar 2012 19:38: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 841158FC0C; Sun, 11 Mar 2012 19:38:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BJcoje023915; Sun, 11 Mar 2012 19:38:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BJcouo023913; Sun, 11 Mar 2012 19:38:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203111938.q2BJcouo023913@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 19:38: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: r232828 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 19:38:50 -0000 Author: kib Date: Sun Mar 11 19:38:49 2012 New Revision: 232828 URL: http://svn.freebsd.org/changeset/base/232828 Log: ELF image can have several PT_NOTE program headers. Look for the ELF brand note in each header, instead of using only first one. Reviewed by: kan Tested by: andrew (arm), flo (sparc64) MFC after: 3 weeks Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sun Mar 11 19:23:42 2012 (r232827) +++ head/sys/kern/imgact_elf.c Sun Mar 11 19:38:49 2012 (r232828) @@ -1549,32 +1549,14 @@ __elfN(putnote)(void *dst, size_t *off, *off += roundup2(note.n_descsz, sizeof(Elf_Size)); } -/* - * Try to find the appropriate ABI-note section for checknote, - * fetch the osreldate for binary from the ELF OSABI-note. Only the - * first page of the image is searched, the same as for headers. - */ static boolean_t -__elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote, - int32_t *osrel) +__elfN(parse_notes)(struct image_params *imgp, Elf_Brandnote *checknote, + int32_t *osrel, const Elf_Phdr *pnote) { const Elf_Note *note, *note0, *note_end; - const Elf_Phdr *phdr, *pnote; - const Elf_Ehdr *hdr; const char *note_name; int i; - pnote = NULL; - hdr = (const Elf_Ehdr *)imgp->image_header; - phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); - - for (i = 0; i < hdr->e_phnum; i++) { - if (phdr[i].p_type == PT_NOTE) { - pnote = &phdr[i]; - break; - } - } - if (pnote == NULL || pnote->p_offset >= PAGE_SIZE || pnote->p_offset + pnote->p_filesz >= PAGE_SIZE) return (FALSE); @@ -1613,6 +1595,31 @@ nextnote: } /* + * Try to find the appropriate ABI-note section for checknote, + * fetch the osreldate for binary from the ELF OSABI-note. Only the + * first page of the image is searched, the same as for headers. + */ +static boolean_t +__elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote, + int32_t *osrel) +{ + const Elf_Phdr *phdr; + const Elf_Ehdr *hdr; + int i; + + hdr = (const Elf_Ehdr *)imgp->image_header; + phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); + + for (i = 0; i < hdr->e_phnum; i++) { + if (phdr[i].p_type == PT_NOTE && + __elfN(parse_notes)(imgp, checknote, osrel, &phdr[i])) + return (TRUE); + } + return (FALSE); + +} + +/* * Tell kern_execve.c about it, with a little help from the linker. */ static struct execsw __elfN(execsw) = { From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 19:56:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30BB2106564A; Sun, 11 Mar 2012 19:56: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 01E2E8FC18; Sun, 11 Mar 2012 19:56:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BJuwt6024556; Sun, 11 Mar 2012 19:56:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BJuw4x024555; Sun, 11 Mar 2012 19:56:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203111956.q2BJuw4x024555@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 19:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232830 - head/lib/csu/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 19:56:59 -0000 Author: kib Date: Sun Mar 11 19:56:58 2012 New Revision: 232830 URL: http://svn.freebsd.org/changeset/base/232830 Log: Add a header with definitions useful for constructing ELF notes. Reviewed by: kan MFC after: 3 weeks Added: head/lib/csu/common/notes.h (contents, props changed) Added: head/lib/csu/common/notes.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/csu/common/notes.h Sun Mar 11 19:56:58 2012 (r232830) @@ -0,0 +1,38 @@ +/*- + * Copyright 2012 Konstantin Belousov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef CSU_COMMON_NOTES_H +#define CSU_COMMON_NOTES_H + +#define NOTE_FREEBSD_VENDOR "FreeBSD" + +#define NOTE_SECTION ".note.tag" + +#define ABI_NOTETYPE 1 +#define CRT_NOINIT_NOTETYPE 2 + +#endif From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 20:03:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC7901065672; Sun, 11 Mar 2012 20:03:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95C6A8FC08; Sun, 11 Mar 2012 20:03:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BK3AKs024866; Sun, 11 Mar 2012 20:03:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BK3Ao8024852; Sun, 11 Mar 2012 20:03:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203112003.q2BK3Ao8024852@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 20:03: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: r232831 - in head/libexec/rtld-elf: . amd64 arm i386 ia64 mips powerpc powerpc64 sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 20:03:10 -0000 Author: kib Date: Sun Mar 11 20:03:09 2012 New Revision: 232831 URL: http://svn.freebsd.org/changeset/base/232831 Log: Add support for preinit, init and fini arrays. Some ABIs, in particular on ARM, do require working init arrays. Traditional FreeBSD crt1 calls _init and _fini of the binary, instead of allowing runtime linker to arrange the calls. This was probably done to have the same crt code serve both statically and dynamically linked binaries. Since ABI mandates that first is called preinit array functions, then init, and then init array functions, the init have to be called from rtld now. To provide binary compatibility to old FreeBSD crt1, which calls _init itself, rtld only calls intializers and finalizers for main binary if binary has a note indicating that new crt was used for linking. Add parsing of ELF notes to rtld, and cache p_osrel value since we parsed it anyway. The patch is inspired by init_array support for DragonflyBSD, written by John Marino. Reviewed by: kan Tested by: andrew (arm, previous version), flo (sparc64, previous version) MFC after: 3 weeks Modified: head/libexec/rtld-elf/Makefile head/libexec/rtld-elf/amd64/rtld_machdep.h head/libexec/rtld-elf/arm/rtld_machdep.h head/libexec/rtld-elf/i386/rtld_machdep.h head/libexec/rtld-elf/ia64/reloc.c head/libexec/rtld-elf/ia64/rtld_machdep.h head/libexec/rtld-elf/map_object.c head/libexec/rtld-elf/mips/rtld_machdep.h head/libexec/rtld-elf/powerpc/rtld_machdep.h head/libexec/rtld-elf/powerpc64/rtld_machdep.h head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h head/libexec/rtld-elf/sparc64/rtld_machdep.h Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/Makefile Sun Mar 11 20:03:09 2012 (r232831) @@ -10,6 +10,7 @@ SRCS= rtld_start.S \ MAN= rtld.1 CSTD?= gnu99 CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD +CFLAGS+= -I${.CURDIR}/../../lib/csu/common .if exists(${.CURDIR}/${MACHINE_ARCH}) RTLD_ARCH= ${MACHINE_ARCH} .else Modified: head/libexec/rtld-elf/amd64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/amd64/rtld_machdep.h Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/amd64/rtld_machdep.h Sun Mar 11 20:03:09 2012 (r232831) @@ -58,6 +58,9 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr #define call_initfini_pointer(obj, target) \ (((InitFunc)(target))()) +#define call_init_pointer(obj, target) \ + (((InitArrFunc)(target))(main_argc, main_argv, environ)) + #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) #define calculate_first_tls_offset(size, align) \ Modified: head/libexec/rtld-elf/arm/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/arm/rtld_machdep.h Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/arm/rtld_machdep.h Sun Mar 11 20:03:09 2012 (r232831) @@ -48,6 +48,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, #define call_initfini_pointer(obj, target) \ (((InitFunc)(target))()) +#define call_init_pointer(obj, target) \ + (((InitArrFunc)(target))(main_argc, main_argv, environ)) + #define TLS_TCB_SIZE 8 typedef struct { unsigned long ti_module; Modified: head/libexec/rtld-elf/i386/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/i386/rtld_machdep.h Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/i386/rtld_machdep.h Sun Mar 11 20:03:09 2012 (r232831) @@ -58,6 +58,9 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr #define call_initfini_pointer(obj, target) \ (((InitFunc)(target))()) +#define call_init_pointer(obj, target) \ + (((InitArrFunc)(target))(main_argc, main_argv, environ)) + #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) #define calculate_first_tls_offset(size, align) \ Modified: head/libexec/rtld-elf/ia64/reloc.c ============================================================================== --- head/libexec/rtld-elf/ia64/reloc.c Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/ia64/reloc.c Sun Mar 11 20:03:09 2012 (r232831) @@ -586,6 +586,18 @@ call_initfini_pointer(const Obj_Entry *o ((InitFunc) &fptr)(); } +void +call_init_pointer(const Obj_Entry *obj, Elf_Addr target) +{ + struct fptr fptr; + + fptr.gp = (Elf_Addr) obj->pltgot; + fptr.target = target; + dbg(" initfini: target=%p, gp=%p", + (void *) fptr.target, (void *) fptr.gp); + ((InitArrFunc) &fptr)(main_argc, main_argv, environ); +} + /* Initialize the special PLT entries. */ void init_pltgot(Obj_Entry *obj) Modified: head/libexec/rtld-elf/ia64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/ia64/rtld_machdep.h Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/ia64/rtld_machdep.h Sun Mar 11 20:03:09 2012 (r232831) @@ -52,6 +52,7 @@ Elf_Addr reloc_jmpslot(Elf_Addr *, Elf_A const struct Struct_Obj_Entry *, const Elf_Rel *); void *make_function_pointer(const Elf_Sym *, const struct Struct_Obj_Entry *); void call_initfini_pointer(const struct Struct_Obj_Entry *, Elf_Addr); +void call_init_pointer(const struct Struct_Obj_Entry *, Elf_Addr); #define TLS_TCB_SIZE 16 Modified: head/libexec/rtld-elf/map_object.c ============================================================================== --- head/libexec/rtld-elf/map_object.c Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/map_object.c Sun Mar 11 20:03:09 2012 (r232831) @@ -86,6 +86,8 @@ map_object(int fd, const char *path, con Elf_Word stack_flags; Elf_Addr relro_page; size_t relro_size; + Elf_Addr note_start; + Elf_Addr note_end; hdr = get_elf_header(fd, path); if (hdr == NULL) @@ -104,6 +106,8 @@ map_object(int fd, const char *path, con phdr_vaddr = 0; relro_page = 0; relro_size = 0; + note_start = 0; + note_end = 0; segs = alloca(sizeof(segs[0]) * hdr->e_phnum); stack_flags = RTLD_DEFAULT_STACK_PF_EXEC | PF_R | PF_W; while (phdr < phlimit) { @@ -143,6 +147,12 @@ map_object(int fd, const char *path, con relro_page = phdr->p_vaddr; relro_size = phdr->p_memsz; break; + + case PT_NOTE: + note_start = (Elf_Addr)obj->relocbase + phdr->p_offset; + note_end = note_start + phdr->p_filesz; + digest_notes(obj, note_start, note_end); + break; } ++phdr; Modified: head/libexec/rtld-elf/mips/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/mips/rtld_machdep.h Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/mips/rtld_machdep.h Sun Mar 11 20:03:09 2012 (r232831) @@ -49,6 +49,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, #define call_initfini_pointer(obj, target) \ (((InitFunc)(target))()) +#define call_init_pointer(obj, target) \ + (((InitArrFunc)(target))(main_argc, main_argv, environ)) + typedef struct { unsigned long ti_module; unsigned long ti_offset; Modified: head/libexec/rtld-elf/powerpc/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/powerpc/rtld_machdep.h Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/powerpc/rtld_machdep.h Sun Mar 11 20:03:09 2012 (r232831) @@ -48,6 +48,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, #define call_initfini_pointer(obj, target) \ (((InitFunc)(target))()) +#define call_init_pointer(obj, target) \ + (((InitArrFunc)(target))(main_argc, main_argv, environ)) + /* * Lazy binding entry point, called via PLT. */ Modified: head/libexec/rtld-elf/powerpc64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/powerpc64/rtld_machdep.h Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/powerpc64/rtld_machdep.h Sun Mar 11 20:03:09 2012 (r232831) @@ -48,6 +48,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, #define call_initfini_pointer(obj, target) \ (((InitFunc)(target))()) +#define call_init_pointer(obj, target) \ + (((InitArrFunc)(target))(main_argc, main_argv, environ)) + /* * Lazy binding entry point, called via PLT. */ Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/rtld.c Sun Mar 11 20:03:09 2012 (r232831) @@ -61,6 +61,7 @@ #include "libmap.h" #include "rtld_tls.h" #include "rtld_printf.h" +#include "notes.h" #ifndef COMPAT_32BIT #define PATH_RTLD "/libexec/ld-elf.so.1" @@ -139,6 +140,7 @@ static void ref_dag(Obj_Entry *); static int origin_subst_one(char **, const char *, const char *, const char *, char *); static char *origin_subst(const char *, const char *); +static void preinit_main(void); static int rtld_verify_versions(const Objlist *); static int rtld_verify_object_versions(Obj_Entry *); static void object_add_name(Obj_Entry *, const char *); @@ -205,6 +207,12 @@ char *__progname; char **environ; /* + * Used to pass argc, argv to init functions. + */ +int main_argc; +char **main_argv; + +/* * Globals to control TLS allocation. */ size_t tls_last_offset; /* Static TLS offset of last module */ @@ -335,6 +343,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ __progname = obj_rtld.path; argv0 = argv[0] != NULL ? argv[0] : "(null)"; environ = env; + main_argc = argc; + main_argv = argv; trust = !issetugid(); @@ -458,8 +468,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ obj_tail = &obj_main->next; obj_count++; obj_loads++; - /* Make sure we don't call the main program's init and fini functions. */ - obj_main->init = obj_main->fini = (Elf_Addr)NULL; /* Initialize a fake symbol for resolving undefined weak references. */ sym_zero.st_info = ELF_ST_INFO(STB_GLOBAL, STT_NOTYPE); @@ -551,7 +559,20 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ ld_bind_now != NULL && *ld_bind_now != '\0', NULL) == -1) die(); + if (!obj_main->crt_no_init) { + /* + * Make sure we don't call the main program's init and fini + * functions for binaries linked with old crt1 which calls + * _init itself. + */ + obj_main->init = obj_main->fini = (Elf_Addr)NULL; + obj_main->preinit_array = obj_main->init_array = + obj_main->fini_array = (Elf_Addr)NULL; + } + wlock_acquire(rtld_bind_lock, &lockstate); + if (obj_main->crt_no_init) + preinit_main(); objlist_call_init(&initlist, &lockstate); objlist_clear(&initlist); dbg("loading filtees"); @@ -936,10 +957,34 @@ digest_dynamic1(Obj_Entry *obj, int earl obj->init = (Elf_Addr) (obj->relocbase + dynp->d_un.d_ptr); break; + case DT_PREINIT_ARRAY: + obj->preinit_array = (Elf_Addr)(obj->relocbase + dynp->d_un.d_ptr); + break; + + case DT_PREINIT_ARRAYSZ: + obj->preinit_array_num = dynp->d_un.d_val / sizeof(Elf_Addr); + break; + + case DT_INIT_ARRAY: + obj->init_array = (Elf_Addr)(obj->relocbase + dynp->d_un.d_ptr); + break; + + case DT_INIT_ARRAYSZ: + obj->init_array_num = dynp->d_un.d_val / sizeof(Elf_Addr); + break; + case DT_FINI: obj->fini = (Elf_Addr) (obj->relocbase + dynp->d_un.d_ptr); break; + case DT_FINI_ARRAY: + obj->fini_array = (Elf_Addr)(obj->relocbase + dynp->d_un.d_ptr); + break; + + case DT_FINI_ARRAYSZ: + obj->fini_array_num = dynp->d_un.d_val / sizeof(Elf_Addr); + break; + /* * Don't process DT_DEBUG on MIPS as the dynamic section * is mapped read-only. DT_MIPS_RLD_MAP is used instead. @@ -1065,6 +1110,7 @@ digest_phdr(const Elf_Phdr *phdr, int ph Obj_Entry *obj; const Elf_Phdr *phlimit = phdr + phnum; const Elf_Phdr *ph; + Elf_Addr note_start, note_end; int nsegs = 0; obj = obj_new(); @@ -1120,6 +1166,12 @@ digest_phdr(const Elf_Phdr *phdr, int ph obj->relro_page = obj->relocbase + trunc_page(ph->p_vaddr); obj->relro_size = round_page(ph->p_memsz); break; + + case PT_NOTE: + note_start = (Elf_Addr)obj->relocbase + ph->p_vaddr; + note_end = note_start + ph->p_filesz; + digest_notes(obj, note_start, note_end); + break; } } if (nsegs < 1) { @@ -1131,6 +1183,44 @@ digest_phdr(const Elf_Phdr *phdr, int ph return obj; } +void +digest_notes(Obj_Entry *obj, Elf_Addr note_start, Elf_Addr note_end) +{ + const Elf_Note *note; + const char *note_name; + uintptr_t p; + + for (note = (const Elf_Note *)note_start; (Elf_Addr)note < note_end; + note = (const Elf_Note *)((const char *)(note + 1) + + roundup2(note->n_namesz, sizeof(Elf32_Addr)) + + roundup2(note->n_descsz, sizeof(Elf32_Addr)))) { + if (note->n_namesz != sizeof(NOTE_FREEBSD_VENDOR) || + note->n_descsz != sizeof(int32_t)) + continue; + if (note->n_type != ABI_NOTETYPE && + note->n_type != CRT_NOINIT_NOTETYPE) + continue; + note_name = (const char *)(note + 1); + if (strncmp(NOTE_FREEBSD_VENDOR, note_name, + sizeof(NOTE_FREEBSD_VENDOR)) != 0) + continue; + switch (note->n_type) { + case ABI_NOTETYPE: + /* FreeBSD osrel note */ + p = (uintptr_t)(note + 1); + p += roundup2(note->n_namesz, sizeof(Elf32_Addr)); + obj->osrel = *(const int32_t *)(p); + dbg("note osrel %d", obj->osrel); + break; + case CRT_NOINIT_NOTETYPE: + /* FreeBSD 'crt does not call init' note */ + obj->crt_no_init = true; + dbg("note crt_no_init"); + break; + } + } +} + static Obj_Entry * dlcheck(void *handle) { @@ -1504,11 +1594,13 @@ initlist_add_objects(Obj_Entry *obj, Obj initlist_add_neededs(obj->needed, list); /* Add the object to the init list. */ - if (obj->init != (Elf_Addr)NULL) + if (obj->preinit_array != (Elf_Addr)NULL || obj->init != (Elf_Addr)NULL || + obj->init_array != (Elf_Addr)NULL) objlist_push_tail(list, obj); /* Add the object to the global fini list in the reverse order. */ - if (obj->fini != (Elf_Addr)NULL && !obj->on_fini_list) { + if ((obj->fini != (Elf_Addr)NULL || obj->fini_array != (Elf_Addr)NULL) + && !obj->on_fini_list) { objlist_push_head(&list_fini, obj); obj->on_fini_list = true; } @@ -1796,6 +1888,27 @@ obj_from_addr(const void *addr) return NULL; } +static void +preinit_main(void) +{ + Elf_Addr *preinit_addr; + int index; + + preinit_addr = (Elf_Addr *)obj_main->preinit_array; + if (preinit_addr == (Elf_Addr)NULL) + return; + + for (index = 0; index < obj_main->preinit_array_num; index++) { + if (preinit_addr[index] != 0 && preinit_addr[index] != 1) { + dbg("calling preinit function for %s at %p", obj_main->path, + (void *)preinit_addr[index]); + LD_UTRACE(UTRACE_INIT_CALL, obj_main, (void *)preinit_addr[index], + 0, 0, obj_main->path); + call_init_pointer(obj_main, preinit_addr[index]); + } + } +} + /* * Call the finalization functions for each of the objects in "list" * belonging to the DAG of "root" and referenced once. If NULL "root" @@ -1808,6 +1921,8 @@ objlist_call_fini(Objlist *list, Obj_Ent { Objlist_Entry *elm; char *saved_msg; + Elf_Addr *fini_addr; + int index; assert(root == NULL || root->refcount == 1); @@ -1821,10 +1936,6 @@ objlist_call_fini(Objlist *list, Obj_Ent if (root != NULL && (elm->obj->refcount != 1 || objlist_find(&root->dagmembers, elm->obj) == NULL)) continue; - dbg("calling fini function for %s at %p", elm->obj->path, - (void *)elm->obj->fini); - LD_UTRACE(UTRACE_FINI_CALL, elm->obj, (void *)elm->obj->fini, 0, 0, - elm->obj->path); /* Remove object from fini list to prevent recursive invocation. */ STAILQ_REMOVE(list, elm, Struct_Objlist_Entry, link); /* @@ -1835,7 +1946,31 @@ objlist_call_fini(Objlist *list, Obj_Ent * called. */ lock_release(rtld_bind_lock, lockstate); - call_initfini_pointer(elm->obj, elm->obj->fini); + + /* + * It is legal to have both DT_FINI and DT_FINI_ARRAY defined. + * When this happens, DT_FINI_ARRAY is processed first. + */ + fini_addr = (Elf_Addr *)elm->obj->fini_array; + if (fini_addr != NULL && elm->obj->fini_array_num > 0) { + for (index = elm->obj->fini_array_num - 1; index >= 0; + index--) { + if (fini_addr[index] != 0 && fini_addr[index] != 1) { + dbg("calling fini function for %s at %p", + elm->obj->path, (void *)fini_addr[index]); + LD_UTRACE(UTRACE_FINI_CALL, elm->obj, + (void *)fini_addr[index], 0, 0, elm->obj->path); + call_initfini_pointer(elm->obj, fini_addr[index]); + } + } + } + if (elm->obj->fini != (Elf_Addr)NULL) { + dbg("calling fini function for %s at %p", elm->obj->path, + (void *)elm->obj->fini); + LD_UTRACE(UTRACE_FINI_CALL, elm->obj, (void *)elm->obj->fini, + 0, 0, elm->obj->path); + call_initfini_pointer(elm->obj, elm->obj->fini); + } wlock_acquire(rtld_bind_lock, lockstate); /* No need to free anything if process is going down. */ if (root != NULL) @@ -1862,6 +1997,8 @@ objlist_call_init(Objlist *list, RtldLoc Objlist_Entry *elm; Obj_Entry *obj; char *saved_msg; + Elf_Addr *init_addr; + int index; /* * Clean init_scanned flag so that objects can be rechecked and @@ -1879,10 +2016,6 @@ objlist_call_init(Objlist *list, RtldLoc STAILQ_FOREACH(elm, list, link) { if (elm->obj->init_done) /* Initialized early. */ continue; - dbg("calling init function for %s at %p", elm->obj->path, - (void *)elm->obj->init); - LD_UTRACE(UTRACE_INIT_CALL, elm->obj, (void *)elm->obj->init, 0, 0, - elm->obj->path); /* * Race: other thread might try to use this object before current * one completes the initilization. Not much can be done here @@ -1890,7 +2023,30 @@ objlist_call_init(Objlist *list, RtldLoc */ elm->obj->init_done = true; lock_release(rtld_bind_lock, lockstate); - call_initfini_pointer(elm->obj, elm->obj->init); + + /* + * It is legal to have both DT_INIT and DT_INIT_ARRAY defined. + * When this happens, DT_INIT is processed first. + */ + if (elm->obj->init != (Elf_Addr)NULL) { + dbg("calling init function for %s at %p", elm->obj->path, + (void *)elm->obj->init); + LD_UTRACE(UTRACE_INIT_CALL, elm->obj, (void *)elm->obj->init, + 0, 0, elm->obj->path); + call_initfini_pointer(elm->obj, elm->obj->init); + } + init_addr = (Elf_Addr *)elm->obj->init_array; + if (init_addr != (Elf_Addr)NULL) { + for (index = 0; index < elm->obj->init_array_num; index++) { + if (init_addr[index] != 0 && init_addr[index] != 1) { + dbg("calling init function for %s at %p", elm->obj->path, + (void *)init_addr[index]); + LD_UTRACE(UTRACE_INIT_CALL, elm->obj, + (void *)init_addr[index], 0, 0, elm->obj->path); + call_init_pointer(elm->obj, init_addr[index]); + } + } + } wlock_acquire(rtld_bind_lock, lockstate); } errmsg_restore(saved_msg); Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/rtld.h Sun Mar 11 20:03:09 2012 (r232831) @@ -71,6 +71,10 @@ extern size_t tls_static_space; extern int tls_dtv_generation; extern int tls_max_index; +extern int main_argc; +extern char **main_argv; +extern char **environ; + struct stat; struct Struct_Obj_Entry; @@ -84,6 +88,7 @@ typedef STAILQ_HEAD(Struct_Objlist, Stru /* Types of init and fini functions */ typedef void (*InitFunc)(void); +typedef void (*InitArrFunc)(int, char **, char **); /* Lists of shared object dependencies */ typedef struct Struct_Needed_Entry { @@ -213,6 +218,14 @@ typedef struct Struct_Obj_Entry { Elf_Addr init; /* Initialization function to call */ Elf_Addr fini; /* Termination function to call */ + Elf_Addr preinit_array; /* Pre-initialization array of functions */ + Elf_Addr init_array; /* Initialization array of functions */ + Elf_Addr fini_array; /* Termination array of functions */ + int preinit_array_num; /* Number of entries in preinit_array */ + int init_array_num; /* Number of entries in init_array */ + int fini_array_num; /* Number of entries in fini_array */ + + int32_t osrel; /* OSREL note value */ bool mainprog : 1; /* True if this is the main program */ bool rtld : 1; /* True if this is the dynamic linker */ @@ -235,6 +248,7 @@ typedef struct Struct_Obj_Entry { bool filtees_loaded : 1; /* Filtees loaded */ bool irelative : 1; /* Object has R_MACHDEP_IRELATIVE relocs */ bool gnu_ifunc : 1; /* Object has references to STT_GNU_IFUNC */ + bool crt_no_init : 1; /* Object' crt does not call _init/_fini */ struct link_map linkmap; /* For GDB and dlinfo() */ Objlist dldags; /* Object belongs to these dlopened DAGs (%) */ @@ -319,6 +333,7 @@ const Elf_Sym *find_symdef(unsigned long const Obj_Entry **, int, SymCache *, struct Struct_RtldLockState *); void init_pltgot(Obj_Entry *); void lockdflt_init(void); +void digest_notes(Obj_Entry *, Elf_Addr, Elf_Addr); void obj_free(Obj_Entry *); Obj_Entry *obj_new(void); void _rtld_bind_start(void); Modified: head/libexec/rtld-elf/sparc64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/sparc64/rtld_machdep.h Sun Mar 11 19:56:58 2012 (r232830) +++ head/libexec/rtld-elf/sparc64/rtld_machdep.h Sun Mar 11 20:03:09 2012 (r232831) @@ -50,6 +50,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *, Elf_A #define call_initfini_pointer(obj, target) \ (((InitFunc)(target))()) +#define call_init_pointer(obj, target) \ + (((InitArrFunc)(target))(main_argc, main_argv, environ)) + #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) #define calculate_first_tls_offset(size, align) \ From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 20:04:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 753601065693; Sun, 11 Mar 2012 20:04:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C66C8FC08; Sun, 11 Mar 2012 20:04:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BK4ASl024946; Sun, 11 Mar 2012 20:04:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BK4ACL024929; Sun, 11 Mar 2012 20:04:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203112004.q2BK4ACL024929@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 20:04: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: r232832 - in head/lib/csu: . amd64 arm common i386-elf mips powerpc powerpc64 sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 20:04:10 -0000 Author: kib Date: Sun Mar 11 20:04:09 2012 New Revision: 232832 URL: http://svn.freebsd.org/changeset/base/232832 Log: Stop calling _init/_fini methods from crt1 for dynamic binaries. Do call preinit, init and fini arrays methods from crt1 for static binaries. Mark new crt1 with FreeBSD-specific ELF note. Move some common crt1 code into new MI file ignore_init.c, to reduce duplication. Also, conservatively adjust nearby sources for style. Reviewed by: kan Tested by: andrew (arm), flo (sparc64) MFC after: 3 weeks Added: head/lib/csu/common/ignore_init.c (contents, props changed) Modified: head/lib/csu/Makefile.inc head/lib/csu/amd64/Makefile head/lib/csu/amd64/crt1.c head/lib/csu/arm/Makefile head/lib/csu/arm/crt1.c head/lib/csu/common/crtbrand.c head/lib/csu/i386-elf/Makefile head/lib/csu/i386-elf/crt1_c.c head/lib/csu/mips/Makefile head/lib/csu/mips/crt1.c head/lib/csu/powerpc/Makefile head/lib/csu/powerpc/crt1.c head/lib/csu/powerpc64/Makefile head/lib/csu/powerpc64/crt1.c head/lib/csu/sparc64/crt1.c Modified: head/lib/csu/Makefile.inc ============================================================================== --- head/lib/csu/Makefile.inc Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/Makefile.inc Sun Mar 11 20:04:09 2012 (r232832) @@ -2,4 +2,6 @@ SSP_CFLAGS= +SED_FIX_NOTE = -i "" -e '/\.note\.tag/s/progbits/note/' + .include "../Makefile.inc" Modified: head/lib/csu/amd64/Makefile ============================================================================== --- head/lib/csu/amd64/Makefile Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/amd64/Makefile Sun Mar 11 20:04:09 2012 (r232832) @@ -19,21 +19,21 @@ CLEANFILES+= crt1.s gcrt1.s Scrt1.s crt1.s: crt1.c ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} crt1.o: crt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} gcrt1.o: gcrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} Scrt1.o: Scrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s Modified: head/lib/csu/amd64/crt1.c ============================================================================== --- head/lib/csu/amd64/crt1.c Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/amd64/crt1.c Sun Mar 11 20:04:09 2012 (r232832) @@ -37,16 +37,10 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "crtbrand.c" - -extern int _DYNAMIC; -#pragma weak _DYNAMIC +#include "ignore_init.c" typedef void (*fptr)(void); -extern void _fini(void); -extern void _init(void); -extern int main(int, char **, char **); - #ifdef GCRT extern void _mcleanup(void); extern void monstartup(void *, void *); @@ -54,9 +48,6 @@ extern int eprol; extern int etext; #endif -char **environ; -const char *__progname = ""; - void _start(char **, void (*)(void)); /* The entry function. */ @@ -66,18 +57,13 @@ _start(char **ap, void (*cleanup)(void)) int argc; char **argv; char **env; - const char *s; argc = *(long *)(void *)ap; argv = ap + 1; env = ap + 2 + argc; environ = env; - if (argc > 0 && argv[0] != NULL) { - __progname = argv[0]; - for (s = __progname; *s != '\0'; s++) - if (*s == '/') - __progname = s + 1; - } + if (argc > 0 && argv[0] != NULL) + handle_progname(argv[0]); if (&_DYNAMIC != NULL) atexit(cleanup); @@ -86,12 +72,10 @@ _start(char **ap, void (*cleanup)(void)) #ifdef GCRT atexit(_mcleanup); -#endif - atexit(_fini); -#ifdef GCRT monstartup(&eprol, &etext); __asm__("eprol:"); #endif - _init(); - exit( main(argc, argv, env) ); + + handle_static_init(argc, argv, env); + exit(main(argc, argv, env)); } Modified: head/lib/csu/arm/Makefile ============================================================================== --- head/lib/csu/arm/Makefile Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/arm/Makefile Sun Mar 11 20:04:09 2012 (r232832) @@ -18,21 +18,21 @@ CLEANFILES+= crt1.s gcrt1.s Scrt1.s crt1.s: crt1.c ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} crt1.o: crt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} gcrt1.o: gcrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} Scrt1.o: Scrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s Modified: head/lib/csu/arm/crt1.c ============================================================================== --- head/lib/csu/arm/crt1.c Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/arm/crt1.c Sun Mar 11 20:04:09 2012 (r232832) @@ -52,16 +52,11 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "crtbrand.c" +#include "ignore_init.c" struct Struct_Obj_Entry; struct ps_strings; -extern int _DYNAMIC; -#pragma weak _DYNAMIC - -extern void _fini(void); -extern void _init(void); -extern int main(int, char **, char **); extern void _start(int, char **, char **, const struct Struct_Obj_Entry *, void (*)(void), struct ps_strings *); @@ -72,8 +67,6 @@ extern int eprol; extern int etext; #endif -char **environ; -const char *__progname = ""; struct ps_strings *__ps_strings; void __start(int, char **, char **, struct ps_strings *, @@ -104,16 +97,11 @@ void __start(int argc, char **argv, char **env, struct ps_strings *ps_strings, const struct Struct_Obj_Entry *obj __unused, void (*cleanup)(void)) { - const char *s; environ = env; - if (argc > 0 && argv[0] != NULL) { - __progname = argv[0]; - for (s = __progname; *s != '\0'; s++) - if (*s == '/') - __progname = s + 1; - } + if (argc > 0 && argv[0] != NULL) + handle_progname(argv[0]); if (ps_strings != (struct ps_strings *)0) __ps_strings = ps_strings; @@ -124,13 +112,10 @@ __start(int argc, char **argv, char **en _init_tls(); #ifdef GCRT atexit(_mcleanup); -#endif - atexit(_fini); -#ifdef GCRT monstartup(&eprol, &etext); #endif - _init(); - exit( main(argc, argv, env) ); + handle_static_init(argc, argv, env); + exit(main(argc, argv, env)); } #ifdef GCRT Modified: head/lib/csu/common/crtbrand.c ============================================================================== --- head/lib/csu/common/crtbrand.c Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/common/crtbrand.c Sun Mar 11 20:04:09 2012 (r232832) @@ -27,10 +27,7 @@ __FBSDID("$FreeBSD$"); #include - -#define ABI_VENDOR "FreeBSD" -#define ABI_SECTION ".note.ABI-tag" -#define ABI_NOTETYPE 1 +#include "notes.h" /* * Special ".note" entry specifying the ABI version. See @@ -55,15 +52,15 @@ __FBSDID("$FreeBSD$"); * These steps are done in the invididual Makefiles for each applicable arch. */ static const struct { - int32_t namesz; - int32_t descsz; - int32_t type; - char name[sizeof ABI_VENDOR]; - int32_t desc; -} abitag __attribute__ ((section (ABI_SECTION), aligned(4))) __used = { - sizeof ABI_VENDOR, - sizeof(int32_t), - ABI_NOTETYPE, - ABI_VENDOR, - __FreeBSD_version + int32_t namesz; + int32_t descsz; + int32_t type; + char name[sizeof(NOTE_FREEBSD_VENDOR)]; + int32_t desc; +} abitag __attribute__ ((section (NOTE_SECTION), aligned(4))) __used = { + .namesz = sizeof(NOTE_FREEBSD_VENDOR), + .descsz = sizeof(int32_t), + .type = ABI_NOTETYPE, + .name = NOTE_FREEBSD_VENDOR, + .desc = __FreeBSD_version }; Added: head/lib/csu/common/ignore_init.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/csu/common/ignore_init.c Sun Mar 11 20:04:09 2012 (r232832) @@ -0,0 +1,114 @@ +/*- + * Copyright 2012 Konstantin Belousov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "notes.h" + +extern int main(int, char **, char **); + +extern void (*__preinit_array_start[])(int, char **, char **) __hidden; +extern void (*__preinit_array_end[])(int, char **, char **) __hidden; +extern void (*__init_array_start[])(int, char **, char **) __hidden; +extern void (*__init_array_end[])(int, char **, char **) __hidden; +extern void (*__fini_array_start[])(void) __hidden; +extern void (*__fini_array_end[])(void) __hidden; +extern void _fini(void) __hidden; +extern void _init(void) __hidden; + +extern int _DYNAMIC; +#pragma weak _DYNAMIC + +char **environ; +const char *__progname = ""; + +static void +finalizer(void) +{ + void (*fn)(void); + size_t array_size, n; + + array_size = __fini_array_end - __fini_array_start; + for (n = array_size; n > 0; n--) { + fn = __fini_array_start[n - 1]; + if ((uintptr_t)fn != 0 && (uintptr_t)fn != 1) + (fn)(); + } + _fini(); +} + +static inline void +handle_static_init(int argc, char **argv, char **env) +{ + void (*fn)(int, char **, char **); + size_t array_size, n; + + if (&_DYNAMIC != NULL) + return; + + atexit(finalizer); + + array_size = __preinit_array_end - __preinit_array_start; + for (n = 0; n < array_size; n++) { + fn = __preinit_array_start[n]; + if ((uintptr_t)fn != 0 && (uintptr_t)fn != 1) + fn(argc, argv, env); + } + _init(); + array_size = __init_array_end - __init_array_start; + for (n = 0; n < array_size; n++) { + fn = __init_array_start[n]; + if ((uintptr_t)fn != 0 && (uintptr_t)fn != 1) + fn(argc, argv, env); + } +} + +static inline void +handle_progname(const char *v) +{ + const char *s; + + __progname = v; + for (s = __progname; *s != '\0'; s++) { + if (*s == '/') + __progname = s + 1; + } +} + +static const struct { + int32_t namesz; + int32_t descsz; + int32_t type; + char name[sizeof(NOTE_FREEBSD_VENDOR)]; + uint32_t desc; +} crt_noinit_tag __attribute__ ((section (NOTE_SECTION), + aligned(4))) __used = { + .namesz = sizeof(NOTE_FREEBSD_VENDOR), + .descsz = sizeof(uint32_t), + .type = CRT_NOINIT_NOTETYPE, + .name = NOTE_FREEBSD_VENDOR, + .desc = 0 +}; Modified: head/lib/csu/i386-elf/Makefile ============================================================================== --- head/lib/csu/i386-elf/Makefile Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/i386-elf/Makefile Sun Mar 11 20:04:09 2012 (r232832) @@ -18,7 +18,7 @@ CLEANFILES+= crt1_c.s gcrt1_c.s Scrt1_c. gcrt1_c.s: crt1_c.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1_c.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} gcrt1_c.o: gcrt1_c.s ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1_c.s @@ -28,7 +28,7 @@ gcrt1.o: gcrt1_c.o crt1_s.o crt1_c.s: crt1_c.c ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1_c.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} crt1_c.o: crt1_c.s ${CC} ${CFLAGS} -c -o ${.TARGET} crt1_c.s @@ -39,7 +39,7 @@ crt1.o: crt1_c.o crt1_s.o Scrt1_c.s: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1_c.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} Scrt1_c.o: Scrt1_c.s ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1_c.s Modified: head/lib/csu/i386-elf/crt1_c.c ============================================================================== --- head/lib/csu/i386-elf/crt1_c.c Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/i386-elf/crt1_c.c Sun Mar 11 20:04:09 2012 (r232832) @@ -39,15 +39,10 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "crtbrand.c" - -extern int _DYNAMIC; -#pragma weak _DYNAMIC +#include "ignore_init.c" typedef void (*fptr)(void); -extern void _fini(void); -extern void _init(void); -extern int main(int, char **, char **); extern void _start(char *, ...); #ifdef GCRT @@ -57,9 +52,6 @@ extern int eprol; extern int etext; #endif -char **environ; -const char *__progname = ""; - void _start1(fptr, int, char *[]) __dead2; /* The entry function, C part. */ @@ -67,16 +59,11 @@ void _start1(fptr cleanup, int argc, char *argv[]) { char **env; - const char *s; env = argv + argc + 1; environ = env; - if (argc > 0 && argv[0] != NULL) { - __progname = argv[0]; - for (s = __progname; *s != '\0'; s++) - if (*s == '/') - __progname = s + 1; - } + if (argc > 0 && argv[0] != NULL) + handle_progname(argv[0]); if (&_DYNAMIC != NULL) atexit(cleanup); @@ -85,14 +72,12 @@ _start1(fptr cleanup, int argc, char *ar #ifdef GCRT atexit(_mcleanup); -#endif - atexit(_fini); -#ifdef GCRT monstartup(&eprol, &etext); __asm__("eprol:"); #endif - _init(); - exit( main(argc, argv, env) ); + + handle_static_init(argc, argv, env); + exit(main(argc, argv, env)); } __asm(".hidden _start1"); Modified: head/lib/csu/mips/Makefile ============================================================================== --- head/lib/csu/mips/Makefile Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/mips/Makefile Sun Mar 11 20:04:09 2012 (r232832) @@ -18,21 +18,21 @@ CLEANFILES+= crt1.s gcrt1.s Scrt1.s crt1.s: crt1.c ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} crt1.o: crt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} gcrt1.o: gcrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} Scrt1.o: Scrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s Modified: head/lib/csu/mips/crt1.c ============================================================================== --- head/lib/csu/mips/crt1.c Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/mips/crt1.c Sun Mar 11 20:04:09 2012 (r232832) @@ -43,17 +43,11 @@ __FBSDID("$FreeBSD$"); #include #include "libc_private.h" #include "crtbrand.c" +#include "ignore_init.c" struct Struct_Obj_Entry; struct ps_strings; -extern int _DYNAMIC; -#pragma weak _DYNAMIC - -extern void _init(void); -extern void _fini(void); -extern int main(int, char **, char **); - #ifdef GCRT extern void _mcleanup(void); extern void monstartup(void *, void *); @@ -61,9 +55,6 @@ extern int eprol; extern int etext; #endif -char **environ; -const char *__progname = ""; - void __start(char **, void (*)(void), struct Struct_Obj_Entry *, struct ps_strings *); /* The entry function. */ @@ -81,13 +72,8 @@ __start(char **ap, argv = ap + 1; env = ap + 2 + argc; environ = env; - if (argc > 0 && argv[0] != NULL) { - const char *s; - __progname = argv[0]; - for (s = __progname; *s != '\0'; s++) - if (*s == '/') - __progname = s + 1; - } + if (argc > 0 && argv[0] != NULL) + handle_progname(argv[0]); if (&_DYNAMIC != NULL) atexit(cleanup); @@ -96,13 +82,11 @@ __start(char **ap, #ifdef GCRT atexit(_mcleanup); -#endif - atexit(_fini); -#ifdef GCRT monstartup(&eprol, &etext); #endif - _init(); - exit( main(argc, argv, env) ); + + handle_static_init(argc, argv, env); + exit(main(argc, argv, env)); } #ifdef GCRT Modified: head/lib/csu/powerpc/Makefile ============================================================================== --- head/lib/csu/powerpc/Makefile Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/powerpc/Makefile Sun Mar 11 20:04:09 2012 (r232832) @@ -18,21 +18,21 @@ CLEANFILES+= crt1.s gcrt1.s Scrt1.s crt1.s: crt1.c ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} crt1.o: crt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} gcrt1.o: gcrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} Scrt1.o: Scrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s Modified: head/lib/csu/powerpc/crt1.c ============================================================================== --- head/lib/csu/powerpc/crt1.c Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/powerpc/crt1.c Sun Mar 11 20:04:09 2012 (r232832) @@ -52,17 +52,11 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "crtbrand.c" +#include "ignore_init.c" struct Struct_Obj_Entry; struct ps_strings; -extern int _DYNAMIC; -#pragma weak _DYNAMIC - -extern void _fini(void); -extern void _init(void); -extern int main(int, char **, char **); - #ifdef GCRT extern void _mcleanup(void); extern void monstartup(void *, void *); @@ -70,8 +64,6 @@ extern int eprol; extern int etext; #endif -char **environ; -const char *__progname = ""; struct ps_strings *__ps_strings; void _start(int, char **, char **, const struct Struct_Obj_Entry *, @@ -88,16 +80,11 @@ _start(int argc, char **argv, char **env const struct Struct_Obj_Entry *obj __unused, void (*cleanup)(void), struct ps_strings *ps_strings) { - const char *s; environ = env; - if (argc > 0 && argv[0] != NULL) { - __progname = argv[0]; - for (s = __progname; *s != '\0'; s++) - if (*s == '/') - __progname = s + 1; - } + if (argc > 0 && argv[0] != NULL) + handle_progname(argv[0]); if (ps_strings != (struct ps_strings *)0) __ps_strings = ps_strings; @@ -109,13 +96,11 @@ _start(int argc, char **argv, char **env #ifdef GCRT atexit(_mcleanup); -#endif - atexit(_fini); -#ifdef GCRT monstartup(&eprol, &etext); #endif - _init(); - exit( main(argc, argv, env) ); + + handle_static_init(argc, argv, env); + exit(main(argc, argv, env)); } #ifdef GCRT Modified: head/lib/csu/powerpc64/Makefile ============================================================================== --- head/lib/csu/powerpc64/Makefile Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/powerpc64/Makefile Sun Mar 11 20:04:09 2012 (r232832) @@ -18,21 +18,21 @@ CLEANFILES+= crt1.s gcrt1.s Scrt1.s crt1.s: crt1.c ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} crt1.o: crt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} gcrt1.o: gcrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} Scrt1.o: Scrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s Modified: head/lib/csu/powerpc64/crt1.c ============================================================================== --- head/lib/csu/powerpc64/crt1.c Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/powerpc64/crt1.c Sun Mar 11 20:04:09 2012 (r232832) @@ -52,16 +52,11 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "crtbrand.c" +#include "ignore_init.c" struct Struct_Obj_Entry; struct ps_strings; -extern int _DYNAMIC; -#pragma weak _DYNAMIC - -extern void _fini(void); -extern void _init(void); -extern int main(int, char **, char **); extern void _start(int, char **, char **, const struct Struct_Obj_Entry *, void (*)(void), struct ps_strings *); @@ -72,8 +67,6 @@ extern int eprol; extern int etext; #endif -char **environ; -const char *__progname = ""; struct ps_strings *__ps_strings; /* The entry function. */ @@ -87,16 +80,11 @@ _start(int argc, char **argv, char **env const struct Struct_Obj_Entry *obj __unused, void (*cleanup)(void), struct ps_strings *ps_strings) { - const char *s; environ = env; - if (argc > 0 && argv[0] != NULL) { - __progname = argv[0]; - for (s = __progname; *s != '\0'; s++) - if (*s == '/') - __progname = s + 1; - } + if (argc > 0 && argv[0] != NULL) + handle_progname(argv[0]); if (ps_strings != (struct ps_strings *)0) __ps_strings = ps_strings; @@ -108,13 +96,11 @@ _start(int argc, char **argv, char **env #ifdef GCRT atexit(_mcleanup); -#endif - atexit(_fini); -#ifdef GCRT monstartup(&eprol, &etext); #endif - _init(); - exit( main(argc, argv, env) ); + + handle_static_init(argc, argv, env); + exit(main(argc, argv, env)); } #ifdef GCRT Modified: head/lib/csu/sparc64/crt1.c ============================================================================== --- head/lib/csu/sparc64/crt1.c Sun Mar 11 20:03:09 2012 (r232831) +++ head/lib/csu/sparc64/crt1.c Sun Mar 11 20:04:09 2012 (r232832) @@ -43,16 +43,11 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "crtbrand.c" +#include "ignore_init.c" struct Struct_Obj_Entry; struct ps_strings; -extern int _DYNAMIC; -#pragma weak _DYNAMIC - -extern void _fini(void); -extern void _init(void); -extern int main(int, char **, char **); extern void __sparc_utrap_setup(void); #ifdef GCRT @@ -62,9 +57,6 @@ extern int eprol; extern int etext; #endif -char **environ; -const char *__progname = ""; - void _start(char **, void (*)(void), struct Struct_Obj_Entry *, struct ps_strings *); @@ -89,18 +81,13 @@ _start(char **ap, void (*cleanup)(void), int argc; char **argv; char **env; - const char *s; argc = *(long *)(void *)ap; argv = ap + 1; env = ap + 2 + argc; environ = env; - if (argc > 0 && argv[0] != NULL) { - __progname = argv[0]; - for (s = __progname; *s != '\0'; s++) - if (*s == '/') - __progname = s + 1; - } + if (argc > 0 && argv[0] != NULL) + handle_progname(argv[0]); if (&_DYNAMIC != NULL) atexit(cleanup); @@ -110,13 +97,11 @@ _start(char **ap, void (*cleanup)(void), } #ifdef GCRT atexit(_mcleanup); -#endif - atexit(_fini); -#ifdef GCRT monstartup(&eprol, &etext); #endif - _init(); - exit( main(argc, argv, env) ); + + handle_static_init(argc, argv, env); + exit(main(argc, argv, env)); } #ifdef GCRT From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 20:15:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 59D61106566B; Sun, 11 Mar 2012 20:15:13 +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 45C2B8FC12; Sun, 11 Mar 2012 20:15:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BKFDcM025352; Sun, 11 Mar 2012 20:15:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BKFDWv025350; Sun, 11 Mar 2012 20:15:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203112015.q2BKFDWv025350@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 20:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232833 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 20:15:13 -0000 Author: kib Date: Sun Mar 11 20:15:12 2012 New Revision: 232833 URL: http://svn.freebsd.org/changeset/base/232833 Log: Remove not needed ARGSUSED lint command. Submitted by: bde MFC after: 3 days Modified: head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Sun Mar 11 20:04:09 2012 (r232832) +++ head/sys/ufs/ffs/ffs_vnops.c Sun Mar 11 20:15:12 2012 (r232833) @@ -409,7 +409,6 @@ ffs_lock(ap) /* * Vnode op for reading. */ -/* ARGSUSED */ static int ffs_read(ap) struct vop_read_args /* { From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 20:18:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50C351065675; Sun, 11 Mar 2012 20:18:15 +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 3C0518FC14; Sun, 11 Mar 2012 20:18:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BKIFee025478; Sun, 11 Mar 2012 20:18:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BKIF22025476; Sun, 11 Mar 2012 20:18:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203112018.q2BKIF22025476@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 20:18: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: r232834 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 20:18:15 -0000 Author: kib Date: Sun Mar 11 20:18:14 2012 New Revision: 232834 URL: http://svn.freebsd.org/changeset/base/232834 Log: In ffs_syncvnode(), pass boolean false as second argument of ffs_update(). Synchronous inode block update is not needed for MNT_LAZY callers (syncer), and since waitfor values are not zero, code did unneccessary synchronous update. Submitted by: bde Reviewed by: mckusick Tested by: pho MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Sun Mar 11 20:15:12 2012 (r232833) +++ head/sys/ufs/ffs/ffs_vnops.c Sun Mar 11 20:18:14 2012 (r232834) @@ -305,7 +305,7 @@ next: if (noupdate) return (0); else - return (ffs_update(vp, waitfor)); + return (ffs_update(vp, 0)); } /* Drain IO to see if we're done. */ bufobj_wwait(bo, 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 20:23:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CB9B106564A; Sun, 11 Mar 2012 20:23: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 281228FC0A; Sun, 11 Mar 2012 20:23:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BKNl8w025688; Sun, 11 Mar 2012 20:23:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BKNk1K025686; Sun, 11 Mar 2012 20:23:46 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203112023.q2BKNk1K025686@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 20:23: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: r232835 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 20:23:47 -0000 Author: kib Date: Sun Mar 11 20:23:46 2012 New Revision: 232835 URL: http://svn.freebsd.org/changeset/base/232835 Log: Do not fall back to slow synchronous i/o when low on memory or buffers. The bawrite() schedules the write to happen immediately, and its use frees the current thread to do more cleanups. Submitted by: bde Reviewed by: mckusick Tested by: pho MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_inode.c Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Sun Mar 11 20:18:14 2012 (r232834) +++ head/sys/ufs/ffs/ffs_inode.c Sun Mar 11 20:23:46 2012 (r232835) @@ -133,9 +133,11 @@ ffs_update(vp, waitfor) else *((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)) = *ip->i_din2; - if ((waitfor && !DOINGASYNC(vp)) || - (vm_page_count_severe() || buf_dirty_count_severe())) { + if ((waitfor && !DOINGASYNC(vp))) error = bwrite(bp); + else if (vm_page_count_severe() || buf_dirty_count_severe()) { + bawrite(bp); + error = 0; } else { if (bp->b_bufsize == fs->fs_bsize) bp->b_flags |= B_CLUSTEROK; From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 20:26:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1F42106566B; Sun, 11 Mar 2012 20:26:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7427E8FC0A; Sun, 11 Mar 2012 20:26:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BKQKfT025805; Sun, 11 Mar 2012 20:26:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BKQKSK025803; Sun, 11 Mar 2012 20:26:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203112026.q2BKQKSK025803@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 20:26: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: r232836 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 20:26:20 -0000 Author: kib Date: Sun Mar 11 20:26:19 2012 New Revision: 232836 URL: http://svn.freebsd.org/changeset/base/232836 Log: Do schedule delayed writes for async mounts. While there, make some style adjustments, like missed () around return values. Submitted by: bde Reviewed by: mckusick Tested by: pho MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_inode.c Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Sun Mar 11 20:23:46 2012 (r232835) +++ head/sys/ufs/ffs/ffs_inode.c Sun Mar 11 20:26:19 2012 (r232836) @@ -244,7 +244,7 @@ ffs_truncate(vp, length, flags, cred, td ip->i_din2->di_extb[i] = 0; } ip->i_flag |= IN_CHANGE; - if ((error = ffs_update(vp, 1))) + if ((error = ffs_update(vp, !DOINGASYNC(vp)))) return (error); for (i = 0; i < NXADDR; i++) { if (oldblks[i] == 0) @@ -270,13 +270,13 @@ ffs_truncate(vp, length, flags, cred, td ip->i_flag |= IN_CHANGE | IN_UPDATE; if (needextclean) goto extclean; - return ffs_update(vp, 1); + return (ffs_update(vp, !DOINGASYNC(vp))); } if (ip->i_size == length) { ip->i_flag |= IN_CHANGE | IN_UPDATE; if (needextclean) goto extclean; - return ffs_update(vp, 0); + return (ffs_update(vp, 0)); } if (fs->fs_ronly) panic("ffs_truncate: read-only filesystem"); @@ -303,10 +303,12 @@ ffs_truncate(vp, length, flags, cred, td bp->b_flags |= B_CLUSTEROK; if (flags & IO_SYNC) bwrite(bp); + else if (DOINGASYNC(vp)) + bdwrite(bp); else bawrite(bp); ip->i_flag |= IN_CHANGE | IN_UPDATE; - return ffs_update(vp, 1); + return (ffs_update(vp, !DOINGASYNC(vp))); } if (DOINGSOFTDEP(vp)) { if (softdeptrunc == 0 && journaltrunc == 0) { @@ -378,6 +380,8 @@ ffs_truncate(vp, length, flags, cred, td bp->b_flags |= B_CLUSTEROK; if (flags & IO_SYNC) bwrite(bp); + else if (DOINGASYNC(vp)) + bdwrite(bp); else bawrite(bp); } @@ -411,7 +415,7 @@ ffs_truncate(vp, length, flags, cred, td DIP_SET(ip, i_db[i], 0); } ip->i_flag |= IN_CHANGE | IN_UPDATE; - allerror = ffs_update(vp, 1); + allerror = ffs_update(vp, !DOINGASYNC(vp)); /* * Having written the new inode to disk, save its new configuration @@ -543,7 +547,7 @@ extclean: softdep_journal_freeblocks(ip, cred, length, IO_EXT); else softdep_setup_freeblocks(ip, length, IO_EXT); - return ffs_update(vp, MNT_WAIT); + return (ffs_update(vp, !DOINGASYNC(vp))); } /* @@ -624,7 +628,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, lev else bap2[i] = 0; if (DOINGASYNC(vp)) { - bawrite(bp); + bdwrite(bp); } else { error = bwrite(bp); if (error) From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 21:25:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2BF5106566B; Sun, 11 Mar 2012 21:25:42 +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 DE9BF8FC14; Sun, 11 Mar 2012 21:25:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BLPgmG027651; Sun, 11 Mar 2012 21:25:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BLPg6h027649; Sun, 11 Mar 2012 21:25:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203112125.q2BLPg6h027649@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 21:25: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: r232837 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 21:25:43 -0000 Author: kib Date: Sun Mar 11 21:25:42 2012 New Revision: 232837 URL: http://svn.freebsd.org/changeset/base/232837 Log: Remove superfluous brackets. Submitted by: alc MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_inode.c Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Sun Mar 11 20:26:19 2012 (r232836) +++ head/sys/ufs/ffs/ffs_inode.c Sun Mar 11 21:25:42 2012 (r232837) @@ -133,7 +133,7 @@ ffs_update(vp, waitfor) else *((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)) = *ip->i_din2; - if ((waitfor && !DOINGASYNC(vp))) + if (waitfor && !DOINGASYNC(vp)) error = bwrite(bp); else if (vm_page_count_severe() || buf_dirty_count_severe()) { bawrite(bp); From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 22:07:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ED61106566B; Sun, 11 Mar 2012 22:07:42 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2941E8FC0A; Sun, 11 Mar 2012 22:07:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BM7g5G028914; Sun, 11 Mar 2012 22:07:42 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BM7fHo028912; Sun, 11 Mar 2012 22:07:41 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201203112207.q2BM7fHo028912@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 11 Mar 2012 22:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232838 - stable/8/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 22:07:42 -0000 Author: gavin Date: Sun Mar 11 22:07:41 2012 New Revision: 232838 URL: http://svn.freebsd.org/changeset/base/232838 Log: Merge r216121 from head: Remove two unused variables, left over from the refactoring in r180104. PR: bin/152551 Submitted by: Henning Petersen Modified: stable/8/lib/libc/stdio/printf-pos.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/stdio/printf-pos.c ============================================================================== --- stable/8/lib/libc/stdio/printf-pos.c Sun Mar 11 21:25:42 2012 (r232837) +++ stable/8/lib/libc/stdio/printf-pos.c Sun Mar 11 22:07:41 2012 (r232838) @@ -248,7 +248,6 @@ __find_arguments (const char *fmt0, va_l int n; /* handy integer (short term usage) */ int error; int flags; /* flags as above */ - int width; /* width from format (%8d), or 0 */ struct typetable types; /* table of types */ fmt = (char *)fmt0; @@ -266,7 +265,6 @@ __find_arguments (const char *fmt0, va_l fmt++; /* skip over '%' */ flags = 0; - width = 0; rflag: ch = *fmt++; reswitch: switch (ch) { @@ -304,7 +302,6 @@ reswitch: switch (ch) { types.nextarg = n; goto rflag; } - width = n; goto reswitch; #ifndef NO_FLOATING_POINT case 'L': @@ -439,7 +436,6 @@ __find_warguments (const wchar_t *fmt0, int n; /* handy integer (short term usage) */ int error; int flags; /* flags as above */ - int width; /* width from format (%8d), or 0 */ struct typetable types; /* table of types */ fmt = (wchar_t *)fmt0; @@ -457,7 +453,6 @@ __find_warguments (const wchar_t *fmt0, fmt++; /* skip over '%' */ flags = 0; - width = 0; rflag: ch = *fmt++; reswitch: switch (ch) { @@ -495,7 +490,6 @@ reswitch: switch (ch) { types.nextarg = n; goto rflag; } - width = n; goto reswitch; #ifndef NO_FLOATING_POINT case 'L': From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 22:12:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6FCD1065672; Sun, 11 Mar 2012 22:12:05 +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 924B68FC15; Sun, 11 Mar 2012 22:12:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BMC5GF029091; Sun, 11 Mar 2012 22:12:05 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BMC5Z4029090; Sun, 11 Mar 2012 22:12:05 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201203112212.q2BMC5Z4029090@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 11 Mar 2012 22:12: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: r232839 - 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: Sun, 11 Mar 2012 22:12:05 -0000 Author: jilles Date: Sun Mar 11 22:12:05 2012 New Revision: 232839 URL: http://svn.freebsd.org/changeset/base/232839 Log: sh: Add a test for variables with underscores in arithmetic. Things like $((_x+1)) are broken in stable/8 sh but work in stable/9 and head. Added: head/tools/regression/bin/sh/expansion/arith12.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/arith12.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/arith12.0 Sun Mar 11 22:12:05 2012 (r232839) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +_x=4 y_=5 z_z=6 +[ "$((_x*100+y_*10+z_z))" = 456 ] From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 22:17:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F459106566B; Sun, 11 Mar 2012 22:17:02 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF3788FC0C; Sun, 11 Mar 2012 22:17:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BMH1Ze029274; Sun, 11 Mar 2012 22:17:01 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BMH1Z7029271; Sun, 11 Mar 2012 22:17:01 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203112217.q2BMH1Z7029271@svn.freebsd.org> From: Juli Mallett Date: Sun, 11 Mar 2012 22:17: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: r232840 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 22:17:02 -0000 Author: jmallett Date: Sun Mar 11 22:17:01 2012 New Revision: 232840 URL: http://svn.freebsd.org/changeset/base/232840 Log: We've supported 64-bit PTEs for some time. Modified: head/sys/mips/conf/SWARM64 head/sys/mips/conf/SWARM64_SMP Modified: head/sys/mips/conf/SWARM64 ============================================================================== --- head/sys/mips/conf/SWARM64 Sun Mar 11 22:12:05 2012 (r232839) +++ head/sys/mips/conf/SWARM64 Sun Mar 11 22:17:01 2012 (r232840) @@ -10,12 +10,3 @@ machine mips mips64eb makeoptions ARCH_FLAGS="-mabi=64 -march=mips64" makeoptions LDSCRIPT_NAME=ldscript.mips.cfe makeoptions KERNLOADADDR=0xffffffff80001000 - -# -# XXX restrict memory to maximum 4GB because page table entries in pmap -# are still 32 bits wide - -# -# MAXMEM is specified in units of KB -# -options MAXMEM=0x400000 Modified: head/sys/mips/conf/SWARM64_SMP ============================================================================== --- head/sys/mips/conf/SWARM64_SMP Sun Mar 11 22:12:05 2012 (r232839) +++ head/sys/mips/conf/SWARM64_SMP Sun Mar 11 22:17:01 2012 (r232840) @@ -13,12 +13,3 @@ machine mips mips64eb makeoptions ARCH_FLAGS="-mabi=64 -march=mips64" makeoptions LDSCRIPT_NAME=ldscript.mips.cfe makeoptions KERNLOADADDR=0xffffffff80001000 - -# -# XXX restrict memory to maximum 4GB because page table entries in pmap -# are still 32 bits wide - -# -# MAXMEM is specified in units of KB -# -options MAXMEM=0x400000 From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 22:30:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9FAAF106564A; Sun, 11 Mar 2012 22:30:07 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69DA38FC0A; Sun, 11 Mar 2012 22:30:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BMU7QJ029791; Sun, 11 Mar 2012 22:30:07 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2BMU7c3029788; Sun, 11 Mar 2012 22:30:07 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201203112230.q2BMU7c3029788@svn.freebsd.org> From: Ed Schouten Date: Sun, 11 Mar 2012 22:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232841 - head/sbin/init X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 22:30:07 -0000 Author: ed Date: Sun Mar 11 22:30:06 2012 New Revision: 232841 URL: http://svn.freebsd.org/changeset/base/232841 Log: Fix whitespace. MFC after: 1 week Modified: head/sbin/init/init.c Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Sun Mar 11 22:17:01 2012 (r232840) +++ head/sbin/init/init.c Sun Mar 11 22:30:06 2012 (r232841) @@ -86,13 +86,13 @@ static const char rcsid[] = */ #define GETTY_SPACING 5 /* N secs minimum getty spacing */ #define GETTY_SLEEP 30 /* sleep N secs after spacing problem */ -#define GETTY_NSPACE 3 /* max. spacing count to bring reaction */ +#define GETTY_NSPACE 3 /* max. spacing count to bring reaction */ #define WINDOW_WAIT 3 /* wait N secs after starting window */ #define STALL_TIMEOUT 30 /* wait N secs after warning */ #define DEATH_WATCH 10 /* wait N secs for procs to die */ #define DEATH_SCRIPT 120 /* wait for 2min for /etc/rc.shutdown */ #define RESOURCE_RC "daemon" -#define RESOURCE_WINDOW "default" +#define RESOURCE_WINDOW "default" #define RESOURCE_GETTY "default" static void handle(sig_t, ...); @@ -149,15 +149,15 @@ typedef struct init_session { int se_flags; /* status of session */ #define SE_SHUTDOWN 0x1 /* session won't be restarted */ #define SE_PRESENT 0x2 /* session is in /etc/ttys */ - int se_nspace; /* spacing count */ + int se_nspace; /* spacing count */ char *se_device; /* filename of port */ char *se_getty; /* what to run on that port */ - char *se_getty_argv_space; /* pre-parsed argument array space */ + char *se_getty_argv_space; /* pre-parsed argument array space */ char **se_getty_argv; /* pre-parsed argument array */ char *se_window; /* window system (started only once) */ - char *se_window_argv_space; /* pre-parsed argument array space */ + char *se_window_argv_space; /* pre-parsed argument array space */ char **se_window_argv; /* pre-parsed argument array */ - char *se_type; /* default terminal type */ + char *se_type; /* default terminal type */ struct init_session *se_prev; struct init_session *se_next; } session_t; @@ -657,7 +657,7 @@ single_user(void) _exit(0); password = crypt(clear, pp->pw_passwd); bzero(clear, _PASSWORD_LEN); - if (password == NULL || + if (password == NULL || strcmp(password, pp->pw_passwd) == 0) break; warning("single-user login failed\n"); @@ -800,7 +800,7 @@ run_script(const char *script) setctty(_PATH_CONSOLE); - char _sh[] = "sh"; + char _sh[] = "sh"; char _autoboot[] = "autoboot"; argv[0] = _sh; From owner-svn-src-all@FreeBSD.ORG Sun Mar 11 22:54:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85F74106566C; Sun, 11 Mar 2012 22:54:01 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 0B4B08FC08; Sun, 11 Mar 2012 22:54:00 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id A2B0E25D3A47; Sun, 11 Mar 2012 22:53:59 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id CE1FDBDD320; Sun, 11 Mar 2012 22:53:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id HTr5NY9BwF16; Sun, 11 Mar 2012 22:53:57 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C4493BDD31E; Sun, 11 Mar 2012 22:53:57 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201203112212.q2BMC5Z4029090@svn.freebsd.org> Date: Sun, 11 Mar 2012 22:53:56 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <0794D464-56BC-4840-BC32-6E0D79EE602D@lists.zabbadoz.net> References: <201203112212.q2BMC5Z4029090@svn.freebsd.org> To: Jilles Tjoelker X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232839 - 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: Sun, 11 Mar 2012 22:54:01 -0000 On 11. Mar 2012, at 22:12 , Jilles Tjoelker wrote: > Author: jilles > Date: Sun Mar 11 22:12:05 2012 > New Revision: 232839 > URL: http://svn.freebsd.org/changeset/base/232839 >=20 > Log: > sh: Add a test for variables with underscores in arithmetic. >=20 > Things like $((_x+1)) are broken in stable/8 sh but work in stable/9 = and > head. Thanks! > Added: > head/tools/regression/bin/sh/expansion/arith12.0 (contents, props = changed) >=20 > Added: head/tools/regression/bin/sh/expansion/arith12.0 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tools/regression/bin/sh/expansion/arith12.0 Sun Mar 11 = 22:12:05 2012 (r232839) > @@ -0,0 +1,4 @@ > +# $FreeBSD$ > + > +_x=3D4 y_=3D5 z_z=3D6 > +[ "$((_x*100+y_*10+z_z))" =3D 456 ] --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 00:47:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F24A106566C; Mon, 12 Mar 2012 00:47:14 +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 88D678FC15; Mon, 12 Mar 2012 00:47:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C0lEZi034253; Mon, 12 Mar 2012 00:47:14 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C0lEHm034251; Mon, 12 Mar 2012 00:47:14 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201203120047.q2C0lEHm034251@svn.freebsd.org> From: Alan Cox Date: Mon, 12 Mar 2012 00:47: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: r232842 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 00:47:14 -0000 Author: alc Date: Mon Mar 12 00:47:13 2012 New Revision: 232842 URL: http://svn.freebsd.org/changeset/base/232842 Log: Simplify the error checking in one branch of trap_pfault() and update the nearby comment. Add missing whitespace to a return statement in trap_pfault(). Submitted by: kib [2] Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sun Mar 11 22:30:06 2012 (r232841) +++ head/sys/amd64/amd64/trap.c Mon Mar 12 00:47:13 2012 (r232842) @@ -645,7 +645,7 @@ trap_pfault(frame, usermode) int usermode; { vm_offset_t va; - struct vmspace *vm = NULL; + struct vmspace *vm; vm_map_t map; int rv = 0; vm_prot_t ftype; @@ -664,14 +664,10 @@ trap_pfault(frame, usermode) map = kernel_map; } else { /* - * This is a fault on non-kernel virtual memory. - * vm is initialized above to NULL. If curproc is NULL - * or curproc->p_vmspace is NULL the fault is fatal. + * This is a fault on non-kernel virtual memory. If either + * p or p->p_vmspace is NULL, then the fault is fatal. */ - if (p != NULL) - vm = p->p_vmspace; - - if (vm == NULL) + if (p == NULL || (vm = p->p_vmspace) == NULL) goto nogo; map = &vm->vm_map; @@ -735,8 +731,7 @@ nogo: trap_fatal(frame, eva); return (-1); } - - return((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV); + return ((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV); } static void From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 01:06:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6ACA106564A; Mon, 12 Mar 2012 01:06:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1BF68FC08; Mon, 12 Mar 2012 01:06:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C16TmJ035042; Mon, 12 Mar 2012 01:06:29 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C16TVP035040; Mon, 12 Mar 2012 01:06:29 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201203120106.q2C16TVP035040@svn.freebsd.org> From: Ed Maste Date: Mon, 12 Mar 2012 01:06: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: r232844 - head/contrib/ntp/ntpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 01:06:29 -0000 Author: emaste Date: Mon Mar 12 01:06:29 2012 New Revision: 232844 URL: http://svn.freebsd.org/changeset/base/232844 Log: Remove extraneous log message When ntp switched between PLL and FLL mode it produced a log message "kernel time sync status change %04x". This issue is reported in ntp bug 452[1] which claims that this behaviour is normal and the log message isn't necessary. I'm not sure exactly when it was removed, but it's gone in the latest ntp release (4.2.6p5). [1] http://bugs.ntp.org/show_bug.cgi?id=452 Approved by: roberto Modified: head/contrib/ntp/ntpd/ntp_loopfilter.c Modified: head/contrib/ntp/ntpd/ntp_loopfilter.c ============================================================================== --- head/contrib/ntp/ntpd/ntp_loopfilter.c Mon Mar 12 00:48:20 2012 (r232843) +++ head/contrib/ntp/ntpd/ntp_loopfilter.c Mon Mar 12 01:06:29 2012 (r232844) @@ -646,12 +646,6 @@ local_clock( msyslog(LOG_NOTICE, "kernel time sync error %04x", ntv.status); ntv.status &= ~(STA_PPSFREQ | STA_PPSTIME); - } else { - if ((ntv.status ^ pll_status) & ~STA_FLL) - NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT) - msyslog(LOG_NOTICE, - "kernel time sync status change %04x", - ntv.status); } pll_status = ntv.status; #ifdef STA_NANO From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 01:15:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E8B0106564A; Mon, 12 Mar 2012 01:15:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 596DC8FC0A; Mon, 12 Mar 2012 01:15:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C1FxDR035392; Mon, 12 Mar 2012 01:15:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C1FxcO035389; Mon, 12 Mar 2012 01:15:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203120115.q2C1FxcO035389@svn.freebsd.org> From: Adrian Chadd Date: Mon, 12 Mar 2012 01:15:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232845 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 01:15:59 -0000 Author: adrian Date: Mon Mar 12 01:15:58 2012 New Revision: 232845 URL: http://svn.freebsd.org/changeset/base/232845 Log: Begin modifying the PB92 config file to actually generate a flashable, bootable image. The kernel has to fit inside an 896KiB area in a 4MB SPI flash. So a bunch of stuff can't be included (and more is to come), including (unfortunately) IPv6. TODO: * GPIO modules need to be created * Shrink the image a bit more by removing some of the CAM layer debugging strings. Modified: head/sys/mips/conf/PB92 Modified: head/sys/mips/conf/PB92 ============================================================================== --- head/sys/mips/conf/PB92 Mon Mar 12 01:06:29 2012 (r232844) +++ head/sys/mips/conf/PB92 Mon Mar 12 01:15:58 2012 (r232845) @@ -13,6 +13,17 @@ options HZ=1000 # The PB92 has 32mb of RAM; hard-code that options AR71XX_REALMEM=32*1024*1024 +# It's UBOOT, not Redboot - without this, things will hang at startup +options AR71XX_ENV_UBOOT + +# We have to build most things as modules rather than in the kernel. +# The PB92 has 4MB of SPI flash and the default kernel "partition" +# is only 892KiB. In order to try and squeeze into that (so people +# who already are using it without modifying the default flash layout) +# we need to cut down on a lot of things. + +makeoptions MODULES_OVERRIDE="ath ath_pci ath_ahb bridgestp if_bridge if_gif if_gre random wlan wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt wlan_tkip wlan_wep wlan_xauth usb ar71xx" + hints "PB92.hints" include "../atheros/std.ar71xx" @@ -24,7 +35,8 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking -options INET6 +# Can't do IPv6 - it just doesn't fit. +# options INET6 # options NFSCL #Network Filesystem Client options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions @@ -41,11 +53,10 @@ options FFS #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories -options MD_ROOT -options MD_ROOT_SIZE=5120 -device geom_uzip -options GEOM_UZIP -options ROOTDEVNAME=\"ufs:/dev/md0.uzip\" +# Support uncompress lzma rootfs +device geom_uncompress +options GEOM_UNCOMPRESS +options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\" # PCI bus device pci @@ -58,49 +69,50 @@ device nvram2env options IEEE80211_DEBUG options IEEE80211_SUPPORT_MESH options IEEE80211_SUPPORT_TDMA -device wlan # 802.11 support -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_xauth # 802.11 hostap support +options IEEE80211_ALQ +#device wlan # 802.11 support +#device wlan_wep # 802.11 WEP support +#device wlan_ccmp # 802.11 CCMP support +#device wlan_tkip # 802.11 TKIP support +#device wlan_xauth # 802.11 hostap support -device ath # Atheros pci/cardbus NIC's -device ath_pci # PCI/PCIe bus glue +#device ath # Atheros pci/cardbus NIC's +#device ath_pci # PCI/PCIe bus glue options ATH_DEBUG options ATH_ENABLE_11N options ATH_DIAGAPI -device ath_hal +# device ath_hal options AH_SUPPORT_AR5416 options AH_DEBUG options AH_DEBUG_ALQ -device ath_rate_sample +# device ath_rate_sample device mii device arge # USB devices - PB92 has EHCI only -device usb +#device usb options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order options USB_DEBUG options USB_HOST_ALIGN=32 -device ehci +#device ehci # Mass storage -device scbus -device umass -device da +#device scbus +#device umass +#device da # Read MSDOS formatted disks options GEOM_PART_BSD options GEOM_PART_MBR -options MSDOSFS +# options MSDOSFS # GPIO Bus -device gpio -device gpioled +#device gpio +#device gpioled # SPI and flash device spibus @@ -118,7 +130,7 @@ device uart # Network twiddling device loop device ether -device md -device bpf -device random -device if_bridge +#device md +#device bpf +#device random +#device if_bridge From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 01:19:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E626106564A; Mon, 12 Mar 2012 01:19:42 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 192D38FC08; Mon, 12 Mar 2012 01:19:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C1JfKr035536; Mon, 12 Mar 2012 01:19:41 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C1JfjA035534; Mon, 12 Mar 2012 01:19:41 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203120119.q2C1JfjA035534@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 12 Mar 2012 01:19:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232846 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 01:19:42 -0000 Author: gonzo Date: Mon Mar 12 01:19:41 2012 New Revision: 232846 URL: http://svn.freebsd.org/changeset/base/232846 Log: Implement pmc_save_user_callchain and pmc_save_kernel_callchain for MIPS Modified: head/sys/dev/hwpmc/hwpmc_mips.c Modified: head/sys/dev/hwpmc/hwpmc_mips.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mips.c Mon Mar 12 01:15:58 2012 (r232845) +++ head/sys/dev/hwpmc/hwpmc_mips.c Mon Mar 12 01:19:41 2012 (r232846) @@ -34,6 +34,272 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + +#if defined(__mips_n64) +# define MIPS_IS_VALID_KERNELADDR(reg) ((((reg) & 3) == 0) && \ + ((vm_offset_t)(reg) >= MIPS_XKPHYS_START)) +#else +# define MIPS_IS_VALID_KERNELADDR(reg) ((((reg) & 3) == 0) && \ + ((vm_offset_t)(reg) >= MIPS_KSEG0_START)) +#endif + +/* + * We need some reasonable default to prevent backtrace code + * from wandering too far + */ +#define MAX_FUNCTION_SIZE 0x10000 +#define MAX_PROLOGUE_SIZE 0x100 + +static int +pmc_next_frame(register_t *pc, register_t *sp) +{ + InstFmt i; + uintptr_t va; + uint32_t instr, mask; + int more, stksize; + register_t ra = 0; + + /* Jump here after a nonstandard (interrupt handler) frame */ + stksize = 0; + + /* check for bad SP: could foul up next frame */ + if (!MIPS_IS_VALID_KERNELADDR(*sp)) { + goto error; + } + + /* check for bad PC */ + if (!MIPS_IS_VALID_KERNELADDR(*pc)) { + goto error; + } + + /* + * Find the beginning of the current subroutine by scanning + * backwards from the current PC for the end of the previous + * subroutine. + */ + va = *pc - sizeof(int); + while (1) { + instr = *((uint32_t *)va); + + /* [d]addiu sp,sp,-X */ + if (((instr & 0xffff8000) == 0x27bd8000) + || ((instr & 0xffff8000) == 0x67bd8000)) + break; + + /* jr ra */ + if (instr == 0x03e00008) { + /* skip over branch-delay slot instruction */ + va += 2 * sizeof(int); + break; + } + + va -= sizeof(int); + } + + /* skip over nulls which might separate .o files */ + while ((instr = *((uint32_t *)va)) == 0) + va += sizeof(int); + + /* scan forwards to find stack size and any saved registers */ + stksize = 0; + more = 3; + mask = 0; + for (; more; va += sizeof(int), + more = (more == 3) ? 3 : more - 1) { + /* stop if hit our current position */ + if (va >= *pc) + break; + instr = *((uint32_t *)va); + i.word = instr; + switch (i.JType.op) { + case OP_SPECIAL: + switch (i.RType.func) { + case OP_JR: + case OP_JALR: + more = 2; /* stop after next instruction */ + break; + + case OP_SYSCALL: + case OP_BREAK: + more = 1; /* stop now */ + }; + break; + + case OP_BCOND: + case OP_J: + case OP_JAL: + case OP_BEQ: + case OP_BNE: + case OP_BLEZ: + case OP_BGTZ: + more = 2; /* stop after next instruction */ + break; + + case OP_COP0: + case OP_COP1: + case OP_COP2: + case OP_COP3: + switch (i.RType.rs) { + case OP_BCx: + case OP_BCy: + more = 2; /* stop after next instruction */ + }; + break; + + case OP_SW: + case OP_SD: + /* look for saved registers on the stack */ + if (i.IType.rs != 29) + break; + /* only restore the first one */ + if (mask & (1 << i.IType.rt)) + break; + mask |= (1 << i.IType.rt); + if (i.IType.rt == 31) + ra = *((register_t *)(*sp + (short)i.IType.imm)); + break; + + case OP_ADDI: + case OP_ADDIU: + case OP_DADDI: + case OP_DADDIU: + /* look for stack pointer adjustment */ + if (i.IType.rs != 29 || i.IType.rt != 29) + break; + stksize = -((short)i.IType.imm); + } + } + + if (!MIPS_IS_VALID_KERNELADDR(ra)) + return (-1); + + *pc = ra; + *sp += stksize; + + return (0); + +error: + return (-1); +} + +static int +pmc_next_uframe(register_t *pc, register_t *sp, register_t *ra) +{ + int offset, registers_on_stack; + uint32_t opcode, mask; + register_t function_start; + int stksize; + InstFmt i; + + registers_on_stack = 0; + mask = 0; + function_start = 0; + offset = 0; + stksize = 0; + + while (offset < MAX_FUNCTION_SIZE) { + opcode = fuword32((void *)(*pc - offset)); + + /* [d]addiu sp, sp, -X*/ + if (((opcode & 0xffff8000) == 0x27bd8000) + || ((opcode & 0xffff8000) == 0x67bd8000)) { + function_start = *pc - offset; + registers_on_stack = 1; + break; + } + + /* lui gp, X */ + if ((opcode & 0xffff8000) == 0x3c1c0000) { + /* + * Function might start with this instruction + * Keep an eye on "jr ra" and sp correction + * with positive value further on + */ + function_start = *pc - offset; + } + + if (function_start) { + /* + * Stop looking further. Possible end of + * function instruction: it means there is no + * stack modifications, sp is unchanged + */ + + /* [d]addiu sp,sp,X */ + if (((opcode & 0xffff8000) == 0x27bd0000) + || ((opcode & 0xffff8000) == 0x67bd0000)) + break; + + if (opcode == 0x03e00008) + break; + } + + offset += sizeof(int); + } + + if (!function_start) + return (-1); + + if (registers_on_stack) { + offset = 0; + while ((offset < MAX_PROLOGUE_SIZE) + && ((function_start + offset) < *pc)) { + i.word = fuword32((void *)(function_start + offset)); + switch (i.JType.op) { + case OP_SW: + /* look for saved registers on the stack */ + if (i.IType.rs != 29) + break; + /* only restore the first one */ + if (mask & (1 << i.IType.rt)) + break; + mask |= (1 << i.IType.rt); + if (i.IType.rt == 31) + *ra = fuword32((void *)(*sp + (short)i.IType.imm)); + break; + +#if defined(__mips_n64) + case OP_SD: + /* look for saved registers on the stack */ + if (i.IType.rs != 29) + break; + /* only restore the first one */ + if (mask & (1 << i.IType.rt)) + break; + mask |= (1 << i.IType.rt); + /* ra */ + if (i.IType.rt == 31) + *ra = fuword64((void *)(*sp + (short)i.IType.imm)); + break; +#endif + + case OP_ADDI: + case OP_ADDIU: + case OP_DADDI: + case OP_DADDIU: + /* look for stack pointer adjustment */ + if (i.IType.rs != 29 || i.IType.rt != 29) + break; + stksize = -((short)i.IType.imm); + } + + offset += sizeof(int); + } + } + + /* + * We reached the end of backtrace + */ + if (*pc == *ra) + return (-1); + + *pc = *ra; + *sp += stksize; + + return (0); +} struct pmc_mdep * pmc_md_initialize() @@ -55,21 +321,53 @@ pmc_md_finalize(struct pmc_mdep *md) } int -pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, +pmc_save_kernel_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) { - (void) cc; - (void) maxsamples; - (void) tf; - return (0); + register_t pc, ra, sp; + int frames = 0; + + pc = (uint64_t)tf->pc; + sp = (uint64_t)tf->sp; + ra = (uint64_t)tf->ra; + + /* + * Unwind, and unwind, and unwind + */ + while (1) { + cc[frames++] = pc; + if (frames >= nframes) + break; + + if (pmc_next_frame(&pc, &sp) < 0) + break; + } + + return (frames); } int -pmc_save_user_callchain(uintptr_t *cc, int maxsamples, +pmc_save_user_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) { - (void) cc; - (void) maxsamples; - (void) tf; - return (0); + register_t pc, ra, sp; + int frames = 0; + + pc = (uint64_t)tf->pc; + sp = (uint64_t)tf->sp; + ra = (uint64_t)tf->ra; + + /* + * Unwind, and unwind, and unwind + */ + while (1) { + cc[frames++] = pc; + if (frames >= nframes) + break; + + if (pmc_next_uframe(&pc, &sp, &ra) < 0) + break; + } + + return (frames); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 01:23:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D59E8106566B; Mon, 12 Mar 2012 01:23:09 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C04668FC16; Mon, 12 Mar 2012 01:23:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C1N9oV035713; Mon, 12 Mar 2012 01:23:09 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C1N9Mc035711; Mon, 12 Mar 2012 01:23:09 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203120123.q2C1N9Mc035711@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 12 Mar 2012 01:23: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: r232847 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 01:23:10 -0000 Author: gonzo Date: Mon Mar 12 01:23:09 2012 New Revision: 232847 URL: http://svn.freebsd.org/changeset/base/232847 Log: - Rename apb_intr to apb_filter since it's a filter handler - Pass interrupt trapframe for handlers dow the chain - Add PMC interrupt handler PMC interrupt is a special case, so we want handle it as soon as possible with minimum overhead. So we handle it apb filter routine. Modified: head/sys/mips/atheros/apb.c Modified: head/sys/mips/atheros/apb.c ============================================================================== --- head/sys/mips/atheros/apb.c Mon Mar 12 01:19:41 2012 (r232846) +++ head/sys/mips/atheros/apb.c Mon Mar 12 01:23:09 2012 (r232847) @@ -36,6 +36,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include +#include #include #include @@ -44,6 +48,8 @@ __FBSDID("$FreeBSD$"); #include #include +#define APB_INTR_PMC 5 + #undef APB_DEBUG #ifdef APB_DEBUG #define dprintf printf @@ -63,7 +69,7 @@ static int apb_deactivate_resource(devic static struct resource_list * apb_get_resource_list(device_t, device_t); static void apb_hinted_child(device_t, const char *, int); -static int apb_intr(void *); +static int apb_filter(void *); static int apb_probe(device_t); static int apb_release_resource(device_t, device_t, int, int, struct resource *); @@ -132,7 +138,7 @@ apb_attach(device_t dev) } if ((bus_setup_intr(dev, sc->sc_misc_irq, INTR_TYPE_MISC, - apb_intr, NULL, sc, &sc->sc_misc_ih))) { + apb_filter, NULL, sc, &sc->sc_misc_ih))) { device_printf(dev, "WARNING: unable to register interrupt handler\n"); return (ENXIO); @@ -142,6 +148,12 @@ apb_attach(device_t dev) bus_enumerate_hinted_children(dev); bus_generic_attach(dev); + /* + * Unmask performance counter IRQ + */ + apb_unmask_irq((void*)APB_INTR_PMC); + sc->sc_intr_counter[APB_INTR_PMC] = mips_intrcnt_create("apb irq5: pmc"); + return (0); } @@ -329,11 +341,12 @@ apb_teardown_intr(device_t dev, device_t } static int -apb_intr(void *arg) +apb_filter(void *arg) { struct apb_softc *sc = arg; struct intr_event *event; uint32_t reg, irq; + struct thread *td; reg = ATH_READ_REG(AR71XX_MISC_INTR_STATUS); for (irq = 0; irq < APB_NIRQS; irq++) { @@ -354,14 +367,34 @@ apb_intr(void *arg) event = sc->sc_eventstab[irq]; if (!event || TAILQ_EMPTY(&event->ie_handlers)) { + if (irq == APB_INTR_PMC) { + register_t s; + struct trapframe *tf = PCPU_GET(curthread)->td_intr_frame; + s = intr_disable(); + mips_intrcnt_inc(sc->sc_intr_counter[irq]); + + if (pmc_intr && (*pmc_intr)(PCPU_GET(cpuid), tf)) { + intr_restore(s); + continue; + } + + intr_restore(s); + td = PCPU_GET(curthread); + + if (pmc_hook && (td->td_pflags & TDP_CALLCHAIN)) + pmc_hook(PCPU_GET(curthread), + PMC_FN_USER_CALLCHAIN, tf); + + continue; + + } /* Ignore timer interrupts */ if (irq != 0) printf("Stray APB IRQ %d\n", irq); continue; } - /* TODO: frame instead of NULL? */ - intr_event_handle(event, NULL); + intr_event_handle(event, PCPU_GET(curthread)->td_intr_frame); mips_intrcnt_inc(sc->sc_intr_counter[irq]); } } From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 02:08:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 852541065676 for ; Mon, 12 Mar 2012 02:08:31 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4A0EB8FC1B for ; Mon, 12 Mar 2012 02:08:31 +0000 (UTC) Received: by dald2 with SMTP id d2so4942742dal.13 for ; Sun, 11 Mar 2012 19:08:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=q28EgxYZpGVoqBc4rM3HWPCfq0p27UiiE0/sqPSv9oE=; b=EO02JXtfiyUvlgnERsDiiiuJQxWXrmB+PBR5w1WLjxpvCW2/roqq3n6yaJUWCKBxbn uSTGHvmPvgOS5uvfsqkbBSWnP5nuSqfqmxDxGWqPqTCysKzsrwQdS9KNSG7jgiJ+TmKC gtr4xatFzvz2CTmDdG7Azr5m/JguStTW4PoN9M8aL/kq2CRiKKO8jfn5BnWu1ycq8nMy YLRRqV3/TDHYS/V8nXdqUImbCJ/uUaFhC0+XJmadtbhPLakbFM3dEXO3TvE9bsgMKbuv BuqkZM1oztsxc2BI6ca1xED2gAHLmKxyJDfs3svspiQcK5bPVGzzPJki5cpNCXvJT5Wo bpoA== MIME-Version: 1.0 Received: by 10.68.73.103 with SMTP id k7mr16648511pbv.132.1331518110874; Sun, 11 Mar 2012 19:08:30 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.68.218.35 with HTTP; Sun, 11 Mar 2012 19:08:30 -0700 (PDT) In-Reply-To: <201105111523.p4BFNRCp095325@svn.freebsd.org> References: <201105111523.p4BFNRCp095325@svn.freebsd.org> Date: Mon, 12 Mar 2012 15:08:30 +1300 X-Google-Sender-Auth: Bk3YGvJEwiuGNEWO8fEwZhm3lsA Message-ID: From: Andrew Thompson To: Colin Percival Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlAlvRi/+woPH2nUMZNDOjr4Kj8rBxmpY6hEZ7DoqI5alVUg6MwIsXR696e4WRkTDS6YyXy Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221780 - head/usr.sbin/freebsd-update X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 02:08:31 -0000 On 12 May 2011 03:23, Colin Percival wrote: > Author: cperciva > Date: Wed May 11 15:23:27 2011 > New Revision: 221780 > URL: http://svn.freebsd.org/changeset/base/221780 > > Log: > =A0Make freebsd-update(8) smarter in how it handles $FreeBSD$ tags in > =A0configuration files. > > =A0Nagged by: =A0 =A0pgollucci > =A0MFC after: =A0 =A01 month This does not appear to have been MFC'd. Andrew From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 02:09:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1833B106566B; Mon, 12 Mar 2012 02:09:48 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED6248FC17; Mon, 12 Mar 2012 02:09:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C29l9r037543; Mon, 12 Mar 2012 02:09:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C29l5e037540; Mon, 12 Mar 2012 02:09:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201203120209.q2C29l5e037540@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 12 Mar 2012 02:09: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: r232848 - head/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: Mon, 12 Mar 2012 02:09:48 -0000 Author: yongari Date: Mon Mar 12 02:09:47 2012 New Revision: 232848 URL: http://svn.freebsd.org/changeset/base/232848 Log: Add workaround for PCI-X BCM5704 controller that live behind AMD-8131 PCI-X bridge. The bridge seems to reorder write access to mailbox registers such that it caused watchdog timeouts by out-of-order TX completions. Tested by: Michael L. Squires siralan dot org > Reviewed by: jhb Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Mar 12 01:23:09 2012 (r232847) +++ head/sys/dev/bge/if_bge.c Mon Mar 12 02:09:47 2012 (r232848) @@ -380,6 +380,8 @@ static void bge_dma_free(struct bge_soft static int bge_dma_ring_alloc(struct bge_softc *, bus_size_t, bus_size_t, bus_dma_tag_t *, uint8_t **, bus_dmamap_t *, bus_addr_t *, const char *); +static int bge_mbox_reorder(struct bge_softc *); + static int bge_get_eaddr_fw(struct bge_softc *sc, uint8_t ether_addr[]); static int bge_get_eaddr_mem(struct bge_softc *, uint8_t[]); static int bge_get_eaddr_nvram(struct bge_softc *, uint8_t[]); @@ -635,6 +637,8 @@ bge_writembx(struct bge_softc *sc, int o off += BGE_LPMBX_IRQ0_HI - BGE_MBX_IRQ0_HI; CSR_WRITE_4(sc, off, val); + if ((sc->bge_flags & BGE_FLAG_MBOX_REORDER) != 0) + CSR_READ_4(sc, off); } /* @@ -2584,10 +2588,10 @@ bge_dma_alloc(struct bge_softc *sc) * XXX * watchdog timeout issue was observed on BCM5704 which * lives behind PCI-X bridge(e.g AMD 8131 PCI-X bridge). - * Limiting DMA address space to 32bits seems to address - * it. + * Both limiting DMA address space to 32bits and flushing + * mailbox write seem to address the issue. */ - if (sc->bge_flags & BGE_FLAG_PCIX) + if (sc->bge_pcixcap != 0) lowaddr = BUS_SPACE_MAXADDR_32BIT; } error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), 1, 0, lowaddr, @@ -2750,6 +2754,56 @@ bge_can_use_msi(struct bge_softc *sc) } static int +bge_mbox_reorder(struct bge_softc *sc) +{ + /* Lists of PCI bridges that are known to reorder mailbox writes. */ + static const struct mbox_reorder { + const uint16_t vendor; + const uint16_t device; + const char *desc; + } const mbox_reorder_lists[] = { + { 0x1022, 0x7450, "AMD-8131 PCI-X Bridge" }, + }; + devclass_t pci, pcib; + device_t bus, dev; + int count, i; + + count = sizeof(mbox_reorder_lists) / sizeof(mbox_reorder_lists[0]); + pci = devclass_find("pci"); + pcib = devclass_find("pcib"); + dev = sc->bge_dev; + bus = device_get_parent(dev); + for (;;) { + dev = device_get_parent(bus); + bus = device_get_parent(dev); + device_printf(sc->bge_dev, "dev : %s%d, bus : %s%d\n", + device_get_name(dev), device_get_unit(dev), + device_get_name(bus), device_get_unit(bus)); + if (device_get_devclass(dev) != pcib) + break; + for (i = 0; i < count; i++) { + device_printf(sc->bge_dev, + "probing dev : %s%d, vendor : 0x%04x " + "device : 0x%04x\n", + device_get_name(dev), device_get_unit(dev), + pci_get_vendor(dev), pci_get_device(dev)); + if (pci_get_vendor(dev) == + mbox_reorder_lists[i].vendor && + pci_get_device(dev) == + mbox_reorder_lists[i].device) { + device_printf(sc->bge_dev, + "enabling MBOX workaround for %s\n", + mbox_reorder_lists[i].desc); + return (1); + } + } + if (device_get_devclass(bus) != pci) + break; + } + return (0); +} + +static int bge_attach(device_t dev) { struct ifnet *ifp; @@ -3069,6 +3123,16 @@ bge_attach(device_t dev) if (BGE_IS_5714_FAMILY(sc) && (sc->bge_flags & BGE_FLAG_PCIX)) sc->bge_flags |= BGE_FLAG_40BIT_BUG; /* + * Some PCI-X bridges are known to trigger write reordering to + * the mailbox registers. Typical phenomena is watchdog timeouts + * caused by out-of-order TX completions. Enable workaround for + * PCI-X devices that live behind these bridges. + * Note, PCI-X controllers can run in PCI mode so we can't use + * BGE_FLAG_PCIX flag to detect PCI-X controllers. + */ + if (sc->bge_pcixcap != 0 && bge_mbox_reorder(sc) != 0) + sc->bge_flags |= BGE_FLAG_MBOX_REORDER; + /* * Allocate the interrupt, using MSI if possible. These devices * support 8 MSI messages, but only the first one is used in * normal operation. Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Mon Mar 12 01:23:09 2012 (r232847) +++ head/sys/dev/bge/if_bgereg.h Mon Mar 12 02:09:47 2012 (r232848) @@ -2818,6 +2818,7 @@ struct bge_softc { #define BGE_FLAG_RX_ALIGNBUG 0x04000000 #define BGE_FLAG_SHORT_DMA_BUG 0x08000000 #define BGE_FLAG_4K_RDMA_BUG 0x10000000 +#define BGE_FLAG_MBOX_REORDER 0x20000000 uint32_t bge_phy_flags; #define BGE_PHY_NO_WIRESPEED 0x00000001 #define BGE_PHY_ADC_BUG 0x00000002 From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 02:24:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10CCB106566B; Mon, 12 Mar 2012 02:24:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx10.syd.optusnet.com.au (fallbackmx10.syd.optusnet.com.au [211.29.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 7D7078FC18; Mon, 12 Mar 2012 02:24:28 +0000 (UTC) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by fallbackmx10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q2C2ORtP017763; Mon, 12 Mar 2012 13:24:27 +1100 Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q2C2OJfU017942 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Mar 2012 13:24:20 +1100 Date: Mon, 12 Mar 2012 13:24:18 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov In-Reply-To: <201203112026.q2BKQKSK025803@svn.freebsd.org> Message-ID: <20120312132347.L1307@besplex.bde.org> References: <201203112026.q2BKQKSK025803@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: r232836 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 02:24:29 -0000 On Sun, 11 Mar 2012, Konstantin Belousov wrote: > Log: > Do schedule delayed writes for async mounts. > While there, make some style adjustments, like missed () around > return values. > > Submitted by: bde > Reviewed by: mckusick > Tested by: pho > MFC after: 2 weeks Thanks for all these commits. I will prepare some more :-). Bruce From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 02:42:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9048E106564A; Mon, 12 Mar 2012 02:42:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B2508FC14; Mon, 12 Mar 2012 02:42:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C2glj4038717; Mon, 12 Mar 2012 02:42:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C2glT3038714; Mon, 12 Mar 2012 02:42:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201203120242.q2C2glT3038714@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 12 Mar 2012 02:42: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: r232849 - head/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: Mon, 12 Mar 2012 02:42:47 -0000 Author: yongari Date: Mon Mar 12 02:42:47 2012 New Revision: 232849 URL: http://svn.freebsd.org/changeset/base/232849 Log: Show PCI bus speed and width as well as running mode of PCI-X device in device attach. This would help to narrow down issue to a specific controller and operating mode of the controller. While I'm here rename BGE_MISCCFG_BOARD_ID with BGE_MISCCFG_BOARD_ID_MASK. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Mar 12 02:09:47 2012 (r232848) +++ head/sys/dev/bge/if_bge.c Mon Mar 12 02:42:47 2012 (r232849) @@ -380,6 +380,7 @@ static void bge_dma_free(struct bge_soft static int bge_dma_ring_alloc(struct bge_softc *, bus_size_t, bus_size_t, bus_dma_tag_t *, uint8_t **, bus_dmamap_t *, bus_addr_t *, const char *); +static void bge_devinfo(struct bge_softc *); static int bge_mbox_reorder(struct bge_softc *); static int bge_get_eaddr_fw(struct bge_softc *sc, uint8_t ether_addr[]); @@ -2803,6 +2804,59 @@ bge_mbox_reorder(struct bge_softc *sc) return (0); } +static void +bge_devinfo(struct bge_softc *sc) +{ + uint32_t cfg, clk; + + device_printf(sc->bge_dev, + "CHIP ID 0x%08x; ASIC REV 0x%02x; CHIP REV 0x%02x; ", + sc->bge_chipid, sc->bge_asicrev, sc->bge_chiprev); + if (sc->bge_flags & BGE_FLAG_PCIE) + printf("PCI-E\n"); + else if (sc->bge_flags & BGE_FLAG_PCIX) { + printf("PCI-X "); + cfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID_MASK; + if (cfg == BGE_MISCCFG_BOARD_ID_5704CIOBE) + clk = 133; + else { + clk = CSR_READ_4(sc, BGE_PCI_CLKCTL) & 0x1F; + switch (clk) { + case 0: + clk = 33; + break; + case 2: + clk = 50; + break; + case 4: + clk = 66; + break; + case 6: + clk = 100; + break; + case 7: + clk = 133; + break; + } + } + printf("%u MHz\n", clk); + } else { + if (sc->bge_pcixcap != 0) + printf("PCI on PCI-X "); + else + printf("PCI "); + cfg = pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE, 4); + if (cfg & BGE_PCISTATE_PCI_BUSSPEED) + clk = 66; + else + clk = 33; + if (cfg & BGE_PCISTATE_32BIT_BUS) + printf("%u MHz; 32bit\n", clk); + else + printf("%u MHz; 64bit\n", clk); + } +} + static int bge_attach(device_t dev) { @@ -3031,7 +3085,7 @@ bge_attach(device_t dev) if (sc->bge_asicrev == BGE_ASICREV_BCM5719) sc->bge_flags |= BGE_FLAG_4K_RDMA_BUG; - misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID; + misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID_MASK; if (sc->bge_asicrev == BGE_ASICREV_BCM5705) { if (misccfg == BGE_MISCCFG_BOARD_ID_5788 || misccfg == BGE_MISCCFG_BOARD_ID_5788M) @@ -3171,11 +3225,7 @@ bge_attach(device_t dev) goto fail; } - device_printf(dev, - "CHIP ID 0x%08x; ASIC REV 0x%02x; CHIP REV 0x%02x; %s\n", - sc->bge_chipid, sc->bge_asicrev, sc->bge_chiprev, - (sc->bge_flags & BGE_FLAG_PCIX) ? "PCI-X" : - ((sc->bge_flags & BGE_FLAG_PCIE) ? "PCI-E" : "PCI")); + bge_devinfo(sc); BGE_LOCK_INIT(sc, device_get_nameunit(dev)); Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Mon Mar 12 02:09:47 2012 (r232848) +++ head/sys/dev/bge/if_bgereg.h Mon Mar 12 02:42:47 2012 (r232849) @@ -1989,7 +1989,9 @@ /* Misc. config register */ #define BGE_MISCCFG_RESET_CORE_CLOCKS 0x00000001 #define BGE_MISCCFG_TIMER_PRESCALER 0x000000FE -#define BGE_MISCCFG_BOARD_ID 0x0001E000 +#define BGE_MISCCFG_BOARD_ID_MASK 0x0001E000 +#define BGE_MISCCFG_BOARD_ID_5704 0x00000000 +#define BGE_MISCCFG_BOARD_ID_5704CIOBE 0x00004000 #define BGE_MISCCFG_BOARD_ID_5788 0x00010000 #define BGE_MISCCFG_BOARD_ID_5788M 0x00018000 #define BGE_MISCCFG_EPHY_IDDQ 0x00200000 From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 03:47:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABA35106566C; Mon, 12 Mar 2012 03:47:31 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D6648FC0A; Mon, 12 Mar 2012 03:47:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C3lVSr041256; Mon, 12 Mar 2012 03:47:31 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C3lVw9041253; Mon, 12 Mar 2012 03:47:31 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201203120347.q2C3lVw9041253@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 12 Mar 2012 03:47: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: r232850 - head/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: Mon, 12 Mar 2012 03:47:31 -0000 Author: yongari Date: Mon Mar 12 03:47:30 2012 New Revision: 232850 URL: http://svn.freebsd.org/changeset/base/232850 Log: Make if_ierrors updated whenever any of the following counters are updated. o Number of times NIC ran out of RX buffer descriptors o Number of inbound packet errors o Number of inbound packets that were chosen to be discarded Previously only the discarded packet counter was used to update if_ierrors. This change fixes wrong if_ierrors counter on BCM570[0-4] controllers. For BCM5705 and later controllers bge(4) already correctly counted it. Reported by: Eugene Grosbein rdtc dot ru> Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Mar 12 02:42:47 2012 (r232849) +++ head/sys/dev/bge/if_bge.c Mon Mar 12 03:47:30 2012 (r232850) @@ -4489,6 +4489,12 @@ bge_stats_update(struct bge_softc *sc) ifp->if_collisions += (uint32_t)(cnt - sc->bge_tx_collisions); sc->bge_tx_collisions = cnt; + cnt = READ_STAT(sc, stats, nicNoMoreRxBDs.bge_addr_lo); + ifp->if_ierrors += (uint32_t)(cnt - sc->bge_rx_nobds); + sc->bge_rx_nobds = cnt; + cnt = READ_STAT(sc, stats, ifInErrors.bge_addr_lo); + ifp->if_ierrors += (uint32_t)(cnt - sc->bge_rx_inerrs); + sc->bge_rx_inerrs = cnt; cnt = READ_STAT(sc, stats, ifInDiscards.bge_addr_lo); ifp->if_ierrors += (uint32_t)(cnt - sc->bge_rx_discards); sc->bge_rx_discards = cnt; Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Mon Mar 12 02:42:47 2012 (r232849) +++ head/sys/dev/bge/if_bgereg.h Mon Mar 12 03:47:30 2012 (r232850) @@ -2861,6 +2861,8 @@ struct bge_softc { int bge_csum_features; struct callout bge_stat_ch; uint32_t bge_rx_discards; + uint32_t bge_rx_inerrs; + uint32_t bge_rx_nobds; uint32_t bge_tx_discards; uint32_t bge_tx_collisions; #ifdef DEVICE_POLLING From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 05:28:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E2C4106564A; Mon, 12 Mar 2012 05:28:03 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1063F8FC14; Mon, 12 Mar 2012 05:28:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C5S2EI044751; Mon, 12 Mar 2012 05:28:02 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C5S2I4044749; Mon, 12 Mar 2012 05:28:02 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201203120528.q2C5S2I4044749@svn.freebsd.org> From: Alan Cox Date: Mon, 12 Mar 2012 05:28: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: r232851 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 05:28:03 -0000 Author: alc Date: Mon Mar 12 05:28:02 2012 New Revision: 232851 URL: http://svn.freebsd.org/changeset/base/232851 Log: Simplify the error checking in one branch of trap_pfault() and update the nearby comment. Correct the style of two return statements in trap_pfault(). Merge a comment from amd64's trap_pfault(). Modified: head/sys/i386/i386/trap.c Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Mon Mar 12 03:47:30 2012 (r232850) +++ head/sys/i386/i386/trap.c Mon Mar 12 05:28:02 2012 (r232851) @@ -797,7 +797,7 @@ trap_pfault(frame, usermode, eva) vm_offset_t eva; { vm_offset_t va; - struct vmspace *vm = NULL; + struct vmspace *vm; vm_map_t map; int rv = 0; vm_prot_t ftype; @@ -816,7 +816,7 @@ trap_pfault(frame, usermode, eva) */ #if defined(I586_CPU) && !defined(NO_F00F_HACK) if ((eva == (unsigned int)&idt[6]) && has_f00f_bug) - return -2; + return (-2); #endif if (usermode) goto nogo; @@ -824,17 +824,21 @@ trap_pfault(frame, usermode, eva) map = kernel_map; } else { /* - * This is a fault on non-kernel virtual memory. - * vm is initialized above to NULL. If curproc is NULL - * or curproc->p_vmspace is NULL the fault is fatal. + * This is a fault on non-kernel virtual memory. If either + * p or p->p_vmspace is NULL, then the fault is fatal. */ - if (p != NULL) - vm = p->p_vmspace; - - if (vm == NULL) + if (p == NULL || (vm = p->p_vmspace) == NULL) goto nogo; map = &vm->vm_map; + + /* + * When accessing a user-space address, kernel must be + * ready to accept the page fault, and provide a + * handling routine. Since accessing the address + * without the handler is a bug, do not try to handle + * it normally, and panic immediately. + */ if (!usermode && (td->td_intr_nesting_level != 0 || PCPU_GET(curpcb)->pcb_onfault == NULL)) { trap_fatal(frame, eva); @@ -889,8 +893,7 @@ nogo: trap_fatal(frame, eva); return (-1); } - - return((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV); + return ((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV); } static void From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 07:02:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 651B8106566B; Mon, 12 Mar 2012 07:02:17 +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 334528FC0A; Mon, 12 Mar 2012 07:02:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C72HqN047725; Mon, 12 Mar 2012 07:02:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C72Hg5047723; Mon, 12 Mar 2012 07:02:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203120702.q2C72Hg5047723@svn.freebsd.org> From: Alexander Motin Date: Mon, 12 Mar 2012 07:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232852 - 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, 12 Mar 2012 07:02:17 -0000 Author: mav Date: Mon Mar 12 07:02:16 2012 New Revision: 232852 URL: http://svn.freebsd.org/changeset/base/232852 Log: Tune cpuset macros to optimize cases when CPU_SETSIZE fits into single machine word. For example, it turns CPU_SET() into expected shift and OR, removing two extra shifts and additional index on memory access. Generated code checked for kernel (optimized) and user-level (unoptimized) cases with GCC and CLANG. Reviewed by: attilio MFC after: 2 weeks Modified: head/sys/sys/cpuset.h Modified: head/sys/sys/cpuset.h ============================================================================== --- head/sys/sys/cpuset.h Mon Mar 12 05:28:02 2012 (r232851) +++ head/sys/sys/cpuset.h Mon Mar 12 07:02:16 2012 (r232852) @@ -36,11 +36,18 @@ #define CPUSETBUFSIZ ((2 + sizeof(long) * 2) * _NCPUWORDS) -#define __cpuset_mask(n) ((long)1 << ((n) % _NCPUBITS)) -#define CPU_CLR(n, p) ((p)->__bits[(n)/_NCPUBITS] &= ~__cpuset_mask(n)) +/* + * Macros addressing word and bit within it, tuned to make compiler + * optimize cases when CPU_SETSIZE fits into single machine word. + */ +#define __cpuset_mask(n) \ + ((long)1 << ((_NCPUWORDS == 1) ? (__size_t)(n) : ((n) % _NCPUBITS))) +#define __cpuset_word(n) ((_NCPUWORDS == 1) ? 0 : ((n) / _NCPUBITS)) + +#define CPU_CLR(n, p) ((p)->__bits[__cpuset_word(n)] &= ~__cpuset_mask(n)) #define CPU_COPY(f, t) (void)(*(t) = *(f)) -#define CPU_ISSET(n, p) (((p)->__bits[(n)/_NCPUBITS] & __cpuset_mask(n)) != 0) -#define CPU_SET(n, p) ((p)->__bits[(n)/_NCPUBITS] |= __cpuset_mask(n)) +#define CPU_ISSET(n, p) (((p)->__bits[__cpuset_word(n)] & __cpuset_mask(n)) != 0) +#define CPU_SET(n, p) ((p)->__bits[__cpuset_word(n)] |= __cpuset_mask(n)) #define CPU_ZERO(p) do { \ __size_t __i; \ for (__i = 0; __i < _NCPUWORDS; __i++) \ @@ -55,7 +62,7 @@ #define CPU_SETOF(n, p) do { \ CPU_ZERO(p); \ - ((p)->__bits[(n)/_NCPUBITS] = __cpuset_mask(n)); \ + ((p)->__bits[__cpuset_word(n)] = __cpuset_mask(n)); \ } while (0) /* Is p empty. */ @@ -126,10 +133,10 @@ } while (0) #define CPU_CLR_ATOMIC(n, p) \ - atomic_clear_long(&(p)->__bits[(n)/_NCPUBITS], __cpuset_mask(n)) + atomic_clear_long(&(p)->__bits[__cpuset_word(n)], __cpuset_mask(n)) #define CPU_SET_ATOMIC(n, p) \ - atomic_set_long(&(p)->__bits[(n)/_NCPUBITS], __cpuset_mask(n)) + atomic_set_long(&(p)->__bits[__cpuset_word(n)], __cpuset_mask(n)) /* Convenience functions catering special cases. */ #define CPU_OR_ATOMIC(d, s) do { \ From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 07:34:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69A1B1065670; Mon, 12 Mar 2012 07:34:16 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5672E8FC08; Mon, 12 Mar 2012 07:34:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C7YGba048710; Mon, 12 Mar 2012 07:34:16 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C7YG8o048696; Mon, 12 Mar 2012 07:34:16 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203120734.q2C7YG8o048696@svn.freebsd.org> From: Juli Mallett Date: Mon, 12 Mar 2012 07:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232853 - in head/sys/mips: adm5120 alchemy atheros idt include malta nlm rmi rt305x sentry5 sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 07:34:16 -0000 Author: jmallett Date: Mon Mar 12 07:34:15 2012 New Revision: 232853 URL: http://svn.freebsd.org/changeset/base/232853 Log: Remove platform APIs which are not used by any code and which had only stub implementations or no implementation on all platforms. Some of these functions might be good ideas, but their semantics were unclear given the lack of implementation, and an unlucky porter could be fooled into trying to implement them or, worse, being baffled when something like platform_trap_enter() failed to be called. Modified: head/sys/mips/adm5120/adm5120_machdep.c head/sys/mips/alchemy/alchemy_machdep.c head/sys/mips/atheros/ar71xx_machdep.c head/sys/mips/idt/idt_machdep.c head/sys/mips/include/hwfunc.h head/sys/mips/include/md_var.h head/sys/mips/include/trap.h head/sys/mips/malta/malta_machdep.c head/sys/mips/nlm/xlp_machdep.c head/sys/mips/rmi/xlr_machdep.c head/sys/mips/rt305x/rt305x_machdep.c head/sys/mips/sentry5/s5_machdep.c head/sys/mips/sibyte/sb_machdep.c Modified: head/sys/mips/adm5120/adm5120_machdep.c ============================================================================== --- head/sys/mips/adm5120/adm5120_machdep.c Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/adm5120/adm5120_machdep.c Mon Mar 12 07:34:15 2012 (r232853) @@ -116,19 +116,6 @@ mips_init(void) } void -platform_halt(void) -{ - -} - - -void -platform_identify(void) -{ - -} - -void platform_reset(void) { @@ -137,18 +124,6 @@ platform_reset(void) } void -platform_trap_enter(void) -{ - -} - -void -platform_trap_exit(void) -{ - -} - -void platform_start(__register_t a0 __unused, __register_t a1 __unused, __register_t a2 __unused, __register_t a3 __unused) { Modified: head/sys/mips/alchemy/alchemy_machdep.c ============================================================================== --- head/sys/mips/alchemy/alchemy_machdep.c Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/alchemy/alchemy_machdep.c Mon Mar 12 07:34:15 2012 (r232853) @@ -117,19 +117,6 @@ mips_init(void) } void -platform_halt(void) -{ - -} - - -void -platform_identify(void) -{ - -} - -void platform_reset(void) { @@ -138,18 +125,6 @@ platform_reset(void) } void -platform_trap_enter(void) -{ - -} - -void -platform_trap_exit(void) -{ - -} - -void platform_start(__register_t a0 __unused, __register_t a1 __unused, __register_t a2 __unused, __register_t a3 __unused) { Modified: head/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- head/sys/mips/atheros/ar71xx_machdep.c Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/atheros/ar71xx_machdep.c Mon Mar 12 07:34:15 2012 (r232853) @@ -106,18 +106,6 @@ platform_cpu_init() } void -platform_halt(void) -{ - -} - -void -platform_identify(void) -{ - -} - -void platform_reset(void) { ar71xx_device_stop(RST_RESET_FULL_CHIP); @@ -126,18 +114,6 @@ platform_reset(void) ; } -void -platform_trap_enter(void) -{ - -} - -void -platform_trap_exit(void) -{ - -} - /* * Obtain the MAC address via the Redboot environment. */ Modified: head/sys/mips/idt/idt_machdep.c ============================================================================== --- head/sys/mips/idt/idt_machdep.c Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/idt/idt_machdep.c Mon Mar 12 07:34:15 2012 (r232853) @@ -82,19 +82,6 @@ platform_cpu_init() } void -platform_halt(void) -{ - -} - - -void -platform_identify(void) -{ - -} - -void platform_reset(void) { volatile unsigned int * p = (void *)0xb8008000; @@ -111,18 +98,6 @@ platform_reset(void) } void -platform_trap_enter(void) -{ - -} - -void -platform_trap_exit(void) -{ - -} - -void platform_start(__register_t a0, __register_t a1, __register_t a2 __unused, __register_t a3 __unused) { Modified: head/sys/mips/include/hwfunc.h ============================================================================== --- head/sys/mips/include/hwfunc.h Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/include/hwfunc.h Mon Mar 12 07:34:15 2012 (r232853) @@ -30,14 +30,11 @@ #include -struct trapframe; struct timecounter; + /* - * Hooks downward into hardware functionality. + * Hooks downward into platform functionality. */ - -void platform_halt(void); -void platform_intr(struct trapframe *); void platform_reset(void); void platform_start(__register_t, __register_t, __register_t, __register_t); @@ -48,7 +45,6 @@ unsigned platform_get_timecount(struct t /* For hardware specific CPU initialization */ void platform_cpu_init(void); -void platform_secondary_init(void); #ifdef SMP @@ -100,6 +96,6 @@ extern void platform_cpu_mask(cpuset_t * */ struct cpu_group *platform_smp_topo(void); - #endif /* SMP */ + #endif /* !_MACHINE_HWFUNC_H_ */ Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/include/md_var.h Mon Mar 12 07:34:15 2012 (r232853) @@ -76,9 +76,6 @@ void mips_pcpu0_init(void); void mips_proc0_init(void); void mips_postboot_fixup(void); -/* Platform call-downs. */ -void platform_identify(void); - extern int busdma_swi_pending; void busdma_swi(void); Modified: head/sys/mips/include/trap.h ============================================================================== --- head/sys/mips/include/trap.h Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/include/trap.h Mon Mar 12 07:34:15 2012 (r232853) @@ -118,10 +118,4 @@ void MipsUserIntr(void); register_t trap(struct trapframe *); -#ifndef LOCORE /* XXX */ -int check_address(void *); -void platform_trap_enter(void); -void platform_trap_exit(void); -#endif - #endif /* !_MACHINE_TRAP_H_ */ Modified: head/sys/mips/malta/malta_machdep.c ============================================================================== --- head/sys/mips/malta/malta_machdep.c Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/malta/malta_machdep.c Mon Mar 12 07:34:15 2012 (r232853) @@ -199,19 +199,6 @@ mips_init(void) #endif } -void -platform_halt(void) -{ - -} - - -void -platform_identify(void) -{ - -} - /* * Perform a board-level soft-reset. * Note that this is not emulated by gxemul. @@ -225,18 +212,6 @@ platform_reset(void) *c = MALTA_GORESET; } -void -platform_trap_enter(void) -{ - -} - -void -platform_trap_exit(void) -{ - -} - static uint64_t malta_cpu_freq(void) { Modified: head/sys/mips/nlm/xlp_machdep.c ============================================================================== --- head/sys/mips/nlm/xlp_machdep.c Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/nlm/xlp_machdep.c Mon Mar 12 07:34:15 2012 (r232853) @@ -561,22 +561,6 @@ platform_cpu_init() } void -platform_identify(void) -{ - - printf("XLP Eval Board\n"); -} - -/* - * XXX Maybe return the state of the watchdog in enter, and pass it to - * exit? Like spl(). - */ -void -platform_trap_enter(void) -{ -} - -void platform_reset(void) { uint64_t sysbase = nlm_get_sys_regbase(0); @@ -586,11 +570,6 @@ platform_reset(void) __asm __volatile("wait"); } -void -platform_trap_exit(void) -{ -} - #ifdef SMP /* * XLP threads are started simultaneously when we enable threads, this will Modified: head/sys/mips/rmi/xlr_machdep.c ============================================================================== --- head/sys/mips/rmi/xlr_machdep.c Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/rmi/xlr_machdep.c Mon Mar 12 07:34:15 2012 (r232853) @@ -517,19 +517,6 @@ platform_cpu_init() } void -platform_identify(void) -{ - - printf("Board [%d:%d], processor 0x%08x\n", (int)xlr_boot1_info.board_major_version, - (int)xlr_boot1_info.board_minor_version, mips_rd_prid()); -} - -void -platform_trap_enter(void) -{ -} - -void platform_reset(void) { xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_GPIO_OFFSET); @@ -538,11 +525,6 @@ platform_reset(void) xlr_write_reg(mmio, 8, 1); } -void -platform_trap_exit(void) -{ -} - #ifdef SMP int xlr_ap_release[MAXCPU]; Modified: head/sys/mips/rt305x/rt305x_machdep.c ============================================================================== --- head/sys/mips/rt305x/rt305x_machdep.c Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/rt305x/rt305x_machdep.c Mon Mar 12 07:34:15 2012 (r232853) @@ -118,19 +118,6 @@ mips_init(void) } void -platform_halt(void) -{ - -} - - -void -platform_identify(void) -{ - -} - -void platform_reset(void) { @@ -139,18 +126,6 @@ platform_reset(void) } void -platform_trap_enter(void) -{ - -} - -void -platform_trap_exit(void) -{ - -} - -void platform_start(__register_t a0 __unused, __register_t a1 __unused, __register_t a2 __unused, __register_t a3 __unused) { Modified: head/sys/mips/sentry5/s5_machdep.c ============================================================================== --- head/sys/mips/sentry5/s5_machdep.c Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/sentry5/s5_machdep.c Mon Mar 12 07:34:15 2012 (r232853) @@ -144,19 +144,6 @@ mips_init(void) } void -platform_halt(void) -{ - -} - - -void -platform_identify(void) -{ - -} - -void platform_reset(void) { @@ -168,18 +155,6 @@ platform_reset(void) } void -platform_trap_enter(void) -{ - -} - -void -platform_trap_exit(void) -{ - -} - -void platform_start(__register_t a0, __register_t a1, __register_t a2, __register_t a3) { Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Mon Mar 12 07:02:16 2012 (r232852) +++ head/sys/mips/sibyte/sb_machdep.c Mon Mar 12 07:34:15 2012 (r232853) @@ -272,19 +272,6 @@ mips_init(void) } void -platform_halt(void) -{ - -} - - -void -platform_identify(void) -{ - -} - -void platform_reset(void) { @@ -295,18 +282,6 @@ platform_reset(void) sb_system_reset(); } -void -platform_trap_enter(void) -{ - -} - -void -platform_trap_exit(void) -{ - -} - static void kseg0_map_coherent(void) { From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 08:03:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EC4E106566B; Mon, 12 Mar 2012 08:03:52 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B34D8FC08; Mon, 12 Mar 2012 08:03:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C83qjr049666; Mon, 12 Mar 2012 08:03:52 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C83p17049641; Mon, 12 Mar 2012 08:03:51 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201203120803.q2C83p17049641@svn.freebsd.org> From: Scott Long Date: Mon, 12 Mar 2012 08:03: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: r232854 - in head/sys/dev: advansys amr an arcmsr asr buslogic bxe ciss cxgb dpt hifn hptiop hptmv ida if_ndis iir ips mfi mlx mly twe tws X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 08:03:52 -0000 Author: scottl Date: Mon Mar 12 08:03:51 2012 New Revision: 232854 URL: http://svn.freebsd.org/changeset/base/232854 Log: Convert a number of drivers to obtaining their parent DMA tag from their PCI device attachment. Modified: head/sys/dev/advansys/adv_pci.c head/sys/dev/advansys/adw_pci.c head/sys/dev/amr/amr_pci.c head/sys/dev/an/if_an_pci.c head/sys/dev/arcmsr/arcmsr.c head/sys/dev/asr/asr.c head/sys/dev/buslogic/bt_pci.c head/sys/dev/bxe/if_bxe.c head/sys/dev/ciss/ciss.c head/sys/dev/cxgb/cxgb_sge.c head/sys/dev/dpt/dpt_pci.c head/sys/dev/hifn/hifn7751.c head/sys/dev/hptiop/hptiop.c head/sys/dev/hptmv/entry.c head/sys/dev/ida/ida_pci.c head/sys/dev/if_ndis/if_ndis_pci.c head/sys/dev/iir/iir_pci.c head/sys/dev/ips/ips_pci.c head/sys/dev/mfi/mfi_pci.c head/sys/dev/mlx/mlx_pci.c head/sys/dev/mly/mly.c head/sys/dev/twe/twe_freebsd.c head/sys/dev/tws/tws.c Modified: head/sys/dev/advansys/adv_pci.c ============================================================================== --- head/sys/dev/advansys/adv_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/advansys/adv_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -189,7 +189,7 @@ adv_pci_attach(device_t dev) /* Allocate a dmatag for our transfer DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADV_PCI_MAX_DMA_ADDR, Modified: head/sys/dev/advansys/adw_pci.c ============================================================================== --- head/sys/dev/advansys/adw_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/advansys/adw_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -260,7 +260,7 @@ adw_pci_attach(device_t dev) /* Allocate a dmatag for our transfer DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADW_PCI_MAX_DMA_ADDR, Modified: head/sys/dev/amr/amr_pci.c ============================================================================== --- head/sys/dev/amr/amr_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/amr/amr_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -275,7 +275,7 @@ amr_pci_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment,boundary */ AMR_IS_SG64(sc) ? BUS_SPACE_MAXADDR : Modified: head/sys/dev/an/if_an_pci.c ============================================================================== --- head/sys/dev/an/if_an_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/an/if_an_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -195,7 +195,7 @@ an_attach_pci(dev) } /* Allocate DMA region */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev),/* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/arcmsr/arcmsr.c Mon Mar 12 08:03:51 2012 (r232854) @@ -3486,7 +3486,7 @@ static u_int32_t arcmsr_initialize(devic return ENOMEM; } } - if(bus_dma_tag_create( /*parent*/ NULL, + if(bus_dma_tag_create( /*PCI parent*/ bus_get_dma_tag(dev), /*alignemnt*/ 1, /*boundary*/ 0, /*lowaddr*/ BUS_SPACE_MAXADDR, Modified: head/sys/dev/asr/asr.c ============================================================================== --- head/sys/dev/asr/asr.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/asr/asr.c Mon Mar 12 08:03:51 2012 (r232854) @@ -2328,7 +2328,7 @@ asr_alloc_dma(Asr_softc_t *sc) dev = sc->ha_dev; - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/buslogic/bt_pci.c ============================================================================== --- head/sys/dev/buslogic/bt_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/buslogic/bt_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -173,7 +173,7 @@ bt_pci_attach(device_t dev) /* Allocate a dmatag for our CCB DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: head/sys/dev/bxe/if_bxe.c ============================================================================== --- head/sys/dev/bxe/if_bxe.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/bxe/if_bxe.c Mon Mar 12 08:03:51 2012 (r232854) @@ -13582,7 +13582,8 @@ bxe_host_structures_alloc(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - rc = bus_dma_tag_create(NULL, /* parent tag */ + rc = bus_dma_tag_create( + bus_get_dma_tag(dev), /* PCI parent tag */ 1, /* alignment for segs */ BXE_DMA_BOUNDARY, /* cannot cross */ BUS_SPACE_MAXADDR, /* restricted low */ Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/ciss/ciss.c Mon Mar 12 08:03:51 2012 (r232854) @@ -796,7 +796,7 @@ setup: * Note that "simple" adapters can only address within a 32-bit * span. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->ciss_dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/cxgb/cxgb_sge.c Mon Mar 12 08:03:51 2012 (r232854) @@ -592,7 +592,7 @@ t3_sge_alloc(adapter_t *sc) { /* The parent tag. */ - if (bus_dma_tag_create( NULL, /* parent */ + if (bus_dma_tag_create( bus_get_dma_tag(sc->dev),/* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/dpt/dpt_pci.c ============================================================================== --- head/sys/dev/dpt/dpt_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/dpt/dpt_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -133,7 +133,7 @@ dpt_pci_attach (device_t dev) /* Allocate a dmatag representing the capabilities of this attachment */ /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: head/sys/dev/hifn/hifn7751.c ============================================================================== --- head/sys/dev/hifn/hifn7751.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/hifn/hifn7751.c Mon Mar 12 08:03:51 2012 (r232854) @@ -431,7 +431,7 @@ hifn_attach(device_t dev) * Setup the area where the Hifn DMA's descriptors * and associated data structures. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment,boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/hptiop/hptiop.c ============================================================================== --- head/sys/dev/hptiop/hptiop.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/hptiop/hptiop.c Mon Mar 12 08:03:51 2012 (r232854) @@ -1358,7 +1358,7 @@ static int hptiop_attach(device_t dev) mtx_init(&hba->lock, "hptioplock", NULL, MTX_DEF); #endif - if (bus_dma_tag_create(NULL,/* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev),/* PCI parent */ 1, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ Modified: head/sys/dev/hptmv/entry.c ============================================================================== --- head/sys/dev/hptmv/entry.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/hptmv/entry.c Mon Mar 12 08:03:51 2012 (r232854) @@ -1326,7 +1326,7 @@ init_adapter(IAL_ADAPTER_T *pAdapter) _vbus_p->OsExt = (void *)pAdapter; pMvSataAdapter->IALData = pAdapter; - if (bus_dma_tag_create(NULL,/* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(pAdapter->hpt_dev),/* parent */ 4, /* alignment */ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ Modified: head/sys/dev/ida/ida_pci.c ============================================================================== --- head/sys/dev/ida/ida_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/ida/ida_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -267,7 +267,7 @@ ida_pci_attach(device_t dev) } error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: head/sys/dev/if_ndis/if_ndis_pci.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/if_ndis/if_ndis_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -290,7 +290,7 @@ ndis_attach_pci(dev) * Allocate the parent bus DMA tag appropriate for PCI. */ #define NDIS_NSEG_NEW 32 - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/iir/iir_pci.c ============================================================================== --- head/sys/dev/iir/iir_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/iir/iir_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -318,7 +318,8 @@ iir_pci_attach(device_t dev) /* Allocate a dmatag representing the capabilities of this attachment */ /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create(/*parent*/NULL, /*alignemnt*/1, /*boundary*/0, + if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), + /*alignemnt*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, Modified: head/sys/dev/ips/ips_pci.c ============================================================================== --- head/sys/dev/ips/ips_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/ips/ips_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -135,7 +135,7 @@ static int ips_pci_attach(device_t dev) device_printf(dev, "irq setup failed\n"); goto error; } - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: head/sys/dev/mfi/mfi_pci.c ============================================================================== --- head/sys/dev/mfi/mfi_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/mfi/mfi_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -216,7 +216,7 @@ mfi_pci_attach(device_t dev) error = ENOMEM; /* Allocate parent DMA tag */ - if (bus_dma_tag_create( NULL, /* parent */ + if (bus_dma_tag_create( bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/mlx/mlx_pci.c ============================================================================== --- head/sys/dev/mlx/mlx_pci.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/mlx/mlx_pci.c Mon Mar 12 08:03:51 2012 (r232854) @@ -189,7 +189,7 @@ mlx_pci_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/mly/mly.c ============================================================================== --- head/sys/dev/mly/mly.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/mly/mly.c Mon Mar 12 08:03:51 2012 (r232854) @@ -392,7 +392,7 @@ mly_pci_attach(struct mly_softc *sc) * * Note that all of these controllers are 64-bit capable. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->mly_dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/twe/twe_freebsd.c ============================================================================== --- head/sys/dev/twe/twe_freebsd.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/twe/twe_freebsd.c Mon Mar 12 08:03:51 2012 (r232854) @@ -225,7 +225,7 @@ twe_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/tws/tws.c ============================================================================== --- head/sys/dev/tws/tws.c Mon Mar 12 07:34:15 2012 (r232853) +++ head/sys/dev/tws/tws.c Mon Mar 12 08:03:51 2012 (r232854) @@ -521,7 +521,7 @@ tws_init(struct tws_softc *sc) TWS_MAX_32BIT_SG_ELEMENTS; dma_mem_size = (sizeof(struct tws_command_packet) * tws_queue_depth) + (TWS_SECTOR_SIZE) ; - if ( bus_dma_tag_create(NULL, /* parent */ + if ( bus_dma_tag_create(bus_get_dma_tag(sc->tws_dev), /* PCI parent */ TWS_ALIGNMENT, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 08:13:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6766106564A; Mon, 12 Mar 2012 08:13:04 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B42C48FC0C; Mon, 12 Mar 2012 08:13:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2C8D4Xp049988; Mon, 12 Mar 2012 08:13:04 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2C8D42L049978; Mon, 12 Mar 2012 08:13:04 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203120813.q2C8D42L049978@svn.freebsd.org> From: Juli Mallett Date: Mon, 12 Mar 2012 08:13: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: r232855 - 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: Mon, 12 Mar 2012 08:13:04 -0000 Author: jmallett Date: Mon Mar 12 08:13:04 2012 New Revision: 232855 URL: http://svn.freebsd.org/changeset/base/232855 Log: Remove more unused code and declarations, and add dire warnings to the 64-bit atomic ops used by 32-bit kernels. Modified: head/sys/mips/include/cache.h head/sys/mips/include/cpufunc.h head/sys/mips/include/frame.h head/sys/mips/include/md_var.h head/sys/mips/include/pmap.h head/sys/mips/include/proc.h head/sys/mips/mips/machdep.c head/sys/mips/mips/support.S head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/include/cache.h ============================================================================== --- head/sys/mips/include/cache.h Mon Mar 12 08:03:51 2012 (r232854) +++ head/sys/mips/include/cache.h Mon Mar 12 08:13:04 2012 (r232855) @@ -217,7 +217,6 @@ do { \ struct mips_cpuinfo; void mips_config_cache(struct mips_cpuinfo *); -void mips_dcache_compute_align(void); #include #endif /* _MACHINE_CACHE_H_ */ Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Mon Mar 12 08:03:51 2012 (r232854) +++ head/sys/mips/include/cpufunc.h Mon Mar 12 08:13:04 2012 (r232855) @@ -468,6 +468,5 @@ void insl(uint32_t *, uint32_t *,int); void outsb(uint8_t *, const uint8_t *,int); void outsw(uint16_t *, const uint16_t *,int); void outsl(uint32_t *, const uint32_t *,int); -u_int loadandclear(volatile u_int *addr); #endif /* !_MACHINE_CPUFUNC_H_ */ Modified: head/sys/mips/include/frame.h ============================================================================== --- head/sys/mips/include/frame.h Mon Mar 12 08:03:51 2012 (r232854) +++ head/sys/mips/include/frame.h Mon Mar 12 08:13:04 2012 (r232855) @@ -124,10 +124,4 @@ struct trapframe { register_t fdummy; }; -/* REVISIT */ -struct frame *get_current_fp(void); -#define get_next_fp(fp) (0) -#define get_return_ptr(fp) (0) -void get_stack_trace(u_int32_t depth, u_int32_t *trace); - #endif /* !_MACHINE_FRAME_H_ */ Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Mon Mar 12 08:03:51 2012 (r232854) +++ head/sys/mips/include/md_var.h Mon Mar 12 08:13:04 2012 (r232855) @@ -54,12 +54,9 @@ extern vm_offset_t kernel_kseg0_end; void MipsSaveCurFPState(struct thread *); void fork_trampoline(void); -void cpu_swapin(struct proc *); uintptr_t MipsEmulateBranch(struct trapframe *, uintptr_t, int, uintptr_t); void MipsSwitchFPState(struct thread *, struct trapframe *); -u_long kvtop(void *addr); int is_cacheable_mem(vm_paddr_t addr); -void mips_generic_reset(void); void mips_wait(void); #define MIPS_DEBUG 0 Modified: head/sys/mips/include/pmap.h ============================================================================== --- head/sys/mips/include/pmap.h Mon Mar 12 08:03:51 2012 (r232854) +++ head/sys/mips/include/pmap.h Mon Mar 12 08:13:04 2012 (r232855) @@ -163,7 +163,6 @@ void pmap_kenter_attr(vm_offset_t va, vm void pmap_kremove(vm_offset_t va); void *pmap_kenter_temporary(vm_paddr_t pa, int i); void pmap_kenter_temporary_free(vm_paddr_t pa); -int pmap_compute_pages_to_dump(void); void pmap_flush_pvcache(vm_page_t m); int pmap_emulate_modified(pmap_t pmap, vm_offset_t va); void pmap_grow_direct_page_cache(void); Modified: head/sys/mips/include/proc.h ============================================================================== --- head/sys/mips/include/proc.h Mon Mar 12 08:03:51 2012 (r232854) +++ head/sys/mips/include/proc.h Mon Mar 12 08:13:04 2012 (r232855) @@ -80,11 +80,6 @@ struct mdproc { }; #ifdef _KERNEL -struct thread; - -void mips_cpu_switch(struct thread *, struct thread *, struct mtx *); -void mips_cpu_throw(struct thread *, struct thread *); - struct syscall_args { u_int code; struct sysent *callp; Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Mon Mar 12 08:03:51 2012 (r232854) +++ head/sys/mips/mips/machdep.c Mon Mar 12 08:13:04 2012 (r232855) @@ -397,17 +397,6 @@ mips_postboot_fixup(void) #endif } -/* - * Many SoCs have a means to reset the core itself. Others do not, or - * the method is unknown to us. For those cases, we jump to the mips - * reset vector and hope for the best. This works well in practice. - */ -void -mips_generic_reset() -{ - ((void(*)(void))MIPS_RESET_EXC_VEC)(); -} - #ifdef SMP void mips_pcpu_tlb_init(struct pcpu *pcpu) Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Mon Mar 12 08:03:51 2012 (r232854) +++ head/sys/mips/mips/support.S Mon Mar 12 08:13:04 2012 (r232855) @@ -940,154 +940,6 @@ LEAF(ffs) nop END(ffs) -LEAF(get_current_fp) - j ra - move v0, s8 -END(get_current_fp) - -LEAF(loadandclear) - .set noreorder -1: - ll v0, 0(a0) - move t0, zero - sc t0, 0(a0) - beq t0, zero, 1b - nop - j ra - nop -END(loadandclear) - -#if 0 -/* - * u_int32_t atomic_cmpset_32(u_int32_t *p, u_int32_t cmpval, u_int32_t newval) - * Atomically compare the value stored at p with cmpval - * and if the two values are equal, update value *p with - * newval. Return zero if compare failed, non-zero otherwise - * - */ - -LEAF(atomic_cmpset_32) - .set noreorder -1: - ll t0, 0(a0) - move v0, zero - bne t0, a1, 2f - move t1, a2 - sc t1, 0(a0) - beq t1, zero, 1b - or v0, v0, 1 -2: - j ra - nop -END(atomic_cmpset_32) - -/** - * u_int32_t - * atomic_readandclear_32(u_int32_t *a) - * { - * u_int32_t retval; - * retval = *a; - * *a = 0; - * } - */ -LEAF(atomic_readandclear_32) - .set noreorder -1: - ll t0, 0(a0) - move t1, zero - move v0, t0 - sc t1, 0(a0) - beq t1, zero, 1b - nop - j ra - nop -END(atomic_readandclear_32) - -/** - * void - * atomic_set_32(u_int32_t *a, u_int32_t b) - * { - * *a |= b; - * } - */ -LEAF(atomic_set_32) - .set noreorder -1: - ll t0, 0(a0) - or t0, t0, a1 - sc t0, 0(a0) - beq t0, zero, 1b - nop - j ra - nop -END(atomic_set_32) - -/** - * void - * atomic_add_32(uint32_t *a, uint32_t b) - * { - * *a += b; - * } - */ -LEAF(atomic_add_32) - .set noreorder - srl a0, a0, 2 # round down address to be 32-bit aligned - sll a0, a0, 2 -1: - ll t0, 0(a0) - addu t0, t0, a1 - sc t0, 0(a0) - beq t0, zero, 1b - nop - j ra - nop -END(atomic_add_32) - -/** - * void - * atomic_clear_32(u_int32_t *a, u_int32_t b) - * { - * *a &= ~b; - * } - */ -LEAF(atomic_clear_32) - .set noreorder - srl a0, a0, 2 # round down address to be 32-bit aligned - sll a0, a0, 2 - nor a1, zero, a1 -1: - ll t0, 0(a0) - and t0, t0, a1 # t1 has the new lower 16 bits - sc t0, 0(a0) - beq t0, zero, 1b - nop - j ra - nop -END(atomic_clear_32) - -/** - * void - * atomic_subtract_32(uint16_t *a, uint16_t b) - * { - * *a -= b; - * } - */ -LEAF(atomic_subtract_32) - .set noreorder - srl a0, a0, 2 # round down address to be 32-bit aligned - sll a0, a0, 2 -1: - ll t0, 0(a0) - subu t0, t0, a1 - sc t0, 0(a0) - beq t0, zero, 1b - nop - j ra - nop -END(atomic_subtract_32) - -#endif - /** * void * atomic_set_16(u_int16_t *a, u_int16_t b) @@ -1259,6 +1111,15 @@ END(atomic_subtract_8) * NOPs in it for all processors. XXX * * Maybe it would be better to just leave this undefined in that case. + * + * XXX These routines are not safe in the case of a TLB miss on a1 or + * a0 unless the trapframe is 64-bit, which it just isn't with O32. + * If we take any exception, not just an interrupt, the upper + * 32-bits will be clobbered. Use only N32 and N64 kernels if you + * want to use 64-bit registers while interrupts are enabled or + * with memory operations. Since this isn't even using load-linked + * and store-conditional, perhaps it should just use two registers + * instead, as is right and good with the O32 ABI. */ LEAF(atomic_store_64) mfc0 t1, MIPS_COP_0_STATUS @@ -1455,58 +1316,6 @@ LEAF(casuptr) j ra END(casuptr) - -#ifdef CPU_CNMIPS -/* - * void octeon_enable_shadow(void) - * turns on access to CC and CCRes - */ -LEAF(octeon_enable_shadow) - li t1, 0x0000000f - mtc0 t1, MIPS_COP_0_INFO - jr ra - nop -END(octeon_enable_shadow) - - -LEAF(octeon_get_shadow) - mfc0 v0, MIPS_COP_0_INFO - jr ra - nop -END(octeon_get_shadow) - -/* - * octeon_set_control(addr, uint32_t val) - */ -LEAF(octeon_set_control) - .set push - or t1, a1, zero -/* dmfc0 a1, 9, 7*/ - .word 0x40254807 - sd a1, 0(a0) - or a1, t1, zero -/* dmtc0 a1, 9, 7*/ - .word 0x40a54807 - jr ra - nop - .set pop -END(octeon_set_control) - -/* - * octeon_get_control(addr) - */ -LEAF(octeon_get_control) - .set push - .set mips64r2 -/* dmfc0 a1, 9, 7 */ - .word 0x40254807 - sd a1, 0(a0) - jr ra - nop - .set pop -END(octeon_get_control) -#endif - LEAF(mips3_ld) .set push .set noreorder Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Mon Mar 12 08:03:51 2012 (r232854) +++ head/sys/mips/mips/vm_machdep.c Mon Mar 12 08:13:04 2012 (r232855) @@ -478,19 +478,6 @@ cpu_set_upcall_kse(struct thread *td, vo * that are needed. */ } -/* - * Convert kernel VA to physical address - */ -u_long -kvtop(void *addr) -{ - vm_offset_t va; - - va = pmap_kextract((vm_offset_t)addr); - if (va == 0) - panic("kvtop: zero page frame"); - return((intptr_t)va); -} /* * Implement the pre-zeroed page mechanism. From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 10:02:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88E1D1065670 for ; Mon, 12 Mar 2012 10:02:11 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 11A2C8FC1B for ; Mon, 12 Mar 2012 10:02:10 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so3382278bkc.13 for ; Mon, 12 Mar 2012 03:02:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=Hp+xrcAgEn3BAMjiQcYAAzjL6ICgn3vUpY3FRzKq28w=; b=XllMDDL037dLpSPYWVu3FnAkzAVnjBYdZOTfgJ76+G9udMudEoQVn4/4IOy+OpDt5L cQUcojHT4avPeSpArP3G79UM/fZBv0/rZKIQG2MiVlEosA6qyZpS0zLeW7AOw/BNe+VV 7NYvXBcj2WVXUH94DtGwTAA6fwGk87YeoLDipM7ea72MLH85EEQQmqe7GIREW6urg6Sr 99x3mtoDivv98qQrj5DzjcjoWk3zeUWuJeS4FV1zfnvTmcuK5MRAmr4xk+oZo/QcUjBh xTMoucSWtB3Mled2DXMVKmRlDduM5VoofRmyQMHlZwj7+ALe1VSZRRcyQPoHGV04YJb/ r7oQ== Received: by 10.204.130.130 with SMTP id t2mr4435661bks.135.1331546529977; Mon, 12 Mar 2012 03:02:09 -0700 (PDT) Received: from [10.254.254.77] (ppp95-165-157-178.pppoe.spdop.ru. [95.165.157.178]) by mx.google.com with ESMTPS id jd17sm23997880bkb.4.2012.03.12.03.02.07 (version=SSLv3 cipher=OTHER); Mon, 12 Mar 2012 03:02:09 -0700 (PDT) Message-ID: <4F5DC99B.4080109@zonov.org> Date: Mon, 12 Mar 2012 14:02:03 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Ed Maste References: <201203120106.q2C16TVP035040@svn.freebsd.org> In-Reply-To: <201203120106.q2C16TVP035040@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmRGfps7Fu9oTsJ0z94WWXgzwjr+NQr62xTht+VGOK3f/JiZC5pYMZCfoyGLokKBjRIz6e0 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232844 - head/contrib/ntp/ntpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 10:02:11 -0000 On 12.03.2012 5:06, Ed Maste wrote: > Author: emaste > Date: Mon Mar 12 01:06:29 2012 > New Revision: 232844 > URL: http://svn.freebsd.org/changeset/base/232844 > > Log: > Remove extraneous log message > > When ntp switched between PLL and FLL mode it produced a log message > "kernel time sync status change %04x". This issue is reported in ntp > bug 452[1] which claims that this behaviour is normal and the log > message isn't necessary. I'm not sure exactly when it was removed, but > it's gone in the latest ntp release (4.2.6p5). > > [1] http://bugs.ntp.org/show_bug.cgi?id=452 > Thanks! Maybe you can also fix this issue: https://bugzilla.redhat.com/show_bug.cgi?id=246297 I've got these messages on 9.0-STABLE every 5 minutes. Mar 12 13:47:10 XXX ntpd[2825]: bind() fd 29, family AF_INET6, port 123, scope 0, addr 2a02:X:X:X::X:9f09, mcast=0 flags=0x11 fails: Can't assign requested address Mar 12 13:47:10 XXX ntpd[2825]: unable to create socket on igb0 (1780) for 2a02:X:X:X::X:9f09#123 [zont@ws34-005 ~]$ ifconfig igb0: flags=8843 metric 0 mtu 8950 options=500bb ether 00:25:90:37:8b:cc inet6 fe80::225:90ff:fe37:8bcc%igb0 prefixlen 64 tentative scopeid 0x1 inet X.X.X.X netmask 0xfffffc00 broadcast X.X.X.X inet6 2a02:X:X:X::X:9f09 prefixlen 64 tentative nd6 options=29 media: Ethernet autoselect (1000baseT ) status: active -- Andrey Zonov From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 10:14:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3116F1065670; Mon, 12 Mar 2012 10:14:02 +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 7F3278FC16; Mon, 12 Mar 2012 10:14:01 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q2CADp5m080949; Mon, 12 Mar 2012 12:13:51 +0200 (EET) (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.5/8.14.5) with ESMTP id q2CADpcX017991; Mon, 12 Mar 2012 12:13:51 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q2CADpB5017990; Mon, 12 Mar 2012 12:13:51 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 12 Mar 2012 12:13:51 +0200 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, ia64@freebsd.org Message-ID: <20120312101351.GA75778@deviant.kiev.zoral.com.ua> References: <201203112004.q2BK4ACL024929@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wOj2PD2TrrWa1c+8" Content-Disposition: inline In-Reply-To: <201203112004.q2BK4ACL024929@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: Re: svn commit: r232832 - in head/lib/csu: . amd64 arm common i386-elf mips powerpc powerpc64 sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 10:14:02 -0000 --wOj2PD2TrrWa1c+8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 11, 2012 at 08:04:10PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sun Mar 11 20:04:09 2012 > New Revision: 232832 > URL: http://svn.freebsd.org/changeset/base/232832 >=20 > Log: > Stop calling _init/_fini methods from crt1 for dynamic binaries. Do > call preinit, init and fini arrays methods from crt1 for static binarie= s. > =20 > Mark new crt1 with FreeBSD-specific ELF note. > =20 > Move some common crt1 code into new MI file ignore_init.c, to reduce > duplication. Also, conservatively adjust nearby sources for style. > =20 > Reviewed by: kan > Tested by: andrew (arm), flo (sparc64) > MFC after: 3 weeks I failed to mention it in the commit message that ia64 still uses old crt1 and does not mark binaries with a new note. I do not know ia64 assembler and cannot rewrite crt1.S myself. --wOj2PD2TrrWa1c+8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9dzF4ACgkQC3+MBN1Mb4hg8wCfcxF0J9OwWeUnqLoMsgcsEhpm zv8AoLzxjQzBJ4/cyqC9yB4JpE7MTANO =v/+R -----END PGP SIGNATURE----- --wOj2PD2TrrWa1c+8-- From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 10:36:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D239106566B; Mon, 12 Mar 2012 10:36: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 4CBBB8FC0A; Mon, 12 Mar 2012 10:36:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CAa4VX057921; Mon, 12 Mar 2012 10:36:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CAa4GU057919; Mon, 12 Mar 2012 10:36:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203121036.q2CAa4GU057919@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Mar 2012 10:36: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: r232856 - 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, 12 Mar 2012 10:36:04 -0000 Author: kib Date: Mon Mar 12 10:36:03 2012 New Revision: 232856 URL: http://svn.freebsd.org/changeset/base/232856 Log: When iterating over the dso program headers, the object is not initialized yet, and object segments are not yet mapped. Only parse the notes that appear in the first page of the dso (as it should be anyway), and use the preloaded page content. Reported and tested by: stass MFC after: 20 days Modified: head/libexec/rtld-elf/map_object.c Modified: head/libexec/rtld-elf/map_object.c ============================================================================== --- head/libexec/rtld-elf/map_object.c Mon Mar 12 08:13:04 2012 (r232855) +++ head/libexec/rtld-elf/map_object.c Mon Mar 12 10:36:03 2012 (r232856) @@ -149,7 +149,10 @@ map_object(int fd, const char *path, con break; case PT_NOTE: - note_start = (Elf_Addr)obj->relocbase + phdr->p_offset; + if (phdr->p_offset > PAGE_SIZE || + phdr->p_offset + phdr->p_filesz > PAGE_SIZE) + break; + note_start = (Elf_Addr)(char *)hdr + phdr->p_offset; note_end = note_start + phdr->p_filesz; digest_notes(obj, note_start, note_end); break; From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 11:04:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E96F91065670; Mon, 12 Mar 2012 11:04:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8F8F8FC0C; Mon, 12 Mar 2012 11:04:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CB4mYN058834; Mon, 12 Mar 2012 11:04:48 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CB4mN2058832; Mon, 12 Mar 2012 11:04:48 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203121104.q2CB4mN2058832@svn.freebsd.org> From: Dimitry Andric Date: Mon, 12 Mar 2012 11:04:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232857 - 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, 12 Mar 2012 11:04:49 -0000 Author: dim Date: Mon Mar 12 11:04:48 2012 New Revision: 232857 URL: http://svn.freebsd.org/changeset/base/232857 Log: Fix the following warning/error with clang: libexec/rtld-elf/rtld.c:1898:22: error: comparison between pointer and integer ('Elf_Addr *' (aka 'unsigned int *') and 'Elf_Addr' (aka 'unsigned int')) [-Werror] if (preinit_addr == (Elf_Addr)NULL) ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ libexec/rtld-elf/rtld.c:2039:16: error: comparison between pointer and integer ('Elf_Addr *' (aka 'unsigned int *') and 'Elf_Addr' (aka 'unsigned int')) [-Werror] if (init_addr != (Elf_Addr)NULL) { ~~~~~~~~~ ^ ~~~~~~~~~~~~~~ Reviewed by: kib Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Mar 12 10:36:03 2012 (r232856) +++ head/libexec/rtld-elf/rtld.c Mon Mar 12 11:04:48 2012 (r232857) @@ -1895,7 +1895,7 @@ preinit_main(void) int index; preinit_addr = (Elf_Addr *)obj_main->preinit_array; - if (preinit_addr == (Elf_Addr)NULL) + if (preinit_addr == (Elf_Addr *)NULL) return; for (index = 0; index < obj_main->preinit_array_num; index++) { @@ -2036,7 +2036,7 @@ objlist_call_init(Objlist *list, RtldLoc call_initfini_pointer(elm->obj, elm->obj->init); } init_addr = (Elf_Addr *)elm->obj->init_array; - if (init_addr != (Elf_Addr)NULL) { + if (init_addr != (Elf_Addr *)NULL) { for (index = 0; index < elm->obj->init_array_num; index++) { if (init_addr[index] != 0 && init_addr[index] != 1) { dbg("calling init function for %s at %p", elm->obj->path, From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 11:07:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E023210656D9; Mon, 12 Mar 2012 11:07:47 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep19.mx.upcmail.net (fep19.mx.upcmail.net [62.179.121.39]) by mx1.freebsd.org (Postfix) with ESMTP id AC0308FC16; Mon, 12 Mar 2012 11:07:46 +0000 (UTC) Received: from edge03.upcmail.net ([192.168.13.238]) by viefep19-int.chello.at (InterMail vM.8.01.05.04 201-2260-151-105-20111014) with ESMTP id <20120312110738.JOAW1220.viefep19-int.chello.at@edge03.upcmail.net>; Mon, 12 Mar 2012 12:07:38 +0100 Received: from mole.fafoe.narf.at ([80.109.55.137]) by edge03.upcmail.net with edge id kb7e1i00q2xdvHc03b7e4K; Mon, 12 Mar 2012 12:07:38 +0100 X-SourceIP: 80.109.55.137 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 421B26D44A; Mon, 12 Mar 2012 12:07:38 +0100 (CET) Date: Mon, 12 Mar 2012 12:07:38 +0100 From: Stefan Farfeleder To: Dimitry Andric Message-ID: <20120312110737.GA1387@mole.fafoe.narf.at> References: <201203121104.q2CB4mN2058832@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201203121104.q2CB4mN2058832@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232857 - 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, 12 Mar 2012 11:07:48 -0000 On Mon, Mar 12, 2012 at 11:04:48AM +0000, Dimitry Andric wrote: > Modified: head/libexec/rtld-elf/rtld.c > ============================================================================== > --- head/libexec/rtld-elf/rtld.c Mon Mar 12 10:36:03 2012 (r232856) > +++ head/libexec/rtld-elf/rtld.c Mon Mar 12 11:04:48 2012 (r232857) > @@ -1895,7 +1895,7 @@ preinit_main(void) > int index; > > preinit_addr = (Elf_Addr *)obj_main->preinit_array; > - if (preinit_addr == (Elf_Addr)NULL) > + if (preinit_addr == (Elf_Addr *)NULL) > return; > > for (index = 0; index < obj_main->preinit_array_num; index++) { > @@ -2036,7 +2036,7 @@ objlist_call_init(Objlist *list, RtldLoc > call_initfini_pointer(elm->obj, elm->obj->init); > } > init_addr = (Elf_Addr *)elm->obj->init_array; > - if (init_addr != (Elf_Addr)NULL) { > + if (init_addr != (Elf_Addr *)NULL) { > for (index = 0; index < elm->obj->init_array_num; index++) { > if (init_addr[index] != 0 && init_addr[index] != 1) { > dbg("calling init function for %s at %p", elm->obj->path, > Why don't you simply remove the unnecessary casts? From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 11:15:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5E8B1065672; Mon, 12 Mar 2012 11:15:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B55148FC1D; Mon, 12 Mar 2012 11:15:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CBFikF059211; Mon, 12 Mar 2012 11:15:44 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CBFiGh059209; Mon, 12 Mar 2012 11:15:44 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203121115.q2CBFiGh059209@svn.freebsd.org> From: Dimitry Andric Date: Mon, 12 Mar 2012 11:15: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: r232858 - head/sbin/growfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 11:15:44 -0000 Author: dim Date: Mon Mar 12 11:15:44 2012 New Revision: 232858 URL: http://svn.freebsd.org/changeset/base/232858 Log: After r232548, clang complains about the apparent '=-' operator (a left-over from ancient C times, and a frequent typo) in growfs.c: sbin/growfs/growfs.c:1550:8: error: use of unary operator that may be intended as compound assignment (-=) [-Werror] blkno =- 1; ^~ Use 'blkno = -1' instead, to silence the error. Modified: head/sbin/growfs/growfs.c Modified: head/sbin/growfs/growfs.c ============================================================================== --- head/sbin/growfs/growfs.c Mon Mar 12 11:04:48 2012 (r232857) +++ head/sbin/growfs/growfs.c Mon Mar 12 11:15:44 2012 (r232858) @@ -1547,7 +1547,7 @@ alloc(void) * block here which we have to relocate a couple of seconds later again * again, and we are not prepared to to this anyway. */ - blkno =- 1; + blkno = -1; dlower = cgsblock(&sblock, acg.cg_cgx) - cgbase(&sblock, acg.cg_cgx); dupper = cgdmin(&sblock, acg.cg_cgx) - cgbase(&sblock, acg.cg_cgx); dmax = cgbase(&sblock, acg.cg_cgx) + sblock.fs_fpg; From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 11:22:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00467106566B; Mon, 12 Mar 2012 11:22:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3F1B8FC14; Mon, 12 Mar 2012 11:22:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CBMNcK059451; Mon, 12 Mar 2012 11:22:23 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CBMNIS059449; Mon, 12 Mar 2012 11:22:23 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203121122.q2CBMNIS059449@svn.freebsd.org> From: Dimitry Andric Date: Mon, 12 Mar 2012 11:22: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: r232859 - 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, 12 Mar 2012 11:22:24 -0000 Author: dim Date: Mon Mar 12 11:22:23 2012 New Revision: 232859 URL: http://svn.freebsd.org/changeset/base/232859 Log: Amend r232857, now dropping the casts entirely, as they were not necessary at all. Submitted by: stefanf Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Mar 12 11:15:44 2012 (r232858) +++ head/libexec/rtld-elf/rtld.c Mon Mar 12 11:22:23 2012 (r232859) @@ -1895,7 +1895,7 @@ preinit_main(void) int index; preinit_addr = (Elf_Addr *)obj_main->preinit_array; - if (preinit_addr == (Elf_Addr *)NULL) + if (preinit_addr == NULL) return; for (index = 0; index < obj_main->preinit_array_num; index++) { @@ -2036,7 +2036,7 @@ objlist_call_init(Objlist *list, RtldLoc call_initfini_pointer(elm->obj, elm->obj->init); } init_addr = (Elf_Addr *)elm->obj->init_array; - if (init_addr != (Elf_Addr *)NULL) { + if (init_addr != NULL) { for (index = 0; index < elm->obj->init_array_num; index++) { if (init_addr[index] != 0 && init_addr[index] != 1) { dbg("calling init function for %s at %p", elm->obj->path, From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 11:41:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E77D1065672; Mon, 12 Mar 2012 11:41:13 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id DFB418FC14; Mon, 12 Mar 2012 11:41:12 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 8FCCC25D37D1; Mon, 12 Mar 2012 11:41:07 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id B9525BDD3B9; Mon, 12 Mar 2012 11:41:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Fb11mzmgkyuy; Mon, 12 Mar 2012 11:41:05 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1D388BDD3B8; Mon, 12 Mar 2012 11:41:04 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <4F5DC99B.4080109@zonov.org> Date: Mon, 12 Mar 2012 11:41:03 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <6F09B600-7633-4434-9010-5C474759F725@FreeBSD.org> References: <201203120106.q2C16TVP035040@svn.freebsd.org> <4F5DC99B.4080109@zonov.org> To: Andrey Zonov X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ed Maste Subject: Re: svn commit: r232844 - head/contrib/ntp/ntpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 11:41:13 -0000 On 12. Mar 2012, at 10:02 , Andrey Zonov wrote: > On 12.03.2012 5:06, Ed Maste wrote: >> Author: emaste >> Date: Mon Mar 12 01:06:29 2012 >> New Revision: 232844 >> URL: http://svn.freebsd.org/changeset/base/232844 >>=20 >> Log: >> Remove extraneous log message >>=20 >> When ntp switched between PLL and FLL mode it produced a log = message >> "kernel time sync status change %04x". This issue is reported in = ntp >> bug 452[1] which claims that this behaviour is normal and the log >> message isn't necessary. I'm not sure exactly when it was removed, = but >> it's gone in the latest ntp release (4.2.6p5). >>=20 >> [1] http://bugs.ntp.org/show_bug.cgi?id=3D452 >>=20 >=20 > Thanks! >=20 > Maybe you can also fix this issue: = https://bugzilla.redhat.com/show_bug.cgi?id=3D246297 That's a bugzilla bug ID. that's the wrong OS. >=20 > I've got these messages on 9.0-STABLE every 5 minutes. >=20 > Mar 12 13:47:10 XXX ntpd[2825]: bind() fd 29, family AF_INET6, port = 123, scope 0, addr 2a02:X:X:X::X:9f09, mcast=3D0 flags=3D0x11 fails: = Can't assign requested address > Mar 12 13:47:10 XXX ntpd[2825]: unable to create socket on igb0 (1780) = for 2a02:X:X:X::X:9f09#123 And it's really right about this. The real bug about this has been = fixed before. You are running the fix version. > [zont@ws34-005 ~]$ ifconfig > igb0: flags=3D8843 metric 0 = mtu 8950 > = options=3D500bb > ether 00:25:90:37:8b:cc > inet6 fe80::225:90ff:fe37:8bcc%igb0 prefixlen 64 tentative = scopeid 0x1 > inet X.X.X.X netmask 0xfffffc00 broadcast X.X.X.X > inet6 2a02:X:X:X::X:9f09 prefixlen 64 tentative > nd6 options=3D29 You are not doing IPv6 here, fix your rc.conf probably as told on boot = to get rid of the ifdisabled. > media: Ethernet autoselect (1000baseT ) > status: active >=20 >=20 > --=20 > Andrey Zonov --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 11:56:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0C5C1065673; Mon, 12 Mar 2012 11:56:57 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0A4F8FC12; Mon, 12 Mar 2012 11:56:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CBuv3A060539; Mon, 12 Mar 2012 11:56:57 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CBuvWT060537; Mon, 12 Mar 2012 11:56:57 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201203121156.q2CBuvWT060537@svn.freebsd.org> From: Peter Holm Date: Mon, 12 Mar 2012 11:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232860 - 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, 12 Mar 2012 11:56:57 -0000 Author: pho Date: Mon Mar 12 11:56:57 2012 New Revision: 232860 URL: http://svn.freebsd.org/changeset/base/232860 Log: Allways call fdrop(). Modified: head/sys/kern/sys_capability.c Modified: head/sys/kern/sys_capability.c ============================================================================== --- head/sys/kern/sys_capability.c Mon Mar 12 11:22:23 2012 (r232859) +++ head/sys/kern/sys_capability.c Mon Mar 12 11:56:57 2012 (r232860) @@ -261,16 +261,14 @@ sys_cap_new(struct thread *td, struct ca return (error); AUDIT_ARG_FILE(td->td_proc, fp); error = kern_capwrap(td, fp, rights, &capfd); - if (error) - return (error); - /* * Release our reference to the file (kern_capwrap has held a reference * for the filedesc array). */ fdrop(fp, td); - td->td_retval[0] = capfd; - return (0); + if (error == 0) + td->td_retval[0] = capfd; + return (error); } /* From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 12:06:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7F2811065670; Mon, 12 Mar 2012 12:06:40 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) by mx1.freebsd.org (Postfix) with ESMTP id 236E88FC12; Mon, 12 Mar 2012 12:06:38 +0000 (UTC) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTP id q2CC6Ymh058719; Mon, 12 Mar 2012 21:06:37 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Mon, 12 Mar 2012 21:04:11 +0900 (JST) Message-Id: <20120312.210411.242248466057936089.nyan@FreeBSD.org> To: jhb@freebsd.org From: TAKAHASHI Yoshihiro In-Reply-To: <201203091942.q29Jgmj1022231@svn.freebsd.org> References: <201203091942.q29Jgmj1022231@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Mon_Mar_12_21_04_11_2012_721)--" Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232744 - in head/sys: conf i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 12:06:40 -0000 ----Next_Part(Mon_Mar_12_21_04_11_2012_721)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In article <201203091942.q29Jgmj1022231@svn.freebsd.org> John Baldwin writes: > Author: jhb > Date: Fri Mar 9 19:42:48 2012 > New Revision: 232744 > URL: http://svn.freebsd.org/changeset/base/232744 > > Log: > Allow a native i386 kernel to be built with 'nodevice atpic'. Just as on > amd64, if 'device isa' is present quiesce the 8259A's during boot and > resume from suspend. This change broke a kernel without the SMP and atpic. The attached patch fixes the problem and includes changes for pc98. Please review it. --- TAKAHASHI Yoshihiro ----Next_Part(Mon_Mar_12_21_04_11_2012_721)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="atpic.diff" Index: conf/files.pc98 =================================================================== RCS file: /home/ncvs/src/sys/conf/files.pc98,v retrieving revision 1.399 diff -u -r1.399 files.pc98 --- conf/files.pc98 9 Mar 2012 20:43:29 -0000 1.399 +++ conf/files.pc98 10 Mar 2012 12:47:46 -0000 @@ -226,7 +226,7 @@ pc98/cbus/nmi.c standard pc98/cbus/olpt.c optional olpt pc98/cbus/pckbd.c optional pckbd -pc98/cbus/pcrtc.c optional atpic +pc98/cbus/pcrtc.c standard pc98/cbus/pmc.c optional pmc pc98/cbus/scgdcrndr.c optional sc gdc pc98/cbus/scterm-sck.c optional sc Index: i386/i386/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v retrieving revision 1.742 diff -u -r1.742 machdep.c --- i386/i386/machdep.c 9 Mar 2012 19:42:48 -0000 1.742 +++ i386/i386/machdep.c 10 Mar 2012 15:51:40 -0000 @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.742 2012/03/09 19:42:48 jhb Exp $"); #include "opt_atalk.h" +#include "opt_apic.h" #include "opt_atpic.h" #include "opt_compat.h" #include "opt_cpu.h" @@ -136,6 +137,10 @@ #include #endif +#ifdef DEV_APIC +#include +#endif + #ifdef DEV_ISA #include #endif Index: pc98/pc98/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/pc98/pc98/machdep.c,v retrieving revision 1.452 diff -u -r1.452 machdep.c --- pc98/pc98/machdep.c 21 Jan 2012 17:45:27 -0000 1.452 +++ pc98/pc98/machdep.c 10 Mar 2012 15:51:55 -0000 @@ -41,6 +41,8 @@ __FBSDID("$FreeBSD: src/sys/pc98/pc98/machdep.c,v 1.452 2012/01/21 17:45:27 kib Exp $"); #include "opt_atalk.h" +#include "opt_apic.h" +#include "opt_atpic.h" #include "opt_compat.h" #include "opt_cpu.h" #include "opt_ddb.h" @@ -132,6 +134,10 @@ #include #endif +#ifdef DEV_APIC +#include +#endif + #ifdef DEV_ISA #include #endif @@ -2296,7 +2302,21 @@ printf("WARNING: loader(8) metadata is missing!\n"); #ifdef DEV_ISA +#ifdef DEV_ATPIC atpic_startup(); +#else + /* Reset and mask the atpics and leave them shut down. */ + atpic_reset(); + + /* + * Point the ICU spurious interrupt vectors at the APIC spurious + * interrupt handler. + */ + setidt(IDT_IO_INTS + 7, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + setidt(IDT_IO_INTS + 15, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); +#endif #endif #ifdef DDB Index: x86/isa/atpic.c =================================================================== RCS file: /home/ncvs/src/sys/x86/isa/atpic.c,v retrieving revision 1.1 diff -u -r1.1 atpic.c --- x86/isa/atpic.c 25 Feb 2010 14:13:39 -0000 1.1 +++ x86/isa/atpic.c 10 Mar 2012 12:48:03 -0000 @@ -72,48 +72,6 @@ #define MASTER 0 #define SLAVE 1 -/* - * PC-98 machines wire the slave 8259A to pin 7 on the master PIC, and - * PC-AT machines wire the slave PIC to pin 2 on the master PIC. - */ -#ifdef PC98 -#define ICU_SLAVEID 7 -#else -#define ICU_SLAVEID 2 -#endif - -/* - * Determine the base master and slave modes not including auto EOI support. - * All machines that FreeBSD supports use 8086 mode. - */ -#ifdef PC98 -/* - * PC-98 machines do not support auto EOI on the second PIC. Also, it - * seems that PC-98 machine PICs use buffered mode, and the master PIC - * uses special fully nested mode. - */ -#define BASE_MASTER_MODE (ICW4_SFNM | ICW4_BUF | ICW4_MS | ICW4_8086) -#define BASE_SLAVE_MODE (ICW4_BUF | ICW4_8086) -#else -#define BASE_MASTER_MODE ICW4_8086 -#define BASE_SLAVE_MODE ICW4_8086 -#endif - -/* Enable automatic EOI if requested. */ -#ifdef AUTO_EOI_1 -#define MASTER_MODE (BASE_MASTER_MODE | ICW4_AEOI) -#else -#define MASTER_MODE BASE_MASTER_MODE -#endif -#ifdef AUTO_EOI_2 -#define SLAVE_MODE (BASE_SLAVE_MODE | ICW4_AEOI) -#else -#define SLAVE_MODE BASE_SLAVE_MODE -#endif - -#define IRQ_MASK(irq) (1 << (irq)) -#define IMEN_MASK(ai) (IRQ_MASK((ai)->at_irq)) - #define NUM_ISA_IRQS 16 static void atpic_init(void *dummy); Index: x86/isa/icu.h =================================================================== RCS file: /home/ncvs/src/sys/x86/isa/icu.h,v retrieving revision 1.1 diff -u -r1.1 icu.h --- x86/isa/icu.h 25 Feb 2010 14:13:39 -0000 1.1 +++ x86/isa/icu.h 10 Mar 2012 12:48:12 -0000 @@ -47,6 +47,48 @@ #define ICU_IMR_OFFSET 1 #endif +/* + * PC-98 machines wire the slave 8259A to pin 7 on the master PIC, and + * PC-AT machines wire the slave PIC to pin 2 on the master PIC. + */ +#ifdef PC98 +#define ICU_SLAVEID 7 +#else +#define ICU_SLAVEID 2 +#endif + +/* + * Determine the base master and slave modes not including auto EOI support. + * All machines that FreeBSD supports use 8086 mode. + */ +#ifdef PC98 +/* + * PC-98 machines do not support auto EOI on the second PIC. Also, it + * seems that PC-98 machine PICs use buffered mode, and the master PIC + * uses special fully nested mode. + */ +#define BASE_MASTER_MODE (ICW4_SFNM | ICW4_BUF | ICW4_MS | ICW4_8086) +#define BASE_SLAVE_MODE (ICW4_BUF | ICW4_8086) +#else +#define BASE_MASTER_MODE ICW4_8086 +#define BASE_SLAVE_MODE ICW4_8086 +#endif + +/* Enable automatic EOI if requested. */ +#ifdef AUTO_EOI_1 +#define MASTER_MODE (BASE_MASTER_MODE | ICW4_AEOI) +#else +#define MASTER_MODE BASE_MASTER_MODE +#endif +#ifdef AUTO_EOI_2 +#define SLAVE_MODE (BASE_SLAVE_MODE | ICW4_AEOI) +#else +#define SLAVE_MODE BASE_SLAVE_MODE +#endif + +#define IRQ_MASK(irq) (1 << (irq)) +#define IMEN_MASK(ai) (IRQ_MASK((ai)->at_irq)) + void atpic_handle_intr(u_int vector, struct trapframe *frame); void atpic_startup(void); Index: x86/x86/intr_machdep.c =================================================================== RCS file: /home/ncvs/src/sys/x86/x86/intr_machdep.c,v retrieving revision 1.1 diff -u -r1.1 intr_machdep.c --- x86/x86/intr_machdep.c 9 Mar 2012 20:43:29 -0000 1.1 +++ x86/x86/intr_machdep.c 10 Mar 2012 12:48:18 -0000 @@ -63,8 +63,12 @@ #include #include #include +#ifdef PC98 +#include +#else #include #endif +#endif #define MAX_STRAY_LOG 5 @@ -391,15 +395,15 @@ outb(IO_ICU1, ICW1_RESET | ICW1_IC4); outb(IO_ICU1 + ICU_IMR_OFFSET, IDT_IO_INTS); - outb(IO_ICU1 + ICU_IMR_OFFSET, 1 << 2); - outb(IO_ICU1 + ICU_IMR_OFFSET, ICW4_8086); + outb(IO_ICU1 + ICU_IMR_OFFSET, IRQ_MASK(ICU_SLAVEID)); + outb(IO_ICU1 + ICU_IMR_OFFSET, MASTER_MODE); outb(IO_ICU1 + ICU_IMR_OFFSET, 0xff); outb(IO_ICU1, OCW3_SEL | OCW3_RR); outb(IO_ICU2, ICW1_RESET | ICW1_IC4); outb(IO_ICU2 + ICU_IMR_OFFSET, IDT_IO_INTS + 8); - outb(IO_ICU2 + ICU_IMR_OFFSET, 2); - outb(IO_ICU2 + ICU_IMR_OFFSET, ICW4_8086); + outb(IO_ICU2 + ICU_IMR_OFFSET, ICU_SLAVEID); + outb(IO_ICU2 + ICU_IMR_OFFSET, SLAVE_MODE); outb(IO_ICU2 + ICU_IMR_OFFSET, 0xff); outb(IO_ICU2, OCW3_SEL | OCW3_RR); } ----Next_Part(Mon_Mar_12_21_04_11_2012_721)---- From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 12:15:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A886106566B; Mon, 12 Mar 2012 12:15:48 +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 20C588FC16; Mon, 12 Mar 2012 12:15:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CCFlAU061256; Mon, 12 Mar 2012 12:15:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CCFlsZ061254; Mon, 12 Mar 2012 12:15:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203121215.q2CCFlsZ061254@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Mar 2012 12:15: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: r232861 - 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, 12 Mar 2012 12:15:48 -0000 Author: kib Date: Mon Mar 12 12:15:47 2012 New Revision: 232861 URL: http://svn.freebsd.org/changeset/base/232861 Log: Rtld on diet part 1: Provide rtld-private implementations of __stack_chk_guard, __stack_chk_fail() and __chk_fail() symbols, to be used by functions linked from libc_pic.a. This avoids use of libc stack_protector.c, which pulls in syslog(3) and stdio as dependency. Also, do initialize rtld-private copy __stack_chk_guard, previously libc-provided one was not initialized, since we do not call rtld object _init() methods. Reviewed by: kan MFC after: 3 weeks Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Mar 12 11:56:57 2012 (r232860) +++ head/libexec/rtld-elf/rtld.c Mon Mar 12 12:15:47 2012 (r232861) @@ -196,6 +196,8 @@ extern Elf_Dyn _DYNAMIC; int osreldate, pagesize; +long __stack_chk_guard[8] = {0, 0, 0, 0, 0, 0, 0, 0}; + static int stack_prot = PROT_READ | PROT_WRITE | RTLD_DEFAULT_STACK_EXEC; static int max_stack_flags; @@ -311,6 +313,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ Obj_Entry **preload_tail; Objlist initlist; RtldLockState lockstate; + int mib[2]; + size_t len; /* * On entry, the dynamic linker itself has not been relocated yet. @@ -346,6 +350,26 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ main_argc = argc; main_argv = argv; + if (aux_info[AT_CANARY]->a_un.a_ptr != NULL) { + i = aux_info[AT_CANARYLEN]->a_un.a_val; + if (i > sizeof(__stack_chk_guard)) + i = sizeof(__stack_chk_guard); + memcpy(__stack_chk_guard, aux_info[AT_CANARY]->a_un.a_ptr, i); + } else { + mib[0] = CTL_KERN; + mib[1] = KERN_ARND; + + len = sizeof(__stack_chk_guard); + if (sysctl(mib, 2, __stack_chk_guard, &len, NULL, 0) == -1 || + len != sizeof(__stack_chk_guard)) { + /* If sysctl was unsuccessful, use the "terminator canary". */ + ((unsigned char *)(void *)__stack_chk_guard)[0] = 0; + ((unsigned char *)(void *)__stack_chk_guard)[1] = 0; + ((unsigned char *)(void *)__stack_chk_guard)[2] = '\n'; + ((unsigned char *)(void *)__stack_chk_guard)[3] = 255; + } + } + trust = !issetugid(); ld_bind_now = getenv(LD_ "BIND_NOW"); @@ -4313,3 +4337,19 @@ void __pthread_cxa_finalize(struct dl_phdr_info *a) { } + +void +__stack_chk_fail(void) +{ + + _rtld_error("stack overflow detected; terminated"); + die(); +} + +void +__chk_fail(void) +{ + + _rtld_error("buffer overflow detected; terminated"); + die(); +} From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 12:16:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D2771106564A; Mon, 12 Mar 2012 12:16:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7FF48FC16; Mon, 12 Mar 2012 12:16:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CCG84q061306; Mon, 12 Mar 2012 12:16:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CCG8gG061304; Mon, 12 Mar 2012 12:16:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203121216.q2CCG8gG061304@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Mar 2012 12:16: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: r232862 - 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, 12 Mar 2012 12:16:08 -0000 Author: kib Date: Mon Mar 12 12:16:08 2012 New Revision: 232862 URL: http://svn.freebsd.org/changeset/base/232862 Log: Rtld on diet part 2: Do not use stdio for libmap.conf read. Directly map the file and parse lines from the mappings. Reviewed by: kan MFC after: 3 weeks Modified: head/libexec/rtld-elf/libmap.c Modified: head/libexec/rtld-elf/libmap.c ============================================================================== --- head/libexec/rtld-elf/libmap.c Mon Mar 12 12:15:47 2012 (r232861) +++ head/libexec/rtld-elf/libmap.c Mon Mar 12 12:16:08 2012 (r232862) @@ -2,11 +2,14 @@ * $FreeBSD$ */ -#include -#include -#include -#include #include +#include +#include +#include +#include +#include +#include +#include #include "debug.h" #include "rtld.h" @@ -25,7 +28,6 @@ TAILQ_HEAD(lm_list, lm); struct lm { char *f; char *t; - TAILQ_ENTRY(lm) lm_link; }; @@ -37,17 +39,15 @@ struct lmp { TAILQ_ENTRY(lmp) lmp_link; }; -static int lm_count; +static int lm_count; -static void lmc_parse (FILE *); -static void lm_add (const char *, const char *, const char *); -static void lm_free (struct lm_list *); -static char * lml_find (struct lm_list *, const char *); -static struct lm_list * lmp_find (const char *); -static struct lm_list * lmp_init (char *); -static const char * quickbasename (const char *); -static int readstrfn (void * cookie, char *buf, int len); -static int closestrfn (void * cookie); +static void lmc_parse(char *, size_t); +static void lm_add(const char *, const char *, const char *); +static void lm_free(struct lm_list *); +static char *lml_find(struct lm_list *, const char *); +static struct lm_list *lmp_find(const char *); +static struct lm_list *lmp_init(char *); +static const char *quickbasename(const char *); #define iseol(c) (((c) == '#') || ((c) == '\0') || \ ((c) == '\n') || ((c) == '\r')) @@ -59,56 +59,88 @@ static int closestrfn (void * cookie); #define rtld_isspace(c) ((c) == ' ' || (c) == '\t') int -lm_init (char *libmap_override) +lm_init(char *libmap_override) { - FILE *fp; - - dbg("%s(\"%s\")", __func__, libmap_override); + struct stat st; + char *lm_map, *p; + int fd; + dbg("lm_init(\"%s\")", libmap_override); TAILQ_INIT(&lmp_head); - fp = fopen(_PATH_LIBMAP_CONF, "r"); - if (fp) { - lmc_parse(fp); - fclose(fp); + fd = open(_PATH_LIBMAP_CONF, O_RDONLY); + if (fd == -1) { + dbg("lm_init: open(\"%s\") failed, %s", _PATH_LIBMAP_CONF, + strerror(errno)); + goto override; + } + if (fstat(fd, &st) == -1) { + close(fd); + dbg("lm_init: fstat(\"%s\") failed, %s", _PATH_LIBMAP_CONF, + strerror(errno)); + goto override; } + lm_map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); + if (lm_map == (const char *)MAP_FAILED) { + close(fd); + dbg("lm_init: mmap(\"%s\") failed, %s", _PATH_LIBMAP_CONF, + strerror(errno)); + goto override; + } + close(fd); + lmc_parse(lm_map, st.st_size); + munmap(lm_map, st.st_size); +override: if (libmap_override) { - char *p; - /* do some character replacement to make $LIBMAP look like a - text file, then "open" it with funopen */ + /* + * Do some character replacement to make $LIBMAP look + * like a text file, then parse it. + */ libmap_override = xstrdup(libmap_override); - for (p = libmap_override; *p; p++) { switch (*p) { - case '=': - *p = ' '; break; - case ',': - *p = '\n'; break; + case '=': + *p = ' '; + break; + case ',': + *p = '\n'; + break; } } - fp = funopen(libmap_override, readstrfn, NULL, NULL, closestrfn); - if (fp) { - lmc_parse(fp); - fclose(fp); - } + lmc_parse(p, strlen(p)); + free(p); } return (lm_count == 0); } static void -lmc_parse (FILE *fp) +lmc_parse(char *lm_p, size_t lm_len) { - char *cp; - char *f, *t, *c, *p; - char prog[MAXPATHLEN]; - char line[MAXPATHLEN + 2]; - - dbg("%s(%p)", __func__, fp); + char *cp, *f, *t, *c, *p; + char prog[MAXPATHLEN]; + char line[MAXPATHLEN + 2]; + size_t cnt; + int i; + cnt = 0; p = NULL; - while ((cp = fgets(line, MAXPATHLEN + 1, fp)) != NULL) { + while (cnt < lm_len) { + i = 0; + while (lm_p[cnt] != '\n' && cnt < lm_len && + i < sizeof(line) - 1) { + line[i] = lm_p[cnt]; + cnt++; + i++; + } + line[i] = '\0'; + while (lm_p[cnt] != '\n' && cnt < lm_len) + cnt++; + /* skip over nl */ + cnt++; + + cp = &line[0]; t = f = c = NULL; /* Skip over leading space */ @@ -344,31 +376,3 @@ quickbasename (const char *path) } return (p); } - -static int -readstrfn(void * cookie, char *buf, int len) -{ - static char *current; - static int left; - int copied; - - copied = 0; - if (!current) { - current = cookie; - left = strlen(cookie); - } - while (*current && left && len) { - *buf++ = *current++; - left--; - len--; - copied++; - } - return copied; -} - -static int -closestrfn(void * cookie) -{ - free(cookie); - return 0; -} From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 12:26:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4E72106566C; Mon, 12 Mar 2012 12:26:25 +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 4B0998FC19; Mon, 12 Mar 2012 12:26:24 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q2CCQGOS094767; Mon, 12 Mar 2012 14:26:16 +0200 (EET) (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.5/8.14.5) with ESMTP id q2CCQGn0029670; Mon, 12 Mar 2012 14:26:16 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q2CCQG8P029669; Mon, 12 Mar 2012 14:26:16 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 12 Mar 2012 14:26:16 +0200 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20120312122616.GB75778@deviant.kiev.zoral.com.ua> References: <201203121216.q2CCG8gG061304@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="P4y1Y0PhW0Op+SVW" Content-Disposition: inline In-Reply-To: <201203121216.q2CCG8gG061304@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: Re: svn commit: r232862 - 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, 12 Mar 2012 12:26:25 -0000 --P4y1Y0PhW0Op+SVW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 12, 2012 at 12:16:08PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Mar 12 12:16:08 2012 > New Revision: 232862 > URL: http://svn.freebsd.org/changeset/base/232862 >=20 > Log: > Rtld on diet part 2: > =20 > Do not use stdio for libmap.conf read. Directly map the file and > parse lines from the mappings. > =20 > Reviewed by: kan > MFC after: 3 weeks Sample sizes of the ld-elf.so.1 on amd64 before (/libexec/ld-elf.so.1) and after the removal of stdio: $ size /libexec/ld-elf.so.1 ld-elf.so.1 text data bss dec hex filename 225195 15648 58448 299291 4911b /libexec/ld-elf.so.1 133981 9124 18072 161177 27599 ld-elf.so.1 Also, stdio and locale stuff recently requires fully initialized C runtime (like TLS), which is not true for rtld and relatively hard to provide at early stages of binary activation. --P4y1Y0PhW0Op+SVW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9d62gACgkQC3+MBN1Mb4hhiwCgw6r5Lw52yOeF2IKiRZl+Bc2b GDAAniL2uelBXD9BEEEURmpED6eu9g9l =MHFk -----END PGP SIGNATURE----- --P4y1Y0PhW0Op+SVW-- From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 12:29:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BC701065672; Mon, 12 Mar 2012 12:29:32 +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 316108FC12; Mon, 12 Mar 2012 12:29:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CCTWw0061815; Mon, 12 Mar 2012 12:29:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CCTVm1061813; Mon, 12 Mar 2012 12:29:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203121229.q2CCTVm1061813@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Mar 2012 12:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232863 - stable/9/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, 12 Mar 2012 12:29:32 -0000 Author: kib Date: Mon Mar 12 12:29:31 2012 New Revision: 232863 URL: http://svn.freebsd.org/changeset/base/232863 Log: MFC r232572: Use hand-made isspace1() macro which is enough to detect spaces in libmap.conf. MFC r232590 (by pluknet): Rename isspace1() macro to the more appropriate rtld_isspace(). Modified: stable/9/libexec/rtld-elf/libmap.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/libmap.c ============================================================================== --- stable/9/libexec/rtld-elf/libmap.c Mon Mar 12 12:16:08 2012 (r232862) +++ stable/9/libexec/rtld-elf/libmap.c Mon Mar 12 12:29:31 2012 (r232863) @@ -3,7 +3,6 @@ */ #include -#include #include #include #include @@ -53,6 +52,12 @@ static int closestrfn (void * cookie); #define iseol(c) (((c) == '#') || ((c) == '\0') || \ ((c) == '\n') || ((c) == '\r')) +/* + * Do not use ctype.h macros, which rely on working TLS. It is + * too early to have thread-local variables functional. + */ +#define rtld_isspace(c) ((c) == ' ' || (c) == '\t') + int lm_init (char *libmap_override) { @@ -107,7 +112,7 @@ lmc_parse (FILE *fp) t = f = c = NULL; /* Skip over leading space */ - while (isspace(*cp)) cp++; + while (rtld_isspace(*cp)) cp++; /* Found a comment or EOL */ if (iseol(*cp)) continue; @@ -117,7 +122,7 @@ lmc_parse (FILE *fp) cp++; /* Skip leading space */ - while (isspace(*cp)) cp++; + while (rtld_isspace(*cp)) cp++; /* Found comment, EOL or end of selector */ if (iseol(*cp) || *cp == ']') @@ -125,11 +130,11 @@ lmc_parse (FILE *fp) c = cp++; /* Skip to end of word */ - while (!isspace(*cp) && !iseol(*cp) && *cp != ']') + while (!rtld_isspace(*cp) && !iseol(*cp) && *cp != ']') cp++; /* Skip and zero out trailing space */ - while (isspace(*cp)) *cp++ = '\0'; + while (rtld_isspace(*cp)) *cp++ = '\0'; /* Check if there is a closing brace */ if (*cp != ']') continue; @@ -141,7 +146,7 @@ lmc_parse (FILE *fp) * There should be nothing except whitespace or comment from this point to the end of the line. */ - while(isspace(*cp)) cp++; + while(rtld_isspace(*cp)) cp++; if (!iseol(*cp)) continue; strcpy(prog, c); @@ -151,20 +156,20 @@ lmc_parse (FILE *fp) /* Parse the 'from' candidate. */ f = cp++; - while (!isspace(*cp) && !iseol(*cp)) cp++; + while (!rtld_isspace(*cp) && !iseol(*cp)) cp++; /* Skip and zero out the trailing whitespace */ - while (isspace(*cp)) *cp++ = '\0'; + while (rtld_isspace(*cp)) *cp++ = '\0'; /* Found a comment or EOL */ if (iseol(*cp)) continue; /* Parse 'to' mapping */ t = cp++; - while (!isspace(*cp) && !iseol(*cp)) cp++; + while (!rtld_isspace(*cp) && !iseol(*cp)) cp++; /* Skip and zero out the trailing whitespace */ - while (isspace(*cp)) *cp++ = '\0'; + while (rtld_isspace(*cp)) *cp++ = '\0'; /* Should be no extra tokens at this point */ if (!iseol(*cp)) continue; From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 12:53:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86C58106566C; Mon, 12 Mar 2012 12:53:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 751708FC0A; Mon, 12 Mar 2012 12:53:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CCrSpx062628; Mon, 12 Mar 2012 12:53:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CCrS8e062624; Mon, 12 Mar 2012 12:53:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203121253.q2CCrS8e062624@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Mar 2012 12:53:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232864 - in stable/9/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: Mon, 12 Mar 2012 12:53:28 -0000 Author: kib Date: Mon Mar 12 12:53:27 2012 New Revision: 232864 URL: http://svn.freebsd.org/changeset/base/232864 Log: MFC r232240: Currently, the debugger attached to the process executing vfork() does not get syscall exit notification until the child performed exec of exit. Swap the order of doing ptracestop() and waiting for P_PPWAIT clearing, by postponing the wait into syscallret after ptracestop() notification is done. Modified: stable/9/sys/kern/kern_fork.c stable/9/sys/kern/subr_syscall.c stable/9/sys/sys/proc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_fork.c ============================================================================== --- stable/9/sys/kern/kern_fork.c Mon Mar 12 12:29:31 2012 (r232863) +++ stable/9/sys/kern/kern_fork.c Mon Mar 12 12:53:27 2012 (r232864) @@ -708,6 +708,10 @@ do_fork(struct thread *td, int flags, st _PHOLD(p2); p2_held = 1; } + if (flags & RFPPWAIT) { + td->td_pflags |= TDP_RFPPWAIT; + td->td_rfppwait_p = p2; + } PROC_UNLOCK(p2); if ((flags & RFSTOPPED) == 0) { /* @@ -740,14 +744,6 @@ do_fork(struct thread *td, int flags, st cv_wait(&p2->p_dbgwait, &p2->p_mtx); if (p2_held) _PRELE(p2); - - /* - * Preserve synchronization semantics of vfork. If waiting for - * child to exec or exit, set P_PPWAIT on child, and sleep on our - * proc (in case of exit). - */ - while (p2->p_flag & P_PPWAIT) - cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); } Modified: stable/9/sys/kern/subr_syscall.c ============================================================================== --- stable/9/sys/kern/subr_syscall.c Mon Mar 12 12:29:31 2012 (r232863) +++ stable/9/sys/kern/subr_syscall.c Mon Mar 12 12:53:27 2012 (r232864) @@ -165,7 +165,7 @@ syscallenter(struct thread *td, struct s static inline void syscallret(struct thread *td, int error, struct syscall_args *sa __unused) { - struct proc *p; + struct proc *p, *p2; int traced; p = td->td_proc; @@ -223,4 +223,23 @@ syscallret(struct thread *td, int error, td->td_dbgflags &= ~(TDB_SCX | TDB_EXEC | TDB_FORK); PROC_UNLOCK(p); } + + if (td->td_pflags & TDP_RFPPWAIT) { + /* + * Preserve synchronization semantics of vfork. If + * waiting for child to exec or exit, fork set + * P_PPWAIT on child, and there we sleep on our proc + * (in case of exit). + * + * Do it after the ptracestop() above is finished, to + * not block our debugger until child execs or exits + * to finish vfork wait. + */ + td->td_pflags &= ~TDP_RFPPWAIT; + p2 = td->td_rfppwait_p; + PROC_LOCK(p2); + while (p2->p_flag & P_PPWAIT) + cv_wait(&p2->p_pwait, &p2->p_mtx); + PROC_UNLOCK(p2); + } } Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Mon Mar 12 12:29:31 2012 (r232863) +++ stable/9/sys/sys/proc.h Mon Mar 12 12:53:27 2012 (r232864) @@ -310,6 +310,7 @@ struct thread { struct vnet *td_vnet; /* (k) Effective vnet. */ const char *td_vnet_lpush; /* (k) Debugging vnet push / pop. */ struct trapframe *td_intr_frame;/* (k) Frame of the current irq */ + struct proc *td_rfppwait_p; /* (k) The vforked child */ }; struct mtx *thread_lock_block(struct thread *); @@ -414,6 +415,7 @@ do { \ #define TDP_CALLCHAIN 0x00400000 /* Capture thread's callchain */ #define TDP_IGNSUSP 0x00800000 /* Permission to ignore the MNTK_SUSPEND* */ #define TDP_AUDITREC 0x01000000 /* Audit record pending on thread */ +#define TDP_RFPPWAIT 0x02000000 /* Handle RFPPWAIT on syscall exit */ /* * Reasons that the current thread can not be run yet. From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 13:11:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B6A81065672 for ; Mon, 12 Mar 2012 13:11:47 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D70AA8FC1A for ; Mon, 12 Mar 2012 13:11:46 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so3594955bkc.13 for ; Mon, 12 Mar 2012 06:11:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=UQwY62aqbsXGAtyCArpfAMOMSna7dmeV63XfOiGNjUA=; b=JKLhEoKiTc/IimvAtjrhz2LbWkmBgqako4pCJHF2f5u+OvHD8rY9Ski9mKokeC2Ci5 4E/UZDgpBcRdblwGaUPm8nsVcTzFbPwHyVOsiHQCKEXRG6vYXT3ElshYRm983yoAhIeM 5d1PMhPuOeL3LzqIPt5KzZOjZs1g3vmFuUX+67hxn6aoOcmY49OSnqIahCBMhJcDXgMS YcZC/R69gO7Z15I5zCf513Zhl4sFcQJkpdwf7Uw6XfEHczYzuQbTUW3lVa0VgUDPeSic AoWHtxPxnMvBIllXfPw5n34I0L6ExUf+jIzwGI8o3YVy6lPiw75K7x8bL2gDvqmpfClb iRfQ== Received: by 10.204.151.86 with SMTP id b22mr4905586bkw.81.1331557905695; Mon, 12 Mar 2012 06:11:45 -0700 (PDT) Received: from [10.254.254.77] (ppp95-165-157-178.pppoe.spdop.ru. [95.165.157.178]) by mx.google.com with ESMTPS id f5sm25220316bke.9.2012.03.12.06.11.44 (version=SSLv3 cipher=OTHER); Mon, 12 Mar 2012 06:11:45 -0700 (PDT) Message-ID: <4F5DF60E.8040209@zonov.org> Date: Mon, 12 Mar 2012 17:11:42 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201203120106.q2C16TVP035040@svn.freebsd.org> <4F5DC99B.4080109@zonov.org> <6F09B600-7633-4434-9010-5C474759F725@FreeBSD.org> In-Reply-To: <6F09B600-7633-4434-9010-5C474759F725@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlcWZ0GYklepyKKwuiUbjmtIXIuJ6oUWxL1ffJLMfsjWUGJ/qmul0NIVMEeg9UkIWg8kKqu Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ed Maste Subject: Re: svn commit: r232844 - head/contrib/ntp/ntpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 13:11:47 -0000 On 12.03.2012 15:41, Bjoern A. Zeeb wrote: > >> [zont@ws34-005 ~]$ ifconfig >> igb0: flags=8843 metric 0 mtu 8950 >> options=500bb >> ether 00:25:90:37:8b:cc >> inet6 fe80::225:90ff:fe37:8bcc%igb0 prefixlen 64 tentative scopeid 0x1 >> inet X.X.X.X netmask 0xfffffc00 broadcast X.X.X.X >> inet6 2a02:X:X:X::X:9f09 prefixlen 64 tentative >> nd6 options=29 > > You are not doing IPv6 here, fix your rc.conf probably as told on boot to get rid of the ifdisabled. > That is new for me. Thanks! -- Andrey Zonov From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 14:07:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2D72106566B; Mon, 12 Mar 2012 14:07:57 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF7E48FC0C; Mon, 12 Mar 2012 14:07:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CE7vr8065343; Mon, 12 Mar 2012 14:07:57 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CE7v2Y065335; Mon, 12 Mar 2012 14:07:57 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201203121407.q2CE7v2Y065335@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 12 Mar 2012 14:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232865 - in head: sbin/ipfw sys/netinet 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: Mon, 12 Mar 2012 14:07:58 -0000 Author: melifaro Date: Mon Mar 12 14:07:57 2012 New Revision: 232865 URL: http://svn.freebsd.org/changeset/base/232865 Log: - Add ipfw eXtended tables permitting radix to be used for any kind of keys. - Add support for IPv6 and interface extended tables - Make number of tables to be loader tunable in range 0..65534. - Use IP_FW3 opcode for all new extended table cmds No ABI changes are introduced. Old userland will see valid tables for IPv4 tables and no entries otherwise. Flush works for any table. IP_FW3 socket option is used to encapsulate all new opcodes: /* IP_FW3 header/opcodes */ typedef struct _ip_fw3_opheader { uint16_t opcode; /* Operation opcode */ uint16_t reserved[3]; /* Align to 64-bit boundary */ } ip_fw3_opheader; New opcodes added: IP_FW_TABLE_XADD, IP_FW_TABLE_XDEL, IP_FW_TABLE_XGETSIZE, IP_FW_TABLE_XLIST ipfw(8) table argument parsing behavior is changed: 'ipfw table 999 add host' now assumes 'host' to be interface name instead of hostname. New tunable: net.inet.ip.fw.tables_max controls number of table supported by ipfw in given VNET instance. 128 is still the default value. New syntax: ipfw add skipto tablearg ip from any to any via table(42) in ipfw add skipto tablearg ip from any to any via table(4242) out This is a bit hackish, special interface name '\1' is used to signal interface table number is passed in p.glob field. Sponsored by Yandex LLC Reviewed by: ae Approved by: ae (mentor) MFC after: 4 weeks Modified: head/sbin/ipfw/ipfw.8 head/sbin/ipfw/ipfw2.c head/sys/netinet/ip_fw.h head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_private.h head/sys/netinet/ipfw/ip_fw_sockopt.c head/sys/netinet/ipfw/ip_fw_table.c Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Mon Mar 12 12:53:27 2012 (r232864) +++ head/sbin/ipfw/ipfw.8 Mon Mar 12 14:07:57 2012 (r232865) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2012 +.Dd March 9, 2012 .Dt IPFW 8 .Os .Sh NAME @@ -1539,7 +1539,7 @@ and they are always printed as hexadecim option is used, in which case symbolic resolution will be attempted). .It Cm proto Ar protocol Matches packets with the corresponding IP protocol. -.It Cm recv | xmit | via Brq Ar ifX | Ar if Ns Cm * | Ar ipno | Ar any +.It Cm recv | xmit | via Brq Ar ifX | Ar if Ns Cm * | Ar table Ns Pq Ar number Ns Op , Ns Ar value | Ar ipno | Ar any Matches packets received, transmitted or going through, respectively, the interface specified by exact name .Ns No ( Ar ifX Ns No ), @@ -1738,22 +1738,21 @@ connected networks instead of all source .El .Sh LOOKUP TABLES Lookup tables are useful to handle large sparse sets of -addresses or other search keys (e.g. ports, jail IDs). -In the rest of this section we will use the term ``address'' -to mean any unsigned value of up to 32-bit. -There may be up to 128 different lookup tables, numbered 0 to 127. +addresses or other search keys (e.g. ports, jail IDs, interface names). +In the rest of this section we will use the term ``address''. +There may be up to 4096 different lookup tables, numbered 0 to 4095. .Pp Each entry is represented by an .Ar addr Ns Op / Ns Ar masklen and will match all addresses with base .Ar addr -(specified as an IP address, a hostname or an unsigned integer) +(specified as an IPv4/IPv6 address, a hostname or an unsigned integer) and mask width of .Ar masklen bits. If .Ar masklen -is not specified, it defaults to 32. +is not specified, it defaults to 32 for IPv4 and 128 for IPv6. When looking up an IP address in a table, the most specific entry will match. Associated with each entry is a 32-bit unsigned @@ -1776,7 +1775,8 @@ Internally, each table is stored in a Ra the routing table (see .Xr route 4 ) . .Pp -Lookup tables currently support only ports, jail IDs and IPv4 addresses. +Lookup tables currently support only ports, jail IDs, IPv4/IPv6 addresses +and interface names. Wildcards is not supported for interface names. .Pp The .Cm tablearg @@ -2579,6 +2579,22 @@ instances. See .Sx SYSCTL VARIABLES for more info. +.Sh LOADER TUNABLES +Tunables can be set in +.Xr loader 8 +prompt, +.Xr loader.conf 5 +or +.Xr kenv 1 +before ipfw module gets loaded. +.Bl -tag -width indent +.It Va net.inet.ip.fw.default_to_accept: No 0 +Defines ipfw last rule behavior. This value overrides +.Cd "options IPFW_DEFAULT_TO_(ACCEPT|DENY)" +from kernel configuration file. +.It Va net.inet.ip.fw.tables_max: No 128 +Defines number of tables available in ipfw. Number cannot exceed 65534. +.El .Sh SYSCTL VARIABLES A set of .Xr sysctl 8 @@ -3112,6 +3128,16 @@ action, the table entries may include ho .Dl "ipfw table 1 add 192.168.0.0/27 router1.dmz" .Dl "..." .Dl "ipfw add 100 fwd tablearg ip from any to table(1)" +.Pp +In the following example per-interface firewall is created: +.Pp +.Dl "ipfw table 10 add vlan20 12000" +.Dl "ipfw table 10 add vlan30 13000" +.Dl "ipfw table 20 add vlan20 22000" +.Dl "ipfw table 20 add vlan30 23000" +.Dl ".." +.Dl "ipfw add 100 ipfw skipto tablearg ip from any to any recv 'table(10)' in" +.Dl "ipfw add 200 ipfw skipto tablearg ip from any to any xmit 'table(10)' out" .Ss SETS OF RULES To add a set of rules atomically, e.g.\& set 18: .Pp Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Mar 12 12:53:27 2012 (r232864) +++ head/sbin/ipfw/ipfw2.c Mon Mar 12 14:07:57 2012 (r232865) @@ -42,6 +42,7 @@ #include /* _long_to_time */ #include #include +#include /* offsetof */ #include #include /* only IFNAMSIZ */ @@ -57,6 +58,12 @@ struct cmdline_opts co; /* global option int resvd_set_number = RESVD_SET; +int ipfw_socket = -1; + +#ifndef s6_addr32 +#define s6_addr32 __u6_addr.__u6_addr32 +#endif + #define GET_UINT_ARG(arg, min, max, tok, s_x) do { \ if (!av[0]) \ errx(EX_USAGE, "%s: missing argument", match_value(s_x, tok)); \ @@ -370,33 +377,65 @@ safe_realloc(void *ptr, size_t size) int do_cmd(int optname, void *optval, uintptr_t optlen) { - static int s = -1; /* the socket */ int i; if (co.test_only) return 0; - if (s == -1) - s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); - if (s < 0) + if (ipfw_socket == -1) + ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); + if (ipfw_socket < 0) err(EX_UNAVAILABLE, "socket"); if (optname == IP_FW_GET || optname == IP_DUMMYNET_GET || - optname == IP_FW_ADD || optname == IP_FW_TABLE_LIST || - optname == IP_FW_TABLE_GETSIZE || + optname == IP_FW_ADD || optname == IP_FW3 || optname == IP_FW_NAT_GET_CONFIG || optname < 0 || optname == IP_FW_NAT_GET_LOG) { if (optname < 0) optname = -optname; - i = getsockopt(s, IPPROTO_IP, optname, optval, + i = getsockopt(ipfw_socket, IPPROTO_IP, optname, optval, (socklen_t *)optlen); } else { - i = setsockopt(s, IPPROTO_IP, optname, optval, optlen); + i = setsockopt(ipfw_socket, IPPROTO_IP, optname, optval, optlen); } return i; } +/* + * do_setcmd3 - pass ipfw control cmd to kernel + * @optname: option name + * @optval: pointer to option data + * @optlen: option length + * + * Function encapsulates option value in IP_FW3 socket option + * and calls setsockopt(). + * Function returns 0 on success or -1 otherwise. + */ +int +do_setcmd3(int optname, void *optval, socklen_t optlen) +{ + socklen_t len; + ip_fw3_opheader *op3; + + if (co.test_only) + return (0); + + if (ipfw_socket == -1) + ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); + if (ipfw_socket < 0) + err(EX_UNAVAILABLE, "socket"); + + len = sizeof(ip_fw3_opheader) + optlen; + op3 = alloca(len); + /* Zero reserved fields */ + memset(op3, 0, sizeof(ip_fw3_opheader)); + memcpy(op3 + 1, optval, optlen); + op3->opcode = optname; + + return setsockopt(ipfw_socket, IPPROTO_IP, IP_FW3, op3, len); +} + /** * match_token takes a table and a string, returns the value associated * with the string (-1 in case of failure). @@ -1411,6 +1450,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt if (cmdif->name[0] == '\0') printf(" %s %s", s, inet_ntoa(cmdif->p.ip)); + else if (cmdif->name[0] == '\1') /* interface table */ + printf(" %s table(%d)", s, cmdif->p.glob); else printf(" %s %s", s, cmdif->name); @@ -2332,7 +2373,13 @@ fill_iface(ipfw_insn_if *cmd, char *arg) /* Parse the interface or address */ if (strcmp(arg, "any") == 0) cmd->o.len = 0; /* effectively ignore this command */ - else if (!isdigit(*arg)) { + else if (strncmp(arg, "table(", 6) == 0) { + char *p = strchr(arg + 6, ','); + if (p) + *p++ = '\0'; + cmd->name[0] = '\1'; /* Special value indicating table */ + cmd->p.glob = strtoul(arg + 6, NULL, 0); + } else if (!isdigit(*arg)) { strlcpy(cmd->name, arg, sizeof(cmd->name)); cmd->p.glob = strpbrk(arg, "*?[") != NULL ? 1 : 0; } else if (!inet_aton(arg, &cmd->p.ip)) @@ -3863,7 +3910,7 @@ ipfw_flush(int force) } -static void table_list(ipfw_table_entry ent, int need_header); +static void table_list(uint16_t num, int need_header); /* * This one handles all table-related commands @@ -3875,12 +3922,12 @@ static void table_list(ipfw_table_entry void ipfw_table_handler(int ac, char *av[]) { - ipfw_table_entry ent; + ipfw_table_xentry xent; int do_add; int is_all; size_t len; char *p; - uint32_t a; + uint32_t a, type, mask, addrlen; uint32_t tables_max; len = sizeof(tables_max); @@ -3895,18 +3942,20 @@ ipfw_table_handler(int ac, char *av[]) #endif } + memset(&xent, 0, sizeof(xent)); + ac--; av++; if (ac && isdigit(**av)) { - ent.tbl = atoi(*av); + xent.tbl = atoi(*av); is_all = 0; ac--; av++; } else if (ac && _substrcmp(*av, "all") == 0) { - ent.tbl = 0; + xent.tbl = 0; is_all = 1; ac--; av++; } else errx(EX_USAGE, "table number or 'all' keyword required"); - if (ent.tbl >= tables_max) + if (xent.tbl >= tables_max) errx(EX_USAGE, "The table number exceeds the maximum allowed " "value (%d)", tables_max - 1); NEED1("table needs command"); @@ -3919,104 +3968,181 @@ ipfw_table_handler(int ac, char *av[]) do_add = **av == 'a'; ac--; av++; if (!ac) - errx(EX_USAGE, "IP address required"); - p = strchr(*av, '/'); - if (p) { - *p++ = '\0'; - ent.masklen = atoi(p); - if (ent.masklen > 32) - errx(EX_DATAERR, "bad width ``%s''", p); - } else - ent.masklen = 32; - if (lookup_host(*av, (struct in_addr *)&ent.addr) != 0) - errx(EX_NOHOST, "hostname ``%s'' unknown", *av); + errx(EX_USAGE, "address required"); + /* + * Let's try to guess type by agrument. + * Possible types: + * 1) IPv4[/mask] + * 2) IPv6[/mask] + * 3) interface name + * 4) port ? + */ + type = 0; + if (ishexnumber(*av[0])) { + /* Remove / if exists */ + if ((p = strchr(*av, '/')) != NULL) { + *p = '\0'; + mask = atoi(p + 1); + } + + if (inet_pton(AF_INET, *av, &xent.k.addr6) == 1) { + type = IPFW_TABLE_CIDR; + if ((p != NULL) && (mask > 32)) + errx(EX_DATAERR, "bad IPv4 mask width: %s", p + 1); + xent.masklen = p ? mask : 32; + addrlen = sizeof(struct in_addr); + } else if (inet_pton(AF_INET6, *av, &xent.k.addr6) == 1) { + type = IPFW_TABLE_CIDR; + if ((p != NULL) && (mask > 128)) + errx(EX_DATAERR, "bad IPv6 mask width: %s", p + 1); + xent.masklen = p ? mask : 128; + addrlen = sizeof(struct in6_addr); + } + } + + if ((type == 0) && (strchr(*av, '.') == NULL)) { + /* Assume interface name. Copy significant data only */ + mask = MIN(strlen(*av), IF_NAMESIZE - 1); + memcpy(xent.k.iface, *av, mask); + /* Set mask to exact match */ + xent.masklen = 8 * IF_NAMESIZE; + type = IPFW_TABLE_INTERFACE; + addrlen = IF_NAMESIZE; + } + + if (type == 0) { + if (lookup_host(*av, (struct in_addr *)&xent.k.addr6) != 0) + errx(EX_NOHOST, "hostname ``%s'' unknown", *av); + xent.masklen = 32; + type = IPFW_TABLE_CIDR; + addrlen = sizeof(struct in_addr); + } + + xent.type = type; + xent.len = offsetof(ipfw_table_xentry, k) + addrlen; + ac--; av++; if (do_add && ac) { unsigned int tval; /* isdigit is a bit of a hack here.. */ if (strchr(*av, (int)'.') == NULL && isdigit(**av)) { - ent.value = strtoul(*av, NULL, 0); + xent.value = strtoul(*av, NULL, 0); } else { if (lookup_host(*av, (struct in_addr *)&tval) == 0) { /* The value must be stored in host order * * so that the values < 65k can be distinguished */ - ent.value = ntohl(tval); + xent.value = ntohl(tval); } else { errx(EX_NOHOST, "hostname ``%s'' unknown", *av); } } } else - ent.value = 0; - if (do_cmd(do_add ? IP_FW_TABLE_ADD : IP_FW_TABLE_DEL, - &ent, sizeof(ent)) < 0) { + xent.value = 0; + if (do_setcmd3(do_add ? IP_FW_TABLE_XADD : IP_FW_TABLE_XDEL, + &xent, xent.len) < 0) { /* If running silent, don't bomb out on these errors. */ if (!(co.do_quiet && (errno == (do_add ? EEXIST : ESRCH)))) err(EX_OSERR, "setsockopt(IP_FW_TABLE_%s)", - do_add ? "ADD" : "DEL"); + do_add ? "XADD" : "XDEL"); /* In silent mode, react to a failed add by deleting */ if (do_add) { - do_cmd(IP_FW_TABLE_DEL, &ent, sizeof(ent)); - if (do_cmd(IP_FW_TABLE_ADD, - &ent, sizeof(ent)) < 0) + do_setcmd3(IP_FW_TABLE_XDEL, &xent, xent.len); + if (do_setcmd3(IP_FW_TABLE_XADD, &xent, xent.len) < 0) err(EX_OSERR, - "setsockopt(IP_FW_TABLE_ADD)"); + "setsockopt(IP_FW_TABLE_XADD)"); } } } else if (_substrcmp(*av, "flush") == 0) { - a = is_all ? tables_max : (uint32_t)(ent.tbl + 1); + a = is_all ? tables_max : (uint32_t)(xent.tbl + 1); do { - if (do_cmd(IP_FW_TABLE_FLUSH, &ent.tbl, - sizeof(ent.tbl)) < 0) + if (do_cmd(IP_FW_TABLE_FLUSH, &xent.tbl, + sizeof(xent.tbl)) < 0) err(EX_OSERR, "setsockopt(IP_FW_TABLE_FLUSH)"); - } while (++ent.tbl < a); + } while (++xent.tbl < a); } else if (_substrcmp(*av, "list") == 0) { - a = is_all ? tables_max : (uint32_t)(ent.tbl + 1); + a = is_all ? tables_max : (uint32_t)(xent.tbl + 1); do { - table_list(ent, is_all); - } while (++ent.tbl < a); + table_list(xent.tbl, is_all); + } while (++xent.tbl < a); } else errx(EX_USAGE, "invalid table command %s", *av); } static void -table_list(ipfw_table_entry ent, int need_header) +table_list(uint16_t num, int need_header) { - ipfw_table *tbl; + ipfw_xtable *tbl; + ipfw_table_xentry *xent; socklen_t l; - uint32_t a; - - a = ent.tbl; - l = sizeof(a); - if (do_cmd(IP_FW_TABLE_GETSIZE, &a, (uintptr_t)&l) < 0) - err(EX_OSERR, "getsockopt(IP_FW_TABLE_GETSIZE)"); + uint32_t *a, sz, tval; + char tbuf[128]; + struct in6_addr *addr6; + ip_fw3_opheader *op3; + + /* Prepend value with IP_FW3 header */ + l = sizeof(ip_fw3_opheader) + sizeof(uint32_t); + op3 = alloca(l); + /* Zero reserved fields */ + memset(op3, 0, sizeof(ip_fw3_opheader)); + a = (uint32_t *)(op3 + 1); + *a = num; + op3->opcode = IP_FW_TABLE_XGETSIZE; + if (do_cmd(IP_FW3, op3, (uintptr_t)&l) < 0) + err(EX_OSERR, "getsockopt(IP_FW_TABLE_XGETSIZE)"); /* If a is zero we have nothing to do, the table is empty. */ - if (a == 0) + if (*a == 0) return; - l = sizeof(*tbl) + a * sizeof(ipfw_table_entry); + l = *a; tbl = safe_calloc(1, l); - tbl->tbl = ent.tbl; - if (do_cmd(IP_FW_TABLE_LIST, tbl, (uintptr_t)&l) < 0) - err(EX_OSERR, "getsockopt(IP_FW_TABLE_LIST)"); + tbl->opheader.opcode = IP_FW_TABLE_XLIST; + tbl->tbl = num; + if (do_cmd(IP_FW3, tbl, (uintptr_t)&l) < 0) + err(EX_OSERR, "getsockopt(IP_FW_TABLE_XLIST)"); if (tbl->cnt && need_header) printf("---table(%d)---\n", tbl->tbl); - for (a = 0; a < tbl->cnt; a++) { - unsigned int tval; - tval = tbl->ent[a].value; - if (co.do_value_as_ip) { - char tbuf[128]; - strncpy(tbuf, inet_ntoa(*(struct in_addr *) - &tbl->ent[a].addr), 127); - /* inet_ntoa expects network order */ - tval = htonl(tval); - printf("%s/%u %s\n", tbuf, tbl->ent[a].masklen, - inet_ntoa(*(struct in_addr *)&tval)); - } else { - printf("%s/%u %u\n", - inet_ntoa(*(struct in_addr *)&tbl->ent[a].addr), - tbl->ent[a].masklen, tval); + sz = tbl->size - sizeof(ipfw_xtable); + xent = &tbl->xent[0]; + while (sz > 0) { + switch (tbl->type) { + case IPFW_TABLE_CIDR: + /* IPv4 or IPv6 prefixes */ + tval = xent->value; + addr6 = &xent->k.addr6; + + if ((addr6->s6_addr32[0] == 0) && (addr6->s6_addr32[1] == 0) && + (addr6->s6_addr32[2] == 0)) { + /* IPv4 address */ + inet_ntop(AF_INET, &addr6->s6_addr32[3], tbuf, sizeof(tbuf)); + } else { + /* IPv6 address */ + inet_ntop(AF_INET6, addr6, tbuf, sizeof(tbuf)); + } + + if (co.do_value_as_ip) { + tval = htonl(tval); + printf("%s/%u %s\n", tbuf, xent->masklen, + inet_ntoa(*(struct in_addr *)&tval)); + } else + printf("%s/%u %u\n", tbuf, xent->masklen, tval); + break; + case IPFW_TABLE_INTERFACE: + /* Interface names */ + tval = xent->value; + if (co.do_value_as_ip) { + tval = htonl(tval); + printf("%s %s\n", xent->k.iface, + inet_ntoa(*(struct in_addr *)&tval)); + } else + printf("%s %u\n", xent->k.iface, tval); } + + if (sz < xent->len) + break; + sz -= xent->len; + xent = (void *)xent + xent->len; } + free(tbl); } Modified: head/sys/netinet/ip_fw.h ============================================================================== --- head/sys/netinet/ip_fw.h Mon Mar 12 12:53:27 2012 (r232864) +++ head/sys/netinet/ip_fw.h Mon Mar 12 14:07:57 2012 (r232865) @@ -37,8 +37,7 @@ #define IPFW_DEFAULT_RULE 65535 /* - * The number of ipfw tables. The maximum allowed table number is the - * (IPFW_TABLES_MAX - 1). + * Default number of ipfw tables. */ #define IPFW_TABLES_MAX 128 @@ -62,6 +61,19 @@ */ #define IPFW_CALLSTACK_SIZE 16 +/* IP_FW3 header/opcodes */ +typedef struct _ip_fw3_opheader { + uint16_t opcode; /* Operation opcode */ + uint16_t reserved[3]; /* Align to 64-bit boundary */ +} ip_fw3_opheader; + + +/* IPFW extented tables support */ +#define IP_FW_TABLE_XADD 86 /* add entry */ +#define IP_FW_TABLE_XDEL 87 /* delete entry */ +#define IP_FW_TABLE_XGETSIZE 88 /* get table size */ +#define IP_FW_TABLE_XLIST 89 /* list table contents */ + /* * The kernel representation of ipfw rules is made of a list of * 'instructions' (for all practical purposes equivalent to BPF @@ -581,6 +593,11 @@ struct _ipfw_dyn_rule { /* * These are used for lookup tables. */ + +#define IPFW_TABLE_CIDR 1 /* Table for holding IPv4/IPv6 prefixes */ +#define IPFW_TABLE_INTERFACE 2 /* Table for holding interface names */ +#define IPFW_TABLE_MAXTYPE 2 /* Maximum valid number */ + typedef struct _ipfw_table_entry { in_addr_t addr; /* network address */ u_int32_t value; /* value */ @@ -588,6 +605,19 @@ typedef struct _ipfw_table_entry { u_int8_t masklen; /* mask length */ } ipfw_table_entry; +typedef struct _ipfw_table_xentry { + uint16_t len; /* Total entry length */ + uint8_t type; /* entry type */ + uint8_t masklen; /* mask length */ + uint16_t tbl; /* table number */ + uint32_t value; /* value */ + union { + /* Longest field needs to be aligned by 4-byte boundary */ + struct in6_addr addr6; /* IPv6 address */ + char iface[IF_NAMESIZE]; /* interface name */ + } k; +} ipfw_table_xentry; + typedef struct _ipfw_table { u_int32_t size; /* size of entries in bytes */ u_int32_t cnt; /* # of entries */ @@ -595,4 +625,13 @@ typedef struct _ipfw_table { ipfw_table_entry ent[0]; /* entries */ } ipfw_table; +typedef struct _ipfw_xtable { + ip_fw3_opheader opheader; /* eXtended tables are controlled via IP_FW3 */ + uint32_t size; /* size of entries in bytes */ + uint32_t cnt; /* # of entries */ + uint16_t tbl; /* table number */ + uint8_t type; /* table type */ + ipfw_table_xentry xent[0]; /* entries */ +} ipfw_xtable; + #endif /* _IPFW2_H */ Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Mon Mar 12 12:53:27 2012 (r232864) +++ head/sys/netinet/ipfw/ip_fw2.c Mon Mar 12 14:07:57 2012 (r232865) @@ -116,6 +116,9 @@ static int default_to_accept; VNET_DEFINE(int, autoinc_step); VNET_DEFINE(int, fw_one_pass) = 1; +/* Use 128 tables by default */ +VNET_DEFINE(int, fw_tables_max) = IPFW_TABLES_MAX; + /* * Each rule belongs to one of 32 different sets (0..31). * The variable set_disable contains one bit per set. @@ -145,7 +148,6 @@ ipfw_nat_cfg_t *ipfw_nat_get_log_ptr; #ifdef SYSCTL_NODE uint32_t dummy_def = IPFW_DEFAULT_RULE; -uint32_t dummy_tables_max = IPFW_TABLES_MAX; SYSBEGIN(f3) @@ -166,12 +168,13 @@ SYSCTL_UINT(_net_inet_ip_fw, OID_AUTO, d &dummy_def, 0, "The default/max possible rule number."); SYSCTL_UINT(_net_inet_ip_fw, OID_AUTO, tables_max, CTLFLAG_RD, - &dummy_tables_max, 0, + &V_fw_tables_max, 0, "The maximum number of tables."); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, default_to_accept, CTLFLAG_RDTUN, &default_to_accept, 0, "Make the default rule accept all packets."); TUNABLE_INT("net.inet.ip.fw.default_to_accept", &default_to_accept); +TUNABLE_INT("net.inet.ip.fw.tables_max", &V_fw_tables_max); SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, static_count, CTLFLAG_RD, &VNET_NAME(layer3_chain.n_rules), 0, "Number of static rules"); @@ -341,12 +344,15 @@ tcpopts_match(struct tcphdr *tcp, ipfw_i } static int -iface_match(struct ifnet *ifp, ipfw_insn_if *cmd) +iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) { if (ifp == NULL) /* no iface with this packet, match fails */ return 0; /* Check by name or by IP address */ if (cmd->name[0] != '\0') { /* match by name */ + if (cmd->name[0] == '\1') /* use tablearg to match */ + return ipfw_lookup_table_extended(chain, cmd->p.glob, + ifp->if_xname, tablearg, IPFW_TABLE_INTERFACE); /* Check name */ if (cmd->p.glob) { if (fnmatch(cmd->name, ifp->if_xname, 0) == 0) @@ -1312,16 +1318,18 @@ do { \ case O_RECV: match = iface_match(m->m_pkthdr.rcvif, - (ipfw_insn_if *)cmd); + (ipfw_insn_if *)cmd, chain, &tablearg); break; case O_XMIT: - match = iface_match(oif, (ipfw_insn_if *)cmd); + match = iface_match(oif, (ipfw_insn_if *)cmd, + chain, &tablearg); break; case O_VIA: match = iface_match(oif ? oif : - m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd); + m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd, + chain, &tablearg); break; case O_MACADDR2: @@ -1448,6 +1456,17 @@ do { \ ((ipfw_insn_u32 *)cmd)->d[0] == v; else tablearg = v; + } else if (is_ipv6) { + uint32_t v = 0; + void *pkey = (cmd->opcode == O_IP_DST_LOOKUP) ? + &args->f_id.dst_ip6: &args->f_id.src_ip6; + match = ipfw_lookup_table_extended(chain, + cmd->arg1, pkey, &v, + IPFW_TABLE_CIDR); + if (cmdlen == F_INSN_SIZE(ipfw_insn_u32)) + match = ((ipfw_insn_u32 *)cmd)->d[0] == v; + if (match) + tablearg = v; } break; @@ -2566,22 +2585,24 @@ vnet_ipfw_init(const void *unused) LIST_INIT(&chain->nat); #endif + /* Check user-supplied number for validness */ + if (V_fw_tables_max < 0) + V_fw_tables_max = IPFW_TABLES_MAX; + if (V_fw_tables_max > 65534) + V_fw_tables_max = 65534; + /* insert the default rule and create the initial map */ chain->n_rules = 1; chain->static_len = sizeof(struct ip_fw); - chain->map = malloc(sizeof(struct ip_fw *), M_IPFW, M_NOWAIT | M_ZERO); + chain->map = malloc(sizeof(struct ip_fw *), M_IPFW, M_WAITOK | M_ZERO); if (chain->map) - rule = malloc(chain->static_len, M_IPFW, M_NOWAIT | M_ZERO); - if (rule == NULL) { - if (chain->map) - free(chain->map, M_IPFW); - printf("ipfw2: ENOSPC initializing default rule " - "(support disabled)\n"); - return (ENOSPC); - } + rule = malloc(chain->static_len, M_IPFW, M_WAITOK | M_ZERO); error = ipfw_init_tables(chain); if (error) { - panic("init_tables"); /* XXX Marko fix this ! */ + printf("ipfw2: setting up tables failed\n"); + free(chain->map, M_IPFW); + free(rule, M_IPFW); + return (ENOSPC); } /* fill and insert the default rule */ @@ -2644,12 +2665,12 @@ vnet_ipfw_uninit(const void *unused) IPFW_UH_WLOCK(chain); IPFW_WLOCK(chain); + ipfw_dyn_uninit(0); /* run the callout_drain */ IPFW_WUNLOCK(chain); - IPFW_WLOCK(chain); - ipfw_dyn_uninit(0); /* run the callout_drain */ ipfw_destroy_tables(chain); reap = NULL; + IPFW_WLOCK(chain); for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; rule->x_next = reap; Modified: head/sys/netinet/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netinet/ipfw/ip_fw_private.h Mon Mar 12 12:53:27 2012 (r232864) +++ head/sys/netinet/ipfw/ip_fw_private.h Mon Mar 12 14:07:57 2012 (r232865) @@ -209,6 +209,9 @@ VNET_DECLARE(u_int32_t, set_disable); VNET_DECLARE(int, autoinc_step); #define V_autoinc_step VNET(autoinc_step) +VNET_DECLARE(int, fw_tables_max); +#define V_fw_tables_max VNET(fw_tables_max) + struct ip_fw_chain { struct ip_fw *rules; /* list of rules */ struct ip_fw *reap; /* list of rules to reap */ @@ -217,7 +220,9 @@ struct ip_fw_chain { int static_len; /* total len of static rules */ struct ip_fw **map; /* array of rule ptrs to ease lookup */ LIST_HEAD(nat_list, cfg_nat) nat; /* list of nat entries */ - struct radix_node_head *tables[IPFW_TABLES_MAX]; + struct radix_node_head **tables; /* IPv4 tables */ + struct radix_node_head **xtables; /* extended tables */ + uint8_t *tabletype; /* Array of table types */ #if defined( __linux__ ) || defined( _WIN32 ) spinlock_t rwmtx; spinlock_t uh_lock; @@ -273,16 +278,20 @@ int ipfw_check_hook(void *arg, struct mb struct radix_node; int ipfw_lookup_table(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, uint32_t *val); +int ipfw_lookup_table_extended(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, + uint32_t *val, int type); int ipfw_init_tables(struct ip_fw_chain *ch); void ipfw_destroy_tables(struct ip_fw_chain *ch); int ipfw_flush_table(struct ip_fw_chain *ch, uint16_t tbl); -int ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, - uint8_t mlen, uint32_t value); -int ipfw_dump_table_entry(struct radix_node *rn, void *arg); -int ipfw_del_table_entry(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, - uint8_t mlen); +int ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, + uint8_t plen, uint8_t mlen, uint8_t type, uint32_t value); +int ipfw_del_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, + uint8_t plen, uint8_t mlen, uint8_t type); int ipfw_count_table(struct ip_fw_chain *ch, uint32_t tbl, uint32_t *cnt); +int ipfw_dump_table_entry(struct radix_node *rn, void *arg); int ipfw_dump_table(struct ip_fw_chain *ch, ipfw_table *tbl); +int ipfw_count_xtable(struct ip_fw_chain *ch, uint32_t tbl, uint32_t *cnt); +int ipfw_dump_xtable(struct ip_fw_chain *ch, ipfw_xtable *tbl); /* In ip_fw_nat.c -- XXX to be moved to ip_var.h */ Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_sockopt.c Mon Mar 12 12:53:27 2012 (r232864) +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Mon Mar 12 14:07:57 2012 (r232865) @@ -667,7 +667,6 @@ check_ipfw_struct(struct ip_fw *rule, in cmdlen != F_INSN_SIZE(ipfw_insn_u32)) goto bad_size; break; - case O_MACADDR2: if (cmdlen != F_INSN_SIZE(ipfw_insn_mac)) goto bad_size; @@ -941,6 +940,7 @@ ipfw_getrules(struct ip_fw_chain *chain, } +#define IP_FW3_OPLENGTH(x) ((x)->sopt_valsize - sizeof(ip_fw3_opheader)) /** * {set|get}sockopt parser. */ @@ -949,10 +949,13 @@ ipfw_ctl(struct sockopt *sopt) { #define RULE_MAXSIZE (256*sizeof(u_int32_t)) int error; - size_t size; + size_t size, len, valsize; struct ip_fw *buf, *rule; struct ip_fw_chain *chain; u_int32_t rulenum[2]; + uint32_t opt; + char xbuf[128]; + ip_fw3_opheader *op3 = NULL; error = priv_check(sopt->sopt_td, PRIV_NETINET_IPFW); if (error) @@ -972,7 +975,21 @@ ipfw_ctl(struct sockopt *sopt) chain = &V_layer3_chain; error = 0; - switch (sopt->sopt_name) { + /* Save original valsize before it is altered via sooptcopyin() */ + valsize = sopt->sopt_valsize; + if ((opt = sopt->sopt_name) == IP_FW3) { + /* + * Copy not less than sizeof(ip_fw3_opheader). + * We hope any IP_FW3 command will fit into 128-byte buffer. + */ + if ((error = sooptcopyin(sopt, xbuf, sizeof(xbuf), + sizeof(ip_fw3_opheader))) != 0) + return (error); + op3 = (ip_fw3_opheader *)xbuf; + opt = op3->opcode; + } + + switch (opt) { case IP_FW_GET: /* * pass up a copy of the current rules. Static rules @@ -1111,7 +1128,8 @@ ipfw_ctl(struct sockopt *sopt) if (error) break; error = ipfw_add_table_entry(chain, ent.tbl, - ent.addr, ent.masklen, ent.value); + &ent.addr, sizeof(ent.addr), ent.masklen, + IPFW_TABLE_CIDR, ent.value); } break; @@ -1124,7 +1142,34 @@ ipfw_ctl(struct sockopt *sopt) if (error) break; error = ipfw_del_table_entry(chain, ent.tbl, - ent.addr, ent.masklen); + &ent.addr, sizeof(ent.addr), ent.masklen, IPFW_TABLE_CIDR); + } + break; + + case IP_FW_TABLE_XADD: /* IP_FW3 */ + case IP_FW_TABLE_XDEL: /* IP_FW3 */ + { + ipfw_table_xentry *xent = (ipfw_table_xentry *)(op3 + 1); + + /* Check minimum header size */ + if (IP_FW3_OPLENGTH(sopt) < offsetof(ipfw_table_xentry, k)) { + error = EINVAL; + break; + } + + /* Check if len field is valid */ + if (xent->len > sizeof(ipfw_table_xentry)) { + error = EINVAL; + break; + } + + len = xent->len - offsetof(ipfw_table_xentry, k); + + error = (opt == IP_FW_TABLE_XADD) ? + ipfw_add_table_entry(chain, xent->tbl, &xent->k, + len, xent->masklen, xent->type, xent->value) : + ipfw_del_table_entry(chain, xent->tbl, &xent->k, + len, xent->masklen, xent->type); } break; @@ -1136,9 +1181,7 @@ ipfw_ctl(struct sockopt *sopt) sizeof(tbl), sizeof(tbl)); if (error) break; - IPFW_WLOCK(chain); error = ipfw_flush_table(chain, tbl); - IPFW_WUNLOCK(chain); } break; @@ -1187,6 +1230,62 @@ ipfw_ctl(struct sockopt *sopt) } break; + case IP_FW_TABLE_XGETSIZE: /* IP_FW3 */ + { + uint32_t *tbl; + + if (IP_FW3_OPLENGTH(sopt) < sizeof(uint32_t)) { + error = EINVAL; + break; + } + + tbl = (uint32_t *)(op3 + 1); + + IPFW_RLOCK(chain); + error = ipfw_count_xtable(chain, *tbl, tbl); + IPFW_RUNLOCK(chain); + if (error) + break; + error = sooptcopyout(sopt, op3, sopt->sopt_valsize); + } + break; + + case IP_FW_TABLE_XLIST: /* IP_FW3 */ + { + ipfw_xtable *tbl; + + if ((size = valsize) < sizeof(ipfw_xtable)) { + error = EINVAL; + break; + } + + tbl = malloc(size, M_TEMP, M_ZERO | M_WAITOK); + memcpy(tbl, op3, sizeof(ipfw_xtable)); + + /* Get maximum number of entries we can store */ + tbl->size = (size - sizeof(ipfw_xtable)) / + sizeof(ipfw_table_xentry); + IPFW_RLOCK(chain); + error = ipfw_dump_xtable(chain, tbl); + IPFW_RUNLOCK(chain); + if (error) { + free(tbl, M_TEMP); + break; + } + + /* Revert size field back to bytes */ + tbl->size = tbl->size * sizeof(ipfw_table_xentry) + + sizeof(ipfw_table); + /* + * Since we call sooptcopyin() with small buffer, sopt_valsize is + * decreased to reflect supplied buffer size. Set it back to original value + */ + sopt->sopt_valsize = valsize; + error = sooptcopyout(sopt, tbl, size); + free(tbl, M_TEMP); + } + break; + /*--- NAT operations are protected by the IPFW_LOCK ---*/ case IP_FW_NAT_CFG: if (IPFW_NAT_LOADED) Modified: head/sys/netinet/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_table.c Mon Mar 12 12:53:27 2012 (r232864) +++ head/sys/netinet/ipfw/ip_fw_table.c Mon Mar 12 14:07:57 2012 (r232865) @@ -76,6 +76,29 @@ struct table_entry { u_int32_t value; }; +struct xaddr_iface { + uint8_t if_len; /* length of this struct */ + uint8_t pad[7]; /* Align name */ + char ifname[IF_NAMESIZE]; /* Interface name */ +}; + +struct table_xentry { + struct radix_node rn[2]; + union { +#ifdef INET6 + struct sockaddr_in6 addr6; +#endif + struct xaddr_iface iface; + } a; + union { +#ifdef INET6 + struct sockaddr_in6 mask6; +#endif + struct xaddr_iface ifmask; + } m; + u_int32_t value; +}; + /* * The radix code expects addr and mask to be array of bytes, * with the first byte being the length of the array. rn_inithead @@ -87,57 +110,275 @@ struct table_entry { */ #define KEY_LEN(v) *((uint8_t *)&(v)) #define KEY_OFS (8*offsetof(struct sockaddr_in, sin_addr)) +/* + * Do not require radix to compare more than actual IPv4/IPv6 address + */ +#define KEY_LEN_INET (offsetof(struct sockaddr_in, sin_addr) + sizeof(in_addr_t)) +#define KEY_LEN_INET6 (offsetof(struct sockaddr_in6, sin6_addr) + sizeof(struct in6_addr)) +#define KEY_LEN_IFACE (offsetof(struct xaddr_iface, ifname)) + +#define OFF_LEN_INET (8 * offsetof(struct sockaddr_in, sin_addr)) +#define OFF_LEN_INET6 (8 * offsetof(struct sockaddr_in6, sin6_addr)) +#define OFF_LEN_IFACE (8 * offsetof(struct xaddr_iface, ifname)) + + +static inline void +ipv6_writemask(struct in6_addr *addr6, uint8_t mask) +{ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 14:32:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D617D106566B; Mon, 12 Mar 2012 14:32:46 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 637BD8FC12; Mon, 12 Mar 2012 14:32:46 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 412C625D39FF; Mon, 12 Mar 2012 14:32:45 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 5C75BBDD3DD; Mon, 12 Mar 2012 14:32:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 0fskDlNgn+er; Mon, 12 Mar 2012 14:32:36 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 6B569BDD3DA; Mon, 12 Mar 2012 14:32:36 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201203121407.q2CE7v2Y065335@svn.freebsd.org> Date: Mon, 12 Mar 2012 14:32:35 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201203121407.q2CE7v2Y065335@svn.freebsd.org> To: Alexander V. Chernikov X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232865 - in head: sbin/ipfw sys/netinet 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: Mon, 12 Mar 2012 14:32:46 -0000 On 12. Mar 2012, at 14:07 , Alexander V. Chernikov wrote: > Author: melifaro > Date: Mon Mar 12 14:07:57 2012 > New Revision: 232865 > URL: http://svn.freebsd.org/changeset/base/232865 >=20 > Log: > Sponsored by Yandex LLC >=20 > Reviewed by: ae > Approved by: ae (mentor) This broke at least VIMAGE builds: = /scratch/tmp/bz/head.svn/sys/modules/ipfw/../../netinet/ipfw/ip_fw2.c:170:= error: initializer element is not constant = /scratch/tmp/bz/head.svn/sys/modules/ipfw/../../netinet/ipfw/ip_fw2.c:170:= error: (near initialization for = 'sysctl___net_inet_ip_fw_tables_max.oid_arg1') = /scratch/tmp/bz/head.svn/sys/modules/ipfw/../../netinet/ipfw/ip_fw2.c:177:= error: initializer element is not constant = /scratch/tmp/bz/head.svn/sys/modules/ipfw/../../netinet/ipfw/ip_fw2.c:177:= error: (near initialization for '__tunable_int_177.var') --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 15:05:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3672C106566C; Mon, 12 Mar 2012 15:05:18 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 260348FC15; Mon, 12 Mar 2012 15:05:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CF5I3H069139; Mon, 12 Mar 2012 15:05:18 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CF5H9l069137; Mon, 12 Mar 2012 15:05:17 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201203121505.q2CF5H9l069137@svn.freebsd.org> From: Randall Stewart Date: Mon, 12 Mar 2012 15:05:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232866 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 15:05:18 -0000 Author: rrs Date: Mon Mar 12 15:05:17 2012 New Revision: 232866 URL: http://svn.freebsd.org/changeset/base/232866 Log: This fixes PR 165210. Basically we just add in the netgraph interface to the list of acceptable interfaces. A todo at the next IETF code blitz, though is we need to review why we screen interfaces, there was a reason ;-). PR: 165210 MFC after: 1 week Modified: head/sys/netinet/sctp_bsd_addr.c Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Mon Mar 12 14:07:57 2012 (r232865) +++ head/sys/netinet/sctp_bsd_addr.c Mon Mar 12 15:05:17 2012 (r232866) @@ -184,6 +184,7 @@ sctp_is_desired_interface_type(struct if case IFT_IP: case IFT_IPOVERCDLC: case IFT_IPOVERCLAW: + case IFT_PROPVIRTUAL: /* NetGraph Virtual too */ case IFT_VIRTUALIPADDRESS: result = 1; break; From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 15:41:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2471C1065675; Mon, 12 Mar 2012 15:41:37 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1365E8FC08; Mon, 12 Mar 2012 15:41:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CFfaEe071070; Mon, 12 Mar 2012 15:41:36 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CFfa5G071067; Mon, 12 Mar 2012 15:41:36 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201203121541.q2CFfa5G071067@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 12 Mar 2012 15:41: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: r232868 - 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: Mon, 12 Mar 2012 15:41:37 -0000 Author: melifaro Date: Mon Mar 12 15:41:36 2012 New Revision: 232868 URL: http://svn.freebsd.org/changeset/base/232868 Log: Fix VNET build broken by r232865. Temporary remove the ability to assign different number of tables per VNET instance. Modified: head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_private.h Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Mon Mar 12 15:13:17 2012 (r232867) +++ head/sys/netinet/ipfw/ip_fw2.c Mon Mar 12 15:41:36 2012 (r232868) @@ -117,7 +117,7 @@ VNET_DEFINE(int, autoinc_step); VNET_DEFINE(int, fw_one_pass) = 1; /* Use 128 tables by default */ -VNET_DEFINE(int, fw_tables_max) = IPFW_TABLES_MAX; +int fw_tables_max = IPFW_TABLES_MAX; /* * Each rule belongs to one of 32 different sets (0..31). Modified: head/sys/netinet/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netinet/ipfw/ip_fw_private.h Mon Mar 12 15:13:17 2012 (r232867) +++ head/sys/netinet/ipfw/ip_fw_private.h Mon Mar 12 15:41:36 2012 (r232868) @@ -209,8 +209,8 @@ VNET_DECLARE(u_int32_t, set_disable); VNET_DECLARE(int, autoinc_step); #define V_autoinc_step VNET(autoinc_step) -VNET_DECLARE(int, fw_tables_max); -#define V_fw_tables_max VNET(fw_tables_max) +extern int fw_tables_max; +#define V_fw_tables_max fw_tables_max struct ip_fw_chain { struct ip_fw *rules; /* list of rules */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 17:19:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC3631065670; Mon, 12 Mar 2012 17:19:00 +0000 (UTC) (envelope-from zec@fer.hr) Received: from munja.zvne.fer.hr (munja.zvne.fer.hr [161.53.66.248]) by mx1.freebsd.org (Postfix) with ESMTP id 357CE8FC0A; Mon, 12 Mar 2012 17:18:59 +0000 (UTC) Received: from sluga.fer.hr ([161.53.66.244]) by munja.zvne.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Mon, 12 Mar 2012 18:17:49 +0100 Received: from localhost ([161.53.19.8]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Mon, 12 Mar 2012 18:17:49 +0100 From: Marko Zec To: "Alexander V. Chernikov" Date: Mon, 12 Mar 2012 18:17:40 +0100 User-Agent: KMail/1.9.10 References: <201203121541.q2CFfa5G071067@svn.freebsd.org> In-Reply-To: <201203121541.q2CFfa5G071067@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201203121817.41503.zec@fer.hr> X-OriginalArrivalTime: 12 Mar 2012 17:17:49.0777 (UTC) FILETIME=[0CFDAC10:01CD0074] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232868 - 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: Mon, 12 Mar 2012 17:19:00 -0000 On Monday 12 March 2012 16:41:36 Alexander V. Chernikov wrote: > Author: melifaro > Date: Mon Mar 12 15:41:36 2012 > New Revision: 232868 > URL: http://svn.freebsd.org/changeset/base/232868 > > Log: > Fix VNET build broken by r232865. > Temporary remove the ability to assign different number of tables per > VNET instance. Please don't let your code remain in this state for too long. You've declared V_fw_tables_max to unconditionally resolve to a true global variable, which violates the convention of using V_ prefix in networking code exclusively for the purpose of denoting VNET-virtualized state. Thanks, Marko > Modified: > head/sys/netinet/ipfw/ip_fw2.c > head/sys/netinet/ipfw/ip_fw_private.h > > Modified: head/sys/netinet/ipfw/ip_fw2.c > =========================================================================== >=== --- head/sys/netinet/ipfw/ip_fw2.c Mon Mar 12 15:13:17 2012 (r232867) > +++ head/sys/netinet/ipfw/ip_fw2.c Mon Mar 12 15:41:36 2012 (r232868) @@ > -117,7 +117,7 @@ VNET_DEFINE(int, autoinc_step); > VNET_DEFINE(int, fw_one_pass) = 1; > > /* Use 128 tables by default */ > -VNET_DEFINE(int, fw_tables_max) = IPFW_TABLES_MAX; > +int fw_tables_max = IPFW_TABLES_MAX; > > /* > * Each rule belongs to one of 32 different sets (0..31). > > Modified: head/sys/netinet/ipfw/ip_fw_private.h > =========================================================================== >=== --- head/sys/netinet/ipfw/ip_fw_private.h Mon Mar 12 15:13:17 > 2012 (r232867) +++ head/sys/netinet/ipfw/ip_fw_private.h Mon Mar 12 > 15:41:36 2012 (r232868) @@ -209,8 +209,8 @@ VNET_DECLARE(u_int32_t, > set_disable); > VNET_DECLARE(int, autoinc_step); > #define V_autoinc_step VNET(autoinc_step) > > -VNET_DECLARE(int, fw_tables_max); > -#define V_fw_tables_max VNET(fw_tables_max) > +extern int fw_tables_max; > +#define V_fw_tables_max fw_tables_max > > struct ip_fw_chain { > struct ip_fw *rules; /* list of rules */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 17:25:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 626991065670; Mon, 12 Mar 2012 17:25:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51D578FC17; Mon, 12 Mar 2012 17:25:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CHPaFS076170; Mon, 12 Mar 2012 17:25:36 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CHPadr076168; Mon, 12 Mar 2012 17:25:36 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203121725.q2CHPadr076168@svn.freebsd.org> From: Adrian Chadd Date: Mon, 12 Mar 2012 17:25: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: r232869 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 17:25:36 -0000 Author: adrian Date: Mon Mar 12 17:25:35 2012 New Revision: 232869 URL: http://svn.freebsd.org/changeset/base/232869 Log: This header file no longer exists when doing cross builds, so remove it. mips24k hwpmc now compiles again. Modified: head/sys/dev/hwpmc/hwpmc_mips24k.c Modified: head/sys/dev/hwpmc/hwpmc_mips24k.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mips24k.c Mon Mar 12 15:41:36 2012 (r232868) +++ head/sys/dev/hwpmc/hwpmc_mips24k.c Mon Mar 12 17:25:35 2012 (r232869) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include /* From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 17:54:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8DEC9106566B; Mon, 12 Mar 2012 17:54:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62B178FC0A; Mon, 12 Mar 2012 17:54:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CHsITo077331; Mon, 12 Mar 2012 17:54:18 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CHsIgS077329; Mon, 12 Mar 2012 17:54:18 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203121754.q2CHsIgS077329@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 12 Mar 2012 17:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232870 - stable/9/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 17:54:18 -0000 Author: hselasky Date: Mon Mar 12 17:54:17 2012 New Revision: 232870 URL: http://svn.freebsd.org/changeset/base/232870 Log: MFC r232448: Make sure that the USB system suspend event is executed synchronously and not asynchronously. Modified: stable/9/sys/dev/usb/controller/usb_controller.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/9/sys/dev/usb/controller/usb_controller.c Mon Mar 12 17:25:35 2012 (r232869) +++ stable/9/sys/dev/usb/controller/usb_controller.c Mon Mar 12 17:54:17 2012 (r232870) @@ -89,10 +89,15 @@ TUNABLE_INT("hw.usb.no_boot_wait", &usb_ SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, &usb_no_boot_wait, 0, "No USB device enumerate waiting at boot."); +static int usb_no_suspend_wait = 0; +TUNABLE_INT("hw.usb.no_suspend_wait", &usb_no_suspend_wait); +SYSCTL_INT(_hw_usb, OID_AUTO, no_suspend_wait, CTLFLAG_RW|CTLFLAG_TUN, + &usb_no_suspend_wait, 0, "No USB device waiting at system suspend."); + static int usb_no_shutdown_wait = 0; TUNABLE_INT("hw.usb.no_shutdown_wait", &usb_no_shutdown_wait); -SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RW|CTLFLAG_TUN, &usb_no_shutdown_wait, 0, - "No USB device waiting at system shutdown."); +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RW|CTLFLAG_TUN, + &usb_no_shutdown_wait, 0, "No USB device waiting at system shutdown."); static devclass_t usb_devclass; @@ -239,6 +244,11 @@ usb_suspend(device_t dev) USB_BUS_LOCK(bus); usb_proc_msignal(&bus->explore_proc, &bus->suspend_msg[0], &bus->suspend_msg[1]); + if (usb_no_suspend_wait == 0) { + /* wait for suspend callback to be executed */ + usb_proc_mwait(&bus->explore_proc, + &bus->suspend_msg[0], &bus->suspend_msg[1]); + } USB_BUS_UNLOCK(bus); return (0); @@ -406,6 +416,15 @@ usb_bus_suspend(struct usb_proc_msg *pm) USB_BUS_UNLOCK(bus); + /* + * We use the shutdown event here because the suspend and + * resume events are reserved for the USB port suspend and + * resume. The USB system suspend is implemented like full + * shutdown and all connected USB devices will be disconnected + * subsequently. At resume all USB devices will be + * re-connected again. + */ + bus_generic_shutdown(bus->bdev); usbd_enum_lock(udev); From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 17:56:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 687DD1065672; Mon, 12 Mar 2012 17:56:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D6668FC14; Mon, 12 Mar 2012 17:56:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CHuwTj077494; Mon, 12 Mar 2012 17:56:58 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CHuwtq077491; Mon, 12 Mar 2012 17:56:58 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203121756.q2CHuwtq077491@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 12 Mar 2012 17:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232871 - stable/8/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 17:56:58 -0000 Author: hselasky Date: Mon Mar 12 17:56:57 2012 New Revision: 232871 URL: http://svn.freebsd.org/changeset/base/232871 Log: MFC r232448: Make sure that the USB system suspend event is executed synchronously and not asynchronously. Modified: stable/8/sys/dev/usb/controller/usb_controller.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/8/sys/dev/usb/controller/usb_controller.c Mon Mar 12 17:54:17 2012 (r232870) +++ stable/8/sys/dev/usb/controller/usb_controller.c Mon Mar 12 17:56:57 2012 (r232871) @@ -89,10 +89,15 @@ TUNABLE_INT("hw.usb.no_boot_wait", &usb_ SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, &usb_no_boot_wait, 0, "No USB device enumerate waiting at boot."); +static int usb_no_suspend_wait = 0; +TUNABLE_INT("hw.usb.no_suspend_wait", &usb_no_suspend_wait); +SYSCTL_INT(_hw_usb, OID_AUTO, no_suspend_wait, CTLFLAG_RW|CTLFLAG_TUN, + &usb_no_suspend_wait, 0, "No USB device waiting at system suspend."); + static int usb_no_shutdown_wait = 0; TUNABLE_INT("hw.usb.no_shutdown_wait", &usb_no_shutdown_wait); -SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RW|CTLFLAG_TUN, &usb_no_shutdown_wait, 0, - "No USB device waiting at system shutdown."); +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RW|CTLFLAG_TUN, + &usb_no_shutdown_wait, 0, "No USB device waiting at system shutdown."); static devclass_t usb_devclass; @@ -239,6 +244,11 @@ usb_suspend(device_t dev) USB_BUS_LOCK(bus); usb_proc_msignal(&bus->explore_proc, &bus->suspend_msg[0], &bus->suspend_msg[1]); + if (usb_no_suspend_wait == 0) { + /* wait for suspend callback to be executed */ + usb_proc_mwait(&bus->explore_proc, + &bus->suspend_msg[0], &bus->suspend_msg[1]); + } USB_BUS_UNLOCK(bus); return (0); @@ -406,6 +416,15 @@ usb_bus_suspend(struct usb_proc_msg *pm) USB_BUS_UNLOCK(bus); + /* + * We use the shutdown event here because the suspend and + * resume events are reserved for the USB port suspend and + * resume. The USB system suspend is implemented like full + * shutdown and all connected USB devices will be disconnected + * subsequently. At resume all USB devices will be + * re-connected again. + */ + bus_generic_shutdown(bus->bdev); usbd_enum_lock(udev); From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 18:10:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3608A106564A; Mon, 12 Mar 2012 18:10:02 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC4B8FC08; Mon, 12 Mar 2012 18:10:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CIA1ne078054; Mon, 12 Mar 2012 18:10:01 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CIA1Be078050; Mon, 12 Mar 2012 18:10:01 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203121810.q2CIA1Be078050@svn.freebsd.org> From: Juli Mallett Date: Mon, 12 Mar 2012 18:10: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: r232872 - 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: Mon, 12 Mar 2012 18:10:02 -0000 Author: jmallett Date: Mon Mar 12 18:10:01 2012 New Revision: 232872 URL: http://svn.freebsd.org/changeset/base/232872 Log: Remove more unused stuff, primarily a set of (unused, thankfully) PIO functions. Adjust nearby style of one assembly function END(). Modified: head/sys/mips/include/cpufunc.h head/sys/mips/mips/support.S head/sys/mips/mips/swtch.S Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Mon Mar 12 17:56:57 2012 (r232871) +++ head/sys/mips/include/cpufunc.h Mon Mar 12 18:10:01 2012 (r232872) @@ -106,18 +106,6 @@ mips_wbflush(void) #endif } -static __inline void -mips_read_membar(void) -{ - /* Nil */ -} - -static __inline void -mips_write_membar(void) -{ - mips_wbflush(); -} - #ifdef _KERNEL /* * XXX @@ -354,29 +342,8 @@ breakpoint(void) } #if defined(__GNUC__) && !defined(__mips_o32) -static inline uint64_t -mips3_ld(const volatile uint64_t *va) -{ - uint64_t rv; - -#if defined(_LP64) - rv = *va; -#else - __asm volatile("ld %0,0(%1)" : "=d"(rv) : "r"(va)); -#endif - - return (rv); -} - -static inline void -mips3_sd(volatile uint64_t *va, uint64_t v) -{ -#if defined(_LP64) - *va = v; -#else - __asm volatile("sd %0,0(%1)" :: "r"(v), "r"(va)); -#endif -} +#define mips3_ld(a) (*(const volatile uint64_t *)(a)) +#define mips3_sd(a, v) (*(volatile uint64_t *)(a) = (v)) #else uint64_t mips3_ld(volatile uint64_t *va); void mips3_sd(volatile uint64_t *, uint64_t); @@ -392,81 +359,4 @@ void mips3_sd(volatile uint64_t *, uint6 #define writew(va, d) (*(volatile uint16_t *) (va) = (d)) #define writel(va, d) (*(volatile uint32_t *) (va) = (d)) -/* - * I/O macros. - */ - -#define outb(a,v) (*(volatile unsigned char*)(a) = (v)) -#define out8(a,v) (*(volatile unsigned char*)(a) = (v)) -#define outw(a,v) (*(volatile unsigned short*)(a) = (v)) -#define out16(a,v) outw(a,v) -#define outl(a,v) (*(volatile unsigned int*)(a) = (v)) -#define out32(a,v) outl(a,v) -#define inb(a) (*(volatile unsigned char*)(a)) -#define in8(a) (*(volatile unsigned char*)(a)) -#define inw(a) (*(volatile unsigned short*)(a)) -#define in16(a) inw(a) -#define inl(a) (*(volatile unsigned int*)(a)) -#define in32(a) inl(a) - -#define out8rb(a,v) (*(volatile unsigned char*)(a) = (v)) -#define out16rb(a,v) (__out16rb((volatile uint16_t *)(a), v)) -#define out32rb(a,v) (__out32rb((volatile uint32_t *)(a), v)) -#define in8rb(a) (*(volatile unsigned char*)(a)) -#define in16rb(a) (__in16rb((volatile uint16_t *)(a))) -#define in32rb(a) (__in32rb((volatile uint32_t *)(a))) - -#define _swap_(x) (((x) >> 24) | ((x) << 24) | \ - (((x) >> 8) & 0xff00) | (((x) & 0xff00) << 8)) - -static __inline void __out32rb(volatile uint32_t *, uint32_t); -static __inline void __out16rb(volatile uint16_t *, uint16_t); -static __inline uint32_t __in32rb(volatile uint32_t *); -static __inline uint16_t __in16rb(volatile uint16_t *); - -static __inline void -__out32rb(volatile uint32_t *a, uint32_t v) -{ - uint32_t _v_ = v; - - _v_ = _swap_(_v_); - out32(a, _v_); -} - -static __inline void -__out16rb(volatile uint16_t *a, uint16_t v) -{ - uint16_t _v_; - - _v_ = ((v >> 8) & 0xff) | (v << 8); - out16(a, _v_); -} - -static __inline uint32_t -__in32rb(volatile uint32_t *a) -{ - uint32_t _v_; - - _v_ = in32(a); - _v_ = _swap_(_v_); - return _v_; -} - -static __inline uint16_t -__in16rb(volatile uint16_t *a) -{ - uint16_t _v_; - - _v_ = in16(a); - _v_ = ((_v_ >> 8) & 0xff) | (_v_ << 8); - return _v_; -} - -void insb(uint8_t *, uint8_t *,int); -void insw(uint16_t *, uint16_t *,int); -void insl(uint32_t *, uint32_t *,int); -void outsb(uint8_t *, const uint8_t *,int); -void outsw(uint16_t *, const uint16_t *,int); -void outsl(uint32_t *, const uint32_t *,int); - #endif /* !_MACHINE_CPUFUNC_H_ */ Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Mon Mar 12 17:56:57 2012 (r232871) +++ head/sys/mips/mips/support.S Mon Mar 12 18:10:01 2012 (r232872) @@ -167,148 +167,6 @@ END(copystr) /* - * fillw(pat, addr, count) - */ -LEAF(fillw) -1: - PTR_ADDU a2, a2, -1 - sh a0, 0(a1) - bne a2,zero, 1b - PTR_ADDU a1, a1, 2 - - jr ra - nop -END(fillw) - -/* - * Optimized memory zero code. - * mem_zero_page(addr); - */ -LEAF(mem_zero_page) - li v0, PAGE_SIZE -1: - PTR_SUBU v0, 8 - sd zero, 0(a0) - bne zero, v0, 1b - PTR_ADDU a0, 8 - jr ra - nop -END(mem_zero_page) - -/* - * Block I/O routines mainly used by I/O drivers. - * - * Args as: a0 = port - * a1 = memory address - * a2 = count - */ -LEAF(insb) - beq a2, zero, 2f - PTR_ADDU a2, a1 -1: - lbu v0, 0(a0) - PTR_ADDU a1, 1 - bne a1, a2, 1b - sb v0, -1(a1) -2: - jr ra - nop -END(insb) - -LEAF(insw) - beq a2, zero, 2f - PTR_ADDU a2, a2 - PTR_ADDU a2, a1 -1: - lhu v0, 0(a0) - PTR_ADDU a1, 2 - bne a1, a2, 1b - sh v0, -2(a1) -2: - jr ra - nop -END(insw) - -LEAF(insl) - beq a2, zero, 2f - sll a2, 2 - PTR_ADDU a2, a1 -1: - lw v0, 0(a0) - PTR_ADDU a1, 4 - bne a1, a2, 1b - sw v0, -4(a1) -2: - jr ra - nop -END(insl) - -LEAF(outsb) - beq a2, zero, 2f - PTR_ADDU a2, a1 -1: - lbu v0, 0(a1) - PTR_ADDU a1, 1 - bne a1, a2, 1b - sb v0, 0(a0) -2: - jr ra - nop -END(outsb) - -LEAF(outsw) - beq a2, zero, 2f - addu a2, a2 - li v0, 1 - and v0, a1 - bne v0, zero, 3f # arghh, unaligned. - addu a2, a1 -1: - lhu v0, 0(a1) - addiu a1, 2 - bne a1, a2, 1b - sh v0, 0(a0) -2: - jr ra - nop -3: - LWHI v0, 0(a1) - LWLO v0, 3(a1) - addiu a1, 2 - bne a1, a2, 3b - sh v0, 0(a0) - - jr ra - nop -END(outsw) - -LEAF(outsl) - beq a2, zero, 2f - sll a2, 2 - li v0, 3 - and v0, a1 - bne v0, zero, 3f # arghh, unaligned. - addu a2, a1 -1: - lw v0, 0(a1) - addiu a1, 4 - bne a1, a2, 1b - sw v0, 0(a0) -2: - jr ra - nop -3: - LWHI v0, 0(a1) - LWLO v0, 3(a1) - addiu a1, 4 - bne a1, a2, 3b - sw v0, 0(a0) - - jr ra - nop -END(outsl) - -/* * Copy a null terminated string from the user address space into * the kernel address space. * @@ -1244,7 +1102,7 @@ LEAF(breakpoint) break MIPS_BREAK_SOVER_VAL jr ra nop - END(breakpoint) +END(breakpoint) LEAF(setjmp) mfc0 v0, MIPS_COP_0_STATUS # Later the "real" spl value! Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Mon Mar 12 17:56:57 2012 (r232871) +++ head/sys/mips/mips/swtch.S Mon Mar 12 18:10:01 2012 (r232872) @@ -608,16 +608,6 @@ LEAF(MipsSaveCurFPState) END(MipsSaveCurFPState) /* - * When starting init, call this to configure the process for user - * mode. This will be inherited by other processes. - */ -LEAF_NOPROFILE(prepare_usermode) - j ra - nop -END(prepare_usermode) - - -/* * This code is copied the user's stack for returning from signal handlers * (see sendsig() and sigreturn()). We have to compute the address * of the sigcontext struct for the sigreturn call. From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 18:14:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 983461065670; Mon, 12 Mar 2012 18:14:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85FCD8FC16; Mon, 12 Mar 2012 18:14:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CIE0hH078323; Mon, 12 Mar 2012 18:14:00 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CIE0NU078318; Mon, 12 Mar 2012 18:14:00 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203121814.q2CIE0NU078318@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 12 Mar 2012 18:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232873 - in stable/9/sys/dev/usb: . quirk serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 18:14:00 -0000 Author: hselasky Date: Mon Mar 12 18:13:59 2012 New Revision: 232873 URL: http://svn.freebsd.org/changeset/base/232873 Log: MFC r230238 and r232684: Add new USB device ID's. Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/serial/u3g.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Mon Mar 12 18:10:01 2012 (r232872) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Mon Mar 12 18:13:59 2012 (r232873) @@ -134,6 +134,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(QUALCOMM2, CDMA_MSM, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(CURITEL, UM150, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(CURITEL, UM175, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), + USB_QUIRK(VERTEX, VW110L, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), /* USB Mass Storage Class Quirks */ USB_QUIRK_VP(USB_VENDOR_ASAHIOPTICAL, 0, UQ_MSC_NO_RS_CLEAR_UA, Modified: stable/9/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/9/sys/dev/usb/serial/u3g.c Mon Mar 12 18:10:01 2012 (r232872) +++ stable/9/sys/dev/usb/serial/u3g.c Mon Mar 12 18:13:59 2012 (r232873) @@ -354,6 +354,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QISDA, H21_2, 0), U3G_DEV(QUALCOMM2, AC8700, 0), U3G_DEV(QUALCOMM2, MF330, 0), + U3G_DEV(QUALCOMM2, VW110L, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, AC2726, 0), U3G_DEV(QUALCOMMINC, AC8700, 0), U3G_DEV(QUALCOMMINC, AC8710, 0), @@ -422,6 +423,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUALCOMMINC, SURFSTICK, 0), U3G_DEV(QUALCOMMINC, E2002, 0), U3G_DEV(QUALCOMMINC, E2003, 0), + U3G_DEV(QUALCOMMINC, K3772_Z, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), U3G_DEV(QUALCOMMINC, MF633R, 0), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Mon Mar 12 18:10:01 2012 (r232872) +++ stable/9/sys/dev/usb/usbdevs Mon Mar 12 18:13:59 2012 (r232873) @@ -679,6 +679,7 @@ vendor QISDA 0x1da5 Qisda vendor METAGEEK2 0x1dd5 MetaGeek vendor ALINK 0x1e0e Alink vendor AIRTIES 0x1eda AirTies +vendor VERTEX 0x1fe7 Vertex Wireless Co., Ltd. vendor DLINK 0x2001 D-Link vendor PLANEX2 0x2019 Planex Communications vendor HAUPPAUGE2 0x2040 Hauppauge Computer Works @@ -2677,6 +2678,7 @@ product QUALCOMM2 MF330 0x6613 MF330 product QUALCOMM2 RWT_FCT 0x3100 RWT FCT-CDMA 2000 1xRTT modem product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem product QUALCOMM2 AC8700 0x6000 AC8700 +product QUALCOMM2 VW110L 0x1000 Vertex Wireless 110L modem product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem product QUALCOMMINC E0002 0x0002 3G modem product QUALCOMMINC E0003 0x0003 3G modem @@ -2744,6 +2746,7 @@ product QUALCOMMINC E0078 0x0078 3G mode product QUALCOMMINC E0082 0x0082 3G modem product QUALCOMMINC E0086 0x0086 3G modem product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick +product QUALCOMMINC K3772_Z 0x1179 3G modem product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem @@ -3373,6 +3376,9 @@ product VIA USB2IDEBRIDGE 0x6204 USB 2.0 /* Vaisala products */ product VAISALA CABLE 0x0200 USB Interface cable +/* Vertex products */ +product VERTEX VW110L 0x0100 Vertex VW110L modem + /* VidzMedia products */ product VIDZMEDIA MONSTERTV 0x4fb1 MonsterTV P2H From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 18:15:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEB941065766; Mon, 12 Mar 2012 18:15:15 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8174C8FC26; Mon, 12 Mar 2012 18:15:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CIF9aU078452; Mon, 12 Mar 2012 18:15:09 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CIF9Qh078435; Mon, 12 Mar 2012 18:15:09 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201203121815.q2CIF9Qh078435@svn.freebsd.org> From: Scott Long Date: Mon, 12 Mar 2012 18:15: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: r232874 - in head/sys/dev: de glxsb hatm ipw ixgb ixgbe lmc mge mxge nve patm safe trm ubsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 18:15:16 -0000 Author: scottl Date: Mon Mar 12 18:15:08 2012 New Revision: 232874 URL: http://svn.freebsd.org/changeset/base/232874 Log: More conversions of drivers to use the PCI parent DMA tag. Modified: head/sys/dev/de/if_de.c head/sys/dev/glxsb/glxsb.c head/sys/dev/hatm/if_hatm.c head/sys/dev/ipw/if_ipw.c head/sys/dev/ipw/if_ipwvar.h head/sys/dev/ixgb/if_ixgb.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixv.c head/sys/dev/lmc/if_lmc.c head/sys/dev/mge/if_mge.c head/sys/dev/mxge/if_mxge.c head/sys/dev/nve/if_nve.c head/sys/dev/patm/if_patm_attach.c head/sys/dev/safe/safe.c head/sys/dev/trm/trm.c head/sys/dev/ubsec/ubsec.c Modified: head/sys/dev/de/if_de.c ============================================================================== --- head/sys/dev/de/if_de.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/de/if_de.c Mon Mar 12 18:15:08 2012 (r232874) @@ -4492,7 +4492,8 @@ tulip_busdma_allocring(device_t dev, tul /* First, setup a tag. */ ri->ri_max = count; size = count * sizeof(tulip_desc_t); - error = bus_dma_tag_create(NULL, 32, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 32, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size, 1, size, 0, NULL, NULL, &ri->ri_ring_tag); if (error) { @@ -4520,7 +4521,7 @@ tulip_busdma_allocring(device_t dev, tul } /* Allocate a tag for the data buffers. */ - error = bus_dma_tag_create(NULL, align, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), align, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * nsegs, nsegs, MCLBYTES, 0, NULL, NULL, &ri->ri_data_tag); if (error) { @@ -4600,7 +4601,7 @@ tulip_busdma_init(device_t dev, tulip_so /* * Allocate a DMA tag, memory, and map for setup descriptor */ - error = bus_dma_tag_create(NULL, 32, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), 32, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(sc->tulip_setupdata), 1, sizeof(sc->tulip_setupdata), 0, NULL, NULL, &sc->tulip_setup_tag); Modified: head/sys/dev/glxsb/glxsb.c ============================================================================== --- head/sys/dev/glxsb/glxsb.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/glxsb/glxsb.c Mon Mar 12 18:15:08 2012 (r232874) @@ -397,7 +397,7 @@ glxsb_dma_alloc(struct glxsb_softc *sc) dma->dma_size = GLXSB_MAX_AES_LEN * 2; /* Setup DMA descriptor area */ - rc = bus_dma_tag_create(NULL, /* parent */ + rc = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ SB_AES_ALIGN, 0, /* alignments, bounds */ BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/hatm/if_hatm.c ============================================================================== --- head/sys/dev/hatm/if_hatm.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/hatm/if_hatm.c Mon Mar 12 18:15:08 2012 (r232874) @@ -1722,7 +1722,7 @@ hatm_attach(device_t dev) /* * ALlocate a DMA tag for subsequent allocations */ - if (bus_dma_tag_create(NULL, 1, 0, + if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 1, @@ -1751,7 +1751,7 @@ hatm_attach(device_t dev) * but this would not work. So make the maximum number of TPDs * occupied by one packet a configuration parameter. */ - if (bus_dma_tag_create(NULL, 1, 0, + if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, HE_MAX_PDU, 3 * HE_CONFIG_MAX_TPD_PER_PACKET, HE_MAX_PDU, 0, NULL, NULL, &sc->tx_tag)) { Modified: head/sys/dev/ipw/if_ipw.c ============================================================================== --- head/sys/dev/ipw/if_ipw.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/ipw/if_ipw.c Mon Mar 12 18:15:08 2012 (r232874) @@ -528,9 +528,21 @@ ipw_dma_alloc(struct ipw_softc *sc) int error, i; /* + * Allocate parent DMA tag for subsequent allocations. + */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE_32BIT, BUS_SPACE_UNRESTRICTED, + BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &sc->parent_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create parent DMA tag\n"); + goto fail; + } + + /* * Allocate and map tx ring. */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, IPW_TBD_SZ, 1, IPW_TBD_SZ, 0, NULL, NULL, &sc->tbd_dmat); if (error != 0) { @@ -556,7 +568,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate and map rx ring. */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, IPW_RBD_SZ, 1, IPW_RBD_SZ, 0, NULL, NULL, &sc->rbd_dmat); if (error != 0) { @@ -582,7 +594,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate and map status ring. */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, IPW_STATUS_SZ, 1, IPW_STATUS_SZ, 0, NULL, NULL, &sc->status_dmat); if (error != 0) { @@ -611,7 +623,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate command DMA map. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof (struct ipw_cmd), 1, sizeof (struct ipw_cmd), 0, NULL, NULL, &sc->cmd_dmat); if (error != 0) { @@ -629,7 +641,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate headers DMA maps. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof (struct ipw_hdr), 1, sizeof (struct ipw_hdr), 0, NULL, NULL, &sc->hdr_dmat); if (error != 0) { @@ -652,7 +664,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate tx buffers DMA maps. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, IPW_MAX_NSEG, MCLBYTES, 0, NULL, NULL, &sc->txbuf_dmat); if (error != 0) { @@ -684,7 +696,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Pre-allocate rx buffers and DMA maps. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, MCLBYTES, 0, NULL, NULL, &sc->rxbuf_dmat); if (error != 0) { @@ -741,6 +753,10 @@ ipw_release(struct ipw_softc *sc) struct ipw_soft_buf *sbuf; int i; + if (sc->parent_dmat != NULL) { + bus_dma_tag_destroy(sc->parent_dmat); + } + if (sc->tbd_dmat != NULL) { if (sc->stbd_list != NULL) { bus_dmamap_unload(sc->tbd_dmat, sc->tbd_map); Modified: head/sys/dev/ipw/if_ipwvar.h ============================================================================== --- head/sys/dev/ipw/if_ipwvar.h Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/ipw/if_ipwvar.h Mon Mar 12 18:15:08 2012 (r232874) @@ -117,6 +117,7 @@ struct ipw_softc { int sc_tx_timer; int sc_scan_timer; + bus_dma_tag_t parent_dmat; bus_dma_tag_t tbd_dmat; bus_dma_tag_t rbd_dmat; bus_dma_tag_t status_dmat; Modified: head/sys/dev/ixgb/if_ixgb.c ============================================================================== --- head/sys/dev/ixgb/if_ixgb.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/ixgb/if_ixgb.c Mon Mar 12 18:15:08 2012 (r232874) @@ -1421,7 +1421,7 @@ ixgb_dma_malloc(struct adapter * adapter int r; dev = adapter->dev; - r = bus_dma_tag_create(NULL, /* parent */ + r = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ PAGE_SIZE, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1513,7 +1513,7 @@ ixgb_setup_transmit_structures(struct ad /* * Setup DMA descriptor areas. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(adapter->dev), /* parent */ PAGE_SIZE, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1851,7 +1851,7 @@ ixgb_allocate_receive_structures(struct bzero(adapter->rx_buffer_area, sizeof(struct ixgb_buffer) * adapter->num_rx_desc); - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(adapter->dev),/* parent */ PAGE_SIZE, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/ixgbe/ixgbe.c Mon Mar 12 18:15:08 2012 (r232874) @@ -2879,7 +2879,8 @@ ixgbe_allocate_transmit_buffers(struct t /* * Setup DMA descriptor areas. */ - if ((error = bus_dma_tag_create(NULL, /* parent */ + if ((error = bus_dma_tag_create( + bus_get_dma_tag(adapter->dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/ixgbe/ixv.c ============================================================================== --- head/sys/dev/ixgbe/ixv.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/ixgbe/ixv.c Mon Mar 12 18:15:08 2012 (r232874) @@ -2158,7 +2158,8 @@ ixv_allocate_transmit_buffers(struct tx_ /* * Setup DMA descriptor areas. */ - if ((error = bus_dma_tag_create(NULL, /* parent */ + if ((error = bus_dma_tag_create( + bus_get_dma_tag(adapter->dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/lmc/if_lmc.c ============================================================================== --- head/sys/dev/lmc/if_lmc.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/lmc/if_lmc.c Mon Mar 12 18:15:08 2012 (r232874) @@ -2621,7 +2621,8 @@ create_ring(softc_t *sc, struct desc_rin #ifdef __FreeBSD__ /* Create a DMA tag for descriptors and buffers. */ - if ((error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, PAGE_SIZE, 2, PAGE_SIZE, BUS_DMA_ALLOCNOW, # if (__FreeBSD_version >= 502000) NULL, NULL, Modified: head/sys/dev/mge/if_mge.c ============================================================================== --- head/sys/dev/mge/if_mge.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/mge/if_mge.c Mon Mar 12 18:15:08 2012 (r232874) @@ -439,7 +439,7 @@ mge_alloc_desc_dma(struct mge_softc *sc, tab[size - 1].mge_desc->next_desc = desc_paddr; /* Allocate a busdma tag for mbufs. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), /* parent */ 8, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -477,7 +477,7 @@ mge_allocate_dma(struct mge_softc *sc) int i; /* Allocate a busdma tag and DMA safe memory for TX/RX descriptors. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), /* parent */ 16, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/mxge/if_mxge.c Mon Mar 12 18:15:08 2012 (r232874) @@ -4662,7 +4662,7 @@ mxge_attach(device_t dev) goto abort_with_nothing; } - err = bus_dma_tag_create(NULL, /* parent */ + err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR, /* low */ Modified: head/sys/dev/nve/if_nve.c ============================================================================== --- head/sys/dev/nve/if_nve.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/nve/if_nve.c Mon Mar 12 18:15:08 2012 (r232874) @@ -371,7 +371,8 @@ nve_attach(device_t dev) goto fail; } /* Allocate DMA tags */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * NV_MAX_FRAGS, NV_MAX_FRAGS, MCLBYTES, 0, busdma_lock_mutex, &Giant, @@ -380,7 +381,8 @@ nve_attach(device_t dev) device_printf(dev, "couldn't allocate dma tag\n"); goto fail; } - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct nve_rx_desc) * RX_RING_SIZE, 1, sizeof(struct nve_rx_desc) * RX_RING_SIZE, 0, @@ -390,7 +392,8 @@ nve_attach(device_t dev) device_printf(dev, "couldn't allocate dma tag\n"); goto fail; } - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct nve_tx_desc) * TX_RING_SIZE, 1, sizeof(struct nve_tx_desc) * TX_RING_SIZE, 0, Modified: head/sys/dev/patm/if_patm_attach.c ============================================================================== --- head/sys/dev/patm/if_patm_attach.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/patm/if_patm_attach.c Mon Mar 12 18:15:08 2012 (r232874) @@ -404,7 +404,7 @@ patm_attach(device_t dev) * Don't use BUS_DMA_ALLOCNOW, because we never need bouncing with * bus_dmamem_alloc() */ - error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct patm_scd), 1, sizeof(struct patm_scd), 0, NULL, NULL, &sc->scd_tag); @@ -774,7 +774,8 @@ patm_sq_init(struct patm_softc *sc) * Don't use BUS_DMA_ALLOCNOW, because we never need bouncing with * bus_dmamem_alloc() */ - error = bus_dma_tag_create(NULL, PATM_SQ_ALIGNMENT, 0, + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), + PATM_SQ_ALIGNMENT, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sc->sq_size, 1, sc->sq_size, 0, NULL, NULL, &sc->sq_tag); @@ -827,7 +828,7 @@ patm_rbuf_init(struct patm_softc *sc) * Don't use BUS_DMA_ALLOCNOW, because we never need bouncing with * bus_dmamem_alloc() */ - if ((error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, + if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, SMBUF_PAGE_SIZE, 1, SMBUF_PAGE_SIZE, 0, NULL, NULL, &sc->sbuf_tag)) != 0) { @@ -855,7 +856,7 @@ patm_rbuf_init(struct patm_softc *sc) * maps using one tag. Rather use BUS_DMA_NOWAIT when loading the map * to prevent EINPROGRESS. */ - if ((error = bus_dma_tag_create(NULL, 4, 0, + if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, MCLBYTES, 0, NULL, NULL, &sc->lbuf_tag)) != 0) { @@ -900,7 +901,7 @@ patm_txmap_init(struct patm_softc *sc) struct patm_txmap *map; /* get transmission tag */ - error = bus_dma_tag_create(NULL, 1, 0, + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, 65536, IDT_SCQ_SIZE - 1, 65536, 0, NULL, NULL, &sc->tx_tag); Modified: head/sys/dev/safe/safe.c ============================================================================== --- head/sys/dev/safe/safe.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/safe/safe.c Mon Mar 12 18:15:08 2012 (r232874) @@ -288,7 +288,7 @@ safe_attach(device_t dev) /* * Setup DMA descriptor area. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ SAFE_DMA_BOUNDARY, /* boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ @@ -303,7 +303,7 @@ safe_attach(device_t dev) device_printf(dev, "cannot allocate DMA tag\n"); goto bad4; } - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ SAFE_MAX_DSIZE, /* boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ @@ -1803,7 +1803,7 @@ safe_dma_malloc( { int r; - r = bus_dma_tag_create(NULL, /* parent */ + r = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ sizeof(u_int32_t), 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/trm/trm.c ============================================================================== --- head/sys/dev/trm/trm.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/trm/trm.c Mon Mar 12 18:15:08 2012 (r232874) @@ -3415,6 +3415,22 @@ trm_init(u_int16_t unit, device_t dev) pACB->tag = rman_get_bustag(pACB->iores); pACB->bsh = rman_get_bushandle(pACB->iores); if (bus_dma_tag_create( + /*parent_dmat*/ bus_get_dma_tag(dev), + /*alignment*/ 1, + /*boundary*/ 0, + /*lowaddr*/ BUS_SPACE_MAXADDR, + /*highaddr*/ BUS_SPACE_MAXADDR, + /*filter*/ NULL, + /*filterarg*/ NULL, + /*maxsize*/ BUS_SPACE_MAXSIZE_32BIT, + /*nsegments*/ BUS_SPACE_UNRESTRICTED, + /*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT, + /*flags*/ 0, + /*lockfunc*/ NULL, + /*lockarg*/ NULL, + /* dmat */ &pACB->parent_dmat) != 0) + goto bad; + if (bus_dma_tag_create( /*parent_dmat*/ pACB->parent_dmat, /*alignment*/ 1, /*boundary*/ 0, @@ -3458,7 +3474,9 @@ trm_init(u_int16_t unit, device_t dev) TRM_MAX_SRB_CNT * sizeof(TRM_SRB), trm_mapSRB, pACB, /* flags */0); /* Create, allocate, and map DMA buffers for autosense data */ - if (bus_dma_tag_create(/*parent_dmat*/NULL, /*alignment*/1, + if (bus_dma_tag_create( + /*parent_dmat*/pACB->parent_dmat, + /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, @@ -3495,7 +3513,7 @@ trm_init(u_int16_t unit, device_t dev) } bzero(pACB->pFreeSRB, TRM_MAX_SRB_CNT * sizeof(TRM_SRB)); if (bus_dma_tag_create( - /*parent_dmat*/NULL, + /*parent_dmat*/pACB->parent_dmat, /*alignment*/ 1, /*boundary*/ 0, /*lowaddr*/ BUS_SPACE_MAXADDR, @@ -3546,6 +3564,8 @@ bad: bus_dma_tag_destroy(pACB->srb_dmat); if (pACB->buffer_dmat) bus_dma_tag_destroy(pACB->buffer_dmat); + if (pACB->parent_dmat) + bus_dma_tag_destroy(pACB->parent_dmat); return (NULL); } Modified: head/sys/dev/ubsec/ubsec.c ============================================================================== --- head/sys/dev/ubsec/ubsec.c Mon Mar 12 18:13:59 2012 (r232873) +++ head/sys/dev/ubsec/ubsec.c Mon Mar 12 18:15:08 2012 (r232874) @@ -369,7 +369,7 @@ ubsec_attach(device_t dev) /* * Setup DMA descriptor area. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1855,7 +1855,7 @@ ubsec_dma_malloc( int r; /* XXX could specify sc_dmat as parent but that just adds overhead */ - r = bus_dma_tag_create(NULL, /* parent */ + r = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 18:17:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62278106564A; Mon, 12 Mar 2012 18:17:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5010B8FC12; Mon, 12 Mar 2012 18:17:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CIHiQ3078646; Mon, 12 Mar 2012 18:17:44 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CIHiAZ078642; Mon, 12 Mar 2012 18:17:44 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203121817.q2CIHiAZ078642@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 12 Mar 2012 18:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232875 - in stable/8/sys/dev/usb: . quirk serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 18:17:44 -0000 Author: hselasky Date: Mon Mar 12 18:17:43 2012 New Revision: 232875 URL: http://svn.freebsd.org/changeset/base/232875 Log: MFC r230238 and r232684: Add new USB IDs. Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Mon Mar 12 18:15:08 2012 (r232874) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Mon Mar 12 18:17:43 2012 (r232875) @@ -134,6 +134,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(QUALCOMM2, CDMA_MSM, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(CURITEL, UM150, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(CURITEL, UM175, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), + USB_QUIRK(VERTEX, VW110L, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), /* USB Mass Storage Class Quirks */ USB_QUIRK_VP(USB_VENDOR_ASAHIOPTICAL, 0, UQ_MSC_NO_RS_CLEAR_UA, Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Mon Mar 12 18:15:08 2012 (r232874) +++ stable/8/sys/dev/usb/serial/u3g.c Mon Mar 12 18:17:43 2012 (r232875) @@ -354,6 +354,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QISDA, H21_2, 0), U3G_DEV(QUALCOMM2, AC8700, 0), U3G_DEV(QUALCOMM2, MF330, 0), + U3G_DEV(QUALCOMM2, VW110L, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, AC2726, 0), U3G_DEV(QUALCOMMINC, AC8700, 0), U3G_DEV(QUALCOMMINC, AC8710, 0), @@ -422,6 +423,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUALCOMMINC, SURFSTICK, 0), U3G_DEV(QUALCOMMINC, E2002, 0), U3G_DEV(QUALCOMMINC, E2003, 0), + U3G_DEV(QUALCOMMINC, K3772_Z, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), U3G_DEV(QUALCOMMINC, MF633R, 0), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Mon Mar 12 18:15:08 2012 (r232874) +++ stable/8/sys/dev/usb/usbdevs Mon Mar 12 18:17:43 2012 (r232875) @@ -678,6 +678,7 @@ vendor QISDA 0x1da5 Qisda vendor METAGEEK2 0x1dd5 MetaGeek vendor ALINK 0x1e0e Alink vendor AIRTIES 0x1eda AirTies +vendor VERTEX 0x1fe7 Vertex Wireless Co., Ltd. vendor DLINK 0x2001 D-Link vendor PLANEX2 0x2019 Planex Communications vendor HAUPPAUGE2 0x2040 Hauppauge Computer Works @@ -2666,6 +2667,7 @@ product QUALCOMM2 MF330 0x6613 MF330 product QUALCOMM2 RWT_FCT 0x3100 RWT FCT-CDMA 2000 1xRTT modem product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem product QUALCOMM2 AC8700 0x6000 AC8700 +product QUALCOMM2 VW110L 0x1000 Vertex Wireless 110L modem product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem product QUALCOMMINC E0002 0x0002 3G modem product QUALCOMMINC E0003 0x0003 3G modem @@ -2733,6 +2735,7 @@ product QUALCOMMINC E0078 0x0078 3G mode product QUALCOMMINC E0082 0x0082 3G modem product QUALCOMMINC E0086 0x0086 3G modem product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick +product QUALCOMMINC K3772_Z 0x1179 3G modem product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem @@ -3361,6 +3364,9 @@ product VIA USB2IDEBRIDGE 0x6204 USB 2.0 /* Vaisala products */ product VAISALA CABLE 0x0200 USB Interface cable +/* Vertex products */ +product VERTEX VW110L 0x0100 Vertex VW110L modem + /* VidzMedia products */ product VIDZMEDIA MONSTERTV 0x4fb1 MonsterTV P2H From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 18:22:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0C921065676; Mon, 12 Mar 2012 18:22:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 903CA8FC27; Mon, 12 Mar 2012 18:22:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CIM4d3078972; Mon, 12 Mar 2012 18:22:04 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CIM4Yo078968; Mon, 12 Mar 2012 18:22:04 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203121822.q2CIM4Yo078968@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 12 Mar 2012 18:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232876 - in stable/9/sys/dev/usb: . net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 18:22:04 -0000 Author: hselasky Date: Mon Mar 12 18:22:04 2012 New Revision: 232876 URL: http://svn.freebsd.org/changeset/base/232876 Log: MFC r232257: Add support for the MCS7832. Modified: stable/9/sys/dev/usb/net/if_mos.c stable/9/sys/dev/usb/net/if_mosreg.h stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/usb/net/if_mos.c ============================================================================== --- stable/9/sys/dev/usb/net/if_mos.c Mon Mar 12 18:17:43 2012 (r232875) +++ stable/9/sys/dev/usb/net/if_mos.c Mon Mar 12 18:22:04 2012 (r232876) @@ -82,7 +82,7 @@ __FBSDID("$FreeBSD$"); /* - * Moschip MCS7730/MCS7830 USB to Ethernet controller + * Moschip MCS7730/MCS7830/MCS7832 USB to Ethernet controller * The datasheet is available at the following URL: * http://www.moschip.com/data/products/MCS7830/Data%20Sheet_7830.pdf */ @@ -149,6 +149,7 @@ SYSCTL_INT(_hw_usb_mos, OID_AUTO, debug, static const STRUCT_USB_HOST_ID mos_devs[] = { {USB_VPI(USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7730, MCS7730)}, {USB_VPI(USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7830, MCS7830)}, + {USB_VPI(USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7832, MCS7832)}, {USB_VPI(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_LN030, MCS7830)}, }; @@ -715,6 +716,8 @@ mos_attach(device_t dev) MOS_DPRINTFN("model: MCS7730"); } else if (sc->mos_flags & MCS7830) { MOS_DPRINTFN("model: MCS7830"); + } else if (sc->mos_flags & MCS7832) { + MOS_DPRINTFN("model: MCS7832"); } error = uether_ifattach(ue); if (error) { Modified: stable/9/sys/dev/usb/net/if_mosreg.h ============================================================================== --- stable/9/sys/dev/usb/net/if_mosreg.h Mon Mar 12 18:17:43 2012 (r232875) +++ stable/9/sys/dev/usb/net/if_mosreg.h Mon Mar 12 18:22:04 2012 (r232876) @@ -152,6 +152,7 @@ #define MCS7730 0x0001 #define MCS7830 0x0002 +#define MCS7832 0x0004 #define MOS_INC(x, y) (x) = (x + 1) % y Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Mon Mar 12 18:17:43 2012 (r232875) +++ stable/9/sys/dev/usb/usbdevs Mon Mar 12 18:22:04 2012 (r232876) @@ -2303,6 +2303,7 @@ product MOSCHIP MCS7703 0x7703 MCS7703 product MOSCHIP MCS7730 0x7730 MCS7730 Ethernet product MOSCHIP MCS7820 0x7820 MCS7820 Serial Port Adapter product MOSCHIP MCS7830 0x7830 MCS7830 Ethernet +product MOSCHIP MCS7832 0x7832 MCS7832 Ethernet product MOSCHIP MCS7840 0x7840 MCS7840 Serial Port Adapter /* Motorola products */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 18:38:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCF38106564A; Mon, 12 Mar 2012 18:38:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB2E28FC20; Mon, 12 Mar 2012 18:38:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CIce7Q079685; Mon, 12 Mar 2012 18:38:40 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CIceHY079682; Mon, 12 Mar 2012 18:38:40 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203121838.q2CIceHY079682@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 12 Mar 2012 18:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232877 - stable/9/sys/dev/sound/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 18:38:40 -0000 Author: hselasky Date: Mon Mar 12 18:38:40 2012 New Revision: 232877 URL: http://svn.freebsd.org/changeset/base/232877 Log: MFC r228485 and r227843: Stop USB audio transfers early so that any audio applications will time out and close opened /dev/dspX.Y device(s), if any. Modified: stable/9/sys/dev/sound/usb/uaudio.c stable/9/sys/dev/sound/usb/uaudio.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Mon Mar 12 18:22:04 2012 (r232876) +++ stable/9/sys/dev/sound/usb/uaudio.c Mon Mar 12 18:38:40 2012 (r232877) @@ -773,7 +773,17 @@ uaudio_detach(device_t dev) { struct uaudio_softc *sc = device_get_softc(dev); - if (bus_generic_detach(dev)) { + /* + * Stop USB transfers early so that any audio applications + * will time out and close opened /dev/dspX.Y device(s), if + * any. + */ + if (sc->sc_play_chan.valid) + usbd_transfer_unsetup(sc->sc_play_chan.xfer, UAUDIO_NCHANBUFS); + if (sc->sc_rec_chan.valid) + usbd_transfer_unsetup(sc->sc_rec_chan.xfer, UAUDIO_NCHANBUFS); + + if (bus_generic_detach(dev) != 0) { DPRINTF("detach failed!\n"); } sbuf_delete(&sc->sc_sndstat); Modified: stable/9/sys/dev/sound/usb/uaudio.h ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.h Mon Mar 12 18:22:04 2012 (r232876) +++ stable/9/sys/dev/sound/usb/uaudio.h Mon Mar 12 18:38:40 2012 (r232877) @@ -27,6 +27,9 @@ /* prototypes from "uaudio.c" used by "uaudio_pcm.c" */ +#ifndef _UAUDIO_H_ +#define _UAUDIO_H_ + struct uaudio_chan; struct uaudio_softc; struct snd_dbuf; @@ -63,3 +66,5 @@ extern uint32_t uaudio_mixer_setrecsrc(s int uaudio_get_vendor(device_t dev); int uaudio_get_product(device_t dev); int uaudio_get_release(device_t dev); + +#endif /* _UAUDIO_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 18:41:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3579E106566C; Mon, 12 Mar 2012 18:41:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2426F8FC19; Mon, 12 Mar 2012 18:41:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CIff51079891; Mon, 12 Mar 2012 18:41:42 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CIffF2079888; Mon, 12 Mar 2012 18:41:41 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203121841.q2CIffF2079888@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 12 Mar 2012 18:41:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232878 - stable/8/sys/dev/sound/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 18:41:42 -0000 Author: hselasky Date: Mon Mar 12 18:41:41 2012 New Revision: 232878 URL: http://svn.freebsd.org/changeset/base/232878 Log: MFC r228485 and r228484: Stop USB audio transfers early so that any audio applications will time out and close opened /dev/dspX.Y device(s), if any. Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/dev/sound/usb/uaudio.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Mon Mar 12 18:38:40 2012 (r232877) +++ stable/8/sys/dev/sound/usb/uaudio.c Mon Mar 12 18:41:41 2012 (r232878) @@ -765,7 +765,17 @@ uaudio_detach(device_t dev) { struct uaudio_softc *sc = device_get_softc(dev); - if (bus_generic_detach(dev)) { + /* + * Stop USB transfers early so that any audio applications + * will time out and close opened /dev/dspX.Y device(s), if + * any. + */ + if (sc->sc_play_chan.valid) + usbd_transfer_unsetup(sc->sc_play_chan.xfer, UAUDIO_NCHANBUFS); + if (sc->sc_rec_chan.valid) + usbd_transfer_unsetup(sc->sc_rec_chan.xfer, UAUDIO_NCHANBUFS); + + if (bus_generic_detach(dev) != 0) { DPRINTF("detach failed!\n"); } sbuf_delete(&sc->sc_sndstat); Modified: stable/8/sys/dev/sound/usb/uaudio.h ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.h Mon Mar 12 18:38:40 2012 (r232877) +++ stable/8/sys/dev/sound/usb/uaudio.h Mon Mar 12 18:41:41 2012 (r232878) @@ -27,6 +27,9 @@ /* prototypes from "uaudio.c" used by "uaudio_pcm.c" */ +#ifndef _UAUDIO_H_ +#define _UAUDIO_H_ + struct uaudio_chan; struct uaudio_softc; struct snd_dbuf; @@ -63,3 +66,5 @@ extern uint32_t uaudio_mixer_setrecsrc(s int uaudio_get_vendor(device_t dev); int uaudio_get_product(device_t dev); int uaudio_get_release(device_t dev); + +#endif /* _UAUDIO_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 18:44:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4CB64106566B; Mon, 12 Mar 2012 18:44:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21A688FC16; Mon, 12 Mar 2012 18:44:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CIiUa4080114; Mon, 12 Mar 2012 18:44:30 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CIiUDm080112; Mon, 12 Mar 2012 18:44:30 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203121844.q2CIiUDm080112@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 12 Mar 2012 18:44: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: r232879 - stable/8/sys/dev/sound/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 18:44:31 -0000 Author: hselasky Date: Mon Mar 12 18:44:30 2012 New Revision: 232879 URL: http://svn.freebsd.org/changeset/base/232879 Log: MFC r232039: Avoid creating PCM devices for MIDI only adapters. Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Mon Mar 12 18:41:41 2012 (r232878) +++ stable/8/sys/dev/sound/usb/uaudio.c Mon Mar 12 18:44:30 2012 (r232879) @@ -626,21 +626,21 @@ uaudio_attach(device_t dev) sc->sc_mixer_count); if (sc->sc_play_chan.valid) { - device_printf(dev, "Play: %d Hz, %d ch, %s format\n", + device_printf(dev, "Play: %d Hz, %d ch, %s format.\n", sc->sc_play_chan.sample_rate, sc->sc_play_chan.p_asf1d->bNrChannels, sc->sc_play_chan.p_fmt->description); } else { - device_printf(dev, "No playback!\n"); + device_printf(dev, "No playback.\n"); } if (sc->sc_rec_chan.valid) { - device_printf(dev, "Record: %d Hz, %d ch, %s format\n", + device_printf(dev, "Record: %d Hz, %d ch, %s format.\n", sc->sc_rec_chan.sample_rate, sc->sc_rec_chan.p_asf1d->bNrChannels, sc->sc_rec_chan.p_fmt->description); } else { - device_printf(dev, "No recording!\n"); + device_printf(dev, "No recording.\n"); } if (sc->sc_midi_chan.valid) { @@ -648,9 +648,9 @@ uaudio_attach(device_t dev) if (umidi_probe(dev)) { goto detach; } - device_printf(dev, "MIDI sequencer\n"); + device_printf(dev, "MIDI sequencer.\n"); } else { - device_printf(dev, "No midi sequencer\n"); + device_printf(dev, "No midi sequencer.\n"); } DPRINTF("doing child attach\n"); @@ -659,13 +659,21 @@ uaudio_attach(device_t dev) sc->sc_sndcard_func.func = SCF_PCM; - child = device_add_child(dev, "pcm", -1); + /* + * Only attach a PCM device if we have a playback, recording + * or mixer device present: + */ + if (sc->sc_play_chan.valid || + sc->sc_rec_chan.valid || + sc->sc_mix_info) { + child = device_add_child(dev, "pcm", -1); - if (child == NULL) { - DPRINTF("out of memory\n"); - goto detach; + if (child == NULL) { + DPRINTF("out of memory\n"); + goto detach; + } + device_set_ivars(child, &sc->sc_sndcard_func); } - device_set_ivars(child, &sc->sc_sndcard_func); if (bus_generic_attach(dev)) { DPRINTF("child attach failed\n"); From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 18:48:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03C281065670; Mon, 12 Mar 2012 18:48:09 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.c2i.net [212.247.154.226]) by mx1.freebsd.org (Postfix) with ESMTP id F32028FC0C; Mon, 12 Mar 2012 18:48:07 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 250862280; Mon, 12 Mar 2012 19:48:05 +0100 From: Hans Petter Selasky To: "src-committers@freebsd.org" Date: Mon, 12 Mar 2012 19:46:24 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <201203121838.q2CIceHY079682@svn.freebsd.org> In-Reply-To: <201203121838.q2CIceHY079682@svn.freebsd.org> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201203121946.24254.hselasky@c2i.net> Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-stable-9@freebsd.org" Subject: Re: svn commit: r232877 - stable/9/sys/dev/sound/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 18:48:09 -0000 On Monday 12 March 2012 19:38:40 Hans Petter Selasky wrote: > Author: hselasky > Date: Mon Mar 12 18:38:40 2012 > New Revision: 232877 > URL: http://svn.freebsd.org/changeset/base/232877 > > Log: Minor typo: > MFC r228485 and r227843: ^^^^228484 --HPS From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 18:50:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 915B1106564A; Mon, 12 Mar 2012 18:50:38 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 809858FC1B; Mon, 12 Mar 2012 18:50:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CIocaJ080537; Mon, 12 Mar 2012 18:50:38 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CIoc9s080535; Mon, 12 Mar 2012 18:50:38 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201203121850.q2CIoc9s080535@svn.freebsd.org> From: Josh Paetzel Date: Mon, 12 Mar 2012 18:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232880 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 18:50:38 -0000 Author: jpaetzel Date: Mon Mar 12 18:50:37 2012 New Revision: 232880 URL: http://svn.freebsd.org/changeset/base/232880 Log: Fix a bug running the autoinstall functionality. Submitted by: kris Obtained from: PC-BSD Modified: head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh Modified: head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh Mon Mar 12 18:44:30 2012 (r232879) +++ head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh Mon Mar 12 18:50:37 2012 (r232880) @@ -114,7 +114,7 @@ then esac fi - ${PROGDIR}/pc-sysinstall -c ${INSTALL_CFG} + pc-sysinstall -c ${INSTALL_CFG} if [ $? -eq 0 ] then if [ -n "$SHUTDOWN_CMD" ] From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 18:56:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA768106564A; Mon, 12 Mar 2012 18:56:16 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9F5B8FC15; Mon, 12 Mar 2012 18:56:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CIuG5B080866; Mon, 12 Mar 2012 18:56:16 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CIuG0W080864; Mon, 12 Mar 2012 18:56:16 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203121856.q2CIuG0W080864@svn.freebsd.org> From: Juli Mallett Date: Mon, 12 Mar 2012 18:56:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232881 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 18:56:17 -0000 Author: jmallett Date: Mon Mar 12 18:56:16 2012 New Revision: 232881 URL: http://svn.freebsd.org/changeset/base/232881 Log: Use 64-bit bus space constants on 64-bit kernels. Modified: head/sys/mips/include/bus.h Modified: head/sys/mips/include/bus.h ============================================================================== --- head/sys/mips/include/bus.h Mon Mar 12 18:50:37 2012 (r232880) +++ head/sys/mips/include/bus.h Mon Mar 12 18:56:16 2012 (r232881) @@ -707,11 +707,19 @@ void __bs_c(f,_bs_c_8) (void *t, bus_spa #define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t) #define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF -#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXADDR 0xFFFFFFFF #define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF + +#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF #define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXSIZE 0xFFFFFFFF + +#if defined(__mips_n64) +#define BUS_SPACE_MAXADDR 0xFFFFFFFFFFFFFFFFUL +#define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFFUL +#else +#define BUS_SPACE_MAXADDR 0xFFFFFFFFUL +#define BUS_SPACE_MAXSIZE 0xFFFFFFFFUL +#endif + #define BUS_SPACE_UNRESTRICTED (~0) From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 19:29:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98F7F106566B; Mon, 12 Mar 2012 19:29:33 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E6B48FC14; Mon, 12 Mar 2012 19:29:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CJTXEJ082353; Mon, 12 Mar 2012 19:29:33 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CJTXe7082342; Mon, 12 Mar 2012 19:29:33 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203121929.q2CJTXe7082342@svn.freebsd.org> From: Juli Mallett Date: Mon, 12 Mar 2012 19:29: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: r232882 - in head/sys/dev: advansys aic7xxx buslogic dpt iir X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 19:29:33 -0000 Author: jmallett Date: Mon Mar 12 19:29:32 2012 New Revision: 232882 URL: http://svn.freebsd.org/changeset/base/232882 Log: Remove comments about creating DMA tags as children of the DMA tags of their parent bus where the code has now been modified to do so. Reviewed by: scottl Modified: head/sys/dev/advansys/adv_pci.c head/sys/dev/advansys/adw_pci.c head/sys/dev/aic7xxx/ahc_eisa.c head/sys/dev/aic7xxx/ahc_isa.c head/sys/dev/aic7xxx/ahc_pci.c head/sys/dev/aic7xxx/ahd_pci.c head/sys/dev/buslogic/bt_pci.c head/sys/dev/dpt/dpt_pci.c head/sys/dev/iir/iir_pci.c Modified: head/sys/dev/advansys/adv_pci.c ============================================================================== --- head/sys/dev/advansys/adv_pci.c Mon Mar 12 18:56:16 2012 (r232881) +++ head/sys/dev/advansys/adv_pci.c Mon Mar 12 19:29:32 2012 (r232882) @@ -187,7 +187,6 @@ adv_pci_attach(device_t dev) } /* Allocate a dmatag for our transfer DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, Modified: head/sys/dev/advansys/adw_pci.c ============================================================================== --- head/sys/dev/advansys/adw_pci.c Mon Mar 12 18:56:16 2012 (r232881) +++ head/sys/dev/advansys/adw_pci.c Mon Mar 12 19:29:32 2012 (r232882) @@ -258,7 +258,6 @@ adw_pci_attach(device_t dev) pci_write_config(dev, PCIR_COMMAND, command, /*bytes*/1); /* Allocate a dmatag for our transfer DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, Modified: head/sys/dev/aic7xxx/ahc_eisa.c ============================================================================== --- head/sys/dev/aic7xxx/ahc_eisa.c Mon Mar 12 18:56:16 2012 (r232881) +++ head/sys/dev/aic7xxx/ahc_eisa.c Mon Mar 12 19:29:32 2012 (r232882) @@ -130,7 +130,6 @@ aic7770_attach(device_t dev) ahc_set_unit(ahc, device_get_unit(dev)); /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, Modified: head/sys/dev/aic7xxx/ahc_isa.c ============================================================================== --- head/sys/dev/aic7xxx/ahc_isa.c Mon Mar 12 18:56:16 2012 (r232881) +++ head/sys/dev/aic7xxx/ahc_isa.c Mon Mar 12 19:29:32 2012 (r232882) @@ -253,7 +253,6 @@ ahc_isa_attach(device_t dev) ahc_set_unit(ahc, device_get_unit(dev)); /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the VLB/ISA bus dma tag */ error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, Modified: head/sys/dev/aic7xxx/ahc_pci.c ============================================================================== --- head/sys/dev/aic7xxx/ahc_pci.c Mon Mar 12 18:56:16 2012 (r232881) +++ head/sys/dev/aic7xxx/ahc_pci.c Mon Mar 12 19:29:32 2012 (r232882) @@ -105,7 +105,6 @@ ahc_pci_attach(device_t dev) ahc->flags |= AHC_39BIT_ADDRESSING; /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, (ahc->flags & AHC_39BIT_ADDRESSING) Modified: head/sys/dev/aic7xxx/ahd_pci.c ============================================================================== --- head/sys/dev/aic7xxx/ahd_pci.c Mon Mar 12 18:56:16 2012 (r232881) +++ head/sys/dev/aic7xxx/ahd_pci.c Mon Mar 12 19:29:32 2012 (r232882) @@ -107,7 +107,6 @@ ahd_pci_attach(device_t dev) ahd->flags |= AHD_39BIT_ADDRESSING; /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = aic_dma_tag_create(ahd, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, (ahd->flags & AHD_39BIT_ADDRESSING) Modified: head/sys/dev/buslogic/bt_pci.c ============================================================================== --- head/sys/dev/buslogic/bt_pci.c Mon Mar 12 18:56:16 2012 (r232881) +++ head/sys/dev/buslogic/bt_pci.c Mon Mar 12 19:29:32 2012 (r232882) @@ -172,7 +172,6 @@ bt_pci_attach(device_t dev) } /* Allocate a dmatag for our CCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, Modified: head/sys/dev/dpt/dpt_pci.c ============================================================================== --- head/sys/dev/dpt/dpt_pci.c Mon Mar 12 18:56:16 2012 (r232881) +++ head/sys/dev/dpt/dpt_pci.c Mon Mar 12 19:29:32 2012 (r232882) @@ -132,7 +132,6 @@ dpt_pci_attach (device_t dev) dpt_alloc(dev); /* Allocate a dmatag representing the capabilities of this attachment */ - /* XXX Should be a child of the PCI bus dma tag */ if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, Modified: head/sys/dev/iir/iir_pci.c ============================================================================== --- head/sys/dev/iir/iir_pci.c Mon Mar 12 18:56:16 2012 (r232881) +++ head/sys/dev/iir/iir_pci.c Mon Mar 12 19:29:32 2012 (r232882) @@ -317,7 +317,6 @@ iir_pci_attach(device_t dev) gdt->sc_test_busy = gdt_mpr_test_busy; /* Allocate a dmatag representing the capabilities of this attachment */ - /* XXX Should be a child of the PCI bus dma tag */ if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignemnt*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 19:29:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BDD3B1065672; Mon, 12 Mar 2012 19:29:35 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC20A8FC15; Mon, 12 Mar 2012 19:29:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CJTZxm082395; Mon, 12 Mar 2012 19:29:35 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CJTZUe082387; Mon, 12 Mar 2012 19:29:35 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201203121929.q2CJTZUe082387@svn.freebsd.org> From: Scott Long Date: Mon, 12 Mar 2012 19:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232883 - in head/sys/dev: advansys ahb cesa en wds xen/blkfront X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 19:29:35 -0000 Author: scottl Date: Mon Mar 12 19:29:35 2012 New Revision: 232883 URL: http://svn.freebsd.org/changeset/base/232883 Log: Final pass at having devices use their bus parent for dma tags. The remaining drivers that haven't been converted have various problems or complexities that will be dealt with later. This list includes: hptrr, hptmv, hpt27xx - device aggregation across multiple parents drm - want to talk to the maintainer first tsec, sec - Openfirmware devices, not sure if changes are warranted fatm - Done except for unused testing code usb - want to talk to the maintainer first ce, cp, ctau, cx - Significant driver changes needed to convey parent info There are also devices tucked into architecture subtrees that I'll leave for the respective maintainers to deal with. Modified: head/sys/dev/advansys/adv_eisa.c head/sys/dev/advansys/adv_isa.c head/sys/dev/ahb/ahb.c head/sys/dev/cesa/cesa.c head/sys/dev/en/midway.c head/sys/dev/wds/wd7000.c head/sys/dev/xen/blkfront/blkfront.c Modified: head/sys/dev/advansys/adv_eisa.c ============================================================================== --- head/sys/dev/advansys/adv_eisa.c Mon Mar 12 19:29:32 2012 (r232882) +++ head/sys/dev/advansys/adv_eisa.c Mon Mar 12 19:29:35 2012 (r232883) @@ -171,9 +171,8 @@ adv_eisa_attach(device_t dev) * Allocate a parent dmatag for all tags created * by the MI portions of the advansys driver */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADV_EISA_MAX_DMA_ADDR, @@ -211,9 +210,8 @@ adv_eisa_attach(device_t dev) * Allocate a parent dmatag for all tags created * by the MI portions of the advansys driver */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADV_EISA_MAX_DMA_ADDR, Modified: head/sys/dev/advansys/adv_isa.c ============================================================================== --- head/sys/dev/advansys/adv_isa.c Mon Mar 12 19:29:32 2012 (r232882) +++ head/sys/dev/advansys/adv_isa.c Mon Mar 12 19:29:35 2012 (r232883) @@ -226,9 +226,8 @@ adv_isa_probe(device_t dev) * Allocate a parent dmatag for all tags created * by the MI portions of the advansys driver */ - /* XXX Should be a child of the ISA bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ lowaddr, Modified: head/sys/dev/ahb/ahb.c ============================================================================== --- head/sys/dev/ahb/ahb.c Mon Mar 12 19:29:32 2012 (r232882) +++ head/sys/dev/ahb/ahb.c Mon Mar 12 19:29:35 2012 (r232883) @@ -292,7 +292,7 @@ ahbattach(device_t dev) */ /* DMA tag for mapping buffers into device visible space. */ /* XXX Should be a child of the EISA bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, @@ -311,7 +311,7 @@ ahbattach(device_t dev) ahb->init_level++; /* DMA tag for our ccb structures and ha inquiry data */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: head/sys/dev/cesa/cesa.c ============================================================================== --- head/sys/dev/cesa/cesa.c Mon Mar 12 19:29:32 2012 (r232882) +++ head/sys/dev/cesa/cesa.c Mon Mar 12 19:29:35 2012 (r232883) @@ -157,7 +157,7 @@ cesa_alloc_dma_mem(struct cesa_softc *sc KASSERT(cdm->cdm_vaddr == NULL, ("%s(): DMA memory descriptor in use.", __func__)); - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ PAGE_SIZE, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1046,7 +1046,7 @@ cesa_attach(device_t dev) } /* Create DMA tag for processed data */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: head/sys/dev/en/midway.c ============================================================================== --- head/sys/dev/en/midway.c Mon Mar 12 19:29:32 2012 (r232882) +++ head/sys/dev/en/midway.c Mon Mar 12 19:29:35 2012 (r232883) @@ -2714,7 +2714,7 @@ en_dmaprobe(struct en_softc *sc) * Allocate some DMA-able memory. * We need 3 times the max burst size aligned to the max burst size. */ - err = bus_dma_tag_create(NULL, MIDDMA_MAXBURST, 0, + err = bus_dma_tag_create(bus_get_dma_tag(sc->dev), MIDDMA_MAXBURST, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, 3 * MIDDMA_MAXBURST, 1, 3 * MIDDMA_MAXBURST, 0, NULL, NULL, &tag); @@ -2927,7 +2927,7 @@ en_attach(struct en_softc *sc) MGET(sc->padbuf, M_WAIT, MT_DATA); bzero(sc->padbuf->m_data, MLEN); - if (bus_dma_tag_create(NULL, 1, 0, + if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, EN_TXSZ * 1024, EN_MAX_DMASEG, EN_TXSZ * 1024, 0, NULL, NULL, &sc->txtag)) Modified: head/sys/dev/wds/wd7000.c ============================================================================== --- head/sys/dev/wds/wd7000.c Mon Mar 12 19:29:32 2012 (r232882) +++ head/sys/dev/wds/wd7000.c Mon Mar 12 19:29:35 2012 (r232883) @@ -549,7 +549,7 @@ wds_attach(device_t dev) goto bad; /* now create the memory buffer */ - error = bus_dma_tag_create(NULL, /*alignment*/4, + error = bus_dma_tag_create(bus_get_dma_tag(dev), /*alignment*/4, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_24BIT, /*highaddr*/ BUS_SPACE_MAXADDR, Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Mon Mar 12 19:29:32 2012 (r232882) +++ head/sys/dev/xen/blkfront/blkfront.c Mon Mar 12 19:29:35 2012 (r232883) @@ -650,7 +650,7 @@ blkfront_initialize(struct xb_softc *sc) sc->max_request_blocks = BLKIF_SEGS_TO_BLOCKS(sc->max_request_segments); /* Allocate datastructures based on negotiated values. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->xb_dev), /* parent */ 512, PAGE_SIZE, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 20:24:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EADF310656A6; Mon, 12 Mar 2012 20:24:59 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C09398FC1C; Mon, 12 Mar 2012 20:24:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CKOxp4084572; Mon, 12 Mar 2012 20:24:59 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CKOxU0084570; Mon, 12 Mar 2012 20:24:59 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203122024.q2CKOxU0084570@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 12 Mar 2012 20:24:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232884 - head/libexec/rtld-elf/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 20:25:00 -0000 Author: gonzo Date: Mon Mar 12 20:24:59 2012 New Revision: 232884 URL: http://svn.freebsd.org/changeset/base/232884 Log: - Although we pass first 4 arguments in registers, function callinf ABI requires space to be reserved for them in stack. _rtld() prologue saves a1 and a2 in this space. - Whitespace cleanup while I'm at it Modified: head/libexec/rtld-elf/mips/rtld_start.S Modified: head/libexec/rtld-elf/mips/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 19:29:35 2012 (r232883) +++ head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 20:24:59 2012 (r232884) @@ -58,28 +58,30 @@ LEAF(rtld_start) PTR_LA a1, 1f bal 1f - PTR_LA t0, _C_LABEL(_rtld_relocate_nonplt_self) + PTR_LA t0, _C_LABEL(_rtld_relocate_nonplt_self) 1: PTR_SUBU a1, ra, a1 /* relocbase */ PTR_LA a0, _DYNAMIC PTR_ADDU t9, a1, t0 jalr t9 /* _rtld_relocate_nonplt_self(dynp, relocabase) */ - PTR_ADDU a0, a1, a0 /* &_DYNAMIC */ + PTR_ADDU a0, a1, a0 /* &_DYNAMIC */ move a0, s0 /* sp */ PTR_ADDU a1, sp, 2*PTR_SIZE /* &our atexit function */ PTR_ADDU a2, sp, 3*PTR_SIZE /* obj_main entry */ + subu sp, 4*SZREG /* ABI requires to reserve memory for 4 regs */ PTR_LA t9, _C_LABEL(_rtld) jalr t9 /* v0 = _rtld(sp, cleanup, objp) */ - nop + nop + addu sp, 4*SZREG PTR_L a1, 2*PTR_SIZE(sp) /* our atexit function */ PTR_L a2, 3*PTR_SIZE(sp) /* obj_main entry */ PTR_ADDU sp, 4*PTR_SIZE /* readjust stack */ move a0, s0 /* stack pointer */ move t9, v0 + subu sp, 4*SZREG /* ABI requires to reserve memory for 4 regs */ jr t9 /* _start(sp, cleanup, obj); */ - move a3, s3 /* restore ps_strings */ - + move a3, s3 /* restore ps_strings */ END(rtld_start) #define XCALLFRAME_SIZ (12*SZREG) @@ -140,7 +142,7 @@ _rtld_bind_start: PTR_LA t9, _C_LABEL(_mips_rtld_bind) jalr t9 - nop + nop move sp, s0 REG_L ra, XCALLFRAME_RA(sp) @@ -159,5 +161,5 @@ _rtld_bind_start: PTR_ADDU sp, XCALLFRAME_SIZ move t9, v0 jr t9 - nop + nop END(_rtld_bind_start) From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 20:31:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2553106564A; Mon, 12 Mar 2012 20:31:58 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 922798FC0A; Mon, 12 Mar 2012 20:31:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CKVwov084988; Mon, 12 Mar 2012 20:31:58 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CKVwxF084986; Mon, 12 Mar 2012 20:31:58 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201203122031.q2CKVwxF084986@svn.freebsd.org> From: Scott Long Date: Mon, 12 Mar 2012 20:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232886 - head/sys/dev/ahb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 20:31:58 -0000 Author: scottl Date: Mon Mar 12 20:31:58 2012 New Revision: 232886 URL: http://svn.freebsd.org/changeset/base/232886 Log: Remove a stale comment. Submitted by: jimharris Modified: head/sys/dev/ahb/ahb.c Modified: head/sys/dev/ahb/ahb.c ============================================================================== --- head/sys/dev/ahb/ahb.c Mon Mar 12 20:31:09 2012 (r232885) +++ head/sys/dev/ahb/ahb.c Mon Mar 12 20:31:58 2012 (r232886) @@ -291,7 +291,6 @@ ahbattach(device_t dev) * need to perform during normal operation. */ /* DMA tag for mapping buffers into device visible space. */ - /* XXX Should be a child of the EISA bus dma tag */ if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 20:32:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5704D106568E; Mon, 12 Mar 2012 20:32:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D1288FC08; Mon, 12 Mar 2012 20:32:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CKWO8U085064; Mon, 12 Mar 2012 20:32:24 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CKWNOe085062; Mon, 12 Mar 2012 20:32:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203122032.q2CKWNOe085062@svn.freebsd.org> From: Adrian Chadd Date: Mon, 12 Mar 2012 20:32: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: r232887 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 20:32:24 -0000 Author: adrian Date: Mon Mar 12 20:32:23 2012 New Revision: 232887 URL: http://svn.freebsd.org/changeset/base/232887 Log: Configuration changes/updates! * enable ALQ and net80211/ath ALQ logging by default, to make it possible to get debug register traces. * Update some comments * Enable HWPMC for testing. Modified: head/sys/mips/conf/AR91XX_BASE Modified: head/sys/mips/conf/AR91XX_BASE ============================================================================== --- head/sys/mips/conf/AR91XX_BASE Mon Mar 12 20:31:58 2012 (r232886) +++ head/sys/mips/conf/AR91XX_BASE Mon Mar 12 20:32:23 2012 (r232887) @@ -21,10 +21,11 @@ files "../atheros/files.ar71xx" hints "AR91XX_BASE.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -makeoptions MODULES_OVERRIDE="" +makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" options DDB options KDB +options ALQ options SCHED_4BSD #4BSD scheduler options INET #InterNETworking @@ -33,6 +34,10 @@ options INET6 #InterNETworking options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +# PMC +options HWPMC_HOOKS +device hwpmc + # options NFS_LEGACYRPC # Debugging for use in -current options INVARIANTS @@ -49,19 +54,21 @@ options NO_FFS_SNAPSHOT # We don't req options IEEE80211_DEBUG options IEEE80211_SUPPORT_MESH options IEEE80211_SUPPORT_TDMA +options IEEE80211_ALQ # 802.11 ALQ logging support device wlan # 802.11 support device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support device wlan_xauth # 802.11 hostap support -# This will come later -adrian -device ath # Atheros pci/cardbus NIC's +# ath(4) +device ath # Atheros network device device ath_rate_sample -device ath_ahb +device ath_ahb # Atheros host bus glue options ATH_DEBUG options ATH_DIAGAPI option ATH_ENABLE_11N +option AH_DEBUG_ALQ # Don't bother compiling the whole HAL - AH_SUPPORT_AR9130 breaks the # rest of the 11n chipset support at the moment and the pre-AR5212 @@ -76,6 +83,7 @@ device ath_ar9130 options AH_DEBUG option AH_SUPPORT_AR5416 option AH_SUPPORT_AR9130 # Makes other chipsets not function! +option AH_DEBUG_ALQ # interrupt mitigation not possible on AR9130 # option AH_AR5416_INTERRUPT_MITIGATION From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 20:41:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE164106566C; Mon, 12 Mar 2012 20:41:36 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCC9E8FC15; Mon, 12 Mar 2012 20:41:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CKfaN5085810; Mon, 12 Mar 2012 20:41:36 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CKfaxC085807; Mon, 12 Mar 2012 20:41:36 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201203122041.q2CKfaxC085807@svn.freebsd.org> From: Josh Paetzel Date: Mon, 12 Mar 2012 20:41: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: r232889 - in head/usr.sbin/pc-sysinstall: backend backend-partmanager X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 20:41:37 -0000 Author: jpaetzel Date: Mon Mar 12 20:41:36 2012 New Revision: 232889 URL: http://svn.freebsd.org/changeset/base/232889 Log: Make sure when creating new MBR partition it is set to active by default. Submitted by: kris Obtained from: PC-BSD Modified: head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh Mon Mar 12 20:33:20 2012 (r232888) +++ head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh Mon Mar 12 20:41:36 2012 (r232889) @@ -86,7 +86,12 @@ fi # If this is an empty disk, see if we need to create a new scheme for it gpart show ${DISK} >/dev/null 2>/dev/null if [ $? -eq 0 -a "${SLICENUM}" = "1" ] ; then - gpart create -s ${TYPE} ${DISK} + if [ "${TYPE}" = "mbr" -o "${TYPE}" = "MBR" ] ; then + flags="-s ${TYPE} -f active" + else + flags="-s ${TYPE}" + fi + gpart create ${flags} ${DISK} fi # If we have a starting block, use it Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 12 20:33:20 2012 (r232888) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 12 20:41:36 2012 (r232889) @@ -641,7 +641,7 @@ init_mbr_full_disk() sleep 2 echo_log "Running gpart on ${_intDISK}" - rc_halt "gpart create -s mbr ${_intDISK}" + rc_halt "gpart create -s mbr -f active ${_intDISK}" # Lets figure out disk size in blocks # Get the cyl of this disk From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 20:44:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E8D4106564A; Mon, 12 Mar 2012 20:44:45 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8BA68FC08; Mon, 12 Mar 2012 20:44:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CKiiWg085970; Mon, 12 Mar 2012 20:44:44 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CKiiaq085967; Mon, 12 Mar 2012 20:44:44 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201203122044.q2CKiiaq085967@svn.freebsd.org> From: Josh Paetzel Date: Mon, 12 Mar 2012 20:44: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: r232890 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 20:44:45 -0000 Author: jpaetzel Date: Mon Mar 12 20:44:44 2012 New Revision: 232890 URL: http://svn.freebsd.org/changeset/base/232890 Log: Fix a couple of bugs saving network config. Don't duplicate wlans_ lines. Enable ipv6 on wireless devices correctly. Submitted by: kris Obtained from: PC-BSD Modified: head/usr.sbin/pc-sysinstall/backend/functions-networking.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-networking.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-networking.sh Mon Mar 12 20:41:36 2012 (r232889) +++ head/usr.sbin/pc-sysinstall/backend/functions-networking.sh Mon Mar 12 20:44:44 2012 (r232890) @@ -104,7 +104,10 @@ enable_dhcp_all() then # We have a wifi device, setup a wlan* entry for it WLAN="wlan${WLANCOUNT}" - echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf + cat ${FSMNT}/etc/rc.conf | grep -q "wlans_${NIC}=" + if [ $? -ne 0 ] ; then + echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf + fi echo "ifconfig_${WLAN}=\"DHCP\"" >>${FSMNT}/etc/rc.conf CNIC="${WLAN}" WLANCOUNT=$((WLANCOUNT+1)) @@ -138,7 +141,7 @@ enable_slaac_all() do NIC="`echo $line | cut -d ':' -f 1`" DESC="`echo $line | cut -d ':' -f 2`" - echo_log "Setting $NIC to acceptign RAs on the system." + echo_log "Setting $NIC to accepting RAs on the system." check_is_wifi ${NIC} if [ $? -eq 0 ] then @@ -146,9 +149,12 @@ enable_slaac_all() # Given we cannot have DHCP and SLAAC the same time currently # it's save to just duplicate. WLAN="wlan${WLANCOUNT}" - echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf + cat ${FSMNT}/etc/rc.conf | grep -q "wlans_${NIC}=" + if [ $? -ne 0 ] ; then + echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf + fi #echo "ifconfig_${NIC}=\"up\"" >>${FSMNT}/etc/rc.conf - echo "ifconfig_${WLAN}=\"inet6 accept_rtadv\"" >>${FSMNT}/etc/rc.conf + echo "ifconfig_${WLAN}_ipv6=\"inet6 accept_rtadv\"" >>${FSMNT}/etc/rc.conf CNIC="${WLAN}" WLANCOUNT=$((WLANCOUNT+1)) else From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 20:58:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D05C106564A; Mon, 12 Mar 2012 20:58:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5826B8FC0C; Mon, 12 Mar 2012 20:58:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CKwAXZ086599; Mon, 12 Mar 2012 20:58:10 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CKwAEM086595; Mon, 12 Mar 2012 20:58:10 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203122058.q2CKwAEM086595@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 12 Mar 2012 20:58: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: r232892 - head/libexec/rtld-elf/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 20:58:10 -0000 Author: gonzo Date: Mon Mar 12 20:58:09 2012 New Revision: 232892 URL: http://svn.freebsd.org/changeset/base/232892 Log: Use PTR_(ADD|SUB)U macrosses instead of hardcoded addu/subu Spotted by: juli Modified: head/libexec/rtld-elf/mips/rtld_start.S Modified: head/libexec/rtld-elf/mips/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 20:46:18 2012 (r232891) +++ head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 20:58:09 2012 (r232892) @@ -68,11 +68,11 @@ LEAF(rtld_start) move a0, s0 /* sp */ PTR_ADDU a1, sp, 2*PTR_SIZE /* &our atexit function */ PTR_ADDU a2, sp, 3*PTR_SIZE /* obj_main entry */ - subu sp, 4*SZREG /* ABI requires to reserve memory for 4 regs */ + PTR_SUBU sp, 4*SZREG /* ABI requires to reserve memory for 4 regs */ PTR_LA t9, _C_LABEL(_rtld) jalr t9 /* v0 = _rtld(sp, cleanup, objp) */ nop - addu sp, 4*SZREG + PTR_ADDU sp, 4*SZREG PTR_L a1, 2*PTR_SIZE(sp) /* our atexit function */ PTR_L a2, 3*PTR_SIZE(sp) /* obj_main entry */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 20:59:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B8224106566C; Mon, 12 Mar 2012 20:59:18 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2E8A8FC0C; Mon, 12 Mar 2012 20:59:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CKxIbY086675; Mon, 12 Mar 2012 20:59:18 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CKxI5W086673; Mon, 12 Mar 2012 20:59:18 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203122059.q2CKxI5W086673@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 12 Mar 2012 20: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: r232893 - head/libexec/rtld-elf/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 20:59:18 -0000 Author: gonzo Date: Mon Mar 12 20:59:18 2012 New Revision: 232893 URL: http://svn.freebsd.org/changeset/base/232893 Log: Use PTR_SUBU instead of subu (missed this one) Modified: head/libexec/rtld-elf/mips/rtld_start.S Modified: head/libexec/rtld-elf/mips/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 20:58:09 2012 (r232892) +++ head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 20:59:18 2012 (r232893) @@ -79,7 +79,7 @@ LEAF(rtld_start) PTR_ADDU sp, 4*PTR_SIZE /* readjust stack */ move a0, s0 /* stack pointer */ move t9, v0 - subu sp, 4*SZREG /* ABI requires to reserve memory for 4 regs */ + PTR_SUBU sp, 4*SZREG /* ABI requires to reserve memory for 4 regs */ jr t9 /* _start(sp, cleanup, obj); */ move a3, s3 /* restore ps_strings */ END(rtld_start) From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 21:07:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DC881065670; Mon, 12 Mar 2012 21:07:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8E228FC0C; Mon, 12 Mar 2012 21:07:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CL7M9Z086976; Mon, 12 Mar 2012 21:07:22 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CL7MYo086974; Mon, 12 Mar 2012 21:07:22 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203122107.q2CL7MYo086974@svn.freebsd.org> From: Dimitry Andric Date: Mon, 12 Mar 2012 21:07: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: r232894 - head/contrib/llvm/tools/clang/lib/Basic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 21:07:23 -0000 Author: dim Date: Mon Mar 12 21:07:22 2012 New Revision: 232894 URL: http://svn.freebsd.org/changeset/base/232894 Log: Pull in r145194 from upstream clang trunk: Make our handling of MMX x SSE closer to what gcc does: * Enabling sse enables mmx. * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already). * The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse. Some configure scripts depend on this. PR: i386/165968 MFC after: 3 days Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Mon Mar 12 20:59:18 2012 (r232893) +++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Mon Mar 12 21:07:22 2012 (r232894) @@ -1583,23 +1583,26 @@ bool X86TargetInfo::setFeatureEnabled(ll (Name != "sse4" && Name != "sse4.2" && Name != "sse4.1")) return false; + // FIXME: this should probably use a switch with fall through. + if (Enabled) { if (Name == "mmx") Features["mmx"] = true; else if (Name == "sse") - Features["sse"] = true; + Features["mmx"] = Features["sse"] = true; else if (Name == "sse2") - Features["sse"] = Features["sse2"] = true; + Features["mmx"] = Features["sse"] = Features["sse2"] = true; else if (Name == "sse3") - Features["sse"] = Features["sse2"] = Features["sse3"] = true; + Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = + true; else if (Name == "ssse3") - Features["sse"] = Features["sse2"] = Features["sse3"] = + Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = Features["ssse3"] = true; else if (Name == "sse4" || Name == "sse4.2") - Features["sse"] = Features["sse2"] = Features["sse3"] = + Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = Features["ssse3"] = Features["sse41"] = Features["sse42"] = true; else if (Name == "sse4.1") - Features["sse"] = Features["sse2"] = Features["sse3"] = + Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = Features["ssse3"] = Features["sse41"] = true; else if (Name == "3dnow") Features["mmx"] = Features["3dnow"] = true; @@ -1608,10 +1611,11 @@ bool X86TargetInfo::setFeatureEnabled(ll else if (Name == "aes") Features["aes"] = true; else if (Name == "avx") - Features["avx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = - Features["ssse3"] = Features["sse41"] = Features["sse42"] = true; + Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = + Features["ssse3"] = Features["sse41"] = Features["sse42"] = + Features["avx"] = true; else if (Name == "sse4a") - Features["sse4a"] = true; + Features["mmx"] = Features["sse4a"] = true; } else { if (Name == "mmx") Features["mmx"] = Features["3dnow"] = Features["3dnowa"] = false; @@ -3779,13 +3783,32 @@ TargetInfo *TargetInfo::CreateTargetInfo Target->getDefaultFeatures(Features); // Apply the user specified deltas. + // First the enables. for (std::vector::const_iterator it = Opts.Features.begin(), ie = Opts.Features.end(); it != ie; ++it) { const char *Name = it->c_str(); + if (Name[0] != '+') + continue; + + // Apply the feature via the target. + if (!Target->setFeatureEnabled(Features, Name + 1, true)) { + Diags.Report(diag::err_target_invalid_feature) << Name; + return 0; + } + } + + // Then the disables. + for (std::vector::const_iterator it = Opts.Features.begin(), + ie = Opts.Features.end(); it != ie; ++it) { + const char *Name = it->c_str(); + + if (Name[0] == '+') + continue; + // Apply the feature via the target. - if ((Name[0] != '-' && Name[0] != '+') || - !Target->setFeatureEnabled(Features, Name + 1, (Name[0] == '+'))) { + if (Name[0] != '-' || + !Target->setFeatureEnabled(Features, Name + 1, false)) { Diags.Report(diag::err_target_invalid_feature) << Name; return 0; } From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 21:24:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35430106566B; Mon, 12 Mar 2012 21:24:41 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD888FC14; Mon, 12 Mar 2012 21:24:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CLOePY087537; Mon, 12 Mar 2012 21:24:40 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CLOeRK087535; Mon, 12 Mar 2012 21:24:40 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201203122124.q2CLOeRK087535@svn.freebsd.org> From: Josh Paetzel Date: Mon, 12 Mar 2012 21:24: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: r232895 - head/usr.sbin/pc-sysinstall/backend-query X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 21:24:41 -0000 Author: jpaetzel Date: Mon Mar 12 21:24:40 2012 New Revision: 232895 URL: http://svn.freebsd.org/changeset/base/232895 Log: Check for intel RAID devices Submitted by: kris Obtained from: PC-BSD Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Mon Mar 12 21:07:22 2012 (r232894) +++ head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Mon Mar 12 21:24:40 2012 (r232895) @@ -58,6 +58,18 @@ then fi fi +# Add any RAID devices +if [ -d "/dev/raid" ] ; then + cd /dev/raid + for i in `ls` + do + case ${i} in + r0|r1|r2|r3|r4|r5) SYSDISK="${SYSDISK} ${i}" ;; + *) ;; + esac + done +fi + # Now loop through these devices, and list the disk drives for i in ${SYSDISK} do @@ -77,7 +89,7 @@ do NEWLINE=$(camcontrol identify $DEV | sed -ne 's/^device model *//p') if [ -z "$NEWLINE" ]; then # Now try atacontrol - NEWLINE=$(atacontrol list | sed -n "s|^.*$DEV <\(.*\)>.*|\1|p") + NEWLINE=$(atacontrol list 2>/dev/null | sed -n "s|^.*$DEV <\(.*\)>.*|\1|p") if [ -z "$NEWLINE" ]; then NEWLINE=" " From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 21:25:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEDED106567F; Mon, 12 Mar 2012 21:25:33 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6B2D8FC0C; Mon, 12 Mar 2012 21:25:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CLPXGY087646; Mon, 12 Mar 2012 21:25:33 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CLPXNk087607; Mon, 12 Mar 2012 21:25:33 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203122125.q2CLPXNk087607@svn.freebsd.org> From: Juli Mallett Date: Mon, 12 Mar 2012 21:25: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: r232896 - in head/sys: conf mips/adm5120 mips/alchemy mips/atheros mips/conf mips/idt mips/include mips/malta mips/mips mips/nlm mips/rmi mips/rt305x mips/sentry5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 21:25:33 -0000 Author: jmallett Date: Mon Mar 12 21:25:32 2012 New Revision: 232896 URL: http://svn.freebsd.org/changeset/base/232896 Log: o) Use ABI, not ISA_* options, to determine whether to compile bits if libkern required for the ABI the kernel is being built for. XXX This is implemented in a kind-of nasty way that involves including source files, but it's still an improvement. o) Retire ISA_* options since they're unused and were always wrong. Added: head/sys/mips/mips/libkern_machdep.c (contents, props changed) Modified: head/sys/conf/files.mips head/sys/conf/options.mips head/sys/mips/adm5120/std.adm5120 head/sys/mips/alchemy/std.alchemy head/sys/mips/atheros/std.ar71xx head/sys/mips/conf/AR71XX_BASE head/sys/mips/conf/AR91XX_BASE head/sys/mips/conf/MALTA head/sys/mips/conf/MALTA64 head/sys/mips/conf/OCTEON1 head/sys/mips/conf/SWARM head/sys/mips/conf/SWARM_SMP head/sys/mips/conf/XLP head/sys/mips/conf/XLP64 head/sys/mips/conf/XLPN32 head/sys/mips/conf/XLR head/sys/mips/conf/XLR64 head/sys/mips/conf/XLRN32 head/sys/mips/idt/std.idt head/sys/mips/include/_bus.h head/sys/mips/malta/std.malta head/sys/mips/mips/bus_space_generic.c head/sys/mips/mips/cache.c head/sys/mips/mips/cache_mipsNN.c head/sys/mips/mips/cpu.c head/sys/mips/mips/exception.S head/sys/mips/mips/freebsd32_machdep.c head/sys/mips/mips/machdep.c head/sys/mips/mips/pm_machdep.c head/sys/mips/mips/support.S head/sys/mips/mips/swtch.S head/sys/mips/mips/tick.c head/sys/mips/mips/vm_machdep.c head/sys/mips/nlm/tick.c head/sys/mips/rmi/tick.c head/sys/mips/rt305x/std.rt305x head/sys/mips/sentry5/std.sentry5 Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/conf/files.mips Mon Mar 12 21:25:32 2012 (r232896) @@ -56,6 +56,7 @@ mips/mips/in_cksum.c optional inet | in mips/mips/locore.S standard no-obj mips/mips/minidump_machdep.c standard mips/mips/mem.c optional mem +mips/mips/libkern_machdep.c standard mips/mips/nexus.c standard mips/mips/stack_machdep.c optional ddb | stack mips/mips/support.S standard @@ -72,18 +73,13 @@ geom/geom_mbr_enc.c optional geom_mbr libkern/ashldi3.c standard libkern/ashrdi3.c standard libkern/cmpdi2.c standard -libkern/divdi3.c optional isa_mips32 libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard libkern/lshrdi3.c standard libkern/memchr.c optional fdt libkern/memmove.c standard -libkern/moddi3.c optional isa_mips32 -libkern/qdivrem.c optional isa_mips32 libkern/ucmpdi2.c standard -libkern/udivdi3.c optional isa_mips32 -libkern/umoddi3.c optional isa_mips32 #XXX: We can't use these versions, as strcmp.c is included conf/files #libkern/mips/strcmp.S standard Modified: head/sys/conf/options.mips ============================================================================== --- head/sys/conf/options.mips Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/conf/options.mips Mon Mar 12 21:25:32 2012 (r232896) @@ -38,14 +38,6 @@ CPU_CNMIPS opt_global.h CPU_RMI opt_global.h CPU_NLM opt_global.h -# XXX These are bogus and should be replaced by proper ABI or ISA checks. -ISA_MIPS1 opt_cputype.h -ISA_MIPS3 opt_cputype.h -ISA_MIPS32 opt_cputype.h -ISA_MIPS32v2 opt_cputype.h -ISA_MIPS64 opt_cputype.h -ISA_MIPS64v2 opt_cputype.h - COMPAT_FREEBSD32 opt_compat.h YAMON opt_global.h Modified: head/sys/mips/adm5120/std.adm5120 ============================================================================== --- head/sys/mips/adm5120/std.adm5120 Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/adm5120/std.adm5120 Mon Mar 12 21:25:32 2012 (r232896) @@ -6,7 +6,6 @@ files "../adm5120/files.adm5120" machine mips mipsel cpu CPU_MIPS4KC -options ISA_MIPS32 # device admpci device admsw Modified: head/sys/mips/alchemy/std.alchemy ============================================================================== --- head/sys/mips/alchemy/std.alchemy Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/alchemy/std.alchemy Mon Mar 12 21:25:32 2012 (r232896) @@ -6,4 +6,3 @@ files "../alchemy/files.alchemy" machine mips mipsel cpu CPU_MIPS4KC -options ISA_MIPS32 Modified: head/sys/mips/atheros/std.ar71xx ============================================================================== --- head/sys/mips/atheros/std.ar71xx Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/atheros/std.ar71xx Mon Mar 12 21:25:32 2012 (r232896) @@ -6,4 +6,3 @@ files "../atheros/files.ar71xx" machine mips mipseb cpu CPU_MIPS4KC -options ISA_MIPS32 Modified: head/sys/mips/conf/AR71XX_BASE ============================================================================== --- head/sys/mips/conf/AR71XX_BASE Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/AR71XX_BASE Mon Mar 12 21:25:32 2012 (r232896) @@ -10,7 +10,6 @@ machine mips mipseb ident AR71XX_BASE cpu CPU_MIPS4KC -options ISA_MIPS32 makeoptions TARGET_BIG_ENDIAN makeoptions KERNLOADADDR=0x80050000 options HZ=1000 Modified: head/sys/mips/conf/AR91XX_BASE ============================================================================== --- head/sys/mips/conf/AR91XX_BASE Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/AR91XX_BASE Mon Mar 12 21:25:32 2012 (r232896) @@ -13,7 +13,6 @@ machine mips mipseb ident AR91XX_BASE cpu CPU_MIPS4KC -options ISA_MIPS32 makeoptions KERNLOADADDR=0x80050000 options HZ=1000 Modified: head/sys/mips/conf/MALTA ============================================================================== --- head/sys/mips/conf/MALTA Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/MALTA Mon Mar 12 21:25:32 2012 (r232896) @@ -33,8 +33,6 @@ options TICK_USE_YAMON_FREQ=defined include "../malta/std.malta" -options ISA_MIPS32 - hints "MALTA.hints" #Default places to look for devices. makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/MALTA64 Mon Mar 12 21:25:32 2012 (r232896) @@ -33,8 +33,6 @@ options TICK_USE_YAMON_FREQ=defined include "../malta/std.malta" -options ISA_MIPS64 - hints "MALTA.hints" #Default places to look for devices. makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/OCTEON1 Mon Mar 12 21:25:32 2012 (r232896) @@ -37,9 +37,6 @@ makeoptions DEBUG=-g #Build kernel with #options OCTEON_VENDOR_LANNER # Support for Lanner boards. #options OCTEON_BOARD_CAPK_0100ND # Support for CAPK-0100nd. -# XXX This option is very nearly irrelevant. -options ISA_MIPS64 - options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking Modified: head/sys/mips/conf/SWARM ============================================================================== --- head/sys/mips/conf/SWARM Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/SWARM Mon Mar 12 21:25:32 2012 (r232896) @@ -7,7 +7,6 @@ include "std.SWARM" ident SWARM machine mips mipseb -options ISA_MIPS32 makeoptions ARCH_FLAGS="-mabi=32 -march=mips32" makeoptions LDSCRIPT_NAME= ldscript.mips.cfe Modified: head/sys/mips/conf/SWARM_SMP ============================================================================== --- head/sys/mips/conf/SWARM_SMP Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/SWARM_SMP Mon Mar 12 21:25:32 2012 (r232896) @@ -10,7 +10,6 @@ options SMP options PRINTF_BUFR_SIZE=128 machine mips mipseb -options ISA_MIPS32 makeoptions ARCH_FLAGS="-mabi=32 -march=mips32" makeoptions LDSCRIPT_NAME= ldscript.mips.cfe Modified: head/sys/mips/conf/XLP ============================================================================== --- head/sys/mips/conf/XLP Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/XLP Mon Mar 12 21:25:32 2012 (r232896) @@ -20,7 +20,6 @@ machine mips mipseb ident XLP -options ISA_MIPS32 makeoptions KERNLOADADDR=0x80100000 include "std.XLP" Modified: head/sys/mips/conf/XLP64 ============================================================================== --- head/sys/mips/conf/XLP64 Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/XLP64 Mon Mar 12 21:25:32 2012 (r232896) @@ -20,7 +20,6 @@ machine mips mips64eb ident XLP64 -options ISA_MIPS64 makeoptions ARCH_FLAGS="-march=mips64r2 -mabi=64" makeoptions KERNLOADADDR=0xffffffff80100000 Modified: head/sys/mips/conf/XLPN32 ============================================================================== --- head/sys/mips/conf/XLPN32 Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/XLPN32 Mon Mar 12 21:25:32 2012 (r232896) @@ -20,7 +20,6 @@ machine mips mipsn32eb ident XLPN32 -options ISA_MIPS64 makeoptions ARCH_FLAGS="-march=mips64 -mabi=n32" makeoptions KERNLOADADDR=0x80100000 Modified: head/sys/mips/conf/XLR ============================================================================== --- head/sys/mips/conf/XLR Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/XLR Mon Mar 12 21:25:32 2012 (r232896) @@ -53,7 +53,6 @@ makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions KERNLOADADDR=0x80100000 #profile 2 -options ISA_MIPS32 options SCHED_ULE # ULE scheduler #options VERBOSE_SYSINIT Modified: head/sys/mips/conf/XLR64 ============================================================================== --- head/sys/mips/conf/XLR64 Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/XLR64 Mon Mar 12 21:25:32 2012 (r232896) @@ -26,8 +26,6 @@ makeoptions DEBUG=-g # Build kernel wit makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" makeoptions KERNLOADADDR=0xffffffff80100000 -options ISA_MIPS64 - #profile 2 options SCHED_ULE # ULE scheduler Modified: head/sys/mips/conf/XLRN32 ============================================================================== --- head/sys/mips/conf/XLRN32 Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/conf/XLRN32 Mon Mar 12 21:25:32 2012 (r232896) @@ -26,7 +26,6 @@ makeoptions DEBUG=-g # Build kernel wit makeoptions ARCH_FLAGS="-march=mips64 -mabi=n32" makeoptions KERNLOADADDR=0x80100000 -options ISA_MIPS64 #profile 2 options SCHED_ULE # ULE scheduler Modified: head/sys/mips/idt/std.idt ============================================================================== --- head/sys/mips/idt/std.idt Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/idt/std.idt Mon Mar 12 21:25:32 2012 (r232896) @@ -4,4 +4,3 @@ files "../idt/files.idt" machine mips mipsel -options ISA_MIPS32 Modified: head/sys/mips/include/_bus.h ============================================================================== --- head/sys/mips/include/_bus.h Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/include/_bus.h Mon Mar 12 21:25:32 2012 (r232896) @@ -31,10 +31,10 @@ #ifndef MIPS_INCLUDE__BUS_H #define MIPS_INCLUDE__BUS_H + /* * Bus address and size types */ -#include "opt_cputype.h" #if defined(CPU_CNMIPS) && !defined(__mips_n64) typedef uint64_t bus_addr_t; #else Modified: head/sys/mips/malta/std.malta ============================================================================== --- head/sys/mips/malta/std.malta Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/malta/std.malta Mon Mar 12 21:25:32 2012 (r232896) @@ -2,7 +2,6 @@ files "../malta/files.malta" cpu CPU_MIPS4KC -#options ISA_MIPS32 device pci device ata options ATA_CAM Modified: head/sys/mips/mips/bus_space_generic.c ============================================================================== --- head/sys/mips/mips/bus_space_generic.c Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/bus_space_generic.c Mon Mar 12 21:25:32 2012 (r232896) @@ -197,7 +197,6 @@ static struct bus_space generic_space = }; /* Ultra-gross kludge */ -#include "opt_cputype.h" #if defined(CPU_CNMIPS) && (defined(__mips_n32) || defined(__mips_o32)) #include #define rd8(a) cvmx_read64_uint8(a) Modified: head/sys/mips/mips/cache.c ============================================================================== --- head/sys/mips/mips/cache.c Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/cache.c Mon Mar 12 21:25:32 2012 (r232896) @@ -73,8 +73,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_cputype.h" - #include #include Modified: head/sys/mips/mips/cache_mipsNN.c ============================================================================== --- head/sys/mips/mips/cache_mipsNN.c Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/cache_mipsNN.c Mon Mar 12 21:25:32 2012 (r232896) @@ -38,8 +38,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_cputype.h" - #include #include #include Modified: head/sys/mips/mips/cpu.c ============================================================================== --- head/sys/mips/mips/cpu.c Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/cpu.c Mon Mar 12 21:25:32 2012 (r232896) @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_cputype.h" - #include #include #include Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/exception.S Mon Mar 12 21:25:32 2012 (r232896) @@ -54,7 +54,6 @@ * assembly language support routines. */ -#include "opt_cputype.h" #include "opt_ddb.h" #include #include @@ -62,8 +61,6 @@ #include #include -#include "opt_cputype.h" - #include "assym.s" .set noreorder # Noreorder is default style! Modified: head/sys/mips/mips/freebsd32_machdep.c ============================================================================== --- head/sys/mips/mips/freebsd32_machdep.c Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/freebsd32_machdep.c Mon Mar 12 21:25:32 2012 (r232896) @@ -31,7 +31,6 @@ */ #include "opt_compat.h" -#include "opt_cputype.h" #define __ELF_WORD_SIZE 32 Added: head/sys/mips/mips/libkern_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/mips/libkern_machdep.c Mon Mar 12 21:25:32 2012 (r232896) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2012 Juli Mallett + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Include libkern support routines for 64-bit operations when building o32 + * kernels. + */ +#if defined(__mips_o32) +#include +#include +#include +#include +#include +#endif Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/machdep.c Mon Mar 12 21:25:32 2012 (r232896) @@ -42,7 +42,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_cputype.h" #include "opt_ddb.h" #include "opt_md.h" Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/pm_machdep.c Mon Mar 12 21:25:32 2012 (r232896) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_cputype.h" #include #include Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/support.S Mon Mar 12 21:25:32 2012 (r232896) @@ -87,7 +87,6 @@ * assembly language support routines. */ -#include "opt_cputype.h" #include "opt_ddb.h" #include #include Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/swtch.S Mon Mar 12 21:25:32 2012 (r232896) @@ -56,7 +56,6 @@ */ #include "opt_compat.h" -#include "opt_cputype.h" #include #include #include Modified: head/sys/mips/mips/tick.c ============================================================================== --- head/sys/mips/mips/tick.c Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/tick.c Mon Mar 12 21:25:32 2012 (r232896) @@ -33,8 +33,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_cputype.h" - #include #include #include Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/mips/vm_machdep.c Mon Mar 12 21:25:32 2012 (r232896) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_cputype.h" #include "opt_ddb.h" #include Modified: head/sys/mips/nlm/tick.c ============================================================================== --- head/sys/mips/nlm/tick.c Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/nlm/tick.c Mon Mar 12 21:25:32 2012 (r232896) @@ -35,8 +35,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_cputype.h" - #include #include #include Modified: head/sys/mips/rmi/tick.c ============================================================================== --- head/sys/mips/rmi/tick.c Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/rmi/tick.c Mon Mar 12 21:25:32 2012 (r232896) @@ -33,8 +33,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_cputype.h" - #include #include #include Modified: head/sys/mips/rt305x/std.rt305x ============================================================================== --- head/sys/mips/rt305x/std.rt305x Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/rt305x/std.rt305x Mon Mar 12 21:25:32 2012 (r232896) @@ -4,5 +4,4 @@ files "../rt305x/files.rt305x" cpu CPU_MIPS4KC -options ISA_MIPS32 Modified: head/sys/mips/sentry5/std.sentry5 ============================================================================== --- head/sys/mips/sentry5/std.sentry5 Mon Mar 12 21:24:40 2012 (r232895) +++ head/sys/mips/sentry5/std.sentry5 Mon Mar 12 21:25:32 2012 (r232896) @@ -4,7 +4,6 @@ machine mips mipsel cpu CPU_MIPS4KC -options ISA_MIPS32 options CPU_SENTRY5 # XXX should this be a # sub-cpu option? files "../sentry5/files.sentry5" From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 21:26:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34012106566B; Mon, 12 Mar 2012 21:26:10 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E9548FC0A; Mon, 12 Mar 2012 21:26:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CLQ9wi087709; Mon, 12 Mar 2012 21:26:09 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CLQ9YU087707; Mon, 12 Mar 2012 21:26:09 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203122126.q2CLQ9YU087707@svn.freebsd.org> From: Juli Mallett Date: Mon, 12 Mar 2012 21:26: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: r232897 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 21:26:10 -0000 Author: jmallett Date: Mon Mar 12 21:26:09 2012 New Revision: 232897 URL: http://svn.freebsd.org/changeset/base/232897 Log: Remove TARGET_BIG_ENDIAN which should have been removed previously. Modified: head/sys/mips/conf/AR71XX_BASE Modified: head/sys/mips/conf/AR71XX_BASE ============================================================================== --- head/sys/mips/conf/AR71XX_BASE Mon Mar 12 21:25:32 2012 (r232896) +++ head/sys/mips/conf/AR71XX_BASE Mon Mar 12 21:26:09 2012 (r232897) @@ -10,7 +10,6 @@ machine mips mipseb ident AR71XX_BASE cpu CPU_MIPS4KC -makeoptions TARGET_BIG_ENDIAN makeoptions KERNLOADADDR=0x80050000 options HZ=1000 options HWPMC_HOOKS From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 21:28:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7CFE4106564A; Mon, 12 Mar 2012 21:28:55 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E4748FC08; Mon, 12 Mar 2012 21:28:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CLStJe087849; Mon, 12 Mar 2012 21:28:55 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CLSth6087847; Mon, 12 Mar 2012 21:28:55 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201203122128.q2CLSth6087847@svn.freebsd.org> From: Josh Paetzel Date: Mon, 12 Mar 2012 21:28: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: r232898 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 21:28:55 -0000 Author: jpaetzel Date: Mon Mar 12 21:28:54 2012 New Revision: 232898 URL: http://svn.freebsd.org/changeset/base/232898 Log: Improve ZFS exporting functionality, only export pools which are on a specific device we happen to be writing to. This fixes an issue when running pc-sysinstall on a running system which needs ZFS and the main disk gets exported. Submitted by: kris Obtained from: PC-BSD Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 12 21:26:09 2012 (r232897) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 12 21:28:54 2012 (r232898) @@ -224,16 +224,6 @@ get_disk_mediasize() export VAL="${mediasize}" }; -# Function which exports all zpools, making them safe to overwrite potentially -export_all_zpools() -{ - # Export any zpools - for i in `zpool list -H -o name` - do - zpool export -f ${i} - done -}; - # Function to delete all gparts before starting an install delete_all_gpart() { @@ -268,10 +258,15 @@ delete_all_gpart() # Function to export all zpools before starting an install stop_all_zfs() { - # Export all zpools again, so that we can overwrite these partitions potentially + local DISK="`echo ${1} | sed 's|/dev/||g'`" + + # Export any zpools using this device so we can overwrite for i in `zpool list -H -o name` do - zpool export -f ${i} + ztst=`zpool status ${i} | grep "ONLINE" | awk '{print $1}' | grep -q ${DISK}` + if [ "$ztst" = "$DISK" ] ; then + zpool export -f ${i} + fi done }; @@ -324,9 +319,6 @@ setup_disk_slice() disknum="0" gmnum="0" - # Make sure all zpools are exported - export_all_zpools - # We are ready to start setting up the disks, lets read the config and do the actions while read line do @@ -354,7 +346,7 @@ setup_disk_slice() stop_all_geli ${DISK} # Make sure we don't have any zpools loaded - stop_all_zfs + stop_all_zfs ${DISK} fi @@ -375,6 +367,16 @@ setup_disk_slice() then exit_err "ERROR: The mirror disk ${MIRRORDISK} does not exist!" fi + + # Make sure we stop any gmirrors on this mirror disk + stop_all_gmirror ${MIRRORDISK} + + # Make sure we stop any geli stuff on this mirror disk + stop_all_geli ${MIRRORDISK} + + # Make sure we don't have any zpools mirror loaded + stop_all_zfs ${MIRRORDISK} + fi # Lets see if we have been given a mirror balance choice From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 21:32:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 138841065670; Mon, 12 Mar 2012 21:32:44 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F17178FC0A; Mon, 12 Mar 2012 21:32:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CLWhVF088015; Mon, 12 Mar 2012 21:32:43 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CLWhlk088009; Mon, 12 Mar 2012 21:32:43 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201203122132.q2CLWhlk088009@svn.freebsd.org> From: Josh Paetzel Date: Mon, 12 Mar 2012 21:32: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: r232899 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 21:32:44 -0000 Author: jpaetzel Date: Mon Mar 12 21:32:43 2012 New Revision: 232899 URL: http://svn.freebsd.org/changeset/base/232899 Log: Add the ability to use a varity of ZFS dataset options. While here fix a bug causing zpools with /tmp mount-points to fail Submitted by: kris Obtained from: PC-BSD Modified: 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-mountdisk.sh head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:28:54 2012 (r232898) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:32:43 2012 (r232899) @@ -50,14 +50,14 @@ get_fs_line_xvars() ACTIVEDEV="${1}" LINE="${2}" - echo $LINE | grep -q ' (' 2>/dev/null + echo $LINE | cut -d ' ' -f 4 | grep -q ' (' 2>/dev/null if [ $? -eq 0 ] ; then # See if we are looking for ZFS specific options echo $LINE | grep -q '^ZFS' 2>/dev/null if [ $? -eq 0 ] ; then ZTYPE="NONE" - ZFSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`" + ZFSVARS="`echo $LINE | cut -d ' ' -f 4 |cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`" echo $ZFSVARS | grep -qE "^(disk|file|mirror|raidz(1|2|3)?|spare|log|cache):" 2>/dev/null if [ $? -eq 0 ] ; then @@ -126,9 +126,9 @@ gen_glabel_name() NUM="0" MAXNUM="20" - # Check if we are doing /, and rename it - if [ "$MOUNT" = "/" ] - then + if [ "$TYPE" = "ZFS" ] ; then + NAME="zpool" + elif [ "$MOUNT" = "/" ] ; then NAME="rootfs" else # If doing a swap partition, also rename it @@ -341,7 +341,7 @@ setup_gpart_partitions() # Save this data to our partition config dir if [ "${_pType}" = "gpt" ] ; then _dFile="`echo $_pDisk | sed 's|/|-|g'`" - echo "${FS}:${MNT}:${ENC}:${PLABEL}:GPT:${XTRAOPTS}" >${PARTDIR}/${_dFile}p${CURPART} + echo "${FS}#${MNT}#${ENC}#${PLABEL}#GPT#${XTRAOPTS}" >${PARTDIR}/${_dFile}p${CURPART} # Clear out any headers sleep 2 @@ -354,7 +354,7 @@ setup_gpart_partitions() else # MBR Partition or GPT slice _dFile="`echo $_wSlice | sed 's|/|-|g'`" - echo "${FS}:${MNT}:${ENC}:${PLABEL}:MBR:${XTRAOPTS}:${IMAGE}" >${PARTDIR}/${_dFile}${PARTLETTER} + echo "${FS}#${MNT}#${ENC}#${PLABEL}#MBR#${XTRAOPTS}#${IMAGE}" >${PARTDIR}/${_dFile}${PARTLETTER} # Clear out any headers sleep 2 dd if=/dev/zero of=${_wSlice}${PARTLETTER} count=2048 2>/dev/null @@ -409,7 +409,7 @@ setup_gpart_partitions() fi # Found our flag to commit this label setup, check that we found at least 1 partition - if [ "${CURPART}" = "2" ] ; then + if [ "${CURPART}" = "1" ] ; then exit_err "ERROR: commitDiskLabel was called without any partition entries for it!" fi Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Mon Mar 12 21:28:54 2012 (r232898) +++ head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Mon Mar 12 21:32:43 2012 (r232899) @@ -34,8 +34,8 @@ zfs_cleanup_unmount() for PART in `ls ${PARTDIR}` do PARTDEV=`echo $PART | sed 's|-|/|g'` - PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" - PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" + PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`" + PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`" ZPOOLNAME=$(get_zpool_name "${PARTDEV}") if [ "$PARTFS" = "ZFS" ] @@ -84,9 +84,9 @@ zfs_cleanup_unmount() for PART in `ls ${PARTDIR}` do PARTDEV=`echo $PART | sed 's|-|/|g'` - PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" - PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" - PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`" + PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`" + PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`" + PARTENC="`cat ${PARTDIR}/${PART} | cut -d '#' -f 3`" ZPOOLNAME=$(get_zpool_name "${PARTDEV}") if [ "$PARTFS" = "ZFS" ] @@ -101,17 +101,20 @@ zfs_cleanup_unmount() # Check if we have multiple zfs mounts specified for ZMNT in `echo ${PARTMNT} | sed 's|,| |g'` do + ZMNT="`echo $ZMNT | cut -d '(' -f 1`" PARTMNTREV="${ZMNT} ${PARTMNTREV}" done for ZMNT in ${PARTMNTREV} do - if [ "${ZMNT}" != "/" ] - then - rc_halt "zfs set mountpoint=${ZMNT} ${ZPOOLNAME}${ZMNT}" + if [ "${ZMNT}" = "/" ] ; then continue ; fi + # Some ZFS like /swap aren't mounted, and dont need unmounting + mount | grep -q "${FSMNT}${ZMNT}" + if [ $? -eq 0 ] ; then rc_halt "zfs unmount ${ZPOOLNAME}${ZMNT}" - sleep 2 + rc_halt "zfs set mountpoint=${ZMNT} ${ZPOOLNAME}${ZMNT}" fi + sleep 2 done fi done @@ -154,10 +157,10 @@ setup_fstab() for PART in `ls ${PARTDIR}` do PARTDEV=`echo $PART | sed 's|-|/|g'` - PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" - PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" - PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`" - PARTLABEL="`cat ${PARTDIR}/${PART} | cut -d ':' -f 4`" + PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`" + PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`" + PARTENC="`cat ${PARTDIR}/${PART} | cut -d '#' -f 3`" + PARTLABEL="`cat ${PARTDIR}/${PART} | cut -d '#' -f 4`" # Unset EXT EXT="" Modified: head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh Mon Mar 12 21:28:54 2012 (r232898) +++ head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh Mon Mar 12 21:32:43 2012 (r232899) @@ -57,24 +57,52 @@ mount_partition() # Check if we have multiple zfs mounts specified for ZMNT in `echo ${MNTPOINT} | sed 's|,| |g'` do + # Check for any ZFS specific mount options + ZMNTOPTS="`echo $ZMNT | cut -d '(' -f 2 | cut -d ')' -f 1`" + if [ "$ZMNTOPTS" = "$ZMNT" ] ; then ZMNTOPTS="" ; fi + + # Reset ZMNT with options removed + ZMNT="`echo $ZMNT | cut -d '(' -f 1`" + # First make sure we create the mount point if [ ! -d "${FSMNT}${ZMNT}" ] ; then mkdir -p ${FSMNT}${ZMNT} >>${LOGOUT} 2>>${LOGOUT} fi + # Check for any volsize args + zcopt="" + for ZOPT in `echo $ZMNTOPTS | sed 's/|/ /g'` + do + echo "$ZOPT" | grep -q volsize + if [ $? -eq 0 ] ; then + volsize=`echo $ZOPT | cut -d '=' -f 2` + zcopt="-V $volsize" + fi + done + if [ "${ZMNT}" = "/" ] ; then ZNAME="" else ZNAME="${ZMNT}" - echo_log "zfs create -p ${ZPOOLNAME}${ZNAME}" - rc_halt "zfs create -p ${ZPOOLNAME}${ZNAME}" + echo_log "zfs create $zcopt -p ${ZPOOLNAME}${ZNAME}" + rc_halt "zfs create $zcopt -p ${ZPOOLNAME}${ZNAME}" fi sleep 2 - rc_halt "zfs set mountpoint=${FSMNT}${ZNAME} ${ZPOOLNAME}${ZNAME}" + if [ -z "$zcopt" ] ; then + rc_halt "zfs set mountpoint=${FSMNT}${ZNAME} ${ZPOOLNAME}${ZNAME}" + fi + + # If no ZFS options, we can skip + if [ -z "$ZMNTOPTS" ] ; then continue ; fi - # Disable atime for this zfs partition, speed increase - rc_nohalt "zfs set atime=off ${ZPOOLNAME}${ZNAME}" - done + # Parse any ZFS options now + for ZOPT in `echo $ZMNTOPTS | sed 's/|/ /g'` + do + echo "$ZOPT" | grep -q volsize + if [ $? -eq 0 ] ; then continue ; fi + rc_halt "zfs set $ZOPT ${ZPOOLNAME}${ZNAME}" + done + done # End of adding ZFS mounts else # If we are not on ZFS, lets do the mount now @@ -107,9 +135,9 @@ mount_all_filesystems() exit_err "ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel?" fi - PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" - PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" - PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`" + PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`" + PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`" + PARTENC="`cat ${PARTDIR}/${PART} | cut -d '#' -f 3`" if [ "${PARTENC}" = "ON" ] then @@ -144,9 +172,9 @@ mount_all_filesystems() exit_err "ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel?" fi - PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" - PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" - PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`" + PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`" + PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`" + PARTENC="`cat ${PARTDIR}/${PART} | cut -d '#' -f 3`" if [ "${PARTENC}" = "ON" ] then Modified: head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Mon Mar 12 21:28:54 2012 (r232898) +++ head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Mon Mar 12 21:32:43 2012 (r232899) @@ -95,13 +95,13 @@ setup_filesystems() exit_err "ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel?" fi - PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" - PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" - PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`" - PARTLABEL="`cat ${PARTDIR}/${PART} | cut -d ':' -f 4`" - PARTGEOM="`cat ${PARTDIR}/${PART} | cut -d ':' -f 5`" - PARTXTRAOPTS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 6`" - PARTIMAGE="`cat ${PARTDIR}/${PART} | cut -d ':' -f 7`" + PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`" + PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`" + PARTENC="`cat ${PARTDIR}/${PART} | cut -d '#' -f 3`" + PARTLABEL="`cat ${PARTDIR}/${PART} | cut -d '#' -f 4`" + PARTGEOM="`cat ${PARTDIR}/${PART} | cut -d '#' -f 5`" + PARTXTRAOPTS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 6`" + PARTIMAGE="`cat ${PARTDIR}/${PART} | cut -d '#' -f 7`" # Make sure journaling isn't enabled on this device if [ -e "${PARTDEV}.journal" ] Modified: head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh Mon Mar 12 21:28:54 2012 (r232898) +++ head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh Mon Mar 12 21:32:43 2012 (r232899) @@ -72,10 +72,10 @@ unmount_all_filesystems() for PART in `ls ${PARTDIR}` do PARTDEV=`echo $PART | sed 's|-|/|g'` - PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" - PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" - PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`" - PARTLABEL="`cat ${PARTDIR}/${PART} | cut -d ':' -f 4`" + PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`" + PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`" + PARTENC="`cat ${PARTDIR}/${PART} | cut -d '#' -f 3`" + PARTLABEL="`cat ${PARTDIR}/${PART} | cut -d '#' -f 4`" if [ "${PARTENC}" = "ON" ] then @@ -168,9 +168,9 @@ unmount_all_filesystems_failure() for PART in `ls ${PARTDIR}` do PARTDEV=`echo $PART | sed 's|-|/|g'` - PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" - PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" - PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`" + PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`" + PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`" + PARTENC="`cat ${PARTDIR}/${PART} | cut -d '#' -f 3`" if [ "${PARTFS}" = "SWAP" ] then From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 21:34:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A30B2106564A; Mon, 12 Mar 2012 21:34:10 +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 8EB2D8FC14; Mon, 12 Mar 2012 21:34:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CLYA05088107; Mon, 12 Mar 2012 21:34:10 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CLYAUX088105; Mon, 12 Mar 2012 21:34:10 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201203122134.q2CLYAUX088105@svn.freebsd.org> From: Michael Tuexen Date: Mon, 12 Mar 2012 21:34:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232900 - stable/9/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, 12 Mar 2012 21:34:10 -0000 Author: tuexen Date: Mon Mar 12 21:34:10 2012 New Revision: 232900 URL: http://svn.freebsd.org/changeset/base/232900 Log: MFC r232723,r232726: Fix a bug reported by Peter Holm which results in a crash: Verify in sctp_peeloff() that the socket is a one-to-many style SCTP socket. Modified: stable/9/sys/netinet/sctp_peeloff.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_peeloff.c ============================================================================== --- stable/9/sys/netinet/sctp_peeloff.c Mon Mar 12 21:32:43 2012 (r232899) +++ stable/9/sys/netinet/sctp_peeloff.c Mon Mar 12 21:34:10 2012 (r232900) @@ -55,9 +55,18 @@ sctp_can_peel_off(struct socket *head, s struct sctp_tcb *stcb; uint32_t state; + if (head == NULL) { + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EBADF); + return (EBADF); + } + if ((head->so_proto->pr_protocol != IPPROTO_SCTP) || + (head->so_type != SOCK_SEQPACKET)) { + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EOPNOTSUPP); + return (EOPNOTSUPP); + } inp = (struct sctp_inpcb *)head->so_pcb; if (inp == NULL) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EFAULT); + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EFAULT); return (EFAULT); } stcb = sctp_findassociation_ep_asocid(inp, assoc_id, 1); From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 21:41:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66614106566C; Mon, 12 Mar 2012 21:41:30 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 517D28FC1C; Mon, 12 Mar 2012 21:41:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CLfUnU088347; Mon, 12 Mar 2012 21:41:30 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CLfUu2088344; Mon, 12 Mar 2012 21:41:30 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201203122141.q2CLfUu2088344@svn.freebsd.org> From: Josh Paetzel Date: Mon, 12 Mar 2012 21:41: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: r232901 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 21:41:30 -0000 Author: jpaetzel Date: Mon Mar 12 21:41:29 2012 New Revision: 232901 URL: http://svn.freebsd.org/changeset/base/232901 Log: Use gpart "-a" flag to 4k alignment. Submitted by: kris Obtained from: PC-BSD Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:34:10 2012 (r232900) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:41:29 2012 (r232901) @@ -314,7 +314,7 @@ setup_gpart_partitions() if [ "$CURPART" = "2" ] ; then # If this is GPT, make sure first partition is aligned to 4k sleep 2 - rc_halt "gpart add -b 2016 ${SOUT} -t ${PARTYPE} ${_pDisk}" + rc_halt "gpart add -a 4k ${SOUT} -t ${PARTYPE} ${_pDisk}" else sleep 2 rc_halt "gpart add ${SOUT} -t ${PARTYPE} ${_pDisk}" Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 12 21:34:10 2012 (r232900) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 12 21:41:29 2012 (r232901) @@ -645,33 +645,9 @@ init_mbr_full_disk() echo_log "Running gpart on ${_intDISK}" rc_halt "gpart create -s mbr -f active ${_intDISK}" - # Lets figure out disk size in blocks - # Get the cyl of this disk - get_disk_cyl "${_intDISK}" - cyl="${VAL}" - - # Get the heads of this disk - get_disk_heads "${_intDISK}" - head="${VAL}" - - # Get the tracks/sectors of this disk - get_disk_sectors "${_intDISK}" - sec="${VAL}" - - # Multiply them all together to get our total blocks - totalblocks="`expr ${cyl} \* ${head} 2>/dev/null`" - totalblocks="`expr ${totalblocks} \* ${sec} 2>/dev/null`" - if [ -z "${totalblocks}" ] - then - totalblocks=`gpart show "${_intDISK}"|tail -2|head -1|awk '{ print $2 }'` - fi - - # Now set the ending block to the total disk block size - sizeblock="`expr ${totalblocks} - ${startblock}`" - # Install new partition setup echo_log "Running gpart add on ${_intDISK}" - rc_halt "gpart add -b ${startblock} -s ${sizeblock} -t freebsd -i 1 ${_intDISK}" + rc_halt "gpart add -a 4k -t freebsd -i 1 ${_intDISK}" sleep 2 echo_log "Cleaning up ${_intDISK}s1" @@ -847,44 +823,9 @@ run_gpart_free() rc_halt "gpart create -s mbr ${DISK}" fi - # Lets get the starting block first - if [ "${slicenum}" = "1" ] - then - startblock="63" - else - # Lets figure out where the prior slice ends - checkslice=$((slicenum-1)) - - # Get starting block of this slice - sblk=`gpart show ${DISK} | grep -v ${DISK} | tr -s '\t' ' ' | sed '/^$/d' | grep " ${checkslice} " | cut -d ' ' -f 2` - blksize=`gpart show ${DISK} | grep -v ${DISK} | tr -s '\t' ' ' | sed '/^$/d' | grep " ${checkslice} " | cut -d ' ' -f 3` - startblock=$((sblk+blksiz)) - fi - - # No slice after the new slice, lets figure out the free space remaining and use it - # Get the cyl of this disk - get_disk_cyl "${DISK}" - cyl="${VAL}" - - # Get the heads of this disk - get_disk_heads "${DISK}" - head="${VAL}" - - # Get the tracks/sectors of this disk - get_disk_sectors "${DISK}" - sec="${VAL}" - - # Multiply them all together to get our total blocks - totalblocks=$((cyl*head)) - totalblocks=$((totalblocks*sec)) - - - # Now set the ending block to the total disk block size - sizeblock=$((totalblocks-startblock)) - # Install new partition setup echo_log "Running gpart on ${DISK}" - rc_halt "gpart add -b ${startblock} -s ${sizeblock} -t freebsd -i ${slicenum} ${DISK}" + rc_halt "gpart add -a 4k -t freebsd -i ${slicenum} ${DISK}" sleep 2 echo_log "Cleaning up $slice" From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 21:52:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 768B5106566C; Mon, 12 Mar 2012 21:52:32 +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 604718FC15; Mon, 12 Mar 2012 21:52:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CLqWkq088722; Mon, 12 Mar 2012 21:52:32 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CLqWJ9088720; Mon, 12 Mar 2012 21:52:32 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201203122152.q2CLqWJ9088720@svn.freebsd.org> From: Michael Tuexen Date: Mon, 12 Mar 2012 21:52:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232902 - in stable/8/sys: i386/conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 21:52:32 -0000 Author: tuexen Date: Mon Mar 12 21:52:31 2012 New Revision: 232902 URL: http://svn.freebsd.org/changeset/base/232902 Log: MFC r232723,r232726: Fix a bug reported by Peter Holm which results in a crash: Verify in sctp_peeloff() that the socket is a one-to-many style SCTP socket. Modified: stable/8/sys/netinet/sctp_peeloff.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (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/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/netinet/sctp_peeloff.c ============================================================================== --- stable/8/sys/netinet/sctp_peeloff.c Mon Mar 12 21:41:29 2012 (r232901) +++ stable/8/sys/netinet/sctp_peeloff.c Mon Mar 12 21:52:31 2012 (r232902) @@ -55,9 +55,18 @@ sctp_can_peel_off(struct socket *head, s struct sctp_tcb *stcb; uint32_t state; + if (head == NULL) { + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EBADF); + return (EBADF); + } + if ((head->so_proto->pr_protocol != IPPROTO_SCTP) || + (head->so_type != SOCK_SEQPACKET)) { + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EOPNOTSUPP); + return (EOPNOTSUPP); + } inp = (struct sctp_inpcb *)head->so_pcb; if (inp == NULL) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EFAULT); + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EFAULT); return (EFAULT); } stcb = sctp_findassociation_ep_asocid(inp, assoc_id, 1); From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 22:05:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BED7106566C; Mon, 12 Mar 2012 22:05:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26BDB8FC1C; Mon, 12 Mar 2012 22:05:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CM5pnj089216; Mon, 12 Mar 2012 22:05:51 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CM5o9n089214; Mon, 12 Mar 2012 22:05:50 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203122205.q2CM5o9n089214@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 12 Mar 2012 22:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232903 - stable/9/tools/test/netfibs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 22:05:51 -0000 Author: bz Date: Mon Mar 12 22:05:50 2012 New Revision: 232903 URL: http://svn.freebsd.org/changeset/base/232903 Log: MFC r232609: Use = rather than == for expressions to test(1) builtin(1) in sh(1) to comply with standards. On modern branches there is an undocumented alias (see r219084) but on stable/7 this is still an error. Sponsored by: Cisco Systems, Inc. Modified: stable/9/tools/test/netfibs/initiator.sh Directory Properties: stable/9/tools/test/ (props changed) Modified: stable/9/tools/test/netfibs/initiator.sh ============================================================================== --- stable/9/tools/test/netfibs/initiator.sh Mon Mar 12 21:52:31 2012 (r232902) +++ stable/9/tools/test/netfibs/initiator.sh Mon Mar 12 22:05:50 2012 (r232903) @@ -410,7 +410,7 @@ testtx_ulp6_connected() *) _f="SETFIB" ;; esac - if test "${_o}" == "-i" -a "${_f}" == "SO_SETFIB"; then + if test "${_o}" = "-i" -a "${_f}" = "SO_SETFIB"; then print_debug "Skipping icmp6 tests for SO_SETFIB." return 0 fi From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 22:08:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E8E7106564A; Mon, 12 Mar 2012 22:08:04 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FE748FC14; Mon, 12 Mar 2012 22:08:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CM83Ie089352; Mon, 12 Mar 2012 22:08:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CM8351089350; Mon, 12 Mar 2012 22:08:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203122208.q2CM8351089350@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 12 Mar 2012 22:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232904 - stable/9/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 22:08:04 -0000 Author: bz Date: Mon Mar 12 22:08:03 2012 New Revision: 232904 URL: http://svn.freebsd.org/changeset/base/232904 Log: MFC r232515: Rather than printing the output from route add for all FIBs just print them for the default FIB followed by a statement with a list of FIB numbers for all the other FIBs we install the routes for. Request by: kib (to make it less noisy) Tested by: kib Modified: stable/9/etc/rc.d/routing Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/rc.d/routing ============================================================================== --- stable/9/etc/rc.d/routing Mon Mar 12 22:05:50 2012 (r232903) +++ stable/9/etc/rc.d/routing Mon Mar 12 22:08:03 2012 (r232904) @@ -145,14 +145,21 @@ static_inet6() : ${fibs:=1} # disallow "internal" addresses to appear on the wire - i=0 - while test ${i} -lt ${fibs}; do - setfib -F ${i} route ${_action} \ - -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject - setfib -F ${i} route ${_action} \ - -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject - i=$((i + 1)) - done + route ${_action} -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject + route ${_action} -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject + i=1 + if test ${i} -lt ${fibs}; then + printf "Also installing reject routes for FIBs" + while test ${i} -lt ${fibs}; do + setfib -F ${i} route -q ${_action} \ + -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject + setfib -F ${i} route -q ${_action} \ + -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject + printf " %d" ${i} + i=$((i + 1)) + done + printf "\n" + fi case ${ipv6_defaultrouter} in [Nn][Oo] | '') @@ -224,14 +231,21 @@ static_inet6() # for the host case, you will allow to omit the identifiers. # Under this configuration, the packets will go to the default # interface. - i=0 - while test ${i} -lt ${fibs}; do - setfib -F ${i} route ${_action} \ - -inet6 fe80:: -prefixlen 10 ::1 -reject - setfib -F ${i} route ${_action} \ - -inet6 ff02:: -prefixlen 16 ::1 -reject - i=$((i + 1)) - done + route ${_action} -inet6 fe80:: -prefixlen 10 ::1 -reject + route ${_action} -inet6 ff02:: -prefixlen 16 ::1 -reject + i=1 + if test ${i} -lt ${fibs}; then + printf "Also installing reject routes for FIBs" + while test ${i} -lt ${fibs}; do + setfib -F ${i} route -q ${_action} \ + -inet6 fe80:: -prefixlen 10 ::1 -reject + setfib -F ${i} route -q ${_action} \ + -inet6 ff02:: -prefixlen 16 ::1 -reject + printf " %d" ${i} + i=$((i + 1)) + done + printf "\n" + fi case ${ipv6_default_interface} in '') From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 22:10:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BE111065670; Mon, 12 Mar 2012 22:10:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2D178FC1B; Mon, 12 Mar 2012 22:10:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CMAwNN089508; Mon, 12 Mar 2012 22:10:58 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CMAw44089506; Mon, 12 Mar 2012 22:10:58 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203122210.q2CMAw44089506@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 12 Mar 2012 22:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232905 - stable/8/tools/test/netfibs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 22:10:59 -0000 Author: bz Date: Mon Mar 12 22:10:58 2012 New Revision: 232905 URL: http://svn.freebsd.org/changeset/base/232905 Log: MFC r232609: Use = rather than == for expressions to test(1) builtin(1) in sh(1) to comply with standards. On modern branches there is an undocumented alias (see r219084) but on stable/7 this is still an error. Sponsored by: Cisco Systems, Inc. Modified: stable/8/tools/test/netfibs/initiator.sh Directory Properties: stable/8/tools/test/ (props changed) Modified: stable/8/tools/test/netfibs/initiator.sh ============================================================================== --- stable/8/tools/test/netfibs/initiator.sh Mon Mar 12 22:08:03 2012 (r232904) +++ stable/8/tools/test/netfibs/initiator.sh Mon Mar 12 22:10:58 2012 (r232905) @@ -410,7 +410,7 @@ testtx_ulp6_connected() *) _f="SETFIB" ;; esac - if test "${_o}" == "-i" -a "${_f}" == "SO_SETFIB"; then + if test "${_o}" = "-i" -a "${_f}" = "SO_SETFIB"; then print_debug "Skipping icmp6 tests for SO_SETFIB." return 0 fi From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 22:13:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A2131065673; Mon, 12 Mar 2012 22:13:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B2F08FC17; Mon, 12 Mar 2012 22:13:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CMDIFm089645; Mon, 12 Mar 2012 22:13:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CMDImG089642; Mon, 12 Mar 2012 22:13:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203122213.q2CMDImG089642@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 12 Mar 2012 22:13: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: r232906 - in stable/8/etc: . rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 22:13:18 -0000 Author: bz Date: Mon Mar 12 22:13:17 2012 New Revision: 232906 URL: http://svn.freebsd.org/changeset/base/232906 Log: MFC r232515: Rather than printing the output from route add for all FIBs just print them for the default FIB followed by a statement with a list of FIB numbers for all the other FIBs we install the routes for. Modified: stable/8/etc/network.subr stable/8/etc/rc.d/routing Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/network.subr ============================================================================== --- stable/8/etc/network.subr Mon Mar 12 22:10:58 2012 (r232905) +++ stable/8/etc/network.subr Mon Mar 12 22:13:17 2012 (r232906) @@ -1134,12 +1134,18 @@ network6_default_interface_setup() route add -inet6 fe80:: -prefixlen 10 ::1 -reject case ${ipv6_default_interface} in [Nn][Oo] | '') - i=0 - while test ${i} -lt ${fibs}; do - setfib -F ${i} \ - route add -inet6 ff02:: -prefixlen 16 ::1 -reject - i=$((i + 1)) - done + route add -inet6 ff02:: -prefixlen 16 ::1 -reject + i=1 + if test ${i} -lt ${fibs}; then + printf "Also installing reject routes for FIBs" + while test ${i} -lt ${fibs}; do + setfib -F ${i} route add -inet6 \ + ff02:: -prefixlen 16 ::1 -reject + printf " %d" ${i} + i=$((i + 1)) + done + printf "\n" + fi ;; *) laddr=`network6_getladdr ${ipv6_default_interface}` @@ -1147,11 +1153,16 @@ network6_default_interface_setup() # route to all others. route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface i=1 - while test ${i} -lt ${fibs}; do - setfib -F ${i} \ - route add -inet6 ff02:: -prefixlen 16 ::1 -reject - i=$((i + 1)) - done + if test ${i} -lt ${fibs}; then + printf "Also installing reject routes for FIBs" + while test ${i} -lt ${fibs}; do + setfib -F ${i} route add -inet6 \ + ff02:: -prefixlen 16 ::1 -reject + printf " %d" ${i} + i=$((i + 1)) + done + printf "\n" + fi # Disable installing the default interface with the # case net.inet6.ip6.forwarding=0 and Modified: stable/8/etc/rc.d/routing ============================================================================== --- stable/8/etc/rc.d/routing Mon Mar 12 22:10:58 2012 (r232905) +++ stable/8/etc/rc.d/routing Mon Mar 12 22:13:17 2012 (r232906) @@ -68,14 +68,21 @@ static_start() : ${fibs:=1} # disallow "internal" addresses to appear on the wire - i=0 - while test ${i} -lt ${fibs}; do - setfib -F ${i} route add -inet6 \ - ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject - setfib -F ${i} route add -inet6 \ - ::0.0.0.0 -prefixlen 96 ::1 -reject - i=$((i + 1)) - done + route add -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject + route add -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject + i=1 + if test ${i} -lt ${fibs}; then + printf "Also installing reject routes for FIBs" + while test ${i} -lt ${fibs}; do + setfib -F ${i} route -q add -inet6 \ + ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject + setfib -F ${i} route -q add -inet6 \ + ::0.0.0.0 -prefixlen 96 ::1 -reject + printf " %d" ${i} + i=$((i + 1)) + done + printf "\n" + fi fi } From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 00:38:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F51C1065670; Tue, 13 Mar 2012 00:38:50 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AEA68FC16; Tue, 13 Mar 2012 00:38:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2D0cnUn095979; Tue, 13 Mar 2012 00:38:49 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2D0cnM6095977; Tue, 13 Mar 2012 00:38:49 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203130038.q2D0cnM6095977@svn.freebsd.org> From: Juli Mallett Date: Tue, 13 Mar 2012 00:38: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: r232907 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 00:38:50 -0000 Author: jmallett Date: Tue Mar 13 00:38:49 2012 New Revision: 232907 URL: http://svn.freebsd.org/changeset/base/232907 Log: Add a kernel-toolchains target like the toolchains target, but building only the parts of the toolchain necessary to build kernels. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Mon Mar 12 22:13:17 2012 (r232906) +++ head/Makefile Tue Mar 13 00:38:49 2012 (r232907) @@ -18,6 +18,7 @@ # reinstallkernel.debug # kernel - buildkernel + installkernel. # kernel-toolchain - Builds the subset of world necessary to build a kernel +# kernel-toolchains - Build kernel-toolchain for all universe targets. # doxygen - Build API documentation of the kernel, needs doxygen. # update - Convenient way to update your source tree(s). # check-old - List obsolete directories/files/libraries. @@ -317,6 +318,9 @@ tinderbox: toolchains: @cd ${.CURDIR} && ${MAKE} UNIVERSE_TARGET=toolchain universe +kernel-toolchains: + @cd ${.CURDIR} && ${MAKE} UNIVERSE_TARGET=kernel-toolchain universe + # # universe # From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 00:45:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DC671065670; Tue, 13 Mar 2012 00:45:28 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48DF38FC0A; Tue, 13 Mar 2012 00:45:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2D0jSKn096542; Tue, 13 Mar 2012 00:45:28 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2D0jSrK096539; Tue, 13 Mar 2012 00:45:28 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203130045.q2D0jSrK096539@svn.freebsd.org> From: Juli Mallett Date: Tue, 13 Mar 2012 00:45: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: r232908 - head/usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 00:45:28 -0000 Author: jmallett Date: Tue Mar 13 00:45:27 2012 New Revision: 232908 URL: http://svn.freebsd.org/changeset/base/232908 Log: sysinstall was removed from usr.sbin/Makefile in r225937. Because per-arch Makefiles were split out in this directory and others in userland, it makes it quite easy to miss per-arch conditionals when changing something generally. Modified: head/usr.sbin/Makefile.arm head/usr.sbin/Makefile.mips Modified: head/usr.sbin/Makefile.arm ============================================================================== --- head/usr.sbin/Makefile.arm Tue Mar 13 00:38:49 2012 (r232907) +++ head/usr.sbin/Makefile.arm Tue Mar 13 00:45:27 2012 (r232908) @@ -2,4 +2,3 @@ SUBDIR+= ofwdump SUBDIR+= kgmon -SUBDIR:= ${SUBDIR:Nsysinstall} Modified: head/usr.sbin/Makefile.mips ============================================================================== --- head/usr.sbin/Makefile.mips Tue Mar 13 00:38:49 2012 (r232907) +++ head/usr.sbin/Makefile.mips Tue Mar 13 00:45:27 2012 (r232908) @@ -1,6 +1,5 @@ # $FreeBSD$ -SUBDIR:= ${SUBDIR:Nsysinstall} # uathload broken for n32 and n64 due to toolchain issues .if ${MACHINE_ARCH:Mmipse[lb]} == "" SUBDIR:= ${SUBDIR:Nuathload} From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 02:15:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id B61C0106566C; Tue, 13 Mar 2012 02:15:45 +0000 (UTC) Date: Tue, 13 Mar 2012 02:15:45 +0000 From: Alexander Best To: Dimitry Andric Message-ID: <20120313021545.GA61307@freebsd.org> References: <201203122107.q2CL7MYo086974@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201203122107.q2CL7MYo086974@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232894 - head/contrib/llvm/tools/clang/lib/Basic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 02:15:45 -0000 On Mon Mar 12 12, Dimitry Andric wrote: > Author: dim > Date: Mon Mar 12 21:07:22 2012 > New Revision: 232894 > URL: http://svn.freebsd.org/changeset/base/232894 > > Log: > Pull in r145194 from upstream clang trunk: > > Make our handling of MMX x SSE closer to what gcc does: > > * Enabling sse enables mmx. > * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already). > * The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse. are you sure that sys/conf/kern.mk doesn't need updating after this commit? if now setting -mno-mmx doesn't imply -mno-sse, i think the i386 and amd64 sections in kern.mk needs to be updated (along with the comments). cheers. alex > > Some configure scripts depend on this. > > PR: i386/165968 > MFC after: 3 days > > Modified: > head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp > > Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp > ============================================================================== > --- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Mon Mar 12 20:59:18 2012 (r232893) > +++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Mon Mar 12 21:07:22 2012 (r232894) > @@ -1583,23 +1583,26 @@ bool X86TargetInfo::setFeatureEnabled(ll > (Name != "sse4" && Name != "sse4.2" && Name != "sse4.1")) > return false; > > + // FIXME: this should probably use a switch with fall through. > + > if (Enabled) { > if (Name == "mmx") > Features["mmx"] = true; > else if (Name == "sse") > - Features["sse"] = true; > + Features["mmx"] = Features["sse"] = true; > else if (Name == "sse2") > - Features["sse"] = Features["sse2"] = true; > + Features["mmx"] = Features["sse"] = Features["sse2"] = true; > else if (Name == "sse3") > - Features["sse"] = Features["sse2"] = Features["sse3"] = true; > + Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = > + true; > else if (Name == "ssse3") > - Features["sse"] = Features["sse2"] = Features["sse3"] = > + Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = > Features["ssse3"] = true; > else if (Name == "sse4" || Name == "sse4.2") > - Features["sse"] = Features["sse2"] = Features["sse3"] = > + Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = > Features["ssse3"] = Features["sse41"] = Features["sse42"] = true; > else if (Name == "sse4.1") > - Features["sse"] = Features["sse2"] = Features["sse3"] = > + Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = > Features["ssse3"] = Features["sse41"] = true; > else if (Name == "3dnow") > Features["mmx"] = Features["3dnow"] = true; > @@ -1608,10 +1611,11 @@ bool X86TargetInfo::setFeatureEnabled(ll > else if (Name == "aes") > Features["aes"] = true; > else if (Name == "avx") > - Features["avx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = > - Features["ssse3"] = Features["sse41"] = Features["sse42"] = true; > + Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = > + Features["ssse3"] = Features["sse41"] = Features["sse42"] = > + Features["avx"] = true; > else if (Name == "sse4a") > - Features["sse4a"] = true; > + Features["mmx"] = Features["sse4a"] = true; > } else { > if (Name == "mmx") > Features["mmx"] = Features["3dnow"] = Features["3dnowa"] = false; > @@ -3779,13 +3783,32 @@ TargetInfo *TargetInfo::CreateTargetInfo > Target->getDefaultFeatures(Features); > > // Apply the user specified deltas. > + // First the enables. > for (std::vector::const_iterator it = Opts.Features.begin(), > ie = Opts.Features.end(); it != ie; ++it) { > const char *Name = it->c_str(); > > + if (Name[0] != '+') > + continue; > + > + // Apply the feature via the target. > + if (!Target->setFeatureEnabled(Features, Name + 1, true)) { > + Diags.Report(diag::err_target_invalid_feature) << Name; > + return 0; > + } > + } > + > + // Then the disables. > + for (std::vector::const_iterator it = Opts.Features.begin(), > + ie = Opts.Features.end(); it != ie; ++it) { > + const char *Name = it->c_str(); > + > + if (Name[0] == '+') > + continue; > + > // Apply the feature via the target. > - if ((Name[0] != '-' && Name[0] != '+') || > - !Target->setFeatureEnabled(Features, Name + 1, (Name[0] == '+'))) { > + if (Name[0] != '-' || > + !Target->setFeatureEnabled(Features, Name + 1, false)) { > Diags.Report(diag::err_target_invalid_feature) << Name; > return 0; > } From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 04:50:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B707D1065674; Tue, 13 Mar 2012 04:50:42 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A18278FC17; Tue, 13 Mar 2012 04:50:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2D4ogJo010702; Tue, 13 Mar 2012 04:50:42 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2D4ogA7010699; Tue, 13 Mar 2012 04:50:42 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203130450.q2D4ogA7010699@svn.freebsd.org> From: Juli Mallett Date: Tue, 13 Mar 2012 04:50: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: r232910 - in head: contrib/gdb/gdb gnu/usr.bin/gdb/arch/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: Tue, 13 Mar 2012 04:50:42 -0000 Author: jmallett Date: Tue Mar 13 04:50:41 2012 New Revision: 232910 URL: http://svn.freebsd.org/changeset/base/232910 Log: Note two shortcomings of GDB on MIPS that should be addressed. Modified: head/contrib/gdb/gdb/mipsfbsd-tdep.c head/gnu/usr.bin/gdb/arch/mips/Makefile Modified: head/contrib/gdb/gdb/mipsfbsd-tdep.c ============================================================================== --- head/contrib/gdb/gdb/mipsfbsd-tdep.c Tue Mar 13 02:10:15 2012 (r232909) +++ head/contrib/gdb/gdb/mipsfbsd-tdep.c Tue Mar 13 04:50:41 2012 (r232910) @@ -205,6 +205,8 @@ static struct core_fns mipsfbsd_elfcore_ * 0x7ffeffec sigcode -> 44 bytes * * 0x7ffeffc4 sigcode end env strings etc start + * + * XXX This is out-of-date and varies by ABI. */ #define MIPS_FBSD_SIGTRAMP_START (0x7ffeffc4) #define MIPS_FBSD_SIGTRAMP_END (0x7ffeffec) Modified: head/gnu/usr.bin/gdb/arch/mips/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/arch/mips/Makefile Tue Mar 13 02:10:15 2012 (r232909) +++ head/gnu/usr.bin/gdb/arch/mips/Makefile Tue Mar 13 04:50:41 2012 (r232910) @@ -1,5 +1,8 @@ # $FreeBSD$ +# +# XXX Should set DEFAULT_BFD_VEC based on target. +# .if !defined(GDB_CROSS_DEBUGGER) LIBSRCS+= mipsfbsd-nat.c fbsd-threads.c .endif From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 05:14:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAFCB106566B; Tue, 13 Mar 2012 05:14:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx09.syd.optusnet.com.au (fallbackmx09.syd.optusnet.com.au [211.29.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id 5FC228FC0A; Tue, 13 Mar 2012 05:14:35 +0000 (UTC) Received: from mail16.syd.optusnet.com.au (mail16.syd.optusnet.com.au [211.29.132.197]) by fallbackmx09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q2D5EYLq032549; Tue, 13 Mar 2012 16:14:34 +1100 Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail16.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q2D5EPLc022047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Mar 2012 16:14:26 +1100 Date: Tue, 13 Mar 2012 16:14:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <201203122107.q2CL7MYo086974@svn.freebsd.org> Message-ID: <20120313153902.Y1611@besplex.bde.org> References: <201203122107.q2CL7MYo086974@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: r232894 - head/contrib/llvm/tools/clang/lib/Basic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 05:14:36 -0000 On Mon, 12 Mar 2012, Dimitry Andric wrote: > Log: > Pull in r145194 from upstream clang trunk: > > Make our handling of MMX x SSE closer to what gcc does: > > * Enabling sse enables mmx. > * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already). > * The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse. > > Some configure scripts depend on this. > > PR: i386/165968 > MFC after: 3 days Can you turn off use of SSE[2] for float and double precision on i386? This use might break the ABI, and FreeBSD headers don't support it. I use the following to hack around the brokenness: % Index: math.h % =================================================================== % RCS file: /home/ncvs/src/lib/msun/src/math.h,v % retrieving revision 1.82 % diff -u -2 -r1.82 math.h % --- math.h 12 Nov 2011 19:55:48 -0000 1.82 % +++ math.h 4 Jan 2012 05:09:51 -0000 % @@ -125,4 +130,10 @@ % : __signbitl(x)) % % +#ifdef __SSE_MATH__ % +#define __float_t float % +#endif % +#ifdef __SSE2_MATH__ % +#define __double_t double % +#endif % typedef __double_t double_t; % typedef __float_t float_t; Parts of my libm make critical (at least for optimality) use of float_t and double_t, and break when clang doesn't match either gcc's behaviour or what the headers say they are. The above changes the header to match clang's behaviour. There is still an ABI problem. Although the ABI isn't strictly broken (since clang uses the normal ABI for function calls), programs and libraries should be able to assume that float_t and double_t are independent of the compiler; but with clang, they even depend on the compiler flags. Also, converting to the normal ABI across function calls is a slow operation. clang on most of libm ends up being slower on i386 with the SSE "optimization" than gcc without this optimization. clang doesn't really understand the i387 so it is even slower without this opimization. FLT_EVAL_METHOD is also quite broken (it is -1, which is only correct for clang with SSE because -1 can mean anything and what it actually means is undocumented). My libm also makes critical use of FLT_EVAL_METHOD, but I havn't tested the parts that do as much as the parts that use float_t etc., and it turns out that use of float_t etc. makes FLT_EVAL_METHOD unimportant. clang and gcc define __FLT_EVAL_METHOD__, but get it wrong in different ways, so this definition is unusuable. For example, it is always 0 for clang; this is correct with SSE, but without SSE, -1 is correct. Thus __FLT_EVAL_METHOD__ is unusable for defining FLT_EVAL_METHOD. The SSE defines work better and can be used to define FLT_EVAL_METHOD as well as float_t and double_t. You just have to know that clang has the same compiler bugs^Wfeatures as gcc, so that FLT_EVAL_METHOD must be define as -1 if the i387 is used. Note that __SSE[2]_MATH__ are quite different from __SSE[2]__. My libm also uses the latter in critical ways without problems. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 05:21:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A79171065670; Tue, 13 Mar 2012 05:21:14 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92ED08FC1A; Tue, 13 Mar 2012 05:21:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2D5LEqn013360; Tue, 13 Mar 2012 05:21:14 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2D5LELc013358; Tue, 13 Mar 2012 05:21:14 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203130521.q2D5LELc013358@svn.freebsd.org> From: Juli Mallett Date: Tue, 13 Mar 2012 05:21: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: r232911 - in head: . usr.sbin/crunch/crunchide X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 05:21:14 -0000 Author: jmallett Date: Tue Mar 13 05:21:14 2012 New Revision: 232911 URL: http://svn.freebsd.org/changeset/base/232911 Log: Fix crunchide on MIPS with other than the O32 ABI. Deleted: head/Makefile.mips Modified: head/usr.sbin/crunch/crunchide/Makefile Modified: head/usr.sbin/crunch/crunchide/Makefile ============================================================================== --- head/usr.sbin/crunch/crunchide/Makefile Tue Mar 13 04:50:41 2012 (r232910) +++ head/usr.sbin/crunch/crunchide/Makefile Tue Mar 13 05:21:14 2012 (r232911) @@ -11,7 +11,8 @@ SRCS+= exec_aout.c .endif .if ${TARGET_ARCH} == ia64 || ${TARGET_ARCH} == powerpc64 || \ - ${TARGET_ARCH} == sparc64 || ${TARGET_ARCH} == amd64 + ${TARGET_ARCH} == sparc64 || ${TARGET_ARCH} == amd64 || \ + ${TARGET_ARCH:Mmips64*} CFLAGS+=-DNLIST_ELF64 SRCS+= exec_elf64.c exec_elf64.o: exec_elf32.c From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 06:15:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65D9C106566C; Tue, 13 Mar 2012 06:15:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46ECA8FC14; Tue, 13 Mar 2012 06:15:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2D6FLmn018636; Tue, 13 Mar 2012 06:15:21 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2D6FLso018634; Tue, 13 Mar 2012 06:15:21 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203130615.q2D6FLso018634@svn.freebsd.org> From: Adrian Chadd Date: Tue, 13 Mar 2012 06:15: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: r232912 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 06:15:21 -0000 Author: adrian Date: Tue Mar 13 06:15:20 2012 New Revision: 232912 URL: http://svn.freebsd.org/changeset/base/232912 Log: Correctly (I hope) deallocate the if_arge RX buffer ring on arge_stop(). I had some interesting hangs until I realised I should try flushing the DDR FIFO register and lo and behold, hangs stopped occuring. I've put in a few DDR flushes here and there in case people decide to reuse some of these functions. It's very very likely they're almost all superflous. To test: * Connect to a network with a _lot_ of broadcast traffic * Do this: # while true; do ifconfig arge0 down; ifconfig arge0 up; done This fixes the mbuf exhaustion that has been reported when the interface state flaps up/down. Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Tue Mar 13 05:21:14 2012 (r232911) +++ head/sys/mips/atheros/if_arge.c Tue Mar 13 06:15:20 2012 (r232912) @@ -118,6 +118,7 @@ static int arge_probe(device_t); static void arge_reset_dma(struct arge_softc *); static int arge_resume(device_t); static int arge_rx_ring_init(struct arge_softc *); +static void arge_rx_ring_free(struct arge_softc *sc); static int arge_tx_ring_init(struct arge_softc *); #ifdef DEVICE_POLLING static int arge_poll(struct ifnet *, enum poll_cmd, int); @@ -807,6 +808,12 @@ arge_reset_dma(struct arge_softc *sc) DMA_RX_STATUS_BUS_ERROR | DMA_RX_STATUS_OVERFLOW); ARGE_WRITE(sc, AR71XX_DMA_TX_STATUS, DMA_TX_STATUS_BUS_ERROR | DMA_TX_STATUS_UNDERRUN); + + /* + * Force a DDR flush so any pending data is properly + * flushed to RAM before underlying buffers are freed. + */ + arge_flush_ddr(sc); } @@ -1083,6 +1090,10 @@ arge_stop(struct arge_softc *sc) ARGE_WRITE(sc, AR71XX_DMA_INTR, 0); arge_reset_dma(sc); + + /* Flush FIFO and free any existing mbufs */ + arge_flush_ddr(sc); + arge_rx_ring_free(sc); } @@ -1531,6 +1542,12 @@ arge_rx_ring_init(struct arge_softc *sc) bzero(rd->arge_rx_ring, sizeof(rd->arge_rx_ring)); for (i = 0; i < ARGE_RX_RING_COUNT; i++) { rxd = &sc->arge_cdata.arge_rxdesc[i]; + if (rxd->rx_m != NULL) { + device_printf(sc->arge_dev, + "%s: ring[%d] rx_m wasn't free?\n", + __func__, + i); + } rxd->rx_m = NULL; rxd->desc = &rd->arge_rx_ring[i]; if (i == ARGE_RX_RING_COUNT - 1) @@ -1551,6 +1568,32 @@ arge_rx_ring_init(struct arge_softc *sc) } /* + * Free all the buffers in the RX ring. + * + * TODO: ensure that DMA is disabled and no pending DMA + * is lurking in the FIFO. + */ +static void +arge_rx_ring_free(struct arge_softc *sc) +{ + int i; + struct arge_rxdesc *rxd; + + ARGE_LOCK_ASSERT(sc); + + for (i = 0; i < ARGE_RX_RING_COUNT; i++) { + rxd = &sc->arge_cdata.arge_rxdesc[i]; + /* Unmap the mbuf */ + if (rxd->rx_m != NULL) { + bus_dmamap_unload(sc->arge_cdata.arge_rx_tag, + rxd->rx_dmamap); + m_free(rxd->rx_m); + rxd->rx_m = NULL; + } + } +} + +/* * Initialize an RX descriptor and attach an MBUF cluster. */ static int From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 06:22:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30B6D1065670; Tue, 13 Mar 2012 06:22:50 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BC328FC12; Tue, 13 Mar 2012 06:22:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2D6Mnrq019688; Tue, 13 Mar 2012 06:22:49 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2D6Mn7U019685; Tue, 13 Mar 2012 06:22:49 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203130622.q2D6Mn7U019685@svn.freebsd.org> From: Juli Mallett Date: Tue, 13 Mar 2012 06:22: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: r232913 - in head/sys: conf mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 06:22:50 -0000 Author: jmallett Date: Tue Mar 13 06:22:49 2012 New Revision: 232913 URL: http://svn.freebsd.org/changeset/base/232913 Log: Don't build kernel.tramp on Octeon. Probably building it should be opt-in not opt-out, but I don't know enough about which ports need it to get the defaults right. Modified: head/sys/conf/Makefile.mips head/sys/mips/conf/OCTEON1 Modified: head/sys/conf/Makefile.mips ============================================================================== --- head/sys/conf/Makefile.mips Tue Mar 13 06:15:20 2012 (r232912) +++ head/sys/conf/Makefile.mips Tue Mar 13 06:22:49 2012 (r232913) @@ -63,6 +63,7 @@ TRAMP_ELFSIZE=32 # XXX hardcoded kernel entry point ASM_CFLAGS+=${CFLAGS} -D_LOCORE -DLOCORE +.if !defined(WITHOUT_KERNEL_TRAMPOLINE) KERNEL_EXTRA=trampoline trampoline: ${KERNEL_KO}.tramp.bin ${KERNEL_KO}.tramp.bin: ${KERNEL_KO} $S/$M/$M/elf_trampoline.c \ @@ -78,6 +79,7 @@ ${KERNEL_KO}.tramp.bin: ${KERNEL_KO} $S/ -o ${KERNEL_KO}.tramp.elf ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.elf \ ${KERNEL_KO}.tramp.bin +.endif %BEFORE_DEPEND Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Tue Mar 13 06:15:20 2012 (r232912) +++ head/sys/mips/conf/OCTEON1 Tue Mar 13 06:22:49 2012 (r232913) @@ -27,6 +27,9 @@ makeoptions LDSCRIPT_NAME=ldscript.mips. makeoptions MODULES_OVERRIDE="" makeoptions KERNLOADADDR=0xffffffff80100000 +# We don't need to build a trampolined version of the kernel. +makeoptions WITHOUT_KERNEL_TRAMPOLINE=1 + include "../cavium/std.octeon1" hints "OCTEON1.hints" #Default places to look for devices. From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 06:28:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 187A21065670; Tue, 13 Mar 2012 06:28:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 024C88FC0A; Tue, 13 Mar 2012 06:28:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2D6SqTc020492; Tue, 13 Mar 2012 06:28:52 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2D6Squg020490; Tue, 13 Mar 2012 06:28:52 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203130628.q2D6Squg020490@svn.freebsd.org> From: Adrian Chadd Date: Tue, 13 Mar 2012 06:28: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: r232914 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 06:28:53 -0000 Author: adrian Date: Tue Mar 13 06:28:52 2012 New Revision: 232914 URL: http://svn.freebsd.org/changeset/base/232914 Log: Fix link status handling on if_arge upon system boot to allow bootp/NFS to function. From the submitter: This patch fixes an issue I encountered using an NFS root with an ar71xx-based MikroTik RouterBoard 450G on -current where the kernel fails to contact a DHCP/BOOTP server via if_arge when it otherwise should be able to. This may be the same issue that Monthadar Al Jaberi reported against an RSPRO on 6 March, as the signature is the same: %%% DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 . . . DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 arge0: initialization failed: no memory for rx buffers DHCP/BOOTP timeout for server 255.255.255.255 arge0: initialization failed: no memory for rx buffers %%% The primary issue that I found is that the DHCP/BOOTP message that bootpc_call() is sending never makes it onto the wire, which I believe is due to the following: - Last December, a change was made to the ifioctl that bootpc_call() uses to adjust the netmask around the sosend(). - The new ioctl (SIOCAIFADDR) performs an if_init when invoked, whereas the old one (SIOCSIFNETMASK) did not. - if_arge maintains its own sense of link state in sc->arge_link_status. - On a single-phy interface, sc->arge_link_status is initialized to 0 in arge_init_locked(). - sc->arge_link_status remains 0 until a phy state change notification causes arge_link_task to run, notice the link is up, and set it to 1. - The inits caused by the ifioctls in bootpc_call are reinitializing the interface, but not the phy, so sc->arge_link_status goes to 0 and remains there. - arge_start_locked() always sees sc->arge_link_status == 0 and returns without queuing anything. The attached patch changes arge_init_locked() such that in the single-phy case, instead of initializing sc->arge_link_status to 0, it runs arge_link_task() to set it according to the current phy state. This change has allowed my setup to mount an NFS root successfully. Submitted by: Patrick Kelsey Reviewed by: juli Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Tue Mar 13 06:22:49 2012 (r232913) +++ head/sys/mips/atheros/if_arge.c Tue Mar 13 06:28:52 2012 (r232914) @@ -110,6 +110,7 @@ static int arge_ioctl(struct ifnet *, u_ static void arge_init(void *); static void arge_init_locked(struct arge_softc *); static void arge_link_task(void *, int); +static void arge_update_link_locked(struct arge_softc *sc); static void arge_set_pll(struct arge_softc *, int, int); static int arge_miibus_readreg(device_t, int, int); static void arge_miibus_statchg(device_t); @@ -684,13 +685,20 @@ static void arge_link_task(void *arg, int pending) { struct arge_softc *sc; + sc = (struct arge_softc *)arg; + + ARGE_LOCK(sc); + arge_update_link_locked(sc); + ARGE_UNLOCK(sc); +} + +static void +arge_update_link_locked(struct arge_softc *sc) +{ struct mii_data *mii; struct ifnet *ifp; uint32_t media, duplex; - sc = (struct arge_softc *)arg; - - ARGE_LOCK(sc); mii = device_get_softc(sc->arge_miibus); ifp = sc->arge_ifp; if (mii == NULL || ifp == NULL || @@ -708,10 +716,10 @@ arge_link_task(void *arg, int pending) duplex = mii->mii_media_active & IFM_GMASK; arge_set_pll(sc, media, duplex); } - } else + } else { sc->arge_link_status = 0; + } - ARGE_UNLOCK(sc); } static void @@ -853,7 +861,6 @@ arge_init_locked(struct arge_softc *sc) if (sc->arge_miibus) { - sc->arge_link_status = 0; mii = device_get_softc(sc->arge_miibus); mii_mediachg(mii); } @@ -867,8 +874,10 @@ arge_init_locked(struct arge_softc *sc) ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - if (sc->arge_miibus) + if (sc->arge_miibus) { callout_reset(&sc->arge_stat_callout, hz, arge_tick, sc); + arge_update_link_locked(sc); + } ARGE_WRITE(sc, AR71XX_DMA_TX_DESC, ARGE_TX_RING_ADDR(sc, 0)); ARGE_WRITE(sc, AR71XX_DMA_RX_DESC, ARGE_RX_RING_ADDR(sc, 0)); From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 06:48:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 57001106564A; Tue, 13 Mar 2012 06:48:27 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3778F8FC12; Tue, 13 Mar 2012 06:48:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2D6mRvJ023086; Tue, 13 Mar 2012 06:48:27 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2D6mQ6p023082; Tue, 13 Mar 2012 06:48:26 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203130648.q2D6mQ6p023082@svn.freebsd.org> From: Juli Mallett Date: Tue, 13 Mar 2012 06:48: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: r232915 - head/sys/contrib/octeon-sdk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 06:48:27 -0000 Author: jmallett Date: Tue Mar 13 06:48:26 2012 New Revision: 232915 URL: http://svn.freebsd.org/changeset/base/232915 Log: Remove some files not used by the FreeBSD kernel which have been adding quite a bit of bloat to the kernel source tree's size. Deleted: head/sys/contrib/octeon-sdk/cvmx-csr-db-support.c head/sys/contrib/octeon-sdk/cvmx-csr-db.c head/sys/contrib/octeon-sdk/cvmx-csr-db.h head/sys/contrib/octeon-sdk/cvmx-error-custom.c head/sys/contrib/octeon-sdk/cvmx-error-custom.h head/sys/contrib/octeon-sdk/cvmx-error-init-cn30xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn31xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn38xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn38xxp2.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn50xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn52xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn52xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn56xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn56xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn58xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn58xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn61xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn63xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn63xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn66xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn68xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn68xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cnf71xx.c head/sys/contrib/octeon-sdk/cvmx-error.c head/sys/contrib/octeon-sdk/cvmx-error.h Modified: head/sys/contrib/octeon-sdk/cvmx-pcie.c head/sys/contrib/octeon-sdk/cvmx-twsi.c head/sys/contrib/octeon-sdk/cvmx-usb.c Modified: head/sys/contrib/octeon-sdk/cvmx-pcie.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-pcie.c Tue Mar 13 06:28:52 2012 (r232914) +++ head/sys/contrib/octeon-sdk/cvmx-pcie.c Tue Mar 13 06:48:26 2012 (r232915) @@ -76,7 +76,9 @@ #include #else #include "cvmx.h" +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include "cvmx-csr-db.h" +#endif #include "cvmx-pcie.h" #include "cvmx-sysinfo.h" #include "cvmx-swap.h" Modified: head/sys/contrib/octeon-sdk/cvmx-twsi.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-twsi.c Tue Mar 13 06:28:52 2012 (r232914) +++ head/sys/contrib/octeon-sdk/cvmx-twsi.c Tue Mar 13 06:48:26 2012 (r232915) @@ -59,8 +59,10 @@ #else #include "cvmx.h" #include "cvmx-twsi.h" +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include "cvmx-csr-db.h" #endif +#endif //#define PRINT_TWSI_CONFIG #ifdef PRINT_TWSI_CONFIG Modified: head/sys/contrib/octeon-sdk/cvmx-usb.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-usb.c Tue Mar 13 06:28:52 2012 (r232914) +++ head/sys/contrib/octeon-sdk/cvmx-usb.c Tue Mar 13 06:48:26 2012 (r232915) @@ -72,7 +72,9 @@ #include "cvmx-usb.h" #include "cvmx-helper.h" #include "cvmx-helper-board.h" +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include "cvmx-csr-db.h" +#endif #include "cvmx-swap.h" #if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include "cvmx-error.h" From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 06:50:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D3251065679; Tue, 13 Mar 2012 06:50:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3678E8FC29; Tue, 13 Mar 2012 06:50:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2D6ov2H023263; Tue, 13 Mar 2012 06:50:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2D6oukM023261; Tue, 13 Mar 2012 06:50:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203130650.q2D6oukM023261@svn.freebsd.org> From: Adrian Chadd Date: Tue, 13 Mar 2012 06:50: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: r232916 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 06:50:57 -0000 Author: adrian Date: Tue Mar 13 06:50:56 2012 New Revision: 232916 URL: http://svn.freebsd.org/changeset/base/232916 Log: Remove a now unneeded ARGE_UNLOCK(). Whilst I'm here, remove a couple blank lines. Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Tue Mar 13 06:48:26 2012 (r232915) +++ head/sys/mips/atheros/if_arge.c Tue Mar 13 06:50:56 2012 (r232916) @@ -703,7 +703,6 @@ arge_update_link_locked(struct arge_soft ifp = sc->arge_ifp; if (mii == NULL || ifp == NULL || (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - ARGE_UNLOCK(sc); return; } @@ -719,7 +718,6 @@ arge_update_link_locked(struct arge_soft } else { sc->arge_link_status = 0; } - } static void @@ -859,7 +857,6 @@ arge_init_locked(struct arge_softc *sc) arge_reset_dma(sc); - if (sc->arge_miibus) { mii = device_get_softc(sc->arge_miibus); mii_mediachg(mii); From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 07:20:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91B4C1065679; Tue, 13 Mar 2012 07:20:01 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id A1BAE8FC0A; Tue, 13 Mar 2012 07:20:00 +0000 (UTC) Received: by wibhq7 with SMTP id hq7so228198wib.13 for ; Tue, 13 Mar 2012 00:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=cmvRTOaEPPm3CRqZEh9fHgDejXZFzN44mOOZDVIonRM=; b=F4T6PMRfo/+T95GtwJxPa8kXo1sdQOZB12yK7ZlgJiGEfgp3wy/TlTTwolVRbfi/jk YKE4c8JrlFqlzfaVawaLJcdaIvz9iRznVDjOpn7TEKMcJAqxQnHuEIl8Vr6CtucWjmuF N570fn4MNlSqa/ilts3lDxYcOYYgvnryp/C1HA9whXnKbJBaHWZxhwyN5Klo3R30Khgb 5zrDeB/vzytTZ2j2J8aB7UM2miajCDHiRDmOcJjDuxGlH0UdcKzUwyV2+IHodfegwrfm b7/mtNK9/dFvyxRznMw1z7b3P1DbIPLMq4pu013K6wWvEjbu1YTHG71haGCOEJRiv5Us erdg== Received: by 10.180.83.42 with SMTP id n10mr4674709wiy.9.1331623199705; Tue, 13 Mar 2012 00:19:59 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id bg3sm40784580wib.10.2012.03.13.00.19.57 (version=SSLv3 cipher=OTHER); Tue, 13 Mar 2012 00:19:58 -0700 (PDT) Sender: Alexander Motin Message-ID: <4F5EF51C.6080806@FreeBSD.org> Date: Tue, 13 Mar 2012 09:19:56 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120226 Thunderbird/10.0.2 MIME-Version: 1.0 To: Josh Paetzel References: <201203122141.q2CLfUu2088344@svn.freebsd.org> In-Reply-To: <201203122141.q2CLfUu2088344@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Kris Moore Subject: Re: svn commit: r232901 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 07:20:01 -0000 On 03/12/12 23:41, Josh Paetzel wrote: > Author: jpaetzel > Date: Mon Mar 12 21:41:29 2012 > New Revision: 232901 > URL: http://svn.freebsd.org/changeset/base/232901 > > Log: > Use gpart "-a" flag to 4k alignment. > > Submitted by: kris > Obtained from: PC-BSD > > Modified: > head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh > head/usr.sbin/pc-sysinstall/backend/functions-disk.sh > > Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh > ============================================================================== > --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:34:10 2012 (r232900) > +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:41:29 2012 (r232901) > @@ -314,7 +314,7 @@ setup_gpart_partitions() > if [ "$CURPART" = "2" ] ; then > # If this is GPT, make sure first partition is aligned to 4k > sleep 2 > - rc_halt "gpart add -b 2016 ${SOUT} -t ${PARTYPE} ${_pDisk}" > + rc_halt "gpart add -a 4k ${SOUT} -t ${PARTYPE} ${_pDisk}" > else > sleep 2 > rc_halt "gpart add ${SOUT} -t ${PARTYPE} ${_pDisk}" Just to note: if neither -b, nor -a is specified, gpart should now use stripe size/offset values provided by GEOM. So, for example, if partition is created on top of GEOM_STRIPE with 64K strip size, gpart would automatically align to that value. Forcing 4K alignment is a safety measure in case if device with 4K sectors wasn't detected as such, but it can be a pessimization for devices with stripes bigger then 4K. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 08:18:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1629106564A; Tue, 13 Mar 2012 08:18:54 +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 D146C8FC16; Tue, 13 Mar 2012 08:18:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2D8Isqh027687; Tue, 13 Mar 2012 08:18:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2D8IsZI027685; Tue, 13 Mar 2012 08:18:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203130818.q2D8IsZI027685@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Mar 2012 08:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232917 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 08:18:55 -0000 Author: mav Date: Tue Mar 13 08:18:54 2012 New Revision: 232917 URL: http://svn.freebsd.org/changeset/base/232917 Log: Rewrite thread CPU usage percentage math to not depend on periodic calls with HZ rate through the sched_tick() calls from hardclock(). Potentially it can be used to improve precision, but now it is just minus one more reason to call hardclock() for every HZ tick on every active CPU. SCHED_4BSD never used sched_tick(), but keep it in place for now, as at least SCHED_FBFS existing in patches out of the tree depends on it. MFC after: 1 month Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Tue Mar 13 06:50:56 2012 (r232916) +++ head/sys/kern/sched_ule.c Tue Mar 13 08:18:54 2012 (r232917) @@ -99,7 +99,6 @@ struct td_sched { u_int ts_slptime; /* Number of ticks we vol. slept */ u_int ts_runtime; /* Number of ticks we were running */ int ts_ltick; /* Last tick that we were running on */ - int ts_incrtick; /* Last tick that we incremented on */ int ts_ftick; /* First tick that we were running on */ int ts_ticks; /* Tick count */ #ifdef KTR @@ -291,7 +290,7 @@ static void sched_thread_priority(struct static int sched_interact_score(struct thread *); static void sched_interact_update(struct thread *); static void sched_interact_fork(struct thread *); -static void sched_pctcpu_update(struct td_sched *); +static void sched_pctcpu_update(struct td_sched *, int); /* Operations on per processor queues */ static struct thread *tdq_choose(struct tdq *); @@ -671,7 +670,7 @@ cpu_search(const struct cpu_group *cg, s } } if (match & CPU_SEARCH_HIGHEST) - if (hgroup.cs_load != -1 && + if (hgroup.cs_load >= 0 && (load > hload || (load == hload && hgroup.cs_load > high->cs_load))) { hload = load; @@ -1590,24 +1589,21 @@ sched_rr_interval(void) * mechanism since it happens with less regular and frequent events. */ static void -sched_pctcpu_update(struct td_sched *ts) +sched_pctcpu_update(struct td_sched *ts, int run) { + int t = ticks; - if (ts->ts_ticks == 0) - return; - if (ticks - (hz / 10) < ts->ts_ltick && - SCHED_TICK_TOTAL(ts) < SCHED_TICK_MAX) - return; - /* - * Adjust counters and watermark for pctcpu calc. - */ - if (ts->ts_ltick > ticks - SCHED_TICK_TARG) - ts->ts_ticks = (ts->ts_ticks / (ticks - ts->ts_ftick)) * - SCHED_TICK_TARG; - else + if (t - ts->ts_ltick >= SCHED_TICK_TARG) { ts->ts_ticks = 0; - ts->ts_ltick = ticks; - ts->ts_ftick = ts->ts_ltick - SCHED_TICK_TARG; + ts->ts_ftick = t - SCHED_TICK_TARG; + } else if (t - ts->ts_ftick >= SCHED_TICK_MAX) { + ts->ts_ticks = (ts->ts_ticks / (ts->ts_ltick - ts->ts_ftick)) * + (ts->ts_ltick - (t - SCHED_TICK_TARG)); + ts->ts_ftick = t - SCHED_TICK_TARG; + } + if (run) + ts->ts_ticks += (t - ts->ts_ltick) << SCHED_TICK_SHIFT; + ts->ts_ltick = t; } /* @@ -1826,6 +1822,7 @@ sched_switch(struct thread *td, struct t tdq = TDQ_CPU(cpuid); ts = td->td_sched; mtx = td->td_lock; + sched_pctcpu_update(ts, 1); ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; @@ -1880,6 +1877,7 @@ sched_switch(struct thread *td, struct t #endif lock_profile_release_lock(&TDQ_LOCKPTR(tdq)->lock_object); TDQ_LOCKPTR(tdq)->mtx_lock = (uintptr_t)newtd; + sched_pctcpu_update(newtd->td_sched, 0); #ifdef KDTRACE_HOOKS /* @@ -1974,12 +1972,9 @@ sched_wakeup(struct thread *td) slptick = td->td_slptick; td->td_slptick = 0; if (slptick && slptick != ticks) { - u_int hzticks; - - hzticks = (ticks - slptick) << SCHED_TICK_SHIFT; - ts->ts_slptime += hzticks; + ts->ts_slptime += (ticks - slptick) << SCHED_TICK_SHIFT; sched_interact_update(td); - sched_pctcpu_update(ts); + sched_pctcpu_update(ts, 0); } /* Reset the slice value after we sleep. */ ts->ts_slice = sched_slice; @@ -1994,6 +1989,7 @@ void sched_fork(struct thread *td, struct thread *child) { THREAD_LOCK_ASSERT(td, MA_OWNED); + sched_pctcpu_update(td->td_sched, 1); sched_fork_thread(td, child); /* * Penalize the parent and child for forking. @@ -2029,7 +2025,6 @@ sched_fork_thread(struct thread *td, str */ ts2->ts_ticks = ts->ts_ticks; ts2->ts_ltick = ts->ts_ltick; - ts2->ts_incrtick = ts->ts_incrtick; ts2->ts_ftick = ts->ts_ftick; /* * Do not inherit any borrowed priority from the parent. @@ -2186,6 +2181,7 @@ sched_clock(struct thread *td) tdq->tdq_ridx = tdq->tdq_idx; } ts = td->td_sched; + sched_pctcpu_update(ts, 1); if (td->td_pri_class & PRI_FIFO_BIT) return; if (PRI_BASE(td->td_pri_class) == PRI_TIMESHARE) { @@ -2210,31 +2206,12 @@ sched_clock(struct thread *td) } /* - * Called once per hz tick. Used for cpu utilization information. This - * is easier than trying to scale based on stathz. + * Called once per hz tick. */ void sched_tick(int cnt) { - struct td_sched *ts; - ts = curthread->td_sched; - /* - * Ticks is updated asynchronously on a single cpu. Check here to - * avoid incrementing ts_ticks multiple times in a single tick. - */ - if (ts->ts_incrtick == ticks) - return; - /* Adjust ticks for pctcpu */ - ts->ts_ticks += cnt << SCHED_TICK_SHIFT; - ts->ts_ltick = ticks; - ts->ts_incrtick = ticks; - /* - * Update if we've exceeded our desired tick threshold by over one - * second. - */ - if (ts->ts_ftick + SCHED_TICK_MAX < ts->ts_ltick) - sched_pctcpu_update(ts); } /* @@ -2276,7 +2253,6 @@ sched_choose(void) TDQ_LOCK_ASSERT(tdq, MA_OWNED); td = tdq_choose(tdq); if (td) { - td->td_sched->ts_ltick = ticks; tdq_runq_rem(tdq, td); tdq->tdq_lowpri = td->td_priority; return (td); @@ -2422,10 +2398,10 @@ sched_pctcpu(struct thread *td) return (0); THREAD_LOCK_ASSERT(td, MA_OWNED); + sched_pctcpu_update(ts, TD_IS_RUNNING(td)); if (ts->ts_ticks) { int rtick; - sched_pctcpu_update(ts); /* How many rtick per second ? */ rtick = min(SCHED_TICK_HZ(ts) / SCHED_TICK_SECS, hz); pctcpu = (FSCALE * ((FSCALE * rtick)/hz)) >> FSHIFT; From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 10:04:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A59A7106566B; Tue, 13 Mar 2012 10:04:14 +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 76F038FC1D; Tue, 13 Mar 2012 10:04:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DA4EDq036751; Tue, 13 Mar 2012 10:04:14 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DA4E8s036746; Tue, 13 Mar 2012 10:04:14 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201203131004.q2DA4E8s036746@svn.freebsd.org> From: Kevin Lo Date: Tue, 13 Mar 2012 10:04: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: r232918 - in head/sys/fs: fdescfs nullfs portalfs unionfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 10:04:14 -0000 Author: kevlo Date: Tue Mar 13 10:04:13 2012 New Revision: 232918 URL: http://svn.freebsd.org/changeset/base/232918 Log: Use NULL instead of 0 Modified: head/sys/fs/fdescfs/fdesc_vfsops.c head/sys/fs/nullfs/null_vfsops.c head/sys/fs/portalfs/portal_vfsops.c head/sys/fs/unionfs/union_vfsops.c Modified: head/sys/fs/fdescfs/fdesc_vfsops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vfsops.c Tue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Tue Mar 13 10:04:13 2012 (r232918) @@ -98,7 +98,7 @@ fdesc_mount(struct mount *mp) error = fdesc_allocvp(Froot, -1, FD_ROOT, mp, &rvp); if (error) { free(fmp, M_FDESCMNT); - mp->mnt_data = 0; + mp->mnt_data = NULL; return (error); } rvp->v_type = VDIR; @@ -152,7 +152,7 @@ fdesc_unmount(mp, mntflags) */ mtx_lock(&fdesc_hashmtx); data = mp->mnt_data; - mp->mnt_data = 0; + mp->mnt_data = NULL; mtx_unlock(&fdesc_hashmtx); free(data, M_FDESCMNT); /* XXX */ Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Tue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/nullfs/null_vfsops.c Tue Mar 13 10:04:13 2012 (r232918) @@ -188,7 +188,7 @@ nullfs_mount(struct mount *mp) mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & (MNTK_MPSAFE | MNTK_SHARED_WRITES); MNT_IUNLOCK(mp); - mp->mnt_data = xmp; + mp->mnt_data = xmp; vfs_getnewfsid(mp); vfs_mountedfrom(mp, target); @@ -224,7 +224,7 @@ nullfs_unmount(mp, mntflags) * Finally, throw away the null_mount structure */ mntdata = mp->mnt_data; - mp->mnt_data = 0; + mp->mnt_data = NULL; free(mntdata, M_NULLFSMNT); return 0; } Modified: head/sys/fs/portalfs/portal_vfsops.c ============================================================================== --- head/sys/fs/portalfs/portal_vfsops.c Tue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/portalfs/portal_vfsops.c Tue Mar 13 10:04:13 2012 (r232918) @@ -164,7 +164,7 @@ portal_mount(struct mount *mp) MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; MNT_IUNLOCK(mp); - mp->mnt_data = fmp; + mp->mnt_data = fmp; vfs_getnewfsid(mp); vfs_mountedfrom(mp, p); @@ -213,7 +213,7 @@ portal_unmount(mp, mntflags) * Finally, throw away the portalmount structure */ free(mp->mnt_data, M_PORTALFSMNT); /* XXX */ - mp->mnt_data = 0; + mp->mnt_data = NULL; return (0); } Modified: head/sys/fs/unionfs/union_vfsops.c ============================================================================== --- head/sys/fs/unionfs/union_vfsops.c Tue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/unionfs/union_vfsops.c Tue Mar 13 10:04:13 2012 (r232918) @@ -352,7 +352,7 @@ unionfs_unmount(struct mount *mp, int mn return (error); free(ump, M_UNIONFSMNT); - mp->mnt_data = 0; + mp->mnt_data = NULL; return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 10:21:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5AF3106566B; Tue, 13 Mar 2012 10:21:08 +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 B6B1D8FC14; Tue, 13 Mar 2012 10:21:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DAL8QI038442; Tue, 13 Mar 2012 10:21:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DAL8AL038439; Tue, 13 Mar 2012 10:21:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203131021.q2DAL8AL038439@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Mar 2012 10: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: r232919 - in head: share/man/man4 sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 10:21:08 -0000 Author: mav Date: Tue Mar 13 10:21:08 2012 New Revision: 232919 URL: http://svn.freebsd.org/changeset/base/232919 Log: Add kern.eventtimer.activetick tunable/sysctl, specifying whether each hardclock() tick should be run on every active CPU, or on only one. On my tests, avoiding extra interrupts because of this on 8-CPU Core i7 system with HZ=10000 saves about 2% of performance. At this moment option implemented only for global timers, as reprogramming per-CPU timers is too expensive now to be compensated by this benefit, especially since we still have to regularly run hardclock() on at least one active CPU to update system uptime. For global timer it is quite trivial: timer runs always, but we just skip IPIs to other CPUs when possible. Option is enabled by default now, keeping previous behavior, as periodic hardclock() calls are still used at least to implement setitimer(2) with ITIMER_VIRTUAL and ITIMER_PROF arguments. But since default schedulers don't depend on it since r232917, we are much more free to experiment with it. MFC after: 1 month Modified: head/share/man/man4/eventtimers.4 head/sys/kern/kern_clocksource.c Modified: head/share/man/man4/eventtimers.4 ============================================================================== --- head/share/man/man4/eventtimers.4 Tue Mar 13 10:04:13 2012 (r232918) +++ head/share/man/man4/eventtimers.4 Tue Mar 13 10:21:08 2012 (r232919) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 15, 2010 +.Dd March 13, 2012 .Dt EVENTTIMERS 4 .Os .Sh NAME @@ -143,6 +143,12 @@ By default this options is disabled. If chosen timer is per-CPU and runs in periodic mode, this option has no effect - all interrupts are always generating. +.It Va kern.eventtimer.activetick +makes each CPU to receive all kinds of timer interrupts when they are busy. +Disabling it allows to skip some hardclock() calls in some cases. +By default this options is enabled. +If chosen timer is per-CPU, this option has no effect - all interrupts are +always generating, as timer reprogramming is too expensive for that case. .El .Sh SEE ALSO .Xr apic 4 , Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Tue Mar 13 10:04:13 2012 (r232918) +++ head/sys/kern/kern_clocksource.c Tue Mar 13 10:21:08 2012 (r232919) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Alexander Motin + * Copyright (c) 2010-2012 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -99,6 +99,7 @@ static struct bintime hardperiod; /* har static struct bintime statperiod; /* statclock() events period. */ static struct bintime profperiod; /* profclock() events period. */ static struct bintime nexttick; /* Next global timer tick time. */ +static struct bintime nexthard; /* Next global hardlock() event. */ static u_int busy = 0; /* Reconfiguration is in progress. */ static int profiling = 0; /* Profiling events enabled. */ @@ -110,11 +111,16 @@ TUNABLE_INT("kern.eventtimer.singlemul", SYSCTL_INT(_kern_eventtimer, OID_AUTO, singlemul, CTLFLAG_RW, &singlemul, 0, "Multiplier for periodic mode"); -static u_int idletick = 0; /* Idle mode allowed. */ +static u_int idletick = 0; /* Run periodic events when idle. */ TUNABLE_INT("kern.eventtimer.idletick", &idletick); SYSCTL_UINT(_kern_eventtimer, OID_AUTO, idletick, CTLFLAG_RW, &idletick, 0, "Run periodic events when idle"); +static u_int activetick = 1; /* Run all periodic events when active. */ +TUNABLE_INT("kern.eventtimer.activetick", &activetick); +SYSCTL_UINT(_kern_eventtimer, OID_AUTO, activetick, CTLFLAG_RW, &activetick, + 0, "Run all periodic events when active"); + static int periodic = 0; /* Periodic or one-shot mode. */ static int want_periodic = 0; /* What mode to prefer. */ TUNABLE_INT("kern.eventtimer.periodic", &want_periodic); @@ -202,6 +208,9 @@ handleevents(struct bintime *now, int fa bintime_add(&state->nexthard, &hardperiod); runs++; } + if ((timer->et_flags & ET_FLAGS_PERCPU) == 0 && + bintime_cmp(&state->nexthard, &nexthard, >)) + nexthard = state->nexthard; if (runs && fake < 2) { hardclock_cnt(runs, usermode); done = 1; @@ -263,9 +272,11 @@ getnextcpuevent(struct bintime *event, i int skip; state = DPCPU_PTR(timerstate); + /* Handle hardclock() events. */ *event = state->nexthard; - if (idle) { /* If CPU is idle - ask callouts for how long. */ - skip = 4; + if (idle || (!activetick && !profiling && + (timer->et_flags & ET_FLAGS_PERCPU) == 0)) { + skip = idle ? 4 : (stathz / 2); if (curcpu == CPU_FIRST() && tc_min_ticktock_freq > skip) skip = tc_min_ticktock_freq; skip = callout_tickstofirst(hz / skip) - 1; @@ -273,7 +284,8 @@ getnextcpuevent(struct bintime *event, i tmp = hardperiod; bintime_mul(&tmp, skip); bintime_add(event, &tmp); - } else { /* If CPU is active - handle all types of events. */ + } + if (!idle) { /* If CPU is active - handle other types of events. */ if (bintime_cmp(event, &state->nextstat, >)) *event = state->nextstat; if (profiling && bintime_cmp(event, &state->nextprof, >)) @@ -295,24 +307,28 @@ getnextevent(struct bintime *event) #ifdef SMP int cpu; #endif - int c; + int c, nonidle; state = DPCPU_PTR(timerstate); *event = state->nextevent; c = curcpu; -#ifdef SMP + nonidle = !state->idle; if ((timer->et_flags & ET_FLAGS_PERCPU) == 0) { +#ifdef SMP CPU_FOREACH(cpu) { if (curcpu == cpu) continue; state = DPCPU_ID_PTR(cpu, timerstate); + nonidle += !state->idle; if (bintime_cmp(event, &state->nextevent, >)) { *event = state->nextevent; c = cpu; } } - } #endif + if (nonidle != 0 && bintime_cmp(event, &nexthard, >)) + *event = nexthard; + } CTR5(KTR_SPARE2, "next at %d: next %d.%08x%08x by %d", curcpu, event->sec, (unsigned int)(event->frac >> 32), (unsigned int)(event->frac & 0xffffffff), c); From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 10:54:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2117B106564A; Tue, 13 Mar 2012 10:54:15 +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 0BDEC8FC0A; Tue, 13 Mar 2012 10:54:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DAsErR040338; Tue, 13 Mar 2012 10:54:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DAsEev040336; Tue, 13 Mar 2012 10:54:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203131054.q2DAsEev040336@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Mar 2012 10:54: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: r232920 - 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: Tue, 13 Mar 2012 10:54:15 -0000 Author: mav Date: Tue Mar 13 10:54:14 2012 New Revision: 232920 URL: http://svn.freebsd.org/changeset/base/232920 Log: Some formatting for r232919. Submitted by: pluknet Modified: head/share/man/man4/eventtimers.4 Modified: head/share/man/man4/eventtimers.4 ============================================================================== --- head/share/man/man4/eventtimers.4 Tue Mar 13 10:21:08 2012 (r232919) +++ head/share/man/man4/eventtimers.4 Tue Mar 13 10:54:14 2012 (r232920) @@ -145,7 +145,9 @@ and runs in periodic mode, this option h always generating. .It Va kern.eventtimer.activetick makes each CPU to receive all kinds of timer interrupts when they are busy. -Disabling it allows to skip some hardclock() calls in some cases. +Disabling it allows to skip some +.Fn hardclock +calls in some cases. By default this options is enabled. If chosen timer is per-CPU, this option has no effect - all interrupts are always generating, as timer reprogramming is too expensive for that case. From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 11:08:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16BE0106566C; Tue, 13 Mar 2012 11:08:41 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 006BB8FC0A; Tue, 13 Mar 2012 11:08:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DB8e9J041000; Tue, 13 Mar 2012 11:08:40 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DB8e5d040995; Tue, 13 Mar 2012 11:08:40 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201203131108.q2DB8e5d040995@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Tue, 13 Mar 2012 11:08: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: r232921 - in head/sys: modules/netgraph/netflow netgraph/netflow X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 11:08:41 -0000 Author: melifaro Date: Tue Mar 13 11:08:40 2012 New Revision: 232921 URL: http://svn.freebsd.org/changeset/base/232921 Log: Use rt_numfibs variable instead of compile-time RT_NUMFIBS. Reviewed by: glebius (previous version) Approved by: kib(mentor), ae(mentor) Modified: head/sys/modules/netgraph/netflow/Makefile head/sys/netgraph/netflow/netflow.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/netflow/ng_netflow.h Modified: head/sys/modules/netgraph/netflow/Makefile ============================================================================== --- head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 11:08:40 2012 (r232921) @@ -17,8 +17,6 @@ opt_inet6.h: echo "#define INET6 1" > ${.TARGET} .endif -opt_route.h: - echo "#define ROUTETABLES RT_MAXFIBS" > ${.TARGET} .endif .include Modified: head/sys/netgraph/netflow/netflow.c ============================================================================== --- head/sys/netgraph/netflow/netflow.c Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/netflow.c Tue Mar 13 11:08:40 2012 (r232921) @@ -630,7 +630,7 @@ ng_netflow_cache_flush(priv_p priv) free(priv->hash6, M_NETFLOW_HASH); #endif - for (i = 0; i < RT_NUMFIBS; i++) { + for (i = 0; i < priv->maxfibs; i++) { if ((fe = priv_to_fib(priv, i)) == NULL) continue; Modified: head/sys/netgraph/netflow/ng_netflow.c ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.c Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/ng_netflow.c Tue Mar 13 11:08:40 2012 (r232921) @@ -225,6 +225,11 @@ ng_netflow_constructor(node_p node) /* Initialize private data */ priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); + /* Initialize fib data */ + priv->maxfibs = rt_numfibs; + priv->fib_data = malloc(sizeof(fib_export_p) * priv->maxfibs, + M_NETGRAPH, M_WAITOK | M_ZERO); + /* Make node and its data point at each other */ NG_NODE_SET_PRIVATE(node, priv); priv->node = node; @@ -901,8 +906,10 @@ loopend: /* Check packet FIB */ fib = M_GETFIB(m); - if (fib >= RT_NUMFIBS) { - CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is out of range of available fibs: 0 .. %d", fib, RT_NUMFIBS); + if (fib >= priv->maxfibs) { + CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is out of " + "range of available fibs: 0 .. %d", + fib, priv->maxfibs); goto bypass; } @@ -973,6 +980,7 @@ ng_netflow_rmnode(node_p node) NG_NODE_SET_PRIVATE(node, NULL); NG_NODE_UNREF(priv->node); + free(priv->fib_data, M_NETGRAPH); free(priv, M_NETGRAPH); return (0); Modified: head/sys/netgraph/netflow/ng_netflow.h ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.h Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/ng_netflow.h Tue Mar 13 11:08:40 2012 (r232921) @@ -413,7 +413,8 @@ struct netflow { struct flow_hash_entry *hash6; #endif /* Multiple FIB support */ - fib_export_p fib_data[RT_NUMFIBS]; /* array of pointers to fib-specific data */ + fib_export_p *fib_data; /* array of pointers to per-fib data */ + uint16_t maxfibs; /* number of allocated fibs */ /* * RFC 3954 clause 7.3 From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 12:17:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2CBF21065670 for ; Tue, 13 Mar 2012 12:17:49 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from mo-p00-ob6.rzone.de (mo-p00-ob6.rzone.de [IPv6:2a01:238:20a:202:53f0::1]) by mx1.freebsd.org (Postfix) with ESMTP id B5F298FC14 for ; Tue, 13 Mar 2012 12:17:48 +0000 (UTC) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/afgnrylriWJCMFsOdA== X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (ip-109-42-27-20.web.vodafone.de [109.42.27.20]) by smtp.strato.de (jimi mo15) (RZmta 28.1 DYNA|AUTH) with (DHE-RSA-AES128-SHA encrypted) ESMTPA id U02754o2DBn7jF for ; Tue, 13 Mar 2012 13:17:46 +0100 (MET) Received: by britannica.bec.de (sSMTP sendmail emulation); Tue, 13 Mar 2012 13:17:42 +0100 Date: Tue, 13 Mar 2012 13:17:42 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Message-ID: <20120313121742.GC3077@britannica.bec.de> References: <201203122107.q2CL7MYo086974@svn.freebsd.org> <20120313153902.Y1611@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120313153902.Y1611@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: svn commit: r232894 - head/contrib/llvm/tools/clang/lib/Basic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 12:17:49 -0000 On Tue, Mar 13, 2012 at 04:14:25PM +1100, Bruce Evans wrote: > clang and gcc define __FLT_EVAL_METHOD__, but get it wrong in different > ways, so this definition is unusuable. For example, it is always 0 for > clang; this is correct with SSE, but without SSE, -1 is correct. Thus > __FLT_EVAL_METHOD__ is unusable for defining FLT_EVAL_METHOD. Upstream version sets it correctly, the change went in either shortly before or after 3.0 release. I.e. clang -target i386-freebsd -mno-sse uses __FLT_EVAL_METHOD__ 2, clang -target i386-freebsd -msse uses __FLT_EVAL_METHOD__ 0. Joerg From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 12:51:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33413106566B; Tue, 13 Mar 2012 12:51:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id AB7338FC0A; Tue, 13 Mar 2012 12:51:35 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 7397125D3893; Tue, 13 Mar 2012 12:51:34 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 8ACB7BDD4E6; Tue, 13 Mar 2012 12:51:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id wN6Aj71g2Xlq; Tue, 13 Mar 2012 12:51:31 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 619D7BDD4E5; Tue, 13 Mar 2012 12:51:31 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201203131108.q2DB8e5d040995@svn.freebsd.org> Date: Tue, 13 Mar 2012 12:51:30 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <1FC92093-FAEA-4C84-8A27-7726C4930CD6@FreeBSD.org> References: <201203131108.q2DB8e5d040995@svn.freebsd.org> To: Alexander V. Chernikov X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232921 - in head/sys: modules/netgraph/netflow netgraph/netflow X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 12:51:36 -0000 On 13. Mar 2012, at 11:08 , Alexander V. Chernikov wrote: > Author: melifaro > Date: Tue Mar 13 11:08:40 2012 > New Revision: 232921 > URL: http://svn.freebsd.org/changeset/base/232921 >=20 > Log: > Use rt_numfibs variable instead of compile-time RT_NUMFIBS. Thanks a lot for doing this! This will allow us to go ahead and get rid of the mandatory kernel = option now. I'll try to find my patch from last year and post it for = your review. Are you intending to MFC this? Requested by: bz (a while ago with low prio) > Reviewed by: glebius (previous version) > Approved by: kib(mentor), ae(mentor) >=20 > Modified: > head/sys/modules/netgraph/netflow/Makefile > head/sys/netgraph/netflow/netflow.c > head/sys/netgraph/netflow/ng_netflow.c > head/sys/netgraph/netflow/ng_netflow.h >=20 > Modified: head/sys/modules/netgraph/netflow/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 = 10:54:14 2012 (r232920) > +++ head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 = 11:08:40 2012 (r232921) > @@ -17,8 +17,6 @@ opt_inet6.h: > echo "#define INET6 1" > ${.TARGET} > .endif >=20 > -opt_route.h: > - echo "#define ROUTETABLES RT_MAXFIBS" > ${.TARGET} > .endif >=20 > .include >=20 > Modified: head/sys/netgraph/netflow/netflow.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/netgraph/netflow/netflow.c Tue Mar 13 10:54:14 2012 = (r232920) > +++ head/sys/netgraph/netflow/netflow.c Tue Mar 13 11:08:40 2012 = (r232921) > @@ -630,7 +630,7 @@ ng_netflow_cache_flush(priv_p priv) > free(priv->hash6, M_NETFLOW_HASH); > #endif >=20 > - for (i =3D 0; i < RT_NUMFIBS; i++) { > + for (i =3D 0; i < priv->maxfibs; i++) { > if ((fe =3D priv_to_fib(priv, i)) =3D=3D NULL) > continue; >=20 >=20 > Modified: head/sys/netgraph/netflow/ng_netflow.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/netgraph/netflow/ng_netflow.c Tue Mar 13 10:54:14 2012 = (r232920) > +++ head/sys/netgraph/netflow/ng_netflow.c Tue Mar 13 11:08:40 2012 = (r232921) > @@ -225,6 +225,11 @@ ng_netflow_constructor(node_p node) > /* Initialize private data */ > priv =3D malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); >=20 > + /* Initialize fib data */ > + priv->maxfibs =3D rt_numfibs; > + priv->fib_data =3D malloc(sizeof(fib_export_p) * priv->maxfibs, > + M_NETGRAPH, M_WAITOK | M_ZERO); > + > /* Make node and its data point at each other */ > NG_NODE_SET_PRIVATE(node, priv); > priv->node =3D node; > @@ -901,8 +906,10 @@ loopend: > =09 > /* Check packet FIB */ > fib =3D M_GETFIB(m); > - if (fib >=3D RT_NUMFIBS) { > - CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is = out of range of available fibs: 0 .. %d", fib, RT_NUMFIBS); > + if (fib >=3D priv->maxfibs) { > + CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is = out of " > + "range of available fibs: 0 .. %d", > + fib, priv->maxfibs); > goto bypass; > } >=20 > @@ -973,6 +980,7 @@ ng_netflow_rmnode(node_p node) > NG_NODE_SET_PRIVATE(node, NULL); > NG_NODE_UNREF(priv->node); >=20 > + free(priv->fib_data, M_NETGRAPH); > free(priv, M_NETGRAPH); >=20 > return (0); >=20 > Modified: head/sys/netgraph/netflow/ng_netflow.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/netgraph/netflow/ng_netflow.h Tue Mar 13 10:54:14 2012 = (r232920) > +++ head/sys/netgraph/netflow/ng_netflow.h Tue Mar 13 11:08:40 2012 = (r232921) > @@ -413,7 +413,8 @@ struct netflow { > struct flow_hash_entry *hash6; > #endif > /* Multiple FIB support */ > - fib_export_p fib_data[RT_NUMFIBS]; /* array of = pointers to fib-specific data */ > + fib_export_p *fib_data; /* array of pointers to = per-fib data */ > + uint16_t maxfibs; /* number of allocated fibs */ >=20 > /* > * RFC 3954 clause 7.3 --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 13:20:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 321CF1065676; Tue, 13 Mar 2012 13:20:02 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F9FE8FC08; Tue, 13 Mar 2012 13:20:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DDK2bi046531; Tue, 13 Mar 2012 13:20:02 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DDK1nT046517; Tue, 13 Mar 2012 13:20:01 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203131320.q2DDK1nT046517@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Mar 2012 13:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232922 - vendor/libcxxrt/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 13:20:02 -0000 Author: theraven Date: Tue Mar 13 13:20:01 2012 New Revision: 232922 URL: http://svn.freebsd.org/changeset/base/232922 Log: Import new version of libcxxrt. Approved by: dim (mentor) Modified: vendor/libcxxrt/dist/auxhelper.cc vendor/libcxxrt/dist/cxxabi.h vendor/libcxxrt/dist/dwarf_eh.h vendor/libcxxrt/dist/dynamic_cast.cc vendor/libcxxrt/dist/exception.cc vendor/libcxxrt/dist/guard.cc vendor/libcxxrt/dist/memory.cc vendor/libcxxrt/dist/stdexcept.cc vendor/libcxxrt/dist/stdexcept.h vendor/libcxxrt/dist/terminate.cc vendor/libcxxrt/dist/typeinfo.cc vendor/libcxxrt/dist/typeinfo.h vendor/libcxxrt/dist/unwind-arm.h vendor/libcxxrt/dist/unwind.h Modified: vendor/libcxxrt/dist/auxhelper.cc ============================================================================== --- vendor/libcxxrt/dist/auxhelper.cc Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/auxhelper.cc Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,29 @@ +/* + * Copyright 2010-2011 PathScale, 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 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 HOLDER 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. + */ + /** * aux.cc - Compiler helper functions. * Modified: vendor/libcxxrt/dist/cxxabi.h ============================================================================== --- vendor/libcxxrt/dist/cxxabi.h Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/cxxabi.h Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,25 @@ +/* + * Copyright 2012 David Chisnall. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + #ifndef __CXXABI_H_ #define __CXXABI_H_ #include Modified: vendor/libcxxrt/dist/dwarf_eh.h ============================================================================== --- vendor/libcxxrt/dist/dwarf_eh.h Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/dwarf_eh.h Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,28 @@ +/* + * Copyright 2010-2011 PathScale, 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 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 HOLDER 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. + */ /** * dwarf_eh.h - Defines some helper functions for parsing DWARF exception * handling tables. Modified: vendor/libcxxrt/dist/dynamic_cast.cc ============================================================================== --- vendor/libcxxrt/dist/dynamic_cast.cc Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/dynamic_cast.cc Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,29 @@ +/* + * Copyright 2010-2011 PathScale, 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 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 HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include "typeinfo.h" #include Modified: vendor/libcxxrt/dist/exception.cc ============================================================================== --- vendor/libcxxrt/dist/exception.cc Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/exception.cc Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,29 @@ +/* + * Copyright 2010-2011 PathScale, 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 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 HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include #include #include @@ -12,12 +38,6 @@ #pragma weak pthread_setspecific #pragma weak pthread_getspecific #pragma weak pthread_once -#pragma weak pthread_once -#pragma weak pthread_cond_signal -#pragma weak pthread_cond_wait -#pragma weak pthread_mutex_lock -#pragma weak pthread_mutex_unlock - using namespace ABI_NAMESPACE; @@ -403,10 +423,7 @@ static char *emergency_malloc(size_t siz // Only 4 emergency buffers allowed per thread! if (info->emergencyBuffersHeld > 3) { return 0; } - if (pthread_mutex_lock) - { - pthread_mutex_lock(&emergency_malloc_lock); - } + pthread_mutex_lock(&emergency_malloc_lock); int buffer = -1; while (buffer < 0) { @@ -417,10 +434,7 @@ static char *emergency_malloc(size_t siz void *m = calloc(1, size); if (0 != m) { - if (pthread_mutex_unlock) - { - pthread_mutex_unlock(&emergency_malloc_lock); - } + pthread_mutex_unlock(&emergency_malloc_lock); return (char*)m; } for (int i=0 ; i<16 ; i++) @@ -437,24 +451,10 @@ static char *emergency_malloc(size_t siz // of the emergency buffers. if (buffer < 0) { - // If we don't have pthread_cond_wait, then there is only one - // thread and it's already used all of the emergency buffers, so we - // have no alternative but to die. Calling abort() instead of - // terminate, because terminate can throw exceptions, which can - // bring us back here and infinite loop. - if (!pthread_cond_wait) - { - fputs("Terminating while out of memory trying to throw an exception", - stderr); - abort(); - } pthread_cond_wait(&emergency_malloc_wait, &emergency_malloc_lock); } } - if (pthread_mutex_unlock) - { - pthread_mutex_unlock(&emergency_malloc_lock); - } + pthread_mutex_unlock(&emergency_malloc_lock); info->emergencyBuffersHeld++; return emergency_buffer + (1024 * buffer); } @@ -487,19 +487,13 @@ static void emergency_malloc_free(char * memset((void*)ptr, 0, 1024); // Signal the condition variable to wake up any threads that are blocking // waiting for some space in the emergency buffer - if (pthread_mutex_lock) - { - pthread_mutex_lock(&emergency_malloc_lock); - } + pthread_mutex_lock(&emergency_malloc_lock); // In theory, we don't need to do this with the lock held. In practice, // our array of bools will probably be updated using 32-bit or 64-bit // memory operations, so this update may clobber adjacent values. buffer_allocated[buffer] = false; - if (pthread_cond_signal && pthread_mutex_unlock) - { - pthread_cond_signal(&emergency_malloc_wait); - pthread_mutex_unlock(&emergency_malloc_lock); - } + pthread_cond_signal(&emergency_malloc_wait); + pthread_mutex_unlock(&emergency_malloc_lock); } static char *alloc_or_die(size_t size) Modified: vendor/libcxxrt/dist/guard.cc ============================================================================== --- vendor/libcxxrt/dist/guard.cc Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/guard.cc Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,29 @@ +/* + * Copyright 2010-2012 PathScale, 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 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 HOLDER 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. + */ + /** * guard.cc: Functions for thread-safe static initialisation. * @@ -103,6 +129,10 @@ extern "C" int __cxa_guard_acquire(volat // the lock at the same time. while (!__sync_bool_compare_and_swap_4(lock, 0, 1)) { + if (1 == ((*guard_object) >> 56)) + { + break; + } sched_yield(); } // We have to test the guard again, in case another thread has performed Modified: vendor/libcxxrt/dist/memory.cc ============================================================================== --- vendor/libcxxrt/dist/memory.cc Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/memory.cc Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,29 @@ +/* + * Copyright 2010-2011 PathScale, 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 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 HOLDER 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. + */ + /** * memory.cc - Contains stub definition of C++ new/delete operators. * @@ -11,6 +37,10 @@ #include #include "stdexcept.h" +#ifndef __has_builtin +#define __has_builtin(x) 0 +#endif + #if !__has_builtin(__sync_swap) #define __sync_swap __sync_lock_test_and_set #endif Modified: vendor/libcxxrt/dist/stdexcept.cc ============================================================================== --- vendor/libcxxrt/dist/stdexcept.cc Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/stdexcept.cc Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,29 @@ +/* + * Copyright 2010-2011 PathScale, 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 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 HOLDER 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. + */ + /** * stdexcept.cc - provides stub implementations of the exceptions required by the runtime. */ Modified: vendor/libcxxrt/dist/stdexcept.h ============================================================================== --- vendor/libcxxrt/dist/stdexcept.h Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/stdexcept.h Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,29 @@ +/* + * Copyright 2010-2011 PathScale, 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 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 HOLDER 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. + */ + /** * stdexcept.h - provides a stub version of , which defines enough * of the exceptions for the runtime to use. Modified: vendor/libcxxrt/dist/terminate.cc ============================================================================== --- vendor/libcxxrt/dist/terminate.cc Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/terminate.cc Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,29 @@ +/* + * Copyright 2010-2011 PathScale, 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 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 HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include namespace std Modified: vendor/libcxxrt/dist/typeinfo.cc ============================================================================== --- vendor/libcxxrt/dist/typeinfo.cc Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/typeinfo.cc Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,29 @@ +/* + * Copyright 2010-2012 PathScale, 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 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 HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include "typeinfo.h" #include #include @@ -65,18 +91,30 @@ extern "C" char* __cxa_demangle(const ch { memcpy(buf, demangled, len); buf[len] = 0; - *n = len; - *status = 0; + if (n) + { + *n = len; + } + if (status) + { + *status = 0; + } } else { - *status = -1; + if (status) + { + *status = -1; + } } free(demangled); } else { - *status = -2; + if (status) + { + *status = -2; + } return NULL; } return buf; Modified: vendor/libcxxrt/dist/typeinfo.h ============================================================================== --- vendor/libcxxrt/dist/typeinfo.h Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/typeinfo.h Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,29 @@ +/* + * Copyright 2010-2011 PathScale, 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 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 HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include #include "abi_namespace.h" #include "typeinfo" Modified: vendor/libcxxrt/dist/unwind-arm.h ============================================================================== --- vendor/libcxxrt/dist/unwind-arm.h Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/unwind-arm.h Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,25 @@ +/* + * Copyright 2012 David Chisnall. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + /** * ARM-specific unwind definitions. These are taken from the ARM EHABI * specification. Modified: vendor/libcxxrt/dist/unwind.h ============================================================================== --- vendor/libcxxrt/dist/unwind.h Tue Mar 13 11:08:40 2012 (r232921) +++ vendor/libcxxrt/dist/unwind.h Tue Mar 13 13:20:01 2012 (r232922) @@ -1,3 +1,25 @@ +/* + * Copyright 2012 David Chisnall. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + #ifndef UNWIND_H_INCLUDED #define UNWIND_H_INCLUDED From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 13:20:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id CCF9E10656D5; Tue, 13 Mar 2012 13:20:46 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from dhcp170-36-red.yandex.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with ESMTP id 1E942151906; Tue, 13 Mar 2012 13:20:15 +0000 (UTC) Message-ID: <4F5F48F0.2090905@FreeBSD.org> Date: Tue, 13 Mar 2012 17:17:36 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111117 Thunderbird/8.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201203131108.q2DB8e5d040995@svn.freebsd.org> <1FC92093-FAEA-4C84-8A27-7726C4930CD6@FreeBSD.org> In-Reply-To: <1FC92093-FAEA-4C84-8A27-7726C4930CD6@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232921 - in head/sys: modules/netgraph/netflow netgraph/netflow X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 13:20:47 -0000 On 13.03.2012 16:51, Bjoern A. Zeeb wrote: > On 13. Mar 2012, at 11:08 , Alexander V. Chernikov wrote: > >> Author: melifaro >> Date: Tue Mar 13 11:08:40 2012 >> New Revision: 232921 >> URL: http://svn.freebsd.org/changeset/base/232921 >> >> Log: >> Use rt_numfibs variable instead of compile-time RT_NUMFIBS. > > Thanks a lot for doing this! Sorry for doing this for too long. > > This will allow us to go ahead and get rid of the mandatory kernel option now. I'll try to find my patch from last year and post it for your review. > > Are you intending to MFC this? netflow v9 stuff is still not MFCed to 8/7 (And I forgot 9 contains it). So it should be 2w for 9 > > > Requested by: bz (a while ago with low prio) >> Reviewed by: glebius (previous version) >> Approved by: kib(mentor), ae(mentor) >> >> Modified: >> head/sys/modules/netgraph/netflow/Makefile >> head/sys/netgraph/netflow/netflow.c >> head/sys/netgraph/netflow/ng_netflow.c >> head/sys/netgraph/netflow/ng_netflow.h >> >> Modified: head/sys/modules/netgraph/netflow/Makefile >> ============================================================================== >> --- head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 10:54:14 2012 (r232920) >> +++ head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 11:08:40 2012 (r232921) >> @@ -17,8 +17,6 @@ opt_inet6.h: >> echo "#define INET6 1"> ${.TARGET} >> .endif >> >> -opt_route.h: >> - echo "#define ROUTETABLES RT_MAXFIBS"> ${.TARGET} >> .endif >> >> .include >> >> Modified: head/sys/netgraph/netflow/netflow.c >> ============================================================================== >> --- head/sys/netgraph/netflow/netflow.c Tue Mar 13 10:54:14 2012 (r232920) >> +++ head/sys/netgraph/netflow/netflow.c Tue Mar 13 11:08:40 2012 (r232921) >> @@ -630,7 +630,7 @@ ng_netflow_cache_flush(priv_p priv) >> free(priv->hash6, M_NETFLOW_HASH); >> #endif >> >> - for (i = 0; i< RT_NUMFIBS; i++) { >> + for (i = 0; i< priv->maxfibs; i++) { >> if ((fe = priv_to_fib(priv, i)) == NULL) >> continue; >> >> >> Modified: head/sys/netgraph/netflow/ng_netflow.c >> ============================================================================== >> --- head/sys/netgraph/netflow/ng_netflow.c Tue Mar 13 10:54:14 2012 (r232920) >> +++ head/sys/netgraph/netflow/ng_netflow.c Tue Mar 13 11:08:40 2012 (r232921) >> @@ -225,6 +225,11 @@ ng_netflow_constructor(node_p node) >> /* Initialize private data */ >> priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); >> >> + /* Initialize fib data */ >> + priv->maxfibs = rt_numfibs; >> + priv->fib_data = malloc(sizeof(fib_export_p) * priv->maxfibs, >> + M_NETGRAPH, M_WAITOK | M_ZERO); >> + >> /* Make node and its data point at each other */ >> NG_NODE_SET_PRIVATE(node, priv); >> priv->node = node; >> @@ -901,8 +906,10 @@ loopend: >> >> /* Check packet FIB */ >> fib = M_GETFIB(m); >> - if (fib>= RT_NUMFIBS) { >> - CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is out of range of available fibs: 0 .. %d", fib, RT_NUMFIBS); >> + if (fib>= priv->maxfibs) { >> + CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is out of " >> + "range of available fibs: 0 .. %d", >> + fib, priv->maxfibs); >> goto bypass; >> } >> >> @@ -973,6 +980,7 @@ ng_netflow_rmnode(node_p node) >> NG_NODE_SET_PRIVATE(node, NULL); >> NG_NODE_UNREF(priv->node); >> >> + free(priv->fib_data, M_NETGRAPH); >> free(priv, M_NETGRAPH); >> >> return (0); >> >> Modified: head/sys/netgraph/netflow/ng_netflow.h >> ============================================================================== >> --- head/sys/netgraph/netflow/ng_netflow.h Tue Mar 13 10:54:14 2012 (r232920) >> +++ head/sys/netgraph/netflow/ng_netflow.h Tue Mar 13 11:08:40 2012 (r232921) >> @@ -413,7 +413,8 @@ struct netflow { >> struct flow_hash_entry *hash6; >> #endif >> /* Multiple FIB support */ >> - fib_export_p fib_data[RT_NUMFIBS]; /* array of pointers to fib-specific data */ >> + fib_export_p *fib_data; /* array of pointers to per-fib data */ >> + uint16_t maxfibs; /* number of allocated fibs */ >> >> /* >> * RFC 3954 clause 7.3 > -- WBR, Alexander From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 13:22:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEFAC106566C; Tue, 13 Mar 2012 13:22:03 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 944CE8FC17; Tue, 13 Mar 2012 13:22:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DDM3A1046669; Tue, 13 Mar 2012 13:22:03 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DDM3jv046668; Tue, 13 Mar 2012 13:22:03 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203131322.q2DDM3jv046668@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Mar 2012 13:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232923 - vendor/libcxxrt/2011-11-22-a35d8de85ffd4df32e2dc47fa539d61fd3024a54 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 13:22:03 -0000 Author: theraven Date: Tue Mar 13 13:22:03 2012 New Revision: 232923 URL: http://svn.freebsd.org/changeset/base/232923 Log: Tag new version of libcxxrt Approved by: dim (mentor) Added: vendor/libcxxrt/2011-11-22-a35d8de85ffd4df32e2dc47fa539d61fd3024a54/ - copied from r232922, vendor/libcxxrt/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 13:49:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4E00106564A; Tue, 13 Mar 2012 13:49:15 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id A58508FC15; Tue, 13 Mar 2012 13:49:15 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M0T00302T1X4L00@smtpauth1.wiscmail.wisc.edu>; Tue, 13 Mar 2012 08:49:09 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.73.151]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M0T00CJ9T1VED20@smtpauth1.wiscmail.wisc.edu>; Tue, 13 Mar 2012 08:49:08 -0500 (CDT) Date: Tue, 13 Mar 2012 08:49:07 -0500 From: Nathan Whitehorn In-reply-to: <201203112004.q2BK4ACL024929@svn.freebsd.org> To: Konstantin Belousov Message-id: <4F5F5053.4090007@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.73.151 X-Spam-PmxInfo: Server=avs-15, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.13.134220, SenderIP=76.210.73.151 References: <201203112004.q2BK4ACL024929@svn.freebsd.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120311 Thunderbird/10.0.2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, FreeBSD PowerPC ML Subject: Re: svn commit: r232832 - in head/lib/csu: . amd64 arm common i386-elf mips powerpc powerpc64 sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 13:49:15 -0000 On 03/11/12 15:04, Konstantin Belousov wrote: > Author: kib > Date: Sun Mar 11 20:04:09 2012 > New Revision: 232832 > URL: http://svn.freebsd.org/changeset/base/232832 > > Log: > Stop calling _init/_fini methods from crt1 for dynamic binaries. Do > call preinit, init and fini arrays methods from crt1 for static binaries. > > Mark new crt1 with FreeBSD-specific ELF note. > > Move some common crt1 code into new MI file ignore_init.c, to reduce > duplication. Also, conservatively adjust nearby sources for style. > > Reviewed by: kan > Tested by: andrew (arm), flo (sparc64) > MFC after: 3 weeks > This change makes /usr/libexec/cc1 seg fault on init on powerpc64. Dynamically linked (and most statically linked) binaries seem to work, but there is some remaining problem. -Nathan From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 14:09:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0344106566B; Tue, 13 Mar 2012 14:09:16 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD3F88FC12; Tue, 13 Mar 2012 14:09:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DE9G84048274; Tue, 13 Mar 2012 14:09:16 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DE9GAE048268; Tue, 13 Mar 2012 14:09:16 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203131409.q2DE9GAE048268@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Mar 2012 14:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232924 - in vendor/libc++/dist: include include/ext include/support/win32 src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 14:09:16 -0000 Author: theraven Date: Tue Mar 13 14:09:15 2012 New Revision: 232924 URL: http://svn.freebsd.org/changeset/base/232924 Log: Import new version of libc++ into vendor branch. Approved by: dim (mentor) Added: vendor/libc++/dist/include/__undef_min_max Modified: vendor/libc++/dist/include/__bit_reference vendor/libc++/dist/include/__config vendor/libc++/dist/include/__debug vendor/libc++/dist/include/__functional_03 vendor/libc++/dist/include/__functional_base vendor/libc++/dist/include/__functional_base_03 vendor/libc++/dist/include/__hash_table vendor/libc++/dist/include/__locale vendor/libc++/dist/include/__mutex_base vendor/libc++/dist/include/__split_buffer vendor/libc++/dist/include/__sso_allocator vendor/libc++/dist/include/__std_stream vendor/libc++/dist/include/__tree vendor/libc++/dist/include/__tuple vendor/libc++/dist/include/algorithm vendor/libc++/dist/include/atomic vendor/libc++/dist/include/bitset vendor/libc++/dist/include/chrono vendor/libc++/dist/include/cmath vendor/libc++/dist/include/complex vendor/libc++/dist/include/cstddef vendor/libc++/dist/include/cstdlib vendor/libc++/dist/include/cstring vendor/libc++/dist/include/deque vendor/libc++/dist/include/exception vendor/libc++/dist/include/ext/hash_map vendor/libc++/dist/include/forward_list vendor/libc++/dist/include/fstream vendor/libc++/dist/include/functional vendor/libc++/dist/include/future vendor/libc++/dist/include/initializer_list vendor/libc++/dist/include/iomanip vendor/libc++/dist/include/ios vendor/libc++/dist/include/istream vendor/libc++/dist/include/iterator vendor/libc++/dist/include/limits vendor/libc++/dist/include/list vendor/libc++/dist/include/locale vendor/libc++/dist/include/map vendor/libc++/dist/include/memory vendor/libc++/dist/include/mutex vendor/libc++/dist/include/ostream vendor/libc++/dist/include/random vendor/libc++/dist/include/ratio vendor/libc++/dist/include/regex vendor/libc++/dist/include/sstream vendor/libc++/dist/include/streambuf vendor/libc++/dist/include/string vendor/libc++/dist/include/support/win32/math_win32.h vendor/libc++/dist/include/support/win32/support.h vendor/libc++/dist/include/system_error vendor/libc++/dist/include/thread vendor/libc++/dist/include/tuple vendor/libc++/dist/include/type_traits vendor/libc++/dist/include/unordered_map vendor/libc++/dist/include/utility vendor/libc++/dist/include/valarray vendor/libc++/dist/include/vector vendor/libc++/dist/src/chrono.cpp vendor/libc++/dist/src/condition_variable.cpp vendor/libc++/dist/src/debug.cpp vendor/libc++/dist/src/exception.cpp vendor/libc++/dist/src/future.cpp vendor/libc++/dist/src/hash.cpp vendor/libc++/dist/src/locale.cpp vendor/libc++/dist/src/memory.cpp vendor/libc++/dist/src/mutex.cpp vendor/libc++/dist/src/new.cpp vendor/libc++/dist/src/random.cpp vendor/libc++/dist/src/regex.cpp vendor/libc++/dist/src/stdexcept.cpp vendor/libc++/dist/src/string.cpp vendor/libc++/dist/src/strstream.cpp vendor/libc++/dist/src/thread.cpp vendor/libc++/dist/src/typeinfo.cpp Modified: vendor/libc++/dist/include/__bit_reference ============================================================================== --- vendor/libc++/dist/include/__bit_reference Tue Mar 13 13:22:03 2012 (r232923) +++ vendor/libc++/dist/include/__bit_reference Tue Mar 13 14:09:15 2012 (r232924) @@ -14,14 +14,16 @@ #include <__config> #include +#include <__undef_min_max> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD -template class __bit_iterator; -template class __bit_const_reference; +template class __bit_iterator; +template class __bit_const_reference; template struct __has_storage_type @@ -29,22 +31,22 @@ struct __has_storage_type static const bool value = false; }; -template ::value> +template ::value> class __bit_reference { - typedef typename _C::__storage_type __storage_type; - typedef typename _C::__storage_pointer __storage_pointer; + typedef typename _Cp::__storage_type __storage_type; + typedef typename _Cp::__storage_pointer __storage_pointer; __storage_pointer __seg_; __storage_type __mask_; #if defined(__clang__) - friend typename _C::__self; + friend typename _Cp::__self; #else - friend class _C::__self; + friend class _Cp::__self; #endif - friend class __bit_const_reference<_C>; - friend class __bit_iterator<_C, false>; + friend class __bit_const_reference<_Cp>; + friend class __bit_iterator<_Cp, false>; public: _LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT {return static_cast(*__seg_ & __mask_);} @@ -66,74 +68,74 @@ public: {return operator=(static_cast(__x));} _LIBCPP_INLINE_VISIBILITY void flip() _NOEXCEPT {*__seg_ ^= __mask_;} - _LIBCPP_INLINE_VISIBILITY __bit_iterator<_C, false> operator&() const _NOEXCEPT - {return __bit_iterator<_C, false>(__seg_, static_cast(__ctz(__mask_)));} + _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, false> operator&() const _NOEXCEPT + {return __bit_iterator<_Cp, false>(__seg_, static_cast(__ctz(__mask_)));} private: _LIBCPP_INLINE_VISIBILITY __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT : __seg_(__s), __mask_(__m) {} }; -template -class __bit_reference<_C, false> +template +class __bit_reference<_Cp, false> { }; -template +template _LIBCPP_INLINE_VISIBILITY inline void -swap(__bit_reference<_C> __x, __bit_reference<_D> __y) _NOEXCEPT +swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT { bool __t = __x; __x = __y; __y = __t; } -template +template _LIBCPP_INLINE_VISIBILITY inline void -swap(__bit_reference<_C> __x, bool& __y) _NOEXCEPT +swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT { bool __t = __x; __x = __y; __y = __t; } -template +template _LIBCPP_INLINE_VISIBILITY inline void -swap(bool& __x, __bit_reference<_C> __y) _NOEXCEPT +swap(bool& __x, __bit_reference<_Cp> __y) _NOEXCEPT { bool __t = __x; __x = __y; __y = __t; } -template +template class __bit_const_reference { - typedef typename _C::__storage_type __storage_type; - typedef typename _C::__const_storage_pointer __storage_pointer; + typedef typename _Cp::__storage_type __storage_type; + typedef typename _Cp::__const_storage_pointer __storage_pointer; __storage_pointer __seg_; __storage_type __mask_; #if defined(__clang__) - friend typename _C::__self; + friend typename _Cp::__self; #else - friend class _C::__self; + friend class _Cp::__self; #endif - friend class __bit_iterator<_C, true>; + friend class __bit_iterator<_Cp, true>; public: _LIBCPP_INLINE_VISIBILITY - __bit_const_reference(const __bit_reference<_C>& __x) _NOEXCEPT + __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT : __seg_(__x.__seg_), __mask_(__x.__mask_) {} _LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT {return static_cast(*__seg_ & __mask_);} - _LIBCPP_INLINE_VISIBILITY __bit_iterator<_C, true> operator&() const _NOEXCEPT - {return __bit_iterator<_C, true>(__seg_, static_cast(__ctz(__mask_)));} + _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, true> operator&() const _NOEXCEPT + {return __bit_iterator<_Cp, true>(__seg_, static_cast(__ctz(__mask_)));} private: _LIBCPP_INLINE_VISIBILITY __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT @@ -144,11 +146,11 @@ private: // find -template -__bit_iterator<_C, false> -__find_bool_true(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +__bit_iterator<_Cp, false> +__find_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -178,11 +180,11 @@ __find_bool_true(__bit_iterator<_C, fals return _It(__first.__seg_, static_cast(__n)); } -template -__bit_iterator<_C, false> -__find_bool_false(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +__bit_iterator<_Cp, false> +__find_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -215,23 +217,23 @@ __find_bool_false(__bit_iterator<_C, fal return _It(__first.__seg_, static_cast(__n)); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -find(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __last, const _Tp& __value_) +__bit_iterator<_Cp, false> +find(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) { if (static_cast(__value_)) - return __find_bool_true(__first, static_cast(__last - __first)); - return __find_bool_false(__first, static_cast(__last - __first)); + return __find_bool_true(__first, static_cast(__last - __first)); + return __find_bool_false(__first, static_cast(__last - __first)); } // count -template -typename __bit_iterator<_C, false>::difference_type -__count_bool_true(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +typename __bit_iterator<_Cp, false>::difference_type +__count_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -258,11 +260,11 @@ __count_bool_true(__bit_iterator<_C, fal return __r; } -template -typename __bit_iterator<_C, false>::difference_type -__count_bool_false(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +typename __bit_iterator<_Cp, false>::difference_type +__count_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -289,23 +291,23 @@ __count_bool_false(__bit_iterator<_C, fa return __r; } -template +template inline _LIBCPP_INLINE_VISIBILITY -typename __bit_iterator<_C, false>::difference_type -count(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __last, const _Tp& __value_) +typename __bit_iterator<_Cp, false>::difference_type +count(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) { if (static_cast(__value_)) - return __count_bool_true(__first, static_cast(__last - __first)); - return __count_bool_false(__first, static_cast(__last - __first)); + return __count_bool_true(__first, static_cast(__last - __first)); + return __count_bool_false(__first, static_cast(__last - __first)); } // fill_n -template +template void -__fill_n_false(__bit_iterator<_C, false> __first, typename _C::size_type __n) +__fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -331,11 +333,11 @@ __fill_n_false(__bit_iterator<_C, false> } } -template +template void -__fill_n_true(__bit_iterator<_C, false> __first, typename _C::size_type __n) +__fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -361,10 +363,10 @@ __fill_n_true(__bit_iterator<_C, false> } } -template +template _LIBCPP_INLINE_VISIBILITY inline void -fill_n(__bit_iterator<_C, false> __first, typename _C::size_type __n, bool __value_) +fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value_) { if (__n > 0) { @@ -377,22 +379,22 @@ fill_n(__bit_iterator<_C, false> __first // fill -template +template inline _LIBCPP_INLINE_VISIBILITY void -fill(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __last, bool __value_) +fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool __value_) { - _VSTD::fill_n(__first, static_cast(__last - __first), __value_); + _VSTD::fill_n(__first, static_cast(__last - __first), __value_); } // copy -template -__bit_iterator<_C, false> -__copy_aligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -434,12 +436,12 @@ __copy_aligned(__bit_iterator<_C, _IsCon return __result; } -template -__bit_iterator<_C, false> -__copy_unaligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -512,10 +514,10 @@ __copy_unaligned(__bit_iterator<_C, _IsC return __result; } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -copy(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { if (__first.__ctz_ == __result.__ctz_) return __copy_aligned(__first, __last, __result); @@ -524,12 +526,12 @@ copy(__bit_iterator<_C, _IsConst> __firs // copy_backward -template -__bit_iterator<_C, false> -__copy_backward_aligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -571,12 +573,12 @@ __copy_backward_aligned(__bit_iterator<_ return __result; } -template -__bit_iterator<_C, false> -__copy_backward_unaligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -635,7 +637,7 @@ __copy_backward_unaligned(__bit_iterator { __m = ~__storage_type(0) << (__bits_per_word - __n); __storage_type __b = *--__last.__seg_ & __m; - unsigned __clz_r = __bits_per_word - __result.__ctz_; + __clz_r = __bits_per_word - __result.__ctz_; __storage_type __dn = _VSTD::min(__n, static_cast(__result.__ctz_)); __m = (~__storage_type(0) << (__result.__ctz_ - __dn)) & (~__storage_type(0) >> __clz_r); *__result.__seg_ &= ~__m; @@ -657,10 +659,10 @@ __copy_backward_unaligned(__bit_iterator return __result; } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -copy_backward(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +copy_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { if (__last.__ctz_ == __result.__ctz_) return __copy_backward_aligned(__first, __last, __result); @@ -669,20 +671,20 @@ copy_backward(__bit_iterator<_C, _IsCons // move -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -move(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +move(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { return _VSTD::copy(__first, __last, __result); } // move_backward -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -move_backward(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { return _VSTD::copy(__first, __last, __result); } @@ -852,34 +854,33 @@ swap_ranges(__bit_iterator<__C1, false> // rotate -template +template struct __bit_array { - typedef typename _C::difference_type difference_type; - typedef typename _C::__storage_type __storage_type; - typedef typename _C::iterator iterator; - static const unsigned __bits_per_word = _C::__bits_per_word; - static const unsigned _N = 4; + typedef typename _Cp::difference_type difference_type; + typedef typename _Cp::__storage_type __storage_type; + typedef typename _Cp::iterator iterator; + static const unsigned __bits_per_word = _Cp::__bits_per_word; + static const unsigned _Np = 4; difference_type __size_; - __storage_type __word_[_N]; + __storage_type __word_[_Np]; _LIBCPP_INLINE_VISIBILITY static difference_type capacity() - {return static_cast(_N * __bits_per_word);} + {return static_cast(_Np * __bits_per_word);} _LIBCPP_INLINE_VISIBILITY explicit __bit_array(difference_type __s) : __size_(__s) {} _LIBCPP_INLINE_VISIBILITY iterator begin() {return iterator(__word_, 0);} _LIBCPP_INLINE_VISIBILITY iterator end() {return iterator(__word_ + __size_ / __bits_per_word, static_cast(__size_ % __bits_per_word));} }; -template -__bit_iterator<_C, false> -rotate(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __middle, __bit_iterator<_C, false> __last) +template +__bit_iterator<_Cp, false> +rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle, __bit_iterator<_Cp, false> __last) { - typedef __bit_iterator<_C, false> _I1; + typedef __bit_iterator<_Cp, false> _I1; typedef typename _I1::difference_type difference_type; typedef typename _I1::__storage_type __storage_type; - static const unsigned __bits_per_word = _I1::__bits_per_word; difference_type __d1 = __middle - __first; difference_type __d2 = __last - __middle; _I1 __r = __first + __d2; @@ -887,16 +888,16 @@ rotate(__bit_iterator<_C, false> __first { if (__d1 <= __d2) { - if (__d1 <= __bit_array<_C>::capacity()) + if (__d1 <= __bit_array<_Cp>::capacity()) { - __bit_array<_C> __b(__d1); + __bit_array<_Cp> __b(__d1); _VSTD::copy(__first, __middle, __b.begin()); _VSTD::copy(__b.begin(), __b.end(), _VSTD::copy(__middle, __last, __first)); break; } else { - __bit_iterator<_C, false> __mp = _VSTD::swap_ranges(__first, __middle, __middle); + __bit_iterator<_Cp, false> __mp = _VSTD::swap_ranges(__first, __middle, __middle); __first = __middle; __middle = __mp; __d2 -= __d1; @@ -904,16 +905,16 @@ rotate(__bit_iterator<_C, false> __first } else { - if (__d2 <= __bit_array<_C>::capacity()) + if (__d2 <= __bit_array<_Cp>::capacity()) { - __bit_array<_C> __b(__d2); + __bit_array<_Cp> __b(__d2); _VSTD::copy(__middle, __last, __b.begin()); _VSTD::copy_backward(__b.begin(), __b.end(), _VSTD::copy_backward(__first, __middle, __last)); break; } else { - __bit_iterator<_C, false> __mp = __first + __d2; + __bit_iterator<_Cp, false> __mp = __first + __d2; _VSTD::swap_ranges(__first, __mp, __middle); __first = __mp; __d1 -= __d2; @@ -925,12 +926,12 @@ rotate(__bit_iterator<_C, false> __first // equal -template +template bool -__equal_unaligned(__bit_iterator<_C, true> __first1, __bit_iterator<_C, true> __last1, - __bit_iterator<_C, true> __first2) +__equal_unaligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, + __bit_iterator<_Cp, true> __first2) { - typedef __bit_iterator<_C, true> _It; + typedef __bit_iterator<_Cp, true> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -1003,12 +1004,12 @@ __equal_unaligned(__bit_iterator<_C, tru return true; } -template +template bool -__equal_aligned(__bit_iterator<_C, true> __first1, __bit_iterator<_C, true> __last1, - __bit_iterator<_C, true> __first2) +__equal_aligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, + __bit_iterator<_Cp, true> __first2) { - typedef __bit_iterator<_C, true> _It; + typedef __bit_iterator<_Cp, true> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -1046,31 +1047,31 @@ __equal_aligned(__bit_iterator<_C, true> return true; } -template +template inline _LIBCPP_INLINE_VISIBILITY bool -equal(__bit_iterator<_C, _IC1> __first1, __bit_iterator<_C, _IC1> __last1, __bit_iterator<_C, _IC2> __first2) +equal(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2) { if (__first1.__ctz_ == __first2.__ctz_) return __equal_aligned(__first1, __last1, __first2); return __equal_unaligned(__first1, __last1, __first2); } -template +template class __bit_iterator { public: - typedef typename _C::difference_type difference_type; + typedef typename _Cp::difference_type difference_type; typedef bool value_type; typedef __bit_iterator pointer; - typedef typename conditional<_IsConst, __bit_const_reference<_C>, __bit_reference<_C> >::type reference; + typedef typename conditional<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >::type reference; typedef random_access_iterator_tag iterator_category; private: - typedef typename _C::__storage_type __storage_type; - typedef typename conditional<_IsConst, typename _C::__const_storage_pointer, - typename _C::__storage_pointer>::type __storage_pointer; - static const unsigned __bits_per_word = _C::__bits_per_word; + typedef typename _Cp::__storage_type __storage_type; + typedef typename conditional<_IsConst, typename _Cp::__const_storage_pointer, + typename _Cp::__storage_pointer>::type __storage_pointer; + static const unsigned __bits_per_word = _Cp::__bits_per_word; __storage_pointer __seg_; unsigned __ctz_; @@ -1079,7 +1080,7 @@ public: _LIBCPP_INLINE_VISIBILITY __bit_iterator() _NOEXCEPT {} _LIBCPP_INLINE_VISIBILITY - __bit_iterator(const __bit_iterator<_C, false>& __it) _NOEXCEPT + __bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT : __seg_(__it.__seg_), __ctz_(__it.__ctz_) {} _LIBCPP_INLINE_VISIBILITY reference operator*() const _NOEXCEPT @@ -1187,34 +1188,34 @@ private: : __seg_(__s), __ctz_(__ctz) {} #if defined(__clang__) - friend typename _C::__self; + friend typename _Cp::__self; #else - friend class _C::__self; + friend class _Cp::__self; #endif - friend class __bit_reference<_C>; - friend class __bit_const_reference<_C>; - friend class __bit_iterator<_C, true>; - template friend struct __bit_array; - template friend void __fill_n_false(__bit_iterator<_D, false> __first, typename _D::size_type __n); - template friend void __fill_n_true(__bit_iterator<_D, false> __first, typename _D::size_type __n); - template friend __bit_iterator<_D, false> __copy_aligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> __copy_unaligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> copy(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> __copy_backward_aligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> __copy_backward_unaligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> copy_backward(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); + friend class __bit_reference<_Cp>; + friend class __bit_const_reference<_Cp>; + friend class __bit_iterator<_Cp, true>; + template friend struct __bit_array; + template friend void __fill_n_false(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n); + template friend void __fill_n_true(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n); + template friend __bit_iterator<_Dp, false> __copy_aligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> __copy_unaligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> copy(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> __copy_backward_aligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> __copy_backward_unaligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> copy_backward(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); template friend __bit_iterator<__C2, false> __swap_ranges_aligned(__bit_iterator<__C1, false>, __bit_iterator<__C1, false>, __bit_iterator<__C2, false>); @@ -1224,22 +1225,22 @@ private: template friend __bit_iterator<__C2, false> swap_ranges(__bit_iterator<__C1, false>, __bit_iterator<__C1, false>, __bit_iterator<__C2, false>); - template friend __bit_iterator<_D, false> rotate(__bit_iterator<_D, false>, - __bit_iterator<_D, false>, - __bit_iterator<_D, false>); - template friend bool __equal_aligned(__bit_iterator<_D, true>, - __bit_iterator<_D, true>, - __bit_iterator<_D, true>); - template friend bool __equal_unaligned(__bit_iterator<_D, true>, - __bit_iterator<_D, true>, - __bit_iterator<_D, true>); - template friend bool equal(__bit_iterator<_D, _IC1>, - __bit_iterator<_D, _IC1>, - __bit_iterator<_D, _IC2>); - template friend __bit_iterator<_D, false> __find_bool_true(__bit_iterator<_D, false>, - typename _D::size_type); - template friend __bit_iterator<_D, false> __find_bool_false(__bit_iterator<_D, false>, - typename _D::size_type); + template friend __bit_iterator<_Dp, false> rotate(__bit_iterator<_Dp, false>, + __bit_iterator<_Dp, false>, + __bit_iterator<_Dp, false>); + template friend bool __equal_aligned(__bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>); + template friend bool __equal_unaligned(__bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>); + template friend bool equal(__bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC2>); + template friend __bit_iterator<_Dp, false> __find_bool_true(__bit_iterator<_Dp, false>, + typename _Dp::size_type); + template friend __bit_iterator<_Dp, false> __find_bool_false(__bit_iterator<_Dp, false>, + typename _Dp::size_type); }; _LIBCPP_END_NAMESPACE_STD Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Tue Mar 13 13:22:03 2012 (r232923) +++ vendor/libc++/dist/include/__config Tue Mar 13 14:09:15 2012 (r232924) @@ -58,6 +58,17 @@ # endif #endif // _WIN32 +#ifdef __sun__ +# include +# ifdef _LITTLE_ENDIAN +# define _LIBCPP_LITTLE_ENDIAN 1 +# define _LIBCPP_BIG_ENDIAN 0 +# else +# define _LIBCPP_LITTLE_ENDIAN 0 +# define _LIBCPP_BIG_ENDIAN 1 +# endif +#endif // __sun__ + #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) # include # if __BYTE_ORDER == __LITTLE_ENDIAN @@ -160,6 +171,10 @@ typedef __char32_t char32_t; #define _LIBCPP_NO_RTTI #endif +#if !(__has_feature(cxx_strong_enums)) +#define _LIBCPP_HAS_NO_STRONG_ENUMS +#endif + #if !(__has_feature(cxx_decltype)) #define _LIBCPP_HAS_NO_DECLTYPE #endif @@ -223,6 +238,7 @@ typedef __char32_t char32_t; #if __has_feature(objc_arc_weak) #define _LIBCPP_HAS_OBJC_ARC_WEAK +#define _LIBCPP_HAS_NO_STRONG_ENUMS #endif #if !(__has_feature(cxx_constexpr)) @@ -371,7 +387,25 @@ template struct __static_asse #define __has_feature(__x) 0 #endif -#if __APPLE__ || __FreeBSD__ || _WIN32 +#if __has_feature(cxx_explicit_conversions) +# define _LIBCPP_EXPLICIT explicit +#else +# define _LIBCPP_EXPLICIT +#endif + +#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS +#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_VISIBLE x { enum _ +#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ + _ __v_; \ + _LIBCPP_ALWAYS_INLINE x(_ __v) : __v_(__v) {} \ + _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \ + }; +#else // _LIBCPP_HAS_NO_STRONG_ENUMS +#define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_VISIBLE x +#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) +#endif // _LIBCPP_HAS_NO_STRONG_ENUMS + +#if __APPLE__ || __FreeBSD__ || _WIN32 || __sun__ #define _LIBCPP_LOCALE__L_EXTENSIONS 1 #endif #if __FreeBSD__ @@ -382,7 +416,7 @@ template struct __static_asse #define _LIBCPP_HAS_DEFAULTRUNELOCALE #endif -#if __APPLE__ || __FreeBSD__ +#if __APPLE__ || __FreeBSD__ || __sun__ #define _LIBCPP_WCTYPE_IS_MASK #endif Modified: vendor/libc++/dist/include/__debug ============================================================================== --- vendor/libc++/dist/include/__debug Tue Mar 13 13:22:03 2012 (r232923) +++ vendor/libc++/dist/include/__debug Tue Mar 13 14:09:15 2012 (r232924) @@ -83,8 +83,8 @@ _C_node<_Cont>::__dereferenceable(const { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__dereferenceable(__j); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__dereferenceable(__j); } template @@ -93,8 +93,8 @@ _C_node<_Cont>::__decrementable(const vo { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__decrementable(__j); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__decrementable(__j); } template @@ -103,8 +103,8 @@ _C_node<_Cont>::__addable(const void* __ { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__addable(__j, __n); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__addable(__j, __n); } template @@ -113,8 +113,8 @@ _C_node<_Cont>::__subscriptable(const vo { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__subscriptable(__j, __n); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__subscriptable(__j, __n); } class _LIBCPP_VISIBLE __libcpp_db Modified: vendor/libc++/dist/include/__functional_03 ============================================================================== --- vendor/libc++/dist/include/__functional_03 Tue Mar 13 13:22:03 2012 (r232923) +++ vendor/libc++/dist/include/__functional_03 Tue Mar 13 14:09:15 2012 (r232924) @@ -60,140 +60,140 @@ public: } }; -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R _T::*> -mem_fn(_R _T::* __pm) +__mem_fn<_Rp _Tp::*> +mem_fn(_Rp _Tp::* __pm) { - return __mem_fn<_R _T::*>(__pm); + return __mem_fn<_Rp _Tp::*>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)()) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)()) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0)> -mem_fn(_R (_T::* __pm)(_A0)) +__mem_fn<_Rp (_Tp::*)(_A0)> +mem_fn(_Rp (_Tp::* __pm)(_A0)) { - return __mem_fn<_R (_T::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1)> -mem_fn(_R (_T::* __pm)(_A0, _A1)) +__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1)) { - return __mem_fn<_R (_T::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1, _A2)> -mem_fn(_R (_T::* __pm)(_A0, _A1, _A2)) +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2)) { - return __mem_fn<_R (_T::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)() const) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)() const) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0)> -mem_fn(_R (_T::* __pm)(_A0) const) +__mem_fn<_Rp (_Tp::*)(_A0)> +mem_fn(_Rp (_Tp::* __pm)(_A0) const) { - return __mem_fn<_R (_T::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1)> -mem_fn(_R (_T::* __pm)(_A0, _A1) const) +__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1) const) { - return __mem_fn<_R (_T::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1, _A2)> -mem_fn(_R (_T::* __pm)(_A0, _A1, _A2) const) +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2) const) { - return __mem_fn<_R (_T::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)() volatile) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)() volatile) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0)> -mem_fn(_R (_T::* __pm)(_A0) volatile) +__mem_fn<_Rp (_Tp::*)(_A0)> +mem_fn(_Rp (_Tp::* __pm)(_A0) volatile) { - return __mem_fn<_R (_T::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1)> -mem_fn(_R (_T::* __pm)(_A0, _A1) volatile) +__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1) volatile) { - return __mem_fn<_R (_T::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1, _A2)> -mem_fn(_R (_T::* __pm)(_A0, _A1, _A2) volatile) +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2) volatile) { - return __mem_fn<_R (_T::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)() const volatile) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)() const volatile) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 14:10:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3CAB1106566B; Tue, 13 Mar 2012 14:10:34 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12E2E8FC1C; Tue, 13 Mar 2012 14:10:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DEAXvO048353; Tue, 13 Mar 2012 14:10:33 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DEAXJ6048352; Tue, 13 Mar 2012 14:10:33 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203131410.q2DEAXJ6048352@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Mar 2012 14:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232925 - vendor/libc++/r152501 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 14:10:34 -0000 Author: theraven Date: Tue Mar 13 14:10:33 2012 New Revision: 232925 URL: http://svn.freebsd.org/changeset/base/232925 Log: Tag new libc++ version. Added: vendor/libc++/r152501/ - copied from r232924, vendor/libc++/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 14:14:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C17B51065720; Tue, 13 Mar 2012 14:14:13 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFF538FC15; Tue, 13 Mar 2012 14:14:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DEEDR8048513; Tue, 13 Mar 2012 14:14:13 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DEEDBR048510; Tue, 13 Mar 2012 14:14:13 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203131414.q2DEEDBR048510@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Mar 2012 14:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232926 - in head: include/xlocale lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 14:14:14 -0000 Author: theraven Date: Tue Mar 13 14:14:13 2012 New Revision: 232926 URL: http://svn.freebsd.org/changeset/base/232926 Log: More xlocale cleanups. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h head/lib/libc/locale/Symbol.map Modified: head/include/xlocale/_ctype.h ============================================================================== --- head/include/xlocale/_ctype.h Tue Mar 13 14:10:33 2012 (r232925) +++ head/include/xlocale/_ctype.h Tue Mar 13 14:14:13 2012 (r232926) @@ -68,19 +68,19 @@ _RuneLocale *__runes_for_locale(locale_t #endif /* _XLOCALE_INLINE */ #ifdef _XLOCALE_WCTYPES -static __inline int -__maskrune_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, &mb_sb_limit); - return (_c < 0 || _c >= _CACHED_RUNES) ? ___runetype_l(_c, locale) : - runes->__runetype[_c] & _f; + int __limit; + _RuneLocale *runes = __runes_for_locale(__loc, &__limit); + return (__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) : + runes->__runetype[__c] & __f; } -static __inline int -__istype_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE __inline int +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - return (!!__maskrune_l(_c, _f, locale)); + return (!!__maskrune_l(__c, __f, __loc)); } #define XLOCALE_ISCTYPE(fname, cat) \ @@ -88,25 +88,25 @@ __istype_l(__ct_rune_t _c, unsigned long _XLOCALE_INLINE int isw##fname##_l(int __c, locale_t __l)\ { return __istype_l(__c, cat, __l); } #else -static __inline int -__sbmaskrune_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, &mb_sb_limit); - return (_c < 0 || _c >= mb_sb_limit) ? 0 : - runes->__runetype[_c] & _f; + int __limit; + _RuneLocale *runes = __runes_for_locale(__loc, &__limit); + return (__c < 0 || __c >= __limit) ? 0 : + runes->__runetype[__c] & __f; } -static __inline int -__sbistype_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - return (!!__sbmaskrune_l(_c, _f, locale)); + return (!!__sbmaskrune_l(__c, __f, __loc)); } -#define XLOCALE_ISCTYPE(fname, cat) \ - _XLOCALE_INLINE int is##fname##_l(int c, locale_t l); \ - _XLOCALE_INLINE int is##fname##_l(int c, locale_t l)\ - { return __sbistype_l(c, cat, l); } +#define XLOCALE_ISCTYPE(__fname, __cat) \ + _XLOCALE_INLINE int is##__fname##_l(int, locale_t); \ + _XLOCALE_INLINE int is##__fname##_l(int __c, locale_t __l)\ + { return __sbistype_l(__c, __cat, __l); } #endif XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D) @@ -136,15 +136,15 @@ _XLOCALE_INLINE int towupper_l(int, loca _XLOCALE_INLINE int towlower_l(int __c, locale_t __l) { - int mb_sb_limit; - _RuneLocale *__runes = __runes_for_locale(__l, &mb_sb_limit); + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); return (__c < 0 || __c >= _CACHED_RUNES) ? ___tolower_l(__c, __l) : __runes->__maplower[__c]; } _XLOCALE_INLINE int towupper_l(int __c, locale_t __l) { - int mb_sb_limit; - _RuneLocale *__runes = __runes_for_locale(__l, &mb_sb_limit); + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); return (__c < 0 || __c >= _CACHED_RUNES) ? ___toupper_l(__c, __l) : __runes->__mapupper[__c]; } Modified: head/lib/libc/locale/Symbol.map ============================================================================== --- head/lib/libc/locale/Symbol.map Tue Mar 13 14:10:33 2012 (r232925) +++ head/lib/libc/locale/Symbol.map Tue Mar 13 14:14:13 2012 (r232926) @@ -60,9 +60,13 @@ FBSD_1.0 { nextwctype; nl_langinfo; __maskrune; + __maskrune_l; __sbmaskrune; + __sbmaskrune_l; __istype; + __istype_l; __sbistype; + __sbistype_l; __isctype; __toupper; __sbtoupper; From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 15:21:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0214F106566B; Tue, 13 Mar 2012 15:21:15 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E59E78FC14; Tue, 13 Mar 2012 15:21:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DFLE89050663; Tue, 13 Mar 2012 15:21:14 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DFLEVM050661; Tue, 13 Mar 2012 15:21:14 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203131521.q2DFLEVM050661@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Mar 2012 15:21: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: r232927 - head/include/xlocale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 15:21:15 -0000 Author: theraven Date: Tue Mar 13 15:21:14 2012 New Revision: 232927 URL: http://svn.freebsd.org/changeset/base/232927 Log: Add missing prototypes. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h ============================================================================== --- head/include/xlocale/_ctype.h Tue Mar 13 14:14:13 2012 (r232926) +++ head/include/xlocale/_ctype.h Tue Mar 13 15:21:14 2012 (r232927) @@ -89,6 +89,11 @@ __istype_l(__ct_rune_t __c, unsigned lon { return __istype_l(__c, cat, __l); } #else _XLOCALE_INLINE int +__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +_XLOCALE_INLINE int +__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); + +_XLOCALE_INLINE int __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { int __limit; From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 16:21:26 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63134106566B; Tue, 13 Mar 2012 16:21:26 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 1B70F8FC12; Tue, 13 Mar 2012 16:21:25 +0000 (UTC) Received: from dhcp-guest-clmm-64-102-188-89.cisco.com (dhcp-guest-clmm-64-102-188-89.cisco.com [64.102.188.89]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q2DGLIhZ044285 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 13 Mar 2012 09:21:25 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <201203060342.q263gs7g018067@svn.freebsd.org> Date: Tue, 13 Mar 2012 09:21:18 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <201203060342.q263gs7g018067@svn.freebsd.org> To: Oleksandr Tymoshenko X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r232582 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 16:21:26 -0000 On Mar 5, 2012, at 7:42 PM, Oleksandr Tymoshenko wrote: > @@ -308,6 +308,13 @@ _init_tls() > } > } > > +#ifdef TLS_VARIANT_I > + /* > + * tls_static_space should include space for TLS structure > + */ > + tls_static_space += TLS_TCB_SIZE; > +#endif > + How does this change behaviour on ia64 or powerpc? -- Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 16:42:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4791A106566C; Tue, 13 Mar 2012 16:42:40 +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 36D998FC0A; Tue, 13 Mar 2012 16:42:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DGgeWl053201; Tue, 13 Mar 2012 16:42:40 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DGgen8053199; Tue, 13 Mar 2012 16:42:40 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201203131642.q2DGgen8053199@svn.freebsd.org> From: Michael Tuexen Date: Tue, 13 Mar 2012 16:42:40 +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: r232928 - in releng/8.3/sys: i386/conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 16:42:40 -0000 Author: tuexen Date: Tue Mar 13 16:42:39 2012 New Revision: 232928 URL: http://svn.freebsd.org/changeset/base/232928 Log: MFC r232723, r232726: Fix a bug reported by Peter Holm which results in a crash: Verify in sctp_peeloff() that the socket is a one-to-many style SCTP socket. Approved by: re@ Modified: releng/8.3/sys/netinet/sctp_peeloff.c Directory Properties: releng/8.3/sys/ (props changed) releng/8.3/sys/amd64/include/xen/ (props changed) releng/8.3/sys/boot/ (props changed) releng/8.3/sys/cddl/contrib/opensolaris/ (props changed) releng/8.3/sys/contrib/dev/acpica/ (props changed) releng/8.3/sys/contrib/pf/ (props changed) releng/8.3/sys/dev/e1000/ (props changed) releng/8.3/sys/i386/conf/XENHVM (props changed) Modified: releng/8.3/sys/netinet/sctp_peeloff.c ============================================================================== --- releng/8.3/sys/netinet/sctp_peeloff.c Tue Mar 13 15:21:14 2012 (r232927) +++ releng/8.3/sys/netinet/sctp_peeloff.c Tue Mar 13 16:42:39 2012 (r232928) @@ -55,9 +55,18 @@ sctp_can_peel_off(struct socket *head, s struct sctp_tcb *stcb; uint32_t state; + if (head == NULL) { + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EBADF); + return (EBADF); + } + if ((head->so_proto->pr_protocol != IPPROTO_SCTP) || + (head->so_type != SOCK_SEQPACKET)) { + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EOPNOTSUPP); + return (EOPNOTSUPP); + } inp = (struct sctp_inpcb *)head->so_pcb; if (inp == NULL) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EFAULT); + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EFAULT); return (EFAULT); } stcb = sctp_findassociation_ep_asocid(inp, assoc_id, 1); From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 17:33:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DF4910657AF; Tue, 13 Mar 2012 17:32:56 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 071488FC15; Tue, 13 Mar 2012 17:32:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DHWtE1054892; Tue, 13 Mar 2012 17:32:55 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DHWtQ7054890; Tue, 13 Mar 2012 17:32:55 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203131732.q2DHWtQ7054890@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Mar 2012 17:32: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: r232929 - head/include/xlocale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 17:33:00 -0000 Author: theraven Date: Tue Mar 13 17:32:55 2012 New Revision: 232929 URL: http://svn.freebsd.org/changeset/base/232929 Log: Fix the other missing prototypes. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h ============================================================================== --- head/include/xlocale/_ctype.h Tue Mar 13 16:42:39 2012 (r232928) +++ head/include/xlocale/_ctype.h Tue Mar 13 17:32:55 2012 (r232929) @@ -69,6 +69,11 @@ _RuneLocale *__runes_for_locale(locale_t #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +_XLOCALE_INLINE __inline int +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); + +_XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { int __limit; From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 18:33:10 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B5CA1065672; Tue, 13 Mar 2012 18:33:10 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 2206B8FC1E; Tue, 13 Mar 2012 18:33:09 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q2DIIk2i028232; Tue, 13 Mar 2012 19:18:47 +0100 (CET) (envelope-from andreast@FreeBSD.org) Message-ID: <4F5F8F86.1060500@FreeBSD.org> Date: Tue, 13 Mar 2012 19:18:46 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: David Chisnall References: <201203131732.q2DHWtQ7054890@svn.freebsd.org> In-Reply-To: <201203131732.q2DHWtQ7054890@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r232929 - head/include/xlocale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 18:33:10 -0000 On 13.03.12 18:32, David Chisnall wrote: > Author: theraven > Date: Tue Mar 13 17:32:55 2012 > New Revision: 232929 > URL: http://svn.freebsd.org/changeset/base/232929 > > Log: > Fix the other missing prototypes. > > Approved by: dim (mentor) > > Modified: > head/include/xlocale/_ctype.h > > Modified: head/include/xlocale/_ctype.h > ============================================================================== > --- head/include/xlocale/_ctype.h Tue Mar 13 16:42:39 2012 (r232928) > +++ head/include/xlocale/_ctype.h Tue Mar 13 17:32:55 2012 (r232929) > @@ -69,6 +69,11 @@ _RuneLocale *__runes_for_locale(locale_t > > #ifdef _XLOCALE_WCTYPES > _XLOCALE_INLINE int > +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); > +_XLOCALE_INLINE __inline int Duplicate inline. > +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); > + > +_XLOCALE_INLINE int > __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) > { > int __limit; Around line 85 too. I build with the below diff now. Gruss, Andreas Index: _ctype.h =================================================================== --- _ctype.h (revision 232929) +++ _ctype.h (working copy) @@ -70,7 +70,7 @@ #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); _XLOCALE_INLINE int @@ -82,7 +82,7 @@ runes->__runetype[__c] & __f; } -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { return (!!__maskrune_l(__c, __f, __loc)); From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 18:39:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 078241065676; Tue, 13 Mar 2012 18:39:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6FD58FC08; Tue, 13 Mar 2012 18:39:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DIdvvs057182; Tue, 13 Mar 2012 18:39:57 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DIdvLm057155; Tue, 13 Mar 2012 18:39:57 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203131839.q2DIdvLm057155@svn.freebsd.org> From: Dimitry Andric Date: Tue, 13 Mar 2012 18:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232930 - in stable/9: lib/libsm lib/libthread_db lib/libz libexec/mail.local libexec/smrsh sbin/fsdb share/mk sys/boot/i386/boot0 sys/boot/i386/boot2 sys/boot/i386/btx/btx sys/boot/i38... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 18:39:58 -0000 Author: dim Date: Tue Mar 13 18:39:57 2012 New Revision: 232930 URL: http://svn.freebsd.org/changeset/base/232930 Log: MFC r232263: Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to get rid of testing explicitly for clang (using ${CC:T:Mclang}) in individual Makefiles. Instead, use the following extra macros, for use with clang: - NO_WERROR.clang (disables -Werror) - NO_WCAST_ALIGN.clang (disables -Wcast-align) - NO_WFORMAT.clang (disables -Wformat and friends) - CLANG_NO_IAS (disables integrated assembler) - CLANG_OPT_SMALL (adds flags for extra small size optimizations) As a side effect, this enables setting CC/CXX/CPP in src.conf instead of make.conf! For clang, use the following: CC=clang CXX=clang++ CPP=clang-cpp Modified: stable/9/lib/libsm/Makefile stable/9/lib/libthread_db/Makefile stable/9/lib/libz/Makefile stable/9/libexec/mail.local/Makefile stable/9/libexec/smrsh/Makefile stable/9/sbin/fsdb/Makefile stable/9/share/mk/bsd.sys.mk stable/9/sys/boot/i386/boot0/Makefile stable/9/sys/boot/i386/boot2/Makefile stable/9/sys/boot/i386/btx/btx/Makefile stable/9/sys/boot/i386/btx/btxldr/Makefile stable/9/sys/boot/i386/gptboot/Makefile stable/9/sys/boot/i386/gptzfsboot/Makefile stable/9/sys/boot/i386/libi386/Makefile stable/9/sys/boot/i386/pxeldr/Makefile stable/9/sys/boot/i386/zfsboot/Makefile stable/9/sys/boot/pc98/btx/btx/Makefile stable/9/sys/boot/pc98/btx/btxldr/Makefile stable/9/sys/conf/Makefile.amd64 stable/9/sys/conf/Makefile.i386 stable/9/sys/conf/kern.pre.mk stable/9/sys/modules/bios/smapi/Makefile stable/9/sys/modules/linux/Makefile stable/9/usr.bin/netstat/Makefile stable/9/usr.bin/vacation/Makefile stable/9/usr.sbin/sendmail/Makefile Directory Properties: stable/9/lib/libsm/ (props changed) stable/9/lib/libthread_db/ (props changed) stable/9/lib/libz/ (props changed) stable/9/libexec/mail.local/ (props changed) stable/9/libexec/smrsh/ (props changed) stable/9/sbin/fsdb/ (props changed) stable/9/share/mk/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/conf/ (props changed) stable/9/usr.bin/netstat/ (props changed) stable/9/usr.bin/vacation/ (props changed) stable/9/usr.sbin/sendmail/ (props changed) Modified: stable/9/lib/libsm/Makefile ============================================================================== --- stable/9/lib/libsm/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/lib/libsm/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -18,12 +18,10 @@ CFLAGS+=${SENDMAIL_CFLAGS} WARNS?= 2 -.if ${CC:T:Mclang} == "clang" # Unfortunately, clang gives warnings about sendmail code that cannot # be turned off yet. Since this is contrib code, and we don't really # care about the warnings, just make them non-fatal for now. -NO_WERROR= -.endif +NO_WERROR.clang= LIB= sm Modified: stable/9/lib/libthread_db/Makefile ============================================================================== --- stable/9/lib/libthread_db/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/lib/libthread_db/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -16,10 +16,8 @@ SYM_MAPS+=${.CURDIR}/Symbol.map SYMBOL_MAPS=${SYM_MAPS} VERSION_DEF=${.CURDIR}/../libc/Versions.def -.if ${CC:T:Mclang} == "clang" # Unfortunately, clang gives an incorrect warning about alignment in # arch/i386/libpthread_md.c, so turn that off for now. -NO_WCAST_ALIGN= -.endif +NO_WCAST_ALIGN.clang= .include Modified: stable/9/lib/libz/Makefile ============================================================================== --- stable/9/lib/libz/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/lib/libz/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -47,10 +47,6 @@ ACFLAGS+= -Wa,--noexecstack #SRCS+= gvmat64.S #CFLAGS+= -DASMV -DNO_UNDERLINE #ACFLAGS+= -Wa,--noexecstack -#.if ${CC:T:Mclang} == "clang" -## XXX: clang integrated-as doesn't grok .intel_syntax directives yet -#ACFLAGS+= ${.IMPSRC:T:Mgvmat64.S:C/^.+$/-no-integrated-as/} -#.endif #.endif VERSION_DEF= ${.CURDIR}/Versions.def @@ -71,3 +67,7 @@ test: example minigzip echo hello world | ./minigzip | ./minigzip -d ) .include + +## XXX: clang integrated-as doesn't grok .intel_syntax directives yet +#ACFLAGS.gvmat64.S= ${CLANG_NO_IAS} +#ACFLAGS+= ${ACFLAGS.${.IMPSRC:T}} Modified: stable/9/libexec/mail.local/Makefile ============================================================================== --- stable/9/libexec/mail.local/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/libexec/mail.local/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -12,12 +12,10 @@ CFLAGS+=-I${SENDMAIL_DIR}/include -I. WARNS?= 2 WFORMAT=0 -.if ${CC:T:Mclang} == "clang" # Unfortunately, clang gives warnings about sendmail code that cannot # be turned off yet. Since this is contrib code, and we don't really # care about the warnings, just make them non-fatal for now. -NO_WERROR= -.endif +NO_WERROR.clang= LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a Modified: stable/9/libexec/smrsh/Makefile ============================================================================== --- stable/9/libexec/smrsh/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/libexec/smrsh/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -17,12 +17,10 @@ LDADD= ${LIBSM} WARNS?= 2 -.if ${CC:T:Mclang} == "clang" # Unfortunately, clang gives warnings about sendmail code that cannot # be turned off yet. Since this is contrib code, and we don't really # care about the warnings, just make them non-fatal for now. -NO_WERROR= -.endif +NO_WERROR.clang= SRCS+= sm_os.h CLEANFILES+=sm_os.h Modified: stable/9/sbin/fsdb/Makefile ============================================================================== --- stable/9/sbin/fsdb/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sbin/fsdb/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -9,10 +9,8 @@ SRCS= fsdb.c fsdbutil.c \ pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c CFLAGS+= -I${.CURDIR}/../fsck_ffs WARNS?= 2 -.if ${CC:T:Mclang} == "clang" # Work around a problem with format string warnings and ntohs macros. -NO_WFORMAT= -.endif +NO_WFORMAT.clang= LDADD= -ledit -ltermcap DPADD= ${LIBEDIT} ${LIBTERMCAP} .PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs Modified: stable/9/share/mk/bsd.sys.mk ============================================================================== --- stable/9/share/mk/bsd.sys.mk Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/share/mk/bsd.sys.mk Tue Mar 13 18:39:57 2012 (r232930) @@ -28,7 +28,7 @@ CFLAGS += -std=${CSTD} . if defined(WARNS) . if ${WARNS} >= 1 CWARNFLAGS += -Wsystem-headers -. if !defined(NO_WERROR) +. if !defined(NO_WERROR) && (${CC:T:Mclang} != "clang" || !defined(NO_WERROR.clang)) CWARNFLAGS += -Werror . endif . endif @@ -42,7 +42,7 @@ CWARNFLAGS += -W -Wno-unused-parameter - . if ${WARNS} >= 4 CWARNFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch\ -Wshadow -Wunused-parameter -. if !defined(NO_WCAST_ALIGN) +. if !defined(NO_WCAST_ALIGN) && (${CC:T:Mclang} != "clang" || !defined(NO_WCAST_ALIGN.clang)) CWARNFLAGS += -Wcast-align . endif . endif @@ -84,12 +84,12 @@ WFORMAT = 1 . if ${WFORMAT} > 0 #CWARNFLAGS += -Wformat-nonliteral -Wformat-security -Wno-format-extra-args CWARNFLAGS += -Wformat=2 -Wno-format-extra-args -. if !defined(NO_WERROR) +. if !defined(NO_WERROR) && (${CC:T:Mclang} != "clang" || !defined(NO_WERROR.clang)) CWARNFLAGS += -Werror . endif . endif . endif -. if defined(NO_WFORMAT) +. if defined(NO_WFORMAT) || (${CC:T:Mclang} == "clang" && defined(NO_WFORMAT.clang)) CWARNFLAGS += -Wno-format . endif .endif @@ -98,6 +98,12 @@ CWARNFLAGS += -Wno-format CWARNFLAGS += -Wno-unknown-pragmas .endif +.if ${CC:T:Mclang} == "clang" +CLANG_NO_IAS = -no-integrated-as +CLANG_OPT_SMALL = -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 \ + -mllvm -enable-load-pre=false +.endif + .if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" # Don't use -Wstack-protector as it breaks world with -Werror. Modified: stable/9/sys/boot/i386/boot0/Makefile ============================================================================== --- stable/9/sys/boot/i386/boot0/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/boot/i386/boot0/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -19,12 +19,6 @@ SRCS= ${PROG}.S OPTS ?= -DVOLUME_SERIAL -DPXE CFLAGS += ${OPTS} -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+= ${.IMPSRC:T:Mboot0.S:C/^.+$/-no-integrated-as/} -CFLAGS+= ${.IMPSRC:T:Mboot0ext.S:C/^.+$/-no-integrated-as/} -.endif - # Flags used in the boot0.S code: # 0x0f all valid partitions enabled. # 0x80 'packet', use BIOS EDD (LBA) extensions instead of CHS @@ -83,3 +77,8 @@ CFLAGS+=-DFLAGS=${BOOT_BOOT0_FLAGS} \ LDFLAGS=-e start -Ttext ${BOOT_BOOT0_ORG} -Wl,-N,-S,--oformat,binary .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.boot0.S= ${CLANG_NO_IAS} +CFLAGS.boot0ext.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/sys/boot/i386/boot2/Makefile ============================================================================== --- stable/9/sys/boot/i386/boot2/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/boot/i386/boot2/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -40,14 +40,8 @@ CFLAGS= -Os \ -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ - -Winline --param max-inline-insns-single=100 - -.if ${CC:T:Mclang} == "clang" -CFLAGS+= -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 \ - -mllvm -enable-load-pre=false -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+= ${.IMPSRC:T:Mboot1.S:C/^.+$/-no-integrated-as/} -.endif + -Winline --param max-inline-insns-single=100 \ + ${CLANG_OPT_SMALL} LDFLAGS=-static -N --gc-sections @@ -89,9 +83,7 @@ boot2.out: ${BTXCRT} boot2.o sio.o ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} boot2.o: boot2.s -.if ${CC:T:Mclang} == "clang" ${CC} ${ACFLAGS} -c boot2.s -.endif SRCS= boot2.c boot2.h @@ -115,3 +107,7 @@ machine: .endif .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.boot1.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/sys/boot/i386/btx/btx/Makefile ============================================================================== --- stable/9/sys/boot/i386/btx/btx/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/boot/i386/btx/btx/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -13,11 +13,6 @@ BOOT_BTX_FLAGS=0x0 CFLAGS+=-DBTX_FLAGS=${BOOT_BTX_FLAGS} -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+=${.IMPSRC:T:Mbtx.S:C/^.+$/-no-integrated-as/} -.endif - .if defined(BTX_SERIAL) BOOT_COMCONSOLE_PORT?= 0x3f8 BOOT_COMCONSOLE_SPEED?= 9600 @@ -32,3 +27,7 @@ ORG= 0x9000 LDFLAGS=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.btx.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/sys/boot/i386/btx/btxldr/Makefile ============================================================================== --- stable/9/sys/boot/i386/btx/btxldr/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/boot/i386/btx/btxldr/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -11,11 +11,10 @@ CFLAGS+=-DLOADER_ADDRESS=${LOADER_ADDRES CFLAGS+=-DBTXLDR_VERBOSE .endif -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+=${.IMPSRC:T:Mbtxldr.S:C/^.+$/-no-integrated-as/} -.endif - LDFLAGS=-e start -Ttext ${LOADER_ADDRESS} -Wl,-N,-S,--oformat,binary .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.btxldr.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/sys/boot/i386/gptboot/Makefile ============================================================================== --- stable/9/sys/boot/i386/gptboot/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/boot/i386/gptboot/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -36,11 +36,6 @@ CFLAGS= -DBOOTPROG=\"gptboot\" \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Winline --param max-inline-insns-single=100 -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+= ${.IMPSRC:T:Mgptldr.S:C/^.+$/-no-integrated-as/} -.endif - LDFLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. @@ -79,3 +74,7 @@ machine: .endif .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.gptldr.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- stable/9/sys/boot/i386/gptzfsboot/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/boot/i386/gptzfsboot/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -34,11 +34,6 @@ CFLAGS= -DBOOTPROG=\"gptzfsboot\" \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Winline --param max-inline-insns-single=100 -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+= ${.IMPSRC:T:Mgptldr.S:C/^.+$/-no-integrated-as/} -.endif - LDFLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. @@ -77,3 +72,7 @@ machine: .endif .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.gptldr.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/sys/boot/i386/libi386/Makefile ============================================================================== --- stable/9/sys/boot/i386/libi386/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/boot/i386/libi386/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -54,11 +54,6 @@ CFLAGS+= -I${.CURDIR}/../../common -I${. # the location of libstand CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+= ${.IMPSRC:T:Mamd64_tramp.S:C/^.+$/-no-integrated-as/} -.endif - .if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine machine: @@ -67,6 +62,10 @@ machine: .include +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.amd64_tramp.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} + .if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine .endif Modified: stable/9/sys/boot/i386/pxeldr/Makefile ============================================================================== --- stable/9/sys/boot/i386/pxeldr/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/boot/i386/pxeldr/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -23,11 +23,6 @@ CFLAGS+=-DPROBE_KEYBOARD CFLAGS+=-DALWAYS_SERIAL .endif -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+=${.IMPSRC:T:Mpxeldr.S:C/^.+$/-no-integrated-as/} -.endif - LOADERBIN= ${.OBJDIR}/../loader/loader.bin CLEANFILES+= ${BOOT}.tmp @@ -46,3 +41,7 @@ ${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXK -b ${BTXKERN} ${LOADERBIN} .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.pxeldr.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/sys/boot/i386/zfsboot/Makefile ============================================================================== --- stable/9/sys/boot/i386/zfsboot/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/boot/i386/zfsboot/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -31,11 +31,6 @@ CFLAGS= -DBOOTPROG=\"zfsboot\" \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Winline --param max-inline-insns-single=100 -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+= ${.IMPSRC:T:Mzfsldr.S:C/^.+$/-no-integrated-as/} -.endif - LDFLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. @@ -90,3 +85,7 @@ machine: .endif .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.zfsldr.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/sys/boot/pc98/btx/btx/Makefile ============================================================================== --- stable/9/sys/boot/pc98/btx/btx/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/boot/pc98/btx/btx/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -13,11 +13,6 @@ BOOT_BTX_FLAGS=0x0 CFLAGS+=-DBTX_FLAGS=${BOOT_BTX_FLAGS} -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+=${.IMPSRC:T:Mbtx.S:C/^.+$/-no-integrated-as/} -.endif - .if defined(BTX_SERIAL) BOOT_COMCONSOLE_PORT?= 0x238 BOOT_COMCONSOLE_SPEED?= 9600 @@ -32,3 +27,7 @@ ORG= 0x9000 LDFLAGS=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.btx.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/sys/boot/pc98/btx/btxldr/Makefile ============================================================================== --- stable/9/sys/boot/pc98/btx/btxldr/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/boot/pc98/btx/btxldr/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -11,11 +11,10 @@ CFLAGS+=-DLOADER_ADDRESS=${LOADER_ADDRES CFLAGS+=-DBTXLDR_VERBOSE .endif -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+=${.IMPSRC:T:Mbtxldr.S:C/^.+$/-no-integrated-as/} -.endif - LDFLAGS=-e start -Ttext ${LOADER_ADDRESS} -Wl,-N,-S,--oformat,binary .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.btxldr.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/sys/conf/Makefile.amd64 ============================================================================== --- stable/9/sys/conf/Makefile.amd64 Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/conf/Makefile.amd64 Tue Mar 13 18:39:57 2012 (r232930) @@ -40,13 +40,12 @@ CFLAGS+= -fno-omit-frame-pointer MKMODULESENV+= MACHINE=amd64 -.if ${CC:T:Mclang} == "clang" # XXX: clang integrated-as doesn't grok .codeNN directives yet -ASM_CFLAGS+= ${.IMPSRC:T:Macpi_wakecode.S:C/^.+$/-no-integrated-as/} -ASM_CFLAGS+= ${.IMPSRC:T:Mia32_sigtramp.S:C/^.+$/-no-integrated-as/} -ASM_CFLAGS+= ${.IMPSRC:T:Mlinux32_locore.s:C/^.+$/-no-integrated-as/} -ASM_CFLAGS+= ${.IMPSRC:T:Mmpboot.S:C/^.+$/-no-integrated-as/} -.endif +ASM_CFLAGS.acpi_wakecode.S= ${CLANG_NO_IAS} +ASM_CFLAGS.ia32_sigtramp.S= ${CLANG_NO_IAS} +ASM_CFLAGS.linux32_locore.s= ${CLANG_NO_IAS} +ASM_CFLAGS.mpboot.S= ${CLANG_NO_IAS} +ASM_CFLAGS+= ${ASM_CFLAGS.${.IMPSRC:T}} %BEFORE_DEPEND Modified: stable/9/sys/conf/Makefile.i386 ============================================================================== --- stable/9/sys/conf/Makefile.i386 Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/conf/Makefile.i386 Tue Mar 13 18:39:57 2012 (r232930) @@ -34,11 +34,10 @@ MACHINE=i386 MKMODULESENV+= MACHINE=${MACHINE} -.if ${CC:T:Mclang} == "clang" # XXX: clang integrated-as doesn't grok .codeNN directives yet -ASM_CFLAGS+= ${.IMPSRC:T:Macpi_wakecode.S:C/^.+$/-no-integrated-as/} -ASM_CFLAGS+= ${.IMPSRC:T:Mmpboot.s:C/^.+$/-no-integrated-as/} -.endif +ASM_CFLAGS.acpi_wakecode.S= ${CLANG_NO_IAS} +ASM_CFLAGS.mpboot.s= ${CLANG_NO_IAS} +ASM_CFLAGS+= ${ASM_CFLAGS.${.IMPSRC:T}} %BEFORE_DEPEND Modified: stable/9/sys/conf/kern.pre.mk ============================================================================== --- stable/9/sys/conf/kern.pre.mk Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/conf/kern.pre.mk Tue Mar 13 18:39:57 2012 (r232930) @@ -101,6 +101,10 @@ WERROR?= -Werror # XXX LOCORE means "don't declare C stuff" not "for locore.s". ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} +.if ${CC:T:Mclang} == "clang" +CLANG_NO_IAS= -no-integrated-as +.endif + .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 CFLAGS+= -DGPROF -falign-functions=16 .if ${PROFLEVEL} >= 2 Modified: stable/9/sys/modules/bios/smapi/Makefile ============================================================================== --- stable/9/sys/modules/bios/smapi/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/modules/bios/smapi/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -7,9 +7,9 @@ KMOD= smapi SRCS= smapi.c smapi_bios.S \ bus_if.h device_if.h WERROR= -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok 16-bit assembly yet -CFLAGS+= ${.IMPSRC:T:Msmapi_bios.S:C/^.+$/-no-integrated-as/} -.endif .include + +# XXX: clang integrated-as doesn't grok 16-bit assembly yet +CFLAGS.smapi_bios.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/sys/modules/linux/Makefile ============================================================================== --- stable/9/sys/modules/linux/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/sys/modules/linux/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -5,11 +5,6 @@ SFX= 32 CFLAGS+=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32 .endif -.if ${CC:T:Mclang} == "clang" -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+= ${.IMPSRC:T:Mlinux32_locore.s:C/^.+$/-no-integrated-as/} -.endif - .PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_CPUARCH}/linux${SFX} KMOD= linux @@ -69,3 +64,7 @@ CFLAGS+= -DKTR .endif .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.linux32_locore.s= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} Modified: stable/9/usr.bin/netstat/Makefile ============================================================================== --- stable/9/usr.bin/netstat/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/usr.bin/netstat/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -8,11 +8,9 @@ SRCS= if.c inet.c main.c mbuf.c mroute.c unix.c atalk.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c WARNS?= 3 -.if ${CC:T:Mclang} == "clang" # XXX: Work around a clang false positive with format string warnings # and ntohs macros (see LLVM PR 11313). -NO_WFORMAT= -.endif +NO_WFORMAT.clang= CFLAGS+=-fno-strict-aliasing CFLAGS+=-DIPSEC Modified: stable/9/usr.bin/vacation/Makefile ============================================================================== --- stable/9/usr.bin/vacation/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/usr.bin/vacation/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -11,12 +11,10 @@ CFLAGS+=-D_FFR_LISTDB -D_FFR_DEBUG WARNS?= 2 -.if ${CC:T:Mclang} == "clang" # Unfortunately, clang gives warnings about sendmail code that cannot # be turned off yet. Since this is contrib code, and we don't really # care about the warnings, just make them non-fatal for now. -NO_WERROR= -.endif +NO_WERROR.clang= LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a Modified: stable/9/usr.sbin/sendmail/Makefile ============================================================================== --- stable/9/usr.sbin/sendmail/Makefile Tue Mar 13 17:32:55 2012 (r232929) +++ stable/9/usr.sbin/sendmail/Makefile Tue Mar 13 18:39:57 2012 (r232930) @@ -45,12 +45,10 @@ CFLAGS+= -DNETINET6 WARNS?= 1 -.if ${CC:T:Mclang} == "clang" # Unfortunately, clang gives warnings about sendmail code that cannot # be turned off yet. Since this is contrib code, and we don't really # care about the warnings, just make them non-fatal for now. -NO_WERROR= -.endif +NO_WERROR.clang= DPADD= ${LIBUTIL} ${LIBWRAP} LDADD= -lutil -lwrap From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 18:53:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6989106564A; Tue, 13 Mar 2012 18:53:28 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 961138FC0C; Tue, 13 Mar 2012 18:53:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DIrSbJ057657; Tue, 13 Mar 2012 18:53:28 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DIrSj2057655; Tue, 13 Mar 2012 18:53:28 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203131853.q2DIrSj2057655@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Mar 2012 18:53: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: r232931 - head/include/xlocale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 18:53:28 -0000 Author: theraven Date: Tue Mar 13 18:53:28 2012 New Revision: 232931 URL: http://svn.freebsd.org/changeset/base/232931 Log: And remove the duplicate inlines... Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h ============================================================================== --- head/include/xlocale/_ctype.h Tue Mar 13 18:39:57 2012 (r232930) +++ head/include/xlocale/_ctype.h Tue Mar 13 18:53:28 2012 (r232931) @@ -70,7 +70,7 @@ _RuneLocale *__runes_for_locale(locale_t #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); _XLOCALE_INLINE int @@ -82,7 +82,7 @@ __maskrune_l(__ct_rune_t __c, unsigned l runes->__runetype[__c] & __f; } -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { return (!!__maskrune_l(__c, __f, __loc)); From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 18:59:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4154106566C; Tue, 13 Mar 2012 18:59:19 +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 939A58FC1D; Tue, 13 Mar 2012 18:59:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DIxJNG057962; Tue, 13 Mar 2012 18:59:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DIxJwB057959; Tue, 13 Mar 2012 18:59:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201203131859.q2DIxJwB057959@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Mar 2012 18:59: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: r232932 - head/lib/csu/powerpc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 18:59:19 -0000 Author: nwhitehorn Date: Tue Mar 13 18:59:19 2012 New Revision: 232932 URL: http://svn.freebsd.org/changeset/base/232932 Log: Work around a binutils bug on powerpc64 where the TOC would not be properly reloaded when calling _fini() in large binaries with multiple TOC sections (e.g. GCC), leading to a segmentation fault. Adding -mlongcall to crt1 flags causes the compiler to emit explicit TOC load instructions for all function calls, including _fini(). Reviewed by: kib Pointy hat to: kib Modified: head/lib/csu/powerpc64/Makefile Modified: head/lib/csu/powerpc64/Makefile ============================================================================== --- head/lib/csu/powerpc64/Makefile Tue Mar 13 18:53:28 2012 (r232931) +++ head/lib/csu/powerpc64/Makefile Tue Mar 13 18:59:19 2012 (r232932) @@ -6,7 +6,8 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include + -I${.CURDIR}/../../libc/include \ + -mlongcall all: ${OBJS} From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 19:18:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03D6E1065675; Tue, 13 Mar 2012 19:18:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE3D78FC1B; Tue, 13 Mar 2012 19:18:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DJIYxY058649; Tue, 13 Mar 2012 19:18:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DJIYBA058647; Tue, 13 Mar 2012 19:18:34 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203131918.q2DJIYBA058647@svn.freebsd.org> From: Dimitry Andric Date: Tue, 13 Mar 2012 19:18: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: r232933 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 19:18:35 -0000 Author: dim Date: Tue Mar 13 19:18:34 2012 New Revision: 232933 URL: http://svn.freebsd.org/changeset/base/232933 Log: Update comments and CFLAGS in sys/conf/kern.mk, introduced in r221879, to match reality: clang does _not_ disable SSE automatically when -mno-mmx is used, you have to specify -mno-sse explicitly. Note this was the case even before r232894, which only makes a change in the 'positive' flag case; e.g. when you specify -msse, MMX gets enabled too. MFC after: 1 week Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Mar 13 18:59:19 2012 (r232932) +++ head/sys/conf/kern.mk Tue Mar 13 19:18:34 2012 (r232933) @@ -46,16 +46,16 @@ CWARNEXTRA?= -Wno-error-tautological-com # Setting -mno-sse implies -mno-sse2, -mno-sse3 and -mno-ssse3 # # clang: -# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2, -# -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 +# Setting -mno-mmx implies -mno-3dnow and -mno-3dnowa +# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 # .if ${MACHINE_CPUARCH} == "i386" .if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" -CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse +CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 .else CFLAGS+= -mno-aes -mno-avx .endif -CFLAGS+= -mno-mmx -msoft-float +CFLAGS+= -mno-mmx -mno-sse -msoft-float INLINE_LIMIT?= 8000 .endif @@ -93,17 +93,15 @@ INLINE_LIMIT?= 15000 # Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3 and -mfpmath=387 # # clang: -# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2, -# -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 +# Setting -mno-mmx implies -mno-3dnow and -mno-3dnowa +# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 # (-mfpmath= is not supported) # .if ${MACHINE_CPUARCH} == "amd64" -.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" -CFLAGS+= -mno-sse -.else +.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" CFLAGS+= -mno-aes -mno-avx .endif -CFLAGS+= -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \ +CFLAGS+= -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float \ -fno-asynchronous-unwind-tables INLINE_LIMIT?= 8000 .endif From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 19:21:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62C40106564A; Tue, 13 Mar 2012 19:21:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2218C8FC19; Tue, 13 Mar 2012 19:21:28 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:49c2:80d2:e8ab:50b4] (unknown [IPv6:2001:7b8:3a7:0:49c2:80d2:e8ab:50b4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 63CB85C37; Tue, 13 Mar 2012 20:21:27 +0100 (CET) Message-ID: <4F5F9E35.5030602@FreeBSD.org> Date: Tue, 13 Mar 2012 20:21:25 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120229 Thunderbird/11.0 MIME-Version: 1.0 To: Alexander Best References: <201203122107.q2CL7MYo086974@svn.freebsd.org> <20120313021545.GA61307@freebsd.org> In-Reply-To: <20120313021545.GA61307@freebsd.org> X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232894 - head/contrib/llvm/tools/clang/lib/Basic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 19:21:28 -0000 On 2012-03-13 03:15, Alexander Best wrote: > On Mon Mar 12 12, Dimitry Andric wrote: >> Author: dim >> Date: Mon Mar 12 21:07:22 2012 >> New Revision: 232894 >> URL: http://svn.freebsd.org/changeset/base/232894 >> >> Log: >> Pull in r145194 from upstream clang trunk: >> >> Make our handling of MMX x SSE closer to what gcc does: >> >> * Enabling sse enables mmx. >> * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already). >> * The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse. > > are you sure that sys/conf/kern.mk doesn't need updating after this commit? if > now setting -mno-mmx doesn't imply -mno-sse, i think the i386 and amd64 > sections in kern.mk needs to be updated (along with the comments). Setting -mno-mmx never implied -mno-sse, even before r232894. I have updated the comments and CFLAGS in r232933. Note that clang's default arch setting on 32-bit x86 is i486, so it would not have been using SSE anyway. That is, unless people set CPUTYPE to anything that does support it. :) From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 19:40:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B012106564A; Tue, 13 Mar 2012 19:40:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A7DF8FC08; Tue, 13 Mar 2012 19:40:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DJeuKs059412; Tue, 13 Mar 2012 19:40:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DJeu8u059410; Tue, 13 Mar 2012 19:40:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203131940.q2DJeu8u059410@svn.freebsd.org> From: Dimitry Andric Date: Tue, 13 Mar 2012 19: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: r232934 - head/contrib/gdb/gdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 19:40:57 -0000 Author: dim Date: Tue Mar 13 19:40:56 2012 New Revision: 232934 URL: http://svn.freebsd.org/changeset/base/232934 Log: Pull in a fix (still under GPLv2) for a double free in gdb, leading to an assert, which can occur if you repeatedly dlopen() and dlclose() a .so file in a tight loop. This was reported on freebsd-current@ by Alexandre Martins, with a sample to reproduce the behaviour. Obtained from: http://sourceware.org/git/?p=gdb.git;a=commit;h=a6f2cbb341520f8e100f4b8305979dd6207a79e8 Modified: head/contrib/gdb/gdb/target.c Modified: head/contrib/gdb/gdb/target.c ============================================================================== --- head/contrib/gdb/gdb/target.c Tue Mar 13 19:18:34 2012 (r232933) +++ head/contrib/gdb/gdb/target.c Tue Mar 13 19:40:56 2012 (r232934) @@ -1425,6 +1425,13 @@ target_resize_to_sections (struct target (*t)->to_sections_end = target->to_sections_end; } } + /* There is a flattened view of the target stack in current_target, + so its to_sections pointer might also need updating. */ + if (current_target.to_sections == old_value) + { + current_target.to_sections = target->to_sections; + current_target.to_sections_end = target->to_sections_end; + } } return old_count; From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:02:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80628106567A; Tue, 13 Mar 2012 20:02:42 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 658A58FC14; Tue, 13 Mar 2012 20:02:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DK2gdv060224; Tue, 13 Mar 2012 20:02:42 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DK2g0K060213; Tue, 13 Mar 2012 20:02:42 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203132002.q2DK2g0K060213@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Mar 2012 20:02: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: r232935 - head/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:02:42 -0000 Author: theraven Date: Tue Mar 13 20:02:41 2012 New Revision: 232935 URL: http://svn.freebsd.org/changeset/base/232935 Log: First set of xlocale man pages. More to follow... Approved by: dim (mentor) Added: head/lib/libc/locale/ctype_l.3 - copied, changed from r232600, head/lib/libc/locale/ctype.3 Modified: head/lib/libc/locale/Makefile.inc head/lib/libc/locale/btowc.3 head/lib/libc/locale/ctype.3 head/lib/libc/locale/digittoint.3 head/lib/libc/locale/isalnum.3 head/lib/libc/locale/isalpha.3 head/lib/libc/locale/isblank.3 head/lib/libc/locale/iscntrl.3 head/lib/libc/locale/isdigit.3 Modified: head/lib/libc/locale/Makefile.inc ============================================================================== --- head/lib/libc/locale/Makefile.inc Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/Makefile.inc Tue Mar 13 20:02:41 2012 (r232935) @@ -26,6 +26,7 @@ SRCS+= ascii.c big5.c btowc.c collate.c SYM_MAPS+=${.CURDIR}/locale/Symbol.map MAN+= btowc.3 \ + ctype_l.3 \ ctype.3 digittoint.3 isalnum.3 isalpha.3 isascii.3 isblank.3 iscntrl.3 \ isdigit.3 isgraph.3 isideogram.3 islower.3 isphonogram.3 isprint.3 \ ispunct.3 isrune.3 isspace.3 isspecial.3 \ Modified: head/lib/libc/locale/btowc.3 ============================================================================== --- head/lib/libc/locale/btowc.3 Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/btowc.3 Tue Mar 13 20:02:41 2012 (r232935) @@ -39,6 +39,12 @@ .Fn btowc "int c" .Ft int .Fn wctob "wint_t c" +.In wchar.h +.In xlocale.h +.Ft wint_t +.Fn btowc "int c" +.Ft int +.Fn wctob "wint_t c" .Sh DESCRIPTION The .Fn btowc @@ -59,6 +65,9 @@ or not able to be represented as a singl .Fn wctob returns .Dv EOF . +.Pp +The _l-suffixed versions take an explicit locale argument, while the +non-suffixed versions use the current global or per-thread locale. .Sh SEE ALSO .Xr mbrtowc 3 , .Xr multibyte 3 , Modified: head/lib/libc/locale/ctype.3 ============================================================================== --- head/lib/libc/locale/ctype.3 Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/ctype.3 Tue Mar 13 20:02:41 2012 (r232935) @@ -55,7 +55,7 @@ .Nm toascii , .Nm tolower , .Nm toupper -.Nd character classification macros +.Nd character classification functions .Sh LIBRARY .Lb libc .Sh SYNOPSIS Copied and modified: head/lib/libc/locale/ctype_l.3 (from r232600, head/lib/libc/locale/ctype.3) ============================================================================== --- head/lib/libc/locale/ctype.3 Tue Mar 6 12:20:37 2012 (r232600, copy source) +++ head/lib/libc/locale/ctype_l.3 Tue Mar 13 20:02:41 2012 (r232935) @@ -1,5 +1,8 @@ -.\" Copyright (c) 1991, 1993 -.\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by David Chisnall 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 @@ -9,9 +12,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 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 @@ -25,89 +25,88 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)ctype.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 30, 2004 -.Dt CTYPE 3 +.Dd March 6, 2012 +.Dt CTYPE_L 3 .Os .Sh NAME -.Nm digittoint , -.Nm isalnum , -.Nm isalpha , -.Nm isascii , -.Nm isblank , -.Nm iscntrl , -.Nm isdigit , -.Nm isgraph , -.Nm ishexnumber , -.Nm isideogram , -.Nm islower , -.Nm isnumber , -.Nm isphonogram , -.Nm isprint , -.Nm ispunct , -.Nm isrune , -.Nm isspace , -.Nm isspecial , -.Nm isupper , -.Nm isxdigit , -.Nm toascii , -.Nm tolower , -.Nm toupper -.Nd character classification macros +.Nm digittoint_l , +.Nm isalnum_l , +.Nm isalpha_l , +.Nm isascii_l , +.Nm isblank_l , +.Nm iscntrl_l , +.Nm isdigit_l , +.Nm isgraph_l , +.Nm ishexnumber_l , +.Nm isideogram_l , +.Nm islower_l , +.Nm isnumber_l , +.Nm isphonogram_l , +.Nm isprint_l , +.Nm ispunct_l , +.Nm isrune_l , +.Nm isspace_l , +.Nm isspecial_l , +.Nm isupper_l , +.Nm isxdigit_l , +.Nm tolower_l , +.Nm toupper_l +.Nd character classification functions .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In ctype.h .Ft int -.Fn digittoint "int c" -.Ft int -.Fn isalnum "int c" +.Fn digittoint_l "int c" "locale_t loc" .Ft int -.Fn isalpha "int c" +.Fn isalnum_l "int c" "locale_t loc" .Ft int -.Fn isascii "int c" +.Fn isalpha_l "int c" "locale_t loc" .Ft int -.Fn iscntrl "int c" +.Fn isascii_l "int c" "locale_t loc" .Ft int -.Fn isdigit "int c" +.Fn iscntrl_l "int c" "locale_t loc" .Ft int -.Fn isgraph "int c" +.Fn isdigit_l "int c" "locale_t loc" .Ft int -.Fn ishexnumber "int c" +.Fn isgraph_l "int c" "locale_t loc" .Ft int -.Fn isideogram "int c" +.Fn ishexnumber_l "int c" "locale_t loc" .Ft int -.Fn islower "int c" +.Fn isideogram_l "int c" "locale_t loc" .Ft int -.Fn isnumber "int c" +.Fn islower_l "int c" "locale_t loc" .Ft int -.Fn isphonogram "int c" +.Fn isnumber_l "int c" "locale_t loc" .Ft int -.Fn isspecial "int c" +.Fn isphonogram_l "int c" "locale_t loc" .Ft int -.Fn isprint "int c" +.Fn isspecial_l "int c" "locale_t loc" .Ft int -.Fn ispunct "int c" +.Fn isprint_l "int c" "locale_t loc" .Ft int -.Fn isrune "int c" +.Fn ispunct_l "int c" "locale_t loc" .Ft int -.Fn isspace "int c" +.Fn isrune_l "int c" "locale_t loc" .Ft int -.Fn isupper "int c" +.Fn isspace_l "int c" "locale_t loc" .Ft int -.Fn isxdigit "int c" +.Fn isupper_l "int c" "locale_t loc" .Ft int -.Fn toascii "int c" +.Fn isxdigit_l "int c" "locale_t loc" .Ft int -.Fn tolower "int c" +.Fn tolower_l "int c" "locale_t loc" .Ft int -.Fn toupper "int c" +.Fn toupper_l "int c" "locale_t loc" .Sh DESCRIPTION The above functions perform character tests and conversions on the integer -.Fa c . -They are available as macros, defined in the include file +.Fa c +in the locale +.Fa loc . +They behave in the same way as the versions without the _l suffix, but use the +specified locale rather than the global or per-thread locale. .In ctype.h , or as true functions in the C library. See the specific manual pages for more information. @@ -130,22 +129,10 @@ See the specific manual pages for more i .Xr isspecial 3 , .Xr isupper 3 , .Xr isxdigit 3 , -.Xr toascii 3 , .Xr tolower 3 , .Xr toupper 3 , .Xr wctype 3 , -.Xr ascii 7 +.Xr xlocale 3 .Sh STANDARDS -These functions, except for -.Fn digittoint , -.Fn isascii , -.Fn ishexnumber , -.Fn isideogram , -.Fn isnumber , -.Fn isphonogram , -.Fn isrune , -.Fn isspecial -and -.Fn toascii , -conform to -.St -isoC . +These functions conform to +.St -p1003.1-2008 . Modified: head/lib/libc/locale/digittoint.3 ============================================================================== --- head/lib/libc/locale/digittoint.3 Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/digittoint.3 Tue Mar 13 20:02:41 2012 (r232935) @@ -40,12 +40,20 @@ .In ctype.h .Ft int .Fn digittoint "int c" +.Ft int +.Fn digittoint_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn digittoint function converts a numeric character to its corresponding integer value. The character can be any decimal digit or hexadecimal digit. With hexadecimal characters, the case of the values does not matter. +.Pp +The +.Fn digittoint_l +function takes an explicit locale argument, whereas the +.Fn digittoint +function use the current global or per-thread locale. .Sh RETURN VALUES The .Fn digittoint @@ -56,4 +64,5 @@ the function will return 0. .Sh SEE ALSO .Xr ctype 3 , .Xr isdigit 3 , -.Xr isxdigit 3 +.Xr isxdigit 3, +.Xr xlocale 3 Modified: head/lib/libc/locale/isalnum.3 ============================================================================== --- head/lib/libc/locale/isalnum.3 Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/isalnum.3 Tue Mar 13 20:02:41 2012 (r232935) @@ -44,6 +44,8 @@ .In ctype.h .Ft int .Fn isalnum "int c" +.Ft int +.Fn isalnum_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isalnum @@ -74,6 +76,12 @@ In the ASCII character set, this include .It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" .It "\&171\ ``y'' \t172\ ``z''" .El +.Pp +The +.Fn isalnum_l +function takes an explicit locale argument, whereas the +.Fn isalnum +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isalnum @@ -94,9 +102,14 @@ function should be used instead. .Xr isalpha 3 , .Xr isdigit 3 , .Xr iswalnum 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The .Fn isalnum function conforms to .St -isoC . +The +.Fn isalnum_l +function conforms to +.St -p1003.1-2008 . Modified: head/lib/libc/locale/isalpha.3 ============================================================================== --- head/lib/libc/locale/isalpha.3 Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/isalpha.3 Tue Mar 13 20:02:41 2012 (r232935) @@ -44,6 +44,8 @@ .In ctype.h .Ft int .Fn isalpha "int c" +.Ft int +.Fn isalpha_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isalpha @@ -72,6 +74,11 @@ In the ASCII character set, this include .It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" .It "\&171\ ``y'' \t172\ ``z''" .El +The +.Fn isalpha_l +function takes an explicit locale argument, whereas the +.Fn isalpha +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isalpha @@ -92,9 +99,15 @@ function should be used instead. .Xr islower 3 , .Xr isupper 3 , .Xr iswalpha 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The .Fn isalpha function conforms to .St -isoC . +The +.Fn isalpha_l +function conforms to +.St -p1003.1-2008 . + Modified: head/lib/libc/locale/isblank.3 ============================================================================== --- head/lib/libc/locale/isblank.3 Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/isblank.3 Tue Mar 13 20:02:41 2012 (r232935) @@ -40,6 +40,8 @@ .In ctype.h .Ft int .Fn isblank "int c" +.Ft int +.Fn isblank "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isblank @@ -56,6 +58,12 @@ The value of the argument must be repres .Vt "unsigned char" or the value of .Dv EOF . +.Pp +The +.Fn isblank_l +function takes an explicit locale argument, whereas the +.Fn isblank +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isblank @@ -74,6 +82,7 @@ function should be used instead. .Sh SEE ALSO .Xr ctype 3 , .Xr iswblank 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The @@ -81,3 +90,7 @@ The function conforms to .St -isoC-99 . +The +.Fn isblank_l +function conforms to +.St -p1003.1-2008 . Modified: head/lib/libc/locale/iscntrl.3 ============================================================================== --- head/lib/libc/locale/iscntrl.3 Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/iscntrl.3 Tue Mar 13 20:02:41 2012 (r232935) @@ -44,6 +44,8 @@ .In ctype.h .Ft int .Fn iscntrl "int c" +.Ft int +.Fn iscntrl_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn iscntrl @@ -65,6 +67,12 @@ In the ASCII character set, this include .It "\&031\ EM \t032\ SUB \t033\ ESC \t034\ FS \t035\ GS" .It "\&036\ RS \t037\ US \t177\ DEL" .El +.Pp +The +.Fn iscntrl_l +function takes an explicit locale argument, whereas the +.Fn iscntrl +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn iscntrl @@ -83,9 +91,14 @@ function should be used instead. .Sh SEE ALSO .Xr ctype 3 , .Xr iswcntrl 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The .Fn iscntrl function conforms to .St -isoC . +The +.Fn iscntrl_l +function conforms to +.St -p1003.1-2008 . Modified: head/lib/libc/locale/isdigit.3 ============================================================================== --- head/lib/libc/locale/isdigit.3 Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/isdigit.3 Tue Mar 13 20:02:41 2012 (r232935) @@ -46,6 +46,10 @@ .Fn isdigit "int c" .Ft int .Fn isnumber "int c" +.Ft int +.Fn isdigit_l "int c" "locale_t loc" +.Ft int +.Fn isnumber_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isdigit @@ -68,6 +72,9 @@ The value of the argument must be repres .Vt "unsigned char" or the value of .Dv EOF . +.Pp +The _l-suffixed versions take an explicit locale argument, whereas the +non-suffixed versions use the current global or per-thread locale. .Sh RETURN VALUES The .Fn isdigit @@ -89,12 +96,17 @@ function should be used instead. .Xr ctype 3 , .Xr iswdigit 3 , .Xr multibyte 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The .Fn isdigit function conforms to .St -isoC . +The +.Fn isdigit_l +function conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Fn isnumber From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:27:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF4FD1065676; Tue, 13 Mar 2012 20:27:48 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A55908FC1E; Tue, 13 Mar 2012 20:27:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DKRmKN061158; Tue, 13 Mar 2012 20:27:48 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DKRmAo061155; Tue, 13 Mar 2012 20:27:48 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203132027.q2DKRmAo061155@svn.freebsd.org> From: Adrian Chadd Date: Tue, 13 Mar 2012 20:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232936 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:27:48 -0000 Author: adrian Date: Tue Mar 13 20:27:48 2012 New Revision: 232936 URL: http://svn.freebsd.org/changeset/base/232936 Log: Add module load/unload stubs. Modified: head/sys/kern/subr_acl_nfs4.c head/sys/kern/subr_acl_posix1e.c Modified: head/sys/kern/subr_acl_nfs4.c ============================================================================== --- head/sys/kern/subr_acl_nfs4.c Tue Mar 13 20:02:41 2012 (r232935) +++ head/sys/kern/subr_acl_nfs4.c Tue Mar 13 20:27:48 2012 (r232936) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -1367,3 +1369,46 @@ acl_nfs4_check(const struct acl *aclp, i return (0); } + +#ifdef _KERNEL +static int +acl_nfs4_modload(module_t module, int what, void *arg) +{ + int ret; + + ret = 0; + + switch (what) { + case MOD_LOAD: + case MOD_SHUTDOWN: + break; + + case MOD_QUIESCE: + /* XXX TODO */ + ret = 0; + break; + + case MOD_UNLOAD: + /* XXX TODO */ + ret = 0; + break; + default: + ret = EINVAL; + break; + } + + return (ret); +} + +static moduledata_t acl_nfs4_mod = { + "acl_nfs4", + acl_nfs4_modload, + NULL +}; + +/* + * XXX TODO: which subsystem, order? + */ +DECLARE_MODULE(acl_nfs4, acl_nfs4_mod, SI_SUB_VFS, SI_ORDER_FIRST); +MODULE_VERSION(acl_nfs4, 1); +#endif /* _KERNEL */ Modified: head/sys/kern/subr_acl_posix1e.c ============================================================================== --- head/sys/kern/subr_acl_posix1e.c Tue Mar 13 20:02:41 2012 (r232935) +++ head/sys/kern/subr_acl_posix1e.c Tue Mar 13 20:27:48 2012 (r232936) @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -648,3 +650,42 @@ acl_posix1e_newfilemode(mode_t cmode, st return (mode); } + + +static int +acl_posix1e_modload(module_t mod, int what, void *arg) +{ + int ret; + + ret = 0; + + switch (what) { + case MOD_LOAD: + case MOD_SHUTDOWN: + break; + + case MOD_QUIESCE: + /* XXX TODO */ + ret = 0; + break; + + case MOD_UNLOAD: + /* XXX TODO */ + ret = 0; + break; + default: + ret = EINVAL; + break; + } + + return (ret); +} + +static moduledata_t acl_posix1e_mod = { + "acl_posix1e", + acl_posix1e_modload, + NULL +}; + +DECLARE_MODULE(acl_posix1e, acl_posix1e_mod, SI_SUB_VFS, SI_ORDER_FIRST); +MODULE_VERSION(acl_posix1e, 1); From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:28:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E71B51065673; Tue, 13 Mar 2012 20:28:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D67048FC0C; Tue, 13 Mar 2012 20:28:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DKSgQP061249; Tue, 13 Mar 2012 20:28:42 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DKSgLq061245; Tue, 13 Mar 2012 20:28:42 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203132028.q2DKSgLq061245@svn.freebsd.org> From: Adrian Chadd Date: Tue, 13 Mar 2012 20:28: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: r232937 - in head/sys/modules: . acl_nfs4 acl_posix1e X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:28:43 -0000 Author: adrian Date: Tue Mar 13 20:28:42 2012 New Revision: 232937 URL: http://svn.freebsd.org/changeset/base/232937 Log: Add module building Makefile entries for NFSv4 and POSIX.1e ACL handling. Added: head/sys/modules/acl_nfs4/ head/sys/modules/acl_nfs4/Makefile (contents, props changed) head/sys/modules/acl_posix1e/ head/sys/modules/acl_posix1e/Makefile (contents, props changed) Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Mar 13 20:27:48 2012 (r232936) +++ head/sys/modules/Makefile Tue Mar 13 20:28:42 2012 (r232937) @@ -11,6 +11,8 @@ SUBDIR= ${_3dfx} \ accf_data \ accf_dns \ accf_http \ + acl_nfs4 \ + acl_posix1e \ ${_acpi} \ ae \ ${_aesni} \ Added: head/sys/modules/acl_nfs4/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/acl_nfs4/Makefile Tue Mar 13 20:28:42 2012 (r232937) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +.PATH: ${.CURDIR}/../../kern +KMOD= acl_nfs4 +SRCS= vnode_if.h subr_acl_nfs4.c + +.include Added: head/sys/modules/acl_posix1e/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/acl_posix1e/Makefile Tue Mar 13 20:28:42 2012 (r232937) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +.PATH: ${.CURDIR}/../../kern +KMOD= acl_posix1e +SRCS= vnode_if.h subr_acl_posix1e.c + +.include From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:29:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 301DC1065680; Tue, 13 Mar 2012 20:29:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F2C78FC1D; Tue, 13 Mar 2012 20:29:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DKT4Ww061310; Tue, 13 Mar 2012 20:29:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DKT4L6061308; Tue, 13 Mar 2012 20:29:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203132029.q2DKT4L6061308@svn.freebsd.org> From: Adrian Chadd Date: Tue, 13 Mar 2012 20:29: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: r232938 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:29:05 -0000 Author: adrian Date: Tue Mar 13 20:29:04 2012 New Revision: 232938 URL: http://svn.freebsd.org/changeset/base/232938 Log: Add dependencies onto acl_posix1e and acl_nfs4. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Mar 13 20:28:42 2012 (r232937) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Mar 13 20:29:04 2012 (r232938) @@ -5423,3 +5423,5 @@ static moduledata_t zfs_mod = { DECLARE_MODULE(zfsctrl, zfs_mod, SI_SUB_VFS, SI_ORDER_ANY); MODULE_DEPEND(zfsctrl, opensolaris, 1, 1, 1); MODULE_DEPEND(zfsctrl, krpc, 1, 1, 1); +MODULE_DEPEND(zfsctrl, acl_nfs4, 1, 1, 1); +MODULE_DEPEND(zfsctrl, acl_posix1e, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:29:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9D461065672; Tue, 13 Mar 2012 20:29:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B96DC8FC1A; Tue, 13 Mar 2012 20:29:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DKTuI7061392; Tue, 13 Mar 2012 20:29:56 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DKTuog061390; Tue, 13 Mar 2012 20:29:56 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203132029.q2DKTuog061390@svn.freebsd.org> From: Adrian Chadd Date: Tue, 13 Mar 2012 20:29: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: r232939 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:29:56 -0000 Author: adrian Date: Tue Mar 13 20:29:56 2012 New Revision: 232939 URL: http://svn.freebsd.org/changeset/base/232939 Log: (Re)-make these ACL routines optional. They're only currently used by ZFS and UFS_ACL. They're just wasting space on embedded platforms with neither enabled. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Mar 13 20:29:04 2012 (r232938) +++ head/sys/conf/files Tue Mar 13 20:29:56 2012 (r232939) @@ -2419,8 +2419,8 @@ kern/sched_ule.c optional sched_ule kern/serdev_if.m standard kern/stack_protector.c standard \ compile-with "${NORMAL_C:N-fstack-protector*}" -kern/subr_acl_nfs4.c standard -kern/subr_acl_posix1e.c standard +kern/subr_acl_nfs4.c optional ufs_acl +kern/subr_acl_posix1e.c optional ufs_acl kern/subr_autoconf.c standard kern/subr_blist.c standard kern/subr_bus.c standard From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:30:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A362106566B; Tue, 13 Mar 2012 20:30:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6990C8FC0C; Tue, 13 Mar 2012 20:30:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DKUOkF061461; Tue, 13 Mar 2012 20:30:24 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DKUOiC061458; Tue, 13 Mar 2012 20:30:24 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203132030.q2DKUOiC061458@svn.freebsd.org> From: Adrian Chadd Date: Tue, 13 Mar 2012 20:30: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: r232940 - in head/tools/tools/wtap: vis_map wtap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:30:24 -0000 Author: adrian Date: Tue Mar 13 20:30:23 2012 New Revision: 232940 URL: http://svn.freebsd.org/changeset/base/232940 Log: Add a BINDIR so "make install" works. Modified: head/tools/tools/wtap/vis_map/Makefile head/tools/tools/wtap/wtap/Makefile Modified: head/tools/tools/wtap/vis_map/Makefile ============================================================================== --- head/tools/tools/wtap/vis_map/Makefile Tue Mar 13 20:29:56 2012 (r232939) +++ head/tools/tools/wtap/vis_map/Makefile Tue Mar 13 20:30:23 2012 (r232940) @@ -1,5 +1,6 @@ # $FreeBSD$ +BINDIR?= /usr/local/bin/ PROG= vis_map SRC= vis_map.c NO_MAN= 1 Modified: head/tools/tools/wtap/wtap/Makefile ============================================================================== --- head/tools/tools/wtap/wtap/Makefile Tue Mar 13 20:29:56 2012 (r232939) +++ head/tools/tools/wtap/wtap/Makefile Tue Mar 13 20:30:23 2012 (r232940) @@ -1,5 +1,6 @@ # $FreeBSD$ +BINDIR?= /usr/local/bin PROG= wtap SRC= wtap.c NO_MAN= 1 From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:33:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 766231065674; Tue, 13 Mar 2012 20:33: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 649A68FC12; Tue, 13 Mar 2012 20:33:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DKXGBd061637; Tue, 13 Mar 2012 20:33:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DKXGtm061634; Tue, 13 Mar 2012 20:33:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203132033.q2DKXGtm061634@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Mar 2012 20:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232941 - stable/9/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:33:16 -0000 Author: mav Date: Tue Mar 13 20:33:15 2012 New Revision: 232941 URL: http://svn.freebsd.org/changeset/base/232941 Log: MFC r228846: Use READ CAPACITY(16) to get information about device physical sectors. As soon as not all devices support READ CAPACITY(16), automatically fall back to READ CAPACITY(10) if CAM_REQ_INVALID or SSD_KEY_ILLEGAL_REQUEST status returned. It also provides first bits of information about Logical Block Provisioning (aka UNMAP/TRIM) support by the device. Modified: stable/9/sys/cam/scsi/scsi_all.h stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/9/sys/cam/scsi/scsi_all.h Tue Mar 13 20:30:23 2012 (r232940) +++ stable/9/sys/cam/scsi/scsi_all.h Tue Mar 13 20:33:15 2012 (r232941) @@ -1397,6 +1397,17 @@ struct scsi_read_capacity_data_long { uint8_t addr[8]; uint8_t length[4]; +#define SRC16_PROT_EN 0x01 +#define SRC16_P_TYPE 0x0e + uint8_t prot; +#define SRC16_LBPPBE 0x0f +#define SRC16_PI_EXPONENT 0xf0 +#define SRC16_PI_EXPONENT_SHIFT 4 + uint8_t prot_lbppbe; +#define SRC16_LALBA 0x3fff +#define SRC16_LBPRZ 0x4000 +#define SRC16_LBPME 0x8000 + uint8_t lalba_lbp[2]; }; struct scsi_report_luns Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Tue Mar 13 20:30:23 2012 (r232940) +++ stable/9/sys/cam/scsi/scsi_da.c Tue Mar 13 20:33:15 2012 (r232941) @@ -82,7 +82,9 @@ typedef enum { DA_FLAG_WENT_IDLE = 0x040, DA_FLAG_RETRY_UA = 0x080, DA_FLAG_OPEN = 0x100, - DA_FLAG_SCTX_INIT = 0x200 + DA_FLAG_SCTX_INIT = 0x200, + DA_FLAG_CAN_RC16 = 0x400, + DA_FLAG_CAN_LBPME = 0x800 } da_flags; typedef enum { @@ -1544,6 +1546,14 @@ daregister(struct cam_periph *periph, vo else if (softc->minimum_cmd_size > 12) softc->minimum_cmd_size = 16; + /* Predict whether device may support READ CAPACITY(16). */ + if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3 || + (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC && + (cgd->inq_data.spc3_flags & SPC3_SID_PROTECT))) { + softc->flags |= DA_FLAG_CAN_RC16; + softc->state = DA_STATE_PROBE2; + } + /* * Register this media as a disk. */ @@ -1940,10 +1950,14 @@ dadone(struct cam_periph *periph, union struct disk_params *dp; uint32_t block_size; uint64_t maxsector; + u_int lbppbe; /* LB per physical block exponent. */ + u_int lalba; /* Lowest aligned LBA. */ if (softc->state == DA_STATE_PROBE) { block_size = scsi_4btoul(rdcap->length); maxsector = scsi_4btoul(rdcap->addr); + lbppbe = 0; + lalba = 0; /* * According to SBC-2, if the standard 10 @@ -1963,6 +1977,8 @@ dadone(struct cam_periph *periph, union } else { block_size = scsi_4btoul(rcaplong->length); maxsector = scsi_8btou64(rcaplong->addr); + lbppbe = rcaplong->prot_lbppbe & SRC16_LBPPBE; + lalba = scsi_2btoul(rcaplong->lalba_lbp); } /* @@ -1980,7 +1996,12 @@ dadone(struct cam_periph *periph, union announce_buf[0] = '\0'; cam_periph_invalidate(periph); } else { - dasetgeom(periph, block_size, maxsector, 0, 0); + dasetgeom(periph, block_size, maxsector, + lbppbe, lalba & SRC16_LALBA); + if (lalba & SRC16_LBPME) + softc->flags |= DA_FLAG_CAN_LBPME; + else + softc->flags &= ~DA_FLAG_CAN_LBPME; dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), "%juMB (%ju %u byte sectors: %dH %dS/T " @@ -2047,6 +2068,24 @@ dadone(struct cam_periph *periph, union &ascq, /*show_errors*/ 1); } /* + * If we tried READ CAPACITY(16) and failed, + * fallback to READ CAPACITY(10). + */ + if ((softc->state == DA_STATE_PROBE2) && + (softc->flags & DA_FLAG_CAN_RC16) && + (((csio->ccb_h.status & CAM_STATUS_MASK) == + CAM_REQ_INVALID) || + ((have_sense) && + (error_code == SSD_CURRENT_ERROR) && + (sense_key == SSD_KEY_ILLEGAL_REQUEST)))) { + softc->flags &= ~DA_FLAG_CAN_RC16; + softc->state = DA_STATE_PROBE; + free(rdcap, M_SCSIDA); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } else + /* * Attach to anything that claims to be a * direct access or optical disk device, * as long as it doesn't return a "Logical @@ -2223,13 +2262,18 @@ dagetcapacity(struct cam_periph *periph) struct scsi_read_capacity_data_long *rcaplong; uint32_t block_len; uint64_t maxsector; - int error; + int error, rc16failed; u_int32_t sense_flags; + u_int lbppbe; /* Logical blocks per physical block exponent. */ + u_int lalba; /* Lowest aligned LBA. */ softc = (struct da_softc *)periph->softc; block_len = 0; maxsector = 0; + lbppbe = 0; + lalba = 0; error = 0; + rc16failed = 0; sense_flags = SF_RETRY_UA; if (softc->flags & DA_FLAG_PACK_REMOVABLE) sense_flags |= SF_NO_PRINT; @@ -2237,11 +2281,63 @@ dagetcapacity(struct cam_periph *periph) /* Do a read capacity */ rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcaplong), M_SCSIDA, - M_NOWAIT); + M_NOWAIT | M_ZERO); if (rcap == NULL) return (ENOMEM); - + rcaplong = (struct scsi_read_capacity_data_long *)rcap; + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); + + /* Try READ CAPACITY(16) first if we think it should work. */ + if (softc->flags & DA_FLAG_CAN_RC16) { + scsi_read_capacity_16(&ccb->csio, + /*retries*/ 4, + /*cbfcnp*/ dadone, + /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*lba*/ 0, + /*reladr*/ 0, + /*pmi*/ 0, + rcaplong, + /*sense_len*/ SSD_FULL_SIZE, + /*timeout*/ 60000); + ccb->ccb_h.ccb_bp = NULL; + + error = cam_periph_runccb(ccb, daerror, + /*cam_flags*/CAM_RETRY_SELTO, + sense_flags, + softc->disk->d_devstat); + + if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) + cam_release_devq(ccb->ccb_h.path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + + if (error == 0) + goto rc16ok; + + /* If we got ILLEGAL REQUEST, do not prefer RC16 any more. */ + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == + CAM_REQ_INVALID) { + softc->flags &= ~DA_FLAG_CAN_RC16; + } else if (((ccb->ccb_h.status & CAM_STATUS_MASK) == + CAM_SCSI_STATUS_ERROR) && + (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND) && + (ccb->ccb_h.status & CAM_AUTOSNS_VALID) && + ((ccb->ccb_h.flags & CAM_SENSE_PHYS) == 0) && + ((ccb->ccb_h.flags & CAM_SENSE_PTR) == 0)) { + int sense_key, error_code, asc, ascq; + + scsi_extract_sense(&ccb->csio.sense_data, + &error_code, &sense_key, &asc, &ascq); + if (sense_key == SSD_KEY_ILLEGAL_REQUEST) + softc->flags &= ~DA_FLAG_CAN_RC16; + } + rc16failed = 1; + } + + /* Do READ CAPACITY(10). */ scsi_read_capacity(&ccb->csio, /*retries*/4, /*cbfncp*/dadone, @@ -2267,13 +2363,12 @@ dagetcapacity(struct cam_periph *periph) block_len = scsi_4btoul(rcap->length); maxsector = scsi_4btoul(rcap->addr); - if (maxsector != 0xffffffff) + if (maxsector != 0xffffffff || rc16failed) goto done; } else goto done; - rcaplong = (struct scsi_read_capacity_data_long *)rcap; - + /* If READ CAPACITY(10) returned overflow, use READ CAPACITY(16) */ scsi_read_capacity_16(&ccb->csio, /*retries*/ 4, /*cbfcnp*/ dadone, @@ -2299,8 +2394,11 @@ dagetcapacity(struct cam_periph *periph) /*getcount_only*/0); if (error == 0) { +rc16ok: block_len = scsi_4btoul(rcaplong->length); maxsector = scsi_8btou64(rcaplong->addr); + lbppbe = rcaplong->prot_lbppbe & SRC16_LBPPBE; + lalba = scsi_2btoul(rcaplong->lalba_lbp); } done: @@ -2311,8 +2409,14 @@ done: "unsupportable block size %ju\n", (uintmax_t) block_len); error = EINVAL; - } else - dasetgeom(periph, block_len, maxsector, 0, 0); + } else { + dasetgeom(periph, block_len, maxsector, + lbppbe, lalba & SRC16_LALBA); + if (lalba & SRC16_LBPME) + softc->flags |= DA_FLAG_CAN_LBPME; + else + softc->flags &= ~DA_FLAG_CAN_LBPME; + } } xpt_release_ccb(ccb); From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:34:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 963FA1065672; Tue, 13 Mar 2012 20:34: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 847B78FC1C; Tue, 13 Mar 2012 20:34:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DKYY6u061741; Tue, 13 Mar 2012 20:34:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DKYYt3061738; Tue, 13 Mar 2012 20:34:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203132034.q2DKYYt3061738@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Mar 2012 20:34: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: r232942 - stable/8/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:34:34 -0000 Author: mav Date: Tue Mar 13 20:34:33 2012 New Revision: 232942 URL: http://svn.freebsd.org/changeset/base/232942 Log: MFc r228846: Use READ CAPACITY(16) to get information about device physical sectors. As soon as not all devices support READ CAPACITY(16), automatically fall back to READ CAPACITY(10) if CAM_REQ_INVALID or SSD_KEY_ILLEGAL_REQUEST status returned. It also provides first bits of information about Logical Block Provisioning (aka UNMAP/TRIM) support by the device. Modified: stable/8/sys/cam/scsi/scsi_all.h stable/8/sys/cam/scsi/scsi_da.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/8/sys/cam/scsi/scsi_all.h Tue Mar 13 20:33:15 2012 (r232941) +++ stable/8/sys/cam/scsi/scsi_all.h Tue Mar 13 20:34:33 2012 (r232942) @@ -847,6 +847,17 @@ struct scsi_read_capacity_data_long { uint8_t addr[8]; uint8_t length[4]; +#define SRC16_PROT_EN 0x01 +#define SRC16_P_TYPE 0x0e + uint8_t prot; +#define SRC16_LBPPBE 0x0f +#define SRC16_PI_EXPONENT 0xf0 +#define SRC16_PI_EXPONENT_SHIFT 4 + uint8_t prot_lbppbe; +#define SRC16_LALBA 0x3fff +#define SRC16_LBPRZ 0x4000 +#define SRC16_LBPME 0x8000 + uint8_t lalba_lbp[2]; }; struct scsi_report_luns Modified: stable/8/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/8/sys/cam/scsi/scsi_da.c Tue Mar 13 20:33:15 2012 (r232941) +++ stable/8/sys/cam/scsi/scsi_da.c Tue Mar 13 20:34:33 2012 (r232942) @@ -81,7 +81,9 @@ typedef enum { DA_FLAG_WENT_IDLE = 0x040, DA_FLAG_RETRY_UA = 0x080, DA_FLAG_OPEN = 0x100, - DA_FLAG_SCTX_INIT = 0x200 + DA_FLAG_SCTX_INIT = 0x200, + DA_FLAG_CAN_RC16 = 0x400, + DA_FLAG_CAN_LBPME = 0x800 } da_flags; typedef enum { @@ -1484,6 +1486,14 @@ daregister(struct cam_periph *periph, vo else if (softc->minimum_cmd_size > 12) softc->minimum_cmd_size = 16; + /* Predict whether device may support READ CAPACITY(16). */ + if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3 || + (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC && + (cgd->inq_data.spc3_flags & SPC3_SID_PROTECT))) { + softc->flags |= DA_FLAG_CAN_RC16; + softc->state = DA_STATE_PROBE2; + } + /* * Register this media as a disk. */ @@ -1842,10 +1852,14 @@ dadone(struct cam_periph *periph, union struct disk_params *dp; uint32_t block_size; uint64_t maxsector; + u_int lbppbe; /* LB per physical block exponent. */ + u_int lalba; /* Lowest aligned LBA. */ if (softc->state == DA_STATE_PROBE) { block_size = scsi_4btoul(rdcap->length); maxsector = scsi_4btoul(rdcap->addr); + lbppbe = 0; + lalba = 0; /* * According to SBC-2, if the standard 10 @@ -1865,6 +1879,8 @@ dadone(struct cam_periph *periph, union } else { block_size = scsi_4btoul(rcaplong->length); maxsector = scsi_8btou64(rcaplong->addr); + lbppbe = rcaplong->prot_lbppbe & SRC16_LBPPBE; + lalba = scsi_2btoul(rcaplong->lalba_lbp); } /* @@ -1882,7 +1898,12 @@ dadone(struct cam_periph *periph, union announce_buf[0] = '\0'; cam_periph_invalidate(periph); } else { - dasetgeom(periph, block_size, maxsector, 0, 0); + dasetgeom(periph, block_size, maxsector, + lbppbe, lalba & SRC16_LALBA); + if (lalba & SRC16_LBPME) + softc->flags |= DA_FLAG_CAN_LBPME; + else + softc->flags &= ~DA_FLAG_CAN_LBPME; dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), "%juMB (%ju %u byte sectors: %dH %dS/T " @@ -1948,6 +1969,24 @@ dadone(struct cam_periph *periph, union &asc, &ascq); } /* + * If we tried READ CAPACITY(16) and failed, + * fallback to READ CAPACITY(10). + */ + if ((softc->state == DA_STATE_PROBE2) && + (softc->flags & DA_FLAG_CAN_RC16) && + (((csio->ccb_h.status & CAM_STATUS_MASK) == + CAM_REQ_INVALID) || + ((have_sense) && + (error_code == SSD_CURRENT_ERROR) && + (sense_key == SSD_KEY_ILLEGAL_REQUEST)))) { + softc->flags &= ~DA_FLAG_CAN_RC16; + softc->state = DA_STATE_PROBE; + free(rdcap, M_SCSIDA); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } else + /* * Attach to anything that claims to be a * direct access or optical disk device, * as long as it doesn't return a "Logical @@ -2124,13 +2163,18 @@ dagetcapacity(struct cam_periph *periph) struct scsi_read_capacity_data_long *rcaplong; uint32_t block_len; uint64_t maxsector; - int error; + int error, rc16failed; u_int32_t sense_flags; + u_int lbppbe; /* Logical blocks per physical block exponent. */ + u_int lalba; /* Lowest aligned LBA. */ softc = (struct da_softc *)periph->softc; block_len = 0; maxsector = 0; + lbppbe = 0; + lalba = 0; error = 0; + rc16failed = 0; sense_flags = SF_RETRY_UA; if (softc->flags & DA_FLAG_PACK_REMOVABLE) sense_flags |= SF_NO_PRINT; @@ -2138,11 +2182,63 @@ dagetcapacity(struct cam_periph *periph) /* Do a read capacity */ rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcaplong), M_SCSIDA, - M_NOWAIT); + M_NOWAIT | M_ZERO); if (rcap == NULL) return (ENOMEM); - + rcaplong = (struct scsi_read_capacity_data_long *)rcap; + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); + + /* Try READ CAPACITY(16) first if we think it should work. */ + if (softc->flags & DA_FLAG_CAN_RC16) { + scsi_read_capacity_16(&ccb->csio, + /*retries*/ 4, + /*cbfcnp*/ dadone, + /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*lba*/ 0, + /*reladr*/ 0, + /*pmi*/ 0, + rcaplong, + /*sense_len*/ SSD_FULL_SIZE, + /*timeout*/ 60000); + ccb->ccb_h.ccb_bp = NULL; + + error = cam_periph_runccb(ccb, daerror, + /*cam_flags*/CAM_RETRY_SELTO, + sense_flags, + softc->disk->d_devstat); + + if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) + cam_release_devq(ccb->ccb_h.path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + + if (error == 0) + goto rc16ok; + + /* If we got ILLEGAL REQUEST, do not prefer RC16 any more. */ + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == + CAM_REQ_INVALID) { + softc->flags &= ~DA_FLAG_CAN_RC16; + } else if (((ccb->ccb_h.status & CAM_STATUS_MASK) == + CAM_SCSI_STATUS_ERROR) && + (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND) && + (ccb->ccb_h.status & CAM_AUTOSNS_VALID) && + ((ccb->ccb_h.flags & CAM_SENSE_PHYS) == 0) && + ((ccb->ccb_h.flags & CAM_SENSE_PTR) == 0)) { + int sense_key, error_code, asc, ascq; + + scsi_extract_sense(&ccb->csio.sense_data, + &error_code, &sense_key, &asc, &ascq); + if (sense_key == SSD_KEY_ILLEGAL_REQUEST) + softc->flags &= ~DA_FLAG_CAN_RC16; + } + rc16failed = 1; + } + + /* Do READ CAPACITY(10). */ scsi_read_capacity(&ccb->csio, /*retries*/4, /*cbfncp*/dadone, @@ -2168,13 +2264,12 @@ dagetcapacity(struct cam_periph *periph) block_len = scsi_4btoul(rcap->length); maxsector = scsi_4btoul(rcap->addr); - if (maxsector != 0xffffffff) + if (maxsector != 0xffffffff || rc16failed) goto done; } else goto done; - rcaplong = (struct scsi_read_capacity_data_long *)rcap; - + /* If READ CAPACITY(10) returned overflow, use READ CAPACITY(16) */ scsi_read_capacity_16(&ccb->csio, /*retries*/ 4, /*cbfcnp*/ dadone, @@ -2200,8 +2295,11 @@ dagetcapacity(struct cam_periph *periph) /*getcount_only*/0); if (error == 0) { +rc16ok: block_len = scsi_4btoul(rcaplong->length); maxsector = scsi_8btou64(rcaplong->addr); + lbppbe = rcaplong->prot_lbppbe & SRC16_LBPPBE; + lalba = scsi_2btoul(rcaplong->lalba_lbp); } done: @@ -2212,8 +2310,14 @@ done: "unsupportable block size %ju\n", (uintmax_t) block_len); error = EINVAL; - } else - dasetgeom(periph, block_len, maxsector, 0, 0); + } else { + dasetgeom(periph, block_len, maxsector, + lbppbe, lalba & SRC16_LALBA); + if (lalba & SRC16_LBPME) + softc->flags |= DA_FLAG_CAN_LBPME; + else + softc->flags &= ~DA_FLAG_CAN_LBPME; + } } xpt_release_ccb(ccb); From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:36:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A145106566B; Tue, 13 Mar 2012 20:36:04 +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 07B688FC15; Tue, 13 Mar 2012 20:36:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DKa3Px061852; Tue, 13 Mar 2012 20:36:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DKa3CH061846; Tue, 13 Mar 2012 20:36:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203132036.q2DKa3CH061846@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Mar 2012 20:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232943 - in stable/9/sys/cam: ata scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:36:04 -0000 Author: mav Date: Tue Mar 13 20:36:03 2012 New Revision: 232943 URL: http://svn.freebsd.org/changeset/base/232943 Log: MFc r229288: Remove unneeded checks for CAM_DEV_QFRZN after cam_periph_runccb() call. cam_periph_runccb() since the beginning checks it and releases device queue. After r203108 it even clears CAM_DEV_QFRZN flag after that to avoid double release, so removed code is unreachable now. Modified: stable/9/sys/cam/ata/ata_da.c stable/9/sys/cam/scsi/scsi_da.c stable/9/sys/cam/scsi/scsi_sa.c stable/9/sys/cam/scsi/scsi_ses.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_da.c ============================================================================== --- stable/9/sys/cam/ata/ata_da.c Tue Mar 13 20:34:33 2012 (r232942) +++ stable/9/sys/cam/ata/ata_da.c Tue Mar 13 20:36:03 2012 (r232943) @@ -493,13 +493,6 @@ adaclose(struct disk *dp) if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) xpt_print(periph->path, "Synchronize cache failed\n"); - - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); xpt_release_ccb(ccb); } Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Tue Mar 13 20:34:33 2012 (r232942) +++ stable/9/sys/cam/scsi/scsi_da.c Tue Mar 13 20:36:03 2012 (r232943) @@ -991,13 +991,6 @@ daclose(struct disk *dp) } } - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); - xpt_release_ccb(ccb); } @@ -2306,14 +2299,6 @@ dagetcapacity(struct cam_periph *periph) /*cam_flags*/CAM_RETRY_SELTO, sense_flags, softc->disk->d_devstat); - - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); - if (error == 0) goto rc16ok; @@ -2351,14 +2336,6 @@ dagetcapacity(struct cam_periph *periph) /*cam_flags*/CAM_RETRY_SELTO, sense_flags, softc->disk->d_devstat); - - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); - if (error == 0) { block_len = scsi_4btoul(rcap->length); maxsector = scsi_4btoul(rcap->addr); @@ -2385,14 +2362,6 @@ dagetcapacity(struct cam_periph *periph) /*cam_flags*/CAM_RETRY_SELTO, sense_flags, softc->disk->d_devstat); - - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); - if (error == 0) { rc16ok: block_len = scsi_4btoul(rcaplong->length); Modified: stable/9/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_sa.c Tue Mar 13 20:34:33 2012 (r232942) +++ stable/9/sys/cam/scsi/scsi_sa.c Tue Mar 13 20:36:03 2012 (r232943) @@ -1853,14 +1853,12 @@ samount(struct cam_periph *periph, int o MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); if (error == ENXIO) { softc->flags &= ~SA_FLAG_TAPE_MOUNTED; scsi_test_unit_ready(&ccb->csio, 0, sadone, MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); } else if (error) { /* * We don't need to freeze the tape because we @@ -1882,7 +1880,6 @@ samount(struct cam_periph *periph, int o MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); } if ((softc->flags & SA_FLAG_TAPE_MOUNTED) == 0) { @@ -1905,7 +1902,6 @@ samount(struct cam_periph *periph, int o FALSE, FALSE, 1, SSD_FULL_SIZE, REWIND_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); /* * In case this doesn't work, do a REWIND instead @@ -1915,7 +1911,6 @@ samount(struct cam_periph *periph, int o FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); } if (error) { xpt_release_ccb(ccb); @@ -1945,13 +1940,11 @@ samount(struct cam_periph *periph, int o IO_TIMEOUT); (void) cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); scsi_rewind(&ccb->csio, 1, sadone, MSG_SIMPLE_Q_TAG, FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT); error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO, SF_NO_PRINT | SF_RETRY_UA, softc->device_stats); - QFRLS(ccb); if (error) { xpt_print(periph->path, "unable to rewind after test read\n"); @@ -1969,7 +1962,6 @@ samount(struct cam_periph *periph, int o error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO, SF_NO_PRINT | SF_RETRY_UA, softc->device_stats); - QFRLS(ccb); xpt_release_ccb(ccb); if (error != 0) { @@ -2580,7 +2572,6 @@ retry: error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); status = ccb->ccb_h.status & CAM_STATUS_MASK; @@ -2644,7 +2635,6 @@ retry: error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); if (error != 0) goto sagetparamsexit; @@ -2956,7 +2946,6 @@ retry: error = cam_periph_runccb(ccb, saerror, 0, sense_flags, softc->device_stats); - QFRLS(ccb); if (CAM_DEBUGGED(periph->path, CAM_DEBUG_INFO)) { int idx; @@ -3014,7 +3003,6 @@ retry: ccb->ccb_h.retry_count = 1; cam_periph_runccb(ccb, saerror, 0, sense_flags, softc->device_stats); - QFRLS(ccb); } xpt_release_ccb(ccb); @@ -3072,7 +3060,6 @@ saprevent(struct cam_periph *periph, int SSD_FULL_SIZE, SCSIOP_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, sf, softc->device_stats); - QFRLS(ccb); if (error == 0) { if (action == PR_ALLOW) softc->flags &= ~SA_FLAG_TAPE_LOCKED; @@ -3102,9 +3089,6 @@ sarewind(struct cam_periph *periph) error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); - xpt_release_ccb(ccb); if (error == 0) softc->fileno = softc->blkno = (daddr_t) 0; @@ -3138,9 +3122,6 @@ saspace(struct cam_periph *periph, int c error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); - xpt_release_ccb(ccb); /* @@ -3212,9 +3193,6 @@ sawritefilemarks(struct cam_periph *peri error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); - if (error == 0 && nmarks) { struct sa_softc *softc = (struct sa_softc *)periph->softc; nwm = nmarks - softc->last_ctl_resid; @@ -3265,8 +3243,6 @@ sardpos(struct cam_periph *periph, int h softc->dsreg = MTIO_DSREG_RBSY; error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0); if (error == 0) { if (loc.flags & SA_RPOS_UNCERTAIN) { @@ -3306,8 +3282,6 @@ sasetpos(struct cam_periph *periph, int softc->dsreg = MTIO_DSREG_POS; error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0); xpt_release_ccb(ccb); /* * Note relative file && block number position as now unknown. @@ -3335,8 +3309,6 @@ saretension(struct cam_periph *periph) error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); xpt_release_ccb(ccb); if (error == 0) softc->fileno = softc->blkno = (daddr_t) 0; @@ -3362,7 +3334,6 @@ sareservereleaseunit(struct cam_periph * error = cam_periph_runccb(ccb, saerror, 0, SF_RETRY_UA | SF_NO_PRINT, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - QFRLS(ccb); xpt_release_ccb(ccb); /* @@ -3394,7 +3365,6 @@ saloadunload(struct cam_periph *periph, softc->dsreg = (load)? MTIO_DSREG_LD : MTIO_DSREG_UNL; error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - QFRLS(ccb); xpt_release_ccb(ccb); if (error || load == 0) @@ -3425,8 +3395,6 @@ saerase(struct cam_periph *periph, int l error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); xpt_release_ccb(ccb); return (error); } Modified: stable/9/sys/cam/scsi/scsi_ses.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_ses.c Tue Mar 13 20:34:33 2012 (r232942) +++ stable/9/sys/cam/scsi/scsi_ses.c Tue Mar 13 20:36:03 2012 (r232943) @@ -679,8 +679,6 @@ ses_runcmd(struct ses_softc *ssc, char * bcopy(cdb, ccb->csio.cdb_io.cdb_bytes, cdbl); error = cam_periph_runccb(ccb, seserror, SES_CFLAGS, SES_FLAGS, NULL); - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); if (error) { if (dptr) { *dlenp = dlen; From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:37:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12AF6106566C; Tue, 13 Mar 2012 20:37:09 +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 004E68FC1A; Tue, 13 Mar 2012 20:37:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DKb8fI061958; Tue, 13 Mar 2012 20:37:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DKb8HR061953; Tue, 13 Mar 2012 20:37:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203132037.q2DKb8HR061953@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Mar 2012 20:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232944 - in stable/8/sys/cam: ata scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:37:09 -0000 Author: mav Date: Tue Mar 13 20:37:08 2012 New Revision: 232944 URL: http://svn.freebsd.org/changeset/base/232944 Log: MFC r229288: Remove unneeded checks for CAM_DEV_QFRZN after cam_periph_runccb() call. cam_periph_runccb() since the beginning checks it and releases device queue. After r203108 it even clears CAM_DEV_QFRZN flag after that to avoid double release, so removed code is unreachable now. Modified: stable/8/sys/cam/ata/ata_da.c stable/8/sys/cam/scsi/scsi_da.c stable/8/sys/cam/scsi/scsi_sa.c stable/8/sys/cam/scsi/scsi_ses.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Tue Mar 13 20:36:03 2012 (r232943) +++ stable/8/sys/cam/ata/ata_da.c Tue Mar 13 20:37:08 2012 (r232944) @@ -469,13 +469,6 @@ adaclose(struct disk *dp) if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) xpt_print(periph->path, "Synchronize cache failed\n"); - - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); xpt_release_ccb(ccb); } Modified: stable/8/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/8/sys/cam/scsi/scsi_da.c Tue Mar 13 20:36:03 2012 (r232943) +++ stable/8/sys/cam/scsi/scsi_da.c Tue Mar 13 20:37:08 2012 (r232944) @@ -988,13 +988,6 @@ daclose(struct disk *dp) } } - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); - xpt_release_ccb(ccb); } @@ -2207,14 +2200,6 @@ dagetcapacity(struct cam_periph *periph) /*cam_flags*/CAM_RETRY_SELTO, sense_flags, softc->disk->d_devstat); - - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); - if (error == 0) goto rc16ok; @@ -2252,14 +2237,6 @@ dagetcapacity(struct cam_periph *periph) /*cam_flags*/CAM_RETRY_SELTO, sense_flags, softc->disk->d_devstat); - - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); - if (error == 0) { block_len = scsi_4btoul(rcap->length); maxsector = scsi_4btoul(rcap->addr); @@ -2286,14 +2263,6 @@ dagetcapacity(struct cam_periph *periph) /*cam_flags*/CAM_RETRY_SELTO, sense_flags, softc->disk->d_devstat); - - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); - if (error == 0) { rc16ok: block_len = scsi_4btoul(rcaplong->length); Modified: stable/8/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/8/sys/cam/scsi/scsi_sa.c Tue Mar 13 20:36:03 2012 (r232943) +++ stable/8/sys/cam/scsi/scsi_sa.c Tue Mar 13 20:37:08 2012 (r232944) @@ -1848,14 +1848,12 @@ samount(struct cam_periph *periph, int o MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); if (error == ENXIO) { softc->flags &= ~SA_FLAG_TAPE_MOUNTED; scsi_test_unit_ready(&ccb->csio, 0, sadone, MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); } else if (error) { /* * We don't need to freeze the tape because we @@ -1877,7 +1875,6 @@ samount(struct cam_periph *periph, int o MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); } if ((softc->flags & SA_FLAG_TAPE_MOUNTED) == 0) { @@ -1900,7 +1897,6 @@ samount(struct cam_periph *periph, int o FALSE, FALSE, 1, SSD_FULL_SIZE, REWIND_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); /* * In case this doesn't work, do a REWIND instead @@ -1910,7 +1906,6 @@ samount(struct cam_periph *periph, int o FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); } if (error) { xpt_release_ccb(ccb); @@ -1940,13 +1935,11 @@ samount(struct cam_periph *periph, int o IO_TIMEOUT); (void) cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); scsi_rewind(&ccb->csio, 1, sadone, MSG_SIMPLE_Q_TAG, FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT); error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO, SF_NO_PRINT | SF_RETRY_UA, softc->device_stats); - QFRLS(ccb); if (error) { xpt_print(periph->path, "unable to rewind after test read\n"); @@ -1964,7 +1957,6 @@ samount(struct cam_periph *periph, int o error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO, SF_NO_PRINT | SF_RETRY_UA, softc->device_stats); - QFRLS(ccb); xpt_release_ccb(ccb); if (error != 0) { @@ -2563,7 +2555,6 @@ retry: error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); status = ccb->ccb_h.status & CAM_STATUS_MASK; @@ -2627,7 +2618,6 @@ retry: error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, softc->device_stats); - QFRLS(ccb); if (error != 0) goto sagetparamsexit; @@ -2939,7 +2929,6 @@ retry: error = cam_periph_runccb(ccb, saerror, 0, sense_flags, softc->device_stats); - QFRLS(ccb); if (CAM_DEBUGGED(periph->path, CAM_DEBUG_INFO)) { int idx; @@ -2997,7 +2986,6 @@ retry: ccb->ccb_h.retry_count = 1; cam_periph_runccb(ccb, saerror, 0, sense_flags, softc->device_stats); - QFRLS(ccb); } xpt_release_ccb(ccb); @@ -3055,7 +3043,6 @@ saprevent(struct cam_periph *periph, int SSD_FULL_SIZE, SCSIOP_TIMEOUT); error = cam_periph_runccb(ccb, saerror, 0, sf, softc->device_stats); - QFRLS(ccb); if (error == 0) { if (action == PR_ALLOW) softc->flags &= ~SA_FLAG_TAPE_LOCKED; @@ -3085,9 +3072,6 @@ sarewind(struct cam_periph *periph) error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); - xpt_release_ccb(ccb); if (error == 0) softc->fileno = softc->blkno = (daddr_t) 0; @@ -3121,9 +3105,6 @@ saspace(struct cam_periph *periph, int c error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); - xpt_release_ccb(ccb); /* @@ -3195,9 +3176,6 @@ sawritefilemarks(struct cam_periph *peri error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); - if (error == 0 && nmarks) { struct sa_softc *softc = (struct sa_softc *)periph->softc; nwm = nmarks - softc->last_ctl_resid; @@ -3248,8 +3226,6 @@ sardpos(struct cam_periph *periph, int h softc->dsreg = MTIO_DSREG_RBSY; error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0); if (error == 0) { if (loc.flags & SA_RPOS_UNCERTAIN) { @@ -3289,8 +3265,6 @@ sasetpos(struct cam_periph *periph, int softc->dsreg = MTIO_DSREG_POS; error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0); xpt_release_ccb(ccb); /* * Note relative file && block number position as now unknown. @@ -3318,8 +3292,6 @@ saretension(struct cam_periph *periph) error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); xpt_release_ccb(ccb); if (error == 0) softc->fileno = softc->blkno = (daddr_t) 0; @@ -3345,7 +3317,6 @@ sareservereleaseunit(struct cam_periph * error = cam_periph_runccb(ccb, saerror, 0, SF_RETRY_UA | SF_NO_PRINT, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - QFRLS(ccb); xpt_release_ccb(ccb); /* @@ -3377,7 +3348,6 @@ saloadunload(struct cam_periph *periph, softc->dsreg = (load)? MTIO_DSREG_LD : MTIO_DSREG_UNL; error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - QFRLS(ccb); xpt_release_ccb(ccb); if (error || load == 0) @@ -3408,8 +3378,6 @@ saerase(struct cam_periph *periph, int l error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats); softc->dsreg = MTIO_DSREG_REST; - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); xpt_release_ccb(ccb); return (error); } Modified: stable/8/sys/cam/scsi/scsi_ses.c ============================================================================== --- stable/8/sys/cam/scsi/scsi_ses.c Tue Mar 13 20:36:03 2012 (r232943) +++ stable/8/sys/cam/scsi/scsi_ses.c Tue Mar 13 20:37:08 2012 (r232944) @@ -679,8 +679,6 @@ ses_runcmd(struct ses_softc *ssc, char * bcopy(cdb, ccb->csio.cdb_io.cdb_bytes, cdbl); error = cam_periph_runccb(ccb, seserror, SES_CFLAGS, SES_FLAGS, NULL); - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE); if (error) { if (dptr) { *dlenp = dlen; From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:37:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA647106564A; Tue, 13 Mar 2012 20:37:58 +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 8F2F28FC1A; Tue, 13 Mar 2012 20:37:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DKbw4F062034; Tue, 13 Mar 2012 20:37:58 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DKbwif062024; Tue, 13 Mar 2012 20:37:58 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201203132037.q2DKbwif062024@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 13 Mar 2012 20:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232945 - in stable/9: share/man/man4 sys/i386/conf sys/netinet sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:37:58 -0000 Author: glebius Date: Tue Mar 13 20:37:57 2012 New Revision: 232945 URL: http://svn.freebsd.org/changeset/base/232945 Log: Merge 231025 from head: Add new socket options: TCP_KEEPINIT, TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT, that allow to control initial timeout, idle time, idle re-send interval and idle send count on a per-socket basis. Reviewed by: andre, bz, lstewart Modified: stable/9/share/man/man4/tcp.4 stable/9/sys/netinet/tcp.h stable/9/sys/netinet/tcp_input.c stable/9/sys/netinet/tcp_syncache.c stable/9/sys/netinet/tcp_timer.c stable/9/sys/netinet/tcp_timer.h stable/9/sys/netinet/tcp_usrreq.c stable/9/sys/netinet/tcp_var.h stable/9/sys/sys/param.h Directory Properties: stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/share/man/man5/ (props changed) stable/9/share/man/man7/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/share/man/man4/tcp.4 ============================================================================== --- stable/9/share/man/man4/tcp.4 Tue Mar 13 20:37:08 2012 (r232944) +++ stable/9/share/man/man4/tcp.4 Tue Mar 13 20:37:57 2012 (r232945) @@ -38,7 +38,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd September 15, 2011 +.Dd February 5, 2012 .Dt TCP 4 .Os .Sh NAME @@ -146,6 +146,65 @@ connection. See .Xr mod_cc 4 for details. +.It Dv TCP_KEEPINIT +This write-only +.Xr setsockopt 2 +option accepts a per-socket timeout argument of +.Vt "u_int" +in seconds, for new, non-established +.Tn TCP +connections. +For the global default in milliseconds see +.Va keepinit +in the +.Sx MIB Variables +section further down. +.It Dv TCP_KEEPIDLE +This write-only +.Xr setsockopt 2 +option accepts an argument of +.Vt "u_int" +for the amount of time, in seconds, that the connection must be idle +before keepalive probes (if enabled) are sent for the connection of this +socket. +If set on a listening socket, the value is inherited by the newly created +socket upon +.Xr accept 2 . +For the global default in milliseconds see +.Va keepidle +in the +.Sx MIB Variables +section further down. +.It Dv TCP_KEEPINTVL +This write-only +.Xr setsockopt 2 +option accepts an argument of +.Vt "u_int" +to set the per-socket interval, in seconds, between keepalive probes sent +to a peer. +If set on a listening socket, the value is inherited by the newly created +socket upon +.Xr accept 2 . +For the global default in milliseconds see +.Va keepintvl +in the +.Sx MIB Variables +section further down. +.It Dv TCP_KEEPCNT +This write-only +.Xr setsockopt 2 +option accepts an argument of +.Vt "u_int" +and allows a per-socket tuning of the number of probes sent, with no response, +before the connection will be dropped. +If set on a listening socket, the value is inherited by the newly created +socket upon +.Xr accept 2 . +For the global default see the +.Va keepcnt +in the +.Sx MIB Variables +section further down. .It Dv TCP_NODELAY Under most circumstances, .Tn TCP @@ -304,17 +363,21 @@ The Maximum Segment Lifetime, in millise Timeout, in milliseconds, for new, non-established .Tn TCP connections. +The default is 75000 msec. .It Va keepidle Amount of time, in milliseconds, that the connection must be idle before keepalive probes (if enabled) are sent. +The default is 7200000 msec (2 hours). .It Va keepintvl The interval, in milliseconds, between keepalive probes sent to remote machines, when no response is received on a .Va keepidle probe. -After -.Dv TCPTV_KEEPCNT -(default 8) probes are sent, with no response, the connection is dropped. +The default is 75000 msec. +.It Va keepcnt +Number of probes sent, with no response, before a connection +is dropped. +The default is 8 packets. .It Va always_keepalive Assume that .Dv SO_KEEPALIVE Modified: stable/9/sys/netinet/tcp.h ============================================================================== --- stable/9/sys/netinet/tcp.h Tue Mar 13 20:37:08 2012 (r232944) +++ stable/9/sys/netinet/tcp.h Tue Mar 13 20:37:57 2012 (r232945) @@ -159,6 +159,10 @@ struct tcphdr { #define TCP_MD5SIG 0x10 /* use MD5 digests (RFC2385) */ #define TCP_INFO 0x20 /* retrieve tcp_info structure */ #define TCP_CONGESTION 0x40 /* get/set congestion control algorithm */ +#define TCP_KEEPINIT 0x80 /* N, time to establish connection */ +#define TCP_KEEPIDLE 0x100 /* L,N,X start keeplives after this period */ +#define TCP_KEEPINTVL 0x200 /* L,N interval between keepalives */ +#define TCP_KEEPCNT 0x400 /* L,N number of keepalives before close */ #define TCP_CA_NAME_MAX 16 /* max congestion control name length */ Modified: stable/9/sys/netinet/tcp_input.c ============================================================================== --- stable/9/sys/netinet/tcp_input.c Tue Mar 13 20:37:08 2012 (r232944) +++ stable/9/sys/netinet/tcp_input.c Tue Mar 13 20:37:57 2012 (r232945) @@ -1477,7 +1477,7 @@ tcp_do_segment(struct mbuf *m, struct tc */ tp->t_rcvtime = ticks; if (TCPS_HAVEESTABLISHED(tp->t_state)) - tcp_timer_activate(tp, TT_KEEP, tcp_keepidle); + tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); /* * Unscale the window into a 32-bit value. @@ -1920,7 +1920,8 @@ tcp_do_segment(struct mbuf *m, struct tc } else { tp->t_state = TCPS_ESTABLISHED; cc_conn_init(tp); - tcp_timer_activate(tp, TT_KEEP, tcp_keepidle); + tcp_timer_activate(tp, TT_KEEP, + TP_KEEPIDLE(tp)); } } else { /* @@ -2324,7 +2325,7 @@ tcp_do_segment(struct mbuf *m, struct tc } else { tp->t_state = TCPS_ESTABLISHED; cc_conn_init(tp); - tcp_timer_activate(tp, TT_KEEP, tcp_keepidle); + tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); } /* * If segment contains data or ACK, will call tcp_reass() @@ -2661,12 +2662,11 @@ process_ACK: * compressed state. */ if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { - int timeout; - soisdisconnected(so); - timeout = (tcp_fast_finwait2_recycle) ? - tcp_finwait2_timeout : tcp_maxidle; - tcp_timer_activate(tp, TT_2MSL, timeout); + tcp_timer_activate(tp, TT_2MSL, + (tcp_fast_finwait2_recycle ? + tcp_finwait2_timeout : + TP_MAXIDLE(tp))); } tp->t_state = TCPS_FIN_WAIT_2; } Modified: stable/9/sys/netinet/tcp_syncache.c ============================================================================== --- stable/9/sys/netinet/tcp_syncache.c Tue Mar 13 20:37:08 2012 (r232944) +++ stable/9/sys/netinet/tcp_syncache.c Tue Mar 13 20:37:57 2012 (r232945) @@ -844,7 +844,15 @@ syncache_socket(struct syncache *sc, str */ if (sc->sc_rxmits > 1) tp->snd_cwnd = tp->t_maxseg; - tcp_timer_activate(tp, TT_KEEP, tcp_keepinit); + + /* + * Copy and activate timers. + */ + tp->t_keepinit = sototcpcb(lso)->t_keepinit; + tp->t_keepidle = sototcpcb(lso)->t_keepidle; + tp->t_keepintvl = sototcpcb(lso)->t_keepintvl; + tp->t_keepcnt = sototcpcb(lso)->t_keepcnt; + tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp)); INP_WUNLOCK(inp); Modified: stable/9/sys/netinet/tcp_timer.c ============================================================================== --- stable/9/sys/netinet/tcp_timer.c Tue Mar 13 20:37:08 2012 (r232944) +++ stable/9/sys/netinet/tcp_timer.c Tue Mar 13 20:37:57 2012 (r232945) @@ -111,12 +111,12 @@ int tcp_finwait2_timeout; SYSCTL_PROC(_net_inet_tcp, OID_AUTO, finwait2_timeout, CTLTYPE_INT|CTLFLAG_RW, &tcp_finwait2_timeout, 0, sysctl_msec_to_ticks, "I", "FIN-WAIT2 timeout"); +int tcp_keepcnt = TCPTV_KEEPCNT; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, keepcnt, CTLFLAG_RW, &tcp_keepcnt, 0, + "Number of keepalive probes to send"); -static int tcp_keepcnt = TCPTV_KEEPCNT; /* max idle probes */ int tcp_maxpersistidle; - /* max idle time in persist */ -int tcp_maxidle; static int per_cpu_timers = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, per_cpu_timers, CTLFLAG_RW, @@ -138,7 +138,6 @@ tcp_slowtimo(void) VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - tcp_maxidle = tcp_keepcnt * tcp_keepintvl; INP_INFO_WLOCK(&V_tcbinfo); (void) tcp_tw_2msl_scan(0); INP_INFO_WUNLOCK(&V_tcbinfo); @@ -255,9 +254,9 @@ tcp_timer_2msl(void *xtp) tp = tcp_close(tp); } else { if (tp->t_state != TCPS_TIME_WAIT && - ticks - tp->t_rcvtime <= tcp_maxidle) - callout_reset_on(&tp->t_timers->tt_2msl, tcp_keepintvl, - tcp_timer_2msl, tp, INP_CPU(inp)); + ticks - tp->t_rcvtime <= TP_MAXIDLE(tp)) + callout_reset_on(&tp->t_timers->tt_2msl, + TP_KEEPINTVL(tp), tcp_timer_2msl, tp, INP_CPU(inp)); else tp = tcp_close(tp); } @@ -318,7 +317,7 @@ tcp_timer_keep(void *xtp) goto dropit; if ((always_keepalive || inp->inp_socket->so_options & SO_KEEPALIVE) && tp->t_state <= TCPS_CLOSING) { - if (ticks - tp->t_rcvtime >= tcp_keepidle + tcp_maxidle) + if (ticks - tp->t_rcvtime >= TP_KEEPIDLE(tp) + TP_MAXIDLE(tp)) goto dropit; /* * Send a packet designed to force a response @@ -340,9 +339,11 @@ tcp_timer_keep(void *xtp) tp->rcv_nxt, tp->snd_una - 1, 0); free(t_template, M_TEMP); } - callout_reset_on(&tp->t_timers->tt_keep, tcp_keepintvl, tcp_timer_keep, tp, INP_CPU(inp)); + callout_reset_on(&tp->t_timers->tt_keep, TP_KEEPINTVL(tp), + tcp_timer_keep, tp, INP_CPU(inp)); } else - callout_reset_on(&tp->t_timers->tt_keep, tcp_keepidle, tcp_timer_keep, tp, INP_CPU(inp)); + callout_reset_on(&tp->t_timers->tt_keep, TP_KEEPIDLE(tp), + tcp_timer_keep, tp, INP_CPU(inp)); #ifdef TCPDEBUG if (inp->inp_socket->so_options & SO_DEBUG) Modified: stable/9/sys/netinet/tcp_timer.h ============================================================================== --- stable/9/sys/netinet/tcp_timer.h Tue Mar 13 20:37:08 2012 (r232944) +++ stable/9/sys/netinet/tcp_timer.h Tue Mar 13 20:37:57 2012 (r232945) @@ -153,10 +153,16 @@ struct tcp_timer { #define TT_KEEP 0x08 #define TT_2MSL 0x10 +#define TP_KEEPINIT(tp) ((tp)->t_keepinit ? (tp)->t_keepinit : tcp_keepinit) +#define TP_KEEPIDLE(tp) ((tp)->t_keepidle ? (tp)->t_keepidle : tcp_keepidle) +#define TP_KEEPINTVL(tp) ((tp)->t_keepintvl ? (tp)->t_keepintvl : tcp_keepintvl) +#define TP_KEEPCNT(tp) ((tp)->t_keepcnt ? (tp)->t_keepcnt : tcp_keepcnt) +#define TP_MAXIDLE(tp) (TP_KEEPCNT(tp) * TP_KEEPINTVL(tp)) + extern int tcp_keepinit; /* time to establish connection */ extern int tcp_keepidle; /* time before keepalive probes begin */ extern int tcp_keepintvl; /* time between keepalive probes */ -extern int tcp_maxidle; /* time to drop after starting probes */ +extern int tcp_keepcnt; /* number of keepalives */ extern int tcp_delacktime; /* time before sending a delayed ACK */ extern int tcp_maxpersistidle; extern int tcp_rexmit_min; Modified: stable/9/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/9/sys/netinet/tcp_usrreq.c Tue Mar 13 20:37:08 2012 (r232944) +++ stable/9/sys/netinet/tcp_usrreq.c Tue Mar 13 20:37:57 2012 (r232945) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1118,7 +1119,7 @@ tcp_connect(struct tcpcb *tp, struct soc soisconnecting(so); TCPSTAT_INC(tcps_connattempt); tp->t_state = TCPS_SYN_SENT; - tcp_timer_activate(tp, TT_KEEP, tcp_keepinit); + tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp)); tp->iss = tcp_new_isn(tp); tcp_sendseqinit(tp); @@ -1191,7 +1192,7 @@ tcp6_connect(struct tcpcb *tp, struct so soisconnecting(so); TCPSTAT_INC(tcps_connattempt); tp->t_state = TCPS_SYN_SENT; - tcp_timer_activate(tp, TT_KEEP, tcp_keepinit); + tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp)); tp->iss = tcp_new_isn(tp); tcp_sendseqinit(tp); @@ -1272,6 +1273,7 @@ int tcp_ctloutput(struct socket *so, struct sockopt *sopt) { int error, opt, optval; + u_int ui; struct inpcb *inp; struct tcpcb *tp; struct tcp_info ti; @@ -1439,6 +1441,59 @@ tcp_ctloutput(struct socket *so, struct INP_WUNLOCK(inp); break; + case TCP_KEEPIDLE: + case TCP_KEEPINTVL: + case TCP_KEEPCNT: + case TCP_KEEPINIT: + INP_WUNLOCK(inp); + error = sooptcopyin(sopt, &ui, sizeof(ui), sizeof(ui)); + if (error) + return (error); + + if (ui > (UINT_MAX / hz)) { + error = EINVAL; + break; + } + ui *= hz; + + INP_WLOCK_RECHECK(inp); + switch (sopt->sopt_name) { + case TCP_KEEPIDLE: + tp->t_keepidle = ui; + /* + * XXX: better check current remaining + * timeout and "merge" it with new value. + */ + if ((tp->t_state > TCPS_LISTEN) && + (tp->t_state <= TCPS_CLOSING)) + tcp_timer_activate(tp, TT_KEEP, + TP_KEEPIDLE(tp)); + break; + case TCP_KEEPINTVL: + tp->t_keepintvl = ui; + if ((tp->t_state == TCPS_FIN_WAIT_2) && + (TP_MAXIDLE(tp) > 0)) + tcp_timer_activate(tp, TT_2MSL, + TP_MAXIDLE(tp)); + break; + case TCP_KEEPCNT: + tp->t_keepcnt = ui; + if ((tp->t_state == TCPS_FIN_WAIT_2) && + (TP_MAXIDLE(tp) > 0)) + tcp_timer_activate(tp, TT_2MSL, + TP_MAXIDLE(tp)); + break; + case TCP_KEEPINIT: + tp->t_keepinit = ui; + if (tp->t_state == TCPS_SYN_RECEIVED || + tp->t_state == TCPS_SYN_SENT) + tcp_timer_activate(tp, TT_KEEP, + TP_KEEPINIT(tp)); + break; + } + INP_WUNLOCK(inp); + break; + default: INP_WUNLOCK(inp); error = ENOPROTOOPT; @@ -1648,7 +1703,7 @@ tcp_usrclosed(struct tcpcb *tp) int timeout; timeout = (tcp_fast_finwait2_recycle) ? - tcp_finwait2_timeout : tcp_maxidle; + tcp_finwait2_timeout : TP_MAXIDLE(tp); tcp_timer_activate(tp, TT_2MSL, timeout); } } Modified: stable/9/sys/netinet/tcp_var.h ============================================================================== --- stable/9/sys/netinet/tcp_var.h Tue Mar 13 20:37:08 2012 (r232944) +++ stable/9/sys/netinet/tcp_var.h Tue Mar 13 20:37:57 2012 (r232945) @@ -203,7 +203,12 @@ struct tcpcb { struct cc_var *ccv; /* congestion control specific vars */ struct osd *osd; /* storage for Khelp module data */ - uint32_t t_ispare[12]; /* 4 keep timers, 5 UTO, 3 TBD */ + u_int t_keepinit; /* time to establish connection */ + u_int t_keepidle; /* time before keepalive probes begin */ + u_int t_keepintvl; /* interval between keepalives */ + u_int t_keepcnt; /* number of keepalives before close */ + + uint32_t t_ispare[8]; /* 5 UTO, 3 TBD */ void *t_pspare2[4]; /* 4 TBD */ uint64_t _pad[6]; /* 6 TBD (1-2 CC/RTT?) */ }; Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Tue Mar 13 20:37:08 2012 (r232944) +++ stable/9/sys/sys/param.h Tue Mar 13 20:37:57 2012 (r232945) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900504 /* Master, propagated to newvers */ +#define __FreeBSD_version 900505 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 20:52:18 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C43771065672; Tue, 13 Mar 2012 20:52:18 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id 5CDB78FC27; Tue, 13 Mar 2012 20:52:17 +0000 (UTC) Received: from localhost ([127.0.0.1]) by hq.bluezbox.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1S7YJJ-000HwD-Dj; Tue, 13 Mar 2012 13:27:10 -0700 Message-ID: <4F5FADA3.4070902@freebsd.org> Date: Tue, 13 Mar 2012 13:27:15 -0700 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Marcel Moolenaar References: <201203060342.q263gs7g018067@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 13/03/2012 9:21 AM, Marcel Moolenaar wrote: > > On Mar 5, 2012, at 7:42 PM, Oleksandr Tymoshenko wrote: >> @@ -308, 6 +308, 13 @@ _init_tls() >> } >> } >> >> +#ifdef TLS_VARIANT_I >> + /* >> + * tls_static_space should include space for TLS structure >> + */ >> + tls_static_space += TLS_TCB_SIZE; >> +#endif >> + > > How does this change behaviour on ia64 or powerpc? [...] Content analysis details: (-4.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.0 AWL AWL: From: address is in the auto white-list Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r232582 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 20:52:18 -0000 On 13/03/2012 9:21 AM, Marcel Moolenaar wrote: > > On Mar 5, 2012, at 7:42 PM, Oleksandr Tymoshenko wrote: >> @@ -308,6 +308,13 @@ _init_tls() >> } >> } >> >> +#ifdef TLS_VARIANT_I >> + /* >> + * tls_static_space should include space for TLS structure >> + */ >> + tls_static_space += TLS_TCB_SIZE; >> +#endif >> + > > How does this change behaviour on ia64 or powerpc? I believe it doesn't. nathanw@ performed some sanity tests on powerpc recently, and they passed. ia64 has not been tested. This issue manifested itself only with statically linked binaries. Juli presented some corner case test for MIPS that caused crash: binary compiled with "-static -pthread" without any actual thread- specific variables that tries to get TP pointer. This test case leads to crash and I used it for tracking down the root cause. For binaries with actual TLS data this issue would manifest itself as memory corruption. From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 21:25:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50200106566B; Tue, 13 Mar 2012 21:25:26 +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 3D4B88FC08; Tue, 13 Mar 2012 21:25:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DLPQSG063736; Tue, 13 Mar 2012 21:25:26 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DLPQQh063732; Tue, 13 Mar 2012 21:25:26 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201203132125.q2DLPQQh063732@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 13 Mar 2012 21:25: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 X-Mailman-Approved-At: Tue, 13 Mar 2012 21:29:59 +0000 Cc: Subject: svn commit: r232946 - in head/sys: contrib/dev/ral modules/ralfw modules/ralfw/rt2860 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 21:25:26 -0000 Author: bschmidt Date: Tue Mar 13 21:25:25 2012 New Revision: 232946 URL: http://svn.freebsd.org/changeset/base/232946 Log: Update the rt2860's firmware and add a Makefile for the module. While here remove the ucode header file which was used to generate the fw files but by now is outdated. Reviewed by: ray Obtained from: OpenBSD Added: head/sys/modules/ralfw/rt2860/ head/sys/modules/ralfw/rt2860/Makefile (contents, props changed) Deleted: head/sys/contrib/dev/ral/rt2661_ucode.h Modified: head/sys/contrib/dev/ral/rt2860.fw.uu head/sys/modules/ralfw/Makefile Modified: head/sys/contrib/dev/ral/rt2860.fw.uu ============================================================================== --- head/sys/contrib/dev/ral/rt2860.fw.uu Tue Mar 13 20:37:57 2012 (r232945) +++ head/sys/contrib/dev/ral/rt2860.fw.uu Tue Mar 13 21:25:25 2012 (r232946) @@ -15,30 +15,27 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. begin 644 rt2860.fw -M`@#B`@+L(B+___\"`;W______P(`'O______`@%NP.#`\,"#P(+`T'70&,*O -M,$4#$A`)D`06X##C#70(\.558`9D`V`"T@.0!!3@(.<#`@#5=(#PD'`2X/4V -MD`0$X"3/8#`48$(DXF!'%&!5)"%P8.55)/Y@!Q1@""0"<`A]`8`H?0*`))!P -M$.#U4(4V0-(!@#[E560#8`3E57`$?0*`"84V0=("@"FM5:\V$@+(@""003]KS82`LC2!)!P$^3PTJ_0T-""T(/0\-#@ -M,GA_Y/;8_76!?0(!*0(""^23H_CDDZ-``_:``?((W_2`*>23H_A4!R0,R,,S -MQ%0/1"#(@T`$]%:``4;VW^2`"P$"!`@0($"`D`.:Y'X!DV"\H_]4/S#E"50? -M_N23HV`!#L]4P"7@8*A`N.23H_KDDZ/XY).CR,6"R,K%@\KPH\C%@LC*Q8/* -MW^G>YX"^P.#`\,"#P(+`T.C`X.G`X.K`X.O`X.S`X.W`X.[`X._`X,*O,$4# -M$A`2TJ_0X/_0X/[0X/W0X/S0X/O0X/K0X/G0X/C0T-""T(/0\-#@,L#@P/#` -M@\""P-!UT!#"KS!%`Q(0##!8"N548`055(`"PE@P60KE4&`$%5"``L)9U5,' -M,&`$%4;2!#!%`Q(0#\*-TJ_0T-""T(/0\-#@,A(##C!%`Q(0`S`!!B`)`Q(0 -M'#`"!B`*`Q(0'S`#!B`+`Q(0'S`$!B`,`Q(0(B`3"2`1!N4K12Q@`].``<.2 -MJ1(#/H"_T(/0@OCDDW`2=`&3<`VCHY/X=`&3]8*(@^1S=`*3:&#OHZ.C@-^* -M@XF"Y'/([\CF^@CF2F`,R._(".86&'`!%L,B[23__>PT_\COR/8(QNW&TR+" -M0])%Y/4@]2'U4_5&]2OU+,)"]5'U4O55D`08=(#PD`0:=`CP(N_T8!_D_A(# -M?>"T_Q(2`WWO\'0<+O6"Y#1P]8/M\"(.O@3C(L#@P/#`@\""P-!UT`C"KS!% -M`Q(0!M*OT-#0@M"#T/#0X#+"KQ(`!A("HA(#)^3U(O5'D`0`=(#PTJ\B=8D" -MY/6,]8KUB/6X]>AUD!C2C'6H!2(P10,2$!7E('`#(!`#,!$#0X#U1!(0 +M)8`&D'`0X/5%Y/VO-A("@M($D'`3Y/"0X"#A\Y`0'."0<"CPD!`=X)!P*?"0$![@D'`J\,(% +MTJ\B$@+(,$4#$A`#,`$&(`D#$A`<,`(&(`H#$A`?,`,&(`L#$A`?,`0&(`P# +M$A`B(!,)(!$&Y2M%+&`#TX`!PY*I$@,<@+_"0])%Y/4@]2'U4_5&]2OU+,)" +M]5'U4O55D`08=(#PD`0:=`CPPAK"&,(;(LCOR.;Z".9*8`S([\@(YA88<`$6 +MPR+M)/_][#3_R._(]@C&[<;3(M"#T(+XY)-P$G0!DW`-HZ.3^'0!D_6"B(/D +M0!`!T@/#2KR)UB0+D]8SUBO6(];CUZ'60&-*,=:@%(N]@`Q^` +M^B+_P"9T`\#@P(+`@W4F"B+`)G0#P.#`@L"#=288(C!%`Q(0%>4@<`,@$`,P +M$0-#AP$BSN_.[F`(?_\2`O@>@/4BR._(YF`#%L,B[13VTR+([\CF8`86YB3_ +MLR+#(GA_Y/;8_76!7P(!Q704+O6"Y#1P]8,B[Y`#>Y.0`P!S"AC_________ M____________________________________________________________ -M_____________________________________________\`F=`3`X,""P(-U -M)@HBP"9T!,#@P(+`@W4F&"+_____________________________________ M____________________________________________________________ M____________________________________________________________ M____________________________________________________________ @@ -106,81 +103,84 @@ M_______________________________________ M____________________________________________________________ M____________________________________________________________ M____________________________________________________________ -M_____P(0*`(01`(010(2J0(2J@(310(31L,B__\"%4@"%AX"$_T"$TAP$A)Q$CQR$FZ````2 -MG"`"`S`#'7T"KU82`LB0!!1T@/#DD'`3\.56]'`#`A*<`A*/A59!T@("$IR0 -M0!48,035`<4]6-U98!U9B-U9P9U:!AU:16M5Z]6$@+(D`04=(#PY)!P$_#E -M5O1P`P(2G`(2CY!P$>!4'_5ND'`0X/5KD'`1X%1@)/^2+.!48,035`<4]6]U -M<4!U>M5Z]6$@+(D`04=(#PY)!P$_#E5O1P`P(2G`(2CY!P -M$.!@!-(:@`+2(JU7KU82`LB0!!1T@/#DD'`3\.56]'`#`A*<`A*/D'`0X/Z0 -MWXYO57_:]6$@+(D`04=(#PY)!P$_#E5O1P`P(2G(!]D'`0X/Z0WU@HZ#X/57_:]6$@+(D`04=(#PY)!P$_#E5O1@8H!3Y/5Z=7L!]6K"+?4C -M]3O2+O5WPBSU)'5V&*U7KU82`LB0!!1T@/#DD'`3\.56]&`P@"&0O5A("R)`$%'2`\.205W8`?E>[0#`M(C -MY2,D_Y(&Y20D_Y('D'!@Y7OPH^5J\*/E(/"CY2/PY6RC\*/E;?"B+>0SH_"C -MY6+PD'!KY7;PY5-P#N5/14Y@".5/%4]P`A5.(B(BPDO"3.5$$@)/$VD`$\0$ -M$\`($Z@0$W0@$X9@$Y&@```3QH5(0X5*0H5,7H!2Y4C$5`_U0^5*Q%0/]4+E -M3(`;A4E#A4M"A4U>@#7E2<14#_5#Y4O$5`_U0N5-Q%0/]5Z`'N5'M`0&4U[[ -M=4()Y4>T!0Y#7@1U0@F`!M)+@`+23.3U3O5/]2?E0L14\/_E0U0/3_5?D'!$ -M\*/E7O"CY4KPH^5(\*/E3/"CY43PH^5"\*/E0_#28"*0<$#@!/"0<$+E1_#E -M1V`0),!P`Q(5*!(4'L*OP@32KR+"KY`$%.!4#F`4Y4>T`@OE1+0@!G5."'5/ -M`-(H@`CE3D5/)/^2*-*OD`04X*+DDBET'O#E7U0/]2WE)W`3,"@%Y5\@Y0LP -M*1GE7U0P_[\P$>4G<`5U)PR``A4GTFS2;8`/Y5\PY@;";-)M@`32;,)MY4=D -M`W`A,$L&PFS2;8`8Y2=P`S!,$<),Y2=P!74G!X`"%2?2;-)MD'!&Y2WP(&D' -MY5X@X`*R:"!K!^5>(.$"LFH@;0?E7B#B`K)LD'!'Y2WP=2Y`(&D$HFB`"N5& -M,&@$HN.``3.20`@C@(.,\D`0WX&0B<#20$@1T"O"0 -M$RC@5/#PH^!4\/"CX%3Z\)`$`>!$$/#@5/GPD!($X$0$\'4X`755`N3U48`) -MY5!P!74X`_51Y3A@%<(!Y/51PEFM.*]`$@+(Y3BT`P+2`]*O(L*O,`$.Y/51 -MPEG"`7T"KT`2`LCE4A1@%P1P79`2!.!4^_!_(!(50W52`755`X!)Y51P19`$ -M`>!$#O#@5._PD!,HX$0/\*/@1`_PH^!$!?"0$@1T`_"0`@C@1`7PD!`$X$0, -M\.3U4O55,`(+P@)]`:]!$@+(@`+"`]*O(B(BPJ_E:G`$Y7=@`].``<.2*)!P -M*N`PX2S@$Y(ID'`IX/^0<"C@_:(HDBJB*9(K$A;A4`,@*`42%V&`!Y!P*N!4 -M_?#"!=*O(C`K23`J1K]!")!P*.4R\(`YOT((D'`HY3/P@"Z_10B0<"CE-?"` -M([]&")!P*.4P\(`8OTD(D'`HY3'P@`V_<0B0<"CE+_"``L,BTR(@*R^_002- -M,H`EOT($C3.`'K]%!(TU@!>_1@2-,(`0OTD$C3&`";]Q!(TO@`+#(J(J(L,B -MD'`HX)`0'/"0<"G@D!`=\)!P*N"0$![PD!`X"#A\Y`0'."0<"CP -MD!`=X)!P*?"0$![@D'`J\#!*#9!P).!$`?"0`BQT__`BPJ^0$!SM\*/O\*-T -M"O"0$!S@]3J0$![@(.'STJ\BPJ^0$!WO\*-T"_"0$!S@_Y`0'N`@X?32KR*0 -M$T3@]33D\)`"*?"0`BC@1`+P?1U_01(7KWU@#Q(7KW]Q$A?-[T0@_7]Q`A>O -MY)`"*?"0`BC@1`+PD!-$X/4TY/!_!!(7S>]4&&`=Y7@D`OCF8`>0<"S@_8`% -MD'`MX/U_0A(7KWTP@!OE>"0"^.9@!Y!P+N#]@`60<"_@_7]"$A>O?2A_11(7 -MKP\2%Z]]"'])$A>O(N20`BGPD`(HX%3]\)`31.4T\']Q$A?-[U3?_7]Q$A>O -MK3)_01(7KZTS#Q(7KZTU?T42%Z^M,`\2%Z^M,7])`A>OY6H48!8$<#&0<&S@ -M!/!_!A(;E5`D=6H!=7ABD'!MX`3P$AE@0!.0<"3@1`3PD`(L=/_PY/5J$ANN -MPJ]3(+_2KR+E=Q1@$`1P4G\'$AN54$MU=P%U>&X2&6!`0.5Y)`7_$Q,35!_^ -M)"3U@N0T>\@X`,"&B2H..94_O;E>`3XYF!-PJ]U>@6H -M..94^_;2K^5X!/CF9`)P')!WA?#E>"0#^.:0!!#PY7@D`_CF_Y`$$.!?"0#^.:0!!#P=7L"@#/"KZAXYO5ZJ#CF5/OVTJ^0$`3@ -M5/OPY6I@!I`7!.#U.>5X)`;XYOX(YLKNROD2`G5U>P/3(J@XYC#B.U3[]L*O -MJ'CF]7JH..94^_;2KY`0!.!4^_#E:F`&D!<$X/4YY7@D!OCF_@CFRN[*^1(" -M=>3U?75[`],BJ#CF,.$)5/WVY/5Y`AN.TR+E=W`#`AMNJ#CF(.,#`AMN5/?V -M?W,2%\WO9`)@`P(;*)`"*?"0`BC@1`CP?W82%\WE?27@)>`D`/6"Y#1Q]8/O -M\']U$A?-Y7TEX"7@)`'U@N0T5])>`EX"0"]8+D-''U@^_P -M?W,2%\WE?27@)>`D`_6"Y#1Q]8/O\']Q$A?-[U3?_7]Q$A>O?W$2%\WO1"#] -M?W$2%Z]U>?_DD`(I\)`"*.!4]_"`1.5])>`EX"0`]8+D-''U@^3PY7TEX"7@ -M)`'U@N0T`D`O6"Y#1Q]8/D\.5])>`EX"0#]8+D-''U@^3P -M!7VH..;_,.$>5/WVY7GT8`=_#U/`(3 +MM>55M`(/Y5@PX`:0`0UT"/!]`8`"?0*O5A("@@(3M2`"`S`#"GT"KU82`H(" +M$[7E--.4`4`,D`$,X$0"\*/@1`3PA59!T@(BD'`1X/1P`P(3N^#U,"+E--.4 +M`4`'Y55@`P(3NY!P$.!4?_^_"@V0!D"&`$X+0@!G5.`W5/(.3U)R*005'9`=@'>5'9`A@%^5'9`E@$>5'9`I@"^5'9`M@!>5' +MM`P(D'`1X%0/]3KE1[0)".4ZM`,#Y/5&Y4>T"@CE.K0!`^3U1N3]KU82`H+2 +M!"*0"0#_D'`9X/[O7I`"*?`P1P2O)X`$Y2?T_Y`"*._P(N4TTY0! +M0`?E56`#`A-)D'`0X/Z0WXYO57_:]6$@*"`A.UY333E`%`!^558`," +M$TF0#][?6"CH/@]5?]KU82`H("$[60$`#@]5?D]5CU69`0`^"T +M*`5U6`&`/)`0`^"T,`5U6`*`,)`0`^"T,P5U6`2`))`0`^"T-0R0$`+@M'(% +M=5@(@!&0$`/@M#4*D!`"X+23`W58$.58,.$9D`4(X$0!\/V0!07@5/OP1`3P +M[53^D`4(\.3U3O5/=3K_PAK"&,(;]320!:1T$?"C=/_PHW0#\.3U,,(9D`$- +MX$1`\'4\_ZU7KU82`H+DD'`R\(!WY333E`%`"^558`=]`Z]6`@*"D'`0X"3_ +MDI/D_:]6$@*"@%3E--.4`4`-Y55@"7T#KU82`H*`0)!P$.`D_Y)*T@6M5Z]6 +M$@*"@"WD]33U,)!P$.#T8`/@]32M5Z]6$@*"@!72&04OY2^T&@/D]2_2!*U7 +MKU82`H*0!!1T@/`B(N4TPY0#0!?E5;0"$N4P8`XP8`MT_25&]4;2!.3U4^53 +M8`,"%'$P8"&R33!-'.4TPY0#0!'E5;0"#.4P8`AT`R5&]4:``@5&P@3E3T5. +M8`CE3Q5/<`(53C`:27\R?;A\"Q("-5`&D`00=$#P?S5],A(#/U`)D!`$X%3W +M\-(&Y373E"U`,#`;+<(;HAB2&B`:))`$">!4W?"0$`3@1`CPPF'2`R+D]36B +M&)(:,!H'D`0)X$0B\"(B,!0PD'`9X%4G_Y!P&.!/]2>0`BG@_Y!P&>#^[UZ0 +M`BGP,$<$KR>`!.4G]/^0`BCO\,(4(L)+PDSE1!("7!3)`!57!!53"!4S$!3= +M(!3]8!4.H```%5F%2$.%2D*%3%[E1V0&8`,"%5F`&^5(Q%0/]4/E2L14#_5" +MY4S$5`_U7N5'9`9P85-##X!Y4=D!G!-@!OE2<14#_5#Y4O$ +M5`_U0N5-Q%0/]5[E1V0&<##E0U0/1!#U0X`FY4=D!&`%Y4>T!09#7@1U0@GE +M1[0&$.5#5`]$,/5#@`;22X`"TDSD]2KE0L14\/_E0U0/3_5?TF`BTA7E1R3U +M8`LDRV`')$!P!L(5(A(9%1(5CL(5PJ_"!-*O(L*OD`04X%0.8`32'(`(Y4Y% +M3R3_DAS2KY`$%."BY)(==![PY5]4#_4MY2IP$S`5?(.4+,!TIY5]4,&0P +M<"'E*G`5Y33#E`-`">4P8`5U*@6`!W4J#(`"%2K2;-)M@`_E7S#F!L)LTFV` +M!-)LPFWE1V0#<"$P2P;";-)M@!CE*G`#,$P1PDSE*G`%=2H'@`(5*M)LTFWE +M1[0)%.5$(.,+Y3ID`F`%Y3JT`P3";-)MY4>T"A/E.K0!!L)LTFV`".4Z<`32 +M;,)M(&D'Y5X@X`*R:"!K!^5>(.$"LFH@;0?E7B#B`K)L=2Y`(&D$HFB`13!H +M!N5&HN*`/#`9'.5>(.`$?P&``G\`Y2^T&01^`8`"?@#N;R3_@!WE7B#@!'\! +M@`)_`.5&5/#^OO`$?@&``GX`[F\D_Y)SDG(@:P2B:H!%,&H&Y4:BXH`\,!D< +MY5X@X01_`8`"?P#E+[09!'X!@`)^`.YO)/^`'>5>(.$$?P&``G\`Y494\/Z^ +M\`1^`8`"?@#N;R3_DG62="!M!*)L@";E1V0*<"(P;`;E1J+C@!?E.K0!!N5& +MHN.`4^5&(.0#,.4#TX`!PX!%,&P&Y4:BXH`\,!D5>(.($?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG&2 +M<)`0`."0$"SPD!`#X,.4,$`4HG&2=Z)PDG;E+A,35#_U+L)WTG:0$"_E+O#E +M1V0&<#F0`BG@5/[PY4/$5`\48`PD_F`,)`-P$\(X@`_2.(`+Y48PX@/3@`'# +MDC@P1P6O)P(9#^4G]/\"&0_E1V0'8`_E1V0(8`GE1V0)8`,"&(Z0`BG@5/SP +MY3H48"(48"448"TD_&!))/E@%"0.<%#E1A,35#]U\`.$Y?`D_X`ZTCG".(`^ +MY48PX@/3@!W#@!KE1C#B#50XPY0P4`9^`'\!@`1^`'\`[D\D_Y(XPCF`$^5& +M,.(#TX`!PY(YPCB`!,(XPCDP1P2O)X`$Y2?T_P(9#^5'9`Q@!N5'9`MP>I`" +M*>!4_?#E.A1@(!1@(11@*R3\8$4D^6`2)`YP2N5&$Q-4/W7P`X3E\(`ITCF` +M.N5&,.(#TX`!PY(Y@"WE1C#B#50XPY0P4`9^`'\!@`1^`'\`[D\D_Y(Y@`_E +M1C#B`].``<.2.8`"PCDP1P2O)X`$Y2?T_Y`"*._P(N5'M`L0D`(IX%3K\.4G +M5.M%1?4G(N20`BGP,$<$KT6`!.5%]/^0`BCO\"*/4-)9(H]4TE@BY/4WPJ_E +M411@2A1@:R0"8`,"&M726755`2`:')`"".!4_O#@(.$CD`0TX+0"'*/@M`(7 +MH^"T`A)_(!(90)`0!.!4\_!U40$"&M7E4'`&=3<#`AK5D!(`X%0#"0!4^_"`%.4\])`3*F`(X%3R13SP@`3@5/KP(!H'D`0!X$00 +M\.4TTY0!0`GE,'`%=8Q`@`-UC("0!`'@5/WP(!H'D!($X$0$\.58,.`&D`$- +MX/4QY333E`%`+)`!#>!$`?#E6"#C#.4TM`,'D!($X%3]\"`"$2`##I`!#>!4 +M^_"0`0S@5/WP=30!#?@(.5LD`0HX/4XH^#U-_4YY/4EY3EU\("D +M)`#_Y?`T@/[E-V4Y<`7\?2B`!'P`?0#O+?_N//X2'*E0!Y`!%.!$`O#E.64X +M8!#D)3G_Y#2`CX+U@^#U.8"[D`00=`'PD`0HY3CPH^4W\)`$$70!\("-P@;2 +M&R+E)<.4!E`9CX*.@^"T_P<%)>3U)(`NY/4ECX*.@_"`).4D=?`&A'0()?#U +M@N0T$/6#X/V/@HZ#X&UP!@4E!22``^3U)0^_``$.[U1_8`?E)<.4*D"KY26T +M*@/3@`'#(@`````````````````````````````````````````````````` M```````````````````````````````````````````````````````````` M```````````````````````````````````````````````````````````` M```````````````````````````````````````````````````````````` @@ -196,7 +196,7 @@ M``````````````````````````````````````` M```````````````````````````````````````````````````````````` M```````````````````````````````````````````````````````````` M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````````#] -"93`` +M```````````````````````````````````````````````````````````: +"4X@` ` end Modified: head/sys/modules/ralfw/Makefile ============================================================================== --- head/sys/modules/ralfw/Makefile Tue Mar 13 20:37:57 2012 (r232945) +++ head/sys/modules/ralfw/Makefile Tue Mar 13 21:25:25 2012 (r232946) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= rt2561 rt2561s rt2661 +SUBDIR= rt2561 rt2561s rt2661 rt2860 .include Added: head/sys/modules/ralfw/rt2860/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/ralfw/rt2860/Makefile Tue Mar 13 21:25:25 2012 (r232946) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +IMG= rt2860 + +.include From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 22:00:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49A291065670; Tue, 13 Mar 2012 22:00: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 3931C8FC0A; Tue, 13 Mar 2012 22:00:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DM0lJr064853; Tue, 13 Mar 2012 22:00:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DM0loJ064851; Tue, 13 Mar 2012 22:00:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203132200.q2DM0loJ064851@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Mar 2012 22:00: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: r232947 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 22:00:47 -0000 Author: kib Date: Tue Mar 13 22:00:46 2012 New Revision: 232947 URL: http://svn.freebsd.org/changeset/base/232947 Log: Lock the process around manipulations with p_flag. Reported and reviewed by: jh MFC after: 3 days Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Tue Mar 13 21:25:25 2012 (r232946) +++ head/sys/kern/kern_exit.c Tue Mar 13 22:00:46 2012 (r232947) @@ -738,10 +738,12 @@ proc_reap(struct thread *td, struct proc LIST_REMOVE(p, p_list); /* off zombproc */ sx_xunlock(&allproc_lock); LIST_REMOVE(p, p_sibling); + PROC_LOCK(p); if (p->p_flag & P_ORPHAN) { LIST_REMOVE(p, p_orphan); p->p_flag &= ~P_ORPHAN; } + PROC_UNLOCK(p); leavepgrp(p); #ifdef PROCDESC if (p->p_procdesc != NULL) From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 22:04:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3067106564A; Tue, 13 Mar 2012 22:04: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 B8D038FC16; Tue, 13 Mar 2012 22:04:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DM4R60065003; Tue, 13 Mar 2012 22:04:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DM4RtI065000; Tue, 13 Mar 2012 22:04:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203132204.q2DM4RtI065000@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Mar 2012 22:04: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: r232948 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 22:04:28 -0000 Author: kib Date: Tue Mar 13 22:04:27 2012 New Revision: 232948 URL: http://svn.freebsd.org/changeset/base/232948 Log: Supply boolean as the second argument to ffs_update(), and not a MNT_[NO]WAIT constants, which in fact always caused sync operation. Based on the submission by: bde Reviewed by: mckusick MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Tue Mar 13 22:00:46 2012 (r232947) +++ head/sys/ufs/ffs/ffs_softdep.c Tue Mar 13 22:04:27 2012 (r232948) @@ -6311,7 +6311,7 @@ softdep_journal_freeblocks(ip, cred, len DIP_SET(ip, i_size, length); ip->i_flag |= IN_CHANGE | IN_UPDATE; allocbuf(bp, frags); - ffs_update(vp, MNT_NOWAIT); + ffs_update(vp, 0); bawrite(bp); } else if (lastoff != 0 && vp->v_type != VDIR) { int size; @@ -12346,7 +12346,7 @@ flush_newblk_dep(vp, mp, lbn) * point at the newdirblk before the dependency * will go away. */ - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); if (error) break; ACQUIRE_LOCK(&lk); @@ -12382,7 +12382,7 @@ restart: */ if (dap->da_state & MKDIR_PARENT) { FREE_LOCK(&lk); - if ((error = ffs_update(pvp, MNT_WAIT)) != 0) + if ((error = ffs_update(pvp, 1)) != 0) break; ACQUIRE_LOCK(&lk); /* @@ -12424,7 +12424,7 @@ restart: * disk. */ if (error == 0 && dap == LIST_FIRST(diraddhdp)) - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); vput(vp); if (error != 0) break; @@ -12481,7 +12481,7 @@ retry: if ((error = ffs_vgetf(mp, inum, LK_EXCLUSIVE, &vp, FFSV_FORCEINSMQ))) break; - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); vput(vp); if (error) break; Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Tue Mar 13 22:00:46 2012 (r232947) +++ head/sys/ufs/ffs/ffs_vnops.c Tue Mar 13 22:04:27 2012 (r232948) @@ -324,7 +324,7 @@ next: /* Write the inode after sync passes to flush deps. */ if (wait && DOINGSOFTDEP(vp) && noupdate == 0) { BO_UNLOCK(bo); - ffs_update(vp, MNT_WAIT); + ffs_update(vp, 1); BO_LOCK(bo); } /* switch between sync/async. */ @@ -339,7 +339,7 @@ next: BO_UNLOCK(bo); error = 0; if (noupdate == 0) - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); if (DOINGSUJ(vp)) softdep_journal_fsync(VTOI(vp)); return (error); From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 00:09:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1EFEB1065678; Wed, 14 Mar 2012 00:09:36 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C57778FC14; Wed, 14 Mar 2012 00:09:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2E09aW4068962; Wed, 14 Mar 2012 00:09:36 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2E09aKv068956; Wed, 14 Mar 2012 00:09:36 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203140009.q2E09aKv068956@svn.freebsd.org> From: David Chisnall Date: Wed, 14 Mar 2012 00:09: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: r232950 - in head: contrib/libc++/include contrib/libc++/include/ext contrib/libc++/src contrib/libcxxrt lib/libc++ X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 00:09:37 -0000 Author: theraven Date: Wed Mar 14 00:09:36 2012 New Revision: 232950 URL: http://svn.freebsd.org/changeset/base/232950 Log: Import new versions of libcxxrt and libc++. Please tests any C++ code you care about with -stdlib=libc++! Approved by: dim (mentor) Added: head/contrib/libc++/include/__undef_min_max - copied unchanged from r232925, vendor/libc++/dist/include/__undef_min_max Modified: head/contrib/libc++/include/__bit_reference head/contrib/libc++/include/__config head/contrib/libc++/include/__debug head/contrib/libc++/include/__functional_03 head/contrib/libc++/include/__functional_base head/contrib/libc++/include/__functional_base_03 head/contrib/libc++/include/__hash_table head/contrib/libc++/include/__locale head/contrib/libc++/include/__mutex_base head/contrib/libc++/include/__split_buffer head/contrib/libc++/include/__sso_allocator head/contrib/libc++/include/__std_stream head/contrib/libc++/include/__tree head/contrib/libc++/include/__tuple head/contrib/libc++/include/algorithm head/contrib/libc++/include/atomic head/contrib/libc++/include/bitset head/contrib/libc++/include/chrono head/contrib/libc++/include/cmath head/contrib/libc++/include/complex head/contrib/libc++/include/cstddef head/contrib/libc++/include/cstdlib head/contrib/libc++/include/cstring head/contrib/libc++/include/deque head/contrib/libc++/include/exception head/contrib/libc++/include/ext/hash_map head/contrib/libc++/include/forward_list head/contrib/libc++/include/fstream head/contrib/libc++/include/functional head/contrib/libc++/include/future head/contrib/libc++/include/initializer_list head/contrib/libc++/include/iomanip head/contrib/libc++/include/ios head/contrib/libc++/include/istream head/contrib/libc++/include/iterator head/contrib/libc++/include/limits head/contrib/libc++/include/list head/contrib/libc++/include/locale head/contrib/libc++/include/map head/contrib/libc++/include/memory head/contrib/libc++/include/mutex head/contrib/libc++/include/ostream head/contrib/libc++/include/random head/contrib/libc++/include/ratio head/contrib/libc++/include/regex head/contrib/libc++/include/sstream head/contrib/libc++/include/streambuf head/contrib/libc++/include/string head/contrib/libc++/include/system_error head/contrib/libc++/include/thread head/contrib/libc++/include/tuple head/contrib/libc++/include/type_traits head/contrib/libc++/include/unordered_map head/contrib/libc++/include/utility head/contrib/libc++/include/valarray head/contrib/libc++/include/vector head/contrib/libc++/src/chrono.cpp head/contrib/libc++/src/condition_variable.cpp head/contrib/libc++/src/debug.cpp head/contrib/libc++/src/exception.cpp head/contrib/libc++/src/future.cpp head/contrib/libc++/src/hash.cpp head/contrib/libc++/src/locale.cpp head/contrib/libc++/src/memory.cpp head/contrib/libc++/src/mutex.cpp head/contrib/libc++/src/new.cpp head/contrib/libc++/src/random.cpp head/contrib/libc++/src/regex.cpp head/contrib/libc++/src/stdexcept.cpp head/contrib/libc++/src/string.cpp head/contrib/libc++/src/strstream.cpp head/contrib/libc++/src/thread.cpp head/contrib/libc++/src/typeinfo.cpp head/contrib/libcxxrt/auxhelper.cc head/contrib/libcxxrt/cxxabi.h head/contrib/libcxxrt/dwarf_eh.h head/contrib/libcxxrt/dynamic_cast.cc head/contrib/libcxxrt/exception.cc head/contrib/libcxxrt/guard.cc head/contrib/libcxxrt/memory.cc head/contrib/libcxxrt/stdexcept.cc head/contrib/libcxxrt/stdexcept.h head/contrib/libcxxrt/terminate.cc head/contrib/libcxxrt/typeinfo.cc head/contrib/libcxxrt/typeinfo.h head/contrib/libcxxrt/unwind-arm.h head/contrib/libcxxrt/unwind.h head/lib/libc++/Makefile Directory Properties: head/contrib/libc++/ (props changed) head/contrib/libcxxrt/ (props changed) Modified: head/contrib/libc++/include/__bit_reference ============================================================================== --- head/contrib/libc++/include/__bit_reference Tue Mar 13 23:45:30 2012 (r232949) +++ head/contrib/libc++/include/__bit_reference Wed Mar 14 00:09:36 2012 (r232950) @@ -14,14 +14,16 @@ #include <__config> #include +#include <__undef_min_max> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD -template class __bit_iterator; -template class __bit_const_reference; +template class __bit_iterator; +template class __bit_const_reference; template struct __has_storage_type @@ -29,22 +31,22 @@ struct __has_storage_type static const bool value = false; }; -template ::value> +template ::value> class __bit_reference { - typedef typename _C::__storage_type __storage_type; - typedef typename _C::__storage_pointer __storage_pointer; + typedef typename _Cp::__storage_type __storage_type; + typedef typename _Cp::__storage_pointer __storage_pointer; __storage_pointer __seg_; __storage_type __mask_; #if defined(__clang__) - friend typename _C::__self; + friend typename _Cp::__self; #else - friend class _C::__self; + friend class _Cp::__self; #endif - friend class __bit_const_reference<_C>; - friend class __bit_iterator<_C, false>; + friend class __bit_const_reference<_Cp>; + friend class __bit_iterator<_Cp, false>; public: _LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT {return static_cast(*__seg_ & __mask_);} @@ -66,74 +68,74 @@ public: {return operator=(static_cast(__x));} _LIBCPP_INLINE_VISIBILITY void flip() _NOEXCEPT {*__seg_ ^= __mask_;} - _LIBCPP_INLINE_VISIBILITY __bit_iterator<_C, false> operator&() const _NOEXCEPT - {return __bit_iterator<_C, false>(__seg_, static_cast(__ctz(__mask_)));} + _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, false> operator&() const _NOEXCEPT + {return __bit_iterator<_Cp, false>(__seg_, static_cast(__ctz(__mask_)));} private: _LIBCPP_INLINE_VISIBILITY __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT : __seg_(__s), __mask_(__m) {} }; -template -class __bit_reference<_C, false> +template +class __bit_reference<_Cp, false> { }; -template +template _LIBCPP_INLINE_VISIBILITY inline void -swap(__bit_reference<_C> __x, __bit_reference<_D> __y) _NOEXCEPT +swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT { bool __t = __x; __x = __y; __y = __t; } -template +template _LIBCPP_INLINE_VISIBILITY inline void -swap(__bit_reference<_C> __x, bool& __y) _NOEXCEPT +swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT { bool __t = __x; __x = __y; __y = __t; } -template +template _LIBCPP_INLINE_VISIBILITY inline void -swap(bool& __x, __bit_reference<_C> __y) _NOEXCEPT +swap(bool& __x, __bit_reference<_Cp> __y) _NOEXCEPT { bool __t = __x; __x = __y; __y = __t; } -template +template class __bit_const_reference { - typedef typename _C::__storage_type __storage_type; - typedef typename _C::__const_storage_pointer __storage_pointer; + typedef typename _Cp::__storage_type __storage_type; + typedef typename _Cp::__const_storage_pointer __storage_pointer; __storage_pointer __seg_; __storage_type __mask_; #if defined(__clang__) - friend typename _C::__self; + friend typename _Cp::__self; #else - friend class _C::__self; + friend class _Cp::__self; #endif - friend class __bit_iterator<_C, true>; + friend class __bit_iterator<_Cp, true>; public: _LIBCPP_INLINE_VISIBILITY - __bit_const_reference(const __bit_reference<_C>& __x) _NOEXCEPT + __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT : __seg_(__x.__seg_), __mask_(__x.__mask_) {} _LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT {return static_cast(*__seg_ & __mask_);} - _LIBCPP_INLINE_VISIBILITY __bit_iterator<_C, true> operator&() const _NOEXCEPT - {return __bit_iterator<_C, true>(__seg_, static_cast(__ctz(__mask_)));} + _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, true> operator&() const _NOEXCEPT + {return __bit_iterator<_Cp, true>(__seg_, static_cast(__ctz(__mask_)));} private: _LIBCPP_INLINE_VISIBILITY __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT @@ -144,11 +146,11 @@ private: // find -template -__bit_iterator<_C, false> -__find_bool_true(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +__bit_iterator<_Cp, false> +__find_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -178,11 +180,11 @@ __find_bool_true(__bit_iterator<_C, fals return _It(__first.__seg_, static_cast(__n)); } -template -__bit_iterator<_C, false> -__find_bool_false(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +__bit_iterator<_Cp, false> +__find_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -215,23 +217,23 @@ __find_bool_false(__bit_iterator<_C, fal return _It(__first.__seg_, static_cast(__n)); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -find(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __last, const _Tp& __value_) +__bit_iterator<_Cp, false> +find(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) { if (static_cast(__value_)) - return __find_bool_true(__first, static_cast(__last - __first)); - return __find_bool_false(__first, static_cast(__last - __first)); + return __find_bool_true(__first, static_cast(__last - __first)); + return __find_bool_false(__first, static_cast(__last - __first)); } // count -template -typename __bit_iterator<_C, false>::difference_type -__count_bool_true(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +typename __bit_iterator<_Cp, false>::difference_type +__count_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -258,11 +260,11 @@ __count_bool_true(__bit_iterator<_C, fal return __r; } -template -typename __bit_iterator<_C, false>::difference_type -__count_bool_false(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +typename __bit_iterator<_Cp, false>::difference_type +__count_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -289,23 +291,23 @@ __count_bool_false(__bit_iterator<_C, fa return __r; } -template +template inline _LIBCPP_INLINE_VISIBILITY -typename __bit_iterator<_C, false>::difference_type -count(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __last, const _Tp& __value_) +typename __bit_iterator<_Cp, false>::difference_type +count(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) { if (static_cast(__value_)) - return __count_bool_true(__first, static_cast(__last - __first)); - return __count_bool_false(__first, static_cast(__last - __first)); + return __count_bool_true(__first, static_cast(__last - __first)); + return __count_bool_false(__first, static_cast(__last - __first)); } // fill_n -template +template void -__fill_n_false(__bit_iterator<_C, false> __first, typename _C::size_type __n) +__fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -331,11 +333,11 @@ __fill_n_false(__bit_iterator<_C, false> } } -template +template void -__fill_n_true(__bit_iterator<_C, false> __first, typename _C::size_type __n) +__fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -361,10 +363,10 @@ __fill_n_true(__bit_iterator<_C, false> } } -template +template _LIBCPP_INLINE_VISIBILITY inline void -fill_n(__bit_iterator<_C, false> __first, typename _C::size_type __n, bool __value_) +fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value_) { if (__n > 0) { @@ -377,22 +379,22 @@ fill_n(__bit_iterator<_C, false> __first // fill -template +template inline _LIBCPP_INLINE_VISIBILITY void -fill(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __last, bool __value_) +fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool __value_) { - _VSTD::fill_n(__first, static_cast(__last - __first), __value_); + _VSTD::fill_n(__first, static_cast(__last - __first), __value_); } // copy -template -__bit_iterator<_C, false> -__copy_aligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -434,12 +436,12 @@ __copy_aligned(__bit_iterator<_C, _IsCon return __result; } -template -__bit_iterator<_C, false> -__copy_unaligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -512,10 +514,10 @@ __copy_unaligned(__bit_iterator<_C, _IsC return __result; } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -copy(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { if (__first.__ctz_ == __result.__ctz_) return __copy_aligned(__first, __last, __result); @@ -524,12 +526,12 @@ copy(__bit_iterator<_C, _IsConst> __firs // copy_backward -template -__bit_iterator<_C, false> -__copy_backward_aligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -571,12 +573,12 @@ __copy_backward_aligned(__bit_iterator<_ return __result; } -template -__bit_iterator<_C, false> -__copy_backward_unaligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -635,7 +637,7 @@ __copy_backward_unaligned(__bit_iterator { __m = ~__storage_type(0) << (__bits_per_word - __n); __storage_type __b = *--__last.__seg_ & __m; - unsigned __clz_r = __bits_per_word - __result.__ctz_; + __clz_r = __bits_per_word - __result.__ctz_; __storage_type __dn = _VSTD::min(__n, static_cast(__result.__ctz_)); __m = (~__storage_type(0) << (__result.__ctz_ - __dn)) & (~__storage_type(0) >> __clz_r); *__result.__seg_ &= ~__m; @@ -657,10 +659,10 @@ __copy_backward_unaligned(__bit_iterator return __result; } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -copy_backward(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +copy_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { if (__last.__ctz_ == __result.__ctz_) return __copy_backward_aligned(__first, __last, __result); @@ -669,20 +671,20 @@ copy_backward(__bit_iterator<_C, _IsCons // move -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -move(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +move(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { return _VSTD::copy(__first, __last, __result); } // move_backward -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -move_backward(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { return _VSTD::copy(__first, __last, __result); } @@ -852,34 +854,33 @@ swap_ranges(__bit_iterator<__C1, false> // rotate -template +template struct __bit_array { - typedef typename _C::difference_type difference_type; - typedef typename _C::__storage_type __storage_type; - typedef typename _C::iterator iterator; - static const unsigned __bits_per_word = _C::__bits_per_word; - static const unsigned _N = 4; + typedef typename _Cp::difference_type difference_type; + typedef typename _Cp::__storage_type __storage_type; + typedef typename _Cp::iterator iterator; + static const unsigned __bits_per_word = _Cp::__bits_per_word; + static const unsigned _Np = 4; difference_type __size_; - __storage_type __word_[_N]; + __storage_type __word_[_Np]; _LIBCPP_INLINE_VISIBILITY static difference_type capacity() - {return static_cast(_N * __bits_per_word);} + {return static_cast(_Np * __bits_per_word);} _LIBCPP_INLINE_VISIBILITY explicit __bit_array(difference_type __s) : __size_(__s) {} _LIBCPP_INLINE_VISIBILITY iterator begin() {return iterator(__word_, 0);} _LIBCPP_INLINE_VISIBILITY iterator end() {return iterator(__word_ + __size_ / __bits_per_word, static_cast(__size_ % __bits_per_word));} }; -template -__bit_iterator<_C, false> -rotate(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __middle, __bit_iterator<_C, false> __last) +template +__bit_iterator<_Cp, false> +rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle, __bit_iterator<_Cp, false> __last) { - typedef __bit_iterator<_C, false> _I1; + typedef __bit_iterator<_Cp, false> _I1; typedef typename _I1::difference_type difference_type; typedef typename _I1::__storage_type __storage_type; - static const unsigned __bits_per_word = _I1::__bits_per_word; difference_type __d1 = __middle - __first; difference_type __d2 = __last - __middle; _I1 __r = __first + __d2; @@ -887,16 +888,16 @@ rotate(__bit_iterator<_C, false> __first { if (__d1 <= __d2) { - if (__d1 <= __bit_array<_C>::capacity()) + if (__d1 <= __bit_array<_Cp>::capacity()) { - __bit_array<_C> __b(__d1); + __bit_array<_Cp> __b(__d1); _VSTD::copy(__first, __middle, __b.begin()); _VSTD::copy(__b.begin(), __b.end(), _VSTD::copy(__middle, __last, __first)); break; } else { - __bit_iterator<_C, false> __mp = _VSTD::swap_ranges(__first, __middle, __middle); + __bit_iterator<_Cp, false> __mp = _VSTD::swap_ranges(__first, __middle, __middle); __first = __middle; __middle = __mp; __d2 -= __d1; @@ -904,16 +905,16 @@ rotate(__bit_iterator<_C, false> __first } else { - if (__d2 <= __bit_array<_C>::capacity()) + if (__d2 <= __bit_array<_Cp>::capacity()) { - __bit_array<_C> __b(__d2); + __bit_array<_Cp> __b(__d2); _VSTD::copy(__middle, __last, __b.begin()); _VSTD::copy_backward(__b.begin(), __b.end(), _VSTD::copy_backward(__first, __middle, __last)); break; } else { - __bit_iterator<_C, false> __mp = __first + __d2; + __bit_iterator<_Cp, false> __mp = __first + __d2; _VSTD::swap_ranges(__first, __mp, __middle); __first = __mp; __d1 -= __d2; @@ -925,12 +926,12 @@ rotate(__bit_iterator<_C, false> __first // equal -template +template bool -__equal_unaligned(__bit_iterator<_C, true> __first1, __bit_iterator<_C, true> __last1, - __bit_iterator<_C, true> __first2) +__equal_unaligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, + __bit_iterator<_Cp, true> __first2) { - typedef __bit_iterator<_C, true> _It; + typedef __bit_iterator<_Cp, true> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -1003,12 +1004,12 @@ __equal_unaligned(__bit_iterator<_C, tru return true; } -template +template bool -__equal_aligned(__bit_iterator<_C, true> __first1, __bit_iterator<_C, true> __last1, - __bit_iterator<_C, true> __first2) +__equal_aligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, + __bit_iterator<_Cp, true> __first2) { - typedef __bit_iterator<_C, true> _It; + typedef __bit_iterator<_Cp, true> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -1046,31 +1047,31 @@ __equal_aligned(__bit_iterator<_C, true> return true; } -template +template inline _LIBCPP_INLINE_VISIBILITY bool -equal(__bit_iterator<_C, _IC1> __first1, __bit_iterator<_C, _IC1> __last1, __bit_iterator<_C, _IC2> __first2) +equal(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2) { if (__first1.__ctz_ == __first2.__ctz_) return __equal_aligned(__first1, __last1, __first2); return __equal_unaligned(__first1, __last1, __first2); } -template +template class __bit_iterator { public: - typedef typename _C::difference_type difference_type; + typedef typename _Cp::difference_type difference_type; typedef bool value_type; typedef __bit_iterator pointer; - typedef typename conditional<_IsConst, __bit_const_reference<_C>, __bit_reference<_C> >::type reference; + typedef typename conditional<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >::type reference; typedef random_access_iterator_tag iterator_category; private: - typedef typename _C::__storage_type __storage_type; - typedef typename conditional<_IsConst, typename _C::__const_storage_pointer, - typename _C::__storage_pointer>::type __storage_pointer; - static const unsigned __bits_per_word = _C::__bits_per_word; + typedef typename _Cp::__storage_type __storage_type; + typedef typename conditional<_IsConst, typename _Cp::__const_storage_pointer, + typename _Cp::__storage_pointer>::type __storage_pointer; + static const unsigned __bits_per_word = _Cp::__bits_per_word; __storage_pointer __seg_; unsigned __ctz_; @@ -1079,7 +1080,7 @@ public: _LIBCPP_INLINE_VISIBILITY __bit_iterator() _NOEXCEPT {} _LIBCPP_INLINE_VISIBILITY - __bit_iterator(const __bit_iterator<_C, false>& __it) _NOEXCEPT + __bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT : __seg_(__it.__seg_), __ctz_(__it.__ctz_) {} _LIBCPP_INLINE_VISIBILITY reference operator*() const _NOEXCEPT @@ -1187,34 +1188,34 @@ private: : __seg_(__s), __ctz_(__ctz) {} #if defined(__clang__) - friend typename _C::__self; + friend typename _Cp::__self; #else - friend class _C::__self; + friend class _Cp::__self; #endif - friend class __bit_reference<_C>; - friend class __bit_const_reference<_C>; - friend class __bit_iterator<_C, true>; - template friend struct __bit_array; - template friend void __fill_n_false(__bit_iterator<_D, false> __first, typename _D::size_type __n); - template friend void __fill_n_true(__bit_iterator<_D, false> __first, typename _D::size_type __n); - template friend __bit_iterator<_D, false> __copy_aligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> __copy_unaligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> copy(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> __copy_backward_aligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> __copy_backward_unaligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> copy_backward(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); + friend class __bit_reference<_Cp>; + friend class __bit_const_reference<_Cp>; + friend class __bit_iterator<_Cp, true>; + template friend struct __bit_array; + template friend void __fill_n_false(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n); + template friend void __fill_n_true(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n); + template friend __bit_iterator<_Dp, false> __copy_aligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> __copy_unaligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> copy(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> __copy_backward_aligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> __copy_backward_unaligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> copy_backward(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); template friend __bit_iterator<__C2, false> __swap_ranges_aligned(__bit_iterator<__C1, false>, __bit_iterator<__C1, false>, __bit_iterator<__C2, false>); @@ -1224,22 +1225,22 @@ private: template friend __bit_iterator<__C2, false> swap_ranges(__bit_iterator<__C1, false>, __bit_iterator<__C1, false>, __bit_iterator<__C2, false>); - template friend __bit_iterator<_D, false> rotate(__bit_iterator<_D, false>, - __bit_iterator<_D, false>, - __bit_iterator<_D, false>); - template friend bool __equal_aligned(__bit_iterator<_D, true>, - __bit_iterator<_D, true>, - __bit_iterator<_D, true>); - template friend bool __equal_unaligned(__bit_iterator<_D, true>, - __bit_iterator<_D, true>, - __bit_iterator<_D, true>); - template friend bool equal(__bit_iterator<_D, _IC1>, - __bit_iterator<_D, _IC1>, - __bit_iterator<_D, _IC2>); - template friend __bit_iterator<_D, false> __find_bool_true(__bit_iterator<_D, false>, - typename _D::size_type); - template friend __bit_iterator<_D, false> __find_bool_false(__bit_iterator<_D, false>, - typename _D::size_type); + template friend __bit_iterator<_Dp, false> rotate(__bit_iterator<_Dp, false>, + __bit_iterator<_Dp, false>, + __bit_iterator<_Dp, false>); + template friend bool __equal_aligned(__bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>); + template friend bool __equal_unaligned(__bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>); + template friend bool equal(__bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC2>); + template friend __bit_iterator<_Dp, false> __find_bool_true(__bit_iterator<_Dp, false>, + typename _Dp::size_type); + template friend __bit_iterator<_Dp, false> __find_bool_false(__bit_iterator<_Dp, false>, + typename _Dp::size_type); }; _LIBCPP_END_NAMESPACE_STD Modified: head/contrib/libc++/include/__config ============================================================================== --- head/contrib/libc++/include/__config Tue Mar 13 23:45:30 2012 (r232949) +++ head/contrib/libc++/include/__config Wed Mar 14 00:09:36 2012 (r232950) @@ -58,6 +58,17 @@ # endif #endif // _WIN32 +#ifdef __sun__ +# include +# ifdef _LITTLE_ENDIAN +# define _LIBCPP_LITTLE_ENDIAN 1 +# define _LIBCPP_BIG_ENDIAN 0 +# else +# define _LIBCPP_LITTLE_ENDIAN 0 +# define _LIBCPP_BIG_ENDIAN 1 +# endif +#endif // __sun__ + #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) # include # if __BYTE_ORDER == __LITTLE_ENDIAN @@ -160,6 +171,10 @@ typedef __char32_t char32_t; #define _LIBCPP_NO_RTTI #endif +#if !(__has_feature(cxx_strong_enums)) +#define _LIBCPP_HAS_NO_STRONG_ENUMS +#endif + #if !(__has_feature(cxx_decltype)) #define _LIBCPP_HAS_NO_DECLTYPE #endif @@ -223,6 +238,7 @@ typedef __char32_t char32_t; #if __has_feature(objc_arc_weak) #define _LIBCPP_HAS_OBJC_ARC_WEAK +#define _LIBCPP_HAS_NO_STRONG_ENUMS #endif #if !(__has_feature(cxx_constexpr)) @@ -371,7 +387,25 @@ template struct __static_asse #define __has_feature(__x) 0 #endif -#if __APPLE__ || __FreeBSD__ || _WIN32 +#if __has_feature(cxx_explicit_conversions) +# define _LIBCPP_EXPLICIT explicit +#else +# define _LIBCPP_EXPLICIT +#endif + +#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS +#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_VISIBLE x { enum _ +#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ + _ __v_; \ + _LIBCPP_ALWAYS_INLINE x(_ __v) : __v_(__v) {} \ + _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \ + }; +#else // _LIBCPP_HAS_NO_STRONG_ENUMS +#define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_VISIBLE x +#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) +#endif // _LIBCPP_HAS_NO_STRONG_ENUMS + +#if __APPLE__ || __FreeBSD__ || _WIN32 || __sun__ #define _LIBCPP_LOCALE__L_EXTENSIONS 1 #endif #if __FreeBSD__ @@ -382,7 +416,7 @@ template struct __static_asse #define _LIBCPP_HAS_DEFAULTRUNELOCALE #endif -#if __APPLE__ || __FreeBSD__ +#if __APPLE__ || __FreeBSD__ || __sun__ #define _LIBCPP_WCTYPE_IS_MASK #endif Modified: head/contrib/libc++/include/__debug ============================================================================== --- head/contrib/libc++/include/__debug Tue Mar 13 23:45:30 2012 (r232949) +++ head/contrib/libc++/include/__debug Wed Mar 14 00:09:36 2012 (r232950) @@ -83,8 +83,8 @@ _C_node<_Cont>::__dereferenceable(const { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__dereferenceable(__j); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__dereferenceable(__j); } template @@ -93,8 +93,8 @@ _C_node<_Cont>::__decrementable(const vo { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__decrementable(__j); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__decrementable(__j); } template @@ -103,8 +103,8 @@ _C_node<_Cont>::__addable(const void* __ { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__addable(__j, __n); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__addable(__j, __n); } template @@ -113,8 +113,8 @@ _C_node<_Cont>::__subscriptable(const vo { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__subscriptable(__j, __n); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__subscriptable(__j, __n); } class _LIBCPP_VISIBLE __libcpp_db Modified: head/contrib/libc++/include/__functional_03 ============================================================================== --- head/contrib/libc++/include/__functional_03 Tue Mar 13 23:45:30 2012 (r232949) +++ head/contrib/libc++/include/__functional_03 Wed Mar 14 00:09:36 2012 (r232950) @@ -60,140 +60,140 @@ public: } }; -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R _T::*> -mem_fn(_R _T::* __pm) +__mem_fn<_Rp _Tp::*> +mem_fn(_Rp _Tp::* __pm) { - return __mem_fn<_R _T::*>(__pm); + return __mem_fn<_Rp _Tp::*>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)()) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)()) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0)> -mem_fn(_R (_T::* __pm)(_A0)) +__mem_fn<_Rp (_Tp::*)(_A0)> +mem_fn(_Rp (_Tp::* __pm)(_A0)) { - return __mem_fn<_R (_T::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1)> -mem_fn(_R (_T::* __pm)(_A0, _A1)) +__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1)) { - return __mem_fn<_R (_T::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1, _A2)> -mem_fn(_R (_T::* __pm)(_A0, _A1, _A2)) +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2)) { - return __mem_fn<_R (_T::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)() const) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)() const) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0)> -mem_fn(_R (_T::* __pm)(_A0) const) +__mem_fn<_Rp (_Tp::*)(_A0)> +mem_fn(_Rp (_Tp::* __pm)(_A0) const) { - return __mem_fn<_R (_T::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1)> -mem_fn(_R (_T::* __pm)(_A0, _A1) const) +__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1) const) { - return __mem_fn<_R (_T::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1, _A2)> -mem_fn(_R (_T::* __pm)(_A0, _A1, _A2) const) +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2) const) { - return __mem_fn<_R (_T::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)() volatile) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)() volatile) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0)> -mem_fn(_R (_T::* __pm)(_A0) volatile) +__mem_fn<_Rp (_Tp::*)(_A0)> +mem_fn(_Rp (_Tp::* __pm)(_A0) volatile) { - return __mem_fn<_R (_T::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1)> -mem_fn(_R (_T::* __pm)(_A0, _A1) volatile) +__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1) volatile) { - return __mem_fn<_R (_T::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1, _A2)> -mem_fn(_R (_T::* __pm)(_A0, _A1, _A2) volatile) +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2) volatile) { - return __mem_fn<_R (_T::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)() const volatile) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)() const volatile) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 00:26:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB50A106564A; Wed, 14 Mar 2012 00:26:36 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAE008FC14; Wed, 14 Mar 2012 00:26:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2E0QajJ069539; Wed, 14 Mar 2012 00:26:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2E0QawP069537; Wed, 14 Mar 2012 00:26:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201203140026.q2E0QawP069537@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Mar 2012 00:26: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: r232951 - head/sys/dev/fxp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 00:26:37 -0000 Author: yongari Date: Wed Mar 14 00:26:36 2012 New Revision: 232951 URL: http://svn.freebsd.org/changeset/base/232951 Log: fxp(4) does not handle deferred dma map loading. Tell bus_dmamap_load(9) that it should return immediately with error when there are insufficient mapping resources. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:09:36 2012 (r232950) +++ head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:26:36 2012 (r232951) @@ -681,7 +681,8 @@ fxp_attach(device_t dev) goto fail; } error = bus_dmamap_load(sc->fxp_stag, sc->fxp_smap, sc->fxp_stats, - sizeof(struct fxp_stats), fxp_dma_map_addr, &sc->stats_addr, 0); + sizeof(struct fxp_stats), fxp_dma_map_addr, &sc->stats_addr, + BUS_DMA_NOWAIT); if (error) { device_printf(dev, "could not load the stats DMA buffer\n"); goto fail; @@ -705,7 +706,7 @@ fxp_attach(device_t dev) error = bus_dmamap_load(sc->cbl_tag, sc->cbl_map, sc->fxp_desc.cbl_list, FXP_TXCB_SZ, fxp_dma_map_addr, - &sc->fxp_desc.cbl_addr, 0); + &sc->fxp_desc.cbl_addr, BUS_DMA_NOWAIT); if (error) { device_printf(dev, "could not load TxCB DMA buffer\n"); goto fail; @@ -729,7 +730,8 @@ fxp_attach(device_t dev) goto fail; } error = bus_dmamap_load(sc->mcs_tag, sc->mcs_map, sc->mcsp, - sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, &sc->mcs_addr, 0); + sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, &sc->mcs_addr, + BUS_DMA_NOWAIT); if (error) { device_printf(dev, "can't load the multicast setup DMA buffer\n"); From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 00:54:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 344B31065676; Wed, 14 Mar 2012 00:54:38 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 065158FC12; Wed, 14 Mar 2012 00:54:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2E0sb9m070523; Wed, 14 Mar 2012 00:54:37 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2E0sbkg070521; Wed, 14 Mar 2012 00:54:37 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201203140054.q2E0sbkg070521@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Mar 2012 00:54: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: r232953 - head/sys/dev/fxp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 00:54:38 -0000 Author: yongari Date: Wed Mar 14 00:54:37 2012 New Revision: 232953 URL: http://svn.freebsd.org/changeset/base/232953 Log: Fix white space nits. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:41:37 2012 (r232952) +++ head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:54:37 2012 (r232953) @@ -236,11 +236,11 @@ static int fxp_ioctl(struct ifnet *ifp, caddr_t data); static void fxp_watchdog(struct fxp_softc *sc); static void fxp_add_rfabuf(struct fxp_softc *sc, - struct fxp_rx *rxp); + struct fxp_rx *rxp); static void fxp_discard_rfabuf(struct fxp_softc *sc, - struct fxp_rx *rxp); + struct fxp_rx *rxp); static int fxp_new_rfabuf(struct fxp_softc *sc, - struct fxp_rx *rxp); + struct fxp_rx *rxp); static int fxp_mc_addrs(struct fxp_softc *sc); static void fxp_mc_setup(struct fxp_softc *sc); static uint16_t fxp_eeprom_getword(struct fxp_softc *sc, int offset, @@ -272,7 +272,7 @@ static int sysctl_hw_fxp_int_delay(SYSC static void fxp_scb_wait(struct fxp_softc *sc); static void fxp_scb_cmd(struct fxp_softc *sc, int cmd); static void fxp_dma_wait(struct fxp_softc *sc, - volatile uint16_t *status, bus_dma_tag_t dmat, + volatile uint16_t *status, bus_dma_tag_t dmat, bus_dmamap_t map); static device_method_t fxp_methods[] = { @@ -1543,7 +1543,7 @@ fxp_encap(struct fxp_softc *sc, struct m } *m_head = m; error = bus_dmamap_load_mbuf_sg(sc->fxp_txmtag, txp->tx_map, - *m_head, segs, &nseg, 0); + *m_head, segs, &nseg, 0); if (error != 0) { m_freem(*m_head); *m_head = NULL; @@ -2050,7 +2050,7 @@ fxp_update_stats(struct fxp_softc *sc) */ sc->rx_idle_secs++; } - ifp->if_ierrors += + ifp->if_ierrors += le32toh(sp->rx_crc_errors) + le32toh(sp->rx_alignment_errors) + le32toh(sp->rx_rnr_errors) + @@ -2177,7 +2177,7 @@ fxp_stop(struct fxp_softc *sc) txp = sc->fxp_desc.tx_list; if (txp != NULL) { for (i = 0; i < FXP_NTXCB; i++) { - if (txp[i].tx_mbuf != NULL) { + if (txp[i].tx_mbuf != NULL) { bus_dmamap_sync(sc->fxp_txmtag, txp[i].tx_map, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->fxp_txmtag, From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 06:56:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3DC11065673; Wed, 14 Mar 2012 06:56:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCADE8FC1E; Wed, 14 Mar 2012 06:56:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2E6ut8L082119; Wed, 14 Mar 2012 06:56:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2E6utZi082117; Wed, 14 Mar 2012 06:56:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203140656.q2E6utZi082117@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 14 Mar 2012 06:56:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232955 - stable/9/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 06:56:56 -0000 Author: kib Date: Wed Mar 14 06:56:55 2012 New Revision: 232955 URL: http://svn.freebsd.org/changeset/base/232955 Log: MFC r232660: In batch mode, exit after receiving SIGINT, instead of immediate output of the next display. Modified: stable/9/contrib/top/top.c Directory Properties: stable/9/contrib/top/ (props changed) Modified: stable/9/contrib/top/top.c ============================================================================== --- stable/9/contrib/top/top.c Wed Mar 14 06:42:12 2012 (r232954) +++ stable/9/contrib/top/top.c Wed Mar 14 06:56:55 2012 (r232955) @@ -723,6 +723,10 @@ restart: if (!interactive) { sleep(delay); + if (leaveflag) { + end_screen(); + exit(0); + } } else while (no_command) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 07:08:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41638106566C; Wed, 14 Mar 2012 07:08:16 +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 2B11E8FC12; Wed, 14 Mar 2012 07:08:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2E78GdO082521; Wed, 14 Mar 2012 07:08:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2E78FGL082519; Wed, 14 Mar 2012 07:08:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203140708.q2E78FGL082519@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 14 Mar 2012 07:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232956 - stable/9/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 07:08:16 -0000 Author: kib Date: Wed Mar 14 07:08:15 2012 New Revision: 232956 URL: http://svn.freebsd.org/changeset/base/232956 Log: MFC r232833: Remove not needed ARGSUSED lint command. Modified: stable/9/sys/ufs/ffs/ffs_vnops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_vnops.c Wed Mar 14 06:56:55 2012 (r232955) +++ stable/9/sys/ufs/ffs/ffs_vnops.c Wed Mar 14 07:08:15 2012 (r232956) @@ -402,7 +402,6 @@ ffs_lock(ap) /* * Vnode op for reading. */ -/* ARGSUSED */ static int ffs_read(ap) struct vop_read_args /* { From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 07:10:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A437106564A; Wed, 14 Mar 2012 07:10:37 +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 430398FC0A; Wed, 14 Mar 2012 07:10:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2E7AbBi082638; Wed, 14 Mar 2012 07:10:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2E7Abcc082636; Wed, 14 Mar 2012 07:10:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203140710.q2E7Abcc082636@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 14 Mar 2012 07:10: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: r232957 - stable/8/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 07:10:37 -0000 Author: kib Date: Wed Mar 14 07:10:36 2012 New Revision: 232957 URL: http://svn.freebsd.org/changeset/base/232957 Log: MFC r232660: In batch mode, exit after receiving SIGINT, instead of immediate output of the next display. Modified: stable/8/contrib/top/top.c Directory Properties: stable/8/contrib/top/ (props changed) Modified: stable/8/contrib/top/top.c ============================================================================== --- stable/8/contrib/top/top.c Wed Mar 14 07:08:15 2012 (r232956) +++ stable/8/contrib/top/top.c Wed Mar 14 07:10:36 2012 (r232957) @@ -723,6 +723,10 @@ restart: if (!interactive) { sleep(delay); + if (leaveflag) { + end_screen(); + exit(0); + } } else while (no_command) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 08:00:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1F7F106564A; Wed, 14 Mar 2012 08:00:33 +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 A83428FC18; Wed, 14 Mar 2012 08:00:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2E80X8E084225; Wed, 14 Mar 2012 08:00:33 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2E80XPN084222; Wed, 14 Mar 2012 08:00:33 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201203140800.q2E80XPN084222@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 14 Mar 2012 08:00: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: r232958 - head/sys/contrib/dev/ral X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 08:00:33 -0000 Author: bschmidt Date: Wed Mar 14 08:00:33 2012 New Revision: 232958 URL: http://svn.freebsd.org/changeset/base/232958 Log: Import the latest microcode.h which was used to generate the current firmware files and adjust the Makefile. Obtained from: OpenBSD Added: head/sys/contrib/dev/ral/microcode.h (contents, props changed) Modified: head/sys/contrib/dev/ral/Makefile Modified: head/sys/contrib/dev/ral/Makefile ============================================================================== --- head/sys/contrib/dev/ral/Makefile Wed Mar 14 07:10:36 2012 (r232957) +++ head/sys/contrib/dev/ral/Makefile Wed Mar 14 08:00:33 2012 (r232958) @@ -2,31 +2,35 @@ FILES= rt2561s.fw.uu rt2561.fw.uu rt2661.fw.uu rt2860.fw.uu -rt2561s.fw.uu: rt2661_ucode.h LICENSE - (cat rt2661_ucode.h; \ +rt2561s.fw.uu: microcode.h LICENSE + (echo '#include '; \ + cat microcode.h; \ echo 'int main(void) { \ - write(1, rt2561s_ucode, sizeof(rt2561s_ucode)); return 0; \ + write(1, rt2561s, sizeof(rt2561s)); return 0; \ }') | ${CC} -o build -x c - (sed 's/^/# /' LICENSE; ./build | uuencode rt2561s.fw) > ${.TARGET} -rt2561.fw.uu: rt2661_ucode.h LICENSE - (cat rt2661_ucode.h; \ +rt2561.fw.uu: microcode.h LICENSE + (echo '#include '; \ + cat microcode.h; \ echo 'int main(void) { \ - write(1, rt2561_ucode, sizeof(rt2561_ucode)); return 0; \ + write(1, rt2561, sizeof(rt2561)); return 0; \ }') | ${CC} -o build -x c - (sed 's/^/# /' LICENSE; ./build | uuencode rt2561.fw) > ${.TARGET} -rt2661.fw.uu: rt2661_ucode.h LICENSE - (cat rt2661_ucode.h; \ +rt2661.fw.uu: microcode.h LICENSE + (echo '#include '; \ + cat microcode.h; \ echo 'int main(void) { \ - write(1, rt2661_ucode, sizeof(rt2661_ucode)); return 0; \ + write(1, rt2661, sizeof(rt2661)); return 0; \ }') | ${CC} -o build -x c - (sed 's/^/# /' LICENSE; ./build | uuencode rt2661.fw) > ${.TARGET} -rt2860.fw.uu: rt2661_ucode.h LICENSE - (cat rt2661_ucode.h; \ +rt2860.fw.uu: microcode.h LICENSE + (echo '#include '; \ + cat microcode.h; \ echo 'int main(void) { \ - write(1, rt2860_ucode, sizeof(rt2860_ucode)); return 0; \ + write(1, rt2860, sizeof(rt2860)); return 0; \ }') | ${CC} -o build -x c - (sed 's/^/# /' LICENSE; ./build | uuencode rt2860.fw) > ${.TARGET} Added: head/sys/contrib/dev/ral/microcode.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/ral/microcode.h Wed Mar 14 08:00:33 2012 (r232958) @@ -0,0 +1,3016 @@ +/* $FreeBSD$ */ +/* $OpenBSD: microcode.h,v 1.7 2010/04/05 14:14:02 damien Exp $ */ + +/*- + * Copyright (c) 2005-2010, Ralink Technology, Corp. + * Paul Lin + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * This file contains the loadable 8051 microcodes for the Ralink RT2561, + * RT2561S, RT2661 and RT2860 chipsets. + */ + +static const uint8_t rt2561[] = { + 0x02, 0x1c, 0x12, 0x02, 0x13, 0xcb, 0xc2, 0x8c, 0x22, 0x22, 0x00, + 0x02, 0x16, 0x0f, 0xc2, 0xaf, 0xc2, 0x8d, 0x75, 0x8c, 0x94, 0x75, + 0x8a, 0x93, 0xd2, 0xaf, 0x22, 0x02, 0x18, 0xda, 0x12, 0x1b, 0xe8, + 0x40, 0x03, 0x02, 0x02, 0x1e, 0x90, 0x21, 0x02, 0xe0, 0xf5, 0x2d, + 0x90, 0x00, 0x03, 0xe0, 0x12, 0x08, 0x25, 0x00, 0xb0, 0x00, 0x00, + 0xce, 0x01, 0x00, 0x5e, 0x10, 0x00, 0x6f, 0x11, 0x00, 0xf2, 0x20, + 0x01, 0x4d, 0x21, 0x01, 0x70, 0x22, 0x01, 0x84, 0x30, 0x01, 0x8f, + 0x31, 0x01, 0xd5, 0x50, 0x01, 0x9f, 0x51, 0x01, 0xf2, 0x52, 0x02, + 0x06, 0x60, 0x00, 0x00, 0x02, 0x14, 0x90, 0x00, 0x0a, 0xe0, 0x20, + 0xe5, 0x03, 0x30, 0x07, 0x03, 0xd2, 0x08, 0x22, 0x12, 0x17, 0xa5, + 0x22, 0x90, 0x21, 0x00, 0xe0, 0xf5, 0x11, 0xe5, 0x11, 0xc4, 0x33, + 0x54, 0xe0, 0x24, 0x21, 0xf5, 0x82, 0xe4, 0x34, 0x21, 0xf5, 0x83, + 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x11, 0xc4, 0x33, 0x54, 0xe0, 0x24, + 0x2c, 0xf5, 0x82, 0xe4, 0x34, 0x21, 0xf5, 0x83, 0xe5, 0x11, 0xf0, + 0xc4, 0x33, 0x54, 0xe0, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x21, + 0xf5, 0x83, 0xe5, 0x2d, 0xf0, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0x22, + 0x12, 0x11, 0x31, 0x90, 0x21, 0x00, 0xe0, 0xf5, 0x31, 0x60, 0x05, + 0x12, 0x1b, 0x8a, 0x80, 0x03, 0x12, 0x1b, 0x3d, 0xe4, 0x90, 0x21, + 0x03, 0xf0, 0xaf, 0x2d, 0x12, 0x1c, 0x62, 0x22, 0x75, 0x31, 0xff, + 0x90, 0x01, 0x00, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x01, 0x01, 0xe0, + 0x54, 0xfe, 0xf0, 0x54, 0x3e, 0xf0, 0xe4, 0x90, 0x00, 0x0b, 0xf0, + 0xf0, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, 0x12, 0x1c, 0x62, 0x22, + 0x7e, 0x2b, 0x7f, 0x80, 0x7d, 0x03, 0x12, 0x04, 0x0e, 0x90, 0x34, + 0xcd, 0xe0, 0x20, 0xe3, 0xf9, 0x90, 0x21, 0x14, 0x12, 0x08, 0x01, + 0x90, 0x34, 0xc0, 0x12, 0x08, 0x0d, 0x90, 0x21, 0x18, 0x12, 0x08, + 0x01, 0x90, 0x34, 0xc8, 0x12, 0x08, 0x0d, 0x90, 0x21, 0x1c, 0x12, + 0x08, 0x01, 0x90, 0x34, 0xc4, 0x12, 0x08, 0x0d, 0x90, 0x34, 0xcc, + 0x74, 0x01, 0xf0, 0xa3, 0xe0, 0x44, 0x04, 0xf0, 0x90, 0x01, 0x01, + 0xe0, 0x44, 0x01, 0xf0, 0x44, 0x40, 0xf0, 0x90, 0x00, 0x0b, 0xe0, + 0x44, 0x10, 0xf0, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, 0x12, + 0x1c, 0x62, 0x22, 0x90, 0x01, 0x00, 0xe0, 0x54, 0xf7, 0xf0, 0x90, + 0x01, 0x01, 0xe0, 0x54, 0xfe, 0xf0, 0x54, 0xbf, 0xf0, 0x90, 0x00, + 0x0b, 0xe0, 0x54, 0xef, 0xf0, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, + 0x2d, 0x12, 0x1c, 0x62, 0x22, 0x7e, 0x2b, 0x7f, 0x80, 0x7d, 0x03, + 0x12, 0x04, 0x0e, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, 0x12, + 0x1c, 0x62, 0x22, 0xd2, 0x05, 0x85, 0x2d, 0x23, 0xe4, 0x90, 0x21, + 0x03, 0xf0, 0x22, 0x12, 0x1a, 0x74, 0xc2, 0x00, 0xe4, 0x90, 0x21, + 0x03, 0xf0, 0xaf, 0x2d, 0x12, 0x1c, 0x62, 0x22, 0x85, 0x2d, 0x25, + 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xfb, 0xff, 0xf0, 0xe4, 0x90, 0x00, + 0x07, 0xf0, 0x90, 0x00, 0x0a, 0x74, 0x04, 0xf0, 0xe4, 0x90, 0x00, + 0x08, 0xf0, 0x90, 0x21, 0x00, 0xe0, 0x90, 0x00, 0x09, 0xf0, 0x90, + 0x00, 0x07, 0x74, 0x71, 0xf0, 0xef, 0x44, 0x04, 0x90, 0x00, 0x0b, + 0xf0, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0x22, 0x90, 0x21, 0x00, 0xe0, + 0xff, 0x54, 0x1f, 0xf5, 0x30, 0xa3, 0xe0, 0xf5, 0x27, 0x8f, 0x26, + 0x12, 0x08, 0x90, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, 0x12, + 0x1c, 0x62, 0x22, 0x90, 0x21, 0x00, 0xe0, 0xf5, 0x2c, 0x12, 0x18, + 0x13, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, 0x12, 0x1c, 0x62, + 0x22, 0x12, 0x19, 0x53, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, + 0x12, 0x1c, 0x62, 0x22, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, + 0x12, 0x1c, 0x62, 0x22, 0x8e, 0x15, 0x8f, 0x16, 0xca, 0xed, 0xca, + 0xc9, 0xeb, 0xc9, 0x30, 0x0a, 0x04, 0x7f, 0x4a, 0x80, 0x02, 0x7f, + 0x42, 0xcb, 0xef, 0xcb, 0xea, 0xc3, 0x94, 0x04, 0x50, 0x02, 0x80, + 0x01, 0xc3, 0x40, 0x04, 0xcb, 0x44, 0x20, 0xcb, 0x85, 0x16, 0x82, + 0x85, 0x15, 0x83, 0xeb, 0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x16, 0x82, + 0x85, 0x15, 0x83, 0xa3, 0xa3, 0xe5, 0x1a, 0xf0, 0xe5, 0x19, 0x85, + 0x16, 0x82, 0x85, 0x15, 0x83, 0xa3, 0xa3, 0xa3, 0xf0, 0xe5, 0x16, + 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x15, 0xf5, 0x83, 0x74, 0x0f, + 0xf0, 0xe5, 0x16, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x15, 0xf5, + 0x83, 0xe4, 0xf0, 0xe5, 0x16, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, + 0x15, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x16, 0x24, 0x07, 0xf5, 0x82, + 0xe4, 0x35, 0x15, 0xf5, 0x83, 0x74, 0x10, 0xf0, 0xea, 0x90, 0x1a, + 0x9c, 0x93, 0xfb, 0xea, 0x64, 0x01, 0x60, 0x08, 0xea, 0x64, 0x02, + 0x60, 0x03, 0xba, 0x03, 0x04, 0xcb, 0x44, 0x08, 0xcb, 0xe5, 0x16, + 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x15, 0xf5, 0x83, 0xeb, 0xf0, + 0xe5, 0x16, 0x24, 0x15, 0xf5, 0x82, 0xe4, 0x35, 0x15, 0xf5, 0x83, + 0x74, 0xff, 0xf0, 0xe5, 0x16, 0x24, 0x16, 0xf5, 0x82, 0xe4, 0x35, + 0x15, 0xf5, 0x83, 0xe9, 0xf0, 0xe5, 0x16, 0x24, 0x09, 0xf5, 0x82, + 0xe4, 0x35, 0x15, 0xf5, 0x83, 0x74, 0x04, 0xf0, 0x25, 0x1a, 0xf5, + 0x1a, 0xe4, 0x35, 0x19, 0xf5, 0x19, 0xea, 0xc3, 0x94, 0x04, 0x40, + 0x03, 0x02, 0x03, 0xd6, 0xea, 0x60, 0x03, 0xba, 0x01, 0x1f, 0xea, + 0x24, 0x01, 0xfd, 0xe4, 0x33, 0xfc, 0xe5, 0x1a, 0xae, 0x19, 0x78, + 0x03, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0x12, 0x07, + 0x96, 0x8e, 0x19, 0x8f, 0x1a, 0x02, 0x03, 0xb6, 0xea, 0x24, 0xff, + 0xfd, 0xe4, 0x34, 0xff, 0xfc, 0x7e, 0x00, 0x7f, 0x0b, 0x12, 0x07, + 0x84, 0xcc, 0xee, 0xcc, 0xcd, 0xef, 0xcd, 0xe5, 0x1a, 0xc4, 0xf8, + 0x54, 0x0f, 0xc8, 0x68, 0xff, 0xe5, 0x19, 0xc4, 0x54, 0xf0, 0x48, + 0xfe, 0x12, 0x07, 0x96, 0x8c, 0x1b, 0x8d, 0x1c, 0xea, 0x24, 0xff, + 0xfd, 0xe4, 0x34, 0xff, 0xfc, 0x7e, 0x00, 0x7f, 0x0b, 0x12, 0x07, + 0x84, 0xcc, 0xee, 0xcc, 0xcd, 0xef, 0xcd, 0xe5, 0x1a, 0xc4, 0xf8, + 0x54, 0x0f, 0xc8, 0x68, 0xff, 0xe5, 0x19, 0xc4, 0x54, 0xf0, 0x48, + 0xfe, 0x12, 0x07, 0x96, 0x8e, 0x19, 0x8f, 0x1a, 0xe5, 0x1c, 0x45, + 0x1b, 0x60, 0x08, 0x05, 0x1a, 0xe5, 0x1a, 0x70, 0x02, 0x05, 0x19, + 0xea, 0x24, 0xff, 0xfd, 0xe4, 0x34, 0xff, 0xfc, 0x7e, 0x00, 0x7f, + 0x03, 0x12, 0x07, 0x84, 0xd3, 0xe5, 0x1c, 0x9f, 0xe5, 0x1b, 0x9e, + 0x50, 0x18, 0xe5, 0x1c, 0x45, 0x1b, 0x60, 0x12, 0xba, 0x03, 0x0f, + 0xe5, 0x16, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x15, 0xf5, 0x83, + 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x16, 0x24, 0x0a, 0xf5, 0x82, 0xe4, + 0x35, 0x15, 0xf5, 0x83, 0xe5, 0x1a, 0xf0, 0xe5, 0x19, 0xff, 0xe5, + 0x16, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x15, 0xf5, 0x83, 0xef, + 0xf0, 0x80, 0x2d, 0xe5, 0x1a, 0x54, 0x3f, 0xff, 0xe5, 0x16, 0x24, + 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x15, 0xf5, 0x83, 0xef, 0xf0, 0xe5, + 0x1a, 0xae, 0x19, 0x78, 0x06, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, + 0xf9, 0xff, 0xe5, 0x16, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x15, + 0xf5, 0x83, 0xef, 0xf0, 0x85, 0x16, 0x82, 0x85, 0x15, 0x83, 0xe0, + 0x44, 0x01, 0xf0, 0x22, 0x8e, 0x12, 0x8f, 0x13, 0x8d, 0x14, 0xe5, + 0x14, 0xa2, 0xe1, 0x92, 0x09, 0xe5, 0x34, 0x24, 0x19, 0xf5, 0x82, + 0xe4, 0x35, 0x33, 0xf5, 0x83, 0xe0, 0xfd, 0xe5, 0x34, 0x24, 0x1a, + 0xf5, 0x82, 0xe4, 0x35, 0x33, 0xf5, 0x83, 0xe0, 0xfb, 0xa2, 0x09, + 0x92, 0x0a, 0x75, 0x19, 0x00, 0x75, 0x1a, 0x1a, 0x12, 0x02, 0x1f, + 0x30, 0x09, 0x04, 0x7f, 0xc8, 0x80, 0x02, 0x7f, 0xe8, 0xe5, 0x13, + 0x24, 0x18, 0xf5, 0x82, 0xe4, 0x35, 0x12, 0xf5, 0x83, 0xef, 0xf0, + 0xe5, 0x31, 0x60, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x01, 0xe5, + 0x13, 0x24, 0x19, 0xf5, 0x82, 0xe4, 0x35, 0x12, 0xf5, 0x83, 0xef, + 0xf0, 0xe5, 0x34, 0x24, 0x19, 0xf5, 0x82, 0xe4, 0x35, 0x33, 0xf5, + 0x83, 0xe0, 0xff, 0x7d, 0x1a, 0x7c, 0x00, 0x12, 0x0e, 0x64, 0xe5, + 0x13, 0x24, 0x1a, 0xf5, 0x82, 0xe4, 0x35, 0x12, 0xf5, 0x83, 0xef, + 0xf0, 0xe5, 0x13, 0x24, 0x1b, 0xf5, 0x82, 0xe4, 0x35, 0x12, 0xf5, + 0x83, 0xee, 0xf0, 0xe5, 0x31, 0x60, 0x60, 0xe5, 0x13, 0x24, 0x1c, + 0xff, 0xe4, 0x35, 0x12, 0xfe, 0xe5, 0x34, 0x24, 0x12, 0xfd, 0xe4, + 0x35, 0x33, 0xfc, 0x75, 0x1b, 0x11, 0x7b, 0x06, 0x12, 0x14, 0xab, + 0xe5, 0x13, 0x24, 0x22, 0xff, 0xe4, 0x35, 0x12, 0xfe, 0x7c, 0x30, + 0x7d, 0x10, 0x75, 0x1b, 0x11, 0x7b, 0x06, 0x12, 0x14, 0xab, 0xe5, + 0x13, 0x24, 0x28, 0xff, 0xe4, 0x35, 0x12, 0xfe, 0x7c, 0x30, 0x7d, + 0x08, 0x75, 0x1b, 0x11, 0x7b, 0x06, 0x12, 0x14, 0xab, 0xe5, 0x34, + 0x24, 0x18, 0xf5, 0x82, 0xe4, 0x35, 0x33, 0xf5, 0x83, 0xe0, 0xff, + 0xe5, 0x13, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x35, 0x12, 0xf5, 0x83, + 0xef, 0xf0, 0x80, 0x3f, 0xe5, 0x13, 0x24, 0x1c, 0xff, 0xe4, 0x35, + 0x12, 0xfe, 0x7c, 0x30, 0x7d, 0x10, 0x75, 0x1b, 0x11, 0x7b, 0x06, + 0x12, 0x14, 0xab, 0xe5, 0x13, 0x24, 0x22, 0xff, 0xe4, 0x35, 0x12, + 0xfe, 0x7c, 0x30, 0x7d, 0x08, 0x75, 0x1b, 0x11, 0x7b, 0x06, 0x12, + 0x14, 0xab, 0xe5, 0x13, 0x24, 0x28, 0xff, 0xe4, 0x35, 0x12, 0xfe, + 0x7c, 0x30, 0x7d, 0x10, 0x75, 0x1b, 0x11, 0x7b, 0x06, 0x12, 0x14, + 0xab, 0xe5, 0x13, 0x24, 0x2e, 0xf5, 0x82, 0xe4, 0x35, 0x12, 0xf5, + 0x83, 0xe4, 0xf0, 0xe5, 0x13, 0x24, 0x2f, 0xf5, 0x82, 0xe4, 0x35, + 0x12, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x34, 0x24, 0x11, 0xf5, 0x82, + 0xe4, 0x35, 0x33, 0xf5, 0x83, 0xe0, 0xff, 0xc3, 0x13, 0xff, 0xe5, + 0x13, 0x24, 0x30, 0xf5, 0x82, 0xe4, 0x35, 0x12, 0xf5, 0x83, 0xef, + 0xf0, 0x30, 0x09, 0x41, 0xe5, 0x13, 0x24, 0x30, 0xf5, 0x82, 0xe4, + 0x35, 0x12, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x31, 0x60, 0x04, 0x7e, + 0x00, 0x80, 0x02, 0x7e, 0x10, 0xef, 0x4e, 0xf0, 0xe5, 0x31, 0x60, + 0x06, 0x7e, 0x00, 0x7f, 0x00, 0x80, 0x0f, 0xe5, 0x14, 0x30, 0xe0, + 0x06, 0x7e, 0x00, 0x7f, 0xff, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, + 0xe5, 0x13, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x12, 0xf5, 0x83, + 0xef, 0xf0, 0x22, 0xe5, 0x13, 0x24, 0x30, 0xf5, 0x82, 0xe4, 0x35, + 0x12, 0xf5, 0x83, 0xe0, 0x44, 0x40, 0xf0, 0xe5, 0x14, 0x30, 0xe0, + 0x0f, 0xe5, 0x34, 0x24, 0x10, 0xf5, 0x82, 0xe4, 0x35, 0x33, 0xf5, + 0x83, 0xe0, 0xff, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x13, 0x24, 0x31, + 0xf5, 0x82, 0xe4, 0x35, 0x12, 0xf5, 0x83, 0xef, 0xf0, 0x22, 0xe5, + 0x34, 0x24, 0x11, 0xf5, 0x82, 0xe4, 0x35, 0x33, 0xf5, 0x83, 0xe0, + 0x30, 0xe7, 0x3b, 0xe5, 0x34, 0x24, 0x1c, 0xf5, 0x82, 0xe4, 0x35, + 0x33, 0xf5, 0x83, 0xe0, 0x65, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0xff, + 0xe5, 0x34, 0x24, 0x1d, 0xf5, 0x82, 0xe4, 0x35, 0x33, 0xf5, 0x83, + 0xe0, 0xff, 0x12, 0x1c, 0x62, 0x7e, 0x22, 0x7f, 0x10, 0x12, 0x18, + 0x7c, 0x8e, 0x33, 0x8f, 0x34, 0x90, 0x22, 0x2e, 0xe0, 0xfe, 0xa3, + 0xe0, 0x8e, 0x33, 0xf5, 0x34, 0xc3, 0x22, 0xd2, 0x0a, 0xe5, 0x34, + 0x24, 0x1b, 0xf5, 0x82, 0xe4, 0x35, 0x33, 0xf5, 0x83, 0xe0, 0x70, + 0x3a, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, 0xc0, 0x83, 0xc0, 0x82, + 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, + 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xc3, 0xef, 0x9d, 0xff, + 0xee, 0x9c, 0xfe, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0xa3, 0xef, 0xf0, + 0xd3, 0x94, 0x00, 0xee, 0x64, 0x80, 0x94, 0x80, 0x50, 0x03, 0x02, + 0x07, 0x27, 0x80, 0xc6, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, 0xe0, + 0xfe, 0xa3, 0xe0, 0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x50, 0x03, + 0x02, 0x07, 0x27, 0x12, 0x1c, 0x41, 0x85, 0x34, 0x82, 0x85, 0x33, + 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xc3, 0x9f, 0xee, 0x64, 0x80, + 0xf8, 0xec, 0x64, 0x80, 0x98, 0x40, 0x20, 0x85, 0x34, 0x82, 0x85, + 0x33, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3, + 0xe0, 0xff, 0xed, 0x9f, 0xff, 0xec, 0x9e, 0xd0, 0x82, 0xd0, 0x83, + 0xf0, 0xa3, 0xef, 0xf0, 0xc2, 0x0a, 0x85, 0x34, 0x82, 0x85, 0x33, + 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xe5, 0x34, 0x24, 0x10, 0xf5, + 0x82, 0xe4, 0x35, 0x33, 0xf5, 0x83, 0xe0, 0xfd, 0xc3, 0xef, 0x9d, + 0xfd, 0xee, 0x94, 0x00, 0xfc, 0x12, 0x16, 0x5a, 0x50, 0x2c, 0x85, + 0x34, 0x82, 0x85, 0x33, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfe, + 0xa3, 0xe0, 0xff, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, 0xa3, 0xa3, + 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xc3, 0xef, 0x9d, 0xff, 0xee, 0x9c, + 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0xa3, 0xef, 0xf0, 0xc2, 0x0a, 0x20, + 0x0a, 0x03, 0x02, 0x06, 0x37, 0x7e, 0x22, 0x7f, 0x10, 0x12, 0x18, + 0x7c, 0x8e, 0x33, 0x8f, 0x34, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfe, + 0xa3, 0xe0, 0xd3, 0x94, 0x00, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, + 0x0d, 0x7e, 0x22, 0x7f, 0x10, 0xad, 0x34, 0xac, 0x33, 0x12, 0x15, + 0x0e, 0x80, 0x1a, 0x12, 0x1b, 0xab, 0x85, 0x34, 0x82, 0x85, 0x33, + 0x83, 0xee, 0x8f, 0xf0, 0x12, 0x07, 0xeb, 0x7e, 0x22, 0x7f, 0x30, + 0xad, 0x34, 0xac, 0x33, 0x12, 0x15, 0x0e, 0x90, 0x22, 0x2e, 0xe0, + 0xfe, 0xa3, 0xe0, 0xff, 0x65, 0x34, 0x70, 0x03, 0xee, 0x65, 0x33, + 0x70, 0x02, 0xd3, 0x22, 0x8e, 0x33, 0x8f, 0x34, 0xc3, 0x22, 0xef, + 0x8d, 0xf0, 0xa4, 0xa8, 0xf0, 0xcf, 0x8c, 0xf0, 0xa4, 0x28, 0xce, + 0x8d, 0xf0, 0xa4, 0x2e, 0xfe, 0x22, 0xbc, 0x00, 0x0b, 0xbe, 0x00, + 0x29, 0xef, 0x8d, 0xf0, 0x84, 0xff, 0xad, 0xf0, 0x22, 0xe4, 0xcc, + 0xf8, 0x75, 0xf0, 0x08, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xec, + 0x33, 0xfc, 0xee, 0x9d, 0xec, 0x98, 0x40, 0x05, 0xfc, 0xee, 0x9d, + 0xfe, 0x0f, 0xd5, 0xf0, 0xe9, 0xe4, 0xce, 0xfd, 0x22, 0xed, 0xf8, + 0xf5, 0xf0, 0xee, 0x84, 0x20, 0xd2, 0x1c, 0xfe, 0xad, 0xf0, 0x75, + 0xf0, 0x08, 0xef, 0x2f, 0xff, 0xed, 0x33, 0xfd, 0x40, 0x07, 0x98, + 0x50, 0x06, 0xd5, 0xf0, 0xf2, 0x22, 0xc3, 0x98, 0xfd, 0x0f, 0xd5, + 0xf0, 0xea, 0x22, 0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, + 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83, 0xe0, + 0x38, 0xf0, 0x22, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, + 0xa3, 0xe0, 0xff, 0x22, 0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, + 0xf0, 0xa3, 0xef, 0xf0, 0x22, 0xa4, 0x25, 0x82, 0xf5, 0x82, 0xe5, + 0xf0, 0x35, 0x83, 0xf5, 0x83, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, + 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, + 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, + 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, + 0x8a, 0x83, 0x89, 0x82, 0xe4, 0x73, 0xe4, 0xff, 0x90, 0x30, 0x8c, + 0xe4, 0xf0, 0xef, 0x90, 0x1b, 0x51, 0x93, 0x44, 0x80, 0x90, 0x30, + 0x8d, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x90, 0x30, + 0x8c, 0xe0, 0xfe, 0x74, 0x36, 0x2f, 0xf8, 0xc6, 0xee, 0xc6, 0xa3, + 0xe0, 0xfe, 0xef, 0x90, 0x1b, 0x51, 0x93, 0x44, 0x80, 0x6e, 0x60, + 0x01, 0x1f, 0x0f, 0xef, 0xc3, 0x94, 0x09, 0x40, 0xc8, 0x22, 0x00, + 0x00, 0x00, 0x00, 0xe5, 0x30, 0x12, 0x08, 0x25, 0x08, 0xb1, 0x00, + 0x09, 0x1f, 0x01, 0x09, 0x87, 0x02, 0x0a, 0x1b, 0x03, 0x0a, 0x6f, + 0x04, 0x0a, 0xb6, 0x05, 0x0b, 0x29, 0x06, 0x0b, 0x98, 0x07, 0x00, + 0x00, 0x0b, 0xd0, 0xc2, 0x01, 0x12, 0x00, 0x06, 0x90, 0x30, 0x3a, + 0xe0, 0xf5, 0x12, 0xe5, 0x26, 0x20, 0xe5, 0x08, 0x90, 0x34, 0x98, + 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x34, 0x98, 0xe0, 0x44, 0x01, + 0xf0, 0xe5, 0x26, 0x30, 0xe6, 0x0f, 0xe5, 0x27, 0x30, 0xe6, 0x05, + 0x53, 0x12, 0xfd, 0x80, 0x12, 0x43, 0x12, 0x02, 0x80, 0x0d, 0xe5, + 0x27, 0x30, 0xe6, 0x05, 0x43, 0x12, 0x02, 0x80, 0x03, 0x53, 0x12, + 0xfd, 0xe5, 0x26, 0x30, 0xe7, 0x0f, 0xe5, 0x27, 0x30, 0xe7, 0x05, + 0x53, 0x12, 0xf7, 0x80, 0x12, 0x43, 0x12, 0x08, 0x80, 0x0d, 0xe5, + 0x27, 0x30, 0xe7, 0x05, 0x43, 0x12, 0x08, 0x80, 0x03, 0x53, 0x12, + 0xf7, 0x43, 0x12, 0x01, 0x43, 0x12, 0x04, 0x90, 0x30, 0x3a, 0xe5, + 0x12, 0xf0, 0x22, 0xc2, 0x01, 0x12, 0x00, 0x06, 0x90, 0x30, 0x3a, + 0xe0, 0xf5, 0x12, 0xe5, 0x26, 0x20, 0xe5, 0x08, 0x90, 0x34, 0x98, + 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x34, 0x98, 0xe0, 0x44, 0x01, + 0xf0, 0xe5, 0x26, 0x54, 0xc0, 0x60, 0x1c, 0xe5, 0x27, 0x30, 0xe6, + 0x05, 0x53, 0x12, 0xfd, 0x80, 0x03, 0x43, 0x12, 0x02, 0xe5, 0x27, + 0x30, 0xe7, 0x05, 0x53, 0x12, 0xf7, 0x80, 0x1f, 0x43, 0x12, 0x08, + 0x80, 0x1a, 0xe5, 0x27, 0x30, 0xe6, 0x05, 0x43, 0x12, 0x02, 0x80, + 0x03, 0x53, 0x12, 0xfd, 0xe5, 0x27, 0x30, 0xe7, 0x05, 0x43, 0x12, + 0x08, 0x80, 0x03, 0x53, 0x12, 0xf7, 0x43, 0x12, 0x01, 0x43, 0x12, + 0x04, 0x90, 0x30, 0x3a, 0xe5, 0x12, 0xf0, 0x22, 0xc2, 0x01, 0x12, + 0x00, 0x06, 0x90, 0x30, 0x3a, 0xe0, 0xf5, 0x12, 0x43, 0x12, 0x01, + 0x43, 0x12, 0x04, 0xe5, 0x26, 0x30, 0xe5, 0x5c, 0x90, 0x34, 0x98, + 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x26, 0x54, 0xc0, 0x60, 0x1c, 0xe5, + 0x27, 0x30, 0xe6, 0x05, 0x53, 0x12, 0xfd, 0x80, 0x03, 0x43, 0x12, + 0x02, 0xe5, 0x27, 0x30, 0xe7, 0x05, 0x53, 0x12, 0xf7, 0x80, 0x30, + 0x43, 0x12, 0x08, 0x80, 0x2b, 0xe5, 0x27, 0x30, 0xe6, 0x05, 0x43, + 0x12, 0x02, 0x80, 0x03, 0x53, 0x12, 0xfd, 0xe5, 0x27, 0x30, 0xe7, + 0x05, 0x43, 0x12, 0x08, 0x80, 0x03, 0x53, 0x12, 0xf7, 0xe5, 0x27, + 0xf4, 0x54, 0x1f, 0xff, 0x90, 0x30, 0x34, 0xe0, 0x54, 0xe0, 0x4f, + 0xf0, 0xe4, 0xf5, 0x2c, 0x90, 0x30, 0x3a, 0xe5, 0x12, 0xf0, 0x80, + 0x15, 0x90, 0x34, 0x98, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x27, 0xf4, + 0x54, 0x1f, 0xff, 0x90, 0x30, 0x34, 0xe0, 0x54, 0xe0, 0x4f, 0xf0, + 0x90, 0x30, 0x35, 0xe0, 0xf5, 0x12, 0x53, 0x12, 0xe0, 0xe5, 0x12, + 0xf0, 0x22, 0xc2, 0x01, 0x12, 0x00, 0x06, 0x90, 0x30, 0x3a, 0xe0, + 0xf5, 0x12, 0xe5, 0x26, 0x30, 0xe5, 0x3c, 0x90, 0x34, 0x98, 0xe0, + 0x44, 0x01, 0xf0, 0xe5, 0x27, 0x30, 0xe6, 0x05, 0x53, 0x12, 0xfd, + 0x80, 0x03, 0x43, 0x12, 0x02, 0xe5, 0x27, 0x30, 0xe7, 0x05, 0x53, + 0x12, 0xf7, 0x80, 0x03, 0x43, 0x12, 0x08, 0xe5, 0x26, 0x54, 0xc0, + 0x60, 0x08, 0x43, 0x12, 0x01, 0x43, 0x12, 0x04, 0x80, 0x06, 0x53, + 0x12, 0xfe, 0x43, 0x12, 0x04, 0x90, 0x30, 0x3a, 0xe5, 0x12, 0xf0, + 0x22, 0x90, 0x34, 0x98, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0xc2, 0x01, + 0x12, 0x00, 0x06, 0x90, 0x30, 0x3a, 0xe0, 0xf5, 0x12, 0xe5, 0x27, + 0x30, 0xe6, 0x05, 0x43, 0x12, 0x02, 0x80, 0x03, 0x53, 0x12, 0xfd, + 0xe5, 0x27, 0x30, 0xe7, 0x05, 0x43, 0x12, 0x08, 0x80, 0x03, 0x53, + 0x12, 0xf7, 0xe5, 0x26, 0x54, 0xc0, 0x60, 0x08, 0x53, 0x12, 0xfe, + 0x53, 0x12, 0xfb, 0x80, 0x06, 0x43, 0x12, 0x01, 0x43, 0x12, 0x04, + 0x90, 0x34, 0x98, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x30, 0x3a, 0xe5, + 0x12, 0xf0, 0x22, 0x20, 0x02, 0x13, 0x12, 0x1c, 0x1e, 0xaf, 0x29, + 0x7e, 0x00, 0x12, 0x1c, 0x74, 0xaf, 0x35, 0x7e, 0x00, 0x12, 0x1c, + 0x7b, 0xd2, 0x02, 0x90, 0x30, 0x3a, 0xe0, 0xf5, 0x12, 0xe5, 0x26, + 0x20, 0xe5, 0x0d, 0xc2, 0x01, 0x12, 0x00, 0x06, 0x90, 0x34, 0x98, + 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x34, 0x98, 0xe0, 0x44, 0x01, + 0xf0, 0xe5, 0x26, 0x54, 0xc0, 0x60, 0x2c, 0xc2, 0x01, 0x12, 0x00, + 0x06, 0xe5, 0x27, 0x30, 0xe6, 0x05, 0x53, 0x12, 0xfd, 0x80, 0x03, + 0x43, 0x12, 0x02, 0xe5, 0x27, 0x30, 0xe7, 0x05, 0x53, 0x12, 0xf7, + 0x80, 0x03, 0x43, 0x12, 0x08, 0x43, 0x12, 0x01, 0x43, 0x12, 0x04, + 0x90, 0x30, 0x3a, 0xe5, 0x12, 0xf0, 0x22, 0x30, 0x01, 0x03, 0x02, + 0x0b, 0xd0, 0x12, 0x15, 0xc0, 0xd2, 0x01, 0x22, 0xc2, 0x01, 0x12, + 0x00, 0x06, 0xe5, 0x26, 0x20, 0xe5, 0x09, 0x90, 0x34, 0x98, 0xe0, + 0x54, 0xfe, 0xf0, 0x80, 0x55, 0x90, 0x34, 0x98, 0xe0, 0x44, 0x01, + 0xf0, 0xe5, 0x26, 0x30, 0xe6, 0x0f, 0xe5, 0x27, 0x30, 0xe6, 0x05, + 0x53, 0x12, 0xfd, 0x80, 0x12, 0x43, 0x12, 0x02, 0x80, 0x0d, 0xe5, + 0x27, 0x30, 0xe6, 0x05, 0x43, 0x12, 0x02, 0x80, 0x03, 0x53, 0x12, + 0xfd, 0xe5, 0x26, 0x30, 0xe7, 0x0f, 0xe5, 0x27, 0x30, 0xe7, 0x05, + 0x53, 0x12, 0xf7, 0x80, 0x12, 0x43, 0x12, 0x08, 0x80, 0x0d, 0xe5, + 0x27, 0x30, 0xe7, 0x05, 0x43, 0x12, 0x08, 0x80, 0x03, 0x53, 0x12, + 0xf7, 0x43, 0x12, 0x01, 0x53, 0x12, 0xfb, 0x90, 0x30, 0x3a, 0xe5, + 0x12, 0xf0, 0x90, 0x30, 0x3a, 0xe0, 0xf5, 0x12, 0x22, 0xe5, 0x26, + 0x30, 0xe5, 0x2c, 0x20, 0x03, 0x21, 0xd2, 0x03, 0x12, 0x1c, 0x1e, + 0x75, 0x35, 0x06, 0x75, 0x29, 0x09, 0xaf, 0x29, 0x7e, 0x00, 0x12, + 0x1c, 0x74, 0x90, 0x30, 0x3a, 0xe0, 0xf5, 0x12, 0x53, 0x12, 0xfe, + 0x43, 0x12, 0x04, 0xe5, 0x12, 0xf0, 0x90, 0x34, 0x98, 0xe0, 0x44, + 0x01, 0xf0, 0x22, 0x90, 0x34, 0x98, 0xe0, 0x54, 0xfe, 0xf0, 0x22, + 0xe5, 0x31, 0x64, 0x01, 0x70, 0x41, 0x12, 0x1a, 0xd4, 0x40, 0x03, + 0x02, 0x0d, 0x4f, 0x12, 0x1b, 0x65, 0x50, 0x20, 0x7e, 0x2b, 0x7f, + 0x80, 0x7d, 0x03, 0x12, 0x04, 0x0e, 0x7f, 0x01, 0x12, 0x19, 0x78, + 0x40, 0x09, 0xd2, 0x09, 0x12, 0x0f, 0xee, 0xe4, 0xf5, 0x2f, 0x22, + 0x12, 0x0d, 0x50, 0x75, 0x2f, 0x01, 0x22, 0x7f, 0x01, 0x12, 0x19, + 0x78, 0x50, 0x04, 0x75, 0x2f, 0x02, 0x22, 0xd2, 0x09, 0x12, 0x0f, + 0xee, 0xe4, 0xf5, 0x2f, 0x22, 0x12, 0x1a, 0x1d, 0x50, 0x51, 0x12, + 0x1b, 0xcb, 0x90, 0x30, 0xf4, 0xe0, 0xf5, 0x2a, 0x7e, 0x30, 0x7f, + 0xec, 0xa3, 0xe0, 0xfd, 0xe4, 0xfb, 0x12, 0x19, 0x2b, 0xe4, 0xff, + 0xfe, 0x12, 0x1c, 0x36, 0x90, 0x00, 0x0a, 0x74, 0x02, 0xf0, 0x90, + 0x00, 0x0b, 0xe0, 0x44, 0x02, 0xff, 0xf0, 0xfd, 0x90, 0x01, 0x05, + 0x74, 0x20, 0xf0, 0x90, 0x01, 0x06, 0xe0, 0x44, 0x20, 0xf0, 0xed, + 0x54, 0xbf, 0x90, 0x00, 0x0b, 0xf0, 0x90, 0x34, 0xcc, 0xe0, 0x44, + 0x01, 0xf0, 0xa3, 0xe0, 0x44, 0x01, 0xf0, 0xa3, 0xe0, 0x44, 0x01, + 0xf0, 0xd2, 0x04, 0x12, 0x1a, 0x3a, 0x50, 0x43, 0x12, 0x1a, 0x57, + 0x7e, 0x30, 0x7f, 0xe0, 0x7c, 0x30, 0x7d, 0xec, 0x75, 0x1b, 0x11, + 0x7b, 0x06, 0x12, 0x14, 0xab, 0x90, 0x30, 0xf5, 0xe0, 0x75, 0xf0, + 0x20, 0xa4, 0xff, 0xae, 0xf0, 0x12, 0x1c, 0x36, 0x90, 0x00, 0x0b, + 0xe0, 0x54, 0xfd, 0xff, 0xf0, 0xfd, 0xe4, 0x90, 0x00, 0x04, 0xf0, + 0x90, 0x01, 0x06, 0xe0, 0x54, 0xdf, 0xf0, 0x90, 0x00, 0x0a, 0x74, + 0x40, 0xf0, 0x4d, 0x90, 0x00, 0x0b, 0xf0, 0xc2, 0x04, 0x12, 0x1a, + 0xfe, 0x50, 0x38, 0x12, 0x1a, 0x57, 0x7e, 0x30, 0x7f, 0xe0, 0x7c, + 0x1c, 0x7d, 0x82, 0x75, 0x1b, 0x12, 0x7b, 0x06, 0x12, 0x14, 0xab, + 0x90, 0x00, 0x04, 0x74, 0x02, 0xf0, 0x90, 0x00, 0x0a, 0xf0, 0xe4, + 0xff, 0xfe, 0x12, 0x1c, 0x36, 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xfd, + 0xf0, 0xe4, 0x90, 0x00, 0x04, 0xf0, 0x90, 0x01, 0x06, 0xe0, 0x54, + 0xdf, 0xf0, 0xc2, 0x04, 0x12, 0x1b, 0x28, 0x50, 0x25, 0x12, 0x1a, + 0x57, 0x7f, 0x02, 0x12, 0x19, 0x78, 0x90, 0x01, 0x04, 0xe0, 0x54, + 0x7f, 0xf0, 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xfd, 0xff, 0xf0, 0xe4, + 0x90, 0x00, 0x04, 0xf0, 0xef, 0x54, 0xbf, 0x90, 0x00, 0x0b, 0xf0, + 0xc2, 0x04, 0x12, 0x1a, 0xd4, 0x50, 0x2d, 0x12, 0x1a, 0x57, 0x7e, + 0x30, 0x7f, 0xe0, 0x7c, 0x1c, 0x7d, 0x82, 0x75, 0x1b, 0x12, 0x7b, + 0x06, 0x12, 0x14, 0xab, 0x90, 0x00, 0x04, 0x74, 0x02, 0xf0, 0x90, + 0x00, 0x0a, 0xf0, 0x90, 0x01, 0x06, 0xe0, 0x54, 0xdf, 0xf0, 0x90, + 0x00, 0x0b, 0xe0, 0x54, 0xbf, 0xf0, 0xc2, 0x04, 0x22, 0x90, 0x34, + 0xcd, 0xe0, 0xf9, 0x20, 0xe3, 0xf8, 0xe5, 0x2b, 0xf4, 0x60, 0x66, + 0x90, 0x34, 0xc0, 0x12, 0x08, 0x01, 0x85, 0x34, 0x82, 0x85, 0x33, + 0x83, 0x75, 0xf0, 0x20, 0xe5, 0x2b, 0x12, 0x08, 0x19, 0xe5, 0x82, + 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x12, 0x08, + 0x0d, 0x90, 0x34, 0xc8, 0x12, 0x08, 0x01, 0x85, 0x34, 0x82, 0x85, + 0x33, 0x83, 0x75, 0xf0, 0x20, 0xe5, 0x2b, 0x12, 0x08, 0x19, 0xe5, + 0x82, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x12, + 0x08, 0x0d, 0x90, 0x34, 0xd0, 0x12, 0x08, 0x01, 0x85, 0x34, 0x82, + 0x85, 0x33, 0x83, 0x75, 0xf0, 0x20, 0xe5, 0x2b, 0x12, 0x08, 0x19, + 0xe5, 0x82, 0x24, 0x0c, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, + 0x12, 0x08, 0x0d, 0xe5, 0x34, 0x24, 0xf0, 0xff, 0xe5, 0x33, 0x34, + 0xde, 0xfe, 0xef, 0x78, 0x05, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, + 0xf9, 0xf5, 0x2b, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, 0x75, 0xf0, + 0x20, 0x12, 0x08, 0x19, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, + 0x35, 0x83, 0xf5, 0x83, 0x12, 0x08, 0x01, 0x90, 0x34, 0xc0, 0x12, + 0x08, 0x0d, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, 0x75, 0xf0, 0x20, + 0xe5, 0x2b, 0x12, 0x08, 0x19, 0xe5, 0x82, 0x24, 0x08, 0xf5, 0x82, + 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x12, 0x08, 0x01, 0x90, 0x34, 0xc8, + 0x12, 0x08, 0x0d, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, 0x75, 0xf0, + 0x20, 0xe5, 0x2b, 0x12, 0x08, 0x19, 0xe5, 0x82, 0x24, 0x0c, 0xf5, + 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x12, 0x08, 0x01, 0x90, 0x34, + 0xc4, 0x12, 0x08, 0x0d, 0x90, 0x01, 0x01, 0xe0, 0x44, 0x40, 0xf0, + 0x90, 0x01, 0x00, 0xe0, 0x44, 0x08, 0xf0, 0xe9, 0x44, 0x04, 0x90, + 0x34, 0xcd, 0xf0, 0x90, 0x34, 0xcc, 0xe0, 0x44, 0x01, 0xf0, 0xa3, + 0xe0, 0x44, 0x01, 0xf0, 0xa3, 0xe0, 0x44, 0x01, 0xf0, 0x22, 0x8f, + 0x15, 0x8c, 0x16, 0x8d, 0x17, 0xe5, 0x15, 0xc3, 0x94, 0x04, 0x50, + 0x56, 0xe5, 0x15, 0x94, 0x00, 0x40, 0x06, 0x7a, 0x00, 0x7b, 0x60, + 0x80, 0x04, 0x7a, 0x00, 0x7b, 0xc0, 0xe5, 0x17, 0xc4, 0xf8, 0x54, + 0x0f, 0xc8, 0x68, 0xff, 0xe5, 0x16, 0xc4, 0x54, 0xf0, 0x48, 0xfe, + 0xe5, 0x15, 0x90, 0x1a, 0x8e, 0x93, 0xfd, 0x7c, 0x00, 0x12, 0x07, + 0x96, 0xef, 0x2b, 0xfb, 0xee, 0x3a, 0xfa, 0xe5, 0x17, 0xc4, 0xf8, + 0x54, 0x0f, 0xc8, 0x68, 0xff, 0xe5, 0x16, 0xc4, 0x54, 0xf0, 0x48, + 0xfe, 0xe5, 0x15, 0x93, 0xfd, 0x7c, 0x00, 0x12, 0x07, 0x96, 0xed, + 0x4c, 0x60, 0x63, 0x0b, 0xbb, 0x00, 0x01, 0x0a, 0x80, 0x5c, 0x7a, + 0x00, 0x7b, 0x1a, 0xe5, 0x17, 0xae, 0x16, 0x78, 0x02, 0xc3, 0x33, + 0xce, 0x33, 0xce, 0xd8, 0xf9, 0x24, 0x0b, 0xff, 0xe4, 0x3e, 0xfe, + 0xe5, 0x15, 0x90, 0x1a, 0x8e, 0x93, 0xfd, 0x7c, 0x00, 0x12, 0x07, + 0x96, 0xef, 0x78, 0x02, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, + 0x2b, 0xfb, 0xee, 0x3a, 0xfa, 0xe5, 0x17, 0xae, 0x16, 0x78, 0x02, + 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0x24, 0x0b, 0xff, 0xe4, + 0x3e, 0xfe, 0xe5, 0x15, 0x90, 0x1a, 0x8e, 0x93, 0xfd, 0x7c, 0x00, + 0x12, 0x07, 0x96, 0xed, 0x4c, 0x60, 0x07, 0x74, 0x04, 0x2b, 0xfb, + 0xe4, 0x3a, 0xfa, 0xcf, 0xeb, 0xcf, 0xce, 0xea, 0xce, 0x22, 0xe5, + 0x2e, 0x14, 0x60, 0x1d, 0x14, 0x60, 0x3d, 0x14, 0x60, 0x5d, 0x14, + 0x70, 0x03, 0x02, 0x0f, 0xd7, 0x24, 0x04, 0x60, 0x03, 0x02, 0x0f, + 0xed, 0x20, 0x0d, 0x03, 0x02, 0x0f, 0xed, 0x75, 0x2e, 0x01, 0x22, + 0x90, 0x00, 0x0a, 0xe0, 0xff, 0x30, 0xe5, 0x03, 0x44, 0x20, 0xf0, + 0xe5, 0x40, 0x45, 0x3f, 0x60, 0x03, 0x02, 0x0f, 0xed, 0x75, 0x2e, + 0x02, 0x12, 0x19, 0x9b, 0x12, 0x1b, 0x78, 0xaf, 0x28, 0x12, 0x1a, + 0xa8, 0x22, 0x90, 0x01, 0x03, 0xe0, 0xff, 0x30, 0xe7, 0x76, 0xef, + 0x44, 0x80, 0x90, 0x01, 0x03, 0xf0, 0x12, 0x08, 0x51, 0x12, 0x19, + 0xde, 0x12, 0x1b, 0xbb, 0x75, 0x2e, 0x03, 0xaf, 0x22, 0x7e, 0x00, + 0x12, 0x1c, 0x2a, 0x22, 0xe5, 0x40, 0x45, 0x3f, 0x70, 0x21, 0x12, + 0x14, 0x41, 0x12, 0x1b, 0x78, 0x12, 0x19, 0xbe, 0x12, 0x1b, 0xbb, + 0x12, 0x1c, 0x04, 0x30, 0x0d, 0x0b, 0x75, 0x2e, 0x01, 0xaf, 0x32, + 0x7e, 0x00, 0x12, 0x1c, 0x2a, 0x22, 0xe4, 0xf5, 0x2e, 0x22, 0x90, + 0x00, 0x0a, 0xe0, 0xff, 0x30, 0xe5, 0x2c, 0x44, 0x20, 0xf0, 0x12, + 0x14, 0x41, 0x12, 0x1b, 0x78, 0x12, 0x19, 0xbe, 0x12, 0x1b, 0xbb, + 0x12, 0x1c, 0x04, 0x75, 0x2e, 0x04, 0x22, 0xe5, 0x40, 0x45, 0x3f, + 0x70, 0x10, 0x30, 0x0d, 0x0a, 0x75, 0x2e, 0x01, 0xaf, 0x32, 0xfe, + 0x12, 0x1c, 0x2a, 0x22, 0xe4, 0xf5, 0x2e, 0x22, 0x90, 0x00, 0x04, + 0x74, 0x02, 0xf0, 0x90, 0x00, 0x0a, 0xf0, 0x30, 0x09, 0x32, 0xe5, + 0x34, 0x45, 0x33, 0x70, 0x02, 0xc3, 0x22, 0x85, 0x34, 0x82, 0x85, + 0x33, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, + 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, + 0xe0, 0xfd, 0xc3, 0xef, 0x9d, 0xff, 0xee, 0x9c, 0xd0, 0x82, 0xd0, + 0x83, 0xf0, 0xa3, 0xef, 0xf0, 0xe5, 0x34, 0x45, 0x33, 0x70, 0x02, + 0xc3, 0x22, 0x12, 0x05, 0xed, 0x50, 0xf3, 0x90, 0x00, 0x0a, 0xe0, + 0x20, 0xe5, 0x03, 0x30, 0x07, 0x41, 0xe5, 0x34, 0x45, 0x33, 0x70, + 0x02, 0xc3, 0x22, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, 0xc0, 0x83, + 0xc0, 0x82, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x85, 0x34, 0x82, 0x85, + 0x33, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xc3, 0xef, + 0x9d, 0xff, 0xee, 0x9c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0xa3, 0xef, + 0xf0, 0xe5, 0x34, 0x45, 0x33, 0x70, 0x02, 0xc3, 0x22, 0x12, 0x05, + 0xed, 0x50, 0xf3, 0x80, 0xb5, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, + 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x12, 0x16, 0xea, 0xd3, 0x22, 0x12, + 0x1a, 0xfe, 0x40, 0x05, 0x12, 0x1a, 0xd4, 0x50, 0x44, 0x7e, 0x30, + 0x7f, 0xe0, 0x7c, 0x1c, 0x7d, 0x82, 0x75, 0x1b, 0x12, 0x7b, 0x06, + 0x12, 0x14, 0xab, 0x90, 0x00, 0x04, 0x74, 0x02, 0xf0, 0x90, 0x00, + 0x0a, 0xf0, 0xe4, 0xff, 0xfe, 0x12, 0x1c, 0x36, 0x90, 0x00, 0x0b, + 0xe0, 0x54, 0xbf, 0xf0, 0x54, 0x7f, 0xff, 0xf0, 0xe4, 0x90, 0x30, + 0xe9, 0xf0, 0xef, 0x54, 0xfd, 0x90, 0x00, 0x0b, 0xf0, 0xe4, 0x90, + 0x00, 0x04, 0xf0, 0xd2, 0x09, 0x12, 0x0f, 0xee, 0xe4, 0xf5, 0x2f, + 0x12, 0x1b, 0x13, 0x50, 0x48, 0x7e, 0x30, 0x7f, 0xe0, 0x7c, 0x1c, + 0x7d, 0x82, 0x75, 0x1b, 0x12, 0x7b, 0x06, 0x12, 0x14, 0xab, 0x90, + 0x00, 0x04, 0x74, 0x02, 0xf0, 0x90, 0x00, 0x0a, 0xf0, 0xe4, 0xff, + 0xfe, 0x12, 0x1c, 0x36, 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xbf, 0xf0, + 0x54, 0xfd, 0xf0, 0xe4, 0x90, 0x00, 0x04, 0xf0, 0xff, 0x12, 0x19, + 0x78, 0x50, 0x04, 0x75, 0x2f, 0x07, 0x22, 0x90, 0x01, 0x04, 0xe0, + 0x54, 0x7f, 0xf0, 0xd2, 0x09, 0x12, 0x0f, 0xee, 0xe4, 0xf5, 0x2f, + 0x22, 0xc2, 0xaf, 0xe4, 0xf5, 0x2f, 0xf5, 0x88, 0x75, 0xa8, 0x0f, + 0x75, 0x89, 0x11, 0xf5, 0xb8, 0xf5, 0xe8, 0x75, 0x90, 0x0f, 0x75, + 0x31, 0xff, 0x75, 0x2b, 0xff, 0x90, 0x22, 0x2e, 0xf0, 0xa3, 0xf0, + 0x90, 0x22, 0x4e, 0xf0, 0xa3, 0xf0, 0xc2, 0x05, 0xc2, 0x08, 0xc2, + 0x00, 0xc2, 0x07, 0xc2, 0x04, 0x90, 0x00, 0x0a, 0x74, 0xff, 0xf0, + 0x90, 0x00, 0x0b, 0x74, 0x01, 0xf0, 0x90, 0x01, 0x03, 0x74, 0xff, + 0xf0, 0xe4, 0x90, 0x01, 0x04, 0xf0, 0x90, 0x01, 0x05, 0x74, 0xff, + 0xf0, 0xe4, 0x90, 0x01, 0x06, 0xf0, 0x90, 0x00, 0x04, 0xf0, 0x90, + 0x30, 0xe8, 0x74, 0x10, 0xf0, 0x90, 0x01, 0x07, 0xf0, 0x90, 0x01, + 0x08, 0x04, 0xf0, 0x90, 0x01, 0x09, 0x74, 0x48, 0xf0, 0x90, 0x01, + 0x0a, 0x74, 0x7f, 0xf0, 0x90, 0x01, 0x02, 0x74, 0x1f, 0xf0, 0x90, + 0x01, 0x00, 0x74, 0x14, 0xf0, 0x90, 0x01, 0x01, 0x74, 0x20, 0xf0, + 0x90, 0x00, 0x00, 0xe0, 0x44, 0x80, 0xf0, 0x75, 0x49, 0x00, 0x75, + 0x4a, 0x01, 0xc2, 0x01, 0xd2, 0xaf, 0x22, 0x12, 0x1a, 0xd4, 0x50, + 0x2d, 0x12, 0x18, 0x48, 0x90, 0x01, 0x06, 0xe0, 0x54, 0xdf, 0xf0, + 0x7e, 0x30, 0x7f, 0xe0, 0x7c, 0x1c, 0x7d, 0x82, 0x75, 0x1b, 0x12, + 0x7b, 0x06, 0x12, 0x14, 0xab, 0x90, 0x00, 0x04, 0x74, 0x02, 0xf0, + 0x90, 0x00, 0x0a, 0xf0, 0xd2, 0x09, 0x12, 0x0f, 0xee, 0xe4, 0xf5, + 0x2f, 0x22, 0x12, 0x1b, 0x28, 0x50, 0x50, 0x12, 0x18, 0x48, 0x90, + 0x00, 0x0b, 0xe0, 0x54, 0xfd, 0xf0, 0xe4, 0x90, 0x00, 0x04, 0xf0, + 0x90, 0x01, 0x03, 0x74, 0x80, 0xf0, 0x90, 0x01, 0x04, 0xe0, 0x44, + 0x80, 0xf0, 0x7f, 0x02, 0x12, 0x19, 0x78, 0x50, 0x04, 0x75, 0x2f, + 0x05, 0x22, 0x7e, 0x30, 0x7f, 0xe0, 0x7c, 0x1c, 0x7d, 0x82, 0x75, + 0x1b, 0x12, 0x7b, 0x06, 0x12, 0x14, 0xab, 0x90, 0x00, 0x04, 0x74, + 0x02, 0xf0, 0x90, 0x00, 0x0a, 0xf0, 0xd2, 0x09, 0x12, 0x0f, 0xee, + 0x90, 0x01, 0x04, 0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5, 0x2f, 0x22, + 0x90, 0x30, 0x30, 0x74, 0x02, 0xf0, 0x75, 0x11, 0x07, 0x75, 0x12, + 0xd0, 0x90, 0x30, 0x30, 0xe0, 0x30, 0xe0, 0x0e, 0xe5, 0x12, 0x15, + 0x12, 0x70, 0x02, 0x15, 0x11, 0xe5, 0x12, 0x45, 0x11, 0x70, 0xeb, + 0xe5, 0x12, 0x45, 0x11, 0x70, 0x12, 0x12, 0x1a, 0x74, 0x90, 0x21, + 0x00, 0xe0, 0x60, 0x07, 0x90, 0x34, 0x98, 0xe0, 0x44, 0x04, 0xf0, + 0xc3, 0x22, 0xe4, 0x90, 0x34, 0x58, 0xf0, 0x90, 0x34, 0x32, 0x74, + 0x1f, 0xf0, 0x75, 0x11, 0x07, 0x75, 0x12, 0xd0, 0x90, 0x34, 0x81, + 0xe0, 0x64, 0x03, 0x60, 0x0e, 0xe5, 0x12, 0x15, 0x12, 0x70, 0x02, + 0x15, 0x11, 0xe5, 0x12, 0x45, 0x11, 0x70, 0xea, 0xe5, 0x12, 0x45, + 0x11, 0x70, 0x12, 0x12, 0x1a, 0x74, 0x90, 0x21, 0x00, 0xe0, 0x60, + 0x07, 0x90, 0x34, 0x98, 0xe0, 0x44, 0x04, 0xf0, 0xc3, 0x22, 0x90, + 0x34, 0x98, 0xe0, 0x44, 0x04, 0xf0, 0xe4, 0x90, 0x00, 0x01, 0xf0, + 0xd3, 0x22, 0x90, 0x30, 0x3a, 0xe0, 0xf5, 0x10, 0x12, 0x1c, 0x57, + 0x50, 0x26, 0xe5, 0x27, 0x30, 0xe6, 0x05, 0x53, 0x10, 0xfd, 0x80, + 0x03, 0x43, 0x10, 0x02, 0xe5, 0x27, 0x30, 0xe7, 0x05, 0x53, 0x10, + 0xf7, 0x80, 0x03, 0x43, 0x10, 0x08, 0x53, 0x10, 0xfe, 0x43, 0x10, + 0x04, 0x90, 0x30, 0x3a, 0xe5, 0x10, 0xf0, 0x12, 0x1c, 0x4c, 0x50, + 0x48, 0x90, 0x01, 0x03, 0xe0, 0xf5, 0x10, 0x54, 0x1c, 0x60, 0x3e, + 0xe5, 0x10, 0x54, 0xe3, 0xf0, 0xa3, 0xe0, 0xf5, 0x10, 0xf0, 0xe5, + 0x27, 0x30, 0xe6, 0x05, 0x43, 0x10, 0x02, 0x80, 0x03, 0x53, 0x10, + 0xfd, 0xe5, 0x27, 0x30, 0xe7, 0x05, 0x43, 0x10, 0x08, 0x80, 0x03, + 0x53, 0x10, 0xf7, 0x53, 0x10, 0xfe, 0x43, 0x10, 0x04, 0x90, 0x30, + 0x3a, 0xe5, 0x10, 0xf0, 0xaf, 0x29, 0x7e, 0x00, 0x12, 0x1c, 0x74, + 0xaf, 0x35, 0x7e, 0x00, 0x12, 0x1c, 0x7b, 0x22, 0x12, 0x1a, 0xbf, + 0x50, 0x72, 0x12, 0x1c, 0x41, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, + 0xe0, 0xfc, 0xa3, 0xe0, 0xc3, 0x9f, 0xf5, 0x12, 0xec, 0x9e, 0xf5, + 0x11, 0xd3, 0xe5, 0x12, 0x94, 0x00, 0xe5, 0x11, 0x64, 0x80, 0x94, + 0x80, 0x40, 0x06, 0xae, 0x11, 0xaf, 0x12, 0x80, 0x04, 0x7e, 0x00, + 0x7f, 0x00, 0x8e, 0x11, 0x8f, 0x12, 0xe5, 0x34, 0x24, 0x10, 0xf5, + 0x82, 0xe4, 0x35, 0x33, 0xf5, 0x83, 0xe0, 0xc3, 0x95, 0x12, 0xf5, + 0x12, 0xe4, 0x95, 0x11, 0xf5, 0x11, 0xc3, 0x64, 0x80, 0x94, 0x80, + 0x50, 0x05, 0xe4, 0xf5, 0x11, 0xf5, 0x12, 0xe5, 0x34, 0x24, 0x12, + 0xff, 0xe4, 0x35, 0x33, 0xfe, 0xad, 0x12, 0x7b, 0x01, 0x12, 0x19, + 0x2b, 0x90, 0x01, 0x05, 0x74, 0x20, 0xf0, 0x90, 0x01, 0x06, 0xe0, + 0x44, 0x20, 0xf0, 0x75, 0x2f, 0x03, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, + 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x08, 0xc2, 0xaf, + 0x90, 0x22, 0x2e, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x33, 0xf5, 0x34, + 0xe5, 0x2f, 0x25, 0xe0, 0x24, 0x9b, 0xf5, 0x82, 0xe4, 0x34, 0x1b, + 0xf5, 0x83, 0xe4, 0x93, 0xfe, 0x74, 0x01, 0x93, 0xca, 0xee, 0xca, + 0xf9, 0x12, 0x08, 0x4b, 0x12, 0x1b, 0xf6, 0x50, 0x02, 0xd2, 0x07, + 0x12, 0x17, 0x2c, 0x12, 0x00, 0x1e, 0x12, 0x1a, 0xe9, 0x50, 0x05, + 0xaf, 0x25, 0x12, 0x1c, 0x62, 0x30, 0x05, 0x1b, 0xe5, 0x2f, 0x70, + 0x17, 0x20, 0x04, 0x14, 0x12, 0x12, 0x4e, 0x92, 0x00, 0xc2, 0x05, + 0xd2, 0x0b, 0xa2, 0x00, 0xe4, 0x33, 0xf5, 0x14, 0xaf, 0x23, 0x12, + 0x16, 0xa2, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, + 0xf0, 0xd0, 0xe0, 0x32, 0x90, 0x29, 0xa0, 0xe0, 0x70, 0x63, 0x90, + 0x30, 0x8c, 0xe4, 0xf0, 0xa3, 0x74, 0xc2, 0xf0, 0xa3, 0x74, 0x01, + 0xf0, 0xa3, 0xe4, 0xf0, 0x90, 0x30, 0x8c, 0xe0, 0xff, 0x90, 0x29, + 0xa0, 0xf0, 0x90, 0x30, 0x8c, 0xe4, 0xf0, 0xa3, 0x74, 0xc5, 0xf0, + 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x90, 0x30, 0x8c, 0xe0, + 0xff, 0x90, 0x29, 0xa1, 0xf0, 0x90, 0x30, 0x8c, 0xe4, 0xf0, 0xa3, + 0x74, 0xc4, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x90, + 0x30, 0x8c, 0xe0, 0xff, 0x90, 0x29, 0xa2, 0xf0, 0x90, 0x30, 0x8c, + 0xe4, 0xf0, 0xa3, 0x74, 0xc3, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, + 0xe4, 0xf0, 0x90, 0x30, 0x8c, 0xe0, 0x90, 0x29, 0xa3, 0xf0, 0x22, + 0x8e, 0x16, 0x8f, 0x17, 0x8c, 0x18, 0x8d, 0x19, 0xe4, 0xff, 0xef, + 0xc3, 0x9b, 0x50, 0x53, 0xe5, 0x1b, 0x30, 0xe0, 0x12, 0xef, 0x7c, + 0x00, 0x25, 0x19, 0xfd, 0xec, 0x35, 0x18, 0x8d, 0x82, 0xf5, 0x83, + 0xe0, 0xf5, 0x1c, 0x80, 0x1f, 0xe5, 0x1b, 0x30, 0xe1, 0x13, 0xef, + 0x7c, 0x00, 0x25, 0x19, 0xfd, 0xec, 0x35, 0x18, 0x8d, 0x82, 0xf5, + 0x83, 0xe4, 0x93, 0xf5, 0x1c, 0x80, 0x07, 0xe5, 0x19, 0x2f, 0xf8, + 0xe6, 0xf5, 0x1c, 0xe5, 0x1b, 0x30, 0xe4, 0x0f, 0xe5, 0x17, 0x2f, + 0xf5, 0x82, 0xe4, 0x35, 0x16, 0xf5, 0x83, 0xe5, 0x1c, 0xf0, 0x80, + 0x06, 0xe5, 0x17, 0x2f, 0xf8, 0xa6, 0x1c, 0x0f, 0x80, 0xa8, 0x22, + 0x8c, 0x13, 0x8d, 0x14, 0xef, 0x24, 0x1e, 0xf5, 0x82, 0xe4, 0x3e, + 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0x4c, 0x60, 0x41, 0xef, 0x24, + 0x1e, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, + 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x85, 0x14, + 0x82, 0x85, 0x13, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb, 0xd3, 0xed, + 0x9b, 0xea, 0x64, 0x80, 0xf8, 0xec, 0x64, 0x80, 0x98, 0x40, 0x13, + 0xef, 0x24, 0x1e, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0xfc, + 0xa3, 0xe0, 0xce, 0xec, 0xce, 0xff, 0x80, 0xaf, 0xad, 0x14, 0xac, + 0x13, 0x12, 0x18, 0xaf, 0x22, 0x12, 0x1a, 0xbf, 0x50, 0x4f, 0xe5, + 0x34, 0x24, 0x12, 0xff, 0xe4, 0x35, 0x33, 0xfe, 0xe5, 0x34, 0x24, + 0x10, 0xf5, 0x82, 0xe4, 0x35, 0x33, 0xf5, 0x83, 0xe0, 0xfd, 0xe4, + 0xfb, 0x12, 0x19, 0x2b, 0xe5, 0x34, 0x24, 0x10, 0xf5, 0x82, 0xe4, + 0x35, 0x33, 0xf5, 0x83, 0xe0, 0xff, 0x7e, 0x00, 0x12, 0x1c, 0x36, + 0x90, 0x00, 0x0a, 0x74, 0x40, 0xf0, 0x90, 0x00, 0x0b, 0xe0, 0x44, + 0x40, 0xff, 0xf0, 0x90, 0x00, 0x0a, 0x74, 0x80, 0xf0, 0x4f, 0x90, + 0x00, 0x0b, 0xf0, 0x90, 0x30, 0xe9, 0x74, 0x01, 0xf0, 0x75, 0x2f, + 0x06, 0x22, 0x90, 0x30, 0x3a, 0xe0, 0xff, 0xe5, 0x27, 0x30, 0xe6, + 0x12, 0x30, 0x0c, 0x06, 0xef, 0x54, 0xf5, 0xfe, 0x80, 0x04, 0xef, + 0x44, 0x0a, 0xfe, 0xcf, 0xee, 0xcf, 0x80, 0x10, 0x30, 0x0c, 0x06, + 0xef, 0x44, 0x0a, 0xfe, 0x80, 0x04, 0xef, 0x54, 0xf5, 0xfe, 0xcf, + 0xee, 0xcf, 0xcf, 0x54, 0xfe, 0xcf, 0xcf, 0x44, 0x04, 0xcf, 0x90, + 0x30, 0x3a, 0xef, 0xf0, 0x30, 0x0c, 0x09, 0x7f, 0x08, 0x7e, 0x00, + 0x12, 0x1c, 0x74, 0x80, 0x07, 0x7f, 0x22, 0x7e, 0x01, 0x12, 0x1c, + 0x74, 0xb2, 0x0c, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, + 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x08, 0xc2, 0xaf, 0xc2, 0x8c, 0xc2, + 0x8d, 0xd3, 0xe5, 0x4a, 0x94, 0x00, 0xe5, 0x49, 0x94, 0x00, 0x40, + 0x08, 0xe5, 0x4a, 0x15, 0x4a, 0x70, 0x02, 0x15, 0x49, 0xd3, 0xe5, + 0x4c, 0x94, 0x00, 0xe5, 0x4b, 0x94, 0x00, 0x40, 0x08, 0xe5, 0x4c, + 0x15, 0x4c, 0x70, 0x02, 0x15, 0x4b, 0x12, 0x00, 0x0e, 0xd2, 0x8c, + 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, + 0xe0, 0x32, 0xc3, 0xef, 0x94, 0x04, 0xee, 0x64, 0x80, 0x94, 0x80, + 0x40, 0x0c, 0xd3, 0xed, 0x94, 0x04, 0xec, 0x64, 0x80, 0x94, 0x80, + 0x50, 0x01, 0x22, 0xc3, 0xef, 0x94, 0xfc, 0xee, 0x64, 0x80, 0x94, + 0x7f, 0x40, 0x0c, 0xd3, 0xed, 0x94, 0xfc, 0xec, 0x64, 0x80, 0x94, + 0x7f, 0x50, 0x01, 0x22, 0xd3, 0xef, 0x94, 0x04, 0xee, 0x64, 0x80, + 0x94, 0x80, 0x50, 0x0d, 0xc3, 0xed, 0x94, 0xfc, 0xec, 0x64, 0x80, + 0x94, 0x7f, 0x40, 0x02, 0xd3, 0x22, 0xc3, 0x22, 0xe4, 0xfe, 0xef, + 0xf4, 0x60, 0x41, 0x74, 0x04, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x21, + 0xf5, 0x83, 0xe0, 0xb4, 0xff, 0x23, 0x74, 0x04, 0x2e, 0xf5, 0x82, + 0xe4, 0x34, 0x21, 0xf5, 0x83, 0xef, 0xf0, 0x30, 0x0b, 0x0d, 0x74, + 0x08, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x21, 0xf5, 0x83, 0xe5, 0x14, + 0xf0, 0x90, 0x00, 0x02, 0x74, 0x01, 0xf0, 0x22, 0xbe, 0x03, 0x0a, + 0x90, 0x00, 0x02, 0x74, 0x01, 0xf0, 0xe4, 0xfe, 0x80, 0xc2, 0x0e, + 0x80, 0xbf, 0x22, 0x8e, 0x13, 0x8f, 0x14, 0x12, 0x1c, 0x41, 0xc3, + 0xef, 0x95, 0x14, 0xff, 0xee, 0x95, 0x13, 0xcd, 0xef, 0xcd, 0xfc, + 0xd3, 0xed, 0x94, 0x00, 0xec, 0x64, 0x80, 0x94, 0x80, 0x40, 0x05, + 0xce, 0xec, 0xce, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x01, 0xcc, 0xee, + 0xcc, 0xec, 0x90, 0x00, 0x05, 0xf0, 0x90, 0x00, 0x06, 0xef, 0xf0, + 0x90, 0x00, 0x04, 0x74, 0x51, 0xf0, 0x90, 0x00, 0x0b, 0xe0, 0x44, + 0x02, 0xf0, 0x22, 0x30, 0x07, 0x3c, 0xe5, 0x2f, 0x70, 0x38, 0xc2, + 0x07, 0x90, 0x22, 0x2e, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x11, 0xf5, + 0x12, 0x90, 0x22, 0x4e, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x22, + 0x2e, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x22, 0x4e, 0xe5, 0x11, + 0xf0, 0xa3, 0xe5, 0x12, 0xf0, 0x8e, 0x33, 0x8f, 0x34, 0x30, 0x08, + 0x05, 0x12, 0x17, 0xa5, 0xc2, 0x08, 0xc2, 0x09, 0x12, 0x0f, 0xee, + 0x22, 0x7f, 0x80, 0x7e, 0x29, 0xe4, 0xfd, 0xfc, 0x8f, 0x82, 0x8e, + 0x83, 0xe0, 0xfb, 0x74, 0x45, 0x2d, 0xf8, 0xc6, 0xeb, 0xc6, 0x74, + 0x04, 0x2f, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0xfb, 0x74, + 0x41, 0x2d, 0xf8, 0xc6, 0xeb, 0xc6, 0x74, 0x08, 0x2f, 0xff, 0xe4, + 0x3e, 0xfe, 0x0d, 0xbd, 0x00, 0x01, 0x0c, 0xed, 0x64, 0x04, 0x4c, + 0x70, 0xcf, 0x22, 0x90, 0x21, 0x00, 0xe0, 0xc4, 0x33, 0x54, 0xe0, + 0x24, 0x10, 0xf5, 0x82, 0xe4, 0x34, 0x21, 0xab, 0x82, 0xfa, 0x12, + 0x1b, 0xab, 0x8b, 0x82, 0x8a, 0x83, 0xee, 0x8f, 0xf0, 0x12, 0x07, + 0xeb, 0x7e, 0x22, 0x7f, 0x30, 0xcd, 0xeb, 0xcd, 0xcc, 0xea, 0xcc, + 0x12, 0x15, 0x0e, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, 0x12, + 0x1c, 0x62, 0x22, 0x90, 0x00, 0x00, 0x74, 0x0e, 0xf0, 0x00, 0x00, + 0x00, 0xe4, 0xf0, 0x12, 0x11, 0x31, 0x12, 0x1c, 0x88, 0x90, 0x34, + 0x98, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x30, 0xb4, 0x05, 0x0a, 0x12, + 0x1c, 0x4c, 0x50, 0x0d, 0x12, 0x15, 0xc0, 0x80, 0x08, 0xe5, 0x30, + 0xb4, 0x07, 0x03, 0x12, 0x12, 0xd4, 0x12, 0x0f, 0x2a, 0x80, 0xe4, + 0x80, 0xfe, 0x22, 0xe4, 0xff, 0xe5, 0x30, 0x24, 0xfe, 0x70, 0x2c, + 0xe4, 0xfe, 0xee, 0xc3, 0x95, 0x2c, 0x50, 0x12, 0x74, 0x01, 0xc8, + 0xee, 0xc8, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xcf, 0x4f, + 0xcf, 0x0e, 0x80, 0xe8, 0x90, 0x30, 0x34, 0xe0, 0x54, 0xe0, 0xfe, + 0xe5, 0x27, 0x54, 0x1f, 0x6f, 0xf4, 0xce, 0x4e, 0xce, 0xee, 0xf0, + 0x22, 0x90, 0x34, 0xce, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x34, 0xcd, + 0xe0, 0x54, 0xfe, 0xf0, 0x90, 0x34, 0xcd, 0xe0, 0x20, 0xe3, 0xf9, + 0x90, 0x01, 0x11, 0xe0, 0x54, 0x22, 0xff, 0xbf, 0x22, 0x03, 0xd3, + 0x80, 0x01, 0xc3, 0x50, 0xf0, 0x90, 0x01, 0x00, 0xe0, 0x54, 0xf7, + 0xf0, 0x90, 0x01, 0x01, 0xe0, 0x54, 0xbf, 0xf0, 0x22, 0xef, 0x24, + 0x1e, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, + 0xfb, 0xca, 0xec, 0xca, 0x24, 0x1e, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, + 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xef, 0x24, 0x1e, 0xf5, 0x82, + 0xe4, 0x3e, 0xf5, 0x83, 0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xce, 0xea, + 0xce, 0xcf, 0xeb, 0xcf, 0x22, 0xef, 0x24, 0x1e, 0xf5, 0x82, 0xe4, + 0x3e, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb, 0xed, 0x24, 0x1e, + 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xea, 0xf0, 0xa3, 0xeb, 0xf0, + 0xef, 0x24, 0x1e, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xec, 0xf0, + 0xa3, 0xed, 0xf0, 0x22, 0xc0, 0xe0, 0xc0, 0xd0, 0xc2, 0xaf, 0xc2, + 0x8e, 0xc2, 0x8f, 0xd3, 0xe5, 0x40, 0x94, 0x00, 0xe5, 0x3f, 0x94, + 0x00, 0x40, 0x0d, 0xe5, 0x40, 0x15, 0x40, 0x70, 0x02, 0x15, 0x3f, + 0x12, 0x1c, 0x6b, 0xd2, 0x8e, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, 0xe0, + 0x32, 0x12, 0x1a, 0xbf, 0x50, 0x22, 0x7e, 0x30, 0x7f, 0xe0, 0x7c, + 0x1c, 0x7d, 0x82, 0x75, 0x1b, 0x12, 0x7b, 0x06, 0x12, 0x14, 0xab, + 0x90, 0x00, 0x04, 0x74, 0x02, 0xf0, 0x90, 0x00, 0x0a, 0xf0, 0xd2, + 0x09, 0x12, 0x0f, 0xee, 0xe4, 0xf5, 0x2f, 0x22, 0x8e, 0x13, 0x8f, + 0x14, 0x8d, 0x15, 0xeb, 0x60, 0x09, 0x14, 0x70, 0x1b, 0xaf, 0x15, + 0x12, 0x19, 0xfe, 0x22, 0x7e, 0x30, 0x7f, 0xe0, 0xac, 0x13, 0xad, + 0x14, 0x75, 0x1b, 0x11, 0x7b, 0x06, 0x12, 0x14, 0xab, 0xaf, 0x15, + 0x12, 0x19, 0xfe, 0x22, 0x12, 0x17, 0x6c, 0x90, 0x21, 0x01, 0xe0, + 0xf5, 0x28, 0x74, 0x41, 0x25, 0x28, 0xf8, 0xe6, 0xf5, 0x32, 0x74, + 0x45, 0x25, 0x28, 0xf8, 0xe6, 0xf5, 0x22, 0x90, 0x21, 0x00, 0xe0, + 0x60, 0x03, 0xd2, 0x0d, 0x22, 0xc2, 0x0d, 0x22, 0xcd, 0xef, 0xcd, + 0x90, 0x01, 0x02, 0xe0, 0x30, 0xe7, 0x02, 0xc3, 0x22, 0x7e, 0x2a, + 0x7f, 0x00, 0x12, 0x04, 0x0e, 0x90, 0x01, 0x04, 0xe0, 0x44, 0x80, + 0xf0, 0x90, 0x01, 0x02, 0xe0, 0x44, 0x80, 0xf0, 0xd3, 0x22, 0x90, + 0x34, 0x30, 0xe4, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x1f, 0xf0, 0xa3, + 0xe4, 0xf0, 0x90, 0x01, 0x10, 0xe0, 0x20, 0xe1, 0x03, 0x00, 0x80, + 0xf6, 0x90, 0x01, 0x12, 0xe0, 0x20, 0xe1, 0x03, 0x00, 0x80, 0xf6, + 0x22, 0xe4, 0xff, 0x74, 0x36, 0x2f, 0xf8, 0xe6, 0x90, 0x30, 0x8c, + 0xf0, 0xef, 0x90, 0x1b, 0x51, 0x93, 0x90, 0x30, 0x8d, 0xf0, 0xa3, + 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x0f, 0xbf, 0x09, 0xe3, 0x22, + 0xe4, 0xff, 0xef, 0x90, 0x1b, 0x5b, 0x93, 0x90, 0x30, 0x8c, 0xf0, + 0xef, 0x90, 0x1b, 0x51, 0x93, 0x90, 0x30, 0x8d, 0xf0, 0xa3, 0x74, + 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x0f, 0xbf, 0x09, 0xe3, 0x22, 0xe4, + 0x90, 0x00, 0x05, 0xf0, 0xef, 0x60, 0x02, 0x80, 0x02, 0x7f, 0x01, + 0x90, 0x00, 0x06, 0xef, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x51, 0xf0, + 0x90, 0x00, 0x0b, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x90, 0x30, 0xf0, + 0xe0, 0xf5, 0x2a, 0x90, 0x00, 0x0a, 0xe0, 0x30, 0xe4, 0x0e, 0x90, + 0x30, 0xf2, 0xe0, 0x60, 0x08, 0x90, 0x00, 0x0a, 0x74, 0x10, 0xf0, + 0xd3, 0x22, 0xc3, 0x22, 0x90, 0x30, 0xf0, 0xe0, 0xf5, 0x2a, 0x90, + 0x00, 0x0a, 0xe0, 0x30, 0xe4, 0x0e, 0x90, 0x30, 0xf2, 0xe0, 0x70, + 0x08, 0x90, 0x00, 0x0a, 0x74, 0x10, 0xf0, 0xd3, 0x22, 0xc3, 0x22, + 0x90, 0x34, 0xce, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x34, 0xcd, 0xe0, + 0x54, 0xfe, 0xf0, 0x90, 0x01, 0x00, 0xe0, 0x54, 0xf7, 0xf0, 0x90, + 0x01, 0x01, 0xe0, 0x54, 0xbf, 0xf0, 0x22, 0x90, 0x00, 0x01, 0x74, + 0x0e, 0xf0, 0x90, 0x34, 0x98, 0xe0, 0x54, 0xfb, 0xf0, 0x90, 0x34, + 0x58, 0x74, 0x01, 0xf0, 0x90, 0x30, 0x30, 0x74, 0x04, 0xf0, 0x22, + 0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, + 0x6c, 0x90, 0xc8, 0x00, 0x01, 0x02, 0x03, 0x0b, 0x0f, 0x0a, 0x0e, + 0x09, 0x0d, 0x08, 0x0c, 0xef, 0xc4, 0x33, 0x33, 0x54, 0xc0, 0xff, + 0x90, 0x01, 0x00, 0xe0, 0x54, 0x3f, 0x4f, 0xf0, 0x90, 0x01, 0x02, + 0xe0, 0x44, 0x80, 0xf0, 0x22, 0x90, 0x01, 0x03, 0xe0, 0x30, 0xe7, + 0x0c, 0x74, 0x80, 0xf0, 0x90, 0x01, 0x04, 0xe0, 0x54, 0x7f, 0xf0, + 0xd3, 0x22, 0xc3, 0x22, 0x90, 0x00, 0x0a, 0xe0, 0x30, 0xe1, 0x0c, + 0x74, 0x02, 0xf0, 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xfd, 0xf0, 0xd3, + 0x22, 0xc3, 0x22, 0x90, 0x00, 0x0a, 0xe0, 0x30, 0xe2, 0x0c, 0x74, + 0x04, 0xf0, 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xfb, 0xf0, 0xd3, 0x22, + 0xc3, 0x22, 0x90, 0x00, 0x0a, 0xe0, 0x30, 0xe6, 0x0c, 0x74, 0x40, + 0xf0, 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xbf, 0xf0, 0xd3, 0x22, 0xc3, + 0x22, 0x90, 0x00, 0x0a, 0xe0, 0x30, 0xe7, 0x0c, 0x74, 0x80, 0xf0, + 0x90, 0x00, 0x0b, 0xe0, 0x54, 0x7f, 0xf0, 0xd3, 0x22, 0xc3, 0x22, + 0x90, 0x01, 0x05, 0xe0, 0x30, 0xe5, 0x0c, 0x74, 0x20, 0xf0, 0x90, + 0x01, 0x06, 0xe0, 0x54, 0xdf, 0xf0, 0xd3, 0x22, 0xc3, 0x22, 0xe4, + 0xf5, 0x31, 0x90, 0x00, 0x0a, 0x74, 0xff, 0xf0, 0x90, 0x22, 0x2e, + 0x74, 0x21, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0x22, 0x52, 0x53, 0x54, + 0x12, 0x15, 0x16, 0x10, 0x11, 0x40, 0x00, 0x20, 0x00, 0x40, 0xff, + 0x3f, 0x3f, 0xbd, 0x28, 0x21, 0x00, 0xe5, 0x34, 0x24, 0x11, 0xf5, + 0x82, 0xe4, 0x35, 0x33, 0xf5, 0x83, 0xe0, 0x30, 0xe6, 0x02, 0xd3, + 0x22, 0xc3, 0x22, 0x90, 0x30, 0x40, 0x74, 0x32, 0xf0, 0xa3, 0x74, + 0xb0, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x22, 0x75, + 0x31, 0x01, 0x90, 0x00, 0x0a, 0x74, 0xff, 0xf0, 0x90, 0x00, 0x0b, + 0xe0, 0x44, 0x20, 0xf0, 0x22, 0x0b, 0xd1, 0x13, 0x53, 0x15, 0x6b, + 0x11, 0xc6, 0x00, 0x09, 0x19, 0x03, 0x10, 0x95, 0x1b, 0xda, 0x90, + 0x30, 0x64, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xed, 0x25, 0xe0, 0xff, + 0xee, 0x33, 0xfe, 0x22, 0x90, 0x30, 0x40, 0x74, 0x32, 0xf0, 0xa3, + 0x74, 0xb0, 0xf0, 0xa3, 0xe4, 0xf0, 0xa3, 0xf0, 0x22, 0x90, 0x01, + 0x00, 0xe0, 0x44, 0x08, 0xf0, 0x90, 0x01, 0x01, 0xe0, 0x44, 0x40, + 0xf0, 0x22, 0x12, 0x1a, 0xbf, 0x50, 0x08, 0xd2, 0x09, 0x12, 0x0f, + 0xee, 0xe4, 0xf5, 0x2f, 0x22, 0x90, 0x00, 0x0a, 0xe0, 0x30, 0xe0, + 0x05, 0x74, 0x01, 0xf0, 0xd3, 0x22, 0xc3, 0x22, 0x90, 0x00, 0x0a, + 0xe0, 0x30, 0xe5, 0x05, 0x74, 0x20, 0xf0, 0xd3, 0x22, 0xc3, 0x22, + 0x90, 0x34, 0x30, 0x74, 0x1f, 0xf0, 0xa3, 0xe4, 0xf0, 0xa3, 0xf0, + 0xa3, 0xf0, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, + 0x4c, 0x02, 0x17, 0xdc, 0xc2, 0xaf, 0xc2, 0x8c, 0xc2, 0x8d, 0x12, + 0x00, 0x0e, 0xd2, 0xaf, 0x22, 0xc2, 0x8e, 0x8e, 0x3f, 0x8f, 0x40, + 0x12, 0x1c, 0x6b, 0xd2, 0x8e, 0x22, 0x90, 0x30, 0x3c, 0xef, 0xf0, + 0xee, 0x44, 0x80, 0xa3, 0xf0, 0x22, 0x90, 0x30, 0x78, 0xe0, 0xfd, + 0xa3, 0xe0, 0xfe, 0xed, 0xff, 0x22, 0xe5, 0x4a, 0x45, 0x49, 0x70, + 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x22, 0xe5, 0x4c, 0x45, 0x4b, 0x70, + 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x22, 0xc2, 0x0b, 0xe4, 0xf5, 0x14, + 0x12, 0x16, 0xa2, 0x22, 0xc2, 0x8f, 0x75, 0x8d, 0xf5, 0x75, 0x8b, + 0x41, 0x22, 0x8e, 0x49, 0x8f, 0x4a, 0xd2, 0x8c, 0x22, 0x8e, 0x4b, + 0x8f, 0x4c, 0xd2, 0x8c, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc2, 0x0d, 0xe4, 0xf5, 0x2e, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xac, 0x30 +}; + +static const uint8_t rt2561s[] = { + 0x02, 0x1c, 0x2d, 0x02, 0x07, 0xdf, 0xc2, 0x8c, 0x22, 0x22, 0x00, + 0x02, 0x19, 0x43, 0xc2, 0xaf, 0xc2, 0x8d, 0x75, 0x8c, 0x94, 0x75, + 0x8a, 0x93, 0xd2, 0xaf, 0x22, 0x02, 0x1a, 0x9c, 0x12, 0x08, 0xdf, + 0x40, 0x03, 0x02, 0x02, 0x1e, 0x90, 0x21, 0x02, 0xe0, 0xf5, 0x2d, + 0x90, 0x00, 0x03, 0xe0, 0x12, 0x04, 0x3f, 0x00, 0xb0, 0x00, 0x00, + 0xce, 0x01, 0x00, 0x5e, 0x10, 0x00, 0x6f, 0x11, 0x00, 0xf2, 0x20, + 0x01, 0x4d, 0x21, 0x01, 0x70, 0x22, 0x01, 0x84, 0x30, 0x01, 0x8f, + 0x31, 0x01, 0xd5, 0x50, 0x01, 0x9f, 0x51, 0x01, 0xf2, 0x52, 0x02, + 0x06, 0x60, 0x00, 0x00, 0x02, 0x14, 0x90, 0x00, 0x0a, 0xe0, 0x20, + 0xe5, 0x03, 0x30, 0x07, 0x03, 0xd2, 0x08, 0x22, 0x12, 0x14, 0x2b, + 0x22, 0x90, 0x21, 0x00, 0xe0, 0xf5, 0x11, 0xe5, 0x11, 0xc4, 0x33, + 0x54, 0xe0, 0x24, 0x21, 0xf5, 0x82, 0xe4, 0x34, 0x21, 0xf5, 0x83, + 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x11, 0xc4, 0x33, 0x54, 0xe0, 0x24, + 0x2c, 0xf5, 0x82, 0xe4, 0x34, 0x21, 0xf5, 0x83, 0xe5, 0x11, 0xf0, + 0xc4, 0x33, 0x54, 0xe0, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x21, + 0xf5, 0x83, 0xe5, 0x2d, 0xf0, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0x22, + 0x12, 0x05, 0xcb, 0x90, 0x21, 0x00, 0xe0, 0xf5, 0x31, 0x60, 0x05, + 0x12, 0x1b, 0xe0, 0x80, 0x03, 0x12, 0x1b, 0xa6, 0xe4, 0x90, 0x21, + 0x03, 0xf0, 0xaf, 0x2d, 0x12, 0x10, 0xe8, 0x22, 0x75, 0x31, 0xff, + 0x90, 0x01, 0x00, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x01, 0x01, 0xe0, + 0x54, 0xfe, 0xf0, 0x54, 0x3e, 0xf0, 0xe4, 0x90, 0x00, 0x0b, 0xf0, + 0xf0, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, 0x12, 0x10, 0xe8, 0x22, + 0x7e, 0x2b, 0x7f, 0x80, 0x7d, 0x03, 0x12, 0x0a, 0xfb, 0x90, 0x34, + 0xcd, 0xe0, 0x20, 0xe3, 0xf9, 0x90, 0x21, 0x14, 0x12, 0x04, 0x1b, + 0x90, 0x34, 0xc0, 0x12, 0x04, 0x27, 0x90, 0x21, 0x18, 0x12, 0x04, + 0x1b, 0x90, 0x34, 0xc8, 0x12, 0x04, 0x27, 0x90, 0x21, 0x1c, 0x12, + 0x04, 0x1b, 0x90, 0x34, 0xc4, 0x12, 0x04, 0x27, 0x90, 0x34, 0xcc, + 0x74, 0x01, 0xf0, 0xa3, 0xe0, 0x44, 0x04, 0xf0, 0x90, 0x01, 0x01, + 0xe0, 0x44, 0x01, 0xf0, 0x44, 0x40, 0xf0, 0x90, 0x00, 0x0b, 0xe0, + 0x44, 0x10, 0xf0, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, 0x12, + 0x10, 0xe8, 0x22, 0x90, 0x01, 0x00, 0xe0, 0x54, 0xf7, 0xf0, 0x90, + 0x01, 0x01, 0xe0, 0x54, 0xfe, 0xf0, 0x54, 0xbf, 0xf0, 0x90, 0x00, + 0x0b, 0xe0, 0x54, 0xef, 0xf0, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, + 0x2d, 0x12, 0x10, 0xe8, 0x22, 0x7e, 0x2b, 0x7f, 0x80, 0x7d, 0x03, + 0x12, 0x0a, 0xfb, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, 0x12, + 0x10, 0xe8, 0x22, 0xd2, 0x05, 0x85, 0x2d, 0x23, 0xe4, 0x90, 0x21, + 0x03, 0xf0, 0x22, 0x12, 0x13, 0xae, 0xc2, 0x00, 0xe4, 0x90, 0x21, + 0x03, 0xf0, 0xaf, 0x2d, 0x12, 0x10, 0xe8, 0x22, 0x85, 0x2d, 0x25, + 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xfb, 0xff, 0xf0, 0xe4, 0x90, 0x00, + 0x07, 0xf0, 0x90, 0x00, 0x0a, 0x74, 0x04, 0xf0, 0xe4, 0x90, 0x00, + 0x08, 0xf0, 0x90, 0x21, 0x00, 0xe0, 0x90, 0x00, 0x09, 0xf0, 0x90, + 0x00, 0x07, 0x74, 0x71, 0xf0, 0xef, 0x44, 0x04, 0x90, 0x00, 0x0b, + 0xf0, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0x22, 0x90, 0x21, 0x00, 0xe0, + 0xff, 0x54, 0x1f, 0xf5, 0x30, 0xa3, 0xe0, 0xf5, 0x27, 0x8f, 0x26, + 0x12, 0x14, 0x62, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, 0x12, + 0x10, 0xe8, 0x22, 0x90, 0x21, 0x00, 0xe0, 0xf5, 0x2c, 0x12, 0x17, + 0xa3, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, 0x12, 0x10, 0xe8, + 0x22, 0x12, 0x1a, 0xed, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, + 0x12, 0x10, 0xe8, 0x22, 0xe4, 0x90, 0x21, 0x03, 0xf0, 0xaf, 0x2d, + 0x12, 0x10, 0xe8, 0x22, 0xe5, 0x31, 0x64, 0x01, 0x70, 0x41, 0x12, + 0x08, 0xed, 0x40, 0x03, 0x02, 0x03, 0x9d, 0x12, 0x0e, 0x34, 0x50, + 0x20, 0x7e, 0x2b, 0x7f, 0x80, 0x7d, 0x03, 0x12, 0x0a, 0xfb, 0x7f, + 0x01, 0x12, 0x0a, 0xd8, 0x40, 0x09, 0xd2, 0x09, 0x12, 0x0e, 0x47, + 0xe4, 0xf5, 0x2f, 0x22, 0x12, 0x09, 0x64, 0x75, 0x2f, 0x01, 0x22, + 0x7f, 0x01, 0x12, 0x0a, 0xd8, 0x50, 0x04, 0x75, 0x2f, 0x02, 0x22, + 0xd2, 0x09, 0x12, 0x0e, 0x47, 0xe4, 0xf5, 0x2f, 0x22, 0x12, 0x08, + 0x90, 0x50, 0x51, 0x12, 0x0a, 0xac, 0x90, 0x30, 0xf4, 0xe0, 0xf5, + 0x2a, 0x7e, 0x30, 0x7f, 0xec, 0xa3, 0xe0, 0xfd, 0xe4, 0xfb, 0x12, + 0x0d, 0xa0, 0xe4, 0xff, 0xfe, 0x12, 0x0e, 0x29, 0x90, 0x00, 0x0a, + 0x74, 0x02, 0xf0, 0x90, 0x00, 0x0b, 0xe0, 0x44, 0x02, 0xff, 0xf0, + 0xfd, 0x90, 0x01, 0x05, 0x74, 0x20, 0xf0, 0x90, 0x01, 0x06, 0xe0, + 0x44, 0x20, 0xf0, 0xed, 0x54, 0xbf, 0x90, 0x00, 0x0b, 0xf0, 0x90, + 0x34, 0xcc, 0xe0, 0x44, 0x01, 0xf0, 0xa3, 0xe0, 0x44, 0x01, 0xf0, + 0xa3, 0xe0, 0x44, 0x01, 0xf0, 0xd2, 0x04, 0x12, 0x08, 0xad, 0x50, + 0x43, 0x12, 0x0a, 0xbb, 0x7e, 0x30, 0x7f, 0xe0, 0x7c, 0x30, 0x7d, + 0xec, 0x75, 0x1b, 0x11, 0x7b, 0x06, 0x12, 0x13, 0xc8, 0x90, 0x30, + 0xf5, 0xe0, 0x75, 0xf0, 0x20, 0xa4, 0xff, 0xae, 0xf0, 0x12, 0x0e, + 0x29, 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xfd, 0xff, 0xf0, 0xfd, 0xe4, + 0x90, 0x00, 0x04, 0xf0, 0x90, 0x01, 0x06, 0xe0, 0x54, 0xdf, 0xf0, + 0x90, 0x00, 0x0a, 0x74, 0x40, 0xf0, 0x4d, 0x90, 0x00, 0x0b, 0xf0, + 0xc2, 0x04, 0x12, 0x09, 0x25, 0x50, 0x38, 0x12, 0x0a, 0xbb, 0x7e, + 0x30, 0x7f, 0xe0, 0x7c, 0x1c, 0x7d, 0x7e, 0x75, 0x1b, 0x12, 0x7b, + 0x06, 0x12, 0x13, 0xc8, 0x90, 0x00, 0x04, 0x74, 0x02, 0xf0, 0x90, + 0x00, 0x0a, 0xf0, 0xe4, 0xff, 0xfe, 0x12, 0x0e, 0x29, 0x90, 0x00, + 0x0b, 0xe0, 0x54, 0xfd, 0xf0, 0xe4, 0x90, 0x00, 0x04, 0xf0, 0x90, + 0x01, 0x06, 0xe0, 0x54, 0xdf, 0xf0, 0xc2, 0x04, 0x12, 0x09, 0x4f, + 0x50, 0x25, 0x12, 0x0a, 0xbb, 0x7f, 0x02, 0x12, 0x0a, 0xd8, 0x90, + 0x01, 0x04, 0xe0, 0x54, 0x7f, 0xf0, 0x90, 0x00, 0x0b, 0xe0, 0x54, + 0xfd, 0xff, 0xf0, 0xe4, 0x90, 0x00, 0x04, 0xf0, 0xef, 0x54, 0xbf, + 0x90, 0x00, 0x0b, 0xf0, 0xc2, 0x04, 0x12, 0x08, 0xed, 0x50, 0x2d, + 0x12, 0x0a, 0xbb, 0x7e, 0x30, 0x7f, 0xe0, 0x7c, 0x1c, 0x7d, 0x7e, + 0x75, 0x1b, 0x12, 0x7b, 0x06, 0x12, 0x13, 0xc8, 0x90, 0x00, 0x04, + 0x74, 0x02, 0xf0, 0x90, 0x00, 0x0a, 0xf0, 0x90, 0x01, 0x06, 0xe0, + 0x54, 0xdf, 0xf0, 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xbf, 0xf0, 0xc2, + 0x04, 0x22, 0xef, 0x8d, 0xf0, 0xa4, 0xa8, 0xf0, 0xcf, 0x8c, 0xf0, + 0xa4, 0x28, 0xce, 0x8d, 0xf0, 0xa4, 0x2e, 0xfe, 0x22, 0xbc, 0x00, + 0x0b, 0xbe, 0x00, 0x29, 0xef, 0x8d, 0xf0, 0x84, 0xff, 0xad, 0xf0, + 0x22, 0xe4, 0xcc, 0xf8, 0x75, 0xf0, 0x08, 0xef, 0x2f, 0xff, 0xee, + 0x33, 0xfe, 0xec, 0x33, 0xfc, 0xee, 0x9d, 0xec, 0x98, 0x40, 0x05, + 0xfc, 0xee, 0x9d, 0xfe, 0x0f, 0xd5, 0xf0, 0xe9, 0xe4, 0xce, 0xfd, + 0x22, 0xed, 0xf8, 0xf5, 0xf0, 0xee, 0x84, 0x20, 0xd2, 0x1c, 0xfe, + 0xad, 0xf0, 0x75, 0xf0, 0x08, 0xef, 0x2f, 0xff, 0xed, 0x33, 0xfd, + 0x40, 0x07, 0x98, 0x50, 0x06, 0xd5, 0xf0, 0xf2, 0x22, 0xc3, 0x98, + 0xfd, 0x0f, 0xd5, 0xf0, 0xea, 0x22, 0xc5, 0xf0, 0xf8, 0xa3, 0xe0, + 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, + 0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, + 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x22, 0xec, 0xf0, 0xa3, 0xed, + 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22, 0xa4, 0x25, 0x82, + 0xf5, 0x82, 0xe5, 0xf0, 0x35, 0x83, 0xf5, 0x83, 0x22, 0xd0, 0x83, + 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, + 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, + 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, + 0xa3, 0x80, 0xdf, 0x8a, 0x83, 0x89, 0x82, 0xe4, 0x73, 0xe5, 0x2e, + 0x14, 0x60, 0x1d, 0x14, 0x60, 0x3d, 0x14, 0x60, 0x5d, 0x14, 0x70, + 0x03, 0x02, 0x05, 0x18, 0x24, 0x04, 0x60, 0x03, 0x02, 0x05, 0x2e, + 0x20, 0x0d, 0x03, 0x02, 0x05, 0x2e, 0x75, 0x2e, 0x01, 0x22, 0x90, + 0x00, 0x0a, 0xe0, 0xff, 0x30, 0xe5, 0x03, 0x44, 0x20, 0xf0, 0xe5, + 0x40, 0x45, 0x3f, 0x60, 0x03, 0x02, 0x05, 0x2e, 0x75, 0x2e, 0x02, + 0x12, 0x1b, 0x12, 0x12, 0x1b, 0xce, 0xaf, 0x28, 0x12, 0x1b, 0x8f, + 0x22, 0x90, 0x01, 0x03, 0xe0, 0xff, 0x30, 0xe7, 0x76, 0xef, 0x44, + 0x80, 0x90, 0x01, 0x03, 0xf0, 0x12, 0x08, 0x55, 0x12, 0x1b, 0x55, + 0x12, 0x1c, 0x01, 0x75, 0x2e, 0x03, 0xaf, 0x22, 0x7e, 0x00, 0x12, + 0x1c, 0x45, 0x22, 0xe5, 0x40, 0x45, 0x3f, 0x70, 0x21, 0x12, 0x17, + 0xd8, 0x12, 0x1b, 0xce, 0x12, 0x1b, 0x35, 0x12, 0x1c, 0x01, 0x12, + 0x1c, 0x1f, 0x30, 0x0d, 0x0b, 0x75, 0x2e, 0x01, 0xaf, 0x32, 0x7e, + 0x00, 0x12, 0x1c, 0x45, 0x22, 0xe4, 0xf5, 0x2e, 0x22, 0x90, 0x00, + 0x0a, 0xe0, 0xff, 0x30, 0xe5, 0x2c, 0x44, 0x20, 0xf0, 0x12, 0x17, + 0xd8, 0x12, 0x1b, 0xce, 0x12, 0x1b, 0x35, 0x12, 0x1c, 0x01, 0x12, + 0x1c, 0x1f, 0x75, 0x2e, 0x04, 0x22, 0xe5, 0x40, 0x45, 0x3f, 0x70, + 0x10, 0x30, 0x0d, 0x0a, 0x75, 0x2e, 0x01, 0xaf, 0x32, 0xfe, 0x12, + 0x1c, 0x45, 0x22, 0xe4, 0xf5, 0x2e, 0x22, 0x12, 0x09, 0x25, 0x40, + 0x05, 0x12, 0x08, 0xed, 0x50, 0x44, 0x7e, 0x30, 0x7f, 0xe0, 0x7c, + 0x1c, 0x7d, 0x7e, 0x75, 0x1b, 0x12, 0x7b, 0x06, 0x12, 0x13, 0xc8, + 0x90, 0x00, 0x04, 0x74, 0x02, 0xf0, 0x90, 0x00, 0x0a, 0xf0, 0xe4, + 0xff, 0xfe, 0x12, 0x0e, 0x29, 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xbf, + 0xf0, 0x54, 0x7f, 0xff, 0xf0, 0xe4, 0x90, 0x30, 0xe9, 0xf0, 0xef, + 0x54, 0xfd, 0x90, 0x00, 0x0b, 0xf0, 0xe4, 0x90, 0x00, 0x04, 0xf0, + 0xd2, 0x09, 0x12, 0x0e, 0x47, 0xe4, 0xf5, 0x2f, 0x12, 0x09, 0x3a, + 0x50, 0x48, 0x7e, 0x30, 0x7f, 0xe0, 0x7c, 0x1c, 0x7d, 0x7e, 0x75, + 0x1b, 0x12, 0x7b, 0x06, 0x12, 0x13, 0xc8, 0x90, 0x00, 0x04, 0x74, + 0x02, 0xf0, 0x90, 0x00, 0x0a, 0xf0, 0xe4, 0xff, 0xfe, 0x12, 0x0e, + 0x29, 0x90, 0x00, 0x0b, 0xe0, 0x54, 0xbf, 0xf0, 0x54, 0xfd, 0xf0, + 0xe4, 0x90, 0x00, 0x04, 0xf0, 0xff, 0x12, 0x0a, 0xd8, 0x50, 0x04, + 0x75, 0x2f, 0x07, 0x22, 0x90, 0x01, 0x04, 0xe0, 0x54, 0x7f, 0xf0, + 0xd2, 0x09, 0x12, 0x0e, 0x47, 0xe4, 0xf5, 0x2f, 0x22, 0xc2, 0xaf, + 0xe4, 0xf5, 0x2f, 0xf5, 0x88, 0x75, 0xa8, 0x0f, 0x75, 0x89, 0x11, + 0xf5, 0xb8, 0xf5, 0xe8, 0x75, 0x90, 0x0f, 0x75, 0x31, 0xff, 0x75, + 0x2b, 0xff, 0x90, 0x22, 0x2e, 0xf0, 0xa3, 0xf0, 0x90, 0x22, 0x4e, + 0xf0, 0xa3, 0xf0, 0xc2, 0x05, 0xc2, 0x08, 0xc2, 0x00, 0xc2, 0x07, + 0xc2, 0x04, 0x90, 0x00, 0x0a, 0x74, 0xff, 0xf0, 0x90, 0x00, 0x0b, + 0x74, 0x01, 0xf0, 0x90, 0x01, 0x03, 0x74, 0xff, 0xf0, 0xe4, 0x90, + 0x01, 0x04, 0xf0, 0x90, 0x01, 0x05, 0x74, 0xff, 0xf0, 0xe4, 0x90, + 0x01, 0x06, 0xf0, 0x90, 0x00, 0x04, 0xf0, 0x90, 0x30, 0xe8, 0x74, + 0x10, 0xf0, 0x90, 0x01, 0x07, 0xf0, 0x90, 0x01, 0x08, 0x04, 0xf0, + 0x90, 0x01, 0x09, 0x74, 0x48, 0xf0, 0x90, 0x01, 0x0a, 0x74, 0x7f, + 0xf0, 0x90, 0x01, 0x02, 0x74, 0x1f, 0xf0, 0x90, 0x01, 0x00, 0x74, + 0x14, 0xf0, 0x90, 0x01, 0x01, 0x74, 0x20, 0xf0, 0x90, 0x00, 0x00, + 0xe0, 0x44, 0x80, 0xf0, 0x75, 0x49, 0x00, 0x75, 0x4a, 0x01, 0xc2, + 0x01, 0xd2, 0xaf, 0x22, 0x12, 0x08, 0xed, 0x50, 0x2d, 0x12, 0x0a, + 0x78, 0x90, 0x01, 0x06, 0xe0, 0x54, 0xdf, 0xf0, 0x7e, 0x30, 0x7f, + 0xe0, 0x7c, 0x1c, 0x7d, 0x7e, 0x75, 0x1b, 0x12, 0x7b, 0x06, 0x12, + 0x13, 0xc8, 0x90, 0x00, 0x04, 0x74, 0x02, 0xf0, 0x90, 0x00, 0x0a, + 0xf0, 0xd2, 0x09, 0x12, 0x0e, 0x47, 0xe4, 0xf5, 0x2f, 0x22, 0x12, + 0x09, 0x4f, 0x50, 0x50, 0x12, 0x0a, 0x78, 0x90, 0x00, 0x0b, 0xe0, + 0x54, 0xfd, 0xf0, 0xe4, 0x90, 0x00, 0x04, 0xf0, 0x90, 0x01, 0x03, + 0x74, 0x80, 0xf0, 0x90, 0x01, 0x04, 0xe0, 0x44, 0x80, 0xf0, 0x7f, + 0x02, 0x12, 0x0a, 0xd8, 0x50, 0x04, 0x75, 0x2f, 0x05, 0x22, 0x7e, + 0x30, 0x7f, 0xe0, 0x7c, 0x1c, 0x7d, 0x7e, 0x75, 0x1b, 0x12, 0x7b, + 0x06, 0x12, 0x13, 0xc8, 0x90, 0x00, 0x04, 0x74, 0x02, 0xf0, 0x90, + 0x00, 0x0a, 0xf0, 0xd2, 0x09, 0x12, 0x0e, 0x47, 0x90, 0x01, 0x04, + 0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5, 0x2f, 0x22, 0x90, 0x30, 0x3a, + 0xe0, 0xf5, 0x10, 0x12, 0x1c, 0x5c, 0x50, 0x26, 0xe5, 0x27, 0x30, + 0xe6, 0x05, 0x53, 0x10, 0xfd, 0x80, 0x03, 0x43, 0x10, 0x02, 0xe5, + 0x27, 0x30, 0xe7, 0x05, 0x53, 0x10, 0xf7, 0x80, 0x03, 0x43, 0x10, + 0x08, 0x53, 0x10, 0xfe, 0x43, 0x10, 0x04, 0x90, 0x30, 0x3a, 0xe5, + 0x10, 0xf0, 0x12, 0x1c, 0x51, 0x50, 0x48, 0x90, 0x01, 0x03, 0xe0, + 0xf5, 0x10, 0x54, 0x1c, 0x60, 0x3e, 0xe5, 0x10, 0x54, 0xe3, 0xf0, + 0xa3, 0xe0, 0xf5, 0x10, 0xf0, 0xe5, 0x27, 0x30, 0xe6, 0x05, 0x43, + 0x10, 0x02, 0x80, 0x03, 0x53, 0x10, 0xfd, 0xe5, 0x27, 0x30, 0xe7, + 0x05, 0x43, 0x10, 0x08, 0x80, 0x03, 0x53, 0x10, 0xf7, 0x53, 0x10, + 0xfe, 0x43, 0x10, 0x04, 0x90, 0x30, 0x3a, 0xe5, 0x10, 0xf0, 0xaf, + 0x29, 0x7e, 0x00, 0x12, 0x1c, 0x70, 0xaf, 0x35, 0x7e, 0x00, 0x12, + 0x1c, 0x77, 0x22, 0x12, 0x08, 0xca, 0x50, 0x72, 0x12, 0x10, 0xcd, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 08:29:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 088B9106566B; Wed, 14 Mar 2012 08:29:22 +0000 (UTC) (envelope-from gleb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E801A8FC0A; Wed, 14 Mar 2012 08:29:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2E8TLNA085149; Wed, 14 Mar 2012 08:29:21 GMT (envelope-from gleb@svn.freebsd.org) Received: (from gleb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2E8TLjS085147; Wed, 14 Mar 2012 08:29:21 GMT (envelope-from gleb@svn.freebsd.org) Message-Id: <201203140829.q2E8TLjS085147@svn.freebsd.org> From: Gleb Kurtsou Date: Wed, 14 Mar 2012 08:29: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: r232959 - head/sys/fs/tmpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 08:29:22 -0000 Author: gleb Date: Wed Mar 14 08:29:21 2012 New Revision: 232959 URL: http://svn.freebsd.org/changeset/base/232959 Log: Don't enforce LK_RETRY to get existing vnode in tmpfs_alloc_vp() Doomed vnode is hardly of any use here, besides all callers handle error case. vfs_hash_get() does the same. Don't mess with vnode holdcount, vget() takes care of it already. Approved by: mdf (mentor) Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Wed Mar 14 08:00:33 2012 (r232958) +++ head/sys/fs/tmpfs/tmpfs_subr.c Wed Mar 14 08:29:21 2012 (r232959) @@ -320,9 +320,11 @@ loop: MPASS((node->tn_vpstate & TMPFS_VNODE_DOOMED) == 0); VI_LOCK(vp); TMPFS_NODE_UNLOCK(node); - vholdl(vp); - (void) vget(vp, lkflag | LK_INTERLOCK | LK_RETRY, curthread); - vdrop(vp); + error = vget(vp, lkflag | LK_INTERLOCK, curthread); + if (error != 0) { + vp = NULL; + goto out; + } /* * Make sure the vnode is still there after @@ -420,11 +422,13 @@ unlock: out: *vpp = vp; - MPASS(IFF(error == 0, *vpp != NULL && VOP_ISLOCKED(*vpp))); #ifdef INVARIANTS - TMPFS_NODE_LOCK(node); - MPASS(*vpp == node->tn_vnode); - TMPFS_NODE_UNLOCK(node); + if (error == 0) { + MPASS(*vpp != NULL && VOP_ISLOCKED(*vpp)); + TMPFS_NODE_LOCK(node); + MPASS(*vpp == node->tn_vnode); + TMPFS_NODE_UNLOCK(node); + } #endif return error; From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 09:03:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 42257106566B; Wed, 14 Mar 2012 09:03:43 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from dhcp170-36-red.yandex.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with ESMTP id 2E78C14E13A; Wed, 14 Mar 2012 09:03:21 +0000 (UTC) Message-ID: <4F605E3A.5050702@FreeBSD.org> Date: Wed, 14 Mar 2012 13:00:42 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111117 Thunderbird/8.0 MIME-Version: 1.0 To: Marko Zec References: <201203121541.q2CFfa5G071067@svn.freebsd.org> <201203121817.41503.zec@fer.hr> In-Reply-To: <201203121817.41503.zec@fer.hr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232868 - 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: Wed, 14 Mar 2012 09:03:43 -0000 On 12.03.2012 21:17, Marko Zec wrote: > On Monday 12 March 2012 16:41:36 Alexander V. Chernikov wrote: >> Author: melifaro >> Date: Mon Mar 12 15:41:36 2012 >> New Revision: 232868 >> URL: http://svn.freebsd.org/changeset/base/232868 >> >> Log: >> Fix VNET build broken by r232865. >> Temporary remove the ability to assign different number of tables per >> VNET instance. > > Please don't let your code remain in this state for too long. You've declared > V_fw_tables_max to unconditionally resolve to a true global variable, which > violates the convention of using V_ prefix in networking code exclusively for > the purpose of denoting VNET-virtualized state. I understand this. I plan to change it to normal state today or tomorrow. Is this OK? Thanks for noting. > > Thanks, > > Marko > > >> Modified: >> head/sys/netinet/ipfw/ip_fw2.c >> head/sys/netinet/ipfw/ip_fw_private.h >> >> Modified: head/sys/netinet/ipfw/ip_fw2.c >> =========================================================================== >> === --- head/sys/netinet/ipfw/ip_fw2.c Mon Mar 12 15:13:17 2012 (r232867) >> +++ head/sys/netinet/ipfw/ip_fw2.c Mon Mar 12 15:41:36 2012 (r232868) @@ >> -117,7 +117,7 @@ VNET_DEFINE(int, autoinc_step); >> VNET_DEFINE(int, fw_one_pass) = 1; >> >> /* Use 128 tables by default */ >> -VNET_DEFINE(int, fw_tables_max) = IPFW_TABLES_MAX; >> +int fw_tables_max = IPFW_TABLES_MAX; >> >> /* >> * Each rule belongs to one of 32 different sets (0..31). >> >> Modified: head/sys/netinet/ipfw/ip_fw_private.h >> =========================================================================== >> === --- head/sys/netinet/ipfw/ip_fw_private.h Mon Mar 12 15:13:17 >> 2012 (r232867) +++ head/sys/netinet/ipfw/ip_fw_private.h Mon Mar 12 >> 15:41:36 2012 (r232868) @@ -209,8 +209,8 @@ VNET_DECLARE(u_int32_t, >> set_disable); >> VNET_DECLARE(int, autoinc_step); >> #define V_autoinc_step VNET(autoinc_step) >> >> -VNET_DECLARE(int, fw_tables_max); >> -#define V_fw_tables_max VNET(fw_tables_max) >> +extern int fw_tables_max; >> +#define V_fw_tables_max fw_tables_max >> >> struct ip_fw_chain { >> struct ip_fw *rules; /* list of rules */ > > > -- WBR, Alexander From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 09:15:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E2F0106564A; Wed, 14 Mar 2012 09:15:51 +0000 (UTC) (envelope-from gleb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88D648FC18; Wed, 14 Mar 2012 09:15:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2E9Fpn3090093; Wed, 14 Mar 2012 09:15:51 GMT (envelope-from gleb@svn.freebsd.org) Received: (from gleb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2E9Fpbq090090; Wed, 14 Mar 2012 09:15:51 GMT (envelope-from gleb@svn.freebsd.org) Message-Id: <201203140915.q2E9Fpbq090090@svn.freebsd.org> From: Gleb Kurtsou Date: Wed, 14 Mar 2012 09:15: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: r232960 - head/sys/fs/tmpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 09:15:51 -0000 Author: gleb Date: Wed Mar 14 09:15:50 2012 New Revision: 232960 URL: http://svn.freebsd.org/changeset/base/232960 Log: Prevent tmpfs_rename() deadlock in a way similar to UFS Unlock vnodes and try to lock them one by one. Relookup fvp and tvp. Approved by: mdf (mentor) Modified: head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Wed Mar 14 08:29:21 2012 (r232959) +++ head/sys/fs/tmpfs/tmpfs_subr.c Wed Mar 14 09:15:50 2012 (r232960) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -56,6 +57,8 @@ __FBSDID("$FreeBSD$"); #include #include +SYSCTL_NODE(_vfs, OID_AUTO, tmpfs, CTLFLAG_RW, 0, "tmpfs file system"); + /* --------------------------------------------------------------------- */ /* Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Wed Mar 14 08:29:21 2012 (r232959) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Wed Mar 14 09:15:50 2012 (r232960) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -57,6 +58,13 @@ __FBSDID("$FreeBSD$"); #include #include +SYSCTL_DECL(_vfs_tmpfs); + +static volatile int tmpfs_rename_restarts; +SYSCTL_INT(_vfs_tmpfs, OID_AUTO, rename_restarts, CTLFLAG_RD, + __DEVOLATILE(int *, &tmpfs_rename_restarts), 0, + "Times rename had to restart due to lock contention"); + /* --------------------------------------------------------------------- */ static int @@ -918,6 +926,139 @@ out: /* --------------------------------------------------------------------- */ +/* + * We acquire all but fdvp locks using non-blocking acquisitions. If we + * fail to acquire any lock in the path we will drop all held locks, + * acquire the new lock in a blocking fashion, and then release it and + * restart the rename. This acquire/release step ensures that we do not + * spin on a lock waiting for release. On error release all vnode locks + * and decrement references the way tmpfs_rename() would do. + */ +static int +tmpfs_rename_relock(struct vnode *fdvp, struct vnode **fvpp, + struct vnode *tdvp, struct vnode **tvpp, + struct componentname *fcnp, struct componentname *tcnp) +{ + struct vnode *nvp; + struct mount *mp; + struct tmpfs_dirent *de; + int error, restarts = 0; + + VOP_UNLOCK(tdvp, 0); + if (*tvpp != NULL && *tvpp != tdvp) + VOP_UNLOCK(*tvpp, 0); + mp = fdvp->v_mount; + +relock: + restarts += 1; + error = vn_lock(fdvp, LK_EXCLUSIVE); + if (error) + goto releout; + if (vn_lock(tdvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { + VOP_UNLOCK(fdvp, 0); + error = vn_lock(tdvp, LK_EXCLUSIVE); + if (error) + goto releout; + VOP_UNLOCK(tdvp, 0); + goto relock; + } + /* + * Re-resolve fvp to be certain it still exists and fetch the + * correct vnode. + */ + de = tmpfs_dir_lookup(VP_TO_TMPFS_DIR(fdvp), NULL, fcnp); + if (de == NULL) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + if ((fcnp->cn_flags & ISDOTDOT) != 0 || + (fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.')) + error = EINVAL; + else + error = ENOENT; + goto releout; + } + error = tmpfs_alloc_vp(mp, de->td_node, LK_EXCLUSIVE | LK_NOWAIT, &nvp); + if (error != 0) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + if (error != EBUSY) + goto releout; + error = tmpfs_alloc_vp(mp, de->td_node, LK_EXCLUSIVE, &nvp); + if (error != 0) + goto releout; + VOP_UNLOCK(nvp, 0); + /* + * Concurrent rename race. + */ + if (nvp == tdvp) { + vrele(nvp); + error = EINVAL; + goto releout; + } + vrele(*fvpp); + *fvpp = nvp; + goto relock; + } + vrele(*fvpp); + *fvpp = nvp; + VOP_UNLOCK(*fvpp, 0); + /* + * Re-resolve tvp and acquire the vnode lock if present. + */ + de = tmpfs_dir_lookup(VP_TO_TMPFS_DIR(tdvp), NULL, tcnp); + /* + * If tvp disappeared we just carry on. + */ + if (de == NULL && *tvpp != NULL) { + vrele(*tvpp); + *tvpp = NULL; + } + /* + * Get the tvp ino if the lookup succeeded. We may have to restart + * if the non-blocking acquire fails. + */ + if (de != NULL) { + nvp = NULL; + error = tmpfs_alloc_vp(mp, de->td_node, + LK_EXCLUSIVE | LK_NOWAIT, &nvp); + if (*tvpp != NULL) + vrele(*tvpp); + *tvpp = nvp; + if (error != 0) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + if (error != EBUSY) + goto releout; + error = tmpfs_alloc_vp(mp, de->td_node, LK_EXCLUSIVE, + &nvp); + if (error != 0) + goto releout; + VOP_UNLOCK(nvp, 0); + /* + * fdvp contains fvp, thus tvp (=fdvp) is not empty. + */ + if (nvp == fdvp) { + error = ENOTEMPTY; + goto releout; + } + goto relock; + } + } + tmpfs_rename_restarts += restarts; + + return (0); + +releout: + vrele(fdvp); + vrele(*fvpp); + vrele(tdvp); + if (*tvpp != NULL) + vrele(*tvpp); + tmpfs_rename_restarts += restarts; + + return (error); +} + static int tmpfs_rename(struct vop_rename_args *v) { @@ -927,6 +1068,7 @@ tmpfs_rename(struct vop_rename_args *v) struct vnode *tdvp = v->a_tdvp; struct vnode *tvp = v->a_tvp; struct componentname *tcnp = v->a_tcnp; + struct mount *mp = NULL; char *newname; int error; @@ -942,8 +1084,6 @@ tmpfs_rename(struct vop_rename_args *v) MPASS(fcnp->cn_flags & HASBUF); MPASS(tcnp->cn_flags & HASBUF); - tnode = (tvp == NULL) ? NULL : VP_TO_TMPFS_NODE(tvp); - /* Disallow cross-device renames. * XXX Why isn't this done by the caller? */ if (fvp->v_mount != tdvp->v_mount || @@ -952,9 +1092,6 @@ tmpfs_rename(struct vop_rename_args *v) goto out; } - tmp = VFS_TO_TMPFS(tdvp->v_mount); - tdnode = VP_TO_TMPFS_DIR(tdvp); - /* If source and target are the same file, there is nothing to do. */ if (fvp == tvp) { error = 0; @@ -963,8 +1100,37 @@ tmpfs_rename(struct vop_rename_args *v) /* If we need to move the directory between entries, lock the * source so that we can safely operate on it. */ - if (fdvp != tdvp && fdvp != tvp) - vn_lock(fdvp, LK_EXCLUSIVE | LK_RETRY); + if (fdvp != tdvp && fdvp != tvp) { + if (vn_lock(fdvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { + mp = tdvp->v_mount; + error = vfs_busy(mp, 0); + if (error != 0) { + mp = NULL; + goto out; + } + error = tmpfs_rename_relock(fdvp, &fvp, tdvp, &tvp, + fcnp, tcnp); + if (error != 0) { + vfs_unbusy(mp); + return (error); + } + ASSERT_VOP_ELOCKED(fdvp, + "tmpfs_rename: fdvp not locked"); + ASSERT_VOP_ELOCKED(tdvp, + "tmpfs_rename: tdvp not locked"); + if (tvp != NULL) + ASSERT_VOP_ELOCKED(tvp, + "tmpfs_rename: tvp not locked"); + if (fvp == tvp) { + error = 0; + goto out_locked; + } + } + } + + tmp = VFS_TO_TMPFS(tdvp->v_mount); + tdnode = VP_TO_TMPFS_DIR(tdvp); + tnode = (tvp == NULL) ? NULL : VP_TO_TMPFS_NODE(tvp); fdnode = VP_TO_TMPFS_DIR(fdvp); fnode = VP_TO_TMPFS_NODE(fvp); de = tmpfs_dir_lookup(fdnode, fnode, fcnp); @@ -1158,6 +1324,9 @@ out: vrele(fdvp); vrele(fvp); + if (mp != NULL) + vfs_unbusy(mp); + return error; } From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 09:44:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65D951065672; Wed, 14 Mar 2012 09:44:47 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 510538FC1C; Wed, 14 Mar 2012 09:44:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2E9ilVU094388; Wed, 14 Mar 2012 09:44:47 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2E9ilvF094386; Wed, 14 Mar 2012 09:44:47 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203140944.q2E9ilvF094386@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 14 Mar 2012 09:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232961 - stable/9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 09:44:47 -0000 Author: pluknet Date: Wed Mar 14 09:44:46 2012 New Revision: 232961 URL: http://svn.freebsd.org/changeset/base/232961 Log: MFC r232671: Add lib32 part for libutil after its version bump to 9. PR: misc/165523 Submitted by: Andrey Zonov Modified: stable/9/ObsoleteFiles.inc (contents, props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Wed Mar 14 09:15:50 2012 (r232960) +++ stable/9/ObsoleteFiles.inc Wed Mar 14 09:44:46 2012 (r232961) @@ -352,6 +352,9 @@ OLD_FILES+=usr/share/man/man5/lastlog.5. OLD_FILES+=usr/share/man/man5/utmp.5.gz OLD_FILES+=usr/share/man/man5/wtmp.5.gz OLD_LIBS+=lib/libutil.so.8 +.if ${TARGET_ARCH} == "amd64" +OLB_LIBS+=usr/lib32/libutil.so.8 +.endif # 20100105: new userland semaphore implementation OLD_FILES+=usr/include/sys/semaphore.h # 20100103: ntptrace(8) removed From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 10:02:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 937E8106564A; Wed, 14 Mar 2012 10:02:36 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63B418FC14; Wed, 14 Mar 2012 10:02:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EA2aMi096567; Wed, 14 Mar 2012 10:02:36 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EA2aYS096565; Wed, 14 Mar 2012 10:02:36 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201203141002.q2EA2aYS096565@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 Mar 2012 10:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232962 - in stable/9/sys: boot/common i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 10:02:36 -0000 Author: marius Date: Wed Mar 14 10:02:35 2012 New Revision: 232962 URL: http://svn.freebsd.org/changeset/base/232962 Log: MFC: r232822 Fix a bug introduced in r223938; on big-endian machines coping a 32-bit quantum bytewise to the address of a 64-bit variable results in writing to the "wrong" 32-bit half so adjust the address accordingly. This fix is implemented in a hackish way for two reasons: o in order to be able to get it into 8.3 with zero impact on the little- endian architectures where this bug has no effect and o to avoid blowing the x86 boot2 out of the water again when compiling it with clang, which all sane versions of this fix tested do. This change fixes booting from UFS1 file systems on big-endian machines. Modified: stable/9/sys/boot/common/ufsread.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/boot/common/ufsread.c ============================================================================== --- stable/9/sys/boot/common/ufsread.c Wed Mar 14 09:44:46 2012 (r232961) +++ stable/9/sys/boot/common/ufsread.c Wed Mar 14 10:02:35 2012 (r232962) @@ -46,6 +46,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include #include @@ -262,15 +264,28 @@ fsread(ino_t inode, void *buf, size_t nb } n = (lbn - NDADDR) & (n - 1); #if defined(UFS1_ONLY) +#if BYTE_ORDER == BIG_ENDIAN + memcpy((char *)&addr + sizeof(addr) - + sizeof(ufs1_daddr_t), (ufs1_daddr_t *)indbuf + n, + sizeof(ufs1_daddr_t)); +#else memcpy(&addr, (ufs1_daddr_t *)indbuf + n, sizeof(ufs1_daddr_t)); +#endif #elif defined(UFS2_ONLY) memcpy(&addr, (ufs2_daddr_t *)indbuf + n, sizeof(ufs2_daddr_t)); #else if (fs.fs_magic == FS_UFS1_MAGIC) +#if BYTE_ORDER == BIG_ENDIAN + memcpy((char *)&addr + sizeof(addr) - + sizeof(ufs1_daddr_t), + (ufs1_daddr_t *)indbuf + n, + sizeof(ufs1_daddr_t)); +#else memcpy(&addr, (ufs1_daddr_t *)indbuf + n, sizeof(ufs1_daddr_t)); +#endif else memcpy(&addr, (ufs2_daddr_t *)indbuf + n, sizeof(ufs2_daddr_t)); From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 10:02:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4FFF1065781; Wed, 14 Mar 2012 10:02:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 286078FC08; Wed, 14 Mar 2012 10:02:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EA2h9v096608; Wed, 14 Mar 2012 10:02:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EA2gop096606; Wed, 14 Mar 2012 10:02:42 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201203141002.q2EA2gop096606@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 Mar 2012 10:02:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232963 - in stable/8/sys: boot/common i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 10:02:43 -0000 Author: marius Date: Wed Mar 14 10:02:42 2012 New Revision: 232963 URL: http://svn.freebsd.org/changeset/base/232963 Log: MFC: r232822 Fix a bug introduced in r223938 (MFC'ed to stable/8 in r224411); on big-endian machines coping a 32-bit quantum bytewise to the address of a 64-bit variable results in writing to the "wrong" 32-bit half so adjust the address accordingly. This fix is implemented in a hackish way for two reasons: o in order to be able to get it into 8.3 with zero impact on the little- endian architectures where this bug has no effect and o to avoid blowing the x86 boot2 out of the water again when compiling it with clang, which all sane versions of this fix tested do. This change fixes booting from UFS1 file systems on big-endian machines. Modified: stable/8/sys/boot/common/ufsread.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (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/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/boot/common/ufsread.c ============================================================================== --- stable/8/sys/boot/common/ufsread.c Wed Mar 14 10:02:35 2012 (r232962) +++ stable/8/sys/boot/common/ufsread.c Wed Mar 14 10:02:42 2012 (r232963) @@ -46,6 +46,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include #include @@ -262,15 +264,28 @@ fsread(ino_t inode, void *buf, size_t nb } n = (lbn - NDADDR) & (n - 1); #if defined(UFS1_ONLY) +#if BYTE_ORDER == BIG_ENDIAN + memcpy((char *)&addr + sizeof(addr) - + sizeof(ufs1_daddr_t), (ufs1_daddr_t *)indbuf + n, + sizeof(ufs1_daddr_t)); +#else memcpy(&addr, (ufs1_daddr_t *)indbuf + n, sizeof(ufs1_daddr_t)); +#endif #elif defined(UFS2_ONLY) memcpy(&addr, (ufs2_daddr_t *)indbuf + n, sizeof(ufs2_daddr_t)); #else if (fs.fs_magic == FS_UFS1_MAGIC) +#if BYTE_ORDER == BIG_ENDIAN + memcpy((char *)&addr + sizeof(addr) - + sizeof(ufs1_daddr_t), + (ufs1_daddr_t *)indbuf + n, + sizeof(ufs1_daddr_t)); +#else memcpy(&addr, (ufs1_daddr_t *)indbuf + n, sizeof(ufs1_daddr_t)); +#endif else memcpy(&addr, (ufs2_daddr_t *)indbuf + n, sizeof(ufs2_daddr_t)); From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 10:10:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03C8E106566C; Wed, 14 Mar 2012 10:10:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C77018FC0A; Wed, 14 Mar 2012 10:10:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EAAFBS096960; Wed, 14 Mar 2012 10:10:15 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EAAFwm096958; Wed, 14 Mar 2012 10:10:15 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201203141010.q2EAAFwm096958@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 14 Mar 2012 10:10: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: r232964 - head/sbin/mdconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 10:10:17 -0000 Author: trasz Date: Wed Mar 14 10:10:15 2012 New Revision: 232964 URL: http://svn.freebsd.org/changeset/base/232964 Log: Add missing "static". Modified: head/sbin/mdconfig/mdconfig.c Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Wed Mar 14 10:02:42 2012 (r232963) +++ head/sbin/mdconfig/mdconfig.c Wed Mar 14 10:10:15 2012 (r232964) @@ -516,7 +516,7 @@ md_prthumanval(char *length) (void)printf("%6s", buf); } -int +static int md_query(char *name) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 13:08:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A8E5106566B; Wed, 14 Mar 2012 13:08:17 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CDDE8FC19; Wed, 14 Mar 2012 13:08:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ED8HME014855; Wed, 14 Mar 2012 13:08:17 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ED8HcB014853; Wed, 14 Mar 2012 13:08:17 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201203141308.q2ED8HcB014853@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 Mar 2012 13:08:17 +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: r232965 - in releng/8.3/sys: boot/common i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 13:08:17 -0000 Author: marius Date: Wed Mar 14 13:08:16 2012 New Revision: 232965 URL: http://svn.freebsd.org/changeset/base/232965 Log: MFC: r232822 Fix a bug introduced in r223938 (MFC'ed to stable/8 in r224411); on big-endian machines coping a 32-bit quantum bytewise to the address of a 64-bit variable results in writing to the "wrong" 32-bit half so adjust the address accordingly. This fix is implemented in a hackish way for two reasons: o in order to be able to get it into 8.3 with zero impact on the little- endian architectures where this bug has no effect and o to avoid blowing the x86 boot2 out of the water again when compiling it with clang, which all sane versions of this fix tested do. This change fixes booting from UFS1 file systems on big-endian machines. Approved by: re (kib) Modified: releng/8.3/sys/boot/common/ufsread.c Directory Properties: releng/8.3/sys/ (props changed) releng/8.3/sys/amd64/include/xen/ (props changed) releng/8.3/sys/boot/ (props changed) releng/8.3/sys/cddl/contrib/opensolaris/ (props changed) releng/8.3/sys/contrib/dev/acpica/ (props changed) releng/8.3/sys/contrib/pf/ (props changed) releng/8.3/sys/dev/e1000/ (props changed) releng/8.3/sys/i386/conf/XENHVM (props changed) Modified: releng/8.3/sys/boot/common/ufsread.c ============================================================================== --- releng/8.3/sys/boot/common/ufsread.c Wed Mar 14 10:10:15 2012 (r232964) +++ releng/8.3/sys/boot/common/ufsread.c Wed Mar 14 13:08:16 2012 (r232965) @@ -46,6 +46,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include #include @@ -262,15 +264,28 @@ fsread(ino_t inode, void *buf, size_t nb } n = (lbn - NDADDR) & (n - 1); #if defined(UFS1_ONLY) +#if BYTE_ORDER == BIG_ENDIAN + memcpy((char *)&addr + sizeof(addr) - + sizeof(ufs1_daddr_t), (ufs1_daddr_t *)indbuf + n, + sizeof(ufs1_daddr_t)); +#else memcpy(&addr, (ufs1_daddr_t *)indbuf + n, sizeof(ufs1_daddr_t)); +#endif #elif defined(UFS2_ONLY) memcpy(&addr, (ufs2_daddr_t *)indbuf + n, sizeof(ufs2_daddr_t)); #else if (fs.fs_magic == FS_UFS1_MAGIC) +#if BYTE_ORDER == BIG_ENDIAN + memcpy((char *)&addr + sizeof(addr) - + sizeof(ufs1_daddr_t), + (ufs1_daddr_t *)indbuf + n, + sizeof(ufs1_daddr_t)); +#else memcpy(&addr, (ufs1_daddr_t *)indbuf + n, sizeof(ufs1_daddr_t)); +#endif else memcpy(&addr, (ufs2_daddr_t *)indbuf + n, sizeof(ufs2_daddr_t)); From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 13:09:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9DCBB1065673; Wed, 14 Mar 2012 13:09:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D6F48FC0C; Wed, 14 Mar 2012 13:09:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ED9fUI014932; Wed, 14 Mar 2012 13:09:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ED9f1x014930; Wed, 14 Mar 2012 13:09:41 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201203141309.q2ED9f1x014930@svn.freebsd.org> From: Marius Strobl Date: Wed, 14 Mar 2012 13:09:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232966 - stable/7/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 13:09:43 -0000 Author: marius Date: Wed Mar 14 13:09:41 2012 New Revision: 232966 URL: http://svn.freebsd.org/changeset/base/232966 Log: MFC: r232822 Fix a bug introduced in r223938 (MFC'ed to stable/7 in r224410); on big-endian machines coping a 32-bit quantum bytewise to the address of a 64-bit variable results in writing to the "wrong" 32-bit half so adjust the address accordingly. This fix is implemented in a hackish way for two reasons: o in order to be able to get it into 8.3 with zero impact on the little- endian architectures where this bug has no effect and o to avoid blowing the x86 boot2 out of the water again when compiling it with clang, which all sane versions of this fix tested do. This change fixes booting from UFS1 file systems on big-endian machines. Modified: stable/7/sys/boot/common/ufsread.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/common/ufsread.c ============================================================================== --- stable/7/sys/boot/common/ufsread.c Wed Mar 14 13:08:16 2012 (r232965) +++ stable/7/sys/boot/common/ufsread.c Wed Mar 14 13:09:41 2012 (r232966) @@ -46,6 +46,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include #include @@ -262,15 +264,28 @@ fsread(ino_t inode, void *buf, size_t nb } n = (lbn - NDADDR) & (n - 1); #if defined(UFS1_ONLY) +#if BYTE_ORDER == BIG_ENDIAN + memcpy((char *)&addr + sizeof(addr) - + sizeof(ufs1_daddr_t), (ufs1_daddr_t *)indbuf + n, + sizeof(ufs1_daddr_t)); +#else memcpy(&addr, (ufs1_daddr_t *)indbuf + n, sizeof(ufs1_daddr_t)); +#endif #elif defined(UFS2_ONLY) memcpy(&addr, (ufs2_daddr_t *)indbuf + n, sizeof(ufs2_daddr_t)); #else if (fs.fs_magic == FS_UFS1_MAGIC) +#if BYTE_ORDER == BIG_ENDIAN + memcpy((char *)&addr + sizeof(addr) - + sizeof(ufs1_daddr_t), + (ufs1_daddr_t *)indbuf + n, + sizeof(ufs1_daddr_t)); +#else memcpy(&addr, (ufs1_daddr_t *)indbuf + n, sizeof(ufs1_daddr_t)); +#endif else memcpy(&addr, (ufs2_daddr_t *)indbuf + n, sizeof(ufs2_daddr_t)); From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 14:01:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A84F7106566C; Wed, 14 Mar 2012 14:01:52 +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 945698FC12; Wed, 14 Mar 2012 14:01:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EE1ql7016597; Wed, 14 Mar 2012 14:01:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EE1qge016595; Wed, 14 Mar 2012 14:01:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203141401.q2EE1qge016595@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 14 Mar 2012 14:01: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: r232967 - head/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 14:01:52 -0000 Author: kib Date: Wed Mar 14 14:01:51 2012 New Revision: 232967 URL: http://svn.freebsd.org/changeset/base/232967 Log: Add PCI Id for the AMT SOL UART on G4x series Intel chipsets. Submitted by: admin zahost ru MFC after: 3 days Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Wed Mar 14 13:09:41 2012 (r232966) +++ head/sys/dev/uart/uart_bus_pci.c Wed Mar 14 14:01:51 2012 (r232967) @@ -113,6 +113,7 @@ static struct pci_id pci_ns8250_ids[] = { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, +{ 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x8811, 0xffff, 0, "Intel EG20T Serial Port 0", 0x10 }, From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 14:14:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0AEB81065743; Wed, 14 Mar 2012 14:14:17 +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 E8F728FC15; Wed, 14 Mar 2012 14:14:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EEEGsL017025; Wed, 14 Mar 2012 14:14:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EEEG21017023; Wed, 14 Mar 2012 14:14:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203141414.q2EEEG21017023@svn.freebsd.org> From: Alexander Motin Date: Wed, 14 Mar 2012 14:14: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: r232968 - stable/8/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 14:14:17 -0000 Author: mav Date: Wed Mar 14 14:14:16 2012 New Revision: 232968 URL: http://svn.freebsd.org/changeset/base/232968 Log: Dummy-initizlize variables to fix build breakage after r232942, because of gcc falsely reporting variables as uninitialized. Code committed at that revision don't even touch half of mentioned variables. This is direct commit to 8-STABLE, as HEAD and 9-STABLE have no problem. Modified: stable/8/sys/cam/scsi/scsi_da.c Modified: stable/8/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/8/sys/cam/scsi/scsi_da.c Wed Mar 14 14:01:51 2012 (r232967) +++ stable/8/sys/cam/scsi/scsi_da.c Wed Mar 14 14:14:16 2012 (r232968) @@ -1960,7 +1960,8 @@ dadone(struct cam_periph *periph, union scsi_extract_sense(sense, &error_code, &sense_key, &asc, &ascq); - } + } else + error_code = sense_key = asc = ascq = 0; /* * If we tried READ CAPACITY(16) and failed, * fallback to READ CAPACITY(10). From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 14:33:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8ABD3106566C; Wed, 14 Mar 2012 14:33:37 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75A6B8FC08; Wed, 14 Mar 2012 14:33:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EEXbRo017656; Wed, 14 Mar 2012 14:33:37 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EEXbZp017651; Wed, 14 Mar 2012 14:33:37 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203141433.q2EEXbZp017651@svn.freebsd.org> From: David Chisnall Date: Wed, 14 Mar 2012 14:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232969 - in vendor/libc++/dist: include src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 14:33:37 -0000 Author: theraven Date: Wed Mar 14 14:33:36 2012 New Revision: 232969 URL: http://svn.freebsd.org/changeset/base/232969 Log: New version of libc++ with some bug fixes. Approved by: dim (mentor) Modified: vendor/libc++/dist/include/__config vendor/libc++/dist/include/cstdlib vendor/libc++/dist/src/exception.cpp vendor/libc++/dist/src/new.cpp Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Wed Mar 14 14:14:16 2012 (r232968) +++ vendor/libc++/dist/include/__config Wed Mar 14 14:33:36 2012 (r232969) @@ -245,6 +245,10 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_CONSTEXPR #endif +#if __FreeBSD__ +#define _LIBCPP_HAS_QUICK_EXIT +#endif + #if (__has_feature(cxx_noexcept)) # define _NOEXCEPT noexcept # define _NOEXCEPT_(x) noexcept(x) Modified: vendor/libc++/dist/include/cstdlib ============================================================================== --- vendor/libc++/dist/include/cstdlib Wed Mar 14 14:14:16 2012 (r232968) +++ vendor/libc++/dist/include/cstdlib Wed Mar 14 14:33:36 2012 (r232969) @@ -131,6 +131,10 @@ using ::mbtowc; using ::wctomb; using ::mbstowcs; using ::wcstombs; +#ifdef _LIBCPP_HAS_QUICK_EXIT +using ::at_quick_exit; +using ::quick_exit; +#endif // MSVC already has the correct prototype in #ifdef __cplusplus #if !defined(_MSC_VER) && !defined(__sun__) Modified: vendor/libc++/dist/src/exception.cpp ============================================================================== --- vendor/libc++/dist/src/exception.cpp Wed Mar 14 14:14:16 2012 (r232968) +++ vendor/libc++/dist/src/exception.cpp Wed Mar 14 14:33:36 2012 (r232969) @@ -114,13 +114,17 @@ exception::~exception() _NOEXCEPT { } -bad_exception::~bad_exception() _NOEXCEPT +const char* exception::what() const _NOEXCEPT { + return "std::exception"; } -const char* exception::what() const _NOEXCEPT +#endif // _LIBCPPABI_VERSION +#endif //LIBCXXRT +#ifndef _LIBCPPABI_VERSION + +bad_exception::~bad_exception() _NOEXCEPT { - return "std::exception"; } const char* bad_exception::what() const _NOEXCEPT @@ -128,8 +132,8 @@ const char* bad_exception::what() const return "std::bad_exception"; } -#endif // _LIBCPPABI_VERSION -#endif //LIBCXXRT +#endif + exception_ptr::~exception_ptr() _NOEXCEPT { Modified: vendor/libc++/dist/src/new.cpp ============================================================================== --- vendor/libc++/dist/src/new.cpp Wed Mar 14 14:14:16 2012 (r232968) +++ vendor/libc++/dist/src/new.cpp Wed Mar 14 14:33:36 2012 (r232969) @@ -24,8 +24,6 @@ static std::new_handler __new_handler; #endif -#if !defined (LIBCXXRT) // && !defined(_LIBCPPABI_VERSION) - // Implement all new and delete operators as weak definitions // in this shared library, so that they can be overriden by programs // that define non-weak copies of the functions. @@ -134,8 +132,6 @@ operator delete[] (void* ptr, const std: ::operator delete[](ptr); } -#endif // !_LIBCPPABI_VERSION && !LIBCXXRT - namespace std { @@ -171,6 +167,8 @@ bad_alloc::what() const _NOEXCEPT return "std::bad_alloc"; } +#endif //LIBCXXRT + bad_array_new_length::bad_array_new_length() _NOEXCEPT { } @@ -186,7 +184,6 @@ bad_array_new_length::what() const _NOEX } #endif -#endif //LIBCXXRT void __throw_bad_alloc() From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 14:34:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C69BC106564A; Wed, 14 Mar 2012 14:34:14 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98EF98FC18; Wed, 14 Mar 2012 14:34:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EEYEs3017713; Wed, 14 Mar 2012 14:34:14 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EEYEIJ017712; Wed, 14 Mar 2012 14:34:14 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203141434.q2EEYEIJ017712@svn.freebsd.org> From: David Chisnall Date: Wed, 14 Mar 2012 14:34:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232970 - vendor/libc++/r152718 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 14:34:14 -0000 Author: theraven Date: Wed Mar 14 14:34:14 2012 New Revision: 232970 URL: http://svn.freebsd.org/changeset/base/232970 Log: Tag new version of libc++. Approved by: dim (mentor) Added: vendor/libc++/r152718/ - copied from r232969, vendor/libc++/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 14:39:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49F001065670; Wed, 14 Mar 2012 14:39:08 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35C3D8FC18; Wed, 14 Mar 2012 14:39:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EEd8KK017913; Wed, 14 Mar 2012 14:39:08 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EEd7Ok017911; Wed, 14 Mar 2012 14:39:07 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203141439.q2EEd7Ok017911@svn.freebsd.org> From: David Chisnall Date: Wed, 14 Mar 2012 14:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232971 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 14:39:08 -0000 Author: theraven Date: Wed Mar 14 14:39:07 2012 New Revision: 232971 URL: http://svn.freebsd.org/changeset/base/232971 Log: Expose some C11 stuff that is also C++11 stuff in C++11 mode. Approved by: dim (mentor) Modified: head/include/stdlib.h Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Wed Mar 14 14:34:14 2012 (r232970) +++ head/include/stdlib.h Wed Mar 14 14:39:07 2012 (r232971) @@ -151,7 +151,7 @@ _Noreturn void _Exit(int); /* * If we're in a mode greater than C99, expose C11 functions. */ -#if __ISO_C_VISIBLE >= 2011 +#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L void * aligned_alloc(size_t, size_t); int at_quick_exit(void (*)(void)); _Noreturn void From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 14:40:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6FA9E1065674; Wed, 14 Mar 2012 14:40:23 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A91A8FC0A; Wed, 14 Mar 2012 14:40:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EEeN98017997; Wed, 14 Mar 2012 14:40:23 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EEeNYv017993; Wed, 14 Mar 2012 14:40:23 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203141440.q2EEeNYv017993@svn.freebsd.org> From: David Chisnall Date: Wed, 14 Mar 2012 14:40: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: r232972 - in head/contrib/libc++: include src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 14:40:23 -0000 Author: theraven Date: Wed Mar 14 14:40:22 2012 New Revision: 232972 URL: http://svn.freebsd.org/changeset/base/232972 Log: Import a slightly newer libc++, with some bugs fixed that were found by running the test suite on FreeBSD. Approved by: dim (mentor) Modified: head/contrib/libc++/include/__config head/contrib/libc++/include/cstdlib head/contrib/libc++/src/exception.cpp head/contrib/libc++/src/new.cpp Directory Properties: head/contrib/libc++/ (props changed) Modified: head/contrib/libc++/include/__config ============================================================================== --- head/contrib/libc++/include/__config Wed Mar 14 14:39:07 2012 (r232971) +++ head/contrib/libc++/include/__config Wed Mar 14 14:40:22 2012 (r232972) @@ -245,6 +245,10 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_CONSTEXPR #endif +#if __FreeBSD__ +#define _LIBCPP_HAS_QUICK_EXIT +#endif + #if (__has_feature(cxx_noexcept)) # define _NOEXCEPT noexcept # define _NOEXCEPT_(x) noexcept(x) Modified: head/contrib/libc++/include/cstdlib ============================================================================== --- head/contrib/libc++/include/cstdlib Wed Mar 14 14:39:07 2012 (r232971) +++ head/contrib/libc++/include/cstdlib Wed Mar 14 14:40:22 2012 (r232972) @@ -131,6 +131,10 @@ using ::mbtowc; using ::wctomb; using ::mbstowcs; using ::wcstombs; +#ifdef _LIBCPP_HAS_QUICK_EXIT +using ::at_quick_exit; +using ::quick_exit; +#endif // MSVC already has the correct prototype in #ifdef __cplusplus #if !defined(_MSC_VER) && !defined(__sun__) Modified: head/contrib/libc++/src/exception.cpp ============================================================================== --- head/contrib/libc++/src/exception.cpp Wed Mar 14 14:39:07 2012 (r232971) +++ head/contrib/libc++/src/exception.cpp Wed Mar 14 14:40:22 2012 (r232972) @@ -114,13 +114,17 @@ exception::~exception() _NOEXCEPT { } -bad_exception::~bad_exception() _NOEXCEPT +const char* exception::what() const _NOEXCEPT { + return "std::exception"; } -const char* exception::what() const _NOEXCEPT +#endif // _LIBCPPABI_VERSION +#endif //LIBCXXRT +#ifndef _LIBCPPABI_VERSION + +bad_exception::~bad_exception() _NOEXCEPT { - return "std::exception"; } const char* bad_exception::what() const _NOEXCEPT @@ -128,8 +132,8 @@ const char* bad_exception::what() const return "std::bad_exception"; } -#endif // _LIBCPPABI_VERSION -#endif //LIBCXXRT +#endif + exception_ptr::~exception_ptr() _NOEXCEPT { Modified: head/contrib/libc++/src/new.cpp ============================================================================== --- head/contrib/libc++/src/new.cpp Wed Mar 14 14:39:07 2012 (r232971) +++ head/contrib/libc++/src/new.cpp Wed Mar 14 14:40:22 2012 (r232972) @@ -24,8 +24,6 @@ static std::new_handler __new_handler; #endif -#if !defined (LIBCXXRT) // && !defined(_LIBCPPABI_VERSION) - // Implement all new and delete operators as weak definitions // in this shared library, so that they can be overriden by programs // that define non-weak copies of the functions. @@ -134,8 +132,6 @@ operator delete[] (void* ptr, const std: ::operator delete[](ptr); } -#endif // !_LIBCPPABI_VERSION && !LIBCXXRT - namespace std { @@ -171,6 +167,8 @@ bad_alloc::what() const _NOEXCEPT return "std::bad_alloc"; } +#endif //LIBCXXRT + bad_array_new_length::bad_array_new_length() _NOEXCEPT { } @@ -186,7 +184,6 @@ bad_array_new_length::what() const _NOEX } #endif -#endif //LIBCXXRT void __throw_bad_alloc() From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 15:30:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99DBC1065695; Wed, 14 Mar 2012 15:30: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 88EA58FC1C; Wed, 14 Mar 2012 15:30:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EFUxiB019621; Wed, 14 Mar 2012 15:30:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EFUxPd019619; Wed, 14 Mar 2012 15:30:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203141530.q2EFUxPd019619@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 14 Mar 2012 15:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232973 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 15:30:59 -0000 Author: kib Date: Wed Mar 14 15:30:59 2012 New Revision: 232973 URL: http://svn.freebsd.org/changeset/base/232973 Log: Fix indentation. MFC after: 3 days Modified: head/lib/libc/string/strerror.c Modified: head/lib/libc/string/strerror.c ============================================================================== --- head/lib/libc/string/strerror.c Wed Mar 14 14:40:22 2012 (r232972) +++ head/lib/libc/string/strerror.c Wed Mar 14 15:30:59 2012 (r232973) @@ -121,6 +121,6 @@ strerror(int num) static char ebuf[NL_TEXTMAX]; if (strerror_r(num, ebuf, sizeof(ebuf)) != 0) - errno = EINVAL; + errno = EINVAL; return (ebuf); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 15:39:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF2331065672; Wed, 14 Mar 2012 15:39: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 D47718FC0A; Wed, 14 Mar 2012 15:39:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EFdxma019944; Wed, 14 Mar 2012 15:39:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EFdxYw019939; Wed, 14 Mar 2012 15:39:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203141539.q2EFdxYw019939@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 14 Mar 2012 15:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232974 - 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: Wed, 14 Mar 2012 15:40:00 -0000 Author: kib Date: Wed Mar 14 15:39:59 2012 New Revision: 232974 URL: http://svn.freebsd.org/changeset/base/232974 Log: Rtld on diet 3. Stop using strerror(3) in rtld, which brings in msgcat and stdio. Directly access sys_errlist array of errno messages with private rtld_strerror() function. Now, $ size /libexec/ld-elf.so.1 text data bss dec hex filename 96983 2480 8744 108207 1a6af /libexec/ld-elf.so.1 Reviewed by: dim, kan MFC after: 2 weeks Modified: head/libexec/rtld-elf/libmap.c head/libexec/rtld-elf/map_object.c head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h Modified: head/libexec/rtld-elf/libmap.c ============================================================================== --- head/libexec/rtld-elf/libmap.c Wed Mar 14 15:30:59 2012 (r232973) +++ head/libexec/rtld-elf/libmap.c Wed Mar 14 15:39:59 2012 (r232974) @@ -71,20 +71,20 @@ lm_init(char *libmap_override) fd = open(_PATH_LIBMAP_CONF, O_RDONLY); if (fd == -1) { dbg("lm_init: open(\"%s\") failed, %s", _PATH_LIBMAP_CONF, - strerror(errno)); + rtld_strerror(errno)); goto override; } if (fstat(fd, &st) == -1) { close(fd); dbg("lm_init: fstat(\"%s\") failed, %s", _PATH_LIBMAP_CONF, - strerror(errno)); + rtld_strerror(errno)); goto override; } lm_map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); if (lm_map == (const char *)MAP_FAILED) { close(fd); dbg("lm_init: mmap(\"%s\") failed, %s", _PATH_LIBMAP_CONF, - strerror(errno)); + rtld_strerror(errno)); goto override; } close(fd); Modified: head/libexec/rtld-elf/map_object.c ============================================================================== --- head/libexec/rtld-elf/map_object.c Wed Mar 14 15:30:59 2012 (r232973) +++ head/libexec/rtld-elf/map_object.c Wed Mar 14 15:39:59 2012 (r232974) @@ -184,7 +184,7 @@ map_object(int fd, const char *path, con MAP_NOCORE, -1, 0); if (mapbase == (caddr_t) -1) { _rtld_error("%s: mmap of entire address space failed: %s", - path, strerror(errno)); + path, rtld_strerror(errno)); return NULL; } if (base_addr != NULL && mapbase != base_addr) { @@ -204,7 +204,8 @@ map_object(int fd, const char *path, con data_flags = convert_flags(segs[i]->p_flags) | MAP_FIXED; if (mmap(data_addr, data_vlimit - data_vaddr, data_prot, data_flags, fd, data_offset) == (caddr_t) -1) { - _rtld_error("%s: mmap of data failed: %s", path, strerror(errno)); + _rtld_error("%s: mmap of data failed: %s", path, + rtld_strerror(errno)); return NULL; } @@ -221,7 +222,7 @@ map_object(int fd, const char *path, con if ((data_prot & PROT_WRITE) == 0 && -1 == mprotect(clear_page, PAGE_SIZE, data_prot|PROT_WRITE)) { _rtld_error("%s: mprotect failed: %s", path, - strerror(errno)); + rtld_strerror(errno)); return NULL; } @@ -240,7 +241,7 @@ map_object(int fd, const char *path, con if (mmap(bss_addr, bss_vlimit - bss_vaddr, data_prot, data_flags | MAP_ANON, -1, 0) == (caddr_t)-1) { _rtld_error("%s: mmap of bss failed: %s", path, - strerror(errno)); + rtld_strerror(errno)); return NULL; } } @@ -307,7 +308,7 @@ get_elf_header (int fd, const char *path ssize_t nbytes; if ((nbytes = pread(fd, u.buf, PAGE_SIZE, 0)) == -1) { - _rtld_error("%s: read error: %s", path, strerror(errno)); + _rtld_error("%s: read error: %s", path, rtld_strerror(errno)); return NULL; } Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Mar 14 15:30:59 2012 (r232973) +++ head/libexec/rtld-elf/rtld.c Wed Mar 14 15:39:59 2012 (r232974) @@ -2163,7 +2163,7 @@ relocate_objects(Obj_Entry *first, bool if (mprotect(obj->mapbase, obj->textsize, PROT_READ|PROT_WRITE|PROT_EXEC) == -1) { _rtld_error("%s: Cannot write-enable text segment: %s", - obj->path, strerror(errno)); + obj->path, rtld_strerror(errno)); return -1; } } @@ -2176,7 +2176,7 @@ relocate_objects(Obj_Entry *first, bool if (mprotect(obj->mapbase, obj->textsize, PROT_READ|PROT_EXEC) == -1) { _rtld_error("%s: Cannot write-protect text segment: %s", - obj->path, strerror(errno)); + obj->path, rtld_strerror(errno)); return -1; } } @@ -2196,7 +2196,7 @@ relocate_objects(Obj_Entry *first, bool if (obj->relro_size > 0) { if (mprotect(obj->relro_page, obj->relro_size, PROT_READ) == -1) { _rtld_error("%s: Cannot enforce relro protection: %s", - obj->path, strerror(errno)); + obj->path, rtld_strerror(errno)); return -1; } } @@ -4353,3 +4353,12 @@ __chk_fail(void) _rtld_error("buffer overflow detected; terminated"); die(); } + +const char * +rtld_strerror(int errnum) +{ + + if (errnum < 0 || errnum >= sys_nerr) + return ("Unknown error"); + return (sys_errlist[errnum]); +} Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Wed Mar 14 15:30:59 2012 (r232973) +++ head/libexec/rtld-elf/rtld.h Wed Mar 14 15:39:59 2012 (r232974) @@ -313,6 +313,7 @@ typedef struct Struct_SymLook { } SymLook; extern void _rtld_error(const char *, ...) __printflike(1, 2); +extern const char *rtld_strerror(int); extern Obj_Entry *map_object(int, const char *, const struct stat *); extern void *xcalloc(size_t); extern void *xmalloc(size_t); From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 15:52:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 771AD1065677; Wed, 14 Mar 2012 15:52:24 +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 672668FC12; Wed, 14 Mar 2012 15:52:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EFqOEr020382; Wed, 14 Mar 2012 15:52:24 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EFqO4U020380; Wed, 14 Mar 2012 15:52:24 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201203141552.q2EFqO4U020380@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 14 Mar 2012 15:52: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: r232975 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 15:52:24 -0000 Author: jh Date: Wed Mar 14 15:52:23 2012 New Revision: 232975 URL: http://svn.freebsd.org/changeset/base/232975 Log: Add an assert for proctree_lock to proc_to_reap(). Discussed with: kib MFC after: 1 week Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Wed Mar 14 15:39:59 2012 (r232974) +++ head/sys/kern/kern_exit.c Wed Mar 14 15:52:23 2012 (r232975) @@ -814,6 +814,8 @@ proc_to_reap(struct thread *td, struct p { struct proc *q; + sx_assert(&proctree_lock, SA_XLOCKED); + q = td->td_proc; PROC_LOCK(p); if (pid != WAIT_ANY && p->p_pid != pid && p->p_pgid != -pid) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 16:10:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22D0D1065675; Wed, 14 Mar 2012 16:10:40 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12DA78FC08; Wed, 14 Mar 2012 16:10:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EGAda3020986; Wed, 14 Mar 2012 16:10:39 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EGAdHS020983; Wed, 14 Mar 2012 16:10:39 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201203141610.q2EGAdHS020983@svn.freebsd.org> From: Ed Schouten Date: Wed, 14 Mar 2012 16:10: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: r232976 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 16:10:40 -0000 Author: ed Date: Wed Mar 14 16:10:39 2012 New Revision: 232976 URL: http://svn.freebsd.org/changeset/base/232976 Log: Hide stty(1) errors. If rc(8) is executed without using a TTY, this error appears at the beginning: stty: stdin isn't a terminal Because this is to be expected and of course not harmful, it is better to simply hide the error message. MFC after: 1 week Modified: head/etc/rc head/etc/rc.shutdown Modified: head/etc/rc ============================================================================== --- head/etc/rc Wed Mar 14 15:52:23 2012 (r232975) +++ head/etc/rc Wed Mar 14 16:10:39 2012 (r232976) @@ -38,7 +38,7 @@ # first before contemplating any changes here. If you do need to change # this file for some reason, we would like to know about it. -stty status '^T' +stty status '^T' 2> /dev/null # Set shell to ignore SIGINT (2), but not children; # shell catches SIGQUIT (3) and returns to single user. Modified: head/etc/rc.shutdown ============================================================================== --- head/etc/rc.shutdown Wed Mar 14 15:52:23 2012 (r232975) +++ head/etc/rc.shutdown Wed Mar 14 16:10:39 2012 (r232976) @@ -32,7 +32,7 @@ # Output and errors are directed to console by init, and the # console is the controlling terminal. -stty status '^T' +stty status '^T' 2> /dev/null # Set shell to ignore SIGINT (2), but not children; # shell catches SIGQUIT (3) and returns to single user after fsck. From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 16:22:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC56A1065672; Wed, 14 Mar 2012 16:22:09 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D12508FC1A; Wed, 14 Mar 2012 16:22:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EGM9Ga021412; Wed, 14 Mar 2012 16:22:09 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EGM9HR021407; Wed, 14 Mar 2012 16:22:09 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201203141622.q2EGM9HR021407@svn.freebsd.org> From: Ed Schouten Date: Wed, 14 Mar 2012 16:22: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: r232977 - in head: etc sbin/init X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 16:22:10 -0000 Author: ed Date: Wed Mar 14 16:22:09 2012 New Revision: 232977 URL: http://svn.freebsd.org/changeset/base/232977 Log: Make init(8) slightly more robust when /dev/console is missing. If the environment doesn't offer a working /dev/console, the existing version of init(8) will simply refuse running rc(8) scripts. This means you'll only have a system running init(8) and nothing else. Change the code to do the following: - Open /dev/console like we used to do, but make it more robust to use O_NONBLOCK to prevent blocking on a carrier. - If this fails, use /dev/null as stdin and /var/log/init.log as stdout and stderr. - If even this fails, use /dev/null as stdin, stdout and stderr. So why us this useful? Well, if you remove the `getpid() == 1' check in main(), you can now use init(8) inside jails to properly execute rc(8). It still requires some polishing, as existing tools assume init(8) has PID 1. Also it is now possible to use use init(8) on `headless' devices that don't even have a serial boot console. Modified: head/etc/newsyslog.conf head/sbin/init/init.8 head/sbin/init/init.c head/sbin/init/pathnames.h Modified: head/etc/newsyslog.conf ============================================================================== --- head/etc/newsyslog.conf Wed Mar 14 16:10:39 2012 (r232976) +++ head/etc/newsyslog.conf Wed Mar 14 16:22:09 2012 (r232977) @@ -24,6 +24,7 @@ /var/log/cron 600 3 100 * JC /var/log/daily.log 640 7 * @T00 JN /var/log/debug.log 600 7 100 * JC +/var/log/init.log 644 3 100 * J /var/log/kerberos.log 600 7 100 * J /var/log/lpd-errs 644 7 100 * JC /var/log/maillog 640 7 * @T00 JC Modified: head/sbin/init/init.8 ============================================================================== --- head/sbin/init/init.8 Wed Mar 14 16:10:39 2012 (r232976) +++ head/sbin/init/init.8 Wed Mar 14 16:22:09 2012 (r232977) @@ -31,7 +31,7 @@ .\" @(#)init.8 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd February 11, 2012 +.Dd March 14, 2012 .Dt INIT 8 .Os .Sh NAME @@ -293,22 +293,22 @@ as follows: file .El .Sh FILES -.Bl -tag -width /etc/rc.shutdown -compact +.Bl -tag -width /var/log/init.log -compact .It Pa /dev/console system console device .It Pa /dev/tty* terminal ports found in .Xr ttys 5 -.It Pa /var/run/utx.active -record of current users on the system -.It Pa /var/log/utx.log -record of all logins and logouts .It Pa /etc/ttys the terminal initialization information file .It Pa /etc/rc system startup commands .It Pa /etc/rc.shutdown system shutdown commands +.It Pa /var/log/init.log +log of +.Xr rc 8 +output if the system console device is not available .El .Sh DIAGNOSTICS .Bl -diag Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Wed Mar 14 16:10:39 2012 (r232976) +++ head/sbin/init/init.c Wed Mar 14 16:22:09 2012 (r232977) @@ -138,7 +138,7 @@ static void transition(state_t); static state_t requested_transition; static state_t current_state = death_single; -static void setctty(const char *); +static void open_console(void); static const char *get_shell(void); static void write_stderr(const char *message); @@ -568,19 +568,35 @@ transition(state_t s) * Only called by children of init after forking. */ static void -setctty(const char *name) +open_console(void) { int fd; - revoke(name); - if ((fd = open(name, O_RDWR)) == -1) { - stall("can't open %s: %m", name); - _exit(1); + /* Try to open /dev/console. */ + revoke(_PATH_CONSOLE); + if ((fd = open(_PATH_CONSOLE, O_RDWR | O_NONBLOCK)) != -1) { + if (login_tty(fd) == 0) + return; + close(fd); } - if (login_tty(fd) == -1) { - stall("can't get %s for controlling terminal: %m", name); + + /* No luck. Log output to file if possible. */ + if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) { + stall("cannot open null device."); _exit(1); } + if (fd != STDIN_FILENO) { + dup2(fd, STDIN_FILENO); + close(fd); + } + fd = open(_PATH_INITLOG, O_WRONLY | O_APPEND | O_CREAT, 0644); + if (fd == -1) + dup2(STDIN_FILENO, STDOUT_FILENO); + else if (fd != STDOUT_FILENO) { + dup2(fd, STDOUT_FILENO); + close(fd); + } + dup2(STDOUT_FILENO, STDERR_FILENO); } static const char * @@ -638,7 +654,7 @@ single_user(void) /* * Start the single user session. */ - setctty(_PATH_CONSOLE); + open_console(); #ifdef SECURE /* @@ -798,7 +814,7 @@ run_script(const char *script) sigaction(SIGTSTP, &sa, (struct sigaction *)0); sigaction(SIGHUP, &sa, (struct sigaction *)0); - setctty(_PATH_CONSOLE); + open_console(); char _sh[] = "sh"; char _autoboot[] = "autoboot"; @@ -1572,7 +1588,7 @@ runshutdown(void) sigaction(SIGTSTP, &sa, (struct sigaction *)0); sigaction(SIGHUP, &sa, (struct sigaction *)0); - setctty(_PATH_CONSOLE); + open_console(); char _sh[] = "sh"; char _reboot[] = "reboot"; Modified: head/sbin/init/pathnames.h ============================================================================== --- head/sbin/init/pathnames.h Wed Mar 14 16:10:39 2012 (r232976) +++ head/sbin/init/pathnames.h Wed Mar 14 16:22:09 2012 (r232977) @@ -35,6 +35,7 @@ #include +#define _PATH_INITLOG "/var/log/init.log" #define _PATH_SLOGGER "/sbin/session_logger" #define _PATH_RUNCOM "/etc/rc" #define _PATH_RUNDOWN "/etc/rc.shutdown" From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 16:43:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68427106566C; Wed, 14 Mar 2012 16:43:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57DCA8FC0A; Wed, 14 Mar 2012 16:43:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EGhNkv022206; Wed, 14 Mar 2012 16:43:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EGhNd1022204; Wed, 14 Mar 2012 16:43:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203141643.q2EGhNd1022204@svn.freebsd.org> From: Adrian Chadd Date: Wed, 14 Mar 2012 16:43: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: r232978 - head/sys/dev/wtap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 16:43:23 -0000 Author: adrian Date: Wed Mar 14 16:43:22 2012 New Revision: 232978 URL: http://svn.freebsd.org/changeset/base/232978 Log: Correctly calculate the callout interval for beacon generation. Submitted by: monthadar@gmail.com Modified: head/sys/dev/wtap/if_wtap.c Modified: head/sys/dev/wtap/if_wtap.c ============================================================================== --- head/sys/dev/wtap/if_wtap.c Wed Mar 14 16:22:09 2012 (r232977) +++ head/sys/dev/wtap/if_wtap.c Wed Mar 14 16:43:22 2012 (r232978) @@ -305,6 +305,9 @@ wtap_bmiss(struct ieee80211vap *vap) avp->av_bmiss(vap); } +/* XXX */ +#define msecs_to_ticks(ms) (((ms) * hz) / 1000) + static struct ieee80211vap * wtap_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, enum ieee80211_opmode opmode, int flags, @@ -322,7 +325,7 @@ wtap_vap_create(struct ieee80211com *ic, M_80211_VAP, M_NOWAIT | M_ZERO); avp->id = sc->id; avp->av_md = sc->sc_md; - avp->av_bcinterval = BEACON_INTRERVAL + 100*sc->id; + avp->av_bcinterval = msecs_to_ticks(BEACON_INTRERVAL + 100*sc->id); vap = (struct ieee80211vap *) avp; error = ieee80211_vap_setup(ic, vap, name, unit, IEEE80211_M_MBSS, flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); @@ -346,6 +349,7 @@ wtap_vap_create(struct ieee80211com *ic, vap->iv_bss->ni_txrate = 130; return vap; } +#undef msecs_to_ticks static void wtap_vap_delete(struct ieee80211vap *vap) From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 18:45:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 56B521065674; Wed, 14 Mar 2012 18:45:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2C8FF8FC18; Wed, 14 Mar 2012 18:45:21 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id D5CC746B0C; Wed, 14 Mar 2012 14:45:20 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0F375B995; Wed, 14 Mar 2012 14:45:20 -0400 (EDT) From: John Baldwin To: TAKAHASHI Yoshihiro Date: Wed, 14 Mar 2012 14:13:49 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203091942.q29Jgmj1022231@svn.freebsd.org> <20120312.210411.242248466057936089.nyan@FreeBSD.org> In-Reply-To: <20120312.210411.242248466057936089.nyan@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201203141413.50018.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 14 Mar 2012 14:45:20 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232744 - in head/sys: conf i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 18:45:21 -0000 On Monday, March 12, 2012 8:04:11 am TAKAHASHI Yoshihiro wrote: > In article <201203091942.q29Jgmj1022231@svn.freebsd.org> > John Baldwin writes: > > > Author: jhb > > Date: Fri Mar 9 19:42:48 2012 > > New Revision: 232744 > > URL: http://svn.freebsd.org/changeset/base/232744 > > > > Log: > > Allow a native i386 kernel to be built with 'nodevice atpic'. Just as on > > amd64, if 'device isa' is present quiesce the 8259A's during boot and > > resume from suspend. > > This change broke a kernel without the SMP and atpic. The attached > patch fixes the problem and includes changes for pc98. > > Please review it. Oof, this is certainly correct! Please sort opt_apic.h before opt_atalk.h in the includes. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 18:47:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83301106566B; Wed, 14 Mar 2012 18:47:42 +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 723998FC17; Wed, 14 Mar 2012 18:47:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EIlgLN026468; Wed, 14 Mar 2012 18:47:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EIlg6j026466; Wed, 14 Mar 2012 18:47:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203141847.q2EIlg6j026466@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 14 Mar 2012 18:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232979 - stable/8/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 18:47:42 -0000 Author: kib Date: Wed Mar 14 18:47:41 2012 New Revision: 232979 URL: http://svn.freebsd.org/changeset/base/232979 Log: MFC r232833: Remove not needed ARGSUSED lint command. Modified: stable/8/sys/ufs/ffs/ffs_vnops.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- stable/8/sys/ufs/ffs/ffs_vnops.c Wed Mar 14 16:43:22 2012 (r232978) +++ stable/8/sys/ufs/ffs/ffs_vnops.c Wed Mar 14 18:47:41 2012 (r232979) @@ -420,7 +420,6 @@ ffs_lock(ap) /* * Vnode op for reading. */ -/* ARGSUSED */ static int ffs_read(ap) struct vop_read_args /* { From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 20:19:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 833E3106564A; Wed, 14 Mar 2012 20:19:50 +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 590158FC0A; Wed, 14 Mar 2012 20:19:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EKJort029714; Wed, 14 Mar 2012 20:19:50 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EKJoCX029711; Wed, 14 Mar 2012 20:19:50 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201203142019.q2EKJoCX029711@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 14 Mar 2012 20:19: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: r232980 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 20:19:50 -0000 Author: nwhitehorn Date: Wed Mar 14 20:19:49 2012 New Revision: 232980 URL: http://svn.freebsd.org/changeset/base/232980 Log: Use LIST_FOREACH_SAFE() instead of LIST_FOREACH() in pmap_remove(), since the point of this loop is to remove elements. This worked by accident before. MFC after: 2 days Modified: head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Wed Mar 14 18:47:41 2012 (r232979) +++ head/sys/powerpc/aim/mmu_oea.c Wed Mar 14 20:19:49 2012 (r232980) @@ -1794,7 +1794,7 @@ moea_release(mmu_t mmu, pmap_t pmap) void moea_remove(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva) { - struct pvo_entry *pvo; + struct pvo_entry *pvo, *tpvo; int pteidx; vm_page_lock_queues(); @@ -1806,7 +1806,7 @@ moea_remove(mmu_t mmu, pmap_t pm, vm_off moea_pvo_remove(pvo, pteidx); } } else { - LIST_FOREACH(pvo, &pm->pmap_pvo, pvo_plink) { + LIST_FOREACH_SAFE(pvo, &pm->pmap_pvo, pvo_plink, tpvo) { if (PVO_VADDR(pvo) < sva || PVO_VADDR(pvo) >= eva) continue; moea_pvo_remove(pvo, -1); Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Wed Mar 14 18:47:41 2012 (r232979) +++ head/sys/powerpc/aim/mmu_oea64.c Wed Mar 14 20:19:49 2012 (r232980) @@ -2039,7 +2039,7 @@ moea64_release(mmu_t mmu, pmap_t pmap) void moea64_remove(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva) { - struct pvo_entry *pvo; + struct pvo_entry *pvo, *tpvo; vm_page_lock_queues(); PMAP_LOCK(pm); @@ -2050,7 +2050,7 @@ moea64_remove(mmu_t mmu, pmap_t pm, vm_o moea64_pvo_remove(mmu, pvo); } } else { - LIST_FOREACH(pvo, &pm->pmap_pvo, pvo_plink) { + LIST_FOREACH_SAFE(pvo, &pm->pmap_pvo, pvo_plink, tpvo) { if (PVO_VADDR(pvo) < sva || PVO_VADDR(pvo) >= eva) continue; moea64_pvo_remove(mmu, pvo); From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 20:57:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69ABE1065670; Wed, 14 Mar 2012 20:57:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 402468FC08; Wed, 14 Mar 2012 20:57:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EKvnZh031246; Wed, 14 Mar 2012 20:57:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EKvnVY031244; Wed, 14 Mar 2012 20:57:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203142057.q2EKvnVY031244@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Mar 2012 20:57: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: r232984 - 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, 14 Mar 2012 20:57:49 -0000 Author: jhb Date: Wed Mar 14 20:57:48 2012 New Revision: 232984 URL: http://svn.freebsd.org/changeset/base/232984 Log: Pedantic nit: use vm_pindex_t instead of long for a count of pages. Modified: head/sys/vm/vm_phys.c Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Wed Mar 14 20:44:20 2012 (r232983) +++ head/sys/vm/vm_phys.c Wed Mar 14 20:57:48 2012 (r232984) @@ -223,7 +223,7 @@ _vm_phys_create_seg(vm_paddr_t start, vm { struct vm_phys_seg *seg; #ifdef VM_PHYSSEG_SPARSE - long pages; + vm_pindex_t pages; int segind; pages = 0; From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 21:26:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42DD2106566C; Wed, 14 Mar 2012 21:26:07 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 327188FC14; Wed, 14 Mar 2012 21:26:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ELQ74Z032292; Wed, 14 Mar 2012 21:26:07 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ELQ6wo032290; Wed, 14 Mar 2012 21:26:07 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201203142126.q2ELQ6wo032290@svn.freebsd.org> From: Sean Bruno Date: Wed, 14 Mar 2012 21:26: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: r232986 - head/usr.sbin/syslogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 21:26:07 -0000 Author: sbruno Date: Wed Mar 14 21:26:06 2012 New Revision: 232986 URL: http://svn.freebsd.org/changeset/base/232986 Log: Update man page to present -T argument in synopsis MFC with r183347 MFC after: 0 days Modified: head/usr.sbin/syslogd/syslogd.8 Modified: head/usr.sbin/syslogd/syslogd.8 ============================================================================== --- head/usr.sbin/syslogd/syslogd.8 Wed Mar 14 20:59:45 2012 (r232985) +++ head/usr.sbin/syslogd/syslogd.8 Wed Mar 14 21:26:06 2012 (r232986) @@ -36,7 +36,7 @@ .Nd log systems messages .Sh SYNOPSIS .Nm -.Op Fl 468ACcdkNnosuv +.Op Fl 468ACcdkNnosTuv .Op Fl a Ar allowed_peer .Op Fl b Ar bind_address .Op Fl f Ar config_file From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 21:28:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1DD93106566C; Wed, 14 Mar 2012 21:28:42 +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 E8D5D8FC15; Wed, 14 Mar 2012 21:28:41 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 9EA8046B2A; Wed, 14 Mar 2012 17:28:41 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 346ACB93E; Wed, 14 Mar 2012 17:28:41 -0400 (EDT) From: John Baldwin To: Adrian Chadd Date: Wed, 14 Mar 2012 17:24:15 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203132029.q2DKT4L6061308@svn.freebsd.org> In-Reply-To: <201203132029.q2DKT4L6061308@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201203141724.15398.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 14 Mar 2012 17:28:41 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232938 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 21:28:42 -0000 On Tuesday, March 13, 2012 4:29:04 pm Adrian Chadd wrote: > Author: adrian > Date: Tue Mar 13 20:29:04 2012 > New Revision: 232938 > URL: http://svn.freebsd.org/changeset/base/232938 > > Log: > Add dependencies onto acl_posix1e and acl_nfs4. > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Mar 13 20:28:42 2012 (r232937) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Mar 13 20:29:04 2012 (r232938) > @@ -5423,3 +5423,5 @@ static moduledata_t zfs_mod = { > DECLARE_MODULE(zfsctrl, zfs_mod, SI_SUB_VFS, SI_ORDER_ANY); > MODULE_DEPEND(zfsctrl, opensolaris, 1, 1, 1); > MODULE_DEPEND(zfsctrl, krpc, 1, 1, 1); > +MODULE_DEPEND(zfsctrl, acl_nfs4, 1, 1, 1); > +MODULE_DEPEND(zfsctrl, acl_posix1e, 1, 1, 1); Eh, I thought ZFS only needs nfs4 and not posix1e? I think only UFS needs both of these. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 21:45:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC973106566B; Wed, 14 Mar 2012 21:45:45 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA5D38FC0A; Wed, 14 Mar 2012 21:45:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ELjjlR032965; Wed, 14 Mar 2012 21:45:45 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ELjjEs032962; Wed, 14 Mar 2012 21:45:45 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201203142145.q2ELjjEs032962@svn.freebsd.org> From: Sean Bruno Date: Wed, 14 Mar 2012 21:45: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: r232987 - stable/7/usr.sbin/syslogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 21:45:45 -0000 Author: sbruno Date: Wed Mar 14 21:45:45 2012 New Revision: 232987 URL: http://svn.freebsd.org/changeset/base/232987 Log: MFC r183347 Add a flag, -T, that tells syslogd to always replace the timestamp on messages from the network. We already replace malformatted timestamps and this option lets us replace timestamps that are correctly formatted but wrong. PR: 120891 Submitted by: Thomas Vogt MFC after: 1 week MFC r186263 Fixing !INET6 builds after bumping WARNS to 3. MFC r186331 Constify 'name' field in struct funix. This commit makes syslogd(8) WARNS?=6 on amd64 but I have not tested under universe so keep WARNS?= level as-is for now. MFC r186234 Rather than hardcode the 'struct iovec iov' array size, use a #define. While I'm here bump WARNS to 3. Obtained from: Juniper Networks MFC r186236 Use passed parameter rather than the #define. (more accurate extraction of Juniper Networks change) MFC r224002 Add a new option, -N to disable the default and recommended syslogd(8) behavior, which binds to the well known UDP port. This option implies -s. Obtained from: delphij@ obrien@ avatar@ trhodes@ dwmalone@ Modified: stable/7/usr.sbin/syslogd/syslogd.8 stable/7/usr.sbin/syslogd/syslogd.c Directory Properties: stable/7/usr.sbin/syslogd/ (props changed) Modified: stable/7/usr.sbin/syslogd/syslogd.8 ============================================================================== --- stable/7/usr.sbin/syslogd/syslogd.8 Wed Mar 14 21:26:06 2012 (r232986) +++ stable/7/usr.sbin/syslogd/syslogd.8 Wed Mar 14 21:45:45 2012 (r232987) @@ -36,7 +36,7 @@ .Nd log systems messages .Sh SYNOPSIS .Nm -.Op Fl 468ACcdknosuv +.Op Fl 468ACcdkNnosuv .Op Fl a Ar allowed_peer .Op Fl b Ar bind_address .Op Fl f Ar config_file @@ -207,6 +207,13 @@ facility is reserved for messages read d Select the number of minutes between .Dq mark messages; the default is 20 minutes. +.It Fl N +Disable binding on UDP sockets. RFC 3164 recommends that outgoing +syslogd messages should originate from the privileged port, this +option +.Em disables +the recommended behavior. This option inherits +.Fl s . .It Fl n Disable dns query for every request. .It Fl o @@ -242,6 +249,11 @@ Do not log messages from remote machines If specified twice, no network socket will be opened at all, which also disables logging to remote machines. +.It Fl T +Always use the local time and date for messages received from the network, +instead of the timestamp field supplied in the message by the remote host. +This is useful if some of the originating hosts can't keep time properly +or are unable to generate a correct timestamp. .It Fl u Unique priority logging. Only log messages at the specified priority. @@ -308,6 +320,13 @@ will not append to log files that do not option is specified); therefore, they must be created manually before running .Nm . +.Pp +The date and time are taken from the received message. +If the format of the timestamp field is incorrect, +time obtained from the local host is used instead. +This can be overriden by the +.Fl T +flag. .Sh FILES .Bl -tag -width /var/run/syslog.pid -compact .It Pa /etc/syslog.conf Modified: stable/7/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/7/usr.sbin/syslogd/syslogd.c Wed Mar 14 21:26:06 2012 (r232986) +++ stable/7/usr.sbin/syslogd/syslogd.c Wed Mar 14 21:45:45 2012 (r232987) @@ -128,7 +128,7 @@ const char ctty[] = _PATH_CONSOLE; */ struct funix { int s; - char *name; + const char *name; mode_t mode; STAILQ_ENTRY(funix) next; }; @@ -277,6 +277,7 @@ static int fklog = -1; /* /dev/klog */ static int Initialized; /* set when we have initialized ourselves */ static int MarkInterval = 20 * 60; /* interval between marks in seconds */ static int MarkSeq; /* mark sequence number */ +static int NoBind; /* don't bind() as suggested by RFC 3164 */ static int SecureMode; /* when true, receive only unix domain socks */ #ifdef INET6 static int family = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both) */ @@ -293,6 +294,7 @@ static char bootfile[MAXLINE+1]; /* boot struct allowedpeer *AllowedPeers; /* List of allowed peers */ static int NumAllowed; /* Number of entries in AllowedPeers */ +static int RemoteAddDate; /* Always set the date on remote messages */ static int UniquePriority; /* Only log specified priority? */ static int LogFacPri; /* Put facility and priority in log message: */ @@ -322,7 +324,7 @@ static void logmsg(int, const char *, co static void log_deadchild(pid_t, int, const char *); static void markit(void); static int skip_message(const char *, const char *, int); -static void printline(const char *, char *); +static void printline(const char *, char *, int); static void printsys(char *); static int p_open(const char *, pid_t *); static void readklog(void); @@ -352,7 +354,8 @@ main(int argc, char *argv[]) socklen_t len; bindhostname = NULL; - while ((ch = getopt(argc, argv, "468Aa:b:cCdf:kl:m:nop:P:sS:uv")) != -1) + while ((ch = getopt(argc, argv, "468Aa:b:cCdf:kl:m:nNop:P:sS:Tuv")) + != -1) switch (ch) { case '4': family = PF_INET; @@ -430,6 +433,10 @@ main(int argc, char *argv[]) case 'm': /* mark interval */ MarkInterval = atoi(optarg) * 60; break; + case 'N': + NoBind = 1; + SecureMode = 1; + break; case 'n': resolve = 0; break; @@ -452,6 +459,9 @@ main(int argc, char *argv[]) errx(1, "%s path too long, exiting", optarg); funix_secure.name = optarg; break; + case 'T': + RemoteAddDate = 1; + break; case 'u': /* only log specified priority */ UniquePriority++; break; @@ -644,7 +654,7 @@ main(int argc, char *argv[]) hname = cvthname((struct sockaddr *)&frominet); unmapped((struct sockaddr *)&frominet); if (validate((struct sockaddr *)&frominet, hname)) - printline(hname, line); + printline(hname, line, RemoteAddDate ? ADDDATE : 0); } else if (l < 0 && errno != EINTR) logerror("recvfrom inet"); } @@ -657,7 +667,7 @@ main(int argc, char *argv[]) (struct sockaddr *)&fromunix, &len); if (l > 0) { line[l] = '\0'; - printline(LocalHostName, line); + printline(LocalHostName, line, 0); } else if (l < 0 && errno != EINTR) logerror("recvfrom unix"); } @@ -697,7 +707,7 @@ usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n", - "usage: syslogd [-468ACcdknosuv] [-a allowed_peer]", + "usage: syslogd [-468ACcdknosTuv] [-a allowed_peer]", " [-b bind_address] [-f config_file]", " [-l [mode:]path] [-m mark_interval]", " [-P pid_file] [-p log_socket]"); @@ -709,7 +719,7 @@ usage(void) * on the appropriate log files. */ static void -printline(const char *hname, char *msg) +printline(const char *hname, char *msg, int flags) { char *p, *q; long n; @@ -762,7 +772,7 @@ printline(const char *hname, char *msg) } *q = '\0'; - logmsg(pri, line, hname, 0); + logmsg(pri, line, hname, flags); } /* @@ -2180,10 +2190,13 @@ allowaddr(char *s) char *cp1, *cp2; struct allowedpeer ap; struct servent *se; - int masklen = -1, i; + int masklen = -1; struct addrinfo hints, *res; struct in_addr *addrp, *maskp; +#ifdef INET6 + int i; u_int32_t *addr6p, *mask6p; +#endif char ip[NI_MAXHOST]; #ifdef INET6 @@ -2339,12 +2352,15 @@ allowaddr(char *s) static int validate(struct sockaddr *sa, const char *hname) { - int i, j, reject; + int i; size_t l1, l2; char *cp, name[NI_MAXHOST], ip[NI_MAXHOST], port[NI_MAXSERV]; struct allowedpeer *ap; struct sockaddr_in *sin4, *a4p = NULL, *m4p = NULL; +#ifdef INET6 + int j, reject; struct sockaddr_in6 *sin6, *a6p = NULL, *m6p = NULL; +#endif struct addrinfo hints, *res; u_short sport; @@ -2647,13 +2663,24 @@ socksetup(int af, const char *bindhostna close(*s); continue; } - if (bind(*s, r->ai_addr, r->ai_addrlen) < 0) { - close(*s); - logerror("bind"); - continue; - } + /* + * RFC 3164 recommends that client side message + * should come from the privileged syslogd port. + * + * If the system administrator choose not to obey + * this, we can skip the bind() step so that the + * system will choose a port for us. + */ + if (!NoBind) { + if (bind(*s, r->ai_addr, r->ai_addrlen) < 0) { + close(*s); + logerror("bind"); + continue; + } - double_rbuf(*s); + if (!SecureMode) + double_rbuf(*s); + } (*socks)++; s++; From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 22:27:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B9081065670; Wed, 14 Mar 2012 22:27:29 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AAAD8FC14; Wed, 14 Mar 2012 22:27:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EMRS54034502; Wed, 14 Mar 2012 22:27:28 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EMRSTq034500; Wed, 14 Mar 2012 22:27:28 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201203142227.q2EMRSTq034500@svn.freebsd.org> From: "Kenneth D. Merry" Date: Wed, 14 Mar 2012 22:27:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232988 - stable/9/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 22:27:29 -0000 Author: ken Date: Wed Mar 14 22:27:28 2012 New Revision: 232988 URL: http://svn.freebsd.org/changeset/base/232988 Log: MFC 232675 Make the mps(4) module depend on the cam module. Submitted by: Mykola Dzham Modified: stable/9/sys/dev/mps/mps_pci.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/mps/mps_pci.c ============================================================================== --- stable/9/sys/dev/mps/mps_pci.c Wed Mar 14 21:45:45 2012 (r232987) +++ stable/9/sys/dev/mps/mps_pci.c Wed Mar 14 22:27:28 2012 (r232988) @@ -87,6 +87,7 @@ static driver_t mps_pci_driver = { static devclass_t mps_devclass; DRIVER_MODULE(mps, pci, mps_pci_driver, mps_devclass, 0, 0); +MODULE_DEPEND(mps, cam, 1, 1, 1); struct mps_ident { uint16_t vendor; From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 22:30:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36459106566B; Wed, 14 Mar 2012 22:30:15 +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 253CA8FC14; Wed, 14 Mar 2012 22:30:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EMUFRk034671; Wed, 14 Mar 2012 22:30:15 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EMUEZN034669; Wed, 14 Mar 2012 22:30:14 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201203142230.q2EMUEZN034669@svn.freebsd.org> From: "Kenneth D. Merry" Date: Wed, 14 Mar 2012 22:30: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: r232989 - stable/8/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 22:30:15 -0000 Author: ken Date: Wed Mar 14 22:30:14 2012 New Revision: 232989 URL: http://svn.freebsd.org/changeset/base/232989 Log: MFC 232675 Make the mps(4) module depend on the cam module. Submitted by: Mykola Dzham Modified: stable/8/sys/dev/mps/mps_pci.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/mps/mps_pci.c ============================================================================== --- stable/8/sys/dev/mps/mps_pci.c Wed Mar 14 22:27:28 2012 (r232988) +++ stable/8/sys/dev/mps/mps_pci.c Wed Mar 14 22:30:14 2012 (r232989) @@ -87,6 +87,7 @@ static driver_t mps_pci_driver = { static devclass_t mps_devclass; DRIVER_MODULE(mps, pci, mps_pci_driver, mps_devclass, 0, 0); +MODULE_DEPEND(mps, cam, 1, 1, 1); struct mps_ident { uint16_t vendor; From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 22:34:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9713A106564A; Wed, 14 Mar 2012 22:34:39 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4E28FC0A; Wed, 14 Mar 2012 22:34:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id q2EMYc6V072284; Thu, 15 Mar 2012 02:34:38 +0400 (MSK) (envelope-from marck@rinet.ru) Date: Thu, 15 Mar 2012 02:34:38 +0400 (MSK) From: Dmitry Morozovsky To: Gleb Kurtsou In-Reply-To: <201203140915.q2E9Fpbq090090@svn.freebsd.org> Message-ID: References: <201203140915.q2E9Fpbq090090@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (woozle.rinet.ru [0.0.0.0]); Thu, 15 Mar 2012 02:34:38 +0400 (MSK) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232960 - head/sys/fs/tmpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 22:34:39 -0000 On Wed, 14 Mar 2012, Gleb Kurtsou wrote: > Author: gleb > Date: Wed Mar 14 09:15:50 2012 > New Revision: 232960 > URL: http://svn.freebsd.org/changeset/base/232960 > > Log: > Prevent tmpfs_rename() deadlock in a way similar to UFS > > Unlock vnodes and try to lock them one by one. Relookup fvp and tvp. Is this change applicable to other branches? If so, any plans for MFC? -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 22:36:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4731106566B; Wed, 14 Mar 2012 22:36:46 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com [209.85.210.45]) by mx1.freebsd.org (Postfix) with ESMTP id 842378FC0A; Wed, 14 Mar 2012 22:36:46 +0000 (UTC) Received: by dadp14 with SMTP id p14so9811489dad.18 for ; Wed, 14 Mar 2012 15:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wtiYa0V/FVKQsG/otpvwRyEmnCTPwLqPTBt0f150SvM=; b=o9FO8F259jc8rL/u0ApZNGOIh8Hkne+p3sGAwaG9IxwAubaY6x8mkGYGwEb2db+WwB sF6aQDtiDXei5ENYJdFLhBz+8XAOrJMQqu/vPvdoePlF+O/nGSmeUCToeHDnp3vXCD8u Y0B+ydQ1GbvF6jyG/WUzLlG+v/NWmkihpSWU9XH7IIvt8Rpi8cFv/6DsDaGxUBSku/X1 H2+7tPCTmLb8Vocr5/IO+YXWx/cU6pefPQ7lRUYTtwQ+ZKjD0rybqXMSTtAwdT6uBlBz ynAsjRBZyR2aQm/nERS2BuPE3SXjMpga4XKvemrsvvsXDKeworkMMb+szr9fyrEi6tgs Y9+g== MIME-Version: 1.0 Received: by 10.68.232.2 with SMTP id tk2mr5442978pbc.68.1331764606061; Wed, 14 Mar 2012 15:36:46 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.143.33.5 with HTTP; Wed, 14 Mar 2012 15:36:45 -0700 (PDT) In-Reply-To: <201203141724.15398.jhb@freebsd.org> References: <201203132029.q2DKT4L6061308@svn.freebsd.org> <201203141724.15398.jhb@freebsd.org> Date: Wed, 14 Mar 2012 15:36:45 -0700 X-Google-Sender-Auth: A-tvuwF5VkiRPST1C1eTzCUdmX0 Message-ID: From: Adrian Chadd To: John Baldwin 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: r232938 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 22:36:46 -0000 On 14 March 2012 14:24, John Baldwin wrote: >> +MODULE_DEPEND(zfsctrl, acl_nfs4, 1, 1, 1); >> +MODULE_DEPEND(zfsctrl, acl_posix1e, 1, 1, 1); > > Eh, I thought ZFS only needs nfs4 and not posix1e? =A0I think only UFS ne= eds > both of these. I was being overly cautious. If that's the case, I can remove posix1e. Adrian From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 22:44:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E46B106566C; Wed, 14 Mar 2012 22:44:57 +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 0E3888FC0A; Wed, 14 Mar 2012 22:44:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2EMiuaU035218; Wed, 14 Mar 2012 22:44:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2EMiuvR035216; Wed, 14 Mar 2012 22:44:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201203142244.q2EMiuvR035216@svn.freebsd.org> From: Xin LI Date: Wed, 14 Mar 2012 22:44: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: r232990 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 22:44:57 -0000 Author: delphij Date: Wed Mar 14 22:44:56 2012 New Revision: 232990 URL: http://svn.freebsd.org/changeset/base/232990 Log: Add the missing IPOIB option. Sponsored by: iXsystems, Inc. MFC after: 3 days Modified: head/sys/conf/options Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Mar 14 22:30:14 2012 (r232989) +++ head/sys/conf/options Wed Mar 14 22:44:56 2012 (r232990) @@ -888,6 +888,7 @@ OFED opt_ofed.h OFED_DEBUG_INIT opt_ofed.h SDP opt_ofed.h SDP_DEBUG opt_ofed.h +IPOIB opt_ofed.h IPOIB_DEBUG opt_ofed.h IPOIB_CM opt_ofed.h From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 23:25:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7BECA106564A; Wed, 14 Mar 2012 23:25:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B54A8FC17; Wed, 14 Mar 2012 23:25:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ENPlaY036645; Wed, 14 Mar 2012 23:25:47 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ENPlVs036643; Wed, 14 Mar 2012 23:25:47 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201203142325.q2ENPlVs036643@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 14 Mar 2012 23:25: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: r232991 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 23:25:47 -0000 Author: jkim Date: Wed Mar 14 23:25:46 2012 New Revision: 232991 URL: http://svn.freebsd.org/changeset/base/232991 Log: Add a PCI quirk to ignore PCI map registers from configuration space. For example, some BIOS for AMD SB600 south bridge may map HPET MMIO base address as a memory BAR for SMBus controller depending on a PM register configuration. Before r231161 (and r232086, subsequent MFC to stable/9), it was not fatal but hpet(4) just failed to attach. Since we probe and attach HPET earlier than PCI devices now, it caused unfortunate hard lockup. With this patch, it does not hang any more and HPET works at the same time. Clean up some style nits while I am in the neighborhood. PR: kern/165647 Reviewed by: jhb MFC after: 3 days Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Mar 14 22:44:56 2012 (r232990) +++ head/sys/dev/pci/pci.c Wed Mar 14 23:25:46 2012 (r232991) @@ -196,6 +196,7 @@ struct pci_quirk { #define PCI_QUIRK_MAP_REG 1 /* PCI map register in weird place */ #define PCI_QUIRK_DISABLE_MSI 2 /* MSI/MSI-X doesn't work */ #define PCI_QUIRK_ENABLE_MSI_VM 3 /* Older chipset in VM where MSI works */ +#define PCI_QUIRK_UNMAP_REG 4 /* Ignore PCI map register */ int arg1; int arg2; }; @@ -244,6 +245,16 @@ static const struct pci_quirk const pci_ */ { 0x12378086, PCI_QUIRK_ENABLE_MSI_VM, 0, 0 }, + /* + * HPET MMIO base address may appear in Bar1 for AMD SB600 SMBus + * controller depending on SoftPciRst register (PM_IO 0x55 [7]). + * It prevents us from attaching hpet(4) when the bit is unset. + * Note this quirk only affects SB600 revision A13 and earlier. + * For SB600 A21 and later, firmware must set the bit to hide it. + * For SB700 and later, it is unused and hardcoded to zero. + */ + { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, + { 0 } }; @@ -3111,12 +3122,18 @@ xhci_early_takeover(device_t self) void pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) { - struct pci_devinfo *dinfo = device_get_ivars(dev); - pcicfgregs *cfg = &dinfo->cfg; - struct resource_list *rl = &dinfo->resources; + struct pci_devinfo *dinfo; + pcicfgregs *cfg; + struct resource_list *rl; const struct pci_quirk *q; + uint32_t devid; int i; + dinfo = device_get_ivars(dev); + cfg = &dinfo->cfg; + rl = &dinfo->resources; + devid = (cfg->device << 16) | cfg->vendor; + /* ATA devices needs special map treatment */ if ((pci_get_class(dev) == PCIC_STORAGE) && (pci_get_subclass(dev) == PCIS_STORAGE_IDE) && @@ -3125,18 +3142,29 @@ pci_add_resources(device_t bus, device_t !pci_read_config(dev, PCIR_BAR(2), 4))) ) pci_ata_maps(bus, dev, rl, force, prefetchmask); else - for (i = 0; i < cfg->nummaps;) + for (i = 0; i < cfg->nummaps;) { + /* + * Skip quirked resources. + */ + for (q = &pci_quirks[0]; q->devid != 0; q++) + if (q->devid == devid && + q->type == PCI_QUIRK_UNMAP_REG && + q->arg1 == PCIR_BAR(i)) + break; + if (q->devid != 0) { + i++; + continue; + } i += pci_add_map(bus, dev, PCIR_BAR(i), rl, force, prefetchmask & (1 << i)); + } /* * Add additional, quirked resources. */ - for (q = &pci_quirks[0]; q->devid; q++) { - if (q->devid == ((cfg->device << 16) | cfg->vendor) - && q->type == PCI_QUIRK_MAP_REG) + for (q = &pci_quirks[0]; q->devid != 0; q++) + if (q->devid == devid && q->type == PCI_QUIRK_MAP_REG) pci_add_map(bus, dev, q->arg1, rl, force, 0); - } if (cfg->intpin > 0 && PCI_INTERRUPT_VALID(cfg->intline)) { #ifdef __PCI_REROUTE_INTERRUPT From owner-svn-src-all@FreeBSD.ORG Wed Mar 14 23:46:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB98A106566C; Wed, 14 Mar 2012 23:46:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB3EB8FC0C; Wed, 14 Mar 2012 23:46:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ENk7aM037333; Wed, 14 Mar 2012 23:46:07 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ENk7qJ037331; Wed, 14 Mar 2012 23:46:07 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203142346.q2ENk7qJ037331@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Wed, 14 Mar 2012 23:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232992 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 23:46:07 -0000 Author: gonzo Date: Wed Mar 14 23:46:07 2012 New Revision: 232992 URL: http://svn.freebsd.org/changeset/base/232992 Log: - Remove unncessary type casts - Make kernel backtrace routine more robust by refusing to backtrace further when encountered function that is possibly modifies SP value Modified: head/sys/dev/hwpmc/hwpmc_mips.c Modified: head/sys/dev/hwpmc/hwpmc_mips.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mips.c Wed Mar 14 23:25:46 2012 (r232991) +++ head/sys/dev/hwpmc/hwpmc_mips.c Wed Mar 14 23:46:07 2012 (r232992) @@ -150,6 +150,15 @@ pmc_next_frame(register_t *pc, register_ case OP_SW: case OP_SD: + /* + * SP is being saved using S8(FP). Most likely it indicates + * that SP is modified in the function and we can't get + * its value safely without emulating code backward + * So just bail out on functions like this + */ + if ((i.IType.rs == 30) && (i.IType.rt = 29)) + return (-1); + /* look for saved registers on the stack */ if (i.IType.rs != 29) break; @@ -327,9 +336,9 @@ pmc_save_kernel_callchain(uintptr_t *cc, register_t pc, ra, sp; int frames = 0; - pc = (uint64_t)tf->pc; - sp = (uint64_t)tf->sp; - ra = (uint64_t)tf->ra; + pc = tf->pc; + sp = tf->sp; + ra = tf->ra; /* * Unwind, and unwind, and unwind @@ -353,9 +362,9 @@ pmc_save_user_callchain(uintptr_t *cc, i register_t pc, ra, sp; int frames = 0; - pc = (uint64_t)tf->pc; - sp = (uint64_t)tf->sp; - ra = (uint64_t)tf->ra; + pc = tf->pc; + sp = tf->sp; + ra = tf->ra; /* * Unwind, and unwind, and unwind From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 01:43:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A1C31065672; Thu, 15 Mar 2012 01:43:45 +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 597828FC21; Thu, 15 Mar 2012 01:43:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2F1hjXs041056; Thu, 15 Mar 2012 01:43:45 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2F1hjaH041052; Thu, 15 Mar 2012 01:43:45 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201203150143.q2F1hjaH041052@svn.freebsd.org> From: Kevin Lo Date: Thu, 15 Mar 2012 01:43: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: r232994 - in head/usr.bin: bc dc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 01:43:45 -0000 Author: kevlo Date: Thu Mar 15 01:43:44 2012 New Revision: 232994 URL: http://svn.freebsd.org/changeset/base/232994 Log: - Fix an erroneous invocation of the editline. - Fix wrong scaling in the bc.library. - Let length(0.000) conform to what gnu bc does. PR: bin/159227 Submitted by: AIDA Shinra Modified: head/usr.bin/bc/bc.library head/usr.bin/bc/bc.y head/usr.bin/dc/bcode.c Modified: head/usr.bin/bc/bc.library ============================================================================== --- head/usr.bin/bc/bc.library Wed Mar 14 23:55:25 2012 (r232993) +++ head/usr.bin/bc/bc.library Thu Mar 15 01:43:44 2012 (r232994) @@ -46,7 +46,9 @@ define e(x) { r = ibase ibase = A t = scale - scale = t + .434*x + 1 + scale = 0 + if (x > 0) scale = (0.435*x)/1 + scale = scale + t + 1 w = 0 if (x < 0) { @@ -95,26 +97,33 @@ define l(x) { t = scale f = 1 - scale = scale + scale(x) - length(x) + 1 - s = scale + if (x < 1) { + s = scale(x) + } else { + s = length(x) - scale(x) + } + scale = 0 + a = (2.31*s)/1 /* estimated integer part of the answer */ + s = t + length(a) + 2 /* estimated length of the answer */ while (x > 2) { - s = s + (length(x) - scale(x))/2 + 1 - if (s > 0) scale = s + scale=0 + scale = (length(x) + scale(x))/2 + 1 + if (scale < s) scale = s x = sqrt(x) f = f*2 } while (x < .5) { - s = s + (length(x) - scale(x))/2 + 1 - if (s > 0) scale = s + scale = 0 + scale = scale(x)/2 + 1 + if (scale < s) scale = s x = sqrt(x) f = f*2 } - scale = t + length(f) - scale(f) + 1 + scale = t + length(f) + length(t + length(f)) + 1 u = (x - 1)/(x + 1) - - scale = scale + 1.1*length(t) - 1.1*scale(t) s = u*u + scale = t + 2 b = 2*f c = b d = 1 @@ -261,3 +270,4 @@ define j(n,x) { e = g } } +/* vim: set filetype=bc shiftwidth=8 noexpandtab: */ Modified: head/usr.bin/bc/bc.y ============================================================================== --- head/usr.bin/bc/bc.y Wed Mar 14 23:55:25 2012 (r232993) +++ head/usr.bin/bc/bc.y Thu Mar 15 01:43:44 2012 (r232994) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "extern.h" #include "pathnames.h" @@ -1093,7 +1094,7 @@ sigchld(int signo) switch (signo) { default: for (;;) { - pid = waitpid(dc, &status, WCONTINUED); + pid = waitpid(dc, &status, WUNTRACED); if (pid == -1) { if (errno == EINTR) continue; @@ -1181,16 +1182,6 @@ main(int argc, char *argv[]) dup(p[1]); close(p[0]); close(p[1]); - if (interactive) { - el = el_init("bc", stdin, stderr, stderr); - hist = history_init(); - history(hist, &he, H_SETSIZE, 100); - el_set(el, EL_HIST, history, hist); - el_set(el, EL_EDITOR, "emacs"); - el_set(el, EL_SIGNAL, 1); - el_set(el, EL_PROMPT, dummy_prompt); - el_source(el, NULL); - } } else { close(STDIN_FILENO); dup(p[0]); @@ -1200,6 +1191,16 @@ main(int argc, char *argv[]) err(1, "cannot find dc"); } } + if (interactive) { + el = el_init("bc", stdin, stderr, stderr); + hist = history_init(); + history(hist, &he, H_SETSIZE, 100); + el_set(el, EL_HIST, history, hist); + el_set(el, EL_EDITOR, "emacs"); + el_set(el, EL_SIGNAL, 1); + el_set(el, EL_PROMPT, dummy_prompt); + el_source(el, NULL); + } yywrap(); return (yyparse()); } Modified: head/usr.bin/dc/bcode.c ============================================================================== --- head/usr.bin/dc/bcode.c Wed Mar 14 23:55:25 2012 (r232993) +++ head/usr.bin/dc/bcode.c Thu Mar 15 01:43:44 2012 (r232994) @@ -693,7 +693,7 @@ count_digits(const struct number *n) u_int i; if (BN_is_zero(n->number)) - return (1); + return (n->scale ? n->scale : 1); int_part = new_number(); fract_part = new_number(); From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 02:37:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FACC106566B; Thu, 15 Mar 2012 02:37:15 +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 153638FC12; Thu, 15 Mar 2012 02:37:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2F2bEpE042807; Thu, 15 Mar 2012 02:37:14 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2F2bER7042805; Thu, 15 Mar 2012 02:37:14 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201203150237.q2F2bER7042805@svn.freebsd.org> From: Kevin Lo Date: Thu, 15 Mar 2012 02:37:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232995 - stable/9/sys/fs/ntfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 02:37:15 -0000 Author: kevlo Date: Thu Mar 15 02:37:14 2012 New Revision: 232995 URL: http://svn.freebsd.org/changeset/base/232995 Log: MFC r232099: Check if the user has necessary permissions on the device Modified: stable/9/sys/fs/ntfs/ntfs_vfsops.c Directory Properties: stable/9/sys/fs/ntfs/ (props changed) Modified: stable/9/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- stable/9/sys/fs/ntfs/ntfs_vfsops.c Thu Mar 15 01:43:44 2012 (r232994) +++ stable/9/sys/fs/ntfs/ntfs_vfsops.c Thu Mar 15 02:37:14 2012 (r232995) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -150,13 +151,16 @@ static const char *ntfs_opts[] = { }; static int -ntfs_mount (struct mount *mp) +ntfs_mount(struct mount *mp) { - int err = 0, error; - struct vnode *devvp; + int err = 0, error; + accmode_t accmode; + struct vnode *devvp; struct nameidata ndp; + struct thread *td; char *from; + td = curthread; if (vfs_filteropt(mp->mnt_optnew, ntfs_opts)) return (EINVAL); @@ -183,7 +187,7 @@ ntfs_mount (struct mount *mp) * Not an update, or updating the name: look up the name * and verify that it refers to a sensible block device. */ - NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, from, curthread); + NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, from, td); err = namei(&ndp); if (err) { /* can't get devvp!*/ @@ -197,6 +201,21 @@ ntfs_mount (struct mount *mp) return (err); } + /* + * If mount by non-root, then verify that user has necessary + * permissions on the device. + */ + accmode = VREAD; + if ((mp->mnt_flag & MNT_RDONLY) == 0) + accmode |= VWRITE; + err = VOP_ACCESS(devvp, accmode, td->td_ucred, td); + if (err) + err = priv_check(td, PRIV_VFS_MOUNT_PERM); + if (err) { + vput(devvp); + return (err); + } + if (mp->mnt_flag & MNT_UPDATE) { #if 0 /* @@ -230,7 +249,7 @@ ntfs_mount (struct mount *mp) /* Save "mounted from" info for mount point (NULL pad)*/ vfs_mountedfrom(mp, from); - err = ntfs_mountfs(devvp, mp, curthread); + err = ntfs_mountfs(devvp, mp, td); } if (err) { vrele(devvp); @@ -243,7 +262,7 @@ error_1: /* no state to back out*/ /* XXX: missing NDFREE(&ndp, ...) */ success: - return(err); + return (err); } /* From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 02:46:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF84F106566B; Thu, 15 Mar 2012 02:46:13 +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 9E6188FC14; Thu, 15 Mar 2012 02:46:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2F2kDsX043189; Thu, 15 Mar 2012 02:46:13 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2F2kDgK043186; Thu, 15 Mar 2012 02:46:13 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201203150246.q2F2kDgK043186@svn.freebsd.org> From: Kevin Lo Date: Thu, 15 Mar 2012 02:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232996 - stable/9/sys/fs/ntfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 02:46:13 -0000 Author: kevlo Date: Thu Mar 15 02:46:12 2012 New Revision: 232996 URL: http://svn.freebsd.org/changeset/base/232996 Log: MFC r232100: Remove an unused structure and unnecessary cast Modified: stable/9/sys/fs/ntfs/ntfs.h stable/9/sys/fs/ntfs/ntfs_vfsops.c Directory Properties: stable/9/sys/fs/ntfs/ (props changed) Modified: stable/9/sys/fs/ntfs/ntfs.h ============================================================================== --- stable/9/sys/fs/ntfs/ntfs.h Thu Mar 15 02:37:14 2012 (r232995) +++ stable/9/sys/fs/ntfs/ntfs.h Thu Mar 15 02:46:12 2012 (r232996) @@ -36,7 +36,7 @@ typedef u_int16_t wchar; #pragma pack(1) #define BBSIZE 1024 #define BBOFF ((off_t)(0)) -#define BBLOCK ((daddr_t)(0)) +#define BBLOCK 0 #define NTFS_MFTINO 0 #define NTFS_VOLUMEINO 3 #define NTFS_ATTRDEFINO 4 Modified: stable/9/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- stable/9/sys/fs/ntfs/ntfs_vfsops.c Thu Mar 15 02:37:14 2012 (r232995) +++ stable/9/sys/fs/ntfs/ntfs_vfsops.c Thu Mar 15 02:46:12 2012 (r232996) @@ -67,8 +67,6 @@ MALLOC_DEFINE(M_NTFSNTNODE,"ntfs_ntnode" MALLOC_DEFINE(M_NTFSFNODE,"ntfs_fnode", "NTFS fnode information"); MALLOC_DEFINE(M_NTFSDIR,"ntfs_dir", "NTFS dir buffer"); -struct sockaddr; - static int ntfs_mountfs(register struct vnode *, struct mount *, struct thread *); static int ntfs_calccfree(struct ntfsmount *ntmp, cn_t *cfreep); From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 05:11:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15564106564A; Thu, 15 Mar 2012 05:11:30 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0178A8FC08; Thu, 15 Mar 2012 05:11:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2F5BTms048641; Thu, 15 Mar 2012 05:11:29 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2F5BT5M048639; Thu, 15 Mar 2012 05:11:29 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201203150511.q2F5BT5M048639@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 15 Mar 2012 05:11: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: r232997 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 05:11:30 -0000 Author: ae Date: Thu Mar 15 05:11:29 2012 New Revision: 232997 URL: http://svn.freebsd.org/changeset/base/232997 Log: Add debug.kld_debug loader tunable. MFC after: 2 weeks Modified: head/sys/kern/kern_linker.c Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Thu Mar 15 02:46:12 2012 (r232996) +++ head/sys/kern/kern_linker.c Thu Mar 15 05:11:29 2012 (r232997) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); int kld_debug = 0; SYSCTL_INT(_debug, OID_AUTO, kld_debug, CTLFLAG_RW, &kld_debug, 0, "Set various levels of KLD debug"); +TUNABLE_INT("debug.kld_debug", &kld_debug); #endif #define KLD_LOCK() sx_xlock(&kld_sx) From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 05:29:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95D991065674; Thu, 15 Mar 2012 05:29:52 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 688888FC1D; Thu, 15 Mar 2012 05:29:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2F5TqHt049266; Thu, 15 Mar 2012 05:29:52 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2F5TqgK049263; Thu, 15 Mar 2012 05:29:52 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203150529.q2F5TqgK049263@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Thu, 15 Mar 2012 05:29: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: r232998 - in head/sys: conf mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 05:29:52 -0000 Author: gonzo Date: Thu Mar 15 05:29:51 2012 New Revision: 232998 URL: http://svn.freebsd.org/changeset/base/232998 Log: Fill out fake preload structure to let userland tools like pmc(3) know about kernel module base address and actual size Modified: head/sys/conf/Makefile.mips head/sys/mips/mips/machdep.c Modified: head/sys/conf/Makefile.mips ============================================================================== --- head/sys/conf/Makefile.mips Thu Mar 15 05:11:29 2012 (r232997) +++ head/sys/conf/Makefile.mips Thu Mar 15 05:29:51 2012 (r232998) @@ -44,7 +44,7 @@ MKMODULESENV+= MACHINE=${MACHINE} MACHIN # We default to the MIPS32 ISA, if none specified in the # kernel configuration file. ARCH_FLAGS?=-march=mips32 -EXTRA_FLAGS=-fno-pic -mno-abicalls -G0 +EXTRA_FLAGS=-fno-pic -mno-abicalls -G0 -DKERNLOADADDR=${KERNLOADADDR} HACK_EXTRA_FLAGS=-shared Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Thu Mar 15 05:11:29 2012 (r232997) +++ head/sys/mips/mips/machdep.c Thu Mar 15 05:29:51 2012 (r232998) @@ -380,6 +380,56 @@ mips_vector_init(void) void mips_postboot_fixup(void) { + static char fake_preload[256]; + caddr_t preload_ptr = (caddr_t)&fake_preload[0]; + size_t size = 0; + + /* + * Provide kernel module file information + */ + *(uint32_t*)(preload_ptr + size) = MODINFO_NAME; + size += sizeof(uint32_t); + *(uint32_t*)(preload_ptr + size) = strlen("kernel") + 1; + size += sizeof(uint32_t); + strcpy((char*)(preload_ptr + size), "kernel"); + size += strlen("kernel") + 1; + size = roundup(size, sizeof(u_long)); + + *(uint32_t*)(preload_ptr + size) = MODINFO_TYPE; + size += sizeof(uint32_t); + *(uint32_t*)(preload_ptr + size) = strlen("elf kernel") + 1; + size += sizeof(uint32_t); + strcpy((char*)(preload_ptr + size), "elf kernel"); + size += strlen("elf kernel") + 1; + size = roundup(size, sizeof(u_long)); + + *(uint32_t*)(preload_ptr + size) = MODINFO_ADDR; + size += sizeof(uint32_t); + *(uint32_t*)(preload_ptr + size) = sizeof(vm_offset_t); + size += sizeof(uint32_t); + *(vm_offset_t*)(preload_ptr + size) = KERNLOADADDR; + size += sizeof(vm_offset_t); + size = roundup(size, sizeof(u_long)); + + *(uint32_t*)(preload_ptr + size) = MODINFO_SIZE; + size += sizeof(uint32_t); + *(uint32_t*)(preload_ptr + size) = sizeof(size_t); + size += sizeof(uint32_t); + *(vm_offset_t*)(preload_ptr + size) = (size_t)&end - KERNLOADADDR; + size = roundup(size, sizeof(u_long)); + size += sizeof(size_t); + + /* End marker */ + *(uint32_t*)(preload_ptr + size) = 0; + size += sizeof(uint32_t); + *(uint32_t*)(preload_ptr + size) = 0; + size += sizeof(uint32_t); + + KASSERT((size < sizeof(fake_preload)), + ("fake preload size is more thenallocated")); + + preload_metadata = (void *)fake_preload; + #ifdef DDB Elf_Size *trampoline_data = (Elf_Size*)kernel_kseg0_end; Elf_Size symtabsize = 0; From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 06:01:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 415151065670; Thu, 15 Mar 2012 06:01:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D17A8FC08; Thu, 15 Mar 2012 06:01:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2F61MIG050376; Thu, 15 Mar 2012 06:01:22 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2F61LMo050374; Thu, 15 Mar 2012 06:01:21 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201203150601.q2F61LMo050374@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 15 Mar 2012 06:01: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: r232999 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 06:01:22 -0000 Author: ae Date: Thu Mar 15 06:01:21 2012 New Revision: 232999 URL: http://svn.freebsd.org/changeset/base/232999 Log: Add CTLFLAG_TUN to the sysctl definition and fix style. Pointed by: Garrett Cooper MFC after: 2 weeks Modified: head/sys/kern/kern_linker.c Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Thu Mar 15 05:29:51 2012 (r232998) +++ head/sys/kern/kern_linker.c Thu Mar 15 06:01:21 2012 (r232999) @@ -65,8 +65,8 @@ __FBSDID("$FreeBSD$"); #ifdef KLD_DEBUG int kld_debug = 0; -SYSCTL_INT(_debug, OID_AUTO, kld_debug, CTLFLAG_RW, - &kld_debug, 0, "Set various levels of KLD debug"); +SYSCTL_INT(_debug, OID_AUTO, kld_debug, CTLFLAG_RW | CTLFLAG_TUN, + &kld_debug, 0, "Set various levels of KLD debug"); TUNABLE_INT("debug.kld_debug", &kld_debug); #endif From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 08:39:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F3D5106566C; Thu, 15 Mar 2012 08:39:11 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A4F78FC16; Thu, 15 Mar 2012 08:39:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2F8dB9E055842; Thu, 15 Mar 2012 08:39:11 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2F8dBvh055839; Thu, 15 Mar 2012 08:39:11 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201203150839.q2F8dBvh055839@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 15 Mar 2012 08:39: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: r233000 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 08:39:11 -0000 Author: ae Date: Thu Mar 15 08:39:10 2012 New Revision: 233000 URL: http://svn.freebsd.org/changeset/base/233000 Log: Add MODULE_DEPEND() to geom_part modules. MFC after: 2 weeks Modified: head/sys/geom/part/g_part.c head/sys/geom/part/g_part.h Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Thu Mar 15 06:01:21 2012 (r232999) +++ head/sys/geom/part/g_part.c Thu Mar 15 08:39:10 2012 (r233000) @@ -146,6 +146,7 @@ static struct g_class g_part_class = { }; DECLARE_GEOM_CLASS(g_part_class, g_part); +MODULE_VERSION(g_part, 0); /* * Support functions. Modified: head/sys/geom/part/g_part.h ============================================================================== --- head/sys/geom/part/g_part.h Thu Mar 15 06:01:21 2012 (r232999) +++ head/sys/geom/part/g_part.h Thu Mar 15 08:39:10 2012 (r233000) @@ -208,6 +208,7 @@ int g_part_modevent(module_t, int, struc name##_modevent, \ &name##_scheme \ }; \ - DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_ANY) + DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); \ + MODULE_DEPEND(name, g_part, 0, 0, 0) #endif /* !_GEOM_PART_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 08:49:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7EF8E1065675; Thu, 15 Mar 2012 08:49:50 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6BCE58FC0A; Thu, 15 Mar 2012 08:49:48 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so2612537bkc.13 for ; Thu, 15 Mar 2012 01:49:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=d6YTrHSiBpXaNYcH62rg+3+i15pG+bT55ZFZrlfcA50=; b=s+26NxuXgSar9vFNQ0cT7HL+lc7EA1elJsACXWKjdmnCO03lmJ0Eb/NbUYKD+qFI5Y 5TOBweTo9uvxxa7hcY33m8yiBtHFQ9NrN6Ia59SdfdiKaoIrodCXEt6Nhw+jn1cuwAF1 MWiz11M6Oh+udHL2W5FLFRefgp4Csbg+hVtRMYKX5rAIgvJO3TsmHq3Xuzq5SLuQjVCB yo4IbP0XCXEeOi/EtdeuoiMdr4y75keghlFP7K5mpMPCnQYSkGzar+4N21wVxRxfyhuU Zg9VH7oo+ORpmWl53eMLzaAy+2lU5hZ+0jyeIXNd5LmLw6hNonWcXXnrJF2tpZei9nvm Y6Kg== Received: by 10.204.157.134 with SMTP id b6mr2212686bkx.88.1331801388170; Thu, 15 Mar 2012 01:49:48 -0700 (PDT) Received: from localhost (port-60-adslby-pool47.infonet.by. [81.25.47.60]) by mx.google.com with ESMTPS id m3sm2210295bkz.0.2012.03.15.01.49.46 (version=SSLv3 cipher=OTHER); Thu, 15 Mar 2012 01:49:47 -0700 (PDT) Date: Thu, 15 Mar 2012 10:49:45 +0200 From: Gleb Kurtsou To: Dmitry Morozovsky Message-ID: <20120315084945.GA1400@reks> References: <201203140915.q2E9Fpbq090090@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, mdf@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232960 - head/sys/fs/tmpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 08:49:50 -0000 On (15/03/2012 02:34), Dmitry Morozovsky wrote: > On Wed, 14 Mar 2012, Gleb Kurtsou wrote: > > > Author: gleb > > Date: Wed Mar 14 09:15:50 2012 > > New Revision: 232960 > > URL: http://svn.freebsd.org/changeset/base/232960 > > > > Log: > > Prevent tmpfs_rename() deadlock in a way similar to UFS > > > > Unlock vnodes and try to lock them one by one. Relookup fvp and tvp. > > Is this change applicable to other branches? If so, any plans for MFC? I'll merge it to 9-stable in two weeks unless requested otherwise. From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 11:06:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A8B241065672; Thu, 15 Mar 2012 11:06:37 +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 917478FC0C; Thu, 15 Mar 2012 11:06:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FB6bmJ062646; Thu, 15 Mar 2012 11:06:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FB6bBu062639; Thu, 15 Mar 2012 11:06:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203151106.q2FB6bBu062639@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 15 Mar 2012 11:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233001 - stable/9/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 11:06:37 -0000 Author: kib Date: Thu Mar 15 11:06:37 2012 New Revision: 233001 URL: http://svn.freebsd.org/changeset/base/233001 Log: MFC r232071: Account the writeable shared mappings backed by file in the vnode v_writecount. MFC r232103: Place the if() at the right location. MFC note: the added struct vm_object un_pager.vnp.writemappings member is located after the fields of struct vm_object that could be accessed from the modules. Modified: stable/9/sys/vm/vm_map.c stable/9/sys/vm/vm_map.h stable/9/sys/vm/vm_mmap.c stable/9/sys/vm/vm_object.h stable/9/sys/vm/vnode_pager.c stable/9/sys/vm/vnode_pager.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_map.c ============================================================================== --- stable/9/sys/vm/vm_map.c Thu Mar 15 08:39:10 2012 (r233000) +++ stable/9/sys/vm/vm_map.c Thu Mar 15 11:06:37 2012 (r233001) @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -475,11 +476,23 @@ vm_map_process_deferred(void) { struct thread *td; vm_map_entry_t entry; + vm_object_t object; td = curthread; - while ((entry = td->td_map_def_user) != NULL) { td->td_map_def_user = entry->next; + if ((entry->eflags & MAP_ENTRY_VN_WRITECNT) != 0) { + /* + * Decrement the object's writemappings and + * possibly the vnode's v_writecount. + */ + KASSERT((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0, + ("Submap with writecount")); + object = entry->object.vm_object; + KASSERT(object != NULL, ("No object for writecount")); + vnode_pager_release_writecount(object, entry->start, + entry->end); + } vm_map_entry_deallocate(entry, FALSE); } } @@ -1174,6 +1187,8 @@ vm_map_insert(vm_map_t map, vm_object_t protoeflags |= MAP_ENTRY_NOSYNC; if (cow & MAP_DISABLE_COREDUMP) protoeflags |= MAP_ENTRY_NOCOREDUMP; + if (cow & MAP_VN_WRITECOUNT) + protoeflags |= MAP_ENTRY_VN_WRITECNT; if (cow & MAP_INHERIT_SHARE) inheritance = VM_INHERIT_SHARE; else @@ -1516,6 +1531,11 @@ vm_map_simplify_entry(vm_map_t map, vm_m * references. Thus, the map lock can be kept * without causing a lock-order reversal with * the vnode lock. + * + * Since we count the number of virtual page + * mappings in object->un_pager.vnp.writemappings, + * the writemappings value should not be adjusted + * when the entry is disposed of. */ if (prev->object.vm_object) vm_object_deallocate(prev->object.vm_object); @@ -1627,6 +1647,13 @@ _vm_map_clip_start(vm_map_t map, vm_map_ if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0) { vm_object_reference(new_entry->object.vm_object); + /* + * The object->un_pager.vnp.writemappings for the + * object of MAP_ENTRY_VN_WRITECNT type entry shall be + * kept as is here. The virtual pages are + * re-distributed among the clipped entries, so the sum is + * left the same. + */ } } @@ -2900,6 +2927,7 @@ vm_map_copy_entry( vm_ooffset_t *fork_charge) { vm_object_t src_object; + vm_map_entry_t fake_entry; vm_offset_t size; struct ucred *cred; int charged; @@ -2965,6 +2993,27 @@ vm_map_copy_entry( src_entry->eflags |= (MAP_ENTRY_COW|MAP_ENTRY_NEEDS_COPY); dst_entry->eflags |= (MAP_ENTRY_COW|MAP_ENTRY_NEEDS_COPY); dst_entry->offset = src_entry->offset; + if (src_entry->eflags & MAP_ENTRY_VN_WRITECNT) { + /* + * MAP_ENTRY_VN_WRITECNT cannot + * indicate write reference from + * src_entry, since the entry is + * marked as needs copy. Allocate a + * fake entry that is used to + * decrement object->un_pager.vnp.writecount + * at the appropriate time. Attach + * fake_entry to the deferred list. + */ + fake_entry = vm_map_entry_create(dst_map); + fake_entry->eflags = MAP_ENTRY_VN_WRITECNT; + src_entry->eflags &= ~MAP_ENTRY_VN_WRITECNT; + vm_object_reference(src_object); + fake_entry->object.vm_object = src_object; + fake_entry->start = src_entry->start; + fake_entry->end = src_entry->end; + fake_entry->next = curthread->td_map_def_user; + curthread->td_map_def_user = fake_entry; + } } else { dst_entry->object.vm_object = NULL; dst_entry->offset = 0; @@ -3043,6 +3092,7 @@ vmspace_fork(struct vmspace *vm1, vm_oof vm_map_lock(old_map); if (old_map->busy) vm_map_wait_busy(old_map); + new_map = NULL; /* silence gcc */ vm2 = vmspace_alloc(old_map->min_offset, old_map->max_offset); if (vm2 == NULL) goto unlock_and_return; @@ -3122,6 +3172,16 @@ vmspace_fork(struct vmspace *vm1, vm_oof new_entry->eflags &= ~(MAP_ENTRY_USER_WIRED | MAP_ENTRY_IN_TRANSITION); new_entry->wired_count = 0; + if (new_entry->eflags & MAP_ENTRY_VN_WRITECNT) { + object = new_entry->object.vm_object; + KASSERT(((struct vnode *)object->handle)-> + v_writecount > 0, + ("vmspace_fork: v_writecount")); + KASSERT(object->un_pager.vnp.writemappings > 0, + ("vmspace_fork: vnp.writecount")); + vnode_pager_update_writecount(object, + new_entry->start, new_entry->end); + } /* * Insert the entry into the new map -- we know we're @@ -3146,8 +3206,11 @@ vmspace_fork(struct vmspace *vm1, vm_oof */ new_entry = vm_map_entry_create(new_map); *new_entry = *old_entry; + /* + * Copied entry is COW over the old object. + */ new_entry->eflags &= ~(MAP_ENTRY_USER_WIRED | - MAP_ENTRY_IN_TRANSITION); + MAP_ENTRY_IN_TRANSITION | MAP_ENTRY_VN_WRITECNT); new_entry->wired_count = 0; new_entry->object.vm_object = NULL; new_entry->cred = NULL; @@ -3161,9 +3224,15 @@ vmspace_fork(struct vmspace *vm1, vm_oof old_entry = old_entry->next; } unlock_and_return: - vm_map_unlock(old_map); + /* + * Use inlined vm_map_unlock() to postpone handling the deferred + * map entries, which cannot be done until both old_map and + * new_map locks are released. + */ + sx_xunlock(&old_map->lock); if (vm2 != NULL) - vm_map_unlock(new_map); + sx_xunlock(&new_map->lock); + vm_map_process_deferred(); return (vm2); } Modified: stable/9/sys/vm/vm_map.h ============================================================================== --- stable/9/sys/vm/vm_map.h Thu Mar 15 08:39:10 2012 (r233000) +++ stable/9/sys/vm/vm_map.h Thu Mar 15 11:06:37 2012 (r233001) @@ -139,6 +139,7 @@ struct vm_map_entry { #define MAP_ENTRY_GROWS_UP 0x2000 /* Bottom-up stacks */ #define MAP_ENTRY_WIRE_SKIPPED 0x4000 +#define MAP_ENTRY_VN_WRITECNT 0x8000 /* writeable vnode mapping */ #ifdef _KERNEL static __inline u_char @@ -315,6 +316,7 @@ long vmspace_wired_count(struct vmspace #define MAP_DISABLE_SYNCER 0x0020 #define MAP_DISABLE_COREDUMP 0x0100 #define MAP_PREFAULT_MADVISE 0x0200 /* from (user) madvise request */ +#define MAP_VN_WRITECOUNT 0x0400 #define MAP_STACK_GROWS_DOWN 0x1000 #define MAP_STACK_GROWS_UP 0x2000 #define MAP_ACC_CHARGED 0x4000 Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Thu Mar 15 08:39:10 2012 (r233000) +++ stable/9/sys/vm/vm_mmap.c Thu Mar 15 11:06:37 2012 (r233001) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef HWPMC_HOOKS #include @@ -93,7 +94,7 @@ struct sbrk_args { #endif static int vm_mmap_vnode(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, - int *, struct vnode *, vm_ooffset_t *, vm_object_t *); + int *, struct vnode *, vm_ooffset_t *, vm_object_t *, boolean_t *); static int vm_mmap_cdev(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, int *, struct cdev *, vm_ooffset_t *, vm_object_t *); static int vm_mmap_shm(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, @@ -1218,28 +1219,33 @@ sys_munlock(td, uap) /* * vm_mmap_vnode() * - * MPSAFE - * * Helper function for vm_mmap. Perform sanity check specific for mmap * operations on vnodes. + * + * For VCHR vnodes, the vnode lock is held over the call to + * vm_mmap_cdev() to keep vp->v_rdev valid. */ int vm_mmap_vnode(struct thread *td, vm_size_t objsize, vm_prot_t prot, vm_prot_t *maxprotp, int *flagsp, - struct vnode *vp, vm_ooffset_t *foffp, vm_object_t *objp) + struct vnode *vp, vm_ooffset_t *foffp, vm_object_t *objp, + boolean_t *writecounted) { struct vattr va; vm_object_t obj; vm_offset_t foff; struct mount *mp; struct ucred *cred; - int error, flags; - int vfslocked; + int error, flags, locktype, vfslocked; mp = vp->v_mount; cred = td->td_ucred; + if ((*maxprotp & VM_PROT_WRITE) && (*flagsp & MAP_SHARED)) + locktype = LK_EXCLUSIVE; + else + locktype = LK_SHARED; vfslocked = VFS_LOCK_GIANT(mp); - if ((error = vget(vp, LK_SHARED, td)) != 0) { + if ((error = vget(vp, locktype, td)) != 0) { VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -1256,8 +1262,20 @@ vm_mmap_vnode(struct thread *td, vm_size } if (obj->handle != vp) { vput(vp); - vp = (struct vnode*)obj->handle; - vget(vp, LK_SHARED, td); + vp = (struct vnode *)obj->handle; + /* + * Bypass filesystems obey the mpsafety of the + * underlying fs. + */ + error = vget(vp, locktype, td); + if (error != 0) { + VFS_UNLOCK_GIANT(vfslocked); + return (error); + } + } + if (locktype == LK_EXCLUSIVE) { + *writecounted = TRUE; + vnode_pager_update_writecount(obj, 0, objsize); } } else if (vp->v_type == VCHR) { error = vm_mmap_cdev(td, objsize, prot, maxprotp, flagsp, @@ -1293,7 +1311,7 @@ vm_mmap_vnode(struct thread *td, vm_size objsize = round_page(va.va_size); if (va.va_nlink == 0) flags |= MAP_NOSYNC; - obj = vm_pager_allocate(OBJT_VNODE, vp, objsize, prot, foff, td->td_ucred); + obj = vm_pager_allocate(OBJT_VNODE, vp, objsize, prot, foff, cred); if (obj == NULL) { error = ENOMEM; goto done; @@ -1432,6 +1450,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, int rv = KERN_SUCCESS; int docow, error; struct thread *td = curthread; + boolean_t writecounted; if (size == 0) return (0); @@ -1470,6 +1489,8 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, return (EINVAL); fitit = FALSE; } + writecounted = FALSE; + /* * Lookup/allocate object. */ @@ -1480,7 +1501,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, break; case OBJT_VNODE: error = vm_mmap_vnode(td, size, prot, &maxprot, &flags, - handle, &foff, &object); + handle, &foff, &object, &writecounted); break; case OBJT_SWAP: error = vm_mmap_shm(td, size, prot, &maxprot, &flags, @@ -1520,6 +1541,8 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, /* Shared memory is also shared with children. */ if (flags & MAP_SHARED) docow |= MAP_INHERIT_SHARE; + if (writecounted) + docow |= MAP_VN_WRITECOUNT; if (flags & MAP_STACK) rv = vm_map_stack(map, *addr, size, prot, maxprot, @@ -1537,7 +1560,12 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, * Lose the object reference. Will destroy the * object if it's an unnamed anonymous mapping * or named anonymous without other references. + * + * If this mapping was accounted for in the vnode's + * writecount, then undo that now. */ + if (writecounted) + vnode_pager_release_writecount(object, 0, size); vm_object_deallocate(object); } Modified: stable/9/sys/vm/vm_object.h ============================================================================== --- stable/9/sys/vm/vm_object.h Thu Mar 15 08:39:10 2012 (r233000) +++ stable/9/sys/vm/vm_object.h Thu Mar 15 11:06:37 2012 (r233001) @@ -112,6 +112,7 @@ struct vm_object { */ struct { off_t vnp_size; + vm_ooffset_t writemappings; } vnp; /* Modified: stable/9/sys/vm/vnode_pager.c ============================================================================== --- stable/9/sys/vm/vnode_pager.c Thu Mar 15 08:39:10 2012 (r233000) +++ stable/9/sys/vm/vnode_pager.c Thu Mar 15 11:06:37 2012 (r233001) @@ -222,6 +222,7 @@ retry: object = vm_object_allocate(OBJT_VNODE, OFF_TO_IDX(round_page(size))); object->un_pager.vnp.vnp_size = size; + object->un_pager.vnp.writemappings = 0; object->handle = handle; VI_LOCK(vp); @@ -268,10 +269,16 @@ vnode_pager_dealloc(object) wakeup(object); } ASSERT_VOP_ELOCKED(vp, "vnode_pager_dealloc"); + if (object->un_pager.vnp.writemappings > 0) { + object->un_pager.vnp.writemappings = 0; + vp->v_writecount--; + } vp->v_object = NULL; vp->v_vflag &= ~VV_TEXT; + VM_OBJECT_UNLOCK(object); while (refs-- > 0) vunref(vp); + VM_OBJECT_LOCK(object); } static boolean_t @@ -1215,3 +1222,81 @@ vnode_pager_undirty_pages(vm_page_t *ma, } VM_OBJECT_UNLOCK(obj); } + +void +vnode_pager_update_writecount(vm_object_t object, vm_offset_t start, + vm_offset_t end) +{ + struct vnode *vp; + vm_ooffset_t old_wm; + + VM_OBJECT_LOCK(object); + if (object->type != OBJT_VNODE) { + VM_OBJECT_UNLOCK(object); + return; + } + old_wm = object->un_pager.vnp.writemappings; + object->un_pager.vnp.writemappings += (vm_ooffset_t)end - start; + vp = object->handle; + if (old_wm == 0 && object->un_pager.vnp.writemappings != 0) { + ASSERT_VOP_ELOCKED(vp, "v_writecount inc"); + vp->v_writecount++; + } else if (old_wm != 0 && object->un_pager.vnp.writemappings == 0) { + ASSERT_VOP_ELOCKED(vp, "v_writecount dec"); + vp->v_writecount--; + } + VM_OBJECT_UNLOCK(object); +} + +void +vnode_pager_release_writecount(vm_object_t object, vm_offset_t start, + vm_offset_t end) +{ + struct vnode *vp; + struct mount *mp; + vm_offset_t inc; + int vfslocked; + + VM_OBJECT_LOCK(object); + + /* + * First, recheck the object type to account for the race when + * the vnode is reclaimed. + */ + if (object->type != OBJT_VNODE) { + VM_OBJECT_UNLOCK(object); + return; + } + + /* + * Optimize for the case when writemappings is not going to + * zero. + */ + inc = end - start; + if (object->un_pager.vnp.writemappings != inc) { + object->un_pager.vnp.writemappings -= inc; + VM_OBJECT_UNLOCK(object); + return; + } + + vp = object->handle; + vhold(vp); + VM_OBJECT_UNLOCK(object); + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + mp = NULL; + vn_start_write(vp, &mp, V_WAIT); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + + /* + * Decrement the object's writemappings, by swapping the start + * and end arguments for vnode_pager_update_writecount(). If + * there was not a race with vnode reclaimation, then the + * vnode's v_writecount is decremented. + */ + vnode_pager_update_writecount(object, end, start); + VOP_UNLOCK(vp, 0); + vdrop(vp); + if (mp != NULL) + vn_finished_write(mp); + VFS_UNLOCK_GIANT(vfslocked); +} Modified: stable/9/sys/vm/vnode_pager.h ============================================================================== --- stable/9/sys/vm/vnode_pager.h Thu Mar 15 08:39:10 2012 (r233000) +++ stable/9/sys/vm/vnode_pager.h Thu Mar 15 11:06:37 2012 (r233001) @@ -46,7 +46,11 @@ int vnode_pager_generic_putpages(struct int count, boolean_t sync, int *rtvals); +void vnode_pager_release_writecount(vm_object_t object, vm_offset_t start, + vm_offset_t end); void vnode_pager_undirty_pages(vm_page_t *ma, int *rtvals, int written); +void vnode_pager_update_writecount(vm_object_t object, vm_offset_t start, + vm_offset_t end); #endif /* _KERNEL */ #endif /* _VNODE_PAGER_ */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 11:49:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B8793106567A; Thu, 15 Mar 2012 11:49:26 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A43648FC14; Thu, 15 Mar 2012 11:49:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FBnQvo064105; Thu, 15 Mar 2012 11:49:26 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FBnQtT064103; Thu, 15 Mar 2012 11:49:26 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201203151149.q2FBnQtT064103@svn.freebsd.org> From: Ed Schouten Date: Thu, 15 Mar 2012 11:49: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: r233002 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 11:49:26 -0000 Author: ed Date: Thu Mar 15 11:49:26 2012 New Revision: 233002 URL: http://svn.freebsd.org/changeset/base/233002 Log: Remove impossible error condition from the man page. On FreeBSD, all processes have a process group, so it is impossible for kill(2) to fail this way. POSIX also doesn't mention this error condition. Discussed on: arch@ MFC after: 3 weeks Modified: head/lib/libc/sys/kill.2 Modified: head/lib/libc/sys/kill.2 ============================================================================== --- head/lib/libc/sys/kill.2 Thu Mar 15 11:06:37 2012 (r233001) +++ head/lib/libc/sys/kill.2 Thu Mar 15 11:49:26 2012 (r233002) @@ -28,7 +28,7 @@ .\" @(#)kill.2 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd March 10, 2012 +.Dd March 15, 2012 .Dt KILL 2 .Os .Sh NAME @@ -123,9 +123,6 @@ is not a valid signal number. .It Bq Er ESRCH No process can be found corresponding to that specified by .Fa pid . -.It Bq Er ESRCH -The process id was given as 0 -but the sending process does not have a process group. .It Bq Er EPERM The sending process is not the super-user and its effective user id does not match the effective user-id of the receiving process. From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 12:02:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FC7C1065673; Thu, 15 Mar 2012 12:02:35 +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 B2F5F8FC1F; Thu, 15 Mar 2012 12:02:34 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q2FC2SGu016896; Thu, 15 Mar 2012 14:02:28 +0200 (EET) (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.5/8.14.5) with ESMTP id q2FC2Rk8005388; Thu, 15 Mar 2012 14:02:27 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q2FC2RaO005387; Thu, 15 Mar 2012 14:02:27 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Mar 2012 14:02:27 +0200 From: Konstantin Belousov To: Ed Schouten Message-ID: <20120315120227.GR75778@deviant.kiev.zoral.com.ua> References: <201203151149.q2FBnQtT064103@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LR2EcLYOpZJmaxL8" Content-Disposition: inline In-Reply-To: <201203151149.q2FBnQtT064103@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233002 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 12:02:35 -0000 --LR2EcLYOpZJmaxL8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 15, 2012 at 11:49:26AM +0000, Ed Schouten wrote: > Author: ed > Date: Thu Mar 15 11:49:26 2012 > New Revision: 233002 > URL: http://svn.freebsd.org/changeset/base/233002 >=20 > Log: > Remove impossible error condition from the man page. > =20 > On FreeBSD, all processes have a process group, so it is impossible for > kill(2) to fail this way. POSIX also doesn't mention this error > condition. > =20 > Discussed on: arch@ > MFC after: 3 weeks >=20 > Modified: > head/lib/libc/sys/kill.2 >=20 > Modified: head/lib/libc/sys/kill.2 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/lib/libc/sys/kill.2 Thu Mar 15 11:06:37 2012 (r233001) > +++ head/lib/libc/sys/kill.2 Thu Mar 15 11:49:26 2012 (r233002) > @@ -28,7 +28,7 @@ > .\" @(#)kill.2 8.3 (Berkeley) 4/19/94 > .\" $FreeBSD$ > .\" > -.Dd March 10, 2012 > +.Dd March 15, 2012 > .Dt KILL 2 > .Os > .Sh NAME > @@ -123,9 +123,6 @@ is not a valid signal number. > .It Bq Er ESRCH > No process can be found corresponding to that specified by > .Fa pid . > -.It Bq Er ESRCH > -The process id was given as 0 > -but the sending process does not have a process group. > .It Bq Er EPERM > The sending process is not the super-user and its effective > user id does not match the effective user-id of the receiving process. As I mentioned in the thread on list, removal of ESRCH from the list of err= ors is wrong. --LR2EcLYOpZJmaxL8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9h2lMACgkQC3+MBN1Mb4ghkQCeM1fMGC8wNyR4kZDwOBrxf5HG R/AAoKk4U0kOCJZMLZ3lG+VgFbqWuU1W =AfNn -----END PGP SIGNATURE----- --LR2EcLYOpZJmaxL8-- From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 12:12:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 917BC1065672; Thu, 15 Mar 2012 12:12:40 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CDB48FC21; Thu, 15 Mar 2012 12:12:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FCCeRm064971; Thu, 15 Mar 2012 12:12:40 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FCCeF6064969; Thu, 15 Mar 2012 12:12:40 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201203151212.q2FCCeF6064969@svn.freebsd.org> From: Ed Schouten Date: Thu, 15 Mar 2012 12:12: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: r233003 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 12:12:40 -0000 Author: ed Date: Thu Mar 15 12:12:39 2012 New Revision: 233003 URL: http://svn.freebsd.org/changeset/base/233003 Log: Extend the description for ESRCH a bit. This errno can also be returned if the passed process identifier doesn't correspond with a process group. Discussed on: arch@ MFC after: 1 week Modified: head/lib/libc/sys/kill.2 Modified: head/lib/libc/sys/kill.2 ============================================================================== --- head/lib/libc/sys/kill.2 Thu Mar 15 11:49:26 2012 (r233002) +++ head/lib/libc/sys/kill.2 Thu Mar 15 12:12:39 2012 (r233003) @@ -121,7 +121,7 @@ The argument is not a valid signal number. .It Bq Er ESRCH -No process can be found corresponding to that specified by +No process or process group can be found corresponding to that specified by .Fa pid . .It Bq Er EPERM The sending process is not the super-user and its effective From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 14:13:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24431106564A; Thu, 15 Mar 2012 14:13:39 +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 E95CB8FC17; Thu, 15 Mar 2012 14:13:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FEDcON069287; Thu, 15 Mar 2012 14:13:38 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FEDcG3069284; Thu, 15 Mar 2012 14:13:38 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201203151413.q2FEDcG3069284@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 Mar 2012 14:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233004 - in head/sys: kern netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 14:13:39 -0000 Author: tuexen Date: Thu Mar 15 14:13:38 2012 New Revision: 233004 URL: http://svn.freebsd.org/changeset/base/233004 Log: Fix bugs which can result in a panic when an non-SCTP socket it used with an sctp_ system-call which expects an SCTP socket. MFC after: 3 days. Modified: head/sys/kern/uipc_syscalls.c head/sys/netinet/sctp_peeloff.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Thu Mar 15 12:12:39 2012 (r233003) +++ head/sys/kern/uipc_syscalls.c Thu Mar 15 14:13:38 2012 (r233004) @@ -2321,6 +2321,10 @@ sys_sctp_peeloff(td, uap) error = fgetsock(td, uap->sd, CAP_PEELOFF, &head, &fflag); if (error) goto done2; + if (head->so_proto->pr_protocol != IPPROTO_SCTP) { + error = EOPNOTSUPP; + goto done2; + } error = sctp_can_peel_off(head, (sctp_assoc_t)uap->name); if (error) goto done2; @@ -2443,6 +2447,10 @@ sys_sctp_generic_sendmsg (td, uap) iov[0].iov_len = uap->mlen; so = (struct socket *)fp->f_data; + if (so->so_proto->pr_protocol != IPPROTO_SCTP) { + error = EOPNOTSUPP; + goto sctp_bad; + } #ifdef MAC error = mac_socket_check_send(td->td_ucred, so); if (error) @@ -2557,6 +2565,10 @@ sys_sctp_generic_sendmsg_iov(td, uap) #endif so = (struct socket *)fp->f_data; + if (so->so_proto->pr_protocol != IPPROTO_SCTP) { + error = EOPNOTSUPP; + goto sctp_bad; + } #ifdef MAC error = mac_socket_check_send(td->td_ucred, so); if (error) @@ -2662,6 +2674,10 @@ sys_sctp_generic_recvmsg(td, uap) goto out1; so = fp->f_data; + if (so->so_proto->pr_protocol != IPPROTO_SCTP) { + error = EOPNOTSUPP; + goto out; + } #ifdef MAC error = mac_socket_check_receive(td->td_ucred, so); if (error) { Modified: head/sys/netinet/sctp_peeloff.c ============================================================================== --- head/sys/netinet/sctp_peeloff.c Thu Mar 15 12:12:39 2012 (r233003) +++ head/sys/netinet/sctp_peeloff.c Thu Mar 15 14:13:38 2012 (r233004) @@ -59,16 +59,16 @@ sctp_can_peel_off(struct socket *head, s SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EBADF); return (EBADF); } - if ((head->so_proto->pr_protocol != IPPROTO_SCTP) || - (head->so_type != SOCK_SEQPACKET)) { - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EOPNOTSUPP); - return (EOPNOTSUPP); - } inp = (struct sctp_inpcb *)head->so_pcb; if (inp == NULL) { SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EFAULT); return (EFAULT); } + if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EOPNOTSUPP); + return (EOPNOTSUPP); + } stcb = sctp_findassociation_ep_asocid(inp, assoc_id, 1); if (stcb == NULL) { SCTP_LTRACE_ERR_RET(inp, stcb, NULL, SCTP_FROM_SCTP_PEELOFF, ENOENT); From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 14:22:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A18061065676; Thu, 15 Mar 2012 14:22:06 +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 81AFE8FC21; Thu, 15 Mar 2012 14:22:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FEM6EQ069702; Thu, 15 Mar 2012 14:22:06 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FEM6aG069699; Thu, 15 Mar 2012 14:22:06 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201203151422.q2FEM6aG069699@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 Mar 2012 14:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233005 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 14:22:06 -0000 Author: tuexen Date: Thu Mar 15 14:22:05 2012 New Revision: 233005 URL: http://svn.freebsd.org/changeset/base/233005 Log: Clean up, no functional change. MFC after: 3 days. Modified: head/sys/netinet/sctp_usrreq.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Thu Mar 15 14:13:38 2012 (r233004) +++ head/sys/netinet/sctp_usrreq.c Thu Mar 15 14:22:05 2012 (r233005) @@ -451,7 +451,7 @@ sctp_abort(struct socket *so) uint32_t flags; inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { return; } sctp_must_try_again: @@ -569,7 +569,7 @@ sctp_bind(struct socket *so, struct sock return (EINVAL); } inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); return (EINVAL); } @@ -585,7 +585,7 @@ sctp_close(struct socket *so) uint32_t flags; inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) + if (inp == NULL) return; /* @@ -650,7 +650,7 @@ sctp_sendm(struct socket *so, int flags, int error; inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { if (control) { sctp_m_freem(control); control = NULL; @@ -979,7 +979,7 @@ sctp_shutdown(struct socket *so) struct sctp_inpcb *inp; inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); return (EINVAL); } @@ -1639,7 +1639,7 @@ sctp_getopt(struct socket *so, int optna return (EINVAL); } inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); return EINVAL; } @@ -3317,7 +3317,7 @@ sctp_setopt(struct socket *so, int optna return (EINVAL); } inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { SCTP_PRINTF("inp is NULL?\n"); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); return (EINVAL); @@ -5765,12 +5765,6 @@ sctp_ctloutput(struct socket *so, struct void *p; int error = 0; - inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { - /* I made the same as TCP since we are not setup? */ - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); - return (ECONNRESET); - } if (sopt->sopt_level != IPPROTO_SCTP) { /* wrong proto level... send back up to IP */ #ifdef INET6 @@ -5785,6 +5779,7 @@ sctp_ctloutput(struct socket *so, struct #endif return (error); } + inp = (struct sctp_inpcb *)so->so_pcb; optsize = sopt->sopt_valsize; if (optsize) { SCTP_MALLOC(optval, void *, optsize, SCTP_M_SOCKOPT); @@ -5828,7 +5823,7 @@ sctp_connect(struct socket *so, struct s struct sctp_tcb *stcb = NULL; inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { /* I made the same as TCP since we are not setup? */ SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); return (ECONNRESET); @@ -5988,7 +5983,7 @@ sctp_listen(struct socket *so, int backl struct sctp_inpcb *inp; inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { /* I made the same as TCP since we are not setup? */ SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); return (ECONNRESET); @@ -6152,7 +6147,7 @@ sctp_accept(struct socket *so, struct so #endif inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); return (ECONNRESET); } Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Thu Mar 15 14:13:38 2012 (r233004) +++ head/sys/netinet6/sctp6_usrreq.c Thu Mar 15 14:22:05 2012 (r233005) @@ -632,7 +632,7 @@ sctp6_abort(struct socket *so) uint32_t flags; inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL); return; } @@ -720,7 +720,7 @@ sctp6_bind(struct socket *so, struct soc int error; inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL); return (EINVAL); } @@ -960,7 +960,7 @@ sctp6_connect(struct socket *so, struct inp6 = (struct in6pcb *)so->so_pcb; inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == 0) { + if (inp == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ECONNRESET); return (ECONNRESET); /* I made the same as TCP since we are * not setup? */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 15:43:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38405106564A; Thu, 15 Mar 2012 15:43:16 +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 2384F8FC12; Thu, 15 Mar 2012 15:43:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FFhFEk072318; Thu, 15 Mar 2012 15:43:15 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FFhFEA072316; Thu, 15 Mar 2012 15:43:15 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201203151543.q2FFhFEA072316@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 15 Mar 2012 15:43:15 +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: r233006 - releng/8.3/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 15:43:16 -0000 Author: ken Date: Thu Mar 15 15:43:15 2012 New Revision: 233006 URL: http://svn.freebsd.org/changeset/base/233006 Log: Merge r232675 from head, via r232989 in stable/8: Make the mps(4) module depend on the cam module. Submitted by: Mykola Dzham Approved by: re (kib) Modified: releng/8.3/sys/dev/mps/mps_pci.c Directory Properties: releng/8.3/sys/ (props changed) Modified: releng/8.3/sys/dev/mps/mps_pci.c ============================================================================== --- releng/8.3/sys/dev/mps/mps_pci.c Thu Mar 15 14:22:05 2012 (r233005) +++ releng/8.3/sys/dev/mps/mps_pci.c Thu Mar 15 15:43:15 2012 (r233006) @@ -87,6 +87,7 @@ static driver_t mps_pci_driver = { static devclass_t mps_devclass; DRIVER_MODULE(mps, pci, mps_pci_driver, mps_devclass, 0, 0); +MODULE_DEPEND(mps, cam, 1, 1, 1); struct mps_ident { uint16_t vendor; From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 16:26:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655661065672; Thu, 15 Mar 2012 16:26:41 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F8368FC14; Thu, 15 Mar 2012 16:26:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FGQfVc073997; Thu, 15 Mar 2012 16:26:41 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FGQfuX073995; Thu, 15 Mar 2012 16:26:41 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201203151626.q2FGQfuX073995@svn.freebsd.org> From: Sean Bruno Date: Thu, 15 Mar 2012 16:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233007 - stable/9/usr.sbin/syslogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 16:26:41 -0000 Author: sbruno Date: Thu Mar 15 16:26:40 2012 New Revision: 233007 URL: http://svn.freebsd.org/changeset/base/233007 Log: MFC r232986 Update man page to present -T argument in synopsis Modified: stable/9/usr.sbin/syslogd/syslogd.8 Directory Properties: stable/9/usr.sbin/syslogd/ (props changed) Modified: stable/9/usr.sbin/syslogd/syslogd.8 ============================================================================== --- stable/9/usr.sbin/syslogd/syslogd.8 Thu Mar 15 15:43:15 2012 (r233006) +++ stable/9/usr.sbin/syslogd/syslogd.8 Thu Mar 15 16:26:40 2012 (r233007) @@ -36,7 +36,7 @@ .Nd log systems messages .Sh SYNOPSIS .Nm -.Op Fl 468ACcdkNnosuv +.Op Fl 468ACcdkNnosTuv .Op Fl a Ar allowed_peer .Op Fl b Ar bind_address .Op Fl f Ar config_file From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 16:46:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 293BC10656D3; Thu, 15 Mar 2012 16:46:00 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 130D18FC1D; Thu, 15 Mar 2012 16:46:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FGjxsD074738; Thu, 15 Mar 2012 16:45:59 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FGjxBe074736; Thu, 15 Mar 2012 16:45:59 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201203151645.q2FGjxBe074736@svn.freebsd.org> From: Sean Bruno Date: Thu, 15 Mar 2012 16:45: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: r233008 - stable/8/usr.sbin/syslogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 16:46:00 -0000 Author: sbruno Date: Thu Mar 15 16:45:59 2012 New Revision: 233008 URL: http://svn.freebsd.org/changeset/base/233008 Log: MFC r232986 Update man page to present -T argument in synopsis Modified: stable/8/usr.sbin/syslogd/syslogd.8 Directory Properties: stable/8/usr.sbin/syslogd/ (props changed) Modified: stable/8/usr.sbin/syslogd/syslogd.8 ============================================================================== --- stable/8/usr.sbin/syslogd/syslogd.8 Thu Mar 15 16:26:40 2012 (r233007) +++ stable/8/usr.sbin/syslogd/syslogd.8 Thu Mar 15 16:45:59 2012 (r233008) @@ -36,7 +36,7 @@ .Nd log systems messages .Sh SYNOPSIS .Nm -.Op Fl 468ACcdkNnosuv +.Op Fl 468ACcdkNnosTuv .Op Fl a Ar allowed_peer .Op Fl b Ar bind_address .Op Fl f Ar config_file From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 16:47:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0EC8F1065673; Thu, 15 Mar 2012 16:47:46 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED7B18FC17; Thu, 15 Mar 2012 16:47:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FGljvO074855; Thu, 15 Mar 2012 16:47:45 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FGljnQ074853; Thu, 15 Mar 2012 16:47:45 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201203151647.q2FGljnQ074853@svn.freebsd.org> From: Sean Bruno Date: Thu, 15 Mar 2012 16:47: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: r233009 - stable/7/usr.sbin/syslogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 16:47:46 -0000 Author: sbruno Date: Thu Mar 15 16:47:45 2012 New Revision: 233009 URL: http://svn.freebsd.org/changeset/base/233009 Log: MFC r232986 Update man page to present -T argument in synopsis Modified: stable/7/usr.sbin/syslogd/syslogd.8 Directory Properties: stable/7/usr.sbin/syslogd/ (props changed) Modified: stable/7/usr.sbin/syslogd/syslogd.8 ============================================================================== --- stable/7/usr.sbin/syslogd/syslogd.8 Thu Mar 15 16:45:59 2012 (r233008) +++ stable/7/usr.sbin/syslogd/syslogd.8 Thu Mar 15 16:47:45 2012 (r233009) @@ -36,7 +36,7 @@ .Nd log systems messages .Sh SYNOPSIS .Nm -.Op Fl 468ACcdkNnosuv +.Op Fl 468ACcdkNnosTuv .Op Fl a Ar allowed_peer .Op Fl b Ar bind_address .Op Fl f Ar config_file From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 17:01:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C3881065673; Thu, 15 Mar 2012 17:01:26 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1560B8FC18; Thu, 15 Mar 2012 17:01:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FH1PYE075416; Thu, 15 Mar 2012 17:01:25 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FH1PSd075414; Thu, 15 Mar 2012 17:01:25 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203151701.q2FH1PSd075414@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 15 Mar 2012 17:01:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233010 - 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: Thu, 15 Mar 2012 17:01:26 -0000 Author: pluknet Date: Thu Mar 15 17:01:25 2012 New Revision: 233010 URL: http://svn.freebsd.org/changeset/base/233010 Log: Remove TARGET_ARCH conditionals for COMPAT_FREEBSD32. Requested by: nwhitehorn Reviewed by: nwhitehorn MFC after: 1 week Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Mar 15 16:47:45 2012 (r233009) +++ head/ObsoleteFiles.inc Thu Mar 15 17:01:25 2012 (r233010) @@ -59,9 +59,7 @@ OLD_FILES+=usr/share/man/man3/archive_re usr/share/man/man3/archive_write_set_compression_none.3.gz \ usr/share/man/man3/archive_write_set_compression_program.3.gz OLD_LIBS+=usr/lib/libarchive.so.5 -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_LIBS+=usr/lib32/libarchive.so.5 -.endif # 20120113: removal of wtmpcvt(1) OLD_FILES+=usr/bin/wtmpcvt OLD_FILES+=usr/share/man/man1/wtmpcvt.1.gz @@ -74,12 +72,10 @@ OLD_FILES+=usr/lib/libodialog.a OLD_FILES+=usr/lib/libodialog.so OLD_LIBS+=usr/lib/libodialog.so.7 OLD_FILES+=usr/lib/libodialog_p.a -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libodialog.a OLD_FILES+=usr/lib32/libodialog.so OLD_LIBS+=usr/lib32/libodialog.so.7 OLD_FILES+=usr/lib32/libodialog_p.a -.endif # 20110930: sysinstall removed OLD_FILES+=usr/sbin/sysinstall OLD_FILES+=usr/share/man/man8/sysinstall.8.gz @@ -87,12 +83,10 @@ OLD_FILES+=usr/lib/libftpio.a OLD_FILES+=usr/lib/libftpio.so OLD_LIBS+=usr/lib/libftpio.so.8 OLD_FILES+=usr/lib/libftpio_p.a -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libftpio.a OLD_FILES+=usr/lib32/libftpio.so OLD_LIBS+=usr/lib32/libftpio.so.8 OLD_FILES+=usr/lib32/libftpio_p.a -.endif OLD_FILES+=usr/include/ftpio.h OLD_FILES+=usr/share/man/man3/ftpio.3.gz # 20110915: rename congestion control manpages @@ -111,7 +105,6 @@ OLD_LIBS+=usr/lib/libdwarf.so.2 OLD_LIBS+=usr/lib/libopie.so.6 OLD_LIBS+=usr/lib/librtld_db.so.1 OLD_LIBS+=usr/lib/libtacplus.so.4 -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_LIBS+=usr/lib32/libcam.so.5 OLD_LIBS+=usr/lib32/libpcap.so.7 OLD_LIBS+=usr/lib32/libufs.so.5 @@ -120,7 +113,6 @@ OLD_LIBS+=usr/lib32/libdwarf.so.2 OLD_LIBS+=usr/lib32/libopie.so.6 OLD_LIBS+=usr/lib32/librtld_db.so.1 OLD_LIBS+=usr/lib32/libtacplus.so.4 -.endif # 20110817: no more acd.4, ad.4, afd.4 and ast.4 OLD_FILES+=usr/share/man/man4/acd.4.gz OLD_FILES+=usr/share/man/man4/ad.4.gz @@ -160,17 +152,13 @@ OLD_FILES+=usr/lib/libpkg.a OLD_FILES+=usr/lib/libpkg.so OLD_LIBS+=usr/lib/libpkg.so.0 OLD_FILES+=usr/lib/libpkg_p.a -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libpkg.a OLD_FILES+=usr/lib32/libpkg.so OLD_LIBS+=usr/lib32/libpkg.so.0 OLD_FILES+=usr/lib32/libpkg_p.a -.endif # 20110517: libsbuf version bump OLD_LIBS+=lib/libsbuf.so.5 -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_LIBS+=usr/lib32/libsbuf.so.5 -.endif # 20110502: new clang import which bumps version from 2.9 to 3.0 OLD_FILES+=usr/include/clang/2.9/emmintrin.h OLD_FILES+=usr/include/clang/2.9/mm_malloc.h @@ -199,12 +187,10 @@ OLD_FILES+=usr/lib/libobjc_p.a OLD_FILES+=usr/libexec/cc1obj OLD_LIBS+=usr/lib/libobjc.so.4 OLD_DIRS+=usr/include/objc -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libobjc.a OLD_FILES+=usr/lib32/libobjc.so OLD_FILES+=usr/lib32/libobjc_p.a OLD_LIBS+=usr/lib32/libobjc.so.4 -.endif # 20110331: firmware.img created at build time OLD_FILES+=usr/share/examples/kld/firmware/fwimage/firmware.img # 20110224: sticky.8 -> sticky.7 @@ -326,9 +312,7 @@ 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" || ${TARGET_ARCH} == "powerpc64" OLD_LIBS+=usr/lib32/liblzma.so.0 -.endif # 20100511: move GCC-specific headers to /usr/include/gcc .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" OLD_FILES+=usr/include/emmintrin.h @@ -369,9 +353,7 @@ OLD_FILES+=usr/share/info/cpio.info.gz OLD_FILES+=usr/share/man/man1/gcpio.1.gz # 20100322: libz update OLD_LIBS+=lib/libz.so.5 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libz.so.5 -.endif # 20100314: removal of regexp.h OLD_FILES+=usr/include/regexp.h OLD_FILES+=usr/share/man/man3/regexp.3.gz @@ -420,9 +402,7 @@ OLD_FILES+=usr/share/man/man5/lastlog.5. OLD_FILES+=usr/share/man/man5/utmp.5.gz OLD_FILES+=usr/share/man/man5/wtmp.5.gz OLD_LIBS+=lib/libutil.so.8 -.if ${TARGET_ARCH} == "amd64" OLB_LIBS+=usr/lib32/libutil.so.8 -.endif # 20100105: new userland semaphore implementation OLD_FILES+=usr/include/sys/semaphore.h # 20100103: ntptrace(8) removed @@ -630,7 +610,6 @@ OLD_LIBS+=usr/lib/snmp_hostres.so.5 OLD_LIBS+=usr/lib/snmp_mibII.so.5 OLD_LIBS+=usr/lib/snmp_netgraph.so.5 OLD_LIBS+=usr/lib/snmp_pf.so.5 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libalias.so.6 OLD_LIBS+=usr/lib32/libarchive.so.4 OLD_LIBS+=usr/lib32/libauditd.so.4 @@ -731,7 +710,6 @@ OLD_LIBS+=usr/lib32/pam_self.so.4 OLD_LIBS+=usr/lib32/pam_ssh.so.4 OLD_LIBS+=usr/lib32/pam_tacplus.so.4 OLD_LIBS+=usr/lib32/pam_unix.so.4 -.endif # 20090718: the gdm pam.d file is no longer required. OLD_FILES+=etc/pam.d/gdm # 20090714: net_add_domain(9) renamed to domain_add(9) @@ -918,9 +896,7 @@ OLD_FILES+=usr/share/man/man8/sliplogin. OLD_FILES+=usr/share/man/man8/slstat.8.gz # 20090321: libpcap upgraded to 1.0.0 OLD_LIBS+=lib/libpcap.so.5 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libpcap.so.5 -.endif # 20090319: uscanner(4) has been removed OLD_FILES+=usr/share/man/man4/uscanner.4.gz # 20090313: k8temp(4) renamed to amdtemp(4) @@ -932,17 +908,13 @@ OLD_FILES+=usr/lib/libusb20.so OLD_FILES+=usr/lib/libusb20_p.a OLD_FILES+=usr/include/libusb20_compat01.h OLD_FILES+=usr/include/libusb20_compat10.h -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libusb20.so.1 OLD_FILES+=usr/lib32/libusb20.a OLD_FILES+=usr/lib32/libusb20.so OLD_FILES+=usr/lib32/libusb20_p.a -.endif # 20090226: libmp(3) functions renamed OLD_LIBS+=usr/lib/libmp.so.6 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libmp.so.6 -.endif # 20090223: changeover of USB stacks OLD_FILES+=usr/include/dev/usb2/include/ufm2_ioctl.h OLD_FILES+=usr/include/dev/usb2/include/urio2_ioctl.h @@ -1245,9 +1217,7 @@ OLD_LIBS+=usr/lib/libkadm5srv.so.9 OLD_LIBS+=usr/lib/libkafs5.so.9 OLD_LIBS+=usr/lib/libkrb5.so.9 OLD_LIBS+=usr/lib/libroken.so.9 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libgssapi.so.9 -.endif # 20080420: Symbol card support dropped OLD_FILES+=usr/include/dev/wi/spectrum24t_cf.h # 20080420: awi removal @@ -1274,10 +1244,8 @@ OLD_FILES+=usr/share/man/man2/kse_releas OLD_FILES+=usr/share/man/man2/kse_switchin.2.gz OLD_FILES+=usr/share/man/man2/kse_thr_interrupt.2.gz OLD_FILES+=usr/share/man/man2/kse_wakeup.2.gz -.if ${TARGET_ARCH} == "amd64" OLD_FILES+=usr/lib32/libkse.so OLD_LIBS+=usr/lib32/libkse.so.3 -.endif # 20080220: geom_lvm rename to geom_linux_lvm OLD_FILES+=usr/share/man/man4/geom_lvm.4.gz # 20080126: oldcard.4 removal @@ -1297,11 +1265,9 @@ OLD_FILES+=usr/include/sys/xrpuio.h OLD_FILES+=usr/lib/libkse.a OLD_FILES+=usr/lib/libkse_p.a OLD_FILES+=usr/lib/libkse_pic.a -.if ${TARGET_ARCH} == "amd64" OLD_FILES+=usr/lib32/libkse.a OLD_FILES+=usr/lib32/libkse_p.a OLD_FILES+=usr/lib32/libkse_pic.a -.endif # 20071129: Removed a Solaris compatibility header OLD_FILES+=usr/include/sys/_elf_solaris.h # 20071125: Renamed to pmc_get_msr() @@ -1401,12 +1367,10 @@ OLD_DIRS+=usr/include/netatm/ipatm OLD_DIRS+=usr/include/netatm/uni OLD_DIRS+=usr/include/netatm OLD_DIRS+=usr/share/examples/atm -.if ${TARGET_ARCH} == "amd64" OLD_FILES+=usr/lib32/libatm.a OLD_FILES+=usr/lib32/libatm.so OLD_LIBS+=usr/lib32/libatm.so.5 OLD_FILES+=usr/lib32/libatm_p.a -.endif # 20070705: I4B headers repo-copied to include/i4b/ .if ${TARGET_ARCH} == "i386" OLD_FILES+=usr/include/machine/i4b_cause.h @@ -1491,7 +1455,6 @@ OLD_LIBS+=usr/lib/snmp_hostres.so.4 OLD_LIBS+=usr/lib/snmp_mibII.so.4 OLD_LIBS+=usr/lib/snmp_netgraph.so.4 OLD_LIBS+=usr/lib/snmp_pf.so.4 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libalias.so.5 OLD_LIBS+=usr/lib32/libbsnmp.so.3 OLD_LIBS+=usr/lib32/libdialog.so.5 @@ -1526,7 +1489,6 @@ OLD_LIBS+=usr/lib32/pam_self.so.3 OLD_LIBS+=usr/lib32/pam_ssh.so.3 OLD_LIBS+=usr/lib32/pam_tacplus.so.3 OLD_LIBS+=usr/lib32/pam_unix.so.3 -.endif # 20070613: IPX over IP tunnel removal OLD_FILES+=usr/include/netipx/ipx_ip.h # 20070605: sched_core removal @@ -1596,7 +1558,6 @@ OLD_LIBS+=usr/lib/libwrap.so.4 OLD_LIBS+=usr/lib/libypclnt.so.2 OLD_LIBS+=usr/lib/snmp_bridge.so.3 OLD_LIBS+=usr/lib/snmp_hostres.so.3 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libatm.so.4 OLD_LIBS+=usr/lib32/libbegemot.so.2 OLD_LIBS+=usr/lib32/libbluetooth.so.2 @@ -1655,7 +1616,6 @@ OLD_LIBS+=usr/lib32/libvgl.so.4 OLD_LIBS+=usr/lib32/libwrap.so.4 OLD_LIBS+=usr/lib32/libypclnt.so.2 OLD_LIBS+=usr/lib32/libz.so.3 -.endif # 20070519: GCC 4.2 OLD_FILES+=usr/bin/f77 OLD_FILES+=usr/bin/protoize @@ -1902,9 +1862,7 @@ OLD_FILES+=usr/bin/uuidgen OLD_FILES+=usr/share/info/bzip2.info.gz # 20070303: libarchive 2.0 OLD_LIBS+=usr/lib/libarchive.so.3 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libarchive.so.3 -.endif # 20070301: remove addr2ascii and ascii2addr OLD_FILES+=usr/share/man/man3/addr2ascii.3.gz OLD_FILES+=usr/share/man/man3/ascii2addr.3.gz @@ -1921,14 +1879,12 @@ OLD_FILES+=usr/lib/libmytinfo_p.a OLD_FILES+=usr/lib/libmytinfow.a OLD_FILES+=usr/lib/libmytinfow.so OLD_FILES+=usr/lib/libmytinfow_p.a -.if ${TARGET_ARCH} == "amd64" OLD_FILES+=usr/lib32/libmytinfo.a OLD_FILES+=usr/lib32/libmytinfo.so OLD_FILES+=usr/lib32/libmytinfo_p.a OLD_FILES+=usr/lib32/libmytinfow.a OLD_FILES+=usr/lib32/libmytinfow.so OLD_FILES+=usr/lib32/libmytinfow_p.a -.endif # 20070128: remove vnconfig OLD_FILES+=usr/sbin/vnconfig # 20070127: remove bpf_compat.h @@ -5272,40 +5228,32 @@ OLD_LIBS+=usr/lib/libkadm5srv.so.8 OLD_LIBS+=usr/lib/libkafs5.so.8 OLD_LIBS+=usr/lib/libkrb5.so.8 OLD_LIBS+=usr/lib/libobjc.so.2 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libgssapi.so.8 OLD_LIBS+=usr/lib32/libobjc.so.2 -.endif # 20070519: GCC 4.2 OLD_LIBS+=usr/lib/libg2c.a OLD_LIBS+=usr/lib/libg2c.so OLD_LIBS+=usr/lib/libg2c.so.2 OLD_LIBS+=usr/lib/libg2c_p.a OLD_LIBS+=usr/lib/libgcc_pic.a -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libg2c.a OLD_LIBS+=usr/lib32/libg2c.so OLD_LIBS+=usr/lib32/libg2c.so.2 OLD_LIBS+=usr/lib32/libg2c_p.a OLD_LIBS+=usr/lib32/libgcc_pic.a -.endif # 20060729: OpenSSL 0.9.7e -> 0.9.8b upgrade OLD_LIBS+=lib/libcrypto.so.4 OLD_LIBS+=usr/lib/libssl.so.4 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libcrypto.so.4 OLD_LIBS+=usr/lib32/libssl.so.4 -.endif # 20060521: gethostbyaddr(3) ABI change OLD_LIBS+=usr/lib/libroken.so.8 OLD_LIBS+=lib/libatm.so.3 OLD_LIBS+=lib/libc.so.6 OLD_LIBS+=lib/libutil.so.5 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libatm.so.3 OLD_LIBS+=usr/lib32/libc.so.6 OLD_LIBS+=usr/lib32/libutil.so.5 -.endif # 20060413: shared library moved to /usr/lib OLD_LIBS+=lib/libgpib.so.1 # 20060413: libpcap.so.4 moved to /lib/ @@ -5319,12 +5267,10 @@ OLD_LIBS+=usr/lib/libc_r.a OLD_LIBS+=usr/lib/libc_r.so OLD_LIBS+=usr/lib/libc_r.so.7 OLD_LIBS+=usr/lib/libc_r_p.a -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libc_r.a OLD_LIBS+=usr/lib32/libc_r.so OLD_LIBS+=usr/lib32/libc_r.so.7 OLD_LIBS+=usr/lib32/libc_r_p.a -.endif # 20050722: bump for 6.0-RELEASE OLD_LIBS+=lib/libalias.so.4 OLD_LIBS+=lib/libatm.so.2 @@ -5536,10 +5482,8 @@ OLD_LIBS+=usr/lib/libc_r.so.3 OLD_LIBS+=usr/lib/libarchive.so.2 OLD_LIBS+=usr/lib/libbsnmp.so.1 OLD_LIBS+=usr/lib/libc_r.so.6 -.if ${TARGET_ARCH} == "amd64" OLD_LIBS+=usr/lib32/libarchive.so.2 OLD_LIBS+=usr/lib32/libc_r.so.6 -.endif OLD_LIBS+=usr/lib/libcipher.so.2 OLD_LIBS+=usr/lib/libgssapi.so.6 OLD_LIBS+=usr/lib/libkse.so.1 From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 17:13:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD244106564A; Thu, 15 Mar 2012 17:13:12 +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 AC6228FC14; Thu, 15 Mar 2012 17:13:12 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 631A646B2D; Thu, 15 Mar 2012 13:13:12 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CC7E7B91A; Thu, 15 Mar 2012 13:13:11 -0400 (EDT) From: John Baldwin To: Adrian Chadd Date: Thu, 15 Mar 2012 13:09:26 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203132029.q2DKT4L6061308@svn.freebsd.org> <201203141724.15398.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203151309.26634.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 15 Mar 2012 13:13:11 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232938 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 17:13:13 -0000 On Wednesday, March 14, 2012 6:36:45 pm Adrian Chadd wrote: > On 14 March 2012 14:24, John Baldwin wrote: > > >> +MODULE_DEPEND(zfsctrl, acl_nfs4, 1, 1, 1); > >> +MODULE_DEPEND(zfsctrl, acl_posix1e, 1, 1, 1); > > > > Eh, I thought ZFS only needs nfs4 and not posix1e? I think only UFS needs > > both of these. > > I was being overly cautious. If that's the case, I can remove posix1e. When I looked at this before, ZFS only required nfs4. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 18:00:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98A06106566B for ; Thu, 15 Mar 2012 18:00:01 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) by mx1.freebsd.org (Postfix) with ESMTP id 502798FC14 for ; Thu, 15 Mar 2012 18:00:01 +0000 (UTC) Received: from uucp by gromit.grondar.org with local-rmail (Exim 4.76 (FreeBSD)) (envelope-from ) id 1S8EGY-0009hx-83 for svn-src-all@freebsd.org; Thu, 15 Mar 2012 17:15:06 +0000 Received: from localhost ([127.0.0.1] helo=groundzero.grondar.org) by groundzero.grondar.org with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1S8EEX-000ChD-39; Thu, 15 Mar 2012 17:13:01 +0000 To: Dimitry Andric In-reply-to: <201203131839.q2DIdvLm057155@svn.freebsd.org> References: <201203131839.q2DIdvLm057155@svn.freebsd.org> From: Mark Murray Date: Thu, 15 Mar 2012 17:13:01 +0000 Message-Id: Cc: svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232930 - in stable/9: lib/libsm lib/libthread_db lib/libz libexec/mail.local libexec/smrsh sbin/fsdb share/mk sys/boot/i386/boot0 sys/boot/i386/boot2 sys/boot/i386/btx/btx sys/boot/i38... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 18:00:01 -0000 Dimitry Andric writes: > Author: dim > Date: Tue Mar 13 18:39:57 2012 > New Revision: 232930 > URL: http://svn.freebsd.org/changeset/base/232930 > > Log: > MFC r232263: > > Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to > get rid of testing explicitly for clang (using ${CC:T:Mclang}) in > individual Makefiles. > > Instead, use the following extra macros, for use with clang: > - NO_WERROR.clang (disables -Werror) > - NO_WCAST_ALIGN.clang (disables -Wcast-align) > - NO_WFORMAT.clang (disables -Wformat and friends) > - CLANG_NO_IAS (disables integrated assembler) > - CLANG_OPT_SMALL (adds flags for extra small size optimizations) > > As a side effect, this enables setting CC/CXX/CPP in src.conf instead of > make.conf! For clang, use the following: > > CC=3Dclang > CXX=3Dclang++ > CPP=3Dclang-cpp Most excellent! Will you please update (make|src).conf, build(7) and UPDATING as appropriate? Thanks! M -- Mark R V Murray Pi: 132511160 From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 19:36:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6470106566C; Thu, 15 Mar 2012 19:36:52 +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 C4E208FC19; Thu, 15 Mar 2012 19:36:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FJaqJO080485; Thu, 15 Mar 2012 19:36:52 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FJaqTr080483; Thu, 15 Mar 2012 19:36:52 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201203151936.q2FJaqTr080483@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 15 Mar 2012 19:36: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: r233011 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 19:36:52 -0000 Author: nwhitehorn Date: Thu Mar 15 19:36:52 2012 New Revision: 233011 URL: http://svn.freebsd.org/changeset/base/233011 Log: Improve algorithm for deciding whether to loop through all process pages or look them up individually in pmap_remove() and apply the same logic in the other ranged operation (pmap_protect). This speeds up make installworld by a factor of 2 on powerpc64. MFC after: 1 week Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Mar 15 17:01:25 2012 (r233010) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Mar 15 19:36:52 2012 (r233011) @@ -1909,16 +1909,51 @@ moea64_pinit0(mmu_t mmu, pmap_t pm) /* * Set the physical protection on the specified range of this map as requested. */ +static void +moea64_pvo_protect(mmu_t mmu, pmap_t pm, struct pvo_entry *pvo, vm_prot_t prot) +{ + uintptr_t pt; + + /* + * Grab the PTE pointer before we diddle with the cached PTE + * copy. + */ + LOCK_TABLE(); + pt = MOEA64_PVO_TO_PTE(mmu, pvo); + + /* + * Change the protection of the page. + */ + pvo->pvo_pte.lpte.pte_lo &= ~LPTE_PP; + pvo->pvo_pte.lpte.pte_lo |= LPTE_BR; + pvo->pvo_pte.lpte.pte_lo &= ~LPTE_NOEXEC; + if ((prot & VM_PROT_EXECUTE) == 0) + pvo->pvo_pte.lpte.pte_lo |= LPTE_NOEXEC; + + /* + * If the PVO is in the page table, update that pte as well. + */ + if (pt != -1) { + MOEA64_PTE_CHANGE(mmu, pt, &pvo->pvo_pte.lpte, + pvo->pvo_vpn); + if ((pvo->pvo_pte.lpte.pte_lo & + (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) { + moea64_syncicache(mmu, pm, PVO_VADDR(pvo), + pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN, + PAGE_SIZE); + } + } + UNLOCK_TABLE(); +} + void moea64_protect(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) { - struct pvo_entry *pvo; - uintptr_t pt; - - CTR4(KTR_PMAP, "moea64_protect: pm=%p sva=%#x eva=%#x prot=%#x", pm, sva, - eva, prot); + struct pvo_entry *pvo, *tpvo; + CTR4(KTR_PMAP, "moea64_protect: pm=%p sva=%#x eva=%#x prot=%#x", pm, + sva, eva, prot); KASSERT(pm == &curproc->p_vmspace->vm_pmap || pm == kernel_pmap, ("moea64_protect: non current pmap")); @@ -1930,41 +1965,18 @@ moea64_protect(mmu_t mmu, pmap_t pm, vm_ vm_page_lock_queues(); PMAP_LOCK(pm); - for (; sva < eva; sva += PAGE_SIZE) { - pvo = moea64_pvo_find_va(pm, sva); - if (pvo == NULL) - continue; - - /* - * Grab the PTE pointer before we diddle with the cached PTE - * copy. - */ - LOCK_TABLE(); - pt = MOEA64_PVO_TO_PTE(mmu, pvo); - - /* - * Change the protection of the page. - */ - pvo->pvo_pte.lpte.pte_lo &= ~LPTE_PP; - pvo->pvo_pte.lpte.pte_lo |= LPTE_BR; - pvo->pvo_pte.lpte.pte_lo &= ~LPTE_NOEXEC; - if ((prot & VM_PROT_EXECUTE) == 0) - pvo->pvo_pte.lpte.pte_lo |= LPTE_NOEXEC; - - /* - * If the PVO is in the page table, update that pte as well. - */ - if (pt != -1) { - MOEA64_PTE_CHANGE(mmu, pt, &pvo->pvo_pte.lpte, - pvo->pvo_vpn); - if ((pvo->pvo_pte.lpte.pte_lo & - (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) { - moea64_syncicache(mmu, pm, sva, - pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN, - PAGE_SIZE); - } + if ((eva - sva)/PAGE_SIZE < pm->pm_stats.resident_count) { + for (; sva < eva; sva += PAGE_SIZE) { + pvo = moea64_pvo_find_va(pm, sva); + if (pvo != NULL) + moea64_pvo_protect(mmu, pm, pvo, prot); + } + } else { + LIST_FOREACH_SAFE(pvo, &pm->pmap_pvo, pvo_plink, tpvo) { + if (PVO_VADDR(pvo) < sva || PVO_VADDR(pvo) >= eva) + continue; + moea64_pvo_protect(mmu, pm, pvo, prot); } - UNLOCK_TABLE(); } vm_page_unlock_queues(); PMAP_UNLOCK(pm); @@ -2041,9 +2053,15 @@ moea64_remove(mmu_t mmu, pmap_t pm, vm_o { struct pvo_entry *pvo, *tpvo; + /* + * Perform an unsynchronized read. This is, however, safe. + */ + if (pm->pm_stats.resident_count == 0) + return; + vm_page_lock_queues(); PMAP_LOCK(pm); - if ((eva - sva)/PAGE_SIZE < 10) { + if ((eva - sva)/PAGE_SIZE < pm->pm_stats.resident_count) { for (; sva < eva; sva += PAGE_SIZE) { pvo = moea64_pvo_find_va(pm, sva); if (pvo != NULL) From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 21:19:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 474AF1065674; Thu, 15 Mar 2012 21:19:51 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36F278FC15; Thu, 15 Mar 2012 21:19:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FLJpX7083808; Thu, 15 Mar 2012 21:19:51 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FLJpUR083806; Thu, 15 Mar 2012 21:19:51 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201203152119.q2FLJpUR083806@svn.freebsd.org> From: Ed Schouten Date: Thu, 15 Mar 2012 21:19: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: r233012 - head/lib/libc/compat-43 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 21:19:51 -0000 Author: ed Date: Thu Mar 15 21:19:50 2012 New Revision: 233012 URL: http://svn.freebsd.org/changeset/base/233012 Log: Remove non-existing error condition. Just like kill(2), it is impossible for killpg(0, ...) to fail with ESRCH, as a process always has a process group. Discussed on: arch@ MFC after: 1 week Modified: head/lib/libc/compat-43/killpg.2 Modified: head/lib/libc/compat-43/killpg.2 ============================================================================== --- head/lib/libc/compat-43/killpg.2 Thu Mar 15 19:36:52 2012 (r233011) +++ head/lib/libc/compat-43/killpg.2 Thu Mar 15 21:19:50 2012 (r233012) @@ -28,7 +28,7 @@ .\" @(#)killpg.2 8.1 (Berkeley) 6/2/93 .\" $FreeBSD$ .\" -.Dd October 10, 2006 +.Dd March 15, 2012 .Dt KILLPG 2 .Os .Sh NAME @@ -79,9 +79,6 @@ is not a valid signal number. .It Bq Er ESRCH No process can be found in the process group specified by .Fa pgrp . -.It Bq Er ESRCH -The process group was given as 0 -but the sending process does not have a process group. .It Bq Er EPERM The sending process is not the super-user and one or more of the target processes has an effective user ID different from that From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 21:48:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02B92106564A; Thu, 15 Mar 2012 21:48:28 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6A368FC08; Thu, 15 Mar 2012 21:48:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FLmRV3084694; Thu, 15 Mar 2012 21:48:27 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FLmRHQ084692; Thu, 15 Mar 2012 21:48:27 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201203152148.q2FLmRHQ084692@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 15 Mar 2012 21:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233013 - head/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 21:48:28 -0000 Author: raj Date: Thu Mar 15 21:48:27 2012 New Revision: 233013 URL: http://svn.freebsd.org/changeset/base/233013 Log: Fix error check. Submitted by: Lukasz Plachno Obtained from: Semihalf Modified: head/sys/arm/mv/common.c Modified: head/sys/arm/mv/common.c ============================================================================== --- head/sys/arm/mv/common.c Thu Mar 15 21:19:50 2012 (r233012) +++ head/sys/arm/mv/common.c Thu Mar 15 21:48:27 2012 (r233013) @@ -1766,7 +1766,7 @@ win_cpu_from_dt(void) if (fdt_is_compatible(node, "mrvl,cesa-sram")) goto moveon; - if ((node = OF_finddevice("/")) != -1) + if ((node = OF_finddevice("/")) == -1) return (ENXIO); if ((node = fdt_find_compatible(node, "mrvl,cesa-sram", 0)) == 0) From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 22:08:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E4B2106566C; Thu, 15 Mar 2012 22:08:26 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CAF18FC0C; Thu, 15 Mar 2012 22:08:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FM8QO0085415; Thu, 15 Mar 2012 22:08:26 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FM8Q6s085413; Thu, 15 Mar 2012 22:08:26 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201203152208.q2FM8Q6s085413@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 15 Mar 2012 22:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233014 - in stable/9/sys: arm/mv i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 22:08:26 -0000 Author: raj Date: Thu Mar 15 22:08:25 2012 New Revision: 233014 URL: http://svn.freebsd.org/changeset/base/233014 Log: MFC r232512: Remove unused #defines. All this is now retrieved from the device tree. Modified: stable/9/sys/arm/mv/mvreg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/arm/mv/mvreg.h ============================================================================== --- stable/9/sys/arm/mv/mvreg.h Thu Mar 15 21:48:27 2012 (r233013) +++ stable/9/sys/arm/mv/mvreg.h Thu Mar 15 22:08:25 2012 (r233014) @@ -34,132 +34,6 @@ #ifndef _MVREG_H_ #define _MVREG_H_ -/* - * Interrupt sources - */ -#if defined(SOC_MV_ORION) - -#define MV_INT_BRIDGE 0 /* AHB-MBus Bridge Interrupt */ -#define MV_INT_UART0 3 /* UART0 Interrupt */ -#define MV_INT_UART1 4 -#define MV_INT_GPIO7_0 6 /* GPIO[7:0] Interrupt */ -#define MV_INT_GPIO15_8 7 /* GPIO[15:8] Interrupt */ -#define MV_INT_GPIO23_16 8 /* GPIO[23:16] Interrupt */ -#define MV_INT_GPIO31_24 9 /* GPIO[31:24] Interrupt */ -#define MV_INT_PEX0_ERR 10 /* PCI Express Error */ -#define MV_INT_PEX0 11 /* PCI Express INTA,B,C,D Message */ -#define MV_INT_PCI_ERR 15 /* PCI Error */ -#define MV_INT_USB_BERR 16 /* USB Bridge Error */ -#define MV_INT_USB_CI 17 /* USB Controller interrupt */ -#define MV_INT_GBERX 18 /* GbE receive interrupt */ -#define MV_INT_GBETX 19 /* GbE transmit interrupt */ -#define MV_INT_GBEMISC 20 /* GbE misc. interrupt */ -#define MV_INT_GBESUM 21 /* GbE summary interrupt */ -#define MV_INT_GBEERR 22 /* GbE error interrupt */ -#define MV_INT_IDMA_ERR 23 /* DMA error interrupt */ -#define MV_INT_IDMA0 24 /* IDMA chan. 0 completion interrupt */ -#define MV_INT_IDMA1 25 /* IDMA chan. 1 completion interrupt */ -#define MV_INT_IDMA2 26 /* IDMA chan. 2 completion interrupt */ -#define MV_INT_IDMA3 27 /* IDMA chan. 3 completion interrupt */ -#define MV_INT_SATA 29 /* Serial-ATA Interrupt */ - -#elif defined(SOC_MV_KIRKWOOD) - -#define MV_INT_BRIDGE 1 /* AHB-MBus Bridge Interrupt */ -#define MV_INT_XOR0_CHAN0 5 /* XOR engine 0 channel 0 Interrupt */ -#define MV_INT_XOR0_CHAN1 6 /* XOR engine 0 channel 1 Interrupt */ -#define MV_INT_XOR1_CHAN0 7 /* XOR engine 1 channel 0 Interrupt */ -#define MV_INT_XOR1_CHAN1 8 /* XOR engine 1 channel 1 Interrupt */ -#define MV_INT_PEX0 9 /* PCI Express INTA,B,C,D Message */ -#define MV_INT_GBESUM 11 /* GbE0 summary interrupt */ -#define MV_INT_GBERX 12 /* GbE0 receive interrupt */ -#define MV_INT_GBETX 13 /* GbE0 transmit interrupt */ -#define MV_INT_GBEMISC 14 /* GbE0 misc. interrupt */ -#define MV_INT_GBE1SUM 15 /* GbE1 summary interrupt */ -#define MV_INT_GBE1RX 16 /* GbE1 receive interrupt */ -#define MV_INT_GBE1TX 17 /* GbE1 transmit interrupt */ -#define MV_INT_GBE1MISC 18 /* GbE1 misc. interrupt */ -#define MV_INT_USB_CI 19 /* USB Controller interrupt */ -#define MV_INT_SATA 21 /* Serial-ATA Interrupt */ -#define MV_INT_CESA 22 /* Security engine completion int. */ -#define MV_INT_IDMA_ERR 23 /* DMA error interrupt */ -#define MV_INT_UART0 33 /* UART0 Interrupt */ -#define MV_INT_UART1 34 -#define MV_INT_GPIO7_0 35 /* GPIO[7:0] Interrupt */ -#define MV_INT_GPIO15_8 36 /* GPIO[15:8] Interrupt */ -#define MV_INT_GPIO23_16 37 /* GPIO[23:16] Interrupt */ -#define MV_INT_GPIO31_24 38 /* GPIO[31:24] Interrupt */ -#define MV_INT_GPIOHI7_0 39 /* GPIOHI[7:0] Interrupt */ -#define MV_INT_GPIOHI15_8 40 /* GPIOHI[15:8] Interrupt */ -#define MV_INT_GPIOHI23_16 41 /* GPIOHI[23:16] Interrupt */ -#define MV_INT_XOR0_ERR 42 /* XOR engine 0 error Interrupt */ -#define MV_INT_XOR1_ERR 43 /* XOR engine 1 error Interrupt */ -#define MV_INT_PEX0_ERR 44 /* PCI Express Error */ -#define MV_INT_GBEERR 46 /* GbE0 error interrupt */ -#define MV_INT_GBE1ERR 47 /* GbE1 error interrupt */ -#define MV_INT_USB_BERR 48 /* USB Bridge Error */ - -#elif defined(SOC_MV_DISCOVERY) - -#define MV_INT_ERRSUM 0 /* Summary of error interrupts */ -#define MV_INT_SPI 1 /* SPI interrupt */ -#define MV_INT_TWSI0 2 /* TWSI0 interrupt */ -#define MV_INT_TWSI1 3 /* TWSI1 interrupt */ -#define MV_INT_IDMA0 4 /* IDMA Channel0 completion */ -#define MV_INT_IDMA1 5 /* IDMA Channel0 completion */ -#define MV_INT_IDMA2 6 /* IDMA Channel0 completion */ -#define MV_INT_IDMA3 7 /* IDMA Channel0 completion */ -#define MV_INT_TIMER0 8 /* Timer0 interrupt */ -#define MV_INT_TIMER1 9 /* Timer1 interrupt */ -#define MV_INT_TIMER2 10 /* Timer2 interrupt */ -#define MV_INT_TIMER3 11 /* Timer3 interrupt */ -#define MV_INT_UART0 12 /* UART0 interrupt */ -#define MV_INT_UART1 13 /* UART1 interrupt */ -#define MV_INT_UART2 14 /* UART2 interrupt */ -#define MV_INT_UART3 15 /* UART3 interrupt */ -#define MV_INT_USB0 16 /* USB0 interrupt */ -#define MV_INT_USB1 17 /* USB1 interrupt */ -#define MV_INT_USB2 18 /* USB2 interrupt */ -#define MV_INT_CESA 19 /* Crypto engine completion interrupt */ -#define MV_INT_XOR0 22 /* XOR engine 0 completion interrupt */ -#define MV_INT_XOR1 23 /* XOR engine 1 completion interrupt */ -#define MV_INT_SATA 26 /* SATA interrupt */ -#define MV_INT_PEX00 32 /* PCI Express port 0.0 INTA/B/C/D */ -#define MV_INT_PEX01 33 /* PCI Express port 0.1 INTA/B/C/D */ -#define MV_INT_PEX02 34 /* PCI Express port 0.2 INTA/B/C/D */ -#define MV_INT_PEX03 35 /* PCI Express port 0.3 INTA/B/C/D */ -#define MV_INT_PEX10 36 /* PCI Express port 1.0 INTA/B/C/D */ -#define MV_INT_PEX11 37 /* PCI Express port 1.1 INTA/B/C/D */ -#define MV_INT_PEX12 38 /* PCI Express port 1.2 INTA/B/C/D */ -#define MV_INT_PEX13 39 /* PCI Express port 1.3 INTA/B/C/D */ -#define MV_INT_GBESUM 40 /* Gigabit Ethernet Port 0 summary */ -#define MV_INT_GBERX 41 /* Gigabit Ethernet Port 0 Rx summary */ -#define MV_INT_GBETX 42 /* Gigabit Ethernet Port 0 Tx summary */ -#define MV_INT_GBEMISC 43 /* Gigabit Ethernet Port 0 Misc summ. */ -#define MV_INT_GBE1SUM 44 /* Gigabit Ethernet Port 1 summary */ -#define MV_INT_GBE1RX 45 /* Gigabit Ethernet Port 1 Rx summary */ -#define MV_INT_GBE1TX 46 /* Gigabit Ethernet Port 1 Tx summary */ -#define MV_INT_GBE1MISC 47 /* Gigabit Ethernet Port 1 Misc summ. */ -#define MV_INT_GPIO7_0 56 /* GPIO[7:0] Interrupt */ -#define MV_INT_GPIO15_8 57 /* GPIO[15:8] Interrupt */ -#define MV_INT_GPIO23_16 58 /* GPIO[23:16] Interrupt */ -#define MV_INT_GPIO31_24 59 /* GPIO[31:24] Interrupt */ -#define MV_INT_DB_IN 60 /* Inbound Doorbell Cause reg Summary */ -#define MV_INT_DB_OUT 61 /* Outbound Doorbell Cause reg Summ. */ -#define MV_INT_CRYPT_ERR 64 /* Crypto engine error */ -#define MV_INT_DEV_ERR 65 /* Device bus error */ -#define MV_INT_IDMA_ERR 66 /* DMA error */ -#define MV_INT_CPU_ERR 67 /* CPU error */ -#define MV_INT_PEX0_ERR 68 /* PCI-Express port0 error */ -#define MV_INT_PEX1_ERR 69 /* PCI-Express port1 error */ -#define MV_INT_GBE_ERR 70 /* Gigabit Ethernet error */ -#define MV_INT_USB_ERR 72 /* USB error */ -#define MV_INT_DRAM_ERR 73 /* DRAM ECC error */ -#define MV_INT_XOR_ERR 74 /* XOR engine error */ -#define MV_INT_WD 79 /* WD Timer interrupt */ - -#endif /* SOC_MV_ORION */ - #define BRIDGE_IRQ_CAUSE 0x10 #define BRIGDE_IRQ_MASK 0x14 From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 22:15:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A5CEA106564A; Thu, 15 Mar 2012 22:15:07 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92B068FC12; Thu, 15 Mar 2012 22:15:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FMF7KY085693; Thu, 15 Mar 2012 22:15:07 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FMF72O085684; Thu, 15 Mar 2012 22:15:07 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201203152215.q2FMF72O085684@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 15 Mar 2012 22:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233015 - in stable/9/sys: boot/fdt/dts dev/fdt dev/mge dev/tsec i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 22:15:07 -0000 Author: raj Date: Thu Mar 15 22:15:06 2012 New Revision: 233015 URL: http://svn.freebsd.org/changeset/base/233015 Log: MFC r232518: Respect phy-handle property in Ethernet nodes of the device tree. This lets specify whereabouts of the parent PHY for a given MAC node (and get rid of ugly kludges in mge(4) and tsec(4)). Obtained from: Semihalf Modified: stable/9/sys/boot/fdt/dts/db78100.dts stable/9/sys/dev/fdt/fdt_common.c stable/9/sys/dev/fdt/fdt_common.h stable/9/sys/dev/mge/if_mge.c stable/9/sys/dev/mge/if_mgevar.h stable/9/sys/dev/tsec/if_tsec.c stable/9/sys/dev/tsec/if_tsec.h stable/9/sys/dev/tsec/if_tsec_fdt.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/boot/fdt/dts/db78100.dts ============================================================================== --- stable/9/sys/boot/fdt/dts/db78100.dts Thu Mar 15 22:08:25 2012 (r233014) +++ stable/9/sys/boot/fdt/dts/db78100.dts Thu Mar 15 22:15:06 2012 (r233015) @@ -221,6 +221,9 @@ phy0: ethernet-phy@0 { reg = <0x8>; }; + phy1: ethernet-phy@1 { + reg = <0x9>; + }; }; }; @@ -234,17 +237,7 @@ local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <45 46 47 44 70>; interrupt-parent = <&PIC>; - phy-handle = <&phy0>; - - mdio@0 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "mrvl,mdio"; - - phy0: ethernet-phy@0 { - reg = <0x9>; - }; - }; + phy-handle = <&phy1>; }; serial0: serial@12000 { Modified: stable/9/sys/dev/fdt/fdt_common.c ============================================================================== --- stable/9/sys/dev/fdt/fdt_common.c Thu Mar 15 22:08:25 2012 (r233014) +++ stable/9/sys/dev/fdt/fdt_common.c Thu Mar 15 22:15:06 2012 (r233015) @@ -542,11 +542,13 @@ out: } int -fdt_get_phyaddr(phandle_t node, int *phy_addr) +fdt_get_phyaddr(phandle_t node, device_t dev, int *phy_addr, void **phy_sc) { phandle_t phy_node; ihandle_t phy_ihandle; pcell_t phy_handle, phy_reg; + uint32_t i; + device_t parent, child; if (OF_getprop(node, "phy-handle", (void *)&phy_handle, sizeof(phy_handle)) <= 0) @@ -561,6 +563,47 @@ fdt_get_phyaddr(phandle_t node, int *phy return (ENXIO); *phy_addr = fdt32_to_cpu(phy_reg); + + /* + * Search for softc used to communicate with phy. + */ + + /* + * Step 1: Search for ancestor of the phy-node with a "phy-handle" + * property set. + */ + phy_node = OF_parent(phy_node); + while (phy_node != 0) { + if (OF_getprop(phy_node, "phy-handle", (void *)&phy_handle, + sizeof(phy_handle)) > 0) + break; + phy_node = OF_parent(phy_node); + } + if (phy_node == 0) + return (ENXIO); + + /* + * Step 2: For each device with the same parent and name as ours + * compare its node with the one found in step 1, ancestor of phy + * node (stored in phy_node). + */ + parent = device_get_parent(dev); + i = 0; + child = device_find_child(parent, device_get_name(dev), i); + while (child != NULL) { + if (ofw_bus_get_node(child) == phy_node) + break; + i++; + child = device_find_child(parent, device_get_name(dev), i); + } + if (child == NULL) + return (ENXIO); + + /* + * Use softc of the device found. + */ + *phy_sc = (void *)device_get_softc(child); + return (0); } Modified: stable/9/sys/dev/fdt/fdt_common.h ============================================================================== --- stable/9/sys/dev/fdt/fdt_common.h Thu Mar 15 22:08:25 2012 (r233014) +++ stable/9/sys/dev/fdt/fdt_common.h Thu Mar 15 22:15:06 2012 (r233015) @@ -89,7 +89,7 @@ int fdt_data_to_res(pcell_t *, int, int, int fdt_data_verify(void *, int); phandle_t fdt_find_compatible(phandle_t, const char *, int); int fdt_get_mem_regions(struct mem_region *, int *, uint32_t *); -int fdt_get_phyaddr(phandle_t node, int *); +int fdt_get_phyaddr(phandle_t, device_t, int *, void **); int fdt_immr_addr(vm_offset_t); int fdt_regsize(phandle_t, u_long *, u_long *); int fdt_intr_decode(phandle_t, pcell_t *, int *, int *, int *); Modified: stable/9/sys/dev/mge/if_mge.c ============================================================================== --- stable/9/sys/dev/mge/if_mge.c Thu Mar 15 22:08:25 2012 (r233014) +++ stable/9/sys/dev/mge/if_mge.c Thu Mar 15 22:15:06 2012 (r233015) @@ -79,9 +79,6 @@ __FBSDID("$FreeBSD$"); #include "miibus_if.h" -/* PHY registers are in the address space of the first mge unit */ -static struct mge_softc *sc_mge0 = NULL; - static int mge_probe(device_t dev); static int mge_attach(device_t dev); static int mge_detach(device_t dev); @@ -635,14 +632,11 @@ mge_attach(device_t dev) sc->dev = dev; sc->node = ofw_bus_get_node(dev); - if (device_get_unit(dev) == 0) - sc_mge0 = sc; - /* Set chip version-dependent parameters */ mge_ver_params(sc); - /* Get phy address from fdt */ - if (fdt_get_phyaddr(sc->node, &phy) != 0) + /* Get phy address and used softc from fdt */ + if (fdt_get_phyaddr(sc->node, sc->dev, &phy, (void **)&sc->phy_sc) != 0) return (ENXIO); /* Initialize mutexes */ @@ -1294,17 +1288,18 @@ mge_miibus_readreg(device_t dev, int phy sc = device_get_softc(dev); - MGE_WRITE(sc_mge0, MGE_REG_SMI, 0x1fffffff & + MGE_WRITE(sc->phy_sc, MGE_REG_SMI, 0x1fffffff & (MGE_SMI_READ | (reg << 21) | (phy << 16))); retries = MGE_SMI_READ_RETRIES; - while (--retries && !(MGE_READ(sc_mge0, MGE_REG_SMI) & MGE_SMI_READVALID)) + while (--retries && + !(MGE_READ(sc->phy_sc, MGE_REG_SMI) & MGE_SMI_READVALID)) DELAY(MGE_SMI_READ_DELAY); if (retries == 0) device_printf(dev, "Timeout while reading from PHY\n"); - return (MGE_READ(sc_mge0, MGE_REG_SMI) & 0xffff); + return (MGE_READ(sc->phy_sc, MGE_REG_SMI) & 0xffff); } static int @@ -1315,11 +1310,11 @@ mge_miibus_writereg(device_t dev, int ph sc = device_get_softc(dev); - MGE_WRITE(sc_mge0, MGE_REG_SMI, 0x1fffffff & + MGE_WRITE(sc->phy_sc, MGE_REG_SMI, 0x1fffffff & (MGE_SMI_WRITE | (reg << 21) | (phy << 16) | (value & 0xffff))); retries = MGE_SMI_WRITE_RETRIES; - while (--retries && MGE_READ(sc_mge0, MGE_REG_SMI) & MGE_SMI_BUSY) + while (--retries && MGE_READ(sc->phy_sc, MGE_REG_SMI) & MGE_SMI_BUSY) DELAY(MGE_SMI_WRITE_DELAY); if (retries == 0) Modified: stable/9/sys/dev/mge/if_mgevar.h ============================================================================== --- stable/9/sys/dev/mge/if_mgevar.h Thu Mar 15 22:08:25 2012 (r233014) +++ stable/9/sys/dev/mge/if_mgevar.h Thu Mar 15 22:15:06 2012 (r233015) @@ -103,6 +103,8 @@ struct mge_softc { uint32_t mge_tx_tok_cnt; uint16_t mge_mtu; int mge_ver; + + struct mge_softc *phy_sc; }; Modified: stable/9/sys/dev/tsec/if_tsec.c ============================================================================== --- stable/9/sys/dev/tsec/if_tsec.c Thu Mar 15 22:08:25 2012 (r233014) +++ stable/9/sys/dev/tsec/if_tsec.c Thu Mar 15 22:15:06 2012 (r233015) @@ -106,8 +106,6 @@ static void tsec_offload_process_frame(s static void tsec_setup_multicast(struct tsec_softc *sc); static int tsec_set_mtu(struct tsec_softc *sc, unsigned int mtu); -struct tsec_softc *tsec0_sc = NULL; /* XXX ugly hack! */ - devclass_t tsec_devclass; DRIVER_MODULE(miibus, tsec, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(tsec, ether, 1, 1, 1); @@ -407,14 +405,14 @@ tsec_init_locked(struct tsec_softc *sc) TSEC_WRITE(sc, TSEC_REG_TBIPA, 5); /* Step 6: Reset the management interface */ - TSEC_WRITE(tsec0_sc, TSEC_REG_MIIMCFG, TSEC_MIIMCFG_RESETMGMT); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMCFG, TSEC_MIIMCFG_RESETMGMT); /* Step 7: Setup the MII Mgmt clock speed */ - TSEC_WRITE(tsec0_sc, TSEC_REG_MIIMCFG, TSEC_MIIMCFG_CLKDIV28); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMCFG, TSEC_MIIMCFG_CLKDIV28); /* Step 8: Read MII Mgmt indicator register and check for Busy = 0 */ timeout = TSEC_READ_RETRY; - while (--timeout && (TSEC_READ(tsec0_sc, TSEC_REG_MIIMIND) & + while (--timeout && (TSEC_READ(sc->phy_sc, TSEC_REG_MIIMIND) & TSEC_MIIMIND_BUSY)) DELAY(TSEC_READ_DELAY); if (timeout == 0) { @@ -1562,21 +1560,21 @@ tsec_miibus_readreg(device_t dev, int ph struct tsec_softc *sc; uint32_t timeout; - sc = tsec0_sc; + sc = device_get_softc(dev); - TSEC_WRITE(sc, TSEC_REG_MIIMADD, (phy << 8) | reg); - TSEC_WRITE(sc, TSEC_REG_MIIMCOM, 0); - TSEC_WRITE(sc, TSEC_REG_MIIMCOM, TSEC_MIIMCOM_READCYCLE); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMADD, (phy << 8) | reg); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMCOM, 0); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMCOM, TSEC_MIIMCOM_READCYCLE); timeout = TSEC_READ_RETRY; - while (--timeout && TSEC_READ(sc, TSEC_REG_MIIMIND) & + while (--timeout && TSEC_READ(sc->phy_sc, TSEC_REG_MIIMIND) & (TSEC_MIIMIND_NOTVALID | TSEC_MIIMIND_BUSY)) DELAY(TSEC_READ_DELAY); if (timeout == 0) device_printf(dev, "Timeout while reading from PHY!\n"); - return (TSEC_READ(sc, TSEC_REG_MIIMSTAT)); + return (TSEC_READ(sc->phy_sc, TSEC_REG_MIIMSTAT)); } int @@ -1585,13 +1583,13 @@ tsec_miibus_writereg(device_t dev, int p struct tsec_softc *sc; uint32_t timeout; - sc = tsec0_sc; + sc = device_get_softc(dev); - TSEC_WRITE(sc, TSEC_REG_MIIMADD, (phy << 8) | reg); - TSEC_WRITE(sc, TSEC_REG_MIIMCON, value); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMADD, (phy << 8) | reg); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMCON, value); timeout = TSEC_READ_RETRY; - while (--timeout && (TSEC_READ(sc, TSEC_REG_MIIMIND) & + while (--timeout && (TSEC_READ(sc->phy_sc, TSEC_REG_MIIMIND) & TSEC_MIIMIND_BUSY)) DELAY(TSEC_READ_DELAY); Modified: stable/9/sys/dev/tsec/if_tsec.h ============================================================================== --- stable/9/sys/dev/tsec/if_tsec.h Thu Mar 15 22:08:25 2012 (r233014) +++ stable/9/sys/dev/tsec/if_tsec.h Thu Mar 15 22:15:06 2012 (r233015) @@ -133,6 +133,7 @@ struct tsec_softc { struct mbuf *frame; int phyaddr; + struct tsec_softc *phy_sc; }; /* interface to get/put generic objects */ Modified: stable/9/sys/dev/tsec/if_tsec_fdt.c ============================================================================== --- stable/9/sys/dev/tsec/if_tsec_fdt.c Thu Mar 15 22:08:25 2012 (r233014) +++ stable/9/sys/dev/tsec/if_tsec_fdt.c Thu Mar 15 22:15:06 2012 (r233015) @@ -68,8 +68,6 @@ __FBSDID("$FreeBSD$"); #define TSEC_RID_RXIRQ 1 #define TSEC_RID_ERRIRQ 2 -extern struct tsec_softc *tsec0_sc; - static int tsec_fdt_probe(device_t dev); static int tsec_fdt_attach(device_t dev); static int tsec_fdt_detach(device_t dev); @@ -156,12 +154,9 @@ tsec_fdt_attach(device_t dev) sc->dev = dev; sc->node = ofw_bus_get_node(dev); - /* XXX add comment on weird FSL's MII registers access design */ - if (device_get_unit(dev) == 0) - tsec0_sc = sc; - /* Get phy address from fdt */ - if (fdt_get_phyaddr(sc->node, &sc->phyaddr) != 0) + if (fdt_get_phyaddr(sc->node, sc->dev, &sc->phyaddr, + (void **)&sc->phy_sc) != 0) return (ENXIO); /* Init timer */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 22:18:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E169A106564A; Thu, 15 Mar 2012 22:18:46 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh4.mail.rice.edu (mh4.mail.rice.edu [128.42.199.11]) by mx1.freebsd.org (Postfix) with ESMTP id B7B258FC12; Thu, 15 Mar 2012 22:18:46 +0000 (UTC) Received: from mh4.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh4.mail.rice.edu (Postfix) with ESMTP id ECB60291CD9; Thu, 15 Mar 2012 17:18:39 -0500 (CDT) Received: from mh4.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh4.mail.rice.edu (Postfix) with ESMTP id DD96F2975F3; Thu, 15 Mar 2012 17:18:39 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh4.mail.rice.edu, auth channel Received: from mh4.mail.rice.edu ([127.0.0.1]) by mh4.mail.rice.edu (mh4.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id C5wD6dUPEQdW; Thu, 15 Mar 2012 17:18:39 -0500 (CDT) Received: from [10.74.20.46] (staff-74-dun20-046.rice.edu [10.74.20.46]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh4.mail.rice.edu (Postfix) with ESMTPSA id A3588291CD0; Thu, 15 Mar 2012 17:18:39 -0500 (CDT) Message-ID: <4F626AB8.3090509@rice.edu> Date: Thu, 15 Mar 2012 17:18:32 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Nathan Whitehorn References: <201203151936.q2FJaqTr080483@svn.freebsd.org> In-Reply-To: <201203151936.q2FJaqTr080483@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233011 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 22:18:47 -0000 On 3/15/2012 2:36 PM, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Thu Mar 15 19:36:52 2012 > New Revision: 233011 > URL: http://svn.freebsd.org/changeset/base/233011 > > Log: > Improve algorithm for deciding whether to loop through all process pages > or look them up individually in pmap_remove() and apply the same logic > in the other ranged operation (pmap_protect). This speeds up make > installworld by a factor of 2 on powerpc64. > > MFC after: 1 week > > Modified: > head/sys/powerpc/aim/mmu_oea64.c > As an additional, related optimization, you should look into implementing pmap_remove_pages(). Alan From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 22:50:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 784DF106564A; Thu, 15 Mar 2012 22:50:49 +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 677E38FC08; Thu, 15 Mar 2012 22:50:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FMonbc086869; Thu, 15 Mar 2012 22:50:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FMomSt086867; Thu, 15 Mar 2012 22:50:48 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201203152250.q2FMomSt086867@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 15 Mar 2012 22:50:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233017 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 22:50:49 -0000 Author: nwhitehorn Date: Thu Mar 15 22:50:48 2012 New Revision: 233017 URL: http://svn.freebsd.org/changeset/base/233017 Log: Implement pmap_remove_pages(). This will be added later to the 32-bit MMU module. Suggested by: alc Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Mar 15 22:28:18 2012 (r233016) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Mar 15 22:50:48 2012 (r233017) @@ -308,6 +308,7 @@ void moea64_qenter(mmu_t, vm_offset_t, v void moea64_qremove(mmu_t, vm_offset_t, int); void moea64_release(mmu_t, pmap_t); void moea64_remove(mmu_t, pmap_t, vm_offset_t, vm_offset_t); +void moea64_remove_pages(mmu_t, pmap_t); void moea64_remove_all(mmu_t, vm_page_t); void moea64_remove_write(mmu_t, vm_page_t); void moea64_zero_page(mmu_t, vm_page_t); @@ -350,6 +351,7 @@ static mmu_method_t moea64_methods[] = { MMUMETHOD(mmu_qremove, moea64_qremove), MMUMETHOD(mmu_release, moea64_release), MMUMETHOD(mmu_remove, moea64_remove), + MMUMETHOD(mmu_remove_pages, moea64_remove_pages), MMUMETHOD(mmu_remove_all, moea64_remove_all), MMUMETHOD(mmu_remove_write, moea64_remove_write), MMUMETHOD(mmu_sync_icache, moea64_sync_icache), @@ -2046,6 +2048,22 @@ moea64_release(mmu_t mmu, pmap_t pmap) } /* + * Remove all pages mapped by the specified pmap + */ +void +moea64_remove_pages(mmu_t mmu, pmap_t pm) +{ + struct pvo_entry *pvo, *tpvo; + + vm_page_lock_queues(); + PMAP_LOCK(pm); + LIST_FOREACH_SAFE(pvo, &pm->pmap_pvo, pvo_plink, tpvo) + moea64_pvo_remove(mmu, pvo); + vm_page_unlock_queues(); + PMAP_UNLOCK(pm); +} + +/* * Remove the given range of addresses from the specified map. */ void From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 22:53:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1253106566C; Thu, 15 Mar 2012 22:53:40 +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 8F85D8FC0A; Thu, 15 Mar 2012 22:53:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FMregu086995; Thu, 15 Mar 2012 22:53:40 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FMreAK086987; Thu, 15 Mar 2012 22:53:40 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201203152253.q2FMreAK086987@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 15 Mar 2012 22:53: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: r233018 - in head/sys: dev/ofw dev/pcf powerpc/ofw sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 22:53:40 -0000 Author: nwhitehorn Date: Thu Mar 15 22:53:39 2012 New Revision: 233018 URL: http://svn.freebsd.org/changeset/base/233018 Log: Make ofw_bus_get_node() consistently return -1 when there is no associated OF node, instead of a random mixture of 0 and -1. Update all checks for 0 to check for -1 instead. MFC after: 4 weeks Modified: head/sys/dev/ofw/ofw_bus_if.m head/sys/dev/ofw/ofw_bus_subr.c head/sys/dev/ofw/ofw_iicbus.c head/sys/dev/pcf/pcf_ebus.c head/sys/powerpc/ofw/ofw_pcib_pci.c head/sys/powerpc/ofw/ofw_pcibus.c head/sys/sparc64/pci/ofw_pcibus.c Modified: head/sys/dev/ofw/ofw_bus_if.m ============================================================================== --- head/sys/dev/ofw/ofw_bus_if.m Thu Mar 15 22:50:48 2012 (r233017) +++ head/sys/dev/ofw/ofw_bus_if.m Thu Mar 15 22:53:39 2012 (r233018) @@ -89,7 +89,7 @@ CODE { ofw_bus_default_get_node(device_t bus, device_t dev) { - return (0); + return (-1); } static const char * Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Thu Mar 15 22:50:48 2012 (r233017) +++ head/sys/dev/ofw/ofw_bus_subr.c Thu Mar 15 22:53:39 2012 (r233018) @@ -157,7 +157,7 @@ ofw_bus_is_compatible(device_t dev, cons if ((compat = ofw_bus_get_compat(dev)) == NULL) return (0); - if ((node = ofw_bus_get_node(dev)) == 0) + if ((node = ofw_bus_get_node(dev)) == -1) return (0); /* Get total 'compatible' prop len */ Modified: head/sys/dev/ofw/ofw_iicbus.c ============================================================================== --- head/sys/dev/ofw/ofw_iicbus.c Thu Mar 15 22:50:48 2012 (r233017) +++ head/sys/dev/ofw/ofw_iicbus.c Thu Mar 15 22:53:39 2012 (r233018) @@ -88,7 +88,7 @@ static int ofw_iicbus_probe(device_t dev) { - if (ofw_bus_get_node(dev) == 0) + if (ofw_bus_get_node(dev) == -1) return (ENXIO); device_set_desc(dev, "OFW I2C bus"); Modified: head/sys/dev/pcf/pcf_ebus.c ============================================================================== --- head/sys/dev/pcf/pcf_ebus.c Thu Mar 15 22:50:48 2012 (r233017) +++ head/sys/dev/pcf/pcf_ebus.c Thu Mar 15 22:53:39 2012 (r233018) @@ -147,7 +147,7 @@ pcf_ebus_attach(device_t dev) mtx_init(&sc->pcf_lock, device_get_nameunit(dev), "pcf", MTX_DEF); /* get OFW node of the pcf */ - if ((node = ofw_bus_get_node(dev)) <= 0) { + if ((node = ofw_bus_get_node(dev)) == -1) { device_printf(dev, "cannot get OFW node\n"); goto error; } Modified: head/sys/powerpc/ofw/ofw_pcib_pci.c ============================================================================== --- head/sys/powerpc/ofw/ofw_pcib_pci.c Thu Mar 15 22:50:48 2012 (r233017) +++ head/sys/powerpc/ofw/ofw_pcib_pci.c Thu Mar 15 22:53:39 2012 (r233018) @@ -93,7 +93,7 @@ ofw_pcib_pci_probe(device_t dev) return (ENXIO); } - if (ofw_bus_get_node(dev) == 0) + if (ofw_bus_get_node(dev) == -1) return (ENXIO); device_set_desc(dev, "OFW PCI-PCI bridge"); Modified: head/sys/powerpc/ofw/ofw_pcibus.c ============================================================================== --- head/sys/powerpc/ofw/ofw_pcibus.c Thu Mar 15 22:50:48 2012 (r233017) +++ head/sys/powerpc/ofw/ofw_pcibus.c Thu Mar 15 22:53:39 2012 (r233018) @@ -105,7 +105,7 @@ static int ofw_pcibus_probe(device_t dev) { - if (ofw_bus_get_node(dev) == 0) + if (ofw_bus_get_node(dev) == -1) return (ENXIO); device_set_desc(dev, "OFW PCI bus"); Modified: head/sys/sparc64/pci/ofw_pcibus.c ============================================================================== --- head/sys/sparc64/pci/ofw_pcibus.c Thu Mar 15 22:50:48 2012 (r233017) +++ head/sys/sparc64/pci/ofw_pcibus.c Thu Mar 15 22:53:39 2012 (r233018) @@ -111,7 +111,7 @@ static int ofw_pcibus_probe(device_t dev) { - if (ofw_bus_get_node(dev) == 0) + if (ofw_bus_get_node(dev) == -1) return (ENXIO); device_set_desc(dev, "OFW PCI bus"); From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 22:56:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D02C1065674; Thu, 15 Mar 2012 22:56:05 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211]) by mx1.freebsd.org (Postfix) with ESMTP id 605298FC1C; Thu, 15 Mar 2012 22:56:05 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M0Y00C007PAR700@smtpauth2.wiscmail.wisc.edu>; Thu, 15 Mar 2012 17:55:58 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.64.26]) by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M0Y00C127P9PJ00@smtpauth2.wiscmail.wisc.edu>; Thu, 15 Mar 2012 17:55:58 -0500 (CDT) Date: Thu, 15 Mar 2012 17:55:56 -0500 From: Nathan Whitehorn In-reply-to: <4F626AB8.3090509@rice.edu> To: Alan Cox Message-id: <4F62737C.7060100@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.64.26 X-Spam-PmxInfo: Server=avs-14, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.15.224514, SenderIP=76.210.64.26 References: <201203151936.q2FJaqTr080483@svn.freebsd.org> <4F626AB8.3090509@rice.edu> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120311 Thunderbird/10.0.2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233011 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 22:56:05 -0000 On 03/15/12 17:18, Alan Cox wrote: > On 3/15/2012 2:36 PM, Nathan Whitehorn wrote: >> Author: nwhitehorn >> Date: Thu Mar 15 19:36:52 2012 >> New Revision: 233011 >> URL: http://svn.freebsd.org/changeset/base/233011 >> >> Log: >> Improve algorithm for deciding whether to loop through all process >> pages >> or look them up individually in pmap_remove() and apply the same >> logic >> in the other ranged operation (pmap_protect). This speeds up make >> installworld by a factor of 2 on powerpc64. >> >> MFC after: 1 week >> >> Modified: >> head/sys/powerpc/aim/mmu_oea64.c >> > > As an additional, related optimization, you should look into > implementing pmap_remove_pages(). > > Alan > Thanks! I didn't know about that one. Is there a reason it isn't called at the end of vm_pageout_map_deactivate_pages(), which seems to deactivate all pages with pmap_remove()? -Nathan From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 22:56:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E4A4106578A for ; Thu, 15 Mar 2012 22:56:18 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta12.emeryville.ca.mail.comcast.net (qmta12.emeryville.ca.mail.comcast.net [76.96.27.227]) by mx1.freebsd.org (Postfix) with ESMTP id 0370F8FC12 for ; Thu, 15 Mar 2012 22:56:17 +0000 (UTC) Received: from omta10.emeryville.ca.mail.comcast.net ([76.96.30.28]) by qmta12.emeryville.ca.mail.comcast.net with comcast id lyqM1i0060cQ2SLACywH0S; Thu, 15 Mar 2012 22:56:17 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta10.emeryville.ca.mail.comcast.net with comcast id lywG1i00Q4NgCEG8WywGus; Thu, 15 Mar 2012 22:56:17 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q2FMuExR025035; Thu, 15 Mar 2012 16:56:14 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Ed Schouten In-Reply-To: <201203141622.q2EGM9HR021407@svn.freebsd.org> References: <201203141622.q2EGM9HR021407@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Thu, 15 Mar 2012 16:56:14 -0600 Message-ID: <1331852174.8403.12.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r232977 - in head: etc sbin/init X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 22:56:18 -0000 On Wed, 2012-03-14 at 16:22 +0000, Ed Schouten wrote: > Author: ed > Date: Wed Mar 14 16:22:09 2012 > New Revision: 232977 > URL: http://svn.freebsd.org/changeset/base/232977 > > Log: > Make init(8) slightly more robust when /dev/console is missing. > > If the environment doesn't offer a working /dev/console, the existing > version of init(8) will simply refuse running rc(8) scripts. This means > you'll only have a system running init(8) and nothing else. > > Change the code to do the following: > > - Open /dev/console like we used to do, but make it more robust to use > O_NONBLOCK to prevent blocking on a carrier. > - If this fails, use /dev/null as stdin and /var/log/init.log as stdout > and stderr. Given that the /var filesystem is mounted (and with readonly root, actually created) by an rc script run by init, does this make sense? Maybe it makes sense only within a jail, but not when running as pid 1? > - If even this fails, use /dev/null as stdin, stdout and stderr. > > So why us this useful? Well, if you remove the `getpid() == 1' check in > main(), you can now use init(8) inside jails to properly execute rc(8). > It still requires some polishing, as existing tools assume init(8) has > PID 1. Not just existing tools, but 3rd party software is likely to contain this assumption (I know some of ours does). The manpage for init contains examples of using a hard-coded 1. Would it be practical for any reference to pid 1 to get somehow magically redirected inside a jail to the pid of an init process running within that jail? That's just a pure blue-sky idea that popped into my head; I know almost nothing about jails (their implementation or how to use them). > > Also it is now possible to use use init(8) on `headless' devices that > don't even have a serial boot console. -- Ian From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 23:40:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83E481065670; Thu, 15 Mar 2012 23:40:36 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh8.mail.rice.edu (mh8.mail.rice.edu [128.42.201.24]) by mx1.freebsd.org (Postfix) with ESMTP id 5856B8FC0A; Thu, 15 Mar 2012 23:40:36 +0000 (UTC) Received: from mh8.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh8.mail.rice.edu (Postfix) with ESMTP id 62B9D291D71; Thu, 15 Mar 2012 18:40:30 -0500 (CDT) Received: from mh8.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh8.mail.rice.edu (Postfix) with ESMTP id 4AA0B297626; Thu, 15 Mar 2012 18:40:30 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh8.mail.rice.edu, auth channel Received: from mh8.mail.rice.edu ([127.0.0.1]) by mh8.mail.rice.edu (mh8.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id dpLyk9dWX8uV; Thu, 15 Mar 2012 18:40:30 -0500 (CDT) Received: from [10.74.20.46] (staff-74-dun20-046.rice.edu [10.74.20.46]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh8.mail.rice.edu (Postfix) with ESMTPSA id D565B291D70; Thu, 15 Mar 2012 18:40:29 -0500 (CDT) Message-ID: <4F627DE6.1000602@rice.edu> Date: Thu, 15 Mar 2012 18:40:22 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Nathan Whitehorn References: <201203151936.q2FJaqTr080483@svn.freebsd.org> <4F626AB8.3090509@rice.edu> <4F62737C.7060100@freebsd.org> In-Reply-To: <4F62737C.7060100@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233011 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 23:40:36 -0000 On 3/15/2012 5:55 PM, Nathan Whitehorn wrote: > On 03/15/12 17:18, Alan Cox wrote: >> On 3/15/2012 2:36 PM, Nathan Whitehorn wrote: >>> Author: nwhitehorn >>> Date: Thu Mar 15 19:36:52 2012 >>> New Revision: 233011 >>> URL: http://svn.freebsd.org/changeset/base/233011 >>> >>> Log: >>> Improve algorithm for deciding whether to loop through all >>> process pages >>> or look them up individually in pmap_remove() and apply the same >>> logic >>> in the other ranged operation (pmap_protect). This speeds up make >>> installworld by a factor of 2 on powerpc64. >>> >>> MFC after: 1 week >>> >>> Modified: >>> head/sys/powerpc/aim/mmu_oea64.c >>> >> >> As an additional, related optimization, you should look into >> implementing pmap_remove_pages(). >> >> Alan >> > > Thanks! I didn't know about that one. Is there a reason it isn't > called at the end of vm_pageout_map_deactivate_pages(), which seems to > deactivate all pages with pmap_remove()? Yes, at least two reasons come to mind. Some implementations only accept the caller's current pmap as an argument. Also, there shouldn't be any other threads besides the caller using the pmap. From owner-svn-src-all@FreeBSD.ORG Thu Mar 15 23:53:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB954106566B; Thu, 15 Mar 2012 23:53:24 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 919EF8FC12; Thu, 15 Mar 2012 23:53:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2FNrOwY090088; Thu, 15 Mar 2012 23:53:24 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2FNrOia090086; Thu, 15 Mar 2012 23:53:24 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203152353.q2FNrOia090086@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Thu, 15 Mar 2012 23:53:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233019 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 23:53:24 -0000 Author: gonzo Date: Thu Mar 15 23:53:24 2012 New Revision: 233019 URL: http://svn.freebsd.org/changeset/base/233019 Log: Clean-up fake preload data generator: - Use macros to push scalar values - Fix type mismatch for module size Modified: head/sys/mips/mips/machdep.c Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Thu Mar 15 22:53:39 2012 (r233018) +++ head/sys/mips/mips/machdep.c Thu Mar 15 23:53:24 2012 (r233019) @@ -384,46 +384,41 @@ mips_postboot_fixup(void) caddr_t preload_ptr = (caddr_t)&fake_preload[0]; size_t size = 0; +#define PRELOAD_PUSH_VALUE(type, value) do { \ + *(type *)(preload_ptr + size) = (value); \ + size += sizeof(type); \ +} while (0); + /* * Provide kernel module file information */ - *(uint32_t*)(preload_ptr + size) = MODINFO_NAME; - size += sizeof(uint32_t); - *(uint32_t*)(preload_ptr + size) = strlen("kernel") + 1; - size += sizeof(uint32_t); + PRELOAD_PUSH_VALUE(uint32_t, MODINFO_NAME); + PRELOAD_PUSH_VALUE(uint32_t, strlen("kernel") + 1); strcpy((char*)(preload_ptr + size), "kernel"); size += strlen("kernel") + 1; size = roundup(size, sizeof(u_long)); - *(uint32_t*)(preload_ptr + size) = MODINFO_TYPE; - size += sizeof(uint32_t); - *(uint32_t*)(preload_ptr + size) = strlen("elf kernel") + 1; - size += sizeof(uint32_t); + PRELOAD_PUSH_VALUE(uint32_t, MODINFO_TYPE); + PRELOAD_PUSH_VALUE(uint32_t, strlen("elf kernel") + 1); strcpy((char*)(preload_ptr + size), "elf kernel"); size += strlen("elf kernel") + 1; size = roundup(size, sizeof(u_long)); - *(uint32_t*)(preload_ptr + size) = MODINFO_ADDR; - size += sizeof(uint32_t); - *(uint32_t*)(preload_ptr + size) = sizeof(vm_offset_t); - size += sizeof(uint32_t); - *(vm_offset_t*)(preload_ptr + size) = KERNLOADADDR; - size += sizeof(vm_offset_t); + PRELOAD_PUSH_VALUE(uint32_t, MODINFO_ADDR); + PRELOAD_PUSH_VALUE(uint32_t, sizeof(vm_offset_t)); + PRELOAD_PUSH_VALUE(vm_offset_t, KERNLOADADDR); size = roundup(size, sizeof(u_long)); - *(uint32_t*)(preload_ptr + size) = MODINFO_SIZE; - size += sizeof(uint32_t); - *(uint32_t*)(preload_ptr + size) = sizeof(size_t); - size += sizeof(uint32_t); - *(vm_offset_t*)(preload_ptr + size) = (size_t)&end - KERNLOADADDR; + PRELOAD_PUSH_VALUE(uint32_t, MODINFO_SIZE); + PRELOAD_PUSH_VALUE(uint32_t, sizeof(size_t)); + PRELOAD_PUSH_VALUE(size_t, (size_t)&end - KERNLOADADDR); size = roundup(size, sizeof(u_long)); - size += sizeof(size_t); /* End marker */ - *(uint32_t*)(preload_ptr + size) = 0; - size += sizeof(uint32_t); - *(uint32_t*)(preload_ptr + size) = 0; - size += sizeof(uint32_t); + PRELOAD_PUSH_VALUE(uint32_t, 0); + PRELOAD_PUSH_VALUE(uint32_t, 0); + +#undef PRELOAD_PUSH_VALUE KASSERT((size < sizeof(fake_preload)), ("fake preload size is more thenallocated")); From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 00:12:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E9718106564A; Fri, 16 Mar 2012 00:12:40 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id 81ADB8FC0A; Fri, 16 Mar 2012 00:12:40 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M0Y00I00B939300@smtpauth1.wiscmail.wisc.edu>; Thu, 15 Mar 2012 19:12:39 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.64.26]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M0Y00211B92IF30@smtpauth1.wiscmail.wisc.edu>; Thu, 15 Mar 2012 19:12:39 -0500 (CDT) Date: Thu, 15 Mar 2012 19:12:38 -0500 From: Nathan Whitehorn In-reply-to: <4F627DE6.1000602@rice.edu> To: Alan Cox Message-id: <4F628576.6010802@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.64.26 X-Spam-PmxInfo: Server=avs-15, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.16.315, SenderIP=76.210.64.26 References: <201203151936.q2FJaqTr080483@svn.freebsd.org> <4F626AB8.3090509@rice.edu> <4F62737C.7060100@freebsd.org> <4F627DE6.1000602@rice.edu> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120311 Thunderbird/10.0.2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233011 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 00:12:41 -0000 On 03/15/12 18:40, Alan Cox wrote: > On 3/15/2012 5:55 PM, Nathan Whitehorn wrote: >> On 03/15/12 17:18, Alan Cox wrote: >>> On 3/15/2012 2:36 PM, Nathan Whitehorn wrote: >>>> Author: nwhitehorn >>>> Date: Thu Mar 15 19:36:52 2012 >>>> New Revision: 233011 >>>> URL: http://svn.freebsd.org/changeset/base/233011 >>>> >>>> Log: >>>> Improve algorithm for deciding whether to loop through all >>>> process pages >>>> or look them up individually in pmap_remove() and apply the same >>>> logic >>>> in the other ranged operation (pmap_protect). This speeds up make >>>> installworld by a factor of 2 on powerpc64. >>>> >>>> MFC after: 1 week >>>> >>>> Modified: >>>> head/sys/powerpc/aim/mmu_oea64.c >>>> >>> >>> As an additional, related optimization, you should look into >>> implementing pmap_remove_pages(). >>> >>> Alan >>> >> >> Thanks! I didn't know about that one. Is there a reason it isn't >> called at the end of vm_pageout_map_deactivate_pages(), which seems >> to deactivate all pages with pmap_remove()? > > Yes, at least two reasons come to mind. Some implementations only > accept the caller's current pmap as an argument. Also, there > shouldn't be any other threads besides the caller using the pmap. > > OK, makes sense (though the PPC implementation doesn't have the needs-to-be-the-current-PMAP restriction). One more question while we're discussing this. I looked through the various PMAP functions, and found three more that aren't implemented: - pmap_copy() The man page for this one says "Actually implementing it may seriously reduce system performance." Is this true? Is there any point to implementing it if it would be no faster than repeatedly calling pmap_copy_page()? - pmap_object_init_pt() This one looks an important potential optimization. - pmap_align_superpage() PowerPC/AIM mostly only supports superpages in 256 MB regions, where all pages within that region must be superpages, and pages not in marked regions cannot be. Is there any way to usefully implement this in the context of our kernel superpage support? -Nathan From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 03:16:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A8D1D1065670; Fri, 16 Mar 2012 03:16:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DEA58FC0A; Fri, 16 Mar 2012 03:16:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2G3GBIK096792; Fri, 16 Mar 2012 03:16:11 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2G3GBZL096788; Fri, 16 Mar 2012 03:16:11 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203160316.q2G3GBZL096788@svn.freebsd.org> From: Eitan Adler Date: Fri, 16 Mar 2012 03:16: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: r233020 - stable/8/tools/regression/pipe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 03:16:11 -0000 Author: eadler Date: Fri Mar 16 03:16:10 2012 New Revision: 233020 URL: http://svn.freebsd.org/changeset/base/233020 Log: MFC r228274: - Fix some uninitialized variables in pipe regression tests that result in failure. PR: misc/161175 Approved by: cperciva Modified: stable/8/tools/regression/pipe/pipe-fstatbug.c stable/8/tools/regression/pipe/pipe-reverse.c stable/8/tools/regression/pipe/pipe-wraparound.c Directory Properties: stable/8/tools/regression/pipe/ (props changed) Modified: stable/8/tools/regression/pipe/pipe-fstatbug.c ============================================================================== --- stable/8/tools/regression/pipe/pipe-fstatbug.c Thu Mar 15 23:53:24 2012 (r233019) +++ stable/8/tools/regression/pipe/pipe-fstatbug.c Fri Mar 16 03:16:10 2012 (r233020) @@ -41,7 +41,7 @@ int main (void) { char buffer[32768], buffer2[32768]; int desc[2]; -int error, successes; +int error, successes = 0; struct stat status; pid_t new_pid; Modified: stable/8/tools/regression/pipe/pipe-reverse.c ============================================================================== --- stable/8/tools/regression/pipe/pipe-reverse.c Thu Mar 15 23:53:24 2012 (r233019) +++ stable/8/tools/regression/pipe/pipe-reverse.c Fri Mar 16 03:16:10 2012 (r233020) @@ -44,6 +44,7 @@ struct stat status; pid_t new_pid; buggy = 0; +total = 0; error = pipe(desc); @@ -52,7 +53,7 @@ if (error) buffer[0] = 'A'; -for (i = 0; i < 65535; i++) { +for (i = 1; i < 65535; i++) { buffer[i] = buffer[i - 1] + 1; if (buffer[i] > 'Z') buffer[i] = 'A'; Modified: stable/8/tools/regression/pipe/pipe-wraparound.c ============================================================================== --- stable/8/tools/regression/pipe/pipe-wraparound.c Thu Mar 15 23:53:24 2012 (r233019) +++ stable/8/tools/regression/pipe/pipe-wraparound.c Fri Mar 16 03:16:10 2012 (r233020) @@ -44,6 +44,7 @@ struct stat status; pid_t new_pid; buggy = 0; +total = 0; error = pipe(desc); @@ -52,7 +53,7 @@ if (error) buffer[0] = 'A'; -for (i = 0; i < 32768; i++) { +for (i = 1; i < 32768; i++) { buffer[i] = buffer[i - 1] + 1; if (buffer[i] > 'Z') buffer[i] = 'A'; From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 03:22:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 139291065670; Fri, 16 Mar 2012 03:22:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 013118FC0A; Fri, 16 Mar 2012 03:22:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2G3Mb5E097040; Fri, 16 Mar 2012 03:22:37 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2G3MbVj097034; Fri, 16 Mar 2012 03:22:37 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203160322.q2G3MbVj097034@svn.freebsd.org> From: Eitan Adler Date: Fri, 16 Mar 2012 03:22: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: r233021 - in stable/8/usr.bin: brandelf bsdiff/bsdiff ncplist netstat split X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 03:22:38 -0000 Author: eadler Date: Fri Mar 16 03:22:37 2012 New Revision: 233021 URL: http://svn.freebsd.org/changeset/base/233021 Log: MFC r22990[45] and r229907-r229919: - fix a variety of warnings produced by gcc46 when compiling world Approved by (cperciva) Modified: stable/8/usr.bin/brandelf/brandelf.c stable/8/usr.bin/bsdiff/bsdiff/bsdiff.c stable/8/usr.bin/ncplist/ncplist.c stable/8/usr.bin/netstat/if.c stable/8/usr.bin/split/split.c Directory Properties: stable/8/sbin/tunefs/ (props changed) stable/8/usr.bin/brandelf/ (props changed) stable/8/usr.bin/bsdiff/ (props changed) stable/8/usr.bin/ncplist/ (props changed) stable/8/usr.bin/netstat/ (props changed) stable/8/usr.bin/split/ (props changed) Modified: stable/8/usr.bin/brandelf/brandelf.c ============================================================================== --- stable/8/usr.bin/brandelf/brandelf.c Fri Mar 16 03:16:10 2012 (r233020) +++ stable/8/usr.bin/brandelf/brandelf.c Fri Mar 16 03:22:37 2012 (r233021) @@ -64,7 +64,7 @@ main(int argc, char **argv) const char *strtype = "FreeBSD"; int type = ELFOSABI_FREEBSD; int retval = 0; - int ch, change = 0, verbose = 0, force = 0, listed = 0; + int ch, change = 0, force = 0, listed = 0; while ((ch = getopt(argc, argv, "f:lt:v")) != -1) switch (ch) { @@ -84,7 +84,7 @@ main(int argc, char **argv) listed = 1; break; case 'v': - verbose = 1; + /* does nothing */ break; case 't': if (force) Modified: stable/8/usr.bin/bsdiff/bsdiff/bsdiff.c ============================================================================== --- stable/8/usr.bin/bsdiff/bsdiff/bsdiff.c Fri Mar 16 03:16:10 2012 (r233020) +++ stable/8/usr.bin/bsdiff/bsdiff/bsdiff.c Fri Mar 16 03:22:37 2012 (r233021) @@ -272,7 +272,7 @@ int main(int argc,char *argv[]) /* Compute the differences, writing ctrl as we go */ if ((pfbz2 = BZ2_bzWriteOpen(&bz2err, pf, 9, 0, 0)) == NULL) errx(1, "BZ2_bzWriteOpen, bz2err = %d", bz2err); - scan=0;len=0; + scan=0;len=0;pos=0; lastscan=0;lastpos=0;lastoffset=0; while(scan Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B861106566B; Fri, 16 Mar 2012 04:35:53 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 219108FC08; Fri, 16 Mar 2012 04:35:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2G4Zqte099499; Fri, 16 Mar 2012 04:35:52 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2G4ZqhX099496; Fri, 16 Mar 2012 04:35:52 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201203160435.q2G4ZqhX099496@svn.freebsd.org> From: David Xu Date: Fri, 16 Mar 2012 04:35: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: r233022 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 04:35:53 -0000 Author: davidxu Date: Fri Mar 16 04:35:52 2012 New Revision: 233022 URL: http://svn.freebsd.org/changeset/base/233022 Log: When destroying a barrier, waiting all threads exit the barrier, this makes it possible a thread received PTHREAD_BARRIER_SERIAL_THREAD immediately free memory area of the barrier. Modified: head/lib/libthr/thread/thr_barrier.c head/lib/libthr/thread/thr_private.h Modified: head/lib/libthr/thread/thr_barrier.c ============================================================================== --- head/lib/libthr/thread/thr_barrier.c Fri Mar 16 03:22:37 2012 (r233021) +++ head/lib/libthr/thread/thr_barrier.c Fri Mar 16 04:35:52 2012 (r233022) @@ -42,13 +42,34 @@ int _pthread_barrier_destroy(pthread_barrier_t *barrier) { pthread_barrier_t bar; + struct pthread *curthread; if (barrier == NULL || *barrier == NULL) return (EINVAL); + curthread = _get_curthread(); bar = *barrier; - if (bar->b_waiters > 0) + THR_UMUTEX_LOCK(curthread, &bar->b_lock); + if (bar->b_destroying) { + THR_UMUTEX_UNLOCK(curthread, &bar->b_lock); return (EBUSY); + } + bar->b_destroying = 1; + do { + if (bar->b_waiters > 0) { + bar->b_destroying = 0; + THR_UMUTEX_UNLOCK(curthread, &bar->b_lock); + return (EBUSY); + } + if (bar->b_refcount != 0) { + _thr_ucond_wait(&bar->b_cv, &bar->b_lock, NULL, 0); + THR_UMUTEX_LOCK(curthread, &bar->b_lock); + } else + break; + } while (1); + bar->b_destroying = 0; + THR_UMUTEX_UNLOCK(curthread, &bar->b_lock); + *barrier = NULL; free(bar); return (0); @@ -74,6 +95,7 @@ _pthread_barrier_init(pthread_barrier_t bar->b_cycle = 0; bar->b_waiters = 0; bar->b_count = count; + bar->b_refcount = 0; *barrier = bar; return (0); @@ -101,11 +123,14 @@ _pthread_barrier_wait(pthread_barrier_t ret = PTHREAD_BARRIER_SERIAL_THREAD; } else { cycle = bar->b_cycle; + bar->b_refcount++; do { _thr_ucond_wait(&bar->b_cv, &bar->b_lock, NULL, 0); THR_UMUTEX_LOCK(curthread, &bar->b_lock); /* test cycle to avoid bogus wakeup */ } while (cycle == bar->b_cycle); + if (--bar->b_refcount == 0 && bar->b_destroying) + _thr_ucond_broadcast(&bar->b_cv); THR_UMUTEX_UNLOCK(curthread, &bar->b_lock); ret = 0; } Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Fri Mar 16 03:22:37 2012 (r233021) +++ head/lib/libthr/thread/thr_private.h Fri Mar 16 04:35:52 2012 (r233022) @@ -182,9 +182,11 @@ struct pthread_cond_attr { struct pthread_barrier { struct umutex b_lock; struct ucond b_cv; - volatile int64_t b_cycle; - volatile int b_count; - volatile int b_waiters; + int64_t b_cycle; + int b_count; + int b_waiters; + int b_refcount; + int b_destroying; }; struct pthread_barrierattr { From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 05:05:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6818106566C; Fri, 16 Mar 2012 05:05:37 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C61208FC12; Fri, 16 Mar 2012 05:05:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2G55b8P000667; Fri, 16 Mar 2012 05:05:37 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2G55bCf000664; Fri, 16 Mar 2012 05:05:37 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201203160505.q2G55bCf000664@svn.freebsd.org> From: David Xu Date: Fri, 16 Mar 2012 05:05: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: r233023 - 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: Fri, 16 Mar 2012 05:05:37 -0000 Author: davidxu Date: Fri Mar 16 05:05:37 2012 New Revision: 233023 URL: http://svn.freebsd.org/changeset/base/233023 Log: Add implementation note about when a condition variable can be destroyed. Modified: head/share/man/man3/pthread_cond_destroy.3 Modified: head/share/man/man3/pthread_cond_destroy.3 ============================================================================== --- head/share/man/man3/pthread_cond_destroy.3 Fri Mar 16 04:35:52 2012 (r233022) +++ head/share/man/man3/pthread_cond_destroy.3 Fri Mar 16 05:05:37 2012 (r233023) @@ -63,6 +63,9 @@ The variable .Fa cond is locked by another thread. .El +.Sh IMPLEMENTATION NOTES +A condition variable can be destroyed immediately after all the threads that +are blocked on it are awakened. .Sh SEE ALSO .Xr pthread_cond_broadcast 3 , .Xr pthread_cond_init 3 , From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 08:47:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 222551065670; Fri, 16 Mar 2012 08:47:00 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07E0C8FC08; Fri, 16 Mar 2012 08:47:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2G8kxTR008276; Fri, 16 Mar 2012 08:46:59 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2G8kw6a008223; Fri, 16 Mar 2012 08:46:58 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201203160846.q2G8kw6a008223@svn.freebsd.org> From: Scott Long Date: Fri, 16 Mar 2012 08:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233024 - in stable/9/sys/dev: advansys ahb aic7xxx amr an arcmsr asr buslogic bxe ciss cxgb de dpt en glxsb hatm hifn hptiop hptmv ida if_ndis iir ips ipw ixgb ixgbe lmc mfi mge mlx ml... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 08:47:00 -0000 Author: scottl Date: Fri Mar 16 08:46:58 2012 New Revision: 233024 URL: http://svn.freebsd.org/changeset/base/233024 Log: MFC 232854,232874,232882,232883,232886 for bus_get_dma_tag() Modified: stable/9/sys/dev/advansys/adv_eisa.c stable/9/sys/dev/advansys/adv_isa.c stable/9/sys/dev/advansys/adv_pci.c stable/9/sys/dev/advansys/adw_pci.c stable/9/sys/dev/ahb/ahb.c stable/9/sys/dev/aic7xxx/ahc_eisa.c stable/9/sys/dev/aic7xxx/ahc_isa.c stable/9/sys/dev/aic7xxx/ahc_pci.c stable/9/sys/dev/aic7xxx/ahd_pci.c stable/9/sys/dev/amr/amr_pci.c stable/9/sys/dev/an/if_an_pci.c stable/9/sys/dev/arcmsr/arcmsr.c stable/9/sys/dev/asr/asr.c stable/9/sys/dev/buslogic/bt_pci.c stable/9/sys/dev/bxe/if_bxe.c stable/9/sys/dev/ciss/ciss.c stable/9/sys/dev/cxgb/cxgb_sge.c stable/9/sys/dev/de/if_de.c stable/9/sys/dev/dpt/dpt_pci.c stable/9/sys/dev/en/midway.c stable/9/sys/dev/glxsb/glxsb.c stable/9/sys/dev/hatm/if_hatm.c stable/9/sys/dev/hifn/hifn7751.c stable/9/sys/dev/hptiop/hptiop.c stable/9/sys/dev/hptmv/entry.c stable/9/sys/dev/ida/ida_pci.c stable/9/sys/dev/if_ndis/if_ndis_pci.c stable/9/sys/dev/iir/iir_pci.c stable/9/sys/dev/ips/ips_pci.c stable/9/sys/dev/ipw/if_ipw.c stable/9/sys/dev/ipw/if_ipwvar.h stable/9/sys/dev/ixgb/if_ixgb.c stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixv.c stable/9/sys/dev/lmc/if_lmc.c stable/9/sys/dev/mfi/mfi_pci.c stable/9/sys/dev/mge/if_mge.c stable/9/sys/dev/mlx/mlx_pci.c stable/9/sys/dev/mly/mly.c stable/9/sys/dev/mxge/if_mxge.c stable/9/sys/dev/nve/if_nve.c stable/9/sys/dev/patm/if_patm_attach.c stable/9/sys/dev/safe/safe.c stable/9/sys/dev/trm/trm.c stable/9/sys/dev/twe/twe_freebsd.c stable/9/sys/dev/tws/tws.c stable/9/sys/dev/ubsec/ubsec.c stable/9/sys/dev/wds/wd7000.c stable/9/sys/dev/xen/blkfront/blkfront.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/advansys/adv_eisa.c ============================================================================== --- stable/9/sys/dev/advansys/adv_eisa.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/advansys/adv_eisa.c Fri Mar 16 08:46:58 2012 (r233024) @@ -171,9 +171,8 @@ adv_eisa_attach(device_t dev) * Allocate a parent dmatag for all tags created * by the MI portions of the advansys driver */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADV_EISA_MAX_DMA_ADDR, @@ -211,9 +210,8 @@ adv_eisa_attach(device_t dev) * Allocate a parent dmatag for all tags created * by the MI portions of the advansys driver */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADV_EISA_MAX_DMA_ADDR, Modified: stable/9/sys/dev/advansys/adv_isa.c ============================================================================== --- stable/9/sys/dev/advansys/adv_isa.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/advansys/adv_isa.c Fri Mar 16 08:46:58 2012 (r233024) @@ -226,9 +226,8 @@ adv_isa_probe(device_t dev) * Allocate a parent dmatag for all tags created * by the MI portions of the advansys driver */ - /* XXX Should be a child of the ISA bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ lowaddr, Modified: stable/9/sys/dev/advansys/adv_pci.c ============================================================================== --- stable/9/sys/dev/advansys/adv_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/advansys/adv_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -187,9 +187,8 @@ adv_pci_attach(device_t dev) } /* Allocate a dmatag for our transfer DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADV_PCI_MAX_DMA_ADDR, Modified: stable/9/sys/dev/advansys/adw_pci.c ============================================================================== --- stable/9/sys/dev/advansys/adw_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/advansys/adw_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -258,9 +258,8 @@ adw_pci_attach(device_t dev) pci_write_config(dev, PCIR_COMMAND, command, /*bytes*/1); /* Allocate a dmatag for our transfer DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADW_PCI_MAX_DMA_ADDR, Modified: stable/9/sys/dev/ahb/ahb.c ============================================================================== --- stable/9/sys/dev/ahb/ahb.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/ahb/ahb.c Fri Mar 16 08:46:58 2012 (r233024) @@ -291,8 +291,7 @@ ahbattach(device_t dev) * need to perform during normal operation. */ /* DMA tag for mapping buffers into device visible space. */ - /* XXX Should be a child of the EISA bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, @@ -311,7 +310,7 @@ ahbattach(device_t dev) ahb->init_level++; /* DMA tag for our ccb structures and ha inquiry data */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/9/sys/dev/aic7xxx/ahc_eisa.c ============================================================================== --- stable/9/sys/dev/aic7xxx/ahc_eisa.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/aic7xxx/ahc_eisa.c Fri Mar 16 08:46:58 2012 (r233024) @@ -130,7 +130,6 @@ aic7770_attach(device_t dev) ahc_set_unit(ahc, device_get_unit(dev)); /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, Modified: stable/9/sys/dev/aic7xxx/ahc_isa.c ============================================================================== --- stable/9/sys/dev/aic7xxx/ahc_isa.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/aic7xxx/ahc_isa.c Fri Mar 16 08:46:58 2012 (r233024) @@ -253,7 +253,6 @@ ahc_isa_attach(device_t dev) ahc_set_unit(ahc, device_get_unit(dev)); /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the VLB/ISA bus dma tag */ error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, Modified: stable/9/sys/dev/aic7xxx/ahc_pci.c ============================================================================== --- stable/9/sys/dev/aic7xxx/ahc_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/aic7xxx/ahc_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -105,7 +105,6 @@ ahc_pci_attach(device_t dev) ahc->flags |= AHC_39BIT_ADDRESSING; /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, (ahc->flags & AHC_39BIT_ADDRESSING) Modified: stable/9/sys/dev/aic7xxx/ahd_pci.c ============================================================================== --- stable/9/sys/dev/aic7xxx/ahd_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/aic7xxx/ahd_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -107,7 +107,6 @@ ahd_pci_attach(device_t dev) ahd->flags |= AHD_39BIT_ADDRESSING; /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = aic_dma_tag_create(ahd, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, (ahd->flags & AHD_39BIT_ADDRESSING) Modified: stable/9/sys/dev/amr/amr_pci.c ============================================================================== --- stable/9/sys/dev/amr/amr_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/amr/amr_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -275,7 +275,7 @@ amr_pci_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment,boundary */ AMR_IS_SG64(sc) ? BUS_SPACE_MAXADDR : Modified: stable/9/sys/dev/an/if_an_pci.c ============================================================================== --- stable/9/sys/dev/an/if_an_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/an/if_an_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -195,7 +195,7 @@ an_attach_pci(dev) } /* Allocate DMA region */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev),/* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/arcmsr/arcmsr.c ============================================================================== --- stable/9/sys/dev/arcmsr/arcmsr.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/arcmsr/arcmsr.c Fri Mar 16 08:46:58 2012 (r233024) @@ -3486,7 +3486,7 @@ static u_int32_t arcmsr_initialize(devic return ENOMEM; } } - if(bus_dma_tag_create( /*parent*/ NULL, + if(bus_dma_tag_create( /*PCI parent*/ bus_get_dma_tag(dev), /*alignemnt*/ 1, /*boundary*/ 0, /*lowaddr*/ BUS_SPACE_MAXADDR, Modified: stable/9/sys/dev/asr/asr.c ============================================================================== --- stable/9/sys/dev/asr/asr.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/asr/asr.c Fri Mar 16 08:46:58 2012 (r233024) @@ -2328,7 +2328,7 @@ asr_alloc_dma(Asr_softc_t *sc) dev = sc->ha_dev; - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/buslogic/bt_pci.c ============================================================================== --- stable/9/sys/dev/buslogic/bt_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/buslogic/bt_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -172,8 +172,7 @@ bt_pci_attach(device_t dev) } /* Allocate a dmatag for our CCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/9/sys/dev/bxe/if_bxe.c ============================================================================== --- stable/9/sys/dev/bxe/if_bxe.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/bxe/if_bxe.c Fri Mar 16 08:46:58 2012 (r233024) @@ -13583,7 +13583,8 @@ bxe_host_structures_alloc(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - rc = bus_dma_tag_create(NULL, /* parent tag */ + rc = bus_dma_tag_create( + bus_get_dma_tag(dev), /* PCI parent tag */ 1, /* alignment for segs */ BXE_DMA_BOUNDARY, /* cannot cross */ BUS_SPACE_MAXADDR, /* restricted low */ Modified: stable/9/sys/dev/ciss/ciss.c ============================================================================== --- stable/9/sys/dev/ciss/ciss.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/ciss/ciss.c Fri Mar 16 08:46:58 2012 (r233024) @@ -795,7 +795,7 @@ setup: * Note that "simple" adapters can only address within a 32-bit * span. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->ciss_dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_sge.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/cxgb/cxgb_sge.c Fri Mar 16 08:46:58 2012 (r233024) @@ -591,7 +591,7 @@ t3_sge_alloc(adapter_t *sc) { /* The parent tag. */ - if (bus_dma_tag_create( NULL, /* parent */ + if (bus_dma_tag_create( bus_get_dma_tag(sc->dev),/* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/de/if_de.c ============================================================================== --- stable/9/sys/dev/de/if_de.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/de/if_de.c Fri Mar 16 08:46:58 2012 (r233024) @@ -4492,7 +4492,8 @@ tulip_busdma_allocring(device_t dev, tul /* First, setup a tag. */ ri->ri_max = count; size = count * sizeof(tulip_desc_t); - error = bus_dma_tag_create(NULL, 32, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 32, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size, 1, size, 0, NULL, NULL, &ri->ri_ring_tag); if (error) { @@ -4520,7 +4521,7 @@ tulip_busdma_allocring(device_t dev, tul } /* Allocate a tag for the data buffers. */ - error = bus_dma_tag_create(NULL, align, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), align, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * nsegs, nsegs, MCLBYTES, 0, NULL, NULL, &ri->ri_data_tag); if (error) { @@ -4600,7 +4601,7 @@ tulip_busdma_init(device_t dev, tulip_so /* * Allocate a DMA tag, memory, and map for setup descriptor */ - error = bus_dma_tag_create(NULL, 32, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), 32, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(sc->tulip_setupdata), 1, sizeof(sc->tulip_setupdata), 0, NULL, NULL, &sc->tulip_setup_tag); Modified: stable/9/sys/dev/dpt/dpt_pci.c ============================================================================== --- stable/9/sys/dev/dpt/dpt_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/dpt/dpt_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -132,8 +132,7 @@ dpt_pci_attach (device_t dev) dpt_alloc(dev); /* Allocate a dmatag representing the capabilities of this attachment */ - /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/9/sys/dev/en/midway.c ============================================================================== --- stable/9/sys/dev/en/midway.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/en/midway.c Fri Mar 16 08:46:58 2012 (r233024) @@ -2714,7 +2714,7 @@ en_dmaprobe(struct en_softc *sc) * Allocate some DMA-able memory. * We need 3 times the max burst size aligned to the max burst size. */ - err = bus_dma_tag_create(NULL, MIDDMA_MAXBURST, 0, + err = bus_dma_tag_create(bus_get_dma_tag(sc->dev), MIDDMA_MAXBURST, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, 3 * MIDDMA_MAXBURST, 1, 3 * MIDDMA_MAXBURST, 0, NULL, NULL, &tag); @@ -2927,7 +2927,7 @@ en_attach(struct en_softc *sc) MGET(sc->padbuf, M_WAIT, MT_DATA); bzero(sc->padbuf->m_data, MLEN); - if (bus_dma_tag_create(NULL, 1, 0, + if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, EN_TXSZ * 1024, EN_MAX_DMASEG, EN_TXSZ * 1024, 0, NULL, NULL, &sc->txtag)) Modified: stable/9/sys/dev/glxsb/glxsb.c ============================================================================== --- stable/9/sys/dev/glxsb/glxsb.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/glxsb/glxsb.c Fri Mar 16 08:46:58 2012 (r233024) @@ -397,7 +397,7 @@ glxsb_dma_alloc(struct glxsb_softc *sc) dma->dma_size = GLXSB_MAX_AES_LEN * 2; /* Setup DMA descriptor area */ - rc = bus_dma_tag_create(NULL, /* parent */ + rc = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ SB_AES_ALIGN, 0, /* alignments, bounds */ BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/hatm/if_hatm.c ============================================================================== --- stable/9/sys/dev/hatm/if_hatm.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/hatm/if_hatm.c Fri Mar 16 08:46:58 2012 (r233024) @@ -1722,7 +1722,7 @@ hatm_attach(device_t dev) /* * ALlocate a DMA tag for subsequent allocations */ - if (bus_dma_tag_create(NULL, 1, 0, + if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 1, @@ -1751,7 +1751,7 @@ hatm_attach(device_t dev) * but this would not work. So make the maximum number of TPDs * occupied by one packet a configuration parameter. */ - if (bus_dma_tag_create(NULL, 1, 0, + if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, HE_MAX_PDU, 3 * HE_CONFIG_MAX_TPD_PER_PACKET, HE_MAX_PDU, 0, NULL, NULL, &sc->tx_tag)) { Modified: stable/9/sys/dev/hifn/hifn7751.c ============================================================================== --- stable/9/sys/dev/hifn/hifn7751.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/hifn/hifn7751.c Fri Mar 16 08:46:58 2012 (r233024) @@ -430,7 +430,7 @@ hifn_attach(device_t dev) * Setup the area where the Hifn DMA's descriptors * and associated data structures. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment,boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/hptiop/hptiop.c ============================================================================== --- stable/9/sys/dev/hptiop/hptiop.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/hptiop/hptiop.c Fri Mar 16 08:46:58 2012 (r233024) @@ -1358,7 +1358,7 @@ static int hptiop_attach(device_t dev) mtx_init(&hba->lock, "hptioplock", NULL, MTX_DEF); #endif - if (bus_dma_tag_create(NULL,/* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev),/* PCI parent */ 1, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ Modified: stable/9/sys/dev/hptmv/entry.c ============================================================================== --- stable/9/sys/dev/hptmv/entry.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/hptmv/entry.c Fri Mar 16 08:46:58 2012 (r233024) @@ -1326,7 +1326,7 @@ init_adapter(IAL_ADAPTER_T *pAdapter) _vbus_p->OsExt = (void *)pAdapter; pMvSataAdapter->IALData = pAdapter; - if (bus_dma_tag_create(NULL,/* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(pAdapter->hpt_dev),/* parent */ 4, /* alignment */ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ Modified: stable/9/sys/dev/ida/ida_pci.c ============================================================================== --- stable/9/sys/dev/ida/ida_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/ida/ida_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -267,7 +267,7 @@ ida_pci_attach(device_t dev) } error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/9/sys/dev/if_ndis/if_ndis_pci.c ============================================================================== --- stable/9/sys/dev/if_ndis/if_ndis_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/if_ndis/if_ndis_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -290,7 +290,7 @@ ndis_attach_pci(dev) * Allocate the parent bus DMA tag appropriate for PCI. */ #define NDIS_NSEG_NEW 32 - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/iir/iir_pci.c ============================================================================== --- stable/9/sys/dev/iir/iir_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/iir/iir_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -317,8 +317,8 @@ iir_pci_attach(device_t dev) gdt->sc_test_busy = gdt_mpr_test_busy; /* Allocate a dmatag representing the capabilities of this attachment */ - /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create(/*parent*/NULL, /*alignemnt*/1, /*boundary*/0, + if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), + /*alignemnt*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, Modified: stable/9/sys/dev/ips/ips_pci.c ============================================================================== --- stable/9/sys/dev/ips/ips_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/ips/ips_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -135,7 +135,7 @@ static int ips_pci_attach(device_t dev) device_printf(dev, "irq setup failed\n"); goto error; } - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/9/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/9/sys/dev/ipw/if_ipw.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/ipw/if_ipw.c Fri Mar 16 08:46:58 2012 (r233024) @@ -528,9 +528,21 @@ ipw_dma_alloc(struct ipw_softc *sc) int error, i; /* + * Allocate parent DMA tag for subsequent allocations. + */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE_32BIT, BUS_SPACE_UNRESTRICTED, + BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &sc->parent_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create parent DMA tag\n"); + goto fail; + } + + /* * Allocate and map tx ring. */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, IPW_TBD_SZ, 1, IPW_TBD_SZ, 0, NULL, NULL, &sc->tbd_dmat); if (error != 0) { @@ -556,7 +568,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate and map rx ring. */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, IPW_RBD_SZ, 1, IPW_RBD_SZ, 0, NULL, NULL, &sc->rbd_dmat); if (error != 0) { @@ -582,7 +594,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate and map status ring. */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, IPW_STATUS_SZ, 1, IPW_STATUS_SZ, 0, NULL, NULL, &sc->status_dmat); if (error != 0) { @@ -611,7 +623,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate command DMA map. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof (struct ipw_cmd), 1, sizeof (struct ipw_cmd), 0, NULL, NULL, &sc->cmd_dmat); if (error != 0) { @@ -629,7 +641,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate headers DMA maps. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof (struct ipw_hdr), 1, sizeof (struct ipw_hdr), 0, NULL, NULL, &sc->hdr_dmat); if (error != 0) { @@ -652,7 +664,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate tx buffers DMA maps. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, IPW_MAX_NSEG, MCLBYTES, 0, NULL, NULL, &sc->txbuf_dmat); if (error != 0) { @@ -684,7 +696,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Pre-allocate rx buffers and DMA maps. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, MCLBYTES, 0, NULL, NULL, &sc->rxbuf_dmat); if (error != 0) { @@ -741,6 +753,10 @@ ipw_release(struct ipw_softc *sc) struct ipw_soft_buf *sbuf; int i; + if (sc->parent_dmat != NULL) { + bus_dma_tag_destroy(sc->parent_dmat); + } + if (sc->tbd_dmat != NULL) { if (sc->stbd_list != NULL) { bus_dmamap_unload(sc->tbd_dmat, sc->tbd_map); Modified: stable/9/sys/dev/ipw/if_ipwvar.h ============================================================================== --- stable/9/sys/dev/ipw/if_ipwvar.h Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/ipw/if_ipwvar.h Fri Mar 16 08:46:58 2012 (r233024) @@ -117,6 +117,7 @@ struct ipw_softc { int sc_tx_timer; int sc_scan_timer; + bus_dma_tag_t parent_dmat; bus_dma_tag_t tbd_dmat; bus_dma_tag_t rbd_dmat; bus_dma_tag_t status_dmat; Modified: stable/9/sys/dev/ixgb/if_ixgb.c ============================================================================== --- stable/9/sys/dev/ixgb/if_ixgb.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/ixgb/if_ixgb.c Fri Mar 16 08:46:58 2012 (r233024) @@ -1422,7 +1422,7 @@ ixgb_dma_malloc(struct adapter * adapter int r; dev = adapter->dev; - r = bus_dma_tag_create(NULL, /* parent */ + r = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ PAGE_SIZE, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1514,7 +1514,7 @@ ixgb_setup_transmit_structures(struct ad /* * Setup DMA descriptor areas. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(adapter->dev), /* parent */ PAGE_SIZE, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1852,7 +1852,7 @@ ixgb_allocate_receive_structures(struct bzero(adapter->rx_buffer_area, sizeof(struct ixgb_buffer) * adapter->num_rx_desc); - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(adapter->dev),/* parent */ PAGE_SIZE, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/ixgbe/ixgbe.c Fri Mar 16 08:46:58 2012 (r233024) @@ -2761,7 +2761,8 @@ ixgbe_allocate_transmit_buffers(struct t /* * Setup DMA descriptor areas. */ - if ((error = bus_dma_tag_create(NULL, /* parent */ + if ((error = bus_dma_tag_create( + bus_get_dma_tag(adapter->dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixv.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/ixgbe/ixv.c Fri Mar 16 08:46:58 2012 (r233024) @@ -2146,7 +2146,8 @@ ixv_allocate_transmit_buffers(struct tx_ /* * Setup DMA descriptor areas. */ - if ((error = bus_dma_tag_create(NULL, /* parent */ + if ((error = bus_dma_tag_create( + bus_get_dma_tag(adapter->dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/lmc/if_lmc.c ============================================================================== --- stable/9/sys/dev/lmc/if_lmc.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/lmc/if_lmc.c Fri Mar 16 08:46:58 2012 (r233024) @@ -2621,7 +2621,8 @@ create_ring(softc_t *sc, struct desc_rin #ifdef __FreeBSD__ /* Create a DMA tag for descriptors and buffers. */ - if ((error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, PAGE_SIZE, 2, PAGE_SIZE, BUS_DMA_ALLOCNOW, # if (__FreeBSD_version >= 502000) NULL, NULL, Modified: stable/9/sys/dev/mfi/mfi_pci.c ============================================================================== --- stable/9/sys/dev/mfi/mfi_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/mfi/mfi_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -216,7 +216,7 @@ mfi_pci_attach(device_t dev) error = ENOMEM; /* Allocate parent DMA tag */ - if (bus_dma_tag_create( NULL, /* parent */ + if (bus_dma_tag_create( bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/mge/if_mge.c ============================================================================== --- stable/9/sys/dev/mge/if_mge.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/mge/if_mge.c Fri Mar 16 08:46:58 2012 (r233024) @@ -439,7 +439,7 @@ mge_alloc_desc_dma(struct mge_softc *sc, tab[size - 1].mge_desc->next_desc = desc_paddr; /* Allocate a busdma tag for mbufs. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), /* parent */ 8, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -477,7 +477,7 @@ mge_allocate_dma(struct mge_softc *sc) int i; /* Allocate a busdma tag and DMA safe memory for TX/RX descriptors. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), /* parent */ 16, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/mlx/mlx_pci.c ============================================================================== --- stable/9/sys/dev/mlx/mlx_pci.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/mlx/mlx_pci.c Fri Mar 16 08:46:58 2012 (r233024) @@ -189,7 +189,7 @@ mlx_pci_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/mly/mly.c ============================================================================== --- stable/9/sys/dev/mly/mly.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/mly/mly.c Fri Mar 16 08:46:58 2012 (r233024) @@ -392,7 +392,7 @@ mly_pci_attach(struct mly_softc *sc) * * Note that all of these controllers are 64-bit capable. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->mly_dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/9/sys/dev/mxge/if_mxge.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/mxge/if_mxge.c Fri Mar 16 08:46:58 2012 (r233024) @@ -4662,7 +4662,7 @@ mxge_attach(device_t dev) goto abort_with_nothing; } - err = bus_dma_tag_create(NULL, /* parent */ + err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR, /* low */ Modified: stable/9/sys/dev/nve/if_nve.c ============================================================================== --- stable/9/sys/dev/nve/if_nve.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/nve/if_nve.c Fri Mar 16 08:46:58 2012 (r233024) @@ -371,7 +371,8 @@ nve_attach(device_t dev) goto fail; } /* Allocate DMA tags */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * NV_MAX_FRAGS, NV_MAX_FRAGS, MCLBYTES, 0, busdma_lock_mutex, &Giant, @@ -380,7 +381,8 @@ nve_attach(device_t dev) device_printf(dev, "couldn't allocate dma tag\n"); goto fail; } - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct nve_rx_desc) * RX_RING_SIZE, 1, sizeof(struct nve_rx_desc) * RX_RING_SIZE, 0, @@ -390,7 +392,8 @@ nve_attach(device_t dev) device_printf(dev, "couldn't allocate dma tag\n"); goto fail; } - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct nve_tx_desc) * TX_RING_SIZE, 1, sizeof(struct nve_tx_desc) * TX_RING_SIZE, 0, Modified: stable/9/sys/dev/patm/if_patm_attach.c ============================================================================== --- stable/9/sys/dev/patm/if_patm_attach.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/patm/if_patm_attach.c Fri Mar 16 08:46:58 2012 (r233024) @@ -404,7 +404,7 @@ patm_attach(device_t dev) * Don't use BUS_DMA_ALLOCNOW, because we never need bouncing with * bus_dmamem_alloc() */ - error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct patm_scd), 1, sizeof(struct patm_scd), 0, NULL, NULL, &sc->scd_tag); @@ -774,7 +774,8 @@ patm_sq_init(struct patm_softc *sc) * Don't use BUS_DMA_ALLOCNOW, because we never need bouncing with * bus_dmamem_alloc() */ - error = bus_dma_tag_create(NULL, PATM_SQ_ALIGNMENT, 0, + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), + PATM_SQ_ALIGNMENT, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sc->sq_size, 1, sc->sq_size, 0, NULL, NULL, &sc->sq_tag); @@ -827,7 +828,7 @@ patm_rbuf_init(struct patm_softc *sc) * Don't use BUS_DMA_ALLOCNOW, because we never need bouncing with * bus_dmamem_alloc() */ - if ((error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, + if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, SMBUF_PAGE_SIZE, 1, SMBUF_PAGE_SIZE, 0, NULL, NULL, &sc->sbuf_tag)) != 0) { @@ -855,7 +856,7 @@ patm_rbuf_init(struct patm_softc *sc) * maps using one tag. Rather use BUS_DMA_NOWAIT when loading the map * to prevent EINPROGRESS. */ - if ((error = bus_dma_tag_create(NULL, 4, 0, + if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, MCLBYTES, 0, NULL, NULL, &sc->lbuf_tag)) != 0) { @@ -900,7 +901,7 @@ patm_txmap_init(struct patm_softc *sc) struct patm_txmap *map; /* get transmission tag */ - error = bus_dma_tag_create(NULL, 1, 0, + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, 65536, IDT_SCQ_SIZE - 1, 65536, 0, NULL, NULL, &sc->tx_tag); Modified: stable/9/sys/dev/safe/safe.c ============================================================================== --- stable/9/sys/dev/safe/safe.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/safe/safe.c Fri Mar 16 08:46:58 2012 (r233024) @@ -287,7 +287,7 @@ safe_attach(device_t dev) /* * Setup DMA descriptor area. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ SAFE_DMA_BOUNDARY, /* boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ @@ -302,7 +302,7 @@ safe_attach(device_t dev) device_printf(dev, "cannot allocate DMA tag\n"); goto bad4; } - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ SAFE_MAX_DSIZE, /* boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ @@ -1802,7 +1802,7 @@ safe_dma_malloc( { int r; - r = bus_dma_tag_create(NULL, /* parent */ + r = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ sizeof(u_int32_t), 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/trm/trm.c ============================================================================== --- stable/9/sys/dev/trm/trm.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/trm/trm.c Fri Mar 16 08:46:58 2012 (r233024) @@ -3415,6 +3415,22 @@ trm_init(u_int16_t unit, device_t dev) pACB->tag = rman_get_bustag(pACB->iores); pACB->bsh = rman_get_bushandle(pACB->iores); if (bus_dma_tag_create( + /*parent_dmat*/ bus_get_dma_tag(dev), + /*alignment*/ 1, + /*boundary*/ 0, + /*lowaddr*/ BUS_SPACE_MAXADDR, + /*highaddr*/ BUS_SPACE_MAXADDR, + /*filter*/ NULL, + /*filterarg*/ NULL, + /*maxsize*/ BUS_SPACE_MAXSIZE_32BIT, + /*nsegments*/ BUS_SPACE_UNRESTRICTED, + /*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT, + /*flags*/ 0, + /*lockfunc*/ NULL, + /*lockarg*/ NULL, + /* dmat */ &pACB->parent_dmat) != 0) + goto bad; + if (bus_dma_tag_create( /*parent_dmat*/ pACB->parent_dmat, /*alignment*/ 1, /*boundary*/ 0, @@ -3458,7 +3474,9 @@ trm_init(u_int16_t unit, device_t dev) TRM_MAX_SRB_CNT * sizeof(TRM_SRB), trm_mapSRB, pACB, /* flags */0); /* Create, allocate, and map DMA buffers for autosense data */ - if (bus_dma_tag_create(/*parent_dmat*/NULL, /*alignment*/1, + if (bus_dma_tag_create( + /*parent_dmat*/pACB->parent_dmat, + /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, @@ -3495,7 +3513,7 @@ trm_init(u_int16_t unit, device_t dev) } bzero(pACB->pFreeSRB, TRM_MAX_SRB_CNT * sizeof(TRM_SRB)); if (bus_dma_tag_create( - /*parent_dmat*/NULL, + /*parent_dmat*/pACB->parent_dmat, /*alignment*/ 1, /*boundary*/ 0, /*lowaddr*/ BUS_SPACE_MAXADDR, @@ -3546,6 +3564,8 @@ bad: bus_dma_tag_destroy(pACB->srb_dmat); if (pACB->buffer_dmat) bus_dma_tag_destroy(pACB->buffer_dmat); + if (pACB->parent_dmat) + bus_dma_tag_destroy(pACB->parent_dmat); return (NULL); } Modified: stable/9/sys/dev/twe/twe_freebsd.c ============================================================================== --- stable/9/sys/dev/twe/twe_freebsd.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/twe/twe_freebsd.c Fri Mar 16 08:46:58 2012 (r233024) @@ -225,7 +225,7 @@ twe_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/tws/tws.c ============================================================================== --- stable/9/sys/dev/tws/tws.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/tws/tws.c Fri Mar 16 08:46:58 2012 (r233024) @@ -521,7 +521,7 @@ tws_init(struct tws_softc *sc) TWS_MAX_32BIT_SG_ELEMENTS; dma_mem_size = (sizeof(struct tws_command_packet) * tws_queue_depth) + (TWS_SECTOR_SIZE) ; - if ( bus_dma_tag_create(NULL, /* parent */ + if ( bus_dma_tag_create(bus_get_dma_tag(sc->tws_dev), /* PCI parent */ TWS_ALIGNMENT, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ Modified: stable/9/sys/dev/ubsec/ubsec.c ============================================================================== --- stable/9/sys/dev/ubsec/ubsec.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/ubsec/ubsec.c Fri Mar 16 08:46:58 2012 (r233024) @@ -368,7 +368,7 @@ ubsec_attach(device_t dev) /* * Setup DMA descriptor area. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1854,7 +1854,7 @@ ubsec_dma_malloc( int r; /* XXX could specify sc_dmat as parent but that just adds overhead */ - r = bus_dma_tag_create(NULL, /* parent */ + r = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/9/sys/dev/wds/wd7000.c ============================================================================== --- stable/9/sys/dev/wds/wd7000.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/wds/wd7000.c Fri Mar 16 08:46:58 2012 (r233024) @@ -549,7 +549,7 @@ wds_attach(device_t dev) goto bad; /* now create the memory buffer */ - error = bus_dma_tag_create(NULL, /*alignment*/4, + error = bus_dma_tag_create(bus_get_dma_tag(dev), /*alignment*/4, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_24BIT, /*highaddr*/ BUS_SPACE_MAXADDR, Modified: stable/9/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- stable/9/sys/dev/xen/blkfront/blkfront.c Fri Mar 16 05:05:37 2012 (r233023) +++ stable/9/sys/dev/xen/blkfront/blkfront.c Fri Mar 16 08:46:58 2012 (r233024) @@ -650,7 +650,7 @@ blkfront_initialize(struct xb_softc *sc) sc->max_request_blocks = BLKIF_SEGS_TO_BLOCKS(sc->max_request_segments); /* Allocate datastructures based on negotiated values. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->xb_dev), /* parent */ 512, PAGE_SIZE, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 09:23:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6DCB1065670; Fri, 16 Mar 2012 09:23:00 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD7508FC16; Fri, 16 Mar 2012 09:23:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2G9N0iY009531; Fri, 16 Mar 2012 09:23:00 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2G9Mxkm009482; Fri, 16 Mar 2012 09:22:59 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201203160922.q2G9Mxkm009482@svn.freebsd.org> From: Scott Long Date: Fri, 16 Mar 2012 09:22: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: r233025 - in stable/8/sys/dev: advansys ahb aic7xxx amr an arcmsr asr buslogic ciss cxgb de dpt en glxsb hatm hifn hptiop hptmv ida if_ndis iir ips ipw ixgb ixgbe lmc mfi mge mlx mly mx... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 09:23:01 -0000 Author: scottl Date: Fri Mar 16 09:22:59 2012 New Revision: 233025 URL: http://svn.freebsd.org/changeset/base/233025 Log: MFC 232854,232874,232882,232883,232886 for bus_get_dma_tag() Modified: stable/8/sys/dev/advansys/adv_eisa.c stable/8/sys/dev/advansys/adv_isa.c stable/8/sys/dev/advansys/adv_pci.c stable/8/sys/dev/advansys/adw_pci.c stable/8/sys/dev/ahb/ahb.c stable/8/sys/dev/aic7xxx/ahc_eisa.c stable/8/sys/dev/aic7xxx/ahc_isa.c stable/8/sys/dev/aic7xxx/ahc_pci.c stable/8/sys/dev/aic7xxx/ahd_pci.c stable/8/sys/dev/amr/amr_pci.c stable/8/sys/dev/an/if_an_pci.c stable/8/sys/dev/arcmsr/arcmsr.c stable/8/sys/dev/asr/asr.c stable/8/sys/dev/buslogic/bt_pci.c stable/8/sys/dev/ciss/ciss.c stable/8/sys/dev/cxgb/cxgb_sge.c stable/8/sys/dev/de/if_de.c stable/8/sys/dev/dpt/dpt_pci.c stable/8/sys/dev/en/midway.c stable/8/sys/dev/glxsb/glxsb.c stable/8/sys/dev/hatm/if_hatm.c stable/8/sys/dev/hifn/hifn7751.c stable/8/sys/dev/hptiop/hptiop.c stable/8/sys/dev/hptmv/entry.c stable/8/sys/dev/ida/ida_pci.c stable/8/sys/dev/if_ndis/if_ndis_pci.c stable/8/sys/dev/iir/iir_pci.c stable/8/sys/dev/ips/ips_pci.c stable/8/sys/dev/ipw/if_ipw.c stable/8/sys/dev/ipw/if_ipwvar.h stable/8/sys/dev/ixgb/if_ixgb.c stable/8/sys/dev/ixgbe/ixgbe.c stable/8/sys/dev/ixgbe/ixv.c stable/8/sys/dev/lmc/if_lmc.c stable/8/sys/dev/mfi/mfi_pci.c stable/8/sys/dev/mge/if_mge.c stable/8/sys/dev/mlx/mlx_pci.c stable/8/sys/dev/mly/mly.c stable/8/sys/dev/mxge/if_mxge.c stable/8/sys/dev/nve/if_nve.c stable/8/sys/dev/patm/if_patm_attach.c stable/8/sys/dev/safe/safe.c stable/8/sys/dev/trm/trm.c stable/8/sys/dev/twe/twe_freebsd.c stable/8/sys/dev/tws/tws.c stable/8/sys/dev/ubsec/ubsec.c stable/8/sys/dev/wds/wd7000.c stable/8/sys/dev/xen/blkfront/blkfront.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/advansys/adv_eisa.c ============================================================================== --- stable/8/sys/dev/advansys/adv_eisa.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/advansys/adv_eisa.c Fri Mar 16 09:22:59 2012 (r233025) @@ -171,9 +171,8 @@ adv_eisa_attach(device_t dev) * Allocate a parent dmatag for all tags created * by the MI portions of the advansys driver */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADV_EISA_MAX_DMA_ADDR, @@ -211,9 +210,8 @@ adv_eisa_attach(device_t dev) * Allocate a parent dmatag for all tags created * by the MI portions of the advansys driver */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADV_EISA_MAX_DMA_ADDR, Modified: stable/8/sys/dev/advansys/adv_isa.c ============================================================================== --- stable/8/sys/dev/advansys/adv_isa.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/advansys/adv_isa.c Fri Mar 16 09:22:59 2012 (r233025) @@ -226,9 +226,8 @@ adv_isa_probe(device_t dev) * Allocate a parent dmatag for all tags created * by the MI portions of the advansys driver */ - /* XXX Should be a child of the ISA bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ lowaddr, Modified: stable/8/sys/dev/advansys/adv_pci.c ============================================================================== --- stable/8/sys/dev/advansys/adv_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/advansys/adv_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -187,9 +187,8 @@ adv_pci_attach(device_t dev) } /* Allocate a dmatag for our transfer DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADV_PCI_MAX_DMA_ADDR, Modified: stable/8/sys/dev/advansys/adw_pci.c ============================================================================== --- stable/8/sys/dev/advansys/adw_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/advansys/adw_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -258,9 +258,8 @@ adw_pci_attach(device_t dev) pci_write_config(dev, PCIR_COMMAND, command, /*bytes*/1); /* Allocate a dmatag for our transfer DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADW_PCI_MAX_DMA_ADDR, Modified: stable/8/sys/dev/ahb/ahb.c ============================================================================== --- stable/8/sys/dev/ahb/ahb.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/ahb/ahb.c Fri Mar 16 09:22:59 2012 (r233025) @@ -291,8 +291,7 @@ ahbattach(device_t dev) * need to perform during normal operation. */ /* DMA tag for mapping buffers into device visible space. */ - /* XXX Should be a child of the EISA bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, @@ -311,7 +310,7 @@ ahbattach(device_t dev) ahb->init_level++; /* DMA tag for our ccb structures and ha inquiry data */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/8/sys/dev/aic7xxx/ahc_eisa.c ============================================================================== --- stable/8/sys/dev/aic7xxx/ahc_eisa.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/aic7xxx/ahc_eisa.c Fri Mar 16 09:22:59 2012 (r233025) @@ -130,7 +130,6 @@ aic7770_attach(device_t dev) ahc_set_unit(ahc, device_get_unit(dev)); /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, Modified: stable/8/sys/dev/aic7xxx/ahc_isa.c ============================================================================== --- stable/8/sys/dev/aic7xxx/ahc_isa.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/aic7xxx/ahc_isa.c Fri Mar 16 09:22:59 2012 (r233025) @@ -253,7 +253,6 @@ ahc_isa_attach(device_t dev) ahc_set_unit(ahc, device_get_unit(dev)); /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the VLB/ISA bus dma tag */ error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, Modified: stable/8/sys/dev/aic7xxx/ahc_pci.c ============================================================================== --- stable/8/sys/dev/aic7xxx/ahc_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/aic7xxx/ahc_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -105,7 +105,6 @@ ahc_pci_attach(device_t dev) ahc->flags |= AHC_39BIT_ADDRESSING; /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, (ahc->flags & AHC_39BIT_ADDRESSING) Modified: stable/8/sys/dev/aic7xxx/ahd_pci.c ============================================================================== --- stable/8/sys/dev/aic7xxx/ahd_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/aic7xxx/ahd_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -107,7 +107,6 @@ ahd_pci_attach(device_t dev) ahd->flags |= AHD_39BIT_ADDRESSING; /* Allocate a dmatag for our SCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ error = aic_dma_tag_create(ahd, /*parent*/bus_get_dma_tag(dev), /*alignment*/1, /*boundary*/0, (ahd->flags & AHD_39BIT_ADDRESSING) Modified: stable/8/sys/dev/amr/amr_pci.c ============================================================================== --- stable/8/sys/dev/amr/amr_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/amr/amr_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -275,7 +275,7 @@ amr_pci_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment,boundary */ AMR_IS_SG64(sc) ? BUS_SPACE_MAXADDR : Modified: stable/8/sys/dev/an/if_an_pci.c ============================================================================== --- stable/8/sys/dev/an/if_an_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/an/if_an_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -209,7 +209,7 @@ an_attach_pci(dev) sc->an_mem_aux_bhandle = rman_get_bushandle(sc->mem_aux_res); /* Allocate DMA region */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev),/* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/arcmsr/arcmsr.c ============================================================================== --- stable/8/sys/dev/arcmsr/arcmsr.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/arcmsr/arcmsr.c Fri Mar 16 09:22:59 2012 (r233025) @@ -3486,7 +3486,7 @@ static u_int32_t arcmsr_initialize(devic return ENOMEM; } } - if(bus_dma_tag_create( /*parent*/ NULL, + if(bus_dma_tag_create( /*PCI parent*/ bus_get_dma_tag(dev), /*alignemnt*/ 1, /*boundary*/ 0, /*lowaddr*/ BUS_SPACE_MAXADDR, Modified: stable/8/sys/dev/asr/asr.c ============================================================================== --- stable/8/sys/dev/asr/asr.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/asr/asr.c Fri Mar 16 09:22:59 2012 (r233025) @@ -2328,7 +2328,7 @@ asr_alloc_dma(Asr_softc_t *sc) dev = sc->ha_dev; - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/buslogic/bt_pci.c ============================================================================== --- stable/8/sys/dev/buslogic/bt_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/buslogic/bt_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -172,8 +172,7 @@ bt_pci_attach(device_t dev) } /* Allocate a dmatag for our CCB DMA maps */ - /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/8/sys/dev/ciss/ciss.c ============================================================================== --- stable/8/sys/dev/ciss/ciss.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/ciss/ciss.c Fri Mar 16 09:22:59 2012 (r233025) @@ -795,7 +795,7 @@ setup: * Note that "simple" adapters can only address within a 32-bit * span. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->ciss_dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_sge.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/cxgb/cxgb_sge.c Fri Mar 16 09:22:59 2012 (r233025) @@ -591,7 +591,7 @@ t3_sge_alloc(adapter_t *sc) { /* The parent tag. */ - if (bus_dma_tag_create( NULL, /* parent */ + if (bus_dma_tag_create( bus_get_dma_tag(sc->dev),/* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/de/if_de.c ============================================================================== --- stable/8/sys/dev/de/if_de.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/de/if_de.c Fri Mar 16 09:22:59 2012 (r233025) @@ -4499,7 +4499,8 @@ tulip_busdma_allocring(device_t dev, tul /* First, setup a tag. */ ri->ri_max = count; size = count * sizeof(tulip_desc_t); - error = bus_dma_tag_create(NULL, 32, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 32, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size, 1, size, 0, NULL, NULL, &ri->ri_ring_tag); if (error) { @@ -4527,7 +4528,7 @@ tulip_busdma_allocring(device_t dev, tul } /* Allocate a tag for the data buffers. */ - error = bus_dma_tag_create(NULL, align, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), align, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * nsegs, nsegs, MCLBYTES, 0, NULL, NULL, &ri->ri_data_tag); if (error) { @@ -4607,7 +4608,7 @@ tulip_busdma_init(device_t dev, tulip_so /* * Allocate a DMA tag, memory, and map for setup descriptor */ - error = bus_dma_tag_create(NULL, 32, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), 32, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(sc->tulip_setupdata), 1, sizeof(sc->tulip_setupdata), 0, NULL, NULL, &sc->tulip_setup_tag); Modified: stable/8/sys/dev/dpt/dpt_pci.c ============================================================================== --- stable/8/sys/dev/dpt/dpt_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/dpt/dpt_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -132,8 +132,7 @@ dpt_pci_attach (device_t dev) dpt_alloc(dev); /* Allocate a dmatag representing the capabilities of this attachment */ - /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/8/sys/dev/en/midway.c ============================================================================== --- stable/8/sys/dev/en/midway.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/en/midway.c Fri Mar 16 09:22:59 2012 (r233025) @@ -2714,7 +2714,7 @@ en_dmaprobe(struct en_softc *sc) * Allocate some DMA-able memory. * We need 3 times the max burst size aligned to the max burst size. */ - err = bus_dma_tag_create(NULL, MIDDMA_MAXBURST, 0, + err = bus_dma_tag_create(bus_get_dma_tag(sc->dev), MIDDMA_MAXBURST, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, 3 * MIDDMA_MAXBURST, 1, 3 * MIDDMA_MAXBURST, 0, NULL, NULL, &tag); @@ -2927,7 +2927,7 @@ en_attach(struct en_softc *sc) MGET(sc->padbuf, M_WAIT, MT_DATA); bzero(sc->padbuf->m_data, MLEN); - if (bus_dma_tag_create(NULL, 1, 0, + if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, EN_TXSZ * 1024, EN_MAX_DMASEG, EN_TXSZ * 1024, 0, NULL, NULL, &sc->txtag)) Modified: stable/8/sys/dev/glxsb/glxsb.c ============================================================================== --- stable/8/sys/dev/glxsb/glxsb.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/glxsb/glxsb.c Fri Mar 16 09:22:59 2012 (r233025) @@ -397,7 +397,7 @@ glxsb_dma_alloc(struct glxsb_softc *sc) dma->dma_size = GLXSB_MAX_AES_LEN * 2; /* Setup DMA descriptor area */ - rc = bus_dma_tag_create(NULL, /* parent */ + rc = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ SB_AES_ALIGN, 0, /* alignments, bounds */ BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/hatm/if_hatm.c ============================================================================== --- stable/8/sys/dev/hatm/if_hatm.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/hatm/if_hatm.c Fri Mar 16 09:22:59 2012 (r233025) @@ -1721,7 +1721,7 @@ hatm_attach(device_t dev) /* * ALlocate a DMA tag for subsequent allocations */ - if (bus_dma_tag_create(NULL, 1, 0, + if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 1, @@ -1750,7 +1750,7 @@ hatm_attach(device_t dev) * but this would not work. So make the maximum number of TPDs * occupied by one packet a configuration parameter. */ - if (bus_dma_tag_create(NULL, 1, 0, + if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, HE_MAX_PDU, 3 * HE_CONFIG_MAX_TPD_PER_PACKET, HE_MAX_PDU, 0, NULL, NULL, &sc->tx_tag)) { Modified: stable/8/sys/dev/hifn/hifn7751.c ============================================================================== --- stable/8/sys/dev/hifn/hifn7751.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/hifn/hifn7751.c Fri Mar 16 09:22:59 2012 (r233025) @@ -450,7 +450,7 @@ hifn_attach(device_t dev) * Setup the area where the Hifn DMA's descriptors * and associated data structures. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment,boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/hptiop/hptiop.c ============================================================================== --- stable/8/sys/dev/hptiop/hptiop.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/hptiop/hptiop.c Fri Mar 16 09:22:59 2012 (r233025) @@ -1358,7 +1358,7 @@ static int hptiop_attach(device_t dev) mtx_init(&hba->lock, "hptioplock", NULL, MTX_DEF); #endif - if (bus_dma_tag_create(NULL,/* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev),/* PCI parent */ 1, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ Modified: stable/8/sys/dev/hptmv/entry.c ============================================================================== --- stable/8/sys/dev/hptmv/entry.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/hptmv/entry.c Fri Mar 16 09:22:59 2012 (r233025) @@ -1326,7 +1326,7 @@ init_adapter(IAL_ADAPTER_T *pAdapter) _vbus_p->OsExt = (void *)pAdapter; pMvSataAdapter->IALData = pAdapter; - if (bus_dma_tag_create(NULL,/* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(pAdapter->hpt_dev),/* parent */ 4, /* alignment */ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ Modified: stable/8/sys/dev/ida/ida_pci.c ============================================================================== --- stable/8/sys/dev/ida/ida_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/ida/ida_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -267,7 +267,7 @@ ida_pci_attach(device_t dev) } error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/8/sys/dev/if_ndis/if_ndis_pci.c ============================================================================== --- stable/8/sys/dev/if_ndis/if_ndis_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/if_ndis/if_ndis_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -284,7 +284,7 @@ ndis_attach_pci(dev) * Allocate the parent bus DMA tag appropriate for PCI. */ #define NDIS_NSEG_NEW 32 - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/iir/iir_pci.c ============================================================================== --- stable/8/sys/dev/iir/iir_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/iir/iir_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -318,8 +318,8 @@ iir_pci_attach(device_t dev) gdt->sc_test_busy = gdt_mpr_test_busy; /* Allocate a dmatag representing the capabilities of this attachment */ - /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create(/*parent*/NULL, /*alignemnt*/1, /*boundary*/0, + if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), + /*alignemnt*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, Modified: stable/8/sys/dev/ips/ips_pci.c ============================================================================== --- stable/8/sys/dev/ips/ips_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/ips/ips_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -135,7 +135,7 @@ static int ips_pci_attach(device_t dev) device_printf(dev, "irq setup failed\n"); goto error; } - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/8/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/8/sys/dev/ipw/if_ipw.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/ipw/if_ipw.c Fri Mar 16 09:22:59 2012 (r233025) @@ -526,9 +526,21 @@ ipw_dma_alloc(struct ipw_softc *sc) int error, i; /* + * Allocate parent DMA tag for subsequent allocations. + */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE_32BIT, BUS_SPACE_UNRESTRICTED, + BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &sc->parent_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create parent DMA tag\n"); + goto fail; + } + + /* * Allocate and map tx ring. */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, IPW_TBD_SZ, 1, IPW_TBD_SZ, 0, NULL, NULL, &sc->tbd_dmat); if (error != 0) { @@ -554,7 +566,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate and map rx ring. */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, IPW_RBD_SZ, 1, IPW_RBD_SZ, 0, NULL, NULL, &sc->rbd_dmat); if (error != 0) { @@ -580,7 +592,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate and map status ring. */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, IPW_STATUS_SZ, 1, IPW_STATUS_SZ, 0, NULL, NULL, &sc->status_dmat); if (error != 0) { @@ -609,7 +621,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate command DMA map. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof (struct ipw_cmd), 1, sizeof (struct ipw_cmd), 0, NULL, NULL, &sc->cmd_dmat); if (error != 0) { @@ -627,7 +639,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate headers DMA maps. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof (struct ipw_hdr), 1, sizeof (struct ipw_hdr), 0, NULL, NULL, &sc->hdr_dmat); if (error != 0) { @@ -650,7 +662,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Allocate tx buffers DMA maps. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, IPW_MAX_NSEG, MCLBYTES, 0, NULL, NULL, &sc->txbuf_dmat); if (error != 0) { @@ -682,7 +694,7 @@ ipw_dma_alloc(struct ipw_softc *sc) /* * Pre-allocate rx buffers and DMA maps. */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(sc->parent_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, MCLBYTES, 0, NULL, NULL, &sc->rxbuf_dmat); if (error != 0) { @@ -739,6 +751,10 @@ ipw_release(struct ipw_softc *sc) struct ipw_soft_buf *sbuf; int i; + if (sc->parent_dmat != NULL) { + bus_dma_tag_destroy(sc->parent_dmat); + } + if (sc->tbd_dmat != NULL) { if (sc->stbd_list != NULL) { bus_dmamap_unload(sc->tbd_dmat, sc->tbd_map); Modified: stable/8/sys/dev/ipw/if_ipwvar.h ============================================================================== --- stable/8/sys/dev/ipw/if_ipwvar.h Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/ipw/if_ipwvar.h Fri Mar 16 09:22:59 2012 (r233025) @@ -117,6 +117,7 @@ struct ipw_softc { int sc_tx_timer; int sc_scan_timer; + bus_dma_tag_t parent_dmat; bus_dma_tag_t tbd_dmat; bus_dma_tag_t rbd_dmat; bus_dma_tag_t status_dmat; Modified: stable/8/sys/dev/ixgb/if_ixgb.c ============================================================================== --- stable/8/sys/dev/ixgb/if_ixgb.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/ixgb/if_ixgb.c Fri Mar 16 09:22:59 2012 (r233025) @@ -1442,7 +1442,7 @@ ixgb_dma_malloc(struct adapter * adapter { int r; - r = bus_dma_tag_create(NULL, /* parent */ + r = bus_dma_tag_create(bus_get_dma_tag(adapter->dev), /* parent */ PAGE_SIZE, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1534,7 +1534,7 @@ ixgb_setup_transmit_structures(struct ad /* * Setup DMA descriptor areas. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(adapter->dev), /* parent */ PAGE_SIZE, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1872,7 +1872,7 @@ ixgb_allocate_receive_structures(struct bzero(adapter->rx_buffer_area, sizeof(struct ixgb_buffer) * adapter->num_rx_desc); - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(adapter->dev),/* parent */ PAGE_SIZE, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/ixgbe/ixgbe.c Fri Mar 16 09:22:59 2012 (r233025) @@ -2846,7 +2846,8 @@ ixgbe_allocate_transmit_buffers(struct t /* * Setup DMA descriptor areas. */ - if ((error = bus_dma_tag_create(NULL, /* parent */ + if ((error = bus_dma_tag_create( + bus_get_dma_tag(adapter->dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixv.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/ixgbe/ixv.c Fri Mar 16 09:22:59 2012 (r233025) @@ -2158,7 +2158,8 @@ ixv_allocate_transmit_buffers(struct tx_ /* * Setup DMA descriptor areas. */ - if ((error = bus_dma_tag_create(NULL, /* parent */ + if ((error = bus_dma_tag_create( + bus_get_dma_tag(adapter->dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/lmc/if_lmc.c ============================================================================== --- stable/8/sys/dev/lmc/if_lmc.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/lmc/if_lmc.c Fri Mar 16 09:22:59 2012 (r233025) @@ -2621,7 +2621,8 @@ create_ring(softc_t *sc, struct desc_rin #ifdef __FreeBSD__ /* Create a DMA tag for descriptors and buffers. */ - if ((error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, PAGE_SIZE, 2, PAGE_SIZE, BUS_DMA_ALLOCNOW, # if (__FreeBSD_version >= 502000) NULL, NULL, Modified: stable/8/sys/dev/mfi/mfi_pci.c ============================================================================== --- stable/8/sys/dev/mfi/mfi_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/mfi/mfi_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -216,7 +216,7 @@ mfi_pci_attach(device_t dev) error = ENOMEM; /* Allocate parent DMA tag */ - if (bus_dma_tag_create( NULL, /* parent */ + if (bus_dma_tag_create( bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/mge/if_mge.c ============================================================================== --- stable/8/sys/dev/mge/if_mge.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/mge/if_mge.c Fri Mar 16 09:22:59 2012 (r233025) @@ -422,7 +422,7 @@ mge_alloc_desc_dma(struct mge_softc *sc, tab[size - 1].mge_desc->next_desc = desc_paddr; /* Allocate a busdma tag for mbufs. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), /* parent */ 8, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -460,7 +460,7 @@ mge_allocate_dma(struct mge_softc *sc) int i; /* Allocate a busdma tag and DMA safe memory for TX/RX descriptors. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), /* parent */ 16, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/mlx/mlx_pci.c ============================================================================== --- stable/8/sys/dev/mlx/mlx_pci.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/mlx/mlx_pci.c Fri Mar 16 09:22:59 2012 (r233025) @@ -189,7 +189,7 @@ mlx_pci_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/mly/mly.c ============================================================================== --- stable/8/sys/dev/mly/mly.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/mly/mly.c Fri Mar 16 09:22:59 2012 (r233025) @@ -392,7 +392,7 @@ mly_pci_attach(struct mly_softc *sc) * * Note that all of these controllers are 64-bit capable. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->mly_dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/8/sys/dev/mxge/if_mxge.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/mxge/if_mxge.c Fri Mar 16 09:22:59 2012 (r233025) @@ -4664,7 +4664,7 @@ mxge_attach(device_t dev) goto abort_with_nothing; } - err = bus_dma_tag_create(NULL, /* parent */ + err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR, /* low */ Modified: stable/8/sys/dev/nve/if_nve.c ============================================================================== --- stable/8/sys/dev/nve/if_nve.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/nve/if_nve.c Fri Mar 16 09:22:59 2012 (r233025) @@ -371,7 +371,8 @@ nve_attach(device_t dev) goto fail; } /* Allocate DMA tags */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * NV_MAX_FRAGS, NV_MAX_FRAGS, MCLBYTES, 0, busdma_lock_mutex, &Giant, @@ -380,7 +381,8 @@ nve_attach(device_t dev) device_printf(dev, "couldn't allocate dma tag\n"); goto fail; } - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct nve_rx_desc) * RX_RING_SIZE, 1, sizeof(struct nve_rx_desc) * RX_RING_SIZE, 0, @@ -390,7 +392,8 @@ nve_attach(device_t dev) device_printf(dev, "couldn't allocate dma tag\n"); goto fail; } - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct nve_tx_desc) * TX_RING_SIZE, 1, sizeof(struct nve_tx_desc) * TX_RING_SIZE, 0, Modified: stable/8/sys/dev/patm/if_patm_attach.c ============================================================================== --- stable/8/sys/dev/patm/if_patm_attach.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/patm/if_patm_attach.c Fri Mar 16 09:22:59 2012 (r233025) @@ -404,7 +404,7 @@ patm_attach(device_t dev) * Don't use BUS_DMA_ALLOCNOW, because we never need bouncing with * bus_dmamem_alloc() */ - error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct patm_scd), 1, sizeof(struct patm_scd), 0, NULL, NULL, &sc->scd_tag); @@ -774,7 +774,8 @@ patm_sq_init(struct patm_softc *sc) * Don't use BUS_DMA_ALLOCNOW, because we never need bouncing with * bus_dmamem_alloc() */ - error = bus_dma_tag_create(NULL, PATM_SQ_ALIGNMENT, 0, + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), + PATM_SQ_ALIGNMENT, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sc->sq_size, 1, sc->sq_size, 0, NULL, NULL, &sc->sq_tag); @@ -827,7 +828,7 @@ patm_rbuf_init(struct patm_softc *sc) * Don't use BUS_DMA_ALLOCNOW, because we never need bouncing with * bus_dmamem_alloc() */ - if ((error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, + if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, SMBUF_PAGE_SIZE, 1, SMBUF_PAGE_SIZE, 0, NULL, NULL, &sc->sbuf_tag)) != 0) { @@ -855,7 +856,7 @@ patm_rbuf_init(struct patm_softc *sc) * maps using one tag. Rather use BUS_DMA_NOWAIT when loading the map * to prevent EINPROGRESS. */ - if ((error = bus_dma_tag_create(NULL, 4, 0, + if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, MCLBYTES, 0, NULL, NULL, &sc->lbuf_tag)) != 0) { @@ -900,7 +901,7 @@ patm_txmap_init(struct patm_softc *sc) struct patm_txmap *map; /* get transmission tag */ - error = bus_dma_tag_create(NULL, 1, 0, + error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, 65536, IDT_SCQ_SIZE - 1, 65536, 0, NULL, NULL, &sc->tx_tag); Modified: stable/8/sys/dev/safe/safe.c ============================================================================== --- stable/8/sys/dev/safe/safe.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/safe/safe.c Fri Mar 16 09:22:59 2012 (r233025) @@ -287,7 +287,7 @@ safe_attach(device_t dev) /* * Setup DMA descriptor area. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ SAFE_DMA_BOUNDARY, /* boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ @@ -302,7 +302,7 @@ safe_attach(device_t dev) device_printf(dev, "cannot allocate DMA tag\n"); goto bad4; } - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ SAFE_MAX_DSIZE, /* boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ @@ -1802,7 +1802,7 @@ safe_dma_malloc( { int r; - r = bus_dma_tag_create(NULL, /* parent */ + r = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ sizeof(u_int32_t), 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/trm/trm.c ============================================================================== --- stable/8/sys/dev/trm/trm.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/trm/trm.c Fri Mar 16 09:22:59 2012 (r233025) @@ -3415,6 +3415,22 @@ trm_init(u_int16_t unit, device_t dev) pACB->tag = rman_get_bustag(pACB->iores); pACB->bsh = rman_get_bushandle(pACB->iores); if (bus_dma_tag_create( + /*parent_dmat*/ bus_get_dma_tag(dev), + /*alignment*/ 1, + /*boundary*/ 0, + /*lowaddr*/ BUS_SPACE_MAXADDR, + /*highaddr*/ BUS_SPACE_MAXADDR, + /*filter*/ NULL, + /*filterarg*/ NULL, + /*maxsize*/ BUS_SPACE_MAXSIZE_32BIT, + /*nsegments*/ BUS_SPACE_UNRESTRICTED, + /*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT, + /*flags*/ 0, + /*lockfunc*/ NULL, + /*lockarg*/ NULL, + /* dmat */ &pACB->parent_dmat) != 0) + goto bad; + if (bus_dma_tag_create( /*parent_dmat*/ pACB->parent_dmat, /*alignment*/ 1, /*boundary*/ 0, @@ -3458,7 +3474,9 @@ trm_init(u_int16_t unit, device_t dev) TRM_MAX_SRB_CNT * sizeof(TRM_SRB), trm_mapSRB, pACB, /* flags */0); /* Create, allocate, and map DMA buffers for autosense data */ - if (bus_dma_tag_create(/*parent_dmat*/NULL, /*alignment*/1, + if (bus_dma_tag_create( + /*parent_dmat*/pACB->parent_dmat, + /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, @@ -3495,7 +3513,7 @@ trm_init(u_int16_t unit, device_t dev) } bzero(pACB->pFreeSRB, TRM_MAX_SRB_CNT * sizeof(TRM_SRB)); if (bus_dma_tag_create( - /*parent_dmat*/NULL, + /*parent_dmat*/pACB->parent_dmat, /*alignment*/ 1, /*boundary*/ 0, /*lowaddr*/ BUS_SPACE_MAXADDR, @@ -3546,6 +3564,8 @@ bad: bus_dma_tag_destroy(pACB->srb_dmat); if (pACB->buffer_dmat) bus_dma_tag_destroy(pACB->buffer_dmat); + if (pACB->parent_dmat) + bus_dma_tag_destroy(pACB->parent_dmat); return (NULL); } Modified: stable/8/sys/dev/twe/twe_freebsd.c ============================================================================== --- stable/8/sys/dev/twe/twe_freebsd.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/twe/twe_freebsd.c Fri Mar 16 09:22:59 2012 (r233025) @@ -225,7 +225,7 @@ twe_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/tws/tws.c ============================================================================== --- stable/8/sys/dev/tws/tws.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/tws/tws.c Fri Mar 16 09:22:59 2012 (r233025) @@ -521,7 +521,7 @@ tws_init(struct tws_softc *sc) TWS_MAX_32BIT_SG_ELEMENTS; dma_mem_size = (sizeof(struct tws_command_packet) * tws_queue_depth) + (TWS_SECTOR_SIZE) ; - if ( bus_dma_tag_create(NULL, /* parent */ + if ( bus_dma_tag_create(bus_get_dma_tag(sc->tws_dev), /* PCI parent */ TWS_ALIGNMENT, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ Modified: stable/8/sys/dev/ubsec/ubsec.c ============================================================================== --- stable/8/sys/dev/ubsec/ubsec.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/ubsec/ubsec.c Fri Mar 16 09:22:59 2012 (r233025) @@ -368,7 +368,7 @@ ubsec_attach(device_t dev) /* * Setup DMA descriptor area. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1854,7 +1854,7 @@ ubsec_dma_malloc( int r; /* XXX could specify sc_dmat as parent but that just adds overhead */ - r = bus_dma_tag_create(NULL, /* parent */ + r = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/8/sys/dev/wds/wd7000.c ============================================================================== --- stable/8/sys/dev/wds/wd7000.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/wds/wd7000.c Fri Mar 16 09:22:59 2012 (r233025) @@ -549,7 +549,7 @@ wds_attach(device_t dev) goto bad; /* now create the memory buffer */ - error = bus_dma_tag_create(NULL, /*alignment*/4, + error = bus_dma_tag_create(bus_get_dma_tag(dev), /*alignment*/4, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_24BIT, /*highaddr*/ BUS_SPACE_MAXADDR, Modified: stable/8/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- stable/8/sys/dev/xen/blkfront/blkfront.c Fri Mar 16 08:46:58 2012 (r233024) +++ stable/8/sys/dev/xen/blkfront/blkfront.c Fri Mar 16 09:22:59 2012 (r233025) @@ -650,7 +650,7 @@ blkfront_initialize(struct xb_softc *sc) sc->max_request_blocks = BLKIF_SEGS_TO_BLOCKS(sc->max_request_segments); /* Allocate datastructures based on negotiated values. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->xb_dev), /* parent */ 512, PAGE_SIZE, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 10:10:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F23F8106566B; Fri, 16 Mar 2012 10:10:17 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD8598FC16; Fri, 16 Mar 2012 10:10:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GAAHCC011019; Fri, 16 Mar 2012 10:10:17 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GAAHZY011017; Fri, 16 Mar 2012 10:10:17 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201203161010.q2GAAHZY011017@svn.freebsd.org> From: Tijl Coosemans Date: Fri, 16 Mar 2012 10:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233026 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 10:10:18 -0000 Author: tijl Date: Fri Mar 16 10:10:17 2012 New Revision: 233026 URL: http://svn.freebsd.org/changeset/base/233026 Log: Remove prototypes of _amd64_get_fsbase et al. The functions were removed in r145571. Modified: head/sys/i386/include/sysarch.h Modified: head/sys/i386/include/sysarch.h ============================================================================== --- head/sys/i386/include/sysarch.h Fri Mar 16 09:22:59 2012 (r233025) +++ head/sys/i386/include/sysarch.h Fri Mar 16 10:10:17 2012 (r233026) @@ -49,12 +49,6 @@ #define I386_SET_GSBASE 10 #define I386_GET_XFPUSTATE 11 -/* These four only exist when running an i386 binary on amd64 */ -#define _AMD64_GET_FSBASE 128 -#define _AMD64_SET_FSBASE 129 -#define _AMD64_GET_GSBASE 130 -#define _AMD64_SET_GSBASE 131 - struct i386_ldt_args { unsigned int start; union descriptor *descs; @@ -84,11 +78,6 @@ union descriptor; struct dbreg; __BEGIN_DECLS -/* These four only exist when running an i386 binary on amd64 */ -int _amd64_get_fsbase(void **); -int _amd64_get_gsbase(void **); -int _amd64_set_fsbase(void *); -int _amd64_set_gsbase(void *); int i386_get_ldt(int, union descriptor *, int); int i386_set_ldt(int, union descriptor *, int); int i386_get_ioperm(unsigned int, unsigned int *, int *); From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 10:51:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 796361065676; Fri, 16 Mar 2012 10:51: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 599148FC14; Fri, 16 Mar 2012 10:51:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GAphde014549; Fri, 16 Mar 2012 10:51:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GAphAJ014544; Fri, 16 Mar 2012 10:51:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203161051.q2GAphAJ014544@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Mar 2012 10:51:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233027 - in stable/9/sys: kern sys ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 10:51:43 -0000 Author: kib Date: Fri Mar 16 10:51:42 2012 New Revision: 233027 URL: http://svn.freebsd.org/changeset/base/233027 Log: MFC r232709: Decomission mnt_noasync. Introduce MNTK_NOASYNC mnt_kern_flag which allows a filesystem to request VFS to not allow MNTK_ASYNC. MFC note: the mnt_noasync member of struct mount is left as padding to preserve the structure layout. Modified: stable/9/sys/kern/vfs_mount.c stable/9/sys/kern/vfs_subr.c stable/9/sys/sys/mount.h stable/9/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_mount.c ============================================================================== --- stable/9/sys/kern/vfs_mount.c Fri Mar 16 10:10:17 2012 (r233026) +++ stable/9/sys/kern/vfs_mount.c Fri Mar 16 10:51:42 2012 (r233027) @@ -836,7 +836,8 @@ vfs_domount_first( mp->mnt_optnew = NULL; MNT_ILOCK(mp); - if ((mp->mnt_flag & MNT_ASYNC) != 0 && mp->mnt_noasync == 0) + if ((mp->mnt_flag & MNT_ASYNC) != 0 && + (mp->mnt_kern_flag & MNTK_NOASYNC) == 0) mp->mnt_kern_flag |= MNTK_ASYNC; else mp->mnt_kern_flag &= ~MNTK_ASYNC; @@ -976,7 +977,8 @@ vfs_domount_update( */ mp->mnt_flag = (mp->mnt_flag & MNT_QUOTA) | (flag & ~MNT_QUOTA); } - if ((mp->mnt_flag & MNT_ASYNC) != 0 && mp->mnt_noasync == 0) + if ((mp->mnt_flag & MNT_ASYNC) != 0 && + (mp->mnt_kern_flag & MNTK_NOASYNC) == 0) mp->mnt_kern_flag |= MNTK_ASYNC; else mp->mnt_kern_flag &= ~MNTK_ASYNC; @@ -1336,7 +1338,8 @@ dounmount(mp, flags, td) } mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_UNMOUNTF); mp->mnt_flag |= async_flag; - if ((mp->mnt_flag & MNT_ASYNC) != 0 && mp->mnt_noasync == 0) + if ((mp->mnt_flag & MNT_ASYNC) != 0 && + (mp->mnt_kern_flag & MNTK_NOASYNC) == 0) mp->mnt_kern_flag |= MNTK_ASYNC; if (mp->mnt_kern_flag & MNTK_MWAIT) { mp->mnt_kern_flag &= ~MNTK_MWAIT; Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Fri Mar 16 10:10:17 2012 (r233026) +++ stable/9/sys/kern/vfs_subr.c Fri Mar 16 10:51:42 2012 (r233027) @@ -2940,6 +2940,7 @@ DB_SHOW_COMMAND(mount, db_show_mount) MNT_KERN_FLAG(MNTK_REFEXPIRE); MNT_KERN_FLAG(MNTK_EXTENDED_SHARED); MNT_KERN_FLAG(MNTK_SHARED_WRITES); + MNT_KERN_FLAG(MNTK_NOASYNC); MNT_KERN_FLAG(MNTK_UNMOUNT); MNT_KERN_FLAG(MNTK_MWAIT); MNT_KERN_FLAG(MNTK_SUSPEND); @@ -2992,7 +2993,6 @@ DB_SHOW_COMMAND(mount, db_show_mount) db_printf(" mnt_gen = %d\n", mp->mnt_gen); db_printf(" mnt_nvnodelistsize = %d\n", mp->mnt_nvnodelistsize); db_printf(" mnt_writeopcount = %d\n", mp->mnt_writeopcount); - db_printf(" mnt_noasync = %u\n", mp->mnt_noasync); db_printf(" mnt_maxsymlinklen = %d\n", mp->mnt_maxsymlinklen); db_printf(" mnt_iosize_max = %d\n", mp->mnt_iosize_max); db_printf(" mnt_hashseed = %u\n", mp->mnt_hashseed); Modified: stable/9/sys/sys/mount.h ============================================================================== --- stable/9/sys/sys/mount.h Fri Mar 16 10:10:17 2012 (r233026) +++ stable/9/sys/sys/mount.h Fri Mar 16 10:51:42 2012 (r233027) @@ -167,7 +167,7 @@ struct mount { int mnt_writeopcount; /* (i) write syscalls pending */ int mnt_kern_flag; /* (i) kernel only flags */ uint64_t mnt_flag; /* (i) flags shared with user */ - u_int mnt_noasync; /* (i) # noasync overrides */ + u_int mnt_pad_noasync; struct vfsoptlist *mnt_opt; /* current mount options */ struct vfsoptlist *mnt_optnew; /* new options passed to fs */ int mnt_maxsymlinklen; /* max size of short symlink */ @@ -325,6 +325,7 @@ void __mnt_vnode_markerfree(str #define MNTK_REFEXPIRE 0x00000020 /* refcount expiring is happening */ #define MNTK_EXTENDED_SHARED 0x00000040 /* Allow shared locking for more ops */ #define MNTK_SHARED_WRITES 0x00000080 /* Allow shared locking for writes */ +#define MNTK_NOASYNC 0x00800000 /* disable async */ #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ #define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ #define MNTK_SUSPEND 0x08000000 /* request write suspension */ Modified: stable/9/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_softdep.c Fri Mar 16 10:10:17 2012 (r233026) +++ stable/9/sys/ufs/ffs/ffs_softdep.c Fri Mar 16 10:51:42 2012 (r233027) @@ -2367,8 +2367,7 @@ softdep_mount(devvp, mp, fs, cred) mp->mnt_flag = (mp->mnt_flag & ~MNT_ASYNC) | MNT_SOFTDEP; if ((mp->mnt_kern_flag & MNTK_SOFTDEP) == 0) { mp->mnt_kern_flag = (mp->mnt_kern_flag & ~MNTK_ASYNC) | - MNTK_SOFTDEP; - mp->mnt_noasync++; + MNTK_SOFTDEP | MNTK_NOASYNC; } MNT_IUNLOCK(mp); ump = VFSTOUFS(mp); From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 10:59:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4ADA6106566C; Fri, 16 Mar 2012 10:59:05 +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 34FDE8FC0A; Fri, 16 Mar 2012 10:59:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GAx5P7014827; Fri, 16 Mar 2012 10:59:05 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GAx4Ae014825; Fri, 16 Mar 2012 10:59:05 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203161059.q2GAx4Ae014825@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Mar 2012 10:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233028 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 10:59:05 -0000 Author: kib Date: Fri Mar 16 10:59:04 2012 New Revision: 233028 URL: http://svn.freebsd.org/changeset/base/233028 Log: MFC r232947: Lock the process around manipulations with p_flag. Modified: stable/9/sys/kern/kern_exit.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_exit.c ============================================================================== --- stable/9/sys/kern/kern_exit.c Fri Mar 16 10:51:42 2012 (r233027) +++ stable/9/sys/kern/kern_exit.c Fri Mar 16 10:59:04 2012 (r233028) @@ -738,10 +738,12 @@ proc_reap(struct thread *td, struct proc LIST_REMOVE(p, p_list); /* off zombproc */ sx_xunlock(&allproc_lock); LIST_REMOVE(p, p_sibling); + PROC_LOCK(p); if (p->p_flag & P_ORPHAN) { LIST_REMOVE(p, p_orphan); p->p_flag &= ~P_ORPHAN; } + PROC_UNLOCK(p); leavepgrp(p); #ifdef PROCDESC if (p->p_procdesc != NULL) From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 11:00:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A95EC1065670; Fri, 16 Mar 2012 11:00:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93AAF8FC16; Fri, 16 Mar 2012 11:00:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GB0t7l014954; Fri, 16 Mar 2012 11:00:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GB0tD6014952; Fri, 16 Mar 2012 11:00:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203161100.q2GB0tD6014952@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Mar 2012 11:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233029 - stable/9/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: Fri, 16 Mar 2012 11:00:55 -0000 Author: kib Date: Fri Mar 16 11:00:55 2012 New Revision: 233029 URL: http://svn.freebsd.org/changeset/base/233029 Log: MFC r232729: Remove the use of toupper() from rtld_printf.c. Modified: stable/9/libexec/rtld-elf/rtld_printf.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld_printf.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld_printf.c Fri Mar 16 10:59:04 2012 (r233028) +++ stable/9/libexec/rtld-elf/rtld_printf.c Fri Mar 16 11:00:55 2012 (r233029) @@ -36,7 +36,6 @@ */ #include -#include #include #include #include @@ -90,8 +89,10 @@ snprintf_func(int ch, struct snprintf_ar } } -static char const hex2ascii_data[] = "0123456789abcdefghijklmnopqrstuvwxyz"; -#define hex2ascii(hex) (hex2ascii_data[hex]) +static char const hex2ascii_lower[] = "0123456789abcdefghijklmnopqrstuvwxyz"; +static char const hex2ascii_upper[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +#define hex2ascii(hex) (hex2ascii_lower[hex]) +#define hex2ascii_upper(hex) (hex2ascii_upper[hex]) static __inline int imax(int a, int b) @@ -108,8 +109,9 @@ ksprintn(char *nbuf, uintmax_t num, int p = nbuf; *p = '\0'; do { - c = hex2ascii(num % base); - *++p = upper ? toupper(c) : c; + c = upper ? hex2ascii_upper(num % base) : + hex2ascii(num % base); + *++p = c; } while (num /= base); if (lenp) *lenp = p - nbuf; From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 12:13:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 426F3106566B; Fri, 16 Mar 2012 12:13:45 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B93B8FC0C; Fri, 16 Mar 2012 12:13:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GCDjqu017259; Fri, 16 Mar 2012 12:13:45 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GCDiIq017252; Fri, 16 Mar 2012 12:13:44 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201203161213.q2GCDiIq017252@svn.freebsd.org> From: Takahashi Yoshihiro Date: Fri, 16 Mar 2012 12:13: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: r233031 - in head/sys: conf i386/i386 pc98/pc98 x86/isa x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 12:13:45 -0000 Author: nyan Date: Fri Mar 16 12:13:44 2012 New Revision: 233031 URL: http://svn.freebsd.org/changeset/base/233031 Log: - Fix to build a native i386 kernel without the SMP and atpic. - Merge r232744 changes to pc98. (Allow a kernel to be built with 'nodevice atpic'.) - Move ICU related defines from x86/isa/atpic.c to x86/isa/icu.h and use them in x86/x86/intr_machdep.c. Reviewed by: jhb Modified: head/sys/conf/files.pc98 head/sys/i386/i386/machdep.c head/sys/pc98/pc98/machdep.c head/sys/x86/isa/atpic.c head/sys/x86/isa/icu.h head/sys/x86/x86/intr_machdep.c Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Fri Mar 16 11:17:36 2012 (r233030) +++ head/sys/conf/files.pc98 Fri Mar 16 12:13:44 2012 (r233031) @@ -226,7 +226,7 @@ pc98/cbus/gdc.c optional gdc pc98/cbus/nmi.c standard pc98/cbus/olpt.c optional olpt pc98/cbus/pckbd.c optional pckbd -pc98/cbus/pcrtc.c optional atpic +pc98/cbus/pcrtc.c standard pc98/cbus/pmc.c optional pmc pc98/cbus/scgdcrndr.c optional sc gdc pc98/cbus/scterm-sck.c optional sc Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Fri Mar 16 11:17:36 2012 (r233030) +++ head/sys/i386/i386/machdep.c Fri Mar 16 12:13:44 2012 (r233031) @@ -40,6 +40,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_apic.h" #include "opt_atalk.h" #include "opt_atpic.h" #include "opt_compat.h" @@ -136,6 +137,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef DEV_APIC +#include +#endif + #ifdef DEV_ISA #include #endif Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Fri Mar 16 11:17:36 2012 (r233030) +++ head/sys/pc98/pc98/machdep.c Fri Mar 16 12:13:44 2012 (r233031) @@ -40,7 +40,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_apic.h" #include "opt_atalk.h" +#include "opt_atpic.h" #include "opt_compat.h" #include "opt_cpu.h" #include "opt_ddb.h" @@ -132,6 +134,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef DEV_APIC +#include +#endif + #ifdef DEV_ISA #include #endif @@ -2296,7 +2302,21 @@ init386(first) printf("WARNING: loader(8) metadata is missing!\n"); #ifdef DEV_ISA +#ifdef DEV_ATPIC atpic_startup(); +#else + /* Reset and mask the atpics and leave them shut down. */ + atpic_reset(); + + /* + * Point the ICU spurious interrupt vectors at the APIC spurious + * interrupt handler. + */ + setidt(IDT_IO_INTS + 7, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + setidt(IDT_IO_INTS + 15, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); +#endif #endif #ifdef DDB Modified: head/sys/x86/isa/atpic.c ============================================================================== --- head/sys/x86/isa/atpic.c Fri Mar 16 11:17:36 2012 (r233030) +++ head/sys/x86/isa/atpic.c Fri Mar 16 12:13:44 2012 (r233031) @@ -72,48 +72,6 @@ __FBSDID("$FreeBSD$"); #define MASTER 0 #define SLAVE 1 -/* - * PC-98 machines wire the slave 8259A to pin 7 on the master PIC, and - * PC-AT machines wire the slave PIC to pin 2 on the master PIC. - */ -#ifdef PC98 -#define ICU_SLAVEID 7 -#else -#define ICU_SLAVEID 2 -#endif - -/* - * Determine the base master and slave modes not including auto EOI support. - * All machines that FreeBSD supports use 8086 mode. - */ -#ifdef PC98 -/* - * PC-98 machines do not support auto EOI on the second PIC. Also, it - * seems that PC-98 machine PICs use buffered mode, and the master PIC - * uses special fully nested mode. - */ -#define BASE_MASTER_MODE (ICW4_SFNM | ICW4_BUF | ICW4_MS | ICW4_8086) -#define BASE_SLAVE_MODE (ICW4_BUF | ICW4_8086) -#else -#define BASE_MASTER_MODE ICW4_8086 -#define BASE_SLAVE_MODE ICW4_8086 -#endif - -/* Enable automatic EOI if requested. */ -#ifdef AUTO_EOI_1 -#define MASTER_MODE (BASE_MASTER_MODE | ICW4_AEOI) -#else -#define MASTER_MODE BASE_MASTER_MODE -#endif -#ifdef AUTO_EOI_2 -#define SLAVE_MODE (BASE_SLAVE_MODE | ICW4_AEOI) -#else -#define SLAVE_MODE BASE_SLAVE_MODE -#endif - -#define IRQ_MASK(irq) (1 << (irq)) -#define IMEN_MASK(ai) (IRQ_MASK((ai)->at_irq)) - #define NUM_ISA_IRQS 16 static void atpic_init(void *dummy); Modified: head/sys/x86/isa/icu.h ============================================================================== --- head/sys/x86/isa/icu.h Fri Mar 16 11:17:36 2012 (r233030) +++ head/sys/x86/isa/icu.h Fri Mar 16 12:13:44 2012 (r233031) @@ -47,6 +47,48 @@ #define ICU_IMR_OFFSET 1 #endif +/* + * PC-98 machines wire the slave 8259A to pin 7 on the master PIC, and + * PC-AT machines wire the slave PIC to pin 2 on the master PIC. + */ +#ifdef PC98 +#define ICU_SLAVEID 7 +#else +#define ICU_SLAVEID 2 +#endif + +/* + * Determine the base master and slave modes not including auto EOI support. + * All machines that FreeBSD supports use 8086 mode. + */ +#ifdef PC98 +/* + * PC-98 machines do not support auto EOI on the second PIC. Also, it + * seems that PC-98 machine PICs use buffered mode, and the master PIC + * uses special fully nested mode. + */ +#define BASE_MASTER_MODE (ICW4_SFNM | ICW4_BUF | ICW4_MS | ICW4_8086) +#define BASE_SLAVE_MODE (ICW4_BUF | ICW4_8086) +#else +#define BASE_MASTER_MODE ICW4_8086 +#define BASE_SLAVE_MODE ICW4_8086 +#endif + +/* Enable automatic EOI if requested. */ +#ifdef AUTO_EOI_1 +#define MASTER_MODE (BASE_MASTER_MODE | ICW4_AEOI) +#else +#define MASTER_MODE BASE_MASTER_MODE +#endif +#ifdef AUTO_EOI_2 +#define SLAVE_MODE (BASE_SLAVE_MODE | ICW4_AEOI) +#else +#define SLAVE_MODE BASE_SLAVE_MODE +#endif + +#define IRQ_MASK(irq) (1 << (irq)) +#define IMEN_MASK(ai) (IRQ_MASK((ai)->at_irq)) + void atpic_handle_intr(u_int vector, struct trapframe *frame); void atpic_startup(void); Modified: head/sys/x86/x86/intr_machdep.c ============================================================================== --- head/sys/x86/x86/intr_machdep.c Fri Mar 16 11:17:36 2012 (r233030) +++ head/sys/x86/x86/intr_machdep.c Fri Mar 16 12:13:44 2012 (r233031) @@ -63,8 +63,12 @@ #include #include #include +#ifdef PC98 +#include +#else #include #endif +#endif #define MAX_STRAY_LOG 5 @@ -391,15 +395,15 @@ atpic_reset(void) outb(IO_ICU1, ICW1_RESET | ICW1_IC4); outb(IO_ICU1 + ICU_IMR_OFFSET, IDT_IO_INTS); - outb(IO_ICU1 + ICU_IMR_OFFSET, 1 << 2); - outb(IO_ICU1 + ICU_IMR_OFFSET, ICW4_8086); + outb(IO_ICU1 + ICU_IMR_OFFSET, IRQ_MASK(ICU_SLAVEID)); + outb(IO_ICU1 + ICU_IMR_OFFSET, MASTER_MODE); outb(IO_ICU1 + ICU_IMR_OFFSET, 0xff); outb(IO_ICU1, OCW3_SEL | OCW3_RR); outb(IO_ICU2, ICW1_RESET | ICW1_IC4); outb(IO_ICU2 + ICU_IMR_OFFSET, IDT_IO_INTS + 8); - outb(IO_ICU2 + ICU_IMR_OFFSET, 2); - outb(IO_ICU2 + ICU_IMR_OFFSET, ICW4_8086); + outb(IO_ICU2 + ICU_IMR_OFFSET, ICU_SLAVEID); + outb(IO_ICU2 + ICU_IMR_OFFSET, SLAVE_MODE); outb(IO_ICU2 + ICU_IMR_OFFSET, 0xff); outb(IO_ICU2, OCW3_SEL | OCW3_RR); } From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 13:44:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D6B6106566B; Fri, 16 Mar 2012 13:44:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17DA68FC08; Fri, 16 Mar 2012 13:44:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GDieI2020240; Fri, 16 Mar 2012 13:44:40 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GDieSh020238; Fri, 16 Mar 2012 13:44:40 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201203161344.q2GDieSh020238@svn.freebsd.org> From: Ed Maste Date: Fri, 16 Mar 2012 13:44:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233032 - stable/9/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 13:44:41 -0000 Author: emaste Date: Fri Mar 16 13:44:40 2012 New Revision: 233032 URL: http://svn.freebsd.org/changeset/base/233032 Log: MFC r232668: Use bus_get_dma_tag() to inherit the PCI bus' 4G boundary constraint. Modified: stable/9/sys/dev/aac/aac_pci.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/aac/aac_pci.c ============================================================================== --- stable/9/sys/dev/aac/aac_pci.c Fri Mar 16 12:13:44 2012 (r233031) +++ stable/9/sys/dev/aac/aac_pci.c Fri Mar 16 13:44:40 2012 (r233032) @@ -402,7 +402,7 @@ aac_pci_attach(device_t dev) * * Note that some of these controllers are 64-bit capable. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->aac_dev), /* parent */ PAGE_SIZE, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 13:46:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A7BB106566B; Fri, 16 Mar 2012 13:46:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E97F88FC12; Fri, 16 Mar 2012 13:46:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GDksbm020367; Fri, 16 Mar 2012 13:46:54 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GDksi5020365; Fri, 16 Mar 2012 13:46:54 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201203161346.q2GDksi5020365@svn.freebsd.org> From: Ed Maste Date: Fri, 16 Mar 2012 13:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233033 - stable/8/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 13:46:55 -0000 Author: emaste Date: Fri Mar 16 13:46:54 2012 New Revision: 233033 URL: http://svn.freebsd.org/changeset/base/233033 Log: MFC r232668: Use bus_get_dma_tag() to inherit the PCI bus' 4G boundary constraint. Modified: stable/8/sys/dev/aac/aac_pci.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/aac/aac_pci.c ============================================================================== --- stable/8/sys/dev/aac/aac_pci.c Fri Mar 16 13:44:40 2012 (r233032) +++ stable/8/sys/dev/aac/aac_pci.c Fri Mar 16 13:46:54 2012 (r233033) @@ -402,7 +402,7 @@ aac_pci_attach(device_t dev) * * Note that some of these controllers are 64-bit capable. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->aac_dev), /* parent */ PAGE_SIZE, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 14:56:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A143106566B; Fri, 16 Mar 2012 14:56:05 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh2.mail.rice.edu (mh2.mail.rice.edu [128.42.201.21]) by mx1.freebsd.org (Postfix) with ESMTP id 062C38FC15; Fri, 16 Mar 2012 14:56:04 +0000 (UTC) Received: from mh2.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh2.mail.rice.edu (Postfix) with ESMTP id CBEDD291FE6; Fri, 16 Mar 2012 09:48:52 -0500 (CDT) Received: from mh2.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh2.mail.rice.edu (Postfix) with ESMTP id BB55E297607; Fri, 16 Mar 2012 09:48:52 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh2.mail.rice.edu, auth channel Received: from mh2.mail.rice.edu ([127.0.0.1]) by mh2.mail.rice.edu (mh2.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id GGXLocJ5e8YG; Fri, 16 Mar 2012 09:48:52 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh2.mail.rice.edu (Postfix) with ESMTPSA id 2987B292030; Fri, 16 Mar 2012 09:48:52 -0500 (CDT) Message-ID: <4F6352D3.10005@rice.edu> Date: Fri, 16 Mar 2012 09:48:51 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111113 Thunderbird/8.0 MIME-Version: 1.0 To: Nathan Whitehorn References: <201203151936.q2FJaqTr080483@svn.freebsd.org> <4F626AB8.3090509@rice.edu> <4F62737C.7060100@freebsd.org> <4F627DE6.1000602@rice.edu> <4F628576.6010802@freebsd.org> In-Reply-To: <4F628576.6010802@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233011 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 14:56:05 -0000 On 03/15/2012 19:12, Nathan Whitehorn wrote: > On 03/15/12 18:40, Alan Cox wrote: >> On 3/15/2012 5:55 PM, Nathan Whitehorn wrote: >>> On 03/15/12 17:18, Alan Cox wrote: >>>> On 3/15/2012 2:36 PM, Nathan Whitehorn wrote: >>>>> Author: nwhitehorn >>>>> Date: Thu Mar 15 19:36:52 2012 >>>>> New Revision: 233011 >>>>> URL: http://svn.freebsd.org/changeset/base/233011 >>>>> >>>>> Log: >>>>> Improve algorithm for deciding whether to loop through all >>>>> process pages >>>>> or look them up individually in pmap_remove() and apply the >>>>> same logic >>>>> in the other ranged operation (pmap_protect). This speeds up make >>>>> installworld by a factor of 2 on powerpc64. >>>>> >>>>> MFC after: 1 week >>>>> >>>>> Modified: >>>>> head/sys/powerpc/aim/mmu_oea64.c >>>>> >>>> >>>> As an additional, related optimization, you should look into >>>> implementing pmap_remove_pages(). >>>> >>>> Alan >>>> >>> >>> Thanks! I didn't know about that one. Is there a reason it isn't >>> called at the end of vm_pageout_map_deactivate_pages(), which seems >>> to deactivate all pages with pmap_remove()? >> >> Yes, at least two reasons come to mind. Some implementations only >> accept the caller's current pmap as an argument. Also, there >> shouldn't be any other threads besides the caller using the pmap. >> >> > > OK, makes sense (though the PPC implementation doesn't have the > needs-to-be-the-current-PMAP restriction). One more question while > we're discussing this. I looked through the various PMAP functions, > and found three more that aren't implemented: > > - pmap_copy() > The man page for this one says "Actually implementing it may > seriously reduce system performance." Is this true? Is there any point > to implementing it if it would be no faster than repeatedly calling > pmap_copy_page()? > Hmm. I hadn't looked at this man page before. It's rather misleading. pmap_copy() doesn't copy physical pages. It copies page table entries. It is used by fork() to pre-populate the page table, so that soft faults don't occur in the child process. If you perform execve() immediately after fork(), then, yes, pmap_copy() may just slow things down. > - pmap_object_init_pt() > This one looks an important potential optimization. > This is only used to avoid soft faults on device mappings. > - pmap_align_superpage() > PowerPC/AIM mostly only supports superpages in 256 MB regions, where > all pages within that region must be superpages, and pages not in > marked regions cannot be. Is there any way to usefully implement this > in the context of our kernel superpage support? The short answer is no. With the limitations of the AIM MMU, you can really only support superpages under a user/kernel interface like Solaris ISM, e.g., flags to SysV shm or shm_open(). Alan From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 15:32:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 968F7106564A; Fri, 16 Mar 2012 15:32:58 +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 68C3F8FC08; Fri, 16 Mar 2012 15:32:58 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id F382F46B23; Fri, 16 Mar 2012 11:32:57 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6E0D0B93F; Fri, 16 Mar 2012 11:32:57 -0400 (EDT) From: John Baldwin To: Takahashi Yoshihiro Date: Fri, 16 Mar 2012 09:45:04 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203161213.q2GCDiIq017252@svn.freebsd.org> In-Reply-To: <201203161213.q2GCDiIq017252@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201203160945.04680.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 16 Mar 2012 11:32:57 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233031 - in head/sys: conf i386/i386 pc98/pc98 x86/isa x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 15:32:58 -0000 On Friday, March 16, 2012 8:13:44 am Takahashi Yoshihiro wrote: > Author: nyan > Date: Fri Mar 16 12:13:44 2012 > New Revision: 233031 > URL: http://svn.freebsd.org/changeset/base/233031 > > Log: > - Fix to build a native i386 kernel without the SMP and atpic. > - Merge r232744 changes to pc98. > (Allow a kernel to be built with 'nodevice atpic'.) > - Move ICU related defines from x86/isa/atpic.c to x86/isa/icu.h and > use them in x86/x86/intr_machdep.c. > > Reviewed by: jhb Thanks for fixing this. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 16:12:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96D3E106566B; Fri, 16 Mar 2012 16:12:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82AE88FC08; Fri, 16 Mar 2012 16:12:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GGCBW1025112; Fri, 16 Mar 2012 16:12:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GGCBtA025110; Fri, 16 Mar 2012 16:12:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203161612.q2GGCBtA025110@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Mar 2012 16:12: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: r233036 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 16:12:11 -0000 Author: jhb Date: Fri Mar 16 16:12:10 2012 New Revision: 233036 URL: http://svn.freebsd.org/changeset/base/233036 Log: Revert the PCIe 4GB boundary issue workaround now that the proper fix is in HEAD. Ok'd by: scottl Modified: head/sys/x86/x86/busdma_machdep.c Modified: head/sys/x86/x86/busdma_machdep.c ============================================================================== --- head/sys/x86/x86/busdma_machdep.c Fri Mar 16 15:46:44 2012 (r233035) +++ head/sys/x86/x86/busdma_machdep.c Fri Mar 16 16:12:10 2012 (r233036) @@ -227,14 +227,6 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_dma_tag_t newtag; int error = 0; - /* Always enforce at least a 4GB (2GB for PAE) boundary. */ -#if defined(__amd64__) - if (boundary == 0 || boundary > ((bus_addr_t)1 << 32)) - boundary = (bus_size_t)1 << 32; -#elif defined(PAE) - if (boundary == 0 || boundary > ((bus_addr_t)1 << 31)) - boundary = (bus_size_t)1 << 31; -#endif /* Basic sanity checking */ if (boundary != 0 && boundary < maxsegsz) maxsegsz = boundary; From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 16:29:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76408106566B; Fri, 16 Mar 2012 16:29:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56ED38FC0A; Fri, 16 Mar 2012 16:29:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GGTMao025673; Fri, 16 Mar 2012 16:29:22 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GGTM6P025670; Fri, 16 Mar 2012 16:29:22 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203161629.q2GGTM6P025670@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 16 Mar 2012 16:29: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: r233037 - head/usr.sbin/usbdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 16:29:22 -0000 Author: hselasky Date: Fri Mar 16 16:29:21 2012 New Revision: 233037 URL: http://svn.freebsd.org/changeset/base/233037 Log: Fix cross-platform issue about the file-format in which usbdump stores data. Until this patch it was not possible to exchange traces between 32-bit, 64-bit, big- and little endian platforms. The problem is the dynamic nature of the BPF timestamp in the header. All other fields are fixed size and little endian. MFC after: 5 days Modified: head/usr.sbin/usbdump/usbdump.c Modified: head/usr.sbin/usbdump/usbdump.c ============================================================================== --- head/usr.sbin/usbdump/usbdump.c Fri Mar 16 16:12:10 2012 (r233036) +++ head/usr.sbin/usbdump/usbdump.c Fri Mar 16 16:29:21 2012 (r233037) @@ -92,6 +92,26 @@ struct usbcap_filehdr { uint8_t reserved[26]; } __packed; +#define HEADER_ALIGN(x,a) (((x) + (a) - 1) & ~((a) - 1)) + +struct header_32 { + uint32_t ts_sec; + uint32_t ts_usec; + uint32_t caplen; + uint32_t datalen; + uint16_t hdrlen; + uint16_t dummy; +} __packed; + +struct header_64 { + uint64_t ts_sec; + uint64_t ts_usec; + uint32_t caplen; + uint32_t datalen; + uint16_t hdrlen; + uint16_t dummy; +} __packed; + static int doexit = 0; static int pkt_captured = 0; static int verbose = 0; @@ -413,7 +433,7 @@ hexdump(const uint8_t *region, uint32_t } static void -print_apacket(const struct bpf_hdr *hdr, const uint8_t *ptr, int ptr_len) +print_apacket(const struct header_32 *hdr, const uint8_t *ptr, int ptr_len) { struct tm *tm; struct usbpf_pkthdr up_temp; @@ -448,8 +468,8 @@ print_apacket(const struct bpf_hdr *hdr, up->up_packet_count = le32toh(up->up_packet_count); up->up_endpoint = le32toh(up->up_endpoint); - tv.tv_sec = hdr->bh_tstamp.tv_sec; - tv.tv_usec = hdr->bh_tstamp.tv_usec; + tv.tv_sec = hdr->ts_sec; + tv.tv_usec = hdr->ts_usec; tm = localtime(&tv.tv_sec); len = strftime(buf, sizeof(buf), "%H:%M:%S", tm); @@ -516,17 +536,86 @@ print_apacket(const struct bpf_hdr *hdr, static void print_packets(uint8_t *data, const int datalen) { - const struct bpf_hdr *hdr; + struct header_32 temp; uint8_t *ptr; uint8_t *next; for (ptr = data; ptr < (data + datalen); ptr = next) { - hdr = (const struct bpf_hdr *)ptr; - next = ptr + BPF_WORDALIGN(hdr->bh_hdrlen + hdr->bh_caplen); + + /* automatically figure out endian and size of header */ + + if (r_arg != NULL) { + + const struct header_32 *hdr32; + const struct header_64 *hdr64; + + hdr32 = (const struct header_32 *)ptr; + hdr64 = (const struct header_64 *)ptr; + + temp.hdrlen = le16toh(hdr32->hdrlen); + temp.dummy = le16toh(hdr32->dummy); + + if ((temp.hdrlen != 18 && temp.hdrlen != 20) || (temp.dummy != 0)) { + temp.hdrlen = be16toh(hdr32->hdrlen); + temp.dummy = be16toh(hdr32->dummy); + + if ((temp.hdrlen != 18 && temp.hdrlen != 20) || (temp.dummy != 0)) { + temp.hdrlen = le16toh(hdr64->hdrlen); + temp.dummy = le16toh(hdr64->dummy); + + if ((temp.hdrlen != 28 && temp.hdrlen != 32) || (temp.dummy != 0)) { + temp.hdrlen = be16toh(hdr64->hdrlen); + temp.dummy = be16toh(hdr64->dummy); + + if ((temp.hdrlen != 28 && temp.hdrlen != 32) || (temp.dummy != 0)) { + err(EXIT_FAILURE, "Invalid header detected"); + next = NULL; + } else { + temp.ts_sec = be64toh(hdr64->ts_sec); + temp.ts_usec = be64toh(hdr64->ts_usec); + temp.caplen = be32toh(hdr64->caplen); + temp.datalen = be32toh(hdr64->datalen); + next = ptr + HEADER_ALIGN(temp.hdrlen + temp.caplen, 8); + } + } else { + temp.ts_sec = le64toh(hdr64->ts_sec); + temp.ts_usec = le64toh(hdr64->ts_usec); + temp.caplen = le32toh(hdr64->caplen); + temp.datalen = le32toh(hdr64->datalen); + next = ptr + HEADER_ALIGN(temp.hdrlen + temp.caplen, 8); + } + } else { + temp.ts_sec = be32toh(hdr32->ts_sec); + temp.ts_usec = be32toh(hdr32->ts_usec); + temp.caplen = be32toh(hdr32->caplen); + temp.datalen = be32toh(hdr32->datalen); + next = ptr + HEADER_ALIGN(temp.hdrlen + temp.caplen, 4); + } + } else { + temp.ts_sec = le32toh(hdr32->ts_sec); + temp.ts_usec = le32toh(hdr32->ts_usec); + temp.caplen = le32toh(hdr32->caplen); + temp.datalen = le32toh(hdr32->datalen); + next = ptr + HEADER_ALIGN(temp.hdrlen + temp.caplen, 4); + } + } else { + const struct bpf_hdr *hdr; + + hdr = (const struct bpf_hdr *)ptr; + temp.ts_sec = hdr->bh_tstamp.tv_sec; + temp.ts_usec = hdr->bh_tstamp.tv_usec; + temp.caplen = hdr->bh_caplen; + temp.datalen = hdr->bh_datalen; + temp.hdrlen = hdr->bh_hdrlen; + next = ptr + BPF_WORDALIGN(temp.hdrlen + temp.caplen); + } + + if (next <= ptr) + err(EXIT_FAILURE, "Invalid header length"); if (w_arg == NULL) { - print_apacket(hdr, ptr + - hdr->bh_hdrlen, hdr->bh_caplen); + print_apacket(&temp, ptr + + temp.hdrlen, temp.caplen); } pkt_captured++; } From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 16:41:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B016106566B; Fri, 16 Mar 2012 16:41:29 +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 658F18FC12; Fri, 16 Mar 2012 16:41:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GGfTNs026079; Fri, 16 Mar 2012 16:41:29 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GGfTPA026076; Fri, 16 Mar 2012 16:41:29 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201203161641.q2GGfTPA026076@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 16 Mar 2012 16:41: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: r233038 - head/usr.bin/xargs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 16:41:29 -0000 Author: jilles Date: Fri Mar 16 16:41:28 2012 New Revision: 233038 URL: http://svn.freebsd.org/changeset/base/233038 Log: xargs: Before exiting, wait for all invocations of the utility. This only has an effect with -P, otherwise errors are only detected when the utility is not running. Submitted by: Matthew Story Modified: head/usr.bin/xargs/xargs.1 head/usr.bin/xargs/xargs.c Modified: head/usr.bin/xargs/xargs.1 ============================================================================== --- head/usr.bin/xargs/xargs.1 Fri Mar 16 16:29:21 2012 (r233037) +++ head/usr.bin/xargs/xargs.1 Fri Mar 16 16:41:28 2012 (r233038) @@ -33,7 +33,7 @@ .\" $FreeBSD$ .\" $xMach: xargs.1,v 1.2 2002/02/23 05:23:37 tim Exp $ .\" -.Dd March 24, 2011 +.Dd March 16, 2012 .Dt XARGS 1 .Os .Sh NAME @@ -294,17 +294,17 @@ Undefined behavior may occur if .Ar utility reads from the standard input. .Pp -The -.Nm -utility exits immediately (without processing any further input) if a -command line cannot be assembled, -.Ar utility -cannot be invoked, an invocation of +If a command line cannot be assembled, or +cannot be invoked, or if an invocation of .Ar utility is terminated by a signal, or an invocation of .Ar utility -exits with a value of 255. +exits with a value of 255, the +.Nm +utility stops processing input and exits after all invocations of +.Ar utility +finish processing. .Sh EXIT STATUS The .Nm Modified: head/usr.bin/xargs/xargs.c ============================================================================== --- head/usr.bin/xargs/xargs.c Fri Mar 16 16:29:21 2012 (r233037) +++ head/usr.bin/xargs/xargs.c Fri Mar 16 16:41:28 2012 (r233038) @@ -70,6 +70,7 @@ static void run(char **); static void usage(void); void strnsubst(char **, const char *, const char *, size_t); static pid_t xwait(int block, int *status); +static void xexit(const char *, const int); static void waitchildren(const char *, int); static void pids_init(void); static int pids_empty(void); @@ -280,10 +281,8 @@ parse_input(int argc, char *argv[]) switch (ch = getchar()) { case EOF: /* No arguments since last exec. */ - if (p == bbp) { - waitchildren(*av, 1); - exit(rval); - } + if (p == bbp) + xexit(*av, rval); goto arg1; case ' ': case '\t': @@ -308,8 +307,10 @@ parse_input(int argc, char *argv[]) count++; /* Indicate end-of-line (used by -L) */ /* Quotes do not escape newlines. */ -arg1: if (insingle || indouble) - errx(1, "unterminated quote"); +arg1: if (insingle || indouble) { + warnx("unterminated quote"); + xexit(*av, 1); + } arg2: foundeof = *eofstr != '\0' && strncmp(argp, eofstr, p - argp) == 0; @@ -342,8 +343,10 @@ arg2: */ inpline = realloc(inpline, curlen + 2 + strlen(argp)); - if (inpline == NULL) - errx(1, "realloc failed"); + if (inpline == NULL) { + warnx("realloc failed"); + xexit(*av, 1); + } if (curlen == 1) strcpy(inpline, argp); else @@ -360,17 +363,17 @@ arg2: */ if (xp == endxp || p > ebp || ch == EOF || (Lflag <= count && xflag) || foundeof) { - if (xflag && xp != endxp && p > ebp) - errx(1, "insufficient space for arguments"); + if (xflag && xp != endxp && p > ebp) { + warnx("insufficient space for arguments"); + xexit(*av, 1); + } if (jfound) { for (avj = argv; *avj; avj++) *xp++ = *avj; } prerun(argc, av); - if (ch == EOF || foundeof) { - waitchildren(*av, 1); - exit(rval); - } + if (ch == EOF || foundeof) + xexit(*av, rval); p = bbp; xp = bxp; count = 0; @@ -394,8 +397,10 @@ arg2: if (zflag) goto addch; /* Backslash escapes anything, is escaped by quotes. */ - if (!insingle && !indouble && (ch = getchar()) == EOF) - errx(1, "backslash at EOF"); + if (!insingle && !indouble && (ch = getchar()) == EOF) { + warnx("backslash at EOF"); + xexit(*av, 1); + } /* FALLTHROUGH */ default: addch: if (p < ebp) { @@ -404,11 +409,15 @@ addch: if (p < ebp) { } /* If only one argument, not enough buffer space. */ - if (bxp == xp) - errx(1, "insufficient space for argument"); + if (bxp == xp) { + warnx("insufficient space for argument"); + xexit(*av, 1); + } /* Didn't hit argument limit, so if xflag object. */ - if (xflag) - errx(1, "insufficient space for arguments"); + if (xflag) { + warnx("insufficient space for arguments"); + xexit(*av, 1); + } if (jfound) { for (avj = argv; *avj; avj++) @@ -449,16 +458,20 @@ prerun(int argc, char *argv[]) * a NULL at the tail. */ tmp = malloc((argc + 1) * sizeof(char**)); - if (tmp == NULL) - errx(1, "malloc failed"); + if (tmp == NULL) { + warnx("malloc failed"); + xexit(*argv, 1); + } tmp2 = tmp; /* * Save the first argument and iterate over it, we * cannot do strnsubst() to it. */ - if ((*tmp++ = strdup(*avj++)) == NULL) - errx(1, "strdup failed"); + if ((*tmp++ = strdup(*avj++)) == NULL) { + warnx("strdup failed"); + xexit(*argv, 1); + } /* * For each argument to utility, if we have not used up @@ -475,8 +488,10 @@ prerun(int argc, char *argv[]) if (repls > 0) repls--; } else { - if ((*tmp = strdup(*tmp)) == NULL) - errx(1, "strdup failed"); + if ((*tmp = strdup(*tmp)) == NULL) { + warnx("strdup failed"); + xexit(*argv, 1); + } tmp++; } } @@ -547,7 +562,8 @@ exec: childerr = 0; switch (pid = vfork()) { case -1: - err(1, "vfork"); + warn("vfork"); + xexit(*argv, 1); case 0: if (oflag) { if ((fd = open(_PATH_TTY, O_RDONLY)) == -1) @@ -593,26 +609,46 @@ xwait(int block, int *status) { } static void +xexit(const char *name, const int exit_code) { + waitchildren(name, 1); + exit(exit_code); +} + +static void waitchildren(const char *name, int waitall) { pid_t pid; int status; + int cause_exit = 0; while ((pid = xwait(waitall || pids_full(), &status)) > 0) { - /* If we couldn't invoke the utility, exit. */ - if (childerr != 0) { + /* + * If we couldn't invoke the utility or if utility exited + * because of a signal or with a value of 255, warn (per + * POSIX), and then wait until all other children have + * exited before exiting 1-125. POSIX requires us to stop + * reading if child exits because of a signal or with 255, + * but it does not require us to exit immediately; waiting + * is preferable to orphaning. + */ + if (childerr != 0 && cause_exit == 0) { errno = childerr; - err(errno == ENOENT ? 127 : 126, "%s", name); - } - if (WIFSIGNALED(status)) - errx(1, "%s: terminated with signal %d; aborting", + waitall = 1; + cause_exit = ENOENT ? 127 : 126; + warn("%s", name); + } else if (WIFSIGNALED(status)) { + waitall = cause_exit = 1; + warnx("%s: terminated with signal %d; aborting", name, WTERMSIG(status)); - if (WEXITSTATUS(status) == 255) - errx(1, "%s: exited with status 255; aborting", name); - if (WEXITSTATUS(status)) - rval = 1; + } else if (WEXITSTATUS(status) == 255) { + waitall = cause_exit = 1; + warnx("%s: exited with status 255; aborting", name); + } else if (WEXITSTATUS(status)) + rval = 1; } + if (cause_exit) + exit(cause_exit); if (pid == -1 && errno != ECHILD) err(1, "waitpid"); } From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 17:30:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 89CEE1065670; Fri, 16 Mar 2012 17:30:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73B4D8FC0A; Fri, 16 Mar 2012 17:30:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GHUNpQ027707; Fri, 16 Mar 2012 17:30:23 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GHUN9Y027705; Fri, 16 Mar 2012 17:30:23 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203161730.q2GHUN9Y027705@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 16 Mar 2012 17:30: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: r233039 - head/usr.sbin/usbdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 17:30:23 -0000 Author: hselasky Date: Fri Mar 16 17:30:22 2012 New Revision: 233039 URL: http://svn.freebsd.org/changeset/base/233039 Log: Create new file header format to simplify the endian and cross platform issues. This patch does not break binary compatibility with previous versions. MFC after: 1 week Modified: head/usr.sbin/usbdump/usbdump.c Modified: head/usr.sbin/usbdump/usbdump.c ============================================================================== --- head/usr.sbin/usbdump/usbdump.c Fri Mar 16 16:41:28 2012 (r233038) +++ head/usr.sbin/usbdump/usbdump.c Fri Mar 16 17:30:22 2012 (r233039) @@ -95,26 +95,20 @@ struct usbcap_filehdr { #define HEADER_ALIGN(x,a) (((x) + (a) - 1) & ~((a) - 1)) struct header_32 { + /* capture timestamp */ uint32_t ts_sec; uint32_t ts_usec; + /* data length and alignment information */ uint32_t caplen; uint32_t datalen; - uint16_t hdrlen; - uint16_t dummy; -} __packed; - -struct header_64 { - uint64_t ts_sec; - uint64_t ts_usec; - uint32_t caplen; - uint32_t datalen; - uint16_t hdrlen; - uint16_t dummy; + uint8_t hdrlen; + uint8_t align; } __packed; static int doexit = 0; static int pkt_captured = 0; static int verbose = 0; +static int uf_minor; static const char *i_arg = "usbus0"; static const char *r_arg = NULL; static const char *w_arg = NULL; @@ -534,86 +528,71 @@ print_apacket(const struct header_32 *hd } static void -print_packets(uint8_t *data, const int datalen) +fix_packets(uint8_t *data, const int datalen) { struct header_32 temp; uint8_t *ptr; uint8_t *next; + uint32_t hdrlen; + uint32_t caplen; for (ptr = data; ptr < (data + datalen); ptr = next) { - /* automatically figure out endian and size of header */ - - if (r_arg != NULL) { + const struct bpf_hdr *hdr; - const struct header_32 *hdr32; - const struct header_64 *hdr64; + hdr = (const struct bpf_hdr *)ptr; - hdr32 = (const struct header_32 *)ptr; - hdr64 = (const struct header_64 *)ptr; - - temp.hdrlen = le16toh(hdr32->hdrlen); - temp.dummy = le16toh(hdr32->dummy); - - if ((temp.hdrlen != 18 && temp.hdrlen != 20) || (temp.dummy != 0)) { - temp.hdrlen = be16toh(hdr32->hdrlen); - temp.dummy = be16toh(hdr32->dummy); - - if ((temp.hdrlen != 18 && temp.hdrlen != 20) || (temp.dummy != 0)) { - temp.hdrlen = le16toh(hdr64->hdrlen); - temp.dummy = le16toh(hdr64->dummy); - - if ((temp.hdrlen != 28 && temp.hdrlen != 32) || (temp.dummy != 0)) { - temp.hdrlen = be16toh(hdr64->hdrlen); - temp.dummy = be16toh(hdr64->dummy); - - if ((temp.hdrlen != 28 && temp.hdrlen != 32) || (temp.dummy != 0)) { - err(EXIT_FAILURE, "Invalid header detected"); - next = NULL; - } else { - temp.ts_sec = be64toh(hdr64->ts_sec); - temp.ts_usec = be64toh(hdr64->ts_usec); - temp.caplen = be32toh(hdr64->caplen); - temp.datalen = be32toh(hdr64->datalen); - next = ptr + HEADER_ALIGN(temp.hdrlen + temp.caplen, 8); - } - } else { - temp.ts_sec = le64toh(hdr64->ts_sec); - temp.ts_usec = le64toh(hdr64->ts_usec); - temp.caplen = le32toh(hdr64->caplen); - temp.datalen = le32toh(hdr64->datalen); - next = ptr + HEADER_ALIGN(temp.hdrlen + temp.caplen, 8); - } - } else { - temp.ts_sec = be32toh(hdr32->ts_sec); - temp.ts_usec = be32toh(hdr32->ts_usec); - temp.caplen = be32toh(hdr32->caplen); - temp.datalen = be32toh(hdr32->datalen); - next = ptr + HEADER_ALIGN(temp.hdrlen + temp.caplen, 4); - } - } else { - temp.ts_sec = le32toh(hdr32->ts_sec); - temp.ts_usec = le32toh(hdr32->ts_usec); - temp.caplen = le32toh(hdr32->caplen); - temp.datalen = le32toh(hdr32->datalen); - next = ptr + HEADER_ALIGN(temp.hdrlen + temp.caplen, 4); - } + temp.ts_sec = htole32(hdr->bh_tstamp.tv_sec); + temp.ts_usec = htole32(hdr->bh_tstamp.tv_usec); + temp.caplen = htole32(hdr->bh_caplen); + temp.datalen = htole32(hdr->bh_datalen); + temp.hdrlen = hdr->bh_hdrlen; + temp.align = BPF_WORDALIGN(1); + + hdrlen = hdr->bh_hdrlen; + caplen = hdr->bh_caplen; + + if ((hdrlen >= sizeof(temp)) && (hdrlen <= 255) && + ((ptr + hdrlen) <= (data + datalen))) { + memcpy(ptr, &temp, sizeof(temp)); + memset(ptr + sizeof(temp), 0, hdrlen - sizeof(temp)); } else { - const struct bpf_hdr *hdr; - - hdr = (const struct bpf_hdr *)ptr; - temp.ts_sec = hdr->bh_tstamp.tv_sec; - temp.ts_usec = hdr->bh_tstamp.tv_usec; - temp.caplen = hdr->bh_caplen; - temp.datalen = hdr->bh_datalen; - temp.hdrlen = hdr->bh_hdrlen; - next = ptr + BPF_WORDALIGN(temp.hdrlen + temp.caplen); + err(EXIT_FAILURE, "Invalid header length %d", hdrlen); } + next = ptr + BPF_WORDALIGN(hdrlen + caplen); + + if (next <= ptr) + err(EXIT_FAILURE, "Invalid length"); + } +} + +static void +print_packets(uint8_t *data, const int datalen) +{ + struct header_32 temp; + uint8_t *ptr; + uint8_t *next; + + for (ptr = data; ptr < (data + datalen); ptr = next) { + + const struct header_32 *hdr32; + + hdr32 = (const struct header_32 *)ptr; + + temp.ts_sec = le32toh(hdr32->ts_sec); + temp.ts_usec = le32toh(hdr32->ts_usec); + temp.caplen = le32toh(hdr32->caplen); + temp.datalen = le32toh(hdr32->datalen); + temp.hdrlen = hdr32->hdrlen; + temp.align = hdr32->align; + + next = ptr + HEADER_ALIGN(temp.hdrlen + temp.caplen, temp.align); + if (next <= ptr) - err(EXIT_FAILURE, "Invalid header length"); + err(EXIT_FAILURE, "Invalid length"); - if (w_arg == NULL) { + if (w_arg == NULL || r_arg != NULL) { print_apacket(&temp, ptr + temp.hdrlen, temp.caplen); } @@ -656,6 +635,9 @@ read_file(struct usbcap *p) err(EXIT_FAILURE, "Could not read complete " "USB data payload"); } + if (uf_minor == 2) + fix_packets(data, datalen); + print_packets(data, datalen); free(data); } @@ -680,6 +662,9 @@ do_loop(struct usbcap *p) } if (cc == 0) continue; + + fix_packets(p->buffer, cc); + if (w_arg != NULL) write_packets(p, p->buffer, cc); print_packets(p->buffer, cc); @@ -711,7 +696,10 @@ init_rfile(struct usbcap *p) errx(EX_SOFTWARE, "Invalid major version(%d) " "field in USB capture file header.", (int)uf.major); } - if (uf.minor != 2) { + + uf_minor = uf.minor; + + if (uf.minor != 3 && uf.minor != 2) { errx(EX_SOFTWARE, "Invalid minor version(%d) " "field in USB capture file header.", (int)uf.minor); } @@ -726,12 +714,12 @@ init_wfile(struct usbcap *p) p->wfd = open(w_arg, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR); if (p->wfd < 0) { err(EXIT_FAILURE, "Could not open " - "'%s' for write", r_arg); + "'%s' for write", w_arg); } memset(&uf, 0, sizeof(uf)); uf.magic = htole32(USBCAP_FILEHDR_MAGIC); uf.major = 0; - uf.minor = 2; + uf.minor = 3; ret = write(p->wfd, (const void *)&uf, sizeof(uf)); if (ret != sizeof(uf)) { err(EXIT_FAILURE, "Could not write " From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 17:56:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22609106564A; Fri, 16 Mar 2012 17:56:54 +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 A50C58FC18; Fri, 16 Mar 2012 17:56:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GHurtn028556; Fri, 16 Mar 2012 17:56:53 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GHurdZ028553; Fri, 16 Mar 2012 17:56:53 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203161756.q2GHurdZ028553@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Mar 2012 17:56: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: r233040 - head/sys/ofed/drivers/infiniband/core X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 17:56:54 -0000 Author: jhb Date: Fri Mar 16 17:56:53 2012 New Revision: 233040 URL: http://svn.freebsd.org/changeset/base/233040 Log: Fix build with INET6 disabled. Modified: head/sys/ofed/drivers/infiniband/core/addr.c head/sys/ofed/drivers/infiniband/core/cma.c Modified: head/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/addr.c Fri Mar 16 17:30:22 2012 (r233039) +++ head/sys/ofed/drivers/infiniband/core/addr.c Fri Mar 16 17:56:53 2012 (r233040) @@ -459,12 +459,12 @@ mcast: /* * Resolve the link local address. */ - if (dst_in->sa_family == AF_INET) - error = arpresolve(ifp, rte, NULL, dst_in, edst, &lle); #ifdef INET6 - else + if (dst_in->sa_family == AF_INET6) error = nd6_storelladdr(ifp, NULL, dst_in, (u_char *)edst, &lle); + else #endif + error = arpresolve(ifp, rte, NULL, dst_in, edst, &lle); RTFREE(rte); if (error == 0) return rdma_copy_addr(addr, ifp, edst); Modified: head/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/cma.c Fri Mar 16 17:30:22 2012 (r233039) +++ head/sys/ofed/drivers/infiniband/core/cma.c Fri Mar 16 17:56:53 2012 (r233040) @@ -1242,7 +1242,9 @@ static void cma_set_compare_data(enum rd struct cma_hdr *cma_data, *cma_mask; struct sdp_hh *sdp_data, *sdp_mask; __be32 ip4_addr; +#ifdef INET6 struct in6_addr ip6_addr; +#endif memset(compare, 0, sizeof *compare); cma_data = (void *) compare->data; @@ -2920,10 +2922,13 @@ static void cma_set_mgid(struct rdma_id_ unsigned char mc_map[MAX_ADDR_LEN]; struct rdma_dev_addr *dev_addr = &id_priv->id.route.addr.dev_addr; struct sockaddr_in *sin = (struct sockaddr_in *) addr; +#ifdef INET6 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) addr; +#endif if (cma_any_addr(addr)) { memset(mgid, 0, sizeof *mgid); +#ifdef INET6 } else if ((addr->sa_family == AF_INET6) && ((be32_to_cpu(sin6->sin6_addr.s6_addr32[0]) & 0xFFF0FFFF) == 0xFF10A01B)) { @@ -2934,6 +2939,7 @@ static void cma_set_mgid(struct rdma_id_ if (id_priv->id.ps == RDMA_PS_UDP) mc_map[7] = 0x01; /* Use RDMA CM signature */ *mgid = *(union ib_gid *) (mc_map + 4); +#endif } else { ip_ib_mc_map(sin->sin_addr.s_addr, dev_addr->broadcast, mc_map); if (id_priv->id.ps == RDMA_PS_UDP) From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 19:09:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E5B2106566B; Fri, 16 Mar 2012 19:09: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 08F108FC0A; Fri, 16 Mar 2012 19:09:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GJ9Yeo030942; Fri, 16 Mar 2012 19:09:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GJ9YAQ030940; Fri, 16 Mar 2012 19:09:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203161909.q2GJ9YAQ030940@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Mar 2012 19:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233041 - 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: Fri, 16 Mar 2012 19:09:35 -0000 Author: kib Date: Fri Mar 16 19:09:34 2012 New Revision: 233041 URL: http://svn.freebsd.org/changeset/base/233041 Log: Remove write-only variable. MFC after: 3 days Modified: head/libexec/rtld-elf/map_object.c Modified: head/libexec/rtld-elf/map_object.c ============================================================================== --- head/libexec/rtld-elf/map_object.c Fri Mar 16 17:56:53 2012 (r233040) +++ head/libexec/rtld-elf/map_object.c Fri Mar 16 19:09:34 2012 (r233041) @@ -65,7 +65,6 @@ map_object(int fd, const char *path, con Elf_Phdr *phtls; caddr_t mapbase; size_t mapsize; - Elf_Off base_offset; Elf_Addr base_vaddr; Elf_Addr base_vlimit; caddr_t base_addr; @@ -174,7 +173,6 @@ map_object(int fd, const char *path, con * Map the entire address space of the object, to stake out our * contiguous region, and to establish the base address for relocation. */ - base_offset = trunc_page(segs[0]->p_offset); base_vaddr = trunc_page(segs[0]->p_vaddr); base_vlimit = round_page(segs[nsegs]->p_vaddr + segs[nsegs]->p_memsz); mapsize = base_vlimit - base_vaddr; From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 19:22:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D1F651065672; Fri, 16 Mar 2012 19:22:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC8D88FC12; Fri, 16 Mar 2012 19:22:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GJMU1I031438; Fri, 16 Mar 2012 19:22:30 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GJMU1b031436; Fri, 16 Mar 2012 19:22:30 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201203161922.q2GJMU1b031436@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 16 Mar 2012 19:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233042 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 19:22:30 -0000 Author: jkim Date: Fri Mar 16 19:22:29 2012 New Revision: 233042 URL: http://svn.freebsd.org/changeset/base/233042 Log: Do not unnecessarily clear display memory when switching modes. MFC after: 3 days Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Fri Mar 16 19:09:34 2012 (r233041) +++ head/sys/dev/fb/vesa.c Fri Mar 16 19:22:29 2012 (r233042) @@ -1313,7 +1313,7 @@ vesa_set_mode(video_adapter_t *adp, int if ((info.vi_flags & V_INFO_LINEAR) != 0) mode |= 0x4000; - if (vesa_bios_set_mode(mode)) + if (vesa_bios_set_mode(mode | 0x8000)) return (1); /* Palette format is reset by the above VBE function call. */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 19:42:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20F2A10656DB; Fri, 16 Mar 2012 19:42:40 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B5908FC18; Fri, 16 Mar 2012 19:42:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GJgd2F032062; Fri, 16 Mar 2012 19:42:39 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GJgdPU032060; Fri, 16 Mar 2012 19:42:39 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201203161942.q2GJgdPU032060@svn.freebsd.org> From: Tijl Coosemans Date: Fri, 16 Mar 2012 19:42: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: r233043 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 19:42:40 -0000 Author: tijl Date: Fri Mar 16 19:42:39 2012 New Revision: 233043 URL: http://svn.freebsd.org/changeset/base/233043 Log: Use exact width integer types instead of long in struct env87 in preparation to merge with amd64. Reviewed by: kib Modified: head/sys/i386/include/npx.h Modified: head/sys/i386/include/npx.h ============================================================================== --- head/sys/i386/include/npx.h Fri Mar 16 19:22:29 2012 (r233042) +++ head/sys/i386/include/npx.h Fri Mar 16 19:42:39 2012 (r233043) @@ -43,14 +43,14 @@ /* Environment information of floating point unit */ struct env87 { - long en_cw; /* control word (16bits) */ - long en_sw; /* status word (16bits) */ - long en_tw; /* tag word (16bits) */ - long en_fip; /* floating point instruction pointer */ - u_short en_fcs; /* floating code segment selector */ - u_short en_opcode; /* opcode last executed (11 bits ) */ - long en_foo; /* floating operand offset */ - long en_fos; /* floating operand segment selector */ + int32_t en_cw; /* control word (16bits) */ + int32_t en_sw; /* status word (16bits) */ + int32_t en_tw; /* tag word (16bits) */ + int32_t en_fip; /* fp instruction pointer */ + uint16_t en_fcs; /* fp code segment selector */ + uint16_t en_opcode; /* opcode last executed (11 bits ) */ + int32_t en_foo; /* fp operand offset */ + int32_t en_fos; /* fp operand segment selector */ }; /* Contents of each floating point accumulator */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 20:24:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C04F6106566B; Fri, 16 Mar 2012 20:24:30 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A99FB8FC08; Fri, 16 Mar 2012 20:24:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GKOUGv033416; Fri, 16 Mar 2012 20:24:30 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GKOUp5033410; Fri, 16 Mar 2012 20:24:30 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201203162024.q2GKOUp5033410@svn.freebsd.org> From: Tijl Coosemans Date: Fri, 16 Mar 2012 20:24: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: r233044 - in head/sys: amd64/include compat/ia32 i386/include x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 20:24:30 -0000 Author: tijl Date: Fri Mar 16 20:24:30 2012 New Revision: 233044 URL: http://svn.freebsd.org/changeset/base/233044 Log: Move userland bits of i386 npx.h and amd64 fpu.h to x86 fpu.h. Remove FPU types from compat/ia32/ia32_reg.h that are no longer needed. Create machine/npx.h on amd64 to allow compiling i386 code that uses this header. The original npx.h and fpu.h define struct envxmm differently. Both definitions have been included in the new x86 header as struct __envxmm32 and struct __envxmm64. During compilation either __envxmm32 or __envxmm64 is defined as envxmm depending on machine architecture. On amd64 the i386 struct is also available as struct envxmm32. Reviewed by: kib Added: head/sys/amd64/include/npx.h (contents, props changed) head/sys/x86/include/fpu.h (contents, props changed) Modified: head/sys/amd64/include/fpu.h head/sys/compat/ia32/ia32_reg.h head/sys/i386/include/npx.h Modified: head/sys/amd64/include/fpu.h ============================================================================== --- head/sys/amd64/include/fpu.h Fri Mar 16 19:42:39 2012 (r233043) +++ head/sys/amd64/include/fpu.h Fri Mar 16 20:24:30 2012 (r233044) @@ -41,64 +41,7 @@ #ifndef _MACHINE_FPU_H_ #define _MACHINE_FPU_H_ -/* Contents of each x87 floating point accumulator */ -struct fpacc87 { - uint8_t fp_bytes[10]; -}; - -/* Contents of each SSE extended accumulator */ -struct xmmacc { - uint8_t xmm_bytes[16]; -}; - -/* Contents of the upper 16 bytes of each AVX extended accumulator */ -struct ymmacc { - uint8_t ymm_bytes[16]; -}; - -struct envxmm { - uint16_t en_cw; /* control word (16bits) */ - uint16_t en_sw; /* status word (16bits) */ - uint8_t en_tw; /* tag word (8bits) */ - uint8_t en_zero; - uint16_t en_opcode; /* opcode last executed (11 bits ) */ - uint64_t en_rip; /* floating point instruction pointer */ - uint64_t en_rdp; /* floating operand pointer */ - uint32_t en_mxcsr; /* SSE sontorol/status register */ - uint32_t en_mxcsr_mask; /* valid bits in mxcsr */ -}; - -struct savefpu { - struct envxmm sv_env; - struct { - struct fpacc87 fp_acc; - uint8_t fp_pad[6]; /* padding */ - } sv_fp[8]; - struct xmmacc sv_xmm[16]; - uint8_t sv_pad[96]; -} __aligned(16); - -struct xstate_hdr { - uint64_t xstate_bv; - uint8_t xstate_rsrv0[16]; - uint8_t xstate_rsrv[40]; -}; - -struct savefpu_xstate { - struct xstate_hdr sx_hd; - struct ymmacc sx_ymm[16]; -}; - -struct savefpu_ymm { - struct envxmm sv_env; - struct { - struct fpacc87 fp_acc; - int8_t fp_pad[6]; /* padding */ - } sv_fp[8]; - struct xmmacc sv_xmm[16]; - uint8_t sv_pad[96]; - struct savefpu_xstate sv_xstate; -} __aligned(64); +#include #ifdef _KERNEL @@ -108,32 +51,6 @@ struct fpu_kern_ctx; #define XSAVE_AREA_ALIGN 64 -#endif - -/* - * The hardware default control word for i387's and later coprocessors is - * 0x37F, giving: - * - * round to nearest - * 64-bit precision - * all exceptions masked. - * - * FreeBSD/i386 uses 53 bit precision for things like fadd/fsub/fsqrt etc - * because of the difference between memory and fpu register stack arguments. - * If its using an intermediate fpu register, it has 80/64 bits to work - * with. If it uses memory, it has 64/53 bits to work with. However, - * gcc is aware of this and goes to a fair bit of trouble to make the - * best use of it. - * - * This is mostly academic for AMD64, because the ABI prefers the use - * SSE2 based math. For FreeBSD/amd64, we go with the default settings. - */ -#define __INITIAL_FPUCW__ 0x037F -#define __INITIAL_FPUCW_I386__ 0x127F -#define __INITIAL_MXCSR__ 0x1F80 -#define __INITIAL_MXCSR_MASK__ 0xFFBF - -#ifdef _KERNEL void fpudna(void); void fpudrop(void); void fpuexit(struct thread *td); Added: head/sys/amd64/include/npx.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/include/npx.h Fri Mar 16 20:24:30 2012 (r233044) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include Modified: head/sys/compat/ia32/ia32_reg.h ============================================================================== --- head/sys/compat/ia32/ia32_reg.h Fri Mar 16 19:42:39 2012 (r233043) +++ head/sys/compat/ia32/ia32_reg.h Fri Mar 16 20:24:30 2012 (r233044) @@ -78,33 +78,6 @@ struct dbreg32 { unsigned int dr[8]; /* debug registers */ }; -/* Environment information of floating point unit */ -struct env87 { - int en_cw; /* control word (16bits) */ - int en_sw; /* status word (16bits) */ - int en_tw; /* tag word (16bits) */ - int en_fip; /* floating point instruction pointer */ - u_short en_fcs; /* floating code segment selector */ - u_short en_opcode; /* opcode last executed (11 bits ) */ - int en_foo; /* floating operand offset */ - int en_fos; /* floating operand segment selector */ -}; - -#ifdef __ia64__ -/* Layout of an x87 fpu register (amd64 gets this elsewhere) */ -struct fpacc87 { - u_char fp_bytes[10]; -}; -#endif - -/* Floating point context */ -struct save87 { - struct env87 sv_env; /* floating point control/status */ - struct fpacc87 sv_ac[8]; /* accumulator contents, 0-7 */ - u_char sv_pad0[4]; /* padding for (now unused) saved status word */ - u_char sv_pad[64]; /* padding; used by emulators */ -}; - /* * Wrappers and converters. */ Modified: head/sys/i386/include/npx.h ============================================================================== --- head/sys/i386/include/npx.h Fri Mar 16 19:42:39 2012 (r233043) +++ head/sys/i386/include/npx.h Fri Mar 16 20:24:30 2012 (r233044) @@ -41,127 +41,7 @@ #ifndef _MACHINE_NPX_H_ #define _MACHINE_NPX_H_ -/* Environment information of floating point unit */ -struct env87 { - int32_t en_cw; /* control word (16bits) */ - int32_t en_sw; /* status word (16bits) */ - int32_t en_tw; /* tag word (16bits) */ - int32_t en_fip; /* fp instruction pointer */ - uint16_t en_fcs; /* fp code segment selector */ - uint16_t en_opcode; /* opcode last executed (11 bits ) */ - int32_t en_foo; /* fp operand offset */ - int32_t en_fos; /* fp operand segment selector */ -}; - -/* Contents of each floating point accumulator */ -struct fpacc87 { -#ifdef dontdef /* too unportable */ - u_long fp_mantlo; /* mantissa low (31:0) */ - u_long fp_manthi; /* mantissa high (63:32) */ - int fp_exp:15; /* exponent */ - int fp_sgn:1; /* mantissa sign */ -#else - u_char fp_bytes[10]; -#endif -}; - -/* Floating point context */ -struct save87 { - struct env87 sv_env; /* floating point control/status */ - struct fpacc87 sv_ac[8]; /* accumulator contents, 0-7 */ - u_char sv_pad0[4]; /* padding for (now unused) saved status word */ - /* - * Bogus padding for emulators. Emulators should use their own - * struct and arrange to store into this struct (ending here) - * before it is inspected for ptracing or for core dumps. Some - * emulators overwrite the whole struct. We have no good way of - * knowing how much padding to leave. Leave just enough for the - * GPL emulator's i387_union (176 bytes total). - */ - u_char sv_pad[64]; /* padding; used by emulators */ -}; - -struct envxmm { - u_int16_t en_cw; /* control word (16bits) */ - u_int16_t en_sw; /* status word (16bits) */ - u_int16_t en_tw; /* tag word (16bits) */ - u_int16_t en_opcode; /* opcode last executed (11 bits ) */ - u_int32_t en_fip; /* floating point instruction pointer */ - u_int16_t en_fcs; /* floating code segment selector */ - u_int16_t en_pad0; /* padding */ - u_int32_t en_foo; /* floating operand offset */ - u_int16_t en_fos; /* floating operand segment selector */ - u_int16_t en_pad1; /* padding */ - u_int32_t en_mxcsr; /* SSE control/status register */ - u_int32_t en_mxcsr_mask; /* valid bits in mxcsr */ -}; - -/* Contents of each SSE extended accumulator */ -struct xmmacc { - u_char xmm_bytes[16]; -}; - -/* Contents of the upper 16 bytes of each AVX extended accumulator */ -struct ymmacc { - uint8_t ymm_bytes[16]; -}; - -struct savexmm { - struct envxmm sv_env; - struct { - struct fpacc87 fp_acc; - u_char fp_pad[6]; /* padding */ - } sv_fp[8]; - struct xmmacc sv_xmm[8]; - u_char sv_pad[224]; -} __aligned(16); - -union savefpu { - struct save87 sv_87; - struct savexmm sv_xmm; -}; - -struct xstate_hdr { - uint64_t xstate_bv; - uint8_t xstate_rsrv0[16]; - uint8_t xstate_rsrv[40]; -}; - -struct savexmm_xstate { - struct xstate_hdr sx_hd; - struct ymmacc sx_ymm[16]; -}; - -struct savexmm_ymm { - struct envxmm sv_env; - struct { - struct fpacc87 fp_acc; - int8_t fp_pad[6]; /* padding */ - } sv_fp[8]; - struct xmmacc sv_xmm[16]; - uint8_t sv_pad[96]; - struct savexmm_xstate sv_xstate; -} __aligned(64); - -/* - * The hardware default control word for i387's and later coprocessors is - * 0x37F, giving: - * - * round to nearest - * 64-bit precision - * all exceptions masked. - * - * We modify the affine mode bit and precision bits in this to give: - * - * affine mode for 287's (if they work at all) (1 in bitfield 1<<12) - * 53-bit precision (2 in bitfield 3<<8) - * - * 64-bit precision often gives bad results with high level languages - * because it makes the results of calculations depend on whether - * intermediate values are stored in memory or in FPU registers. - */ -#define __INITIAL_NPXCW__ 0x127F -#define __INITIAL_MXCSR__ 0x1F80 +#include #ifdef _KERNEL Added: head/sys/x86/include/fpu.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/x86/include/fpu.h Fri Mar 16 20:24:30 2012 (r233044) @@ -0,0 +1,216 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * William Jolitz. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * 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. + * + * from: @(#)npx.h 5.3 (Berkeley) 1/18/91 + * $FreeBSD$ + */ + +/* + * Floating Point Data Structures and Constants + * W. Jolitz 1/90 + */ + +#ifndef _X86_FPU_H_ +#define _X86_FPU_H_ + +/* Environment information of floating point unit. */ +struct env87 { + int32_t en_cw; /* control word (16bits) */ + int32_t en_sw; /* status word (16bits) */ + int32_t en_tw; /* tag word (16bits) */ + int32_t en_fip; /* fp instruction pointer */ + uint16_t en_fcs; /* fp code segment selector */ + uint16_t en_opcode; /* opcode last executed (11 bits) */ + int32_t en_foo; /* fp operand offset */ + int32_t en_fos; /* fp operand segment selector */ +}; + +/* Contents of each x87 floating point accumulator. */ +struct fpacc87 { + uint8_t fp_bytes[10]; +}; + +/* Floating point context. (i386 fnsave/frstor) */ +struct save87 { + struct env87 sv_env; /* floating point control/status */ + struct fpacc87 sv_ac[8]; /* accumulator contents, 0-7 */ + uint8_t sv_pad0[4]; /* saved status word (now unused) */ + /* + * Bogus padding for emulators. Emulators should use their own + * struct and arrange to store into this struct (ending here) + * before it is inspected for ptracing or for core dumps. Some + * emulators overwrite the whole struct. We have no good way of + * knowing how much padding to leave. Leave just enough for the + * GPL emulator's i387_union (176 bytes total). + */ + uint8_t sv_pad[64]; /* padding; used by emulators */ +}; + +/* Contents of each SSE extended accumulator. */ +struct xmmacc { + uint8_t xmm_bytes[16]; +}; + +/* Contents of the upper 16 bytes of each AVX extended accumulator. */ +struct ymmacc { + uint8_t ymm_bytes[16]; +}; + +/* Rename structs below depending on machine architecture. */ +#ifdef __i386__ +#define __envxmm32 envxmm +#else +#define __envxmm32 envxmm32 +#define __envxmm64 envxmm +#endif + +struct __envxmm32 { + uint16_t en_cw; /* control word (16bits) */ + uint16_t en_sw; /* status word (16bits) */ + uint16_t en_tw; /* tag word (16bits) */ + uint16_t en_opcode; /* opcode last executed (11 bits) */ + uint32_t en_fip; /* fp instruction pointer */ + uint16_t en_fcs; /* fp code segment selector */ + uint16_t en_pad0; /* padding */ + uint32_t en_foo; /* fp operand offset */ + uint16_t en_fos; /* fp operand segment selector */ + uint16_t en_pad1; /* padding */ + uint32_t en_mxcsr; /* SSE control/status register */ + uint32_t en_mxcsr_mask; /* valid bits in mxcsr */ +}; + +struct __envxmm64 { + uint16_t en_cw; /* control word (16bits) */ + uint16_t en_sw; /* status word (16bits) */ + uint8_t en_tw; /* tag word (8bits) */ + uint8_t en_zero; + uint16_t en_opcode; /* opcode last executed (11 bits ) */ + uint64_t en_rip; /* fp instruction pointer */ + uint64_t en_rdp; /* fp operand pointer */ + uint32_t en_mxcsr; /* SSE control/status register */ + uint32_t en_mxcsr_mask; /* valid bits in mxcsr */ +}; + +/* Floating point context. (i386 fxsave/fxrstor) */ +struct savexmm { + struct __envxmm32 sv_env; + struct { + struct fpacc87 fp_acc; + uint8_t fp_pad[6]; /* padding */ + } sv_fp[8]; + struct xmmacc sv_xmm[8]; + uint8_t sv_pad[224]; +} __aligned(16); + +#ifdef __i386__ +union savefpu { + struct save87 sv_87; + struct savexmm sv_xmm; +}; +#else +/* Floating point context. (amd64 fxsave/fxrstor) */ +struct savefpu { + struct __envxmm64 sv_env; + struct { + struct fpacc87 fp_acc; + uint8_t fp_pad[6]; /* padding */ + } sv_fp[8]; + struct xmmacc sv_xmm[16]; + uint8_t sv_pad[96]; +} __aligned(16); +#endif + +struct xstate_hdr { + uint64_t xstate_bv; + uint8_t xstate_rsrv0[16]; + uint8_t xstate_rsrv[40]; +}; + +struct savexmm_xstate { + struct xstate_hdr sx_hd; + struct ymmacc sx_ymm[16]; +}; + +struct savexmm_ymm { + struct __envxmm32 sv_env; + struct { + struct fpacc87 fp_acc; + int8_t fp_pad[6]; /* padding */ + } sv_fp[8]; + struct xmmacc sv_xmm[16]; + uint8_t sv_pad[96]; + struct savexmm_xstate sv_xstate; +} __aligned(64); + +struct savefpu_xstate { + struct xstate_hdr sx_hd; + struct ymmacc sx_ymm[16]; +}; + +struct savefpu_ymm { + struct __envxmm64 sv_env; + struct { + struct fpacc87 fp_acc; + int8_t fp_pad[6]; /* padding */ + } sv_fp[8]; + struct xmmacc sv_xmm[16]; + uint8_t sv_pad[96]; + struct savefpu_xstate sv_xstate; +} __aligned(64); + +#undef __envxmm32 +#undef __envxmm64 + +/* + * The hardware default control word for i387's and later coprocessors is + * 0x37F, giving: + * + * round to nearest + * 64-bit precision + * all exceptions masked. + * + * FreeBSD/i386 uses 53 bit precision for things like fadd/fsub/fsqrt etc + * because of the difference between memory and fpu register stack arguments. + * If its using an intermediate fpu register, it has 80/64 bits to work + * with. If it uses memory, it has 64/53 bits to work with. However, + * gcc is aware of this and goes to a fair bit of trouble to make the + * best use of it. + * + * This is mostly academic for AMD64, because the ABI prefers the use + * SSE2 based math. For FreeBSD/amd64, we go with the default settings. + */ +#define __INITIAL_FPUCW__ 0x037F +#define __INITIAL_FPUCW_I386__ 0x127F +#define __INITIAL_NPXCW__ __INITIAL_FPUCW_I386__ +#define __INITIAL_MXCSR__ 0x1F80 +#define __INITIAL_MXCSR_MASK__ 0xFFBF + +#endif /* !_X86_FPU_H_ */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 20:32:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 034281065672; Fri, 16 Mar 2012 20:32:12 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8B718FC0A; Fri, 16 Mar 2012 20:32:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GKWBcu033719; Fri, 16 Mar 2012 20:32:11 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GKWBRV033715; Fri, 16 Mar 2012 20:32:11 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201203162032.q2GKWBRV033715@svn.freebsd.org> From: Davide Italiano Date: Fri, 16 Mar 2012 20:32: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: r233045 - in head/sys: conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 20:32:12 -0000 Author: davide Date: Fri Mar 16 20:32:11 2012 New Revision: 233045 URL: http://svn.freebsd.org/changeset/base/233045 Log: Add rudimentary profiling of the hash table used in the in the umtx code to hold active lock queues. Reviewed by: attilio Approved by: davidxu, gnn (mentor) MFC after: 3 weeks Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/kern/kern_umtx.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Mar 16 20:24:30 2012 (r233044) +++ head/sys/conf/NOTES Fri Mar 16 20:32:11 2012 (r233045) @@ -274,6 +274,8 @@ options SX_NOINLINE # frequency. # TURNSTILE_PROFILING enables rudimentary profiling of the hash table # used to hold active lock queues. +# UMTX_PROFILING enables rudimentary profiling of the hash table used + to hold active lock queues. # WITNESS enables the witness code which detects deadlocks and cycles # during locking operations. # WITNESS_KDB causes the witness code to drop into the kernel debugger if @@ -297,8 +299,8 @@ options MPROF_HASH_SIZE="1543" # Profiling for internal hash tables. options SLEEPQUEUE_PROFILING options TURNSTILE_PROFILING +options UMTX_PROFILING - ##################################################################### # COMPATIBILITY OPTIONS Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Fri Mar 16 20:24:30 2012 (r233044) +++ head/sys/conf/options Fri Mar 16 20:32:11 2012 (r233045) @@ -186,6 +186,7 @@ SYSVSEM opt_sysvipc.h SYSVSHM opt_sysvipc.h SW_WATCHDOG opt_watchdog.h TURNSTILE_PROFILING +UMTX_PROFILING VFS_AIO VFS_ALLOW_NONMPSAFE VERBOSE_SYSINIT opt_global.h Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Fri Mar 16 20:24:30 2012 (r233044) +++ head/sys/kern/kern_umtx.c Fri Mar 16 20:32:11 2012 (r233045) @@ -29,6 +29,8 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#include "opt_umtx_profiling.h" + #include #include #include @@ -154,6 +156,10 @@ struct umtxq_chain { /* All PI in the list */ TAILQ_HEAD(,umtx_pi) uc_pi_list; +#ifdef UMTX_PROFILING + int length; + int max_length; +#endif }; #define UMTXQ_LOCKED_ASSERT(uc) mtx_assert(&(uc)->uc_lock, MA_OWNED) @@ -190,6 +196,12 @@ static SYSCTL_NODE(_debug, OID_AUTO, umt SYSCTL_INT(_debug_umtx, OID_AUTO, umtx_pi_allocated, CTLFLAG_RD, &umtx_pi_allocated, 0, "Allocated umtx_pi"); +#ifdef UMTX_PROFILING +static long max_length; +SYSCTL_LONG(_debug_umtx, OID_AUTO, max_length, CTLFLAG_RD, &max_length, 0, "max_length"); +static SYSCTL_NODE(_debug_umtx, OID_AUTO, chains, CTLFLAG_RD, 0, "umtx chain stats"); +#endif + static void umtxq_sysinit(void *); static void umtxq_hash(struct umtx_key *key); static struct umtxq_chain *umtxq_getchain(struct umtx_key *key); @@ -215,6 +227,27 @@ SYSINIT(umtx, SI_SUB_EVENTHANDLER+1, SI_ static struct mtx umtx_lock; +#ifdef UMTX_PROFILING +static void +umtx_init_profiling(void) +{ + struct sysctl_oid *chain_oid; + char chain_name[10]; + int i; + + for (i = 0; i < UMTX_CHAINS; ++i) { + snprintf(chain_name, sizeof(chain_name), "%d", i); + chain_oid = SYSCTL_ADD_NODE(NULL, + SYSCTL_STATIC_CHILDREN(_debug_umtx_chains), OID_AUTO, + chain_name, CTLFLAG_RD, NULL, "umtx hash stats"); + SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(chain_oid), OID_AUTO, + "max_length0", CTLFLAG_RD, &umtxq_chains[0][i].max_length, 0, NULL); + SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(chain_oid), OID_AUTO, + "max_length1", CTLFLAG_RD, &umtxq_chains[1][i].max_length, 0, NULL); + } +} +#endif + static void umtxq_sysinit(void *arg __unused) { @@ -232,8 +265,15 @@ umtxq_sysinit(void *arg __unused) TAILQ_INIT(&umtxq_chains[i][j].uc_pi_list); umtxq_chains[i][j].uc_busy = 0; umtxq_chains[i][j].uc_waiters = 0; + #ifdef UMTX_PROFILING + umtxq_chains[i][j].length = 0; + umtxq_chains[i][j].max_length = 0; + #endif } } + #ifdef UMTX_PROFILING + umtx_init_profiling(); + #endif mtx_init(&umtx_lock, "umtx lock", NULL, MTX_SPIN); EVENTHANDLER_REGISTER(process_exec, umtx_exec_hook, NULL, EVENTHANDLER_PRI_ANY); @@ -384,6 +424,14 @@ umtxq_insert_queue(struct umtx_q *uq, in TAILQ_INSERT_TAIL(&uh->head, uq, uq_link); uh->length++; + #ifdef UMTX_PROFILING + uc->length++; + if (uc->length > uc->max_length) { + uc->max_length = uc->length; + if (uc->max_length > max_length) + max_length = uc->max_length; + } + #endif uq->uq_flags |= UQF_UMTXQ; uq->uq_cur_queue = uh; return; @@ -401,6 +449,9 @@ umtxq_remove_queue(struct umtx_q *uq, in uh = uq->uq_cur_queue; TAILQ_REMOVE(&uh->head, uq, uq_link); uh->length--; + #ifdef UMTX_PROFILING + uc->length--; + #endif uq->uq_flags &= ~UQF_UMTXQ; if (TAILQ_EMPTY(&uh->head)) { KASSERT(uh->length == 0, From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 21:28:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FF5A1065676; Fri, 16 Mar 2012 21:28:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 487E88FC08; Fri, 16 Mar 2012 21:28:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GLS6jB035574; Fri, 16 Mar 2012 21:28:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GLS6fC035565; Fri, 16 Mar 2012 21:28:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203162128.q2GLS6fC035565@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Mar 2012 21:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233046 - in stable/9/sys: i386/conf netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 21:28:06 -0000 Author: jhb Date: Fri Mar 16 21:28:05 2012 New Revision: 233046 URL: http://svn.freebsd.org/changeset/base/233046 Log: MFC 226340,226340: Use queue(3) macros instead of home-rolled versions in several places in the INET6 code. This includes retiring the 'ndpr_next' and 'pfr_next' macros. Modified: stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet6/icmp6.c stable/9/sys/netinet6/in6.c stable/9/sys/netinet6/in6_ifattach.c stable/9/sys/netinet6/nd6.c stable/9/sys/netinet6/nd6.h stable/9/sys/netinet6/nd6_nbr.c stable/9/sys/netinet6/nd6_rtr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Fri Mar 16 20:32:11 2012 (r233045) +++ stable/9/sys/netinet/sctp_output.c Fri Mar 16 21:28:05 2012 (r233046) @@ -13834,8 +13834,7 @@ sctp_v6src_match_nexthop(struct sockaddr SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)src6); /* search installed gateway from prefix entry */ - for (pfxrtr = pfx->ndpr_advrtrs.lh_first; pfxrtr; pfxrtr = - pfxrtr->pfr_next) { + LIST_FOREACH(pfxrtr, &pfx->ndpr_advrtrs, pfr_entry) { memset(&gw6, 0, sizeof(struct sockaddr_in6)); gw6.sin6_family = AF_INET6; gw6.sin6_len = sizeof(struct sockaddr_in6); Modified: stable/9/sys/netinet6/icmp6.c ============================================================================== --- stable/9/sys/netinet6/icmp6.c Fri Mar 16 20:32:11 2012 (r233045) +++ stable/9/sys/netinet6/icmp6.c Fri Mar 16 21:28:05 2012 (r233046) @@ -1780,7 +1780,7 @@ ni6_addrs(struct icmp6_nodeinfo *ni6, st } IFNET_RLOCK_NOSLEEP(); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { addrsofif = 0; IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Fri Mar 16 20:32:11 2012 (r233045) +++ stable/9/sys/netinet6/in6.c Fri Mar 16 21:28:05 2012 (r233046) @@ -1309,7 +1309,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru /* * Leave from multicast groups we have joined for the interface. */ - while ((imm = ia->ia6_memberships.lh_first) != NULL) { + while ((imm = LIST_FIRST(&ia->ia6_memberships)) != NULL) { LIST_REMOVE(imm, i6mm_chain); in6_leavegroup(imm); } @@ -2330,8 +2330,7 @@ in6_setmaxmtu(void) struct ifnet *ifp; IFNET_RLOCK_NOSLEEP(); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; - ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { /* this function can be called during ifnet initialization */ if (!ifp->if_afdata[AF_INET6]) continue; Modified: stable/9/sys/netinet6/in6_ifattach.c ============================================================================== --- stable/9/sys/netinet6/in6_ifattach.c Fri Mar 16 20:32:11 2012 (r233045) +++ stable/9/sys/netinet6/in6_ifattach.c Fri Mar 16 21:28:05 2012 (r233046) @@ -405,7 +405,7 @@ get_ifid(struct ifnet *ifp0, struct ifne /* next, try to get it from some other hardware interface */ IFNET_RLOCK_NOSLEEP(); - for (ifp = V_ifnet.tqh_first; ifp; ifp = ifp->if_list.tqe_next) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { if (ifp == ifp0) continue; if (in6_get_hw_ifid(ifp, in6) != 0) @@ -816,7 +816,7 @@ in6_ifdetach(struct ifnet *ifp) /* * leave from multicast groups we have joined for the interface */ - while ((imm = ia->ia6_memberships.lh_first) != NULL) { + while ((imm = LIST_FIRST(&ia->ia6_memberships)) != NULL) { LIST_REMOVE(imm, i6mm_chain); in6_leavegroup(imm); } @@ -916,8 +916,7 @@ in6_tmpaddrtimer(void *arg) V_ip6_temp_regen_advance) * hz, in6_tmpaddrtimer, curvnet); bzero(nullbuf, sizeof(nullbuf)); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; - ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { ndi = ND_IFINFO(ifp); if (bcmp(ndi->randomid, nullbuf, sizeof(nullbuf)) != 0) { /* Modified: stable/9/sys/netinet6/nd6.c ============================================================================== --- stable/9/sys/netinet6/nd6.c Fri Mar 16 20:32:11 2012 (r233045) +++ stable/9/sys/netinet6/nd6.c Fri Mar 16 21:28:05 2012 (r233046) @@ -572,8 +572,8 @@ nd6_timer(void *arg) { CURVNET_SET((struct vnet *) arg); int s; - struct nd_defrouter *dr; - struct nd_prefix *pr; + struct nd_defrouter *dr, *ndr; + struct nd_prefix *pr, *npr; struct in6_ifaddr *ia6, *nia6; callout_reset(&V_nd6_timer_ch, V_nd6_prune * hz, @@ -581,16 +581,9 @@ nd6_timer(void *arg) /* expire default router list */ s = splnet(); - dr = TAILQ_FIRST(&V_nd_defrouter); - while (dr) { - if (dr->expire && dr->expire < time_second) { - struct nd_defrouter *t; - t = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { + if (dr->expire && dr->expire < time_second) defrtrlist_del(dr); - dr = t; - } else { - dr = TAILQ_NEXT(dr, dr_entry); - } } /* @@ -666,8 +659,7 @@ nd6_timer(void *arg) } /* expire prefix list */ - pr = V_nd_prefix.lh_first; - while (pr) { + LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) { /* * check prefix lifetime. * since pltime is just for autoconf, pltime processing for @@ -675,18 +667,13 @@ nd6_timer(void *arg) */ if (pr->ndpr_vltime != ND6_INFINITE_LIFETIME && time_second - pr->ndpr_lastupdate > pr->ndpr_vltime) { - struct nd_prefix *t; - t = pr->ndpr_next; /* * address expiration and prefix expiration are * separate. NEVER perform in6_purgeaddr here. */ - prelist_remove(pr); - pr = t; - } else - pr = pr->ndpr_next; + } } splx(s); CURVNET_RESTORE(); @@ -779,8 +766,7 @@ nd6_purge(struct ifnet *ifp) * in the routing table, in order to keep additional side effects as * small as possible. */ - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = ndr) { - ndr = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { if (dr->installed) continue; @@ -788,8 +774,7 @@ nd6_purge(struct ifnet *ifp) defrtrlist_del(dr); } - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = ndr) { - ndr = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { if (!dr->installed) continue; @@ -798,8 +783,7 @@ nd6_purge(struct ifnet *ifp) } /* Nuke prefix list entries toward ifp */ - for (pr = V_nd_prefix.lh_first; pr; pr = npr) { - npr = pr->ndpr_next; + LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) { if (pr->ndpr_ifp == ifp) { /* * Because if_detach() does *not* release prefixes @@ -910,7 +894,7 @@ nd6_is_new_addr_neighbor(struct sockaddr * If the address matches one of our on-link prefixes, it should be a * neighbor. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { if (pr->ndpr_ifp != ifp) continue; @@ -963,7 +947,7 @@ nd6_is_new_addr_neighbor(struct sockaddr * as on-link, and thus, as a neighbor. */ if (ND_IFINFO(ifp)->flags & ND6_IFF_ACCEPT_RTADV && - TAILQ_FIRST(&V_nd_defrouter) == NULL && + TAILQ_EMPTY(&V_nd_defrouter) && V_nd6_defifindex == ifp->if_index) { return (1); } @@ -1235,8 +1219,9 @@ nd6_ioctl(u_long cmd, caddr_t data, stru */ bzero(drl, sizeof(*drl)); s = splnet(); - dr = TAILQ_FIRST(&V_nd_defrouter); - while (dr && i < DRLSTSIZ) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { + if (i >= DRLSTSIZ) + break; drl->defrouter[i].rtaddr = dr->rtaddr; in6_clearscope(&drl->defrouter[i].rtaddr); @@ -1245,7 +1230,6 @@ nd6_ioctl(u_long cmd, caddr_t data, stru drl->defrouter[i].expire = dr->expire; drl->defrouter[i].if_index = dr->ifp->if_index; i++; - dr = TAILQ_NEXT(dr, dr_entry); } splx(s); break; @@ -1264,11 +1248,12 @@ nd6_ioctl(u_long cmd, caddr_t data, stru */ bzero(oprl, sizeof(*oprl)); s = splnet(); - pr = V_nd_prefix.lh_first; - while (pr && i < PRLSTSIZ) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { struct nd_pfxrouter *pfr; int j; + if (i >= PRLSTSIZ) + break; oprl->prefix[i].prefix = pr->ndpr_prefix.sin6_addr; oprl->prefix[i].raflags = pr->ndpr_raf; oprl->prefix[i].prefixlen = pr->ndpr_plen; @@ -1293,9 +1278,8 @@ nd6_ioctl(u_long cmd, caddr_t data, stru oprl->prefix[i].expire = maxexpire; } - pfr = pr->ndpr_advrtrs.lh_first; j = 0; - while (pfr) { + LIST_FOREACH(pfr, &pr->ndpr_advrtrs, pfr_entry) { if (j < DRLSTSIZ) { #define RTRADDR oprl->prefix[i].advrtr[j] RTRADDR = pfr->router->rtaddr; @@ -1303,13 +1287,11 @@ nd6_ioctl(u_long cmd, caddr_t data, stru #undef RTRADDR } j++; - pfr = pfr->pfr_next; } oprl->prefix[i].advrtrs = j; oprl->prefix[i].origin = PR_ORIG_RA; i++; - pr = pr->ndpr_next; } splx(s); @@ -1471,11 +1453,9 @@ nd6_ioctl(u_long cmd, caddr_t data, stru struct nd_prefix *pr, *next; s = splnet(); - for (pr = V_nd_prefix.lh_first; pr; pr = next) { + LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, next) { struct in6_ifaddr *ia, *ia_next; - next = pr->ndpr_next; - if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) continue; /* XXX */ @@ -1501,8 +1481,7 @@ nd6_ioctl(u_long cmd, caddr_t data, stru s = splnet(); defrouter_reset(); - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = next) { - next = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, next) { defrtrlist_del(dr); } defrouter_select(); @@ -1825,8 +1804,7 @@ nd6_slowtimo(void *arg) callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz, nd6_slowtimo, curvnet); IFNET_RLOCK_NOSLEEP(); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; - ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { nd6if = ND_IFINFO(ifp); if (nd6if->basereachable && /* already initialized */ (nd6if->recalctm -= ND6_SLOWTIMER_INTERVAL) <= 0) { @@ -2298,8 +2276,7 @@ nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS) return EPERM; error = 0; - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { d = (struct in6_defrouter *)buf; de = (struct in6_defrouter *)(buf + sizeof(buf)); @@ -2339,7 +2316,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) return EPERM; error = 0; - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { u_short advrtrs; size_t advance; struct sockaddr_in6 *sin6, *s6; @@ -2384,8 +2361,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) p->flags = pr->ndpr_stateflags; p->origin = PR_ORIG_RA; advrtrs = 0; - for (pfr = pr->ndpr_advrtrs.lh_first; pfr; - pfr = pfr->pfr_next) { + LIST_FOREACH(pfr, &pr->ndpr_advrtrs, pfr_entry) { if ((void *)&sin6[advrtrs + 1] > (void *)pe) { advrtrs++; continue; Modified: stable/9/sys/netinet6/nd6.h ============================================================================== --- stable/9/sys/netinet6/nd6.h Fri Mar 16 20:32:11 2012 (r233045) +++ stable/9/sys/netinet6/nd6.h Fri Mar 16 21:28:05 2012 (r233046) @@ -278,8 +278,6 @@ struct nd_prefix { int ndpr_refcnt; /* reference couter from addresses */ }; -#define ndpr_next ndpr_entry.le_next - #define ndpr_raf ndpr_flags #define ndpr_raf_onlink ndpr_flags.onlink #define ndpr_raf_auto ndpr_flags.autonomous @@ -313,7 +311,6 @@ struct inet6_ndpr_msghdr { struct nd_pfxrouter { LIST_ENTRY(nd_pfxrouter) pfr_entry; -#define pfr_next pfr_entry.le_next struct nd_defrouter *router; }; Modified: stable/9/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/9/sys/netinet6/nd6_nbr.c Fri Mar 16 20:32:11 2012 (r233045) +++ stable/9/sys/netinet6/nd6_nbr.c Fri Mar 16 21:28:05 2012 (r233046) @@ -1190,11 +1190,11 @@ nd6_dad_find(struct ifaddr *ifa) { struct dadq *dp; - for (dp = V_dadq.tqh_first; dp; dp = dp->dad_list.tqe_next) { + TAILQ_FOREACH(dp, &V_dadq, dad_list) if (dp->dad_ifa == ifa) - return dp; - } - return NULL; + return (dp); + + return (NULL); } static void Modified: stable/9/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/9/sys/netinet6/nd6_rtr.c Fri Mar 16 20:32:11 2012 (r233045) +++ stable/9/sys/netinet6/nd6_rtr.c Fri Mar 16 21:28:05 2012 (r233046) @@ -504,8 +504,7 @@ defrouter_lookup(struct in6_addr *addr, { struct nd_defrouter *dr; - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { if (dr->ifp == ifp && IN6_ARE_ADDR_EQUAL(addr, &dr->rtaddr)) return (dr); } @@ -552,8 +551,7 @@ defrouter_reset(void) { struct nd_defrouter *dr; - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) defrouter_delreq(dr); /* @@ -584,7 +582,7 @@ defrtrlist_del(struct nd_defrouter *dr) /* * Also delete all the pointers to the router in each prefix lists. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { struct nd_pfxrouter *pfxrtr; if ((pfxrtr = pfxrtr_lookup(pr, dr)) != NULL) pfxrtr_del(pfxrtr); @@ -634,7 +632,7 @@ defrouter_select(void) * Let's handle easy case (3) first: * If default router list is empty, there's nothing to be done. */ - if (!TAILQ_FIRST(&V_nd_defrouter)) { + if (TAILQ_EMPTY(&V_nd_defrouter)) { splx(s); return; } @@ -644,8 +642,7 @@ defrouter_select(void) * We just pick up the first reachable one (if any), assuming that * the ordering rule of the list described in defrtrlist_update(). */ - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { IF_AFDATA_LOCK(dr->ifp); if (selected_dr == NULL && (ln = nd6_lookup(&dr->rtaddr, 0, dr->ifp)) && @@ -802,8 +799,7 @@ insert: */ /* insert at the end of the group */ - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { if (rtpref(n) > rtpref(dr)) break; } @@ -824,7 +820,7 @@ pfxrtr_lookup(struct nd_prefix *pr, stru { struct nd_pfxrouter *search; - for (search = pr->ndpr_advrtrs.lh_first; search; search = search->pfr_next) { + LIST_FOREACH(search, &pr->ndpr_advrtrs, pfr_entry) { if (search->router == dr) break; } @@ -860,8 +856,7 @@ nd6_prefix_lookup(struct nd_prefixctl *k { struct nd_prefix *search; - for (search = V_nd_prefix.lh_first; - search; search = search->ndpr_next) { + LIST_FOREACH(search, &V_nd_prefix, ndpr_entry) { if (key->ndpr_ifp == search->ndpr_ifp && key->ndpr_plen == search->ndpr_plen && in6_are_prefix_equal(&key->ndpr_prefix.sin6_addr, @@ -967,9 +962,7 @@ prelist_remove(struct nd_prefix *pr) LIST_REMOVE(pr, ndpr_entry); /* free list of routers that adversed the prefix */ - for (pfr = pr->ndpr_advrtrs.lh_first; pfr; pfr = next) { - next = pfr->pfr_next; - + LIST_FOREACH_SAFE(pfr, &pr->ndpr_advrtrs, pfr_entry, next) { free(pfr, M_IP6NDP); } splx(s); @@ -1332,8 +1325,7 @@ find_pfxlist_reachable_router(struct nd_ struct llentry *ln; int canreach; - for (pfxrtr = LIST_FIRST(&pr->ndpr_advrtrs); pfxrtr != NULL; - pfxrtr = LIST_NEXT(pfxrtr, pfr_entry)) { + LIST_FOREACH(pfxrtr, &pr->ndpr_advrtrs, pfr_entry) { IF_AFDATA_LOCK(pfxrtr->router->ifp); ln = nd6_lookup(&pfxrtr->router->rtaddr, 0, pfxrtr->router->ifp); IF_AFDATA_UNLOCK(pfxrtr->router->ifp); @@ -1372,7 +1364,7 @@ pfxlist_onlink_check() * Check if there is a prefix that has a reachable advertising * router. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { if (pr->ndpr_raf_onlink && find_pfxlist_reachable_router(pr)) break; } @@ -1382,12 +1374,10 @@ pfxlist_onlink_check() * that does not advertise any prefixes. */ if (pr == NULL) { - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { struct nd_prefix *pr0; - for (pr0 = V_nd_prefix.lh_first; pr0; - pr0 = pr0->ndpr_next) { + LIST_FOREACH(pr0, &V_nd_prefix, ndpr_entry) { if ((pfxrtr = pfxrtr_lookup(pr0, dr)) != NULL) break; } @@ -1395,7 +1385,7 @@ pfxlist_onlink_check() break; } } - if (pr != NULL || (TAILQ_FIRST(&V_nd_defrouter) && pfxrtr == NULL)) { + if (pr != NULL || (!TAILQ_EMPTY(&V_nd_defrouter) && pfxrtr == NULL)) { /* * There is at least one prefix that has a reachable router, * or at least a router which probably does not advertise @@ -1405,7 +1395,7 @@ pfxlist_onlink_check() * Detach prefixes which have no reachable advertising * router, and attach other prefixes. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { /* XXX: a link-local prefix should never be detached */ if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) continue; @@ -1429,7 +1419,7 @@ pfxlist_onlink_check() } } else { /* there is no prefix that has a reachable router */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) continue; @@ -1452,7 +1442,7 @@ pfxlist_onlink_check() * interfaces. Such cases will be handled in nd6_prefix_onlink, * so we don't have to care about them. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { int e; char ip6buf[INET6_ADDRSTRLEN]; @@ -1653,7 +1643,7 @@ nd6_prefix_onlink(struct nd_prefix *pr) * Although such a configuration is expected to be rare, we explicitly * allow it. */ - for (opr = V_nd_prefix.lh_first; opr; opr = opr->ndpr_next) { + LIST_FOREACH(opr, &V_nd_prefix, ndpr_entry) { if (opr == pr) continue; @@ -1765,7 +1755,7 @@ nd6_prefix_offlink(struct nd_prefix *pr) * If there's one, try to make the prefix on-link on the * interface. */ - for (opr = V_nd_prefix.lh_first; opr; opr = opr->ndpr_next) { + LIST_FOREACH(opr, &V_nd_prefix, ndpr_entry) { if (opr == pr) continue; From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 21:28:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 247A71065670; Fri, 16 Mar 2012 21:28:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6B058FC16; Fri, 16 Mar 2012 21:28:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GLSTFV035628; Fri, 16 Mar 2012 21:28:29 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GLSTiZ035619; Fri, 16 Mar 2012 21:28:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203162128.q2GLSTiZ035619@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Mar 2012 21:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233047 - in stable/8/sys: i386/conf netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 21:28:30 -0000 Author: jhb Date: Fri Mar 16 21:28:29 2012 New Revision: 233047 URL: http://svn.freebsd.org/changeset/base/233047 Log: MFC 226340,226340: Use queue(3) macros instead of home-rolled versions in several places in the INET6 code. This includes retiring the 'ndpr_next' and 'pfr_next' macros. Modified: stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet6/icmp6.c stable/8/sys/netinet6/in6.c stable/8/sys/netinet6/in6_ifattach.c stable/8/sys/netinet6/nd6.c stable/8/sys/netinet6/nd6.h stable/8/sys/netinet6/nd6_nbr.c stable/8/sys/netinet6/nd6_rtr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (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/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Fri Mar 16 21:28:05 2012 (r233046) +++ stable/8/sys/netinet/sctp_output.c Fri Mar 16 21:28:29 2012 (r233047) @@ -13834,8 +13834,7 @@ sctp_v6src_match_nexthop(struct sockaddr SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)src6); /* search installed gateway from prefix entry */ - for (pfxrtr = pfx->ndpr_advrtrs.lh_first; pfxrtr; pfxrtr = - pfxrtr->pfr_next) { + LIST_FOREACH(pfxrtr, &pfx->ndpr_advrtrs, pfr_entry) { memset(&gw6, 0, sizeof(struct sockaddr_in6)); gw6.sin6_family = AF_INET6; gw6.sin6_len = sizeof(struct sockaddr_in6); Modified: stable/8/sys/netinet6/icmp6.c ============================================================================== --- stable/8/sys/netinet6/icmp6.c Fri Mar 16 21:28:05 2012 (r233046) +++ stable/8/sys/netinet6/icmp6.c Fri Mar 16 21:28:29 2012 (r233047) @@ -1697,7 +1697,7 @@ ni6_addrs(struct icmp6_nodeinfo *ni6, st } IFNET_RLOCK_NOSLEEP(); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { addrsofif = 0; IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Fri Mar 16 21:28:05 2012 (r233046) +++ stable/8/sys/netinet6/in6.c Fri Mar 16 21:28:29 2012 (r233047) @@ -1203,7 +1203,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru /* * Leave from multicast groups we have joined for the interface. */ - while ((imm = ia->ia6_memberships.lh_first) != NULL) { + while ((imm = LIST_FIRST(&ia->ia6_memberships)) != NULL) { LIST_REMOVE(imm, i6mm_chain); in6_leavegroup(imm); } @@ -2242,8 +2242,7 @@ in6_setmaxmtu(void) struct ifnet *ifp; IFNET_RLOCK_NOSLEEP(); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; - ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { /* this function can be called during ifnet initialization */ if (!ifp->if_afdata[AF_INET6]) continue; Modified: stable/8/sys/netinet6/in6_ifattach.c ============================================================================== --- stable/8/sys/netinet6/in6_ifattach.c Fri Mar 16 21:28:05 2012 (r233046) +++ stable/8/sys/netinet6/in6_ifattach.c Fri Mar 16 21:28:29 2012 (r233047) @@ -404,7 +404,7 @@ get_ifid(struct ifnet *ifp0, struct ifne /* next, try to get it from some other hardware interface */ IFNET_RLOCK_NOSLEEP(); - for (ifp = V_ifnet.tqh_first; ifp; ifp = ifp->if_list.tqe_next) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { if (ifp == ifp0) continue; if (in6_get_hw_ifid(ifp, in6) != 0) @@ -809,7 +809,7 @@ in6_ifdetach(struct ifnet *ifp) /* * leave from multicast groups we have joined for the interface */ - while ((imm = ia->ia6_memberships.lh_first) != NULL) { + while ((imm = LIST_FIRST(&ia->ia6_memberships)) != NULL) { LIST_REMOVE(imm, i6mm_chain); in6_leavegroup(imm); } @@ -909,8 +909,7 @@ in6_tmpaddrtimer(void *arg) V_ip6_temp_regen_advance) * hz, in6_tmpaddrtimer, curvnet); bzero(nullbuf, sizeof(nullbuf)); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; - ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { ndi = ND_IFINFO(ifp); if (bcmp(ndi->randomid, nullbuf, sizeof(nullbuf)) != 0) { /* Modified: stable/8/sys/netinet6/nd6.c ============================================================================== --- stable/8/sys/netinet6/nd6.c Fri Mar 16 21:28:05 2012 (r233046) +++ stable/8/sys/netinet6/nd6.c Fri Mar 16 21:28:29 2012 (r233047) @@ -562,8 +562,8 @@ nd6_timer(void *arg) { CURVNET_SET((struct vnet *) arg); int s; - struct nd_defrouter *dr; - struct nd_prefix *pr; + struct nd_defrouter *dr, *ndr; + struct nd_prefix *pr, *npr; struct in6_ifaddr *ia6, *nia6; callout_reset(&V_nd6_timer_ch, V_nd6_prune * hz, @@ -571,16 +571,9 @@ nd6_timer(void *arg) /* expire default router list */ s = splnet(); - dr = TAILQ_FIRST(&V_nd_defrouter); - while (dr) { - if (dr->expire && dr->expire < time_second) { - struct nd_defrouter *t; - t = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { + if (dr->expire && dr->expire < time_second) defrtrlist_del(dr); - dr = t; - } else { - dr = TAILQ_NEXT(dr, dr_entry); - } } /* @@ -656,8 +649,7 @@ nd6_timer(void *arg) } /* expire prefix list */ - pr = V_nd_prefix.lh_first; - while (pr) { + LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) { /* * check prefix lifetime. * since pltime is just for autoconf, pltime processing for @@ -665,18 +657,13 @@ nd6_timer(void *arg) */ if (pr->ndpr_vltime != ND6_INFINITE_LIFETIME && time_second - pr->ndpr_lastupdate > pr->ndpr_vltime) { - struct nd_prefix *t; - t = pr->ndpr_next; /* * address expiration and prefix expiration are * separate. NEVER perform in6_purgeaddr here. */ - prelist_remove(pr); - pr = t; - } else - pr = pr->ndpr_next; + } } splx(s); CURVNET_RESTORE(); @@ -769,8 +756,7 @@ nd6_purge(struct ifnet *ifp) * in the routing table, in order to keep additional side effects as * small as possible. */ - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = ndr) { - ndr = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { if (dr->installed) continue; @@ -778,8 +764,7 @@ nd6_purge(struct ifnet *ifp) defrtrlist_del(dr); } - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = ndr) { - ndr = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { if (!dr->installed) continue; @@ -788,8 +773,7 @@ nd6_purge(struct ifnet *ifp) } /* Nuke prefix list entries toward ifp */ - for (pr = V_nd_prefix.lh_first; pr; pr = npr) { - npr = pr->ndpr_next; + LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) { if (pr->ndpr_ifp == ifp) { /* * Because if_detach() does *not* release prefixes @@ -904,7 +888,7 @@ nd6_is_new_addr_neighbor(struct sockaddr * If the address matches one of our on-link prefixes, it should be a * neighbor. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { if (pr->ndpr_ifp != ifp) continue; @@ -958,7 +942,7 @@ nd6_is_new_addr_neighbor(struct sockaddr * XXX: we restrict the condition to hosts, because routers usually do * not have the "default router list". */ - if (!V_ip6_forwarding && TAILQ_FIRST(&V_nd_defrouter) == NULL && + if (!V_ip6_forwarding && TAILQ_EMPTY(&V_nd_defrouter) && V_nd6_defifindex == ifp->if_index) { return (1); } @@ -1231,8 +1215,9 @@ nd6_ioctl(u_long cmd, caddr_t data, stru */ bzero(drl, sizeof(*drl)); s = splnet(); - dr = TAILQ_FIRST(&V_nd_defrouter); - while (dr && i < DRLSTSIZ) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { + if (i >= DRLSTSIZ) + break; drl->defrouter[i].rtaddr = dr->rtaddr; in6_clearscope(&drl->defrouter[i].rtaddr); @@ -1241,7 +1226,6 @@ nd6_ioctl(u_long cmd, caddr_t data, stru drl->defrouter[i].expire = dr->expire; drl->defrouter[i].if_index = dr->ifp->if_index; i++; - dr = TAILQ_NEXT(dr, dr_entry); } splx(s); break; @@ -1260,11 +1244,12 @@ nd6_ioctl(u_long cmd, caddr_t data, stru */ bzero(oprl, sizeof(*oprl)); s = splnet(); - pr = V_nd_prefix.lh_first; - while (pr && i < PRLSTSIZ) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { struct nd_pfxrouter *pfr; int j; + if (i >= PRLSTSIZ) + break; oprl->prefix[i].prefix = pr->ndpr_prefix.sin6_addr; oprl->prefix[i].raflags = pr->ndpr_raf; oprl->prefix[i].prefixlen = pr->ndpr_plen; @@ -1289,9 +1274,8 @@ nd6_ioctl(u_long cmd, caddr_t data, stru oprl->prefix[i].expire = maxexpire; } - pfr = pr->ndpr_advrtrs.lh_first; j = 0; - while (pfr) { + LIST_FOREACH(pfr, &pr->ndpr_advrtrs, pfr_entry) { if (j < DRLSTSIZ) { #define RTRADDR oprl->prefix[i].advrtr[j] RTRADDR = pfr->router->rtaddr; @@ -1299,13 +1283,11 @@ nd6_ioctl(u_long cmd, caddr_t data, stru #undef RTRADDR } j++; - pfr = pfr->pfr_next; } oprl->prefix[i].advrtrs = j; oprl->prefix[i].origin = PR_ORIG_RA; i++; - pr = pr->ndpr_next; } splx(s); @@ -1369,11 +1351,9 @@ nd6_ioctl(u_long cmd, caddr_t data, stru struct nd_prefix *pr, *next; s = splnet(); - for (pr = V_nd_prefix.lh_first; pr; pr = next) { + LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, next) { struct in6_ifaddr *ia, *ia_next; - next = pr->ndpr_next; - if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) continue; /* XXX */ @@ -1399,8 +1379,7 @@ nd6_ioctl(u_long cmd, caddr_t data, stru s = splnet(); defrouter_reset(); - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = next) { - next = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, next) { defrtrlist_del(dr); } defrouter_select(); @@ -1722,8 +1701,7 @@ nd6_slowtimo(void *arg) callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz, nd6_slowtimo, curvnet); IFNET_RLOCK_NOSLEEP(); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; - ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { nd6if = ND_IFINFO(ifp); if (nd6if->basereachable && /* already initialized */ (nd6if->recalctm -= ND6_SLOWTIMER_INTERVAL) <= 0) { @@ -2169,8 +2147,7 @@ nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS) return EPERM; error = 0; - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { d = (struct in6_defrouter *)buf; de = (struct in6_defrouter *)(buf + sizeof(buf)); @@ -2210,7 +2187,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) return EPERM; error = 0; - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { u_short advrtrs; size_t advance; struct sockaddr_in6 *sin6, *s6; @@ -2255,8 +2232,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) p->flags = pr->ndpr_stateflags; p->origin = PR_ORIG_RA; advrtrs = 0; - for (pfr = pr->ndpr_advrtrs.lh_first; pfr; - pfr = pfr->pfr_next) { + LIST_FOREACH(pfr, &pr->ndpr_advrtrs, pfr_entry) { if ((void *)&sin6[advrtrs + 1] > (void *)pe) { advrtrs++; continue; Modified: stable/8/sys/netinet6/nd6.h ============================================================================== --- stable/8/sys/netinet6/nd6.h Fri Mar 16 21:28:05 2012 (r233046) +++ stable/8/sys/netinet6/nd6.h Fri Mar 16 21:28:29 2012 (r233047) @@ -276,8 +276,6 @@ struct nd_prefix { int ndpr_refcnt; /* reference couter from addresses */ }; -#define ndpr_next ndpr_entry.le_next - #define ndpr_raf ndpr_flags #define ndpr_raf_onlink ndpr_flags.onlink #define ndpr_raf_auto ndpr_flags.autonomous @@ -311,7 +309,6 @@ struct inet6_ndpr_msghdr { struct nd_pfxrouter { LIST_ENTRY(nd_pfxrouter) pfr_entry; -#define pfr_next pfr_entry.le_next struct nd_defrouter *router; }; Modified: stable/8/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/8/sys/netinet6/nd6_nbr.c Fri Mar 16 21:28:05 2012 (r233046) +++ stable/8/sys/netinet6/nd6_nbr.c Fri Mar 16 21:28:29 2012 (r233047) @@ -1154,11 +1154,11 @@ nd6_dad_find(struct ifaddr *ifa) { struct dadq *dp; - for (dp = V_dadq.tqh_first; dp; dp = dp->dad_list.tqe_next) { + TAILQ_FOREACH(dp, &V_dadq, dad_list) if (dp->dad_ifa == ifa) - return dp; - } - return NULL; + return (dp); + + return (NULL); } static void Modified: stable/8/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/8/sys/netinet6/nd6_rtr.c Fri Mar 16 21:28:05 2012 (r233046) +++ stable/8/sys/netinet6/nd6_rtr.c Fri Mar 16 21:28:29 2012 (r233047) @@ -494,8 +494,7 @@ defrouter_lookup(struct in6_addr *addr, { struct nd_defrouter *dr; - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { if (dr->ifp == ifp && IN6_ARE_ADDR_EQUAL(addr, &dr->rtaddr)) return (dr); } @@ -542,8 +541,7 @@ defrouter_reset(void) { struct nd_defrouter *dr; - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) defrouter_delreq(dr); /* @@ -574,7 +572,7 @@ defrtrlist_del(struct nd_defrouter *dr) /* * Also delete all the pointers to the router in each prefix lists. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { struct nd_pfxrouter *pfxrtr; if ((pfxrtr = pfxrtr_lookup(pr, dr)) != NULL) pfxrtr_del(pfxrtr); @@ -638,7 +636,7 @@ defrouter_select(void) * Let's handle easy case (3) first: * If default router list is empty, there's nothing to be done. */ - if (!TAILQ_FIRST(&V_nd_defrouter)) { + if (TAILQ_EMPTY(&V_nd_defrouter)) { splx(s); return; } @@ -648,8 +646,7 @@ defrouter_select(void) * We just pick up the first reachable one (if any), assuming that * the ordering rule of the list described in defrtrlist_update(). */ - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { IF_AFDATA_LOCK(dr->ifp); if (selected_dr == NULL && (ln = nd6_lookup(&dr->rtaddr, 0, dr->ifp)) && @@ -806,8 +803,7 @@ insert: */ /* insert at the end of the group */ - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { if (rtpref(n) > rtpref(dr)) break; } @@ -828,7 +824,7 @@ pfxrtr_lookup(struct nd_prefix *pr, stru { struct nd_pfxrouter *search; - for (search = pr->ndpr_advrtrs.lh_first; search; search = search->pfr_next) { + LIST_FOREACH(search, &pr->ndpr_advrtrs, pfr_entry) { if (search->router == dr) break; } @@ -864,8 +860,7 @@ nd6_prefix_lookup(struct nd_prefixctl *k { struct nd_prefix *search; - for (search = V_nd_prefix.lh_first; - search; search = search->ndpr_next) { + LIST_FOREACH(search, &V_nd_prefix, ndpr_entry) { if (key->ndpr_ifp == search->ndpr_ifp && key->ndpr_plen == search->ndpr_plen && in6_are_prefix_equal(&key->ndpr_prefix.sin6_addr, @@ -971,9 +966,7 @@ prelist_remove(struct nd_prefix *pr) LIST_REMOVE(pr, ndpr_entry); /* free list of routers that adversed the prefix */ - for (pfr = pr->ndpr_advrtrs.lh_first; pfr; pfr = next) { - next = pfr->pfr_next; - + LIST_FOREACH_SAFE(pfr, &pr->ndpr_advrtrs, pfr_entry, next) { free(pfr, M_IP6NDP); } splx(s); @@ -1336,8 +1329,7 @@ find_pfxlist_reachable_router(struct nd_ struct llentry *ln; int canreach; - for (pfxrtr = LIST_FIRST(&pr->ndpr_advrtrs); pfxrtr != NULL; - pfxrtr = LIST_NEXT(pfxrtr, pfr_entry)) { + LIST_FOREACH(pfxrtr, &pr->ndpr_advrtrs, pfr_entry) { IF_AFDATA_LOCK(pfxrtr->router->ifp); ln = nd6_lookup(&pfxrtr->router->rtaddr, 0, pfxrtr->router->ifp); IF_AFDATA_UNLOCK(pfxrtr->router->ifp); @@ -1376,7 +1368,7 @@ pfxlist_onlink_check() * Check if there is a prefix that has a reachable advertising * router. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { if (pr->ndpr_raf_onlink && find_pfxlist_reachable_router(pr)) break; } @@ -1386,12 +1378,10 @@ pfxlist_onlink_check() * that does not advertise any prefixes. */ if (pr == NULL) { - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { struct nd_prefix *pr0; - for (pr0 = V_nd_prefix.lh_first; pr0; - pr0 = pr0->ndpr_next) { + LIST_FOREACH(pr0, &V_nd_prefix, ndpr_entry) { if ((pfxrtr = pfxrtr_lookup(pr0, dr)) != NULL) break; } @@ -1399,7 +1389,7 @@ pfxlist_onlink_check() break; } } - if (pr != NULL || (TAILQ_FIRST(&V_nd_defrouter) && pfxrtr == NULL)) { + if (pr != NULL || (!TAILQ_EMPTY(&V_nd_defrouter) && pfxrtr == NULL)) { /* * There is at least one prefix that has a reachable router, * or at least a router which probably does not advertise @@ -1409,7 +1399,7 @@ pfxlist_onlink_check() * Detach prefixes which have no reachable advertising * router, and attach other prefixes. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { /* XXX: a link-local prefix should never be detached */ if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) continue; @@ -1433,7 +1423,7 @@ pfxlist_onlink_check() } } else { /* there is no prefix that has a reachable router */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) continue; @@ -1456,7 +1446,7 @@ pfxlist_onlink_check() * interfaces. Such cases will be handled in nd6_prefix_onlink, * so we don't have to care about them. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { int e; char ip6buf[INET6_ADDRSTRLEN]; @@ -1657,7 +1647,7 @@ nd6_prefix_onlink(struct nd_prefix *pr) * Although such a configuration is expected to be rare, we explicitly * allow it. */ - for (opr = V_nd_prefix.lh_first; opr; opr = opr->ndpr_next) { + LIST_FOREACH(opr, &V_nd_prefix, ndpr_entry) { if (opr == pr) continue; @@ -1769,7 +1759,7 @@ nd6_prefix_offlink(struct nd_prefix *pr) * If there's one, try to make the prefix on-link on the * interface. */ - for (opr = V_nd_prefix.lh_first; opr; opr = opr->ndpr_next) { + LIST_FOREACH(opr, &V_nd_prefix, ndpr_entry) { if (opr == pr) continue; From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 21:30:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1CEF2106564A; Fri, 16 Mar 2012 21:30:27 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 085DD8FC14; Fri, 16 Mar 2012 21:30:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GLUQcm035728; Fri, 16 Mar 2012 21:30:26 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GLUQaw035726; Fri, 16 Mar 2012 21:30:26 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201203162130.q2GLUQaw035726@svn.freebsd.org> From: Martin Matuska Date: Fri, 16 Mar 2012 21:30: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: r233048 - head/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 21:30:27 -0000 Author: mm Date: Fri Mar 16 21:30:26 2012 New Revision: 233048 URL: http://svn.freebsd.org/changeset/base/233048 Log: Unhide /dev/zfs in devfsrules_jail. The /dev/zfs device is required for managing jailed ZFS datasets. Discussed with: pjd, jamie MFC after: 1 week Modified: head/etc/defaults/devfs.rules Modified: head/etc/defaults/devfs.rules ============================================================================== --- head/etc/defaults/devfs.rules Fri Mar 16 21:28:29 2012 (r233047) +++ head/etc/defaults/devfs.rules Fri Mar 16 21:30:26 2012 (r233048) @@ -84,3 +84,4 @@ add path stderr unhide add include $devfsrules_hide_all add include $devfsrules_unhide_basic add include $devfsrules_unhide_login +add path zfs unhide From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 21:46:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16CEB106566C; Fri, 16 Mar 2012 21:46:03 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02F8F8FC19; Fri, 16 Mar 2012 21:46:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GLk2kI036253; Fri, 16 Mar 2012 21:46:02 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GLk2K7036251; Fri, 16 Mar 2012 21:46:02 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201203162146.q2GLk2K7036251@svn.freebsd.org> From: Robert Millan Date: Fri, 16 Mar 2012 21:46: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: r233049 - head/sys/modules/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 21:46:03 -0000 Author: rmh Date: Fri Mar 16 21:46:02 2012 New Revision: 233049 URL: http://svn.freebsd.org/changeset/base/233049 Log: Remove gratuitous DEBUG_FLAGS="-g" setting (this is already the default option with GENERIC kernels). Reviewed by: ken Modified: head/sys/modules/mps/Makefile Modified: head/sys/modules/mps/Makefile ============================================================================== --- head/sys/modules/mps/Makefile Fri Mar 16 21:30:26 2012 (r233048) +++ head/sys/modules/mps/Makefile Fri Mar 16 21:46:02 2012 (r233049) @@ -9,6 +9,5 @@ SRCS+= opt_cam.h opt_compat.h SRCS+= device_if.h bus_if.h pci_if.h #CFLAGS += -DMPS_DEBUG -DEBUG_FLAGS += -g .include From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 23:08:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8DC7106564A; Fri, 16 Mar 2012 23:08:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D87008FC19; Fri, 16 Mar 2012 23:08:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GN8DJi039025; Fri, 16 Mar 2012 23:08:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GN8DQu039023; Fri, 16 Mar 2012 23:08:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203162308.q2GN8DQu039023@svn.freebsd.org> From: Adrian Chadd Date: Fri, 16 Mar 2012 23:08:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233050 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 23:08:14 -0000 Author: adrian Date: Fri Mar 16 23:08:13 2012 New Revision: 233050 URL: http://svn.freebsd.org/changeset/base/233050 Log: Pull in a dependency on ALQ if it's compiled with IEEE80211_ALQ. Modified: head/sys/net80211/ieee80211_freebsd.c Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Fri Mar 16 21:46:02 2012 (r233049) +++ head/sys/net80211/ieee80211_freebsd.c Fri Mar 16 23:08:13 2012 (r233050) @@ -827,3 +827,7 @@ static moduledata_t wlan_mod = { DECLARE_MODULE(wlan, wlan_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(wlan, 1); MODULE_DEPEND(wlan, ether, 1, 1, 1); +#ifdef IEEE80211_ALQ +MODULE_DEPEND(wlan, alq, 1, 1, 1); +#endif /* IEEE80211_ALQ */ + From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 23:12:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F00541065670; Fri, 16 Mar 2012 23:12:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF85B8FC1C; Fri, 16 Mar 2012 23:12:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GNCeTt039203; Fri, 16 Mar 2012 23:12:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GNCea7039201; Fri, 16 Mar 2012 23:12:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203162312.q2GNCea7039201@svn.freebsd.org> From: Adrian Chadd Date: Fri, 16 Mar 2012 23:12: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: r233051 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 23:12:41 -0000 Author: adrian Date: Fri Mar 16 23:12:40 2012 New Revision: 233051 URL: http://svn.freebsd.org/changeset/base/233051 Log: Add a dependency on ALQ if IEEE80211_ALQ and/or AH_DEBUG_ALQ is included. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Mar 16 23:08:13 2012 (r233050) +++ head/sys/dev/ath/if_ath.c Fri Mar 16 23:12:40 2012 (r233051) @@ -42,6 +42,9 @@ __FBSDID("$FreeBSD$"); /* * This is needed for register operations which are performed * by the driver - eg, calls to ath_hal_gettsf32(). + * + * It's also required for any AH_DEBUG checks in here, eg the + * module dependencies. */ #include "opt_ah.h" #include "opt_wlan.h" @@ -6817,3 +6820,6 @@ ath_dfs_tasklet(void *p, int npending) MODULE_VERSION(if_ath, 1); MODULE_DEPEND(if_ath, wlan, 1, 1, 1); /* 802.11 media layer */ +#if defined(IEEE80211_ALQ) || defined(AH_DEBUG_ALQ) +MODULE_DEPEND(if_ath, alq, 1, 1, 1); +#endif From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 23:19:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 390EB106566C; Fri, 16 Mar 2012 23:19:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27F7E8FC14; Fri, 16 Mar 2012 23:19:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GNJkfw039484; Fri, 16 Mar 2012 23:19:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GNJjx5039482; Fri, 16 Mar 2012 23:19:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203162319.q2GNJjx5039482@svn.freebsd.org> From: Dimitry Andric Date: Fri, 16 Mar 2012 23:19: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: r233052 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 23:19:46 -0000 Author: dim Date: Fri Mar 16 23:19:45 2012 New Revision: 233052 URL: http://svn.freebsd.org/changeset/base/233052 Log: Change the style of share/mk/bsd.sys.mk to that of the other bsd.*.mk files, and style.Makefile(5), where applicable. While here, update the link to the gcc warning documentation. No functional change. MFC after: 1 week Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Fri Mar 16 23:12:40 2012 (r233051) +++ head/share/mk/bsd.sys.mk Fri Mar 16 23:19:45 2012 (r233052) @@ -6,112 +6,113 @@ # Enable various levels of compiler warning checks. These may be # overridden (e.g. if using a non-gcc compiler) by defining NO_WARNS. -# for GCC: http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_3.html#IDX143 +# for GCC: http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Warning-Options.html # the default is gnu99 for now -CSTD ?= gnu99 +CSTD?= gnu99 .if ${CSTD} == "k&r" -CFLAGS += -traditional +CFLAGS+= -traditional .elif ${CSTD} == "c89" || ${CSTD} == "c90" -CFLAGS += -std=iso9899:1990 +CFLAGS+= -std=iso9899:1990 .elif ${CSTD} == "c94" || ${CSTD} == "c95" -CFLAGS += -std=iso9899:199409 +CFLAGS+= -std=iso9899:199409 .elif ${CSTD} == "c99" -CFLAGS += -std=iso9899:1999 -.else -CFLAGS += -std=${CSTD} -.endif +CFLAGS+= -std=iso9899:1999 +.else # CSTD +CFLAGS+= -std=${CSTD} +.endif # CSTD .if !defined(NO_WARNS) # -pedantic is problematic because it also imposes namespace restrictions -#CFLAGS += -pedantic -. if defined(WARNS) -. if ${WARNS} >= 1 -CWARNFLAGS += -Wsystem-headers -. if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang)) -CWARNFLAGS += -Werror -. endif -. endif -. if ${WARNS} >= 2 -CWARNFLAGS += -Wall -Wno-format-y2k -. endif -. if ${WARNS} >= 3 -CWARNFLAGS += -W -Wno-unused-parameter -Wstrict-prototypes\ - -Wmissing-prototypes -Wpointer-arith -. endif -. if ${WARNS} >= 4 -CWARNFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch\ - -Wshadow -Wunused-parameter -. if !defined(NO_WCAST_ALIGN) && ((${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") || !defined(NO_WCAST_ALIGN.clang)) -CWARNFLAGS += -Wcast-align -. endif -. endif +#CFLAGS+= -pedantic +.if defined(WARNS) +.if ${WARNS} >= 1 +CWARNFLAGS+= -Wsystem-headers +.if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && \ + ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang)) +CWARNFLAGS+= -Werror +.endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang) +.endif # WARNS >= 1 +.if ${WARNS} >= 2 +CWARNFLAGS+= -Wall -Wno-format-y2k +.endif # WARNS >= 2 +.if ${WARNS} >= 3 +CWARNFLAGS+= -W -Wno-unused-parameter -Wstrict-prototypes\ + -Wmissing-prototypes -Wpointer-arith +.endif # WARNS >= 3 +.if ${WARNS} >= 4 +CWARNFLAGS+= -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow\ + -Wunused-parameter +.if !defined(NO_WCAST_ALIGN) && ((${MK_CLANG_IS_CC} == "no" && \ + ${CC:T:Mclang} != "clang") || !defined(NO_WCAST_ALIGN.clang)) +CWARNFLAGS+= -Wcast-align +.endif # !NO_WCAST_ALIGN && (!CLANG || !NO_WCAST_ALIGN.clang) +.endif # WARNS >= 4 # BDECFLAGS -. if ${WARNS} >= 6 -CWARNFLAGS += -Wchar-subscripts -Winline -Wnested-externs\ - -Wredundant-decls -Wold-style-definition -. endif -. if ${WARNS} >= 2 && ${WARNS} <= 4 +.if ${WARNS} >= 6 +CWARNFLAGS+= -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls\ + -Wold-style-definition +.endif # WARNS >= 6 +.if ${WARNS} >= 2 && ${WARNS} <= 4 # XXX Delete -Wuninitialized by default for now -- the compiler doesn't # XXX always get it right. -CWARNFLAGS += -Wno-uninitialized -. endif -CWARNFLAGS += -Wno-pointer-sign +CWARNFLAGS+= -Wno-uninitialized +.endif # WARNS >=2 && WARNS <= 4 +CWARNFLAGS+= -Wno-pointer-sign # Clang has more warnings enabled by default, and when using -Wall, so if WARNS # is set to low values, these have to be disabled explicitly. -. if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" -. if ${WARNS} <= 3 -CWARNFLAGS += -Wno-tautological-compare -Wno-unused-value\ - -Wno-parentheses-equality -Wno-unused-function\ - -Wno-conversion -. endif -. if ${WARNS} <= 2 -CWARNFLAGS += -Wno-switch-enum -Wno-empty-body -. endif -. if ${WARNS} <= 1 -CWARNFLAGS += -Wno-parentheses -. endif -. if defined(NO_WARRAY_BOUNDS) -CWARNFLAGS += -Wno-array-bounds -. endif -. endif -. endif - -. if defined(FORMAT_AUDIT) -WFORMAT = 1 -. endif -. if defined(WFORMAT) -. if ${WFORMAT} > 0 -#CWARNFLAGS += -Wformat-nonliteral -Wformat-security -Wno-format-extra-args -CWARNFLAGS += -Wformat=2 -Wno-format-extra-args -. if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang)) -CWARNFLAGS += -Werror -. endif -. endif -. endif -. if defined(NO_WFORMAT) || ((${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && defined(NO_WFORMAT.clang)) -CWARNFLAGS += -Wno-format -. endif -.endif +.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" +.if ${WARNS} <= 3 +CWARNFLAGS+= -Wno-tautological-compare -Wno-unused-value\ + -Wno-parentheses-equality -Wno-unused-function -Wno-conversion +.endif # WARNS <= 3 +.if ${WARNS} <= 2 +CWARNFLAGS+= -Wno-switch-enum -Wno-empty-body +.endif # WARNS <= 2 +.if ${WARNS} <= 1 +CWARNFLAGS+= -Wno-parentheses +.endif # WARNS <= 1 +.if defined(NO_WARRAY_BOUNDS) +CWARNFLAGS+= -Wno-array-bounds +.endif # NO_WARRAY_BOUNDS +.endif # CLANG +.endif # WARNS + +.if defined(FORMAT_AUDIT) +WFORMAT= 1 +.endif # FORMAT_AUDIT +.if defined(WFORMAT) +.if ${WFORMAT} > 0 +#CWARNFLAGS+= -Wformat-nonliteral -Wformat-security -Wno-format-extra-args +CWARNFLAGS+= -Wformat=2 -Wno-format-extra-args +.if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && \ + ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang)) +CWARNFLAGS+= -Werror +.endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang) +.endif # WFORMAT > 0 +.endif # WFORMAT +.if defined(NO_WFORMAT) || ((${MK_CLANG_IS_CC} != "no" || \ + ${CC:T:Mclang} == "clang") && defined(NO_WFORMAT.clang)) +CWARNFLAGS+= -Wno-format +.endif # NO_WFORMAT || (CLANG && NO_WFORMAT.clang) +.endif # !NO_WARNS .if defined(IGNORE_PRAGMA) -CWARNFLAGS += -Wno-unknown-pragmas -.endif +CWARNFLAGS+= -Wno-unknown-pragmas +.endif # IGNORE_PRAGMA .if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" -CLANG_NO_IAS = -no-integrated-as -CLANG_OPT_SMALL = -mllvm -stack-alignment=8 \ - -mllvm -inline-threshold=3 \ - -mllvm -enable-load-pre=false \ - -mllvm -simplifycfg-dup-ret -.endif +CLANG_NO_IAS= -no-integrated-as +CLANG_OPT_SMALL= -mllvm -stack-alignment=8 -mllvm -inline-threshold=3\ + -mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret +.endif # CLANG .if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" # Don't use -Wstack-protector as it breaks world with -Werror. -SSP_CFLAGS ?= -fstack-protector -CFLAGS += ${SSP_CFLAGS} -.endif +SSP_CFLAGS?= -fstack-protector +CFLAGS+= ${SSP_CFLAGS} +.endif # SSP && !IA64 && !ARM && !MIPS # Allow user-specified additional warning flags -CFLAGS += ${CWARNFLAGS} +CFLAGS+= ${CWARNFLAGS} From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 23:24:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F1E0106566C; Fri, 16 Mar 2012 23:24:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EBAA8FC15; Fri, 16 Mar 2012 23:24:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GNORS9039676; Fri, 16 Mar 2012 23:24:27 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GNORJx039674; Fri, 16 Mar 2012 23:24:27 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203162324.q2GNORJx039674@svn.freebsd.org> From: Adrian Chadd Date: Fri, 16 Mar 2012 23:24: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: r233053 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 23:24:27 -0000 Author: adrian Date: Fri Mar 16 23:24:27 2012 New Revision: 233053 URL: http://svn.freebsd.org/changeset/base/233053 Log: Fix a couple of debugging outputs. * printf -> device_printf * print the buffer pointer and sequence number for any buffer that wasn't correctly tidied up before it was freed. This is to aid in some current SMP TX debugging stalls. PR: kern/166190 Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Mar 16 23:19:45 2012 (r233052) +++ head/sys/dev/ath/if_ath.c Fri Mar 16 23:24:27 2012 (r233053) @@ -4795,10 +4795,16 @@ ath_tx_default_comp(struct ath_softc *sc if (bf->bf_state.bfs_dobaw) device_printf(sc->sc_dev, - "%s: dobaw should've been cleared!\n", __func__); + "%s: bf %p: seqno %d: dobaw should've been cleared!\n", + __func__, + bf, + SEQNO(bf->bf_state.bfs_seqno)); if (bf->bf_next != NULL) device_printf(sc->sc_dev, - "%s: bf_next not NULL!\n", __func__); + "%s: bf %p: seqno %d: bf_next not NULL!\n", + __func__, + bf, + SEQNO(bf->bf_state.bfs_seqno)); /* * Do any tx complete callback. Note this must @@ -5352,8 +5358,11 @@ ath_stoprecv(struct ath_softc *sc, int d struct ath_buf *bf; u_int ix; - printf("%s: rx queue %p, link %p\n", __func__, - (caddr_t)(uintptr_t) ath_hal_getrxbuf(ah), sc->sc_rxlink); + device_printf(sc->sc_dev, + "%s: rx queue %p, link %p\n", + __func__, + (caddr_t)(uintptr_t) ath_hal_getrxbuf(ah), + sc->sc_rxlink); ix = 0; TAILQ_FOREACH(bf, &sc->sc_rxbuf, bf_list) { struct ath_desc *ds = bf->bf_desc; From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 23:54:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31D631065676; Fri, 16 Mar 2012 23:54:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 174B68FC14; Fri, 16 Mar 2012 23:54:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GNsNjE040577; Fri, 16 Mar 2012 23:54:23 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GNsN9o040575; Fri, 16 Mar 2012 23:54:23 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201203162354.q2GNsN9o040575@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 16 Mar 2012 23:54:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233054 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 23:54:24 -0000 Author: jkim Date: Fri Mar 16 23:54:23 2012 New Revision: 233054 URL: http://svn.freebsd.org/changeset/base/233054 Log: Remove unnecessary static variable initializations and duplicate codes. Consistently use bcopy(9) over memcpy(9). Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Fri Mar 16 23:24:27 2012 (r233053) +++ head/sys/dev/fb/vesa.c Fri Mar 16 23:54:23 2012 (r233054) @@ -81,23 +81,23 @@ typedef struct adp_state adp_state_t; static struct mtx vesa_lock; static int vesa_state; -static void *vesa_state_buf = NULL; -static uint32_t vesa_state_buf_offs = 0; -static ssize_t vesa_state_buf_size = 0; - -static u_char *vesa_palette = NULL; -static uint32_t vesa_palette_offs = 0; - -static void *vesa_bios = NULL; -static uint32_t vesa_bios_offs = VESA_BIOS_OFFSET; -static uint32_t vesa_bios_int10 = 0; -static size_t vesa_bios_size = 0; +static void *vesa_state_buf; +static uint32_t vesa_state_buf_offs; +static ssize_t vesa_state_buf_size; + +static u_char *vesa_palette; +static uint32_t vesa_palette_offs; + +static void *vesa_bios; +static uint32_t vesa_bios_offs; +static uint32_t vesa_bios_int10; +static size_t vesa_bios_size; /* VESA video adapter */ -static video_adapter_t *vesa_adp = NULL; +static video_adapter_t *vesa_adp; static SYSCTL_NODE(_debug, OID_AUTO, vesa, CTLFLAG_RD, NULL, "VESA debugging"); -static int vesa_shadow_rom = 0; +static int vesa_shadow_rom; TUNABLE_INT("debug.vesa.shadow_rom", &vesa_shadow_rom); SYSCTL_INT(_debug_vesa, OID_AUTO, shadow_rom, CTLFLAG_RDTUN, &vesa_shadow_rom, 0, "Enable video BIOS shadow"); @@ -171,18 +171,16 @@ static video_switch_t *prevvidsw; #define MODE_TABLE_DELTA 8 -static int vesa_vmode_max = 0; -static video_info_t vesa_vmode_empty = { EOT }; -static video_info_t *vesa_vmode = &vesa_vmode_empty; - -static int vesa_init_done = FALSE; -static int has_vesa_bios = FALSE; -static struct vesa_info *vesa_adp_info = NULL; -static u_int16_t *vesa_vmodetab = NULL; -static char *vesa_oemstr = NULL; -static char *vesa_venderstr = NULL; -static char *vesa_prodstr = NULL; -static char *vesa_revstr = NULL; +static int vesa_vmode_max; +static video_info_t *vesa_vmode; + +static int vesa_init_done; +static struct vesa_info *vesa_adp_info; +static u_int16_t *vesa_vmodetab; +static char *vesa_oemstr; +static char *vesa_venderstr; +static char *vesa_prodstr; +static char *vesa_revstr; /* local macros and functions */ #define BIOS_SADDRTOLADDR(p) ((((p) & 0xffff0000) >> 12) + ((p) & 0x0000ffff)) @@ -221,6 +219,7 @@ static int vesa_translate_flags(u_int16_ static int vesa_translate_mmodel(u_int8_t vmodel); static int vesa_get_bpscanline(struct vesa_mode *vmode); static int vesa_bios_init(void); +static void vesa_bios_uninit(void); static void vesa_clear_modes(video_info_t *info, int color); #if 0 @@ -773,11 +772,7 @@ vesa_bios_init(void) if (vesa_init_done) return (0); - has_vesa_bios = FALSE; - vesa_adp_info = NULL; vesa_bios_offs = VESA_BIOS_OFFSET; - vesa_vmode_max = 0; - vesa_vmode[0].vi_mode = EOT; /* * If the VBE real mode interrupt vector is not found, try BIOS POST. @@ -804,7 +799,7 @@ vesa_bios_init(void) vesa_bios_size > (vesa_bios_int10 & 0xffff)) { vesa_bios = x86bios_alloc(&vesa_bios_offs, vesa_bios_size, M_WAITOK); - memcpy(vesa_bios, vbios, vesa_bios_size); + bcopy(vbios, vesa_bios, vesa_bios_size); offs = ((vesa_bios_offs << 12) & 0xffff0000) + (vesa_bios_int10 & 0xffff); x86bios_set_intr(0x10, offs); @@ -1030,8 +1025,7 @@ vesa_bios_init(void) if (bootverbose) printf("VESA: %d mode(s) found\n", modes); - has_vesa_bios = (modes > 0); - if (!has_vesa_bios) + if (modes == 0) goto fail; x86bios_free(vmbuf, sizeof(*buf)); @@ -1052,14 +1046,21 @@ vesa_bios_init(void) return (0); fail: + x86bios_free(vmbuf, sizeof(buf)); + vesa_bios_uninit(); + return (1); +} + +static void +vesa_bios_uninit(void) +{ + if (vesa_bios != NULL) { x86bios_set_intr(0x10, vesa_bios_int10); vesa_bios_offs = VESA_BIOS_OFFSET; x86bios_free(vesa_bios, vesa_bios_size); vesa_bios = NULL; } - if (vmbuf != NULL) - x86bios_free(vmbuf, sizeof(buf)); if (vesa_adp_info != NULL) { free(vesa_adp_info, M_DEVBUF); vesa_adp_info = NULL; @@ -1080,7 +1081,15 @@ fail: free(vesa_revstr, M_DEVBUF); vesa_revstr = NULL; } - return (1); + if (vesa_vmode != NULL) { + free(vesa_vmode, M_DEVBUF); + vesa_vmode = NULL; + } + if (vesa_palette != NULL) { + x86bios_free(vesa_palette, + VESA_PALETTE_SIZE + vesa_state_buf_size); + vesa_palette = NULL; + } } static void @@ -1911,26 +1920,7 @@ vesa_unload(void) } } - if (vesa_bios != NULL) { - x86bios_set_intr(0x10, vesa_bios_int10); - x86bios_free(vesa_bios, vesa_bios_size); - } - if (vesa_adp_info != NULL) - free(vesa_adp_info, M_DEVBUF); - if (vesa_oemstr != NULL) - free(vesa_oemstr, M_DEVBUF); - if (vesa_venderstr != NULL) - free(vesa_venderstr, M_DEVBUF); - if (vesa_prodstr != NULL) - free(vesa_prodstr, M_DEVBUF); - if (vesa_revstr != NULL) - free(vesa_revstr, M_DEVBUF); - if (vesa_vmode != &vesa_vmode_empty) - free(vesa_vmode, M_DEVBUF); - if (vesa_palette != NULL) - x86bios_free(vesa_palette, - VESA_PALETTE_SIZE + vesa_state_buf_size); - + vesa_bios_uninit(); mtx_destroy(&vesa_lock); return (error); From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 23:58:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD26C106566B; Fri, 16 Mar 2012 23:58:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBF648FC08; Fri, 16 Mar 2012 23:58:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GNwZCO040746; Fri, 16 Mar 2012 23:58:35 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GNwZ9e040743; Fri, 16 Mar 2012 23:58:35 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201203162358.q2GNwZ9e040743@svn.freebsd.org> From: Sean Bruno Date: Fri, 16 Mar 2012 23:58: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: r233055 - stable/8/contrib/gcc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 23:58:35 -0000 Author: sbruno Date: Fri Mar 16 23:58:35 2012 New Revision: 233055 URL: http://svn.freebsd.org/changeset/base/233055 Log: MFC r226702 Author: obrien Date: Mon Oct 24 20:52:41 2011 UTC (4 months, 3 weeks ago) Changed paths: 3 Log Message: * Don't give the impression that this compiler is GPLv3. (It is "well known" that GCC 4.2.2 is GPLv3.) * Don't give the impression that this compiler isn't "trustable". * Fix dependency nit. Modified: stable/8/contrib/gcc/BASE-VER stable/8/contrib/gcc/DEV-PHASE Directory Properties: stable/8/contrib/gcc/ (props changed) stable/8/sys/ (props changed) Modified: stable/8/contrib/gcc/BASE-VER ============================================================================== --- stable/8/contrib/gcc/BASE-VER Fri Mar 16 23:54:23 2012 (r233054) +++ stable/8/contrib/gcc/BASE-VER Fri Mar 16 23:58:35 2012 (r233055) @@ -1 +1 @@ -4.2.2 +4.2.1 Modified: stable/8/contrib/gcc/DEV-PHASE ============================================================================== --- stable/8/contrib/gcc/DEV-PHASE Fri Mar 16 23:54:23 2012 (r233054) +++ stable/8/contrib/gcc/DEV-PHASE Fri Mar 16 23:58:35 2012 (r233055) @@ -1 +1 @@ -prerelease +patched From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 00:00:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 713CF106566B; Sat, 17 Mar 2012 00:00:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 476C18FC15; Sat, 17 Mar 2012 00:00:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H00YeM040865; Sat, 17 Mar 2012 00:00:34 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H00Ych040863; Sat, 17 Mar 2012 00:00:34 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201203170000.q2H00Ych040863@svn.freebsd.org> From: Jung-uk Kim Date: Sat, 17 Mar 2012 00:00: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: r233056 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 00:00:34 -0000 Author: jkim Date: Sat Mar 17 00:00:33 2012 New Revision: 233056 URL: http://svn.freebsd.org/changeset/base/233056 Log: Save and restore linear frame buffer between suspend and resume. MFC after: 1 week Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Fri Mar 16 23:58:35 2012 (r233055) +++ head/sys/dev/fb/vesa.c Sat Mar 17 00:00:33 2012 (r233056) @@ -88,6 +88,8 @@ static ssize_t vesa_state_buf_size; static u_char *vesa_palette; static uint32_t vesa_palette_offs; +static void *vesa_vmem_buf; + static void *vesa_bios; static uint32_t vesa_bios_offs; static uint32_t vesa_bios_int10; @@ -1459,6 +1461,8 @@ vesa_set_border(video_adapter_t *adp, in static int vesa_save_state(video_adapter_t *adp, void *p, size_t size) { + vm_offset_t buf; + size_t bsize; if (adp != vesa_adp || vesa_state_buf_size == 0) return ((*prevvidsw->save_state)(adp, p, size)); @@ -1468,6 +1472,13 @@ vesa_save_state(video_adapter_t *adp, vo if (size < (offsetof(adp_state_t, regs) + vesa_state_buf_size)) return (EINVAL); + buf = adp->va_buffer; + if (buf != 0) { + bsize = adp->va_buffer_size; + vesa_vmem_buf = malloc(bsize, M_DEVBUF, M_NOWAIT); + if (vesa_vmem_buf != NULL) + bcopy((void *)buf, vesa_vmem_buf, bsize); + } ((adp_state_t *)p)->sig = V_STATE_SIG; bzero(((adp_state_t *)p)->regs, vesa_state_buf_size); return (vesa_bios_save_restore(STATE_SAVE, ((adp_state_t *)p)->regs)); @@ -1476,6 +1487,8 @@ vesa_save_state(video_adapter_t *adp, vo static int vesa_load_state(video_adapter_t *adp, void *p) { + vm_offset_t buf; + size_t bsize; int mode; if (adp != vesa_adp) @@ -1483,6 +1496,8 @@ vesa_load_state(video_adapter_t *adp, vo /* Try BIOS POST to restore a sane state. */ (void)vesa_bios_post(); + buf = adp->va_buffer; + bsize = adp->va_buffer_size; mode = adp->va_mode; (void)vesa_set_mode(adp, adp->va_initial_mode); if (mode != adp->va_initial_mode) @@ -1490,6 +1505,10 @@ vesa_load_state(video_adapter_t *adp, vo if (((adp_state_t *)p)->sig != V_STATE_SIG) return ((*prevvidsw->load_state)(adp, p)); + if (buf != 0 && vesa_vmem_buf != NULL) { + bcopy(vesa_vmem_buf, (void *)buf, bsize); + free(vesa_vmem_buf, M_DEVBUF); + } return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs)); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 00:10:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBBB01065670; Sat, 17 Mar 2012 00:10:21 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA8B08FC08; Sat, 17 Mar 2012 00:10:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H0ALIo041193; Sat, 17 Mar 2012 00:10:21 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H0ALbi041190; Sat, 17 Mar 2012 00:10:21 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201203170010.q2H0ALbi041190@svn.freebsd.org> From: Sean Bruno Date: Sat, 17 Mar 2012 00:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233057 - stable/7/contrib/gcc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 00:10:21 -0000 Author: sbruno Date: Sat Mar 17 00:10:21 2012 New Revision: 233057 URL: http://svn.freebsd.org/changeset/base/233057 Log: MFC r226702 Author: obrien Date: Mon Oct 24 20:52:41 2011 UTC (4 months, 3 weeks ago) Changed paths: 3 Log Message: * Don't give the impression that this compiler is GPLv3. (It is "well known" that GCC 4.2.2 is GPLv3.) * Don't give the impression that this compiler isn't "trustable". * Fix dependency nit. Modified: stable/7/contrib/gcc/BASE-VER stable/7/contrib/gcc/DEV-PHASE Directory Properties: stable/7/contrib/gcc/ (props changed) Modified: stable/7/contrib/gcc/BASE-VER ============================================================================== --- stable/7/contrib/gcc/BASE-VER Sat Mar 17 00:00:33 2012 (r233056) +++ stable/7/contrib/gcc/BASE-VER Sat Mar 17 00:10:21 2012 (r233057) @@ -1 +1 @@ -4.2.2 +4.2.1 Modified: stable/7/contrib/gcc/DEV-PHASE ============================================================================== --- stable/7/contrib/gcc/DEV-PHASE Sat Mar 17 00:00:33 2012 (r233056) +++ stable/7/contrib/gcc/DEV-PHASE Sat Mar 17 00:10:21 2012 (r233057) @@ -1 +1 @@ -prerelease +patched From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 01:04:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F563106566C; Sat, 17 Mar 2012 01:04:08 +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 0E4E98FC15; Sat, 17 Mar 2012 01:04:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H147pL042942; Sat, 17 Mar 2012 01:04:07 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H147pa042940; Sat, 17 Mar 2012 01:04:07 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201203170104.q2H147pa042940@svn.freebsd.org> From: Xin LI Date: Sat, 17 Mar 2012 01:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233059 - stable/9/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 01:04:08 -0000 Author: delphij Date: Sat Mar 17 01:04:07 2012 New Revision: 233059 URL: http://svn.freebsd.org/changeset/base/233059 Log: MFC r232990: Add the missing IPOIB option. Sponsored by: iXsystems, Inc. Modified: stable/9/sys/conf/options Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/options ============================================================================== --- stable/9/sys/conf/options Sat Mar 17 00:39:40 2012 (r233058) +++ stable/9/sys/conf/options Sat Mar 17 01:04:07 2012 (r233059) @@ -883,6 +883,7 @@ OFED opt_ofed.h OFED_DEBUG_INIT opt_ofed.h SDP opt_ofed.h SDP_DEBUG opt_ofed.h +IPOIB opt_ofed.h IPOIB_DEBUG opt_ofed.h IPOIB_CM opt_ofed.h From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 01:19:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C4A0106566B; Sat, 17 Mar 2012 01:19:37 +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 1B4A88FC08; Sat, 17 Mar 2012 01:19:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H1JaCU043436; Sat, 17 Mar 2012 01:19:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H1JaPb043434; Sat, 17 Mar 2012 01:19:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203170119.q2H1JaPb043434@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Mar 2012 01:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233060 - stable/9/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: Sat, 17 Mar 2012 01:19:37 -0000 Author: kib Date: Sat Mar 17 01:19:36 2012 New Revision: 233060 URL: http://svn.freebsd.org/changeset/base/233060 Log: MFC r232776: Add brackets around bare '-1' used as the macro body. Modified: stable/9/sys/sys/unistd.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sys/unistd.h ============================================================================== --- stable/9/sys/sys/unistd.h Sat Mar 17 01:04:07 2012 (r233059) +++ stable/9/sys/sys/unistd.h Sat Mar 17 01:19:36 2012 (r233060) @@ -52,34 +52,34 @@ #define _POSIX_ADVISORY_INFO 200112L #define _POSIX_ASYNCHRONOUS_IO 0 #define _POSIX_CHOWN_RESTRICTED 1 -#define _POSIX_CLOCK_SELECTION -1 -#define _POSIX_CPUTIME -1 +#define _POSIX_CLOCK_SELECTION (-1) +#define _POSIX_CPUTIME (-1) #define _POSIX_FSYNC 200112L #define _POSIX_IPV6 0 #define _POSIX_JOB_CONTROL 1 #define _POSIX_MAPPED_FILES 200112L -#define _POSIX_MEMLOCK -1 +#define _POSIX_MEMLOCK (-1) #define _POSIX_MEMLOCK_RANGE 200112L #define _POSIX_MEMORY_PROTECTION 200112L #define _POSIX_MESSAGE_PASSING 200112L #define _POSIX_MONOTONIC_CLOCK 200112L #define _POSIX_NO_TRUNC 1 -#define _POSIX_PRIORITIZED_IO -1 +#define _POSIX_PRIORITIZED_IO (-1) #define _POSIX_PRIORITY_SCHEDULING 200112L #define _POSIX_RAW_SOCKETS 200112L #define _POSIX_REALTIME_SIGNALS 200112L #define _POSIX_SEMAPHORES 200112L #define _POSIX_SHARED_MEMORY_OBJECTS 200112L -#define _POSIX_SPORADIC_SERVER -1 -#define _POSIX_SYNCHRONIZED_IO -1 +#define _POSIX_SPORADIC_SERVER (-1) +#define _POSIX_SYNCHRONIZED_IO (-1) #define _POSIX_TIMEOUTS 200112L #define _POSIX_TIMERS 200112L -#define _POSIX_TYPED_MEMORY_OBJECTS -1 +#define _POSIX_TYPED_MEMORY_OBJECTS (-1) #define _POSIX_VDISABLE 0xff #if __XSI_VISIBLE #define _XOPEN_SHM 1 -#define _XOPEN_STREAMS -1 +#define _XOPEN_STREAMS (-1) #endif /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 01:23:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7F958106566C; Sat, 17 Mar 2012 01:23: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 6E66D8FC0A; Sat, 17 Mar 2012 01:23:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H1NoFQ043621; Sat, 17 Mar 2012 01:23:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H1NorC043619; Sat, 17 Mar 2012 01:23:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203170123.q2H1NorC043619@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Mar 2012 01:23:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233061 - stable/9/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 01:23:50 -0000 Author: kib Date: Sat Mar 17 01:23:49 2012 New Revision: 233061 URL: http://svn.freebsd.org/changeset/base/233061 Log: MFC r232967: Add PCI Id for the AMT SOL UART on G4x series Intel chipsets. Modified: stable/9/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/9/sys/dev/uart/uart_bus_pci.c Sat Mar 17 01:19:36 2012 (r233060) +++ stable/9/sys/dev/uart/uart_bus_pci.c Sat Mar 17 01:23:49 2012 (r233061) @@ -113,6 +113,7 @@ static struct pci_id pci_ns8250_ids[] = { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, +{ 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x8811, 0xffff, 0, "Intel EG20T Serial Port 0", 0x10 }, From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 01:27:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCB19106566B; Sat, 17 Mar 2012 01:27:09 +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 BBB4C8FC16; Sat, 17 Mar 2012 01:27:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H1R9U9043770; Sat, 17 Mar 2012 01:27:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H1R9IC043768; Sat, 17 Mar 2012 01:27:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203170127.q2H1R9IC043768@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Mar 2012 01:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233062 - stable/9/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 01:27:09 -0000 Author: kib Date: Sat Mar 17 01:27:09 2012 New Revision: 233062 URL: http://svn.freebsd.org/changeset/base/233062 Log: MFC r232973: Fix indentation. Modified: stable/9/lib/libc/string/strerror.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/string/strerror.c ============================================================================== --- stable/9/lib/libc/string/strerror.c Sat Mar 17 01:23:49 2012 (r233061) +++ stable/9/lib/libc/string/strerror.c Sat Mar 17 01:27:09 2012 (r233062) @@ -121,6 +121,6 @@ strerror(int num) static char ebuf[NL_TEXTMAX]; if (strerror_r(num, ebuf, sizeof(ebuf)) != 0) - errno = EINVAL; + errno = EINVAL; return (ebuf); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 01:37:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA0F1065670; Sat, 17 Mar 2012 01:37:41 +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 74D848FC12; Sat, 17 Mar 2012 01:37:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H1bfUW044122; Sat, 17 Mar 2012 01:37:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H1bfoM044120; Sat, 17 Mar 2012 01:37:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203170137.q2H1bfoM044120@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Mar 2012 01:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233063 - stable/9/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: Sat, 17 Mar 2012 01:37:41 -0000 Author: kib Date: Sat Mar 17 01:37:40 2012 New Revision: 233063 URL: http://svn.freebsd.org/changeset/base/233063 Log: MFC r232777: Optimize tls_get_addr_common(). Modified: stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Sat Mar 17 01:27:09 2012 (r233062) +++ stable/9/libexec/rtld-elf/rtld.c Sat Mar 17 01:37:40 2012 (r233063) @@ -3507,17 +3507,17 @@ unref_dag(Obj_Entry *root) /* * Common code for MD __tls_get_addr(). */ -void * -tls_get_addr_common(Elf_Addr** dtvp, int index, size_t offset) +static void *tls_get_addr_slow(Elf_Addr **, int, size_t) __noinline; +static void * +tls_get_addr_slow(Elf_Addr **dtvp, int index, size_t offset) { - Elf_Addr* dtv = *dtvp; + Elf_Addr *newdtv, *dtv; RtldLockState lockstate; + int to_copy; + dtv = *dtvp; /* Check dtv generation in case new modules have arrived */ if (dtv[0] != tls_dtv_generation) { - Elf_Addr* newdtv; - int to_copy; - wlock_acquire(rtld_bind_lock, &lockstate); newdtv = calloc(1, (tls_max_index + 2) * sizeof(Elf_Addr)); to_copy = dtv[1]; @@ -3532,14 +3532,27 @@ tls_get_addr_common(Elf_Addr** dtvp, int } /* Dynamically allocate module TLS if necessary */ - if (!dtv[index + 1]) { + if (dtv[index + 1] == 0) { /* Signal safe, wlock will block out signals. */ - wlock_acquire(rtld_bind_lock, &lockstate); + wlock_acquire(rtld_bind_lock, &lockstate); if (!dtv[index + 1]) dtv[index + 1] = (Elf_Addr)allocate_module_tls(index); lock_release(rtld_bind_lock, &lockstate); } - return (void*) (dtv[index + 1] + offset); + return ((void *)(dtv[index + 1] + offset)); +} + +void * +tls_get_addr_common(Elf_Addr **dtvp, int index, size_t offset) +{ + Elf_Addr *dtv; + + dtv = *dtvp; + /* Check dtv generation in case new modules have arrived */ + if (__predict_true(dtv[0] == tls_dtv_generation && + dtv[index + 1] != 0)) + return ((void *)(dtv[index + 1] + offset)); + return (tls_get_addr_slow(dtvp, index, offset)); } /* XXX not sure what variants to use for arm. */ From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 01:47:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 709F5106564A; Sat, 17 Mar 2012 01:47:32 +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 5FA3D8FC12; Sat, 17 Mar 2012 01:47:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H1lWd6044463; Sat, 17 Mar 2012 01:47:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H1lWnU044461; Sat, 17 Mar 2012 01:47:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203170147.q2H1lWnU044461@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Mar 2012 01:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233064 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 01:47:32 -0000 Author: kib Date: Sat Mar 17 01:47:31 2012 New Revision: 233064 URL: http://svn.freebsd.org/changeset/base/233064 Log: MFC r232776: Add brackets around bare '-1' used as the macro body. Modified: stable/8/sys/sys/unistd.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/sys/unistd.h ============================================================================== --- stable/8/sys/sys/unistd.h Sat Mar 17 01:37:40 2012 (r233063) +++ stable/8/sys/sys/unistd.h Sat Mar 17 01:47:31 2012 (r233064) @@ -52,34 +52,34 @@ #define _POSIX_ADVISORY_INFO 200112L #define _POSIX_ASYNCHRONOUS_IO 0 #define _POSIX_CHOWN_RESTRICTED 1 -#define _POSIX_CLOCK_SELECTION -1 -#define _POSIX_CPUTIME -1 +#define _POSIX_CLOCK_SELECTION (-1) +#define _POSIX_CPUTIME (-1) #define _POSIX_FSYNC 200112L #define _POSIX_IPV6 0 #define _POSIX_JOB_CONTROL 1 #define _POSIX_MAPPED_FILES 200112L -#define _POSIX_MEMLOCK -1 +#define _POSIX_MEMLOCK (-1) #define _POSIX_MEMLOCK_RANGE 200112L #define _POSIX_MEMORY_PROTECTION 200112L #define _POSIX_MESSAGE_PASSING 200112L #define _POSIX_MONOTONIC_CLOCK 200112L #define _POSIX_NO_TRUNC 1 -#define _POSIX_PRIORITIZED_IO -1 +#define _POSIX_PRIORITIZED_IO (-1) #define _POSIX_PRIORITY_SCHEDULING 200112L #define _POSIX_RAW_SOCKETS 200112L #define _POSIX_REALTIME_SIGNALS 200112L #define _POSIX_SEMAPHORES -1 #define _POSIX_SHARED_MEMORY_OBJECTS 200112L -#define _POSIX_SPORADIC_SERVER -1 -#define _POSIX_SYNCHRONIZED_IO -1 +#define _POSIX_SPORADIC_SERVER (-1) +#define _POSIX_SYNCHRONIZED_IO (-1) #define _POSIX_TIMEOUTS 200112L #define _POSIX_TIMERS 200112L -#define _POSIX_TYPED_MEMORY_OBJECTS -1 +#define _POSIX_TYPED_MEMORY_OBJECTS (-1) #define _POSIX_VDISABLE 0xff #if __XSI_VISIBLE #define _XOPEN_SHM 1 -#define _XOPEN_STREAMS -1 +#define _XOPEN_STREAMS (-1) #endif /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 01:51:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 388F1106566B; Sat, 17 Mar 2012 01:51:31 +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 274168FC16; Sat, 17 Mar 2012 01:51:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H1pVNh044627; Sat, 17 Mar 2012 01:51:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H1pUl7044625; Sat, 17 Mar 2012 01:51:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203170151.q2H1pUl7044625@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Mar 2012 01:51: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: r233065 - stable/8/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 01:51:31 -0000 Author: kib Date: Sat Mar 17 01:51:30 2012 New Revision: 233065 URL: http://svn.freebsd.org/changeset/base/233065 Log: MFC r232967: Add PCI Id for the AMT SOL UART on G4x series Intel chipsets. Modified: stable/8/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/8/sys/dev/uart/uart_bus_pci.c Sat Mar 17 01:47:31 2012 (r233064) +++ stable/8/sys/dev/uart/uart_bus_pci.c Sat Mar 17 01:51:30 2012 (r233065) @@ -113,6 +113,7 @@ static struct pci_id pci_ns8250_ids[] = { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, +{ 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, { 0x9710, 0x9820, 0x1000, 1, "NetMos NM9820 Serial Port", 0x10 }, From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 01:59:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95D69106564A; Sat, 17 Mar 2012 01:59:15 +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 84C3F8FC1F; Sat, 17 Mar 2012 01:59:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H1xFKD044900; Sat, 17 Mar 2012 01:59:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H1xFuQ044898; Sat, 17 Mar 2012 01:59:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203170159.q2H1xFuQ044898@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Mar 2012 01:59: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: r233066 - stable/8/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 01:59:15 -0000 Author: kib Date: Sat Mar 17 01:59:15 2012 New Revision: 233066 URL: http://svn.freebsd.org/changeset/base/233066 Log: MFC r232973: Fix indentation. Modified: stable/8/lib/libc/string/strerror.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/string/strerror.c ============================================================================== --- stable/8/lib/libc/string/strerror.c Sat Mar 17 01:51:30 2012 (r233065) +++ stable/8/lib/libc/string/strerror.c Sat Mar 17 01:59:15 2012 (r233066) @@ -121,6 +121,6 @@ strerror(int num) static char ebuf[NL_TEXTMAX]; if (strerror_r(num, ebuf, sizeof(ebuf)) != 0) - errno = EINVAL; + errno = EINVAL; return (ebuf); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 02:05:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31B4E1065673; Sat, 17 Mar 2012 02:05:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 073608FC08; Sat, 17 Mar 2012 02:05:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H25XB7045167; Sat, 17 Mar 2012 02:05:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H25XQo045165; Sat, 17 Mar 2012 02:05:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203170205.q2H25XQo045165@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Mar 2012 02:05: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: r233067 - stable/8/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: Sat, 17 Mar 2012 02:05:34 -0000 Author: kib Date: Sat Mar 17 02:05:33 2012 New Revision: 233067 URL: http://svn.freebsd.org/changeset/base/233067 Log: MFC r232777: Optimize tls_get_addr_common(). Modified: stable/8/libexec/rtld-elf/rtld.c Directory Properties: stable/8/libexec/rtld-elf/ (props changed) Modified: stable/8/libexec/rtld-elf/rtld.c ============================================================================== --- stable/8/libexec/rtld-elf/rtld.c Sat Mar 17 01:59:15 2012 (r233066) +++ stable/8/libexec/rtld-elf/rtld.c Sat Mar 17 02:05:33 2012 (r233067) @@ -3116,17 +3116,17 @@ unref_dag(Obj_Entry *root) /* * Common code for MD __tls_get_addr(). */ -void * -tls_get_addr_common(Elf_Addr** dtvp, int index, size_t offset) +static void *tls_get_addr_slow(Elf_Addr **, int, size_t) __noinline; +static void * +tls_get_addr_slow(Elf_Addr **dtvp, int index, size_t offset) { - Elf_Addr* dtv = *dtvp; + Elf_Addr *newdtv, *dtv; int lockstate; + int to_copy; + dtv = *dtvp; /* Check dtv generation in case new modules have arrived */ if (dtv[0] != tls_dtv_generation) { - Elf_Addr* newdtv; - int to_copy; - lockstate = wlock_acquire(rtld_bind_lock); newdtv = calloc(1, (tls_max_index + 2) * sizeof(Elf_Addr)); to_copy = dtv[1]; @@ -3141,14 +3141,27 @@ tls_get_addr_common(Elf_Addr** dtvp, int } /* Dynamically allocate module TLS if necessary */ - if (!dtv[index + 1]) { + if (dtv[index + 1] == 0) { /* Signal safe, wlock will block out signals. */ lockstate = wlock_acquire(rtld_bind_lock); if (!dtv[index + 1]) dtv[index + 1] = (Elf_Addr)allocate_module_tls(index); wlock_release(rtld_bind_lock, lockstate); } - return (void*) (dtv[index + 1] + offset); + return ((void *)(dtv[index + 1] + offset)); +} + +void * +tls_get_addr_common(Elf_Addr **dtvp, int index, size_t offset) +{ + Elf_Addr *dtv; + + dtv = *dtvp; + /* Check dtv generation in case new modules have arrived */ + if (__predict_true(dtv[0] == tls_dtv_generation && + dtv[index + 1] != 0)) + return ((void *)(dtv[index + 1] + offset)); + return (tls_get_addr_slow(dtvp, index, offset)); } /* XXX not sure what variants to use for arm. */ From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 05:40:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22032106566B; Sat, 17 Mar 2012 05:40:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx10.syd.optusnet.com.au (fallbackmx10.syd.optusnet.com.au [211.29.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 69AB38FC14; Sat, 17 Mar 2012 05:40:11 +0000 (UTC) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by fallbackmx10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q2H5e5QM006711; Sat, 17 Mar 2012 16:40:05 +1100 Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q2H5dsoh028896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 17 Mar 2012 16:39:55 +1100 Date: Sat, 17 Mar 2012 16:39:54 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <201203162319.q2GNJjx5039482@svn.freebsd.org> Message-ID: <20120317162754.I1530@besplex.bde.org> References: <201203162319.q2GNJjx5039482@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: r233052 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 05:40:13 -0000 On Fri, 16 Mar 2012, Dimitry Andric wrote: > Log: > Change the style of share/mk/bsd.sys.mk to that of the other bsd.*.mk > files, and style.Makefile(5), where applicable. While here, update the > link to the gcc warning documentation. Thanks. I rather liked the "^.* foo" style for making ifdefs less unreadable, but it didn't look like it was written here, and it is a sign of other problems that so many nested ifdefs are used. It only used a single space of each level of indentation, so the indentation was still hard too see. The "other bsd.*.mk" files don't include bsd.cpu.mk. This still uses the "^. *foo" style (and is now the only *.mk file one that does this). For assignments, it mostly uses a different unusual style -- just the normal C style of a single space before and after '=' (or '+='). Weird formattings of assignments are harder to grep for than weird formattings of ".foo", so I didn't try looking for them all. Bruce From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 05:45:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85C19106566C; Sat, 17 Mar 2012 05:45:22 +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 738988FC0C; Sat, 17 Mar 2012 05:45:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H5jMdC052697; Sat, 17 Mar 2012 05:45:22 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H5jM1N052695; Sat, 17 Mar 2012 05:45:22 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201203170545.q2H5jM1N052695@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 17 Mar 2012 05:45:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233076 - in stable/9/sys: cddl/dev/dtrace/i386 i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 05:45:22 -0000 Author: marcel Date: Sat Mar 17 05:45:21 2012 New Revision: 233076 URL: http://svn.freebsd.org/changeset/base/233076 Log: MFC r227430: On i386, fbt probes are implemented by writing an invalid opcode over certain instructions in a function prologue or epilogue. DTrace has a hook into the invalid opcode fault handler that checks whether the fault was due to an probe and if so, runs the DTrace magic. Upon returning from an invalid opcode fault caused by a probe, DTrace must emulate the instruction that was replaced with the invalid opcode and then return control to the instruction following the invalid opcode. There were a pair of related bugs in the emulation for the leave instruction. The leave instruction is used to pop off a stack frame prior to returning from a function. The emulation for this instruction must move the trap frame for the invalid opcode fault down the stack to the bottom of the stack frame that is being removed, and then execute an iret. At two points in this process, the emulation code was storing values above the current value of the stack pointer. This opened up a window in which if we were two take an interrupt, the trap frame for the interrupt would overwrite the values stored on the stack, causing the system to panic later. The first bug was that at one point the emulation code saves the new value for $esp above the current stack pointer value. The fix is to save this value instead inside of the original trap frame. At this point we do not need the original trap frame so this is safe. The second bug is that when the emulate code loads $esp from the stack, it points part-way through the new trap frame instead of at its beginning. The emulation code adjusts the stack pointer to the correct value immediately afterwards, but this still leaves a one instruction window in which an interrupt would corrupt this trap frame. Fix this by adjusting the stack frame value before loading it into $esp. This fixes panics in invop_leave on i386 when using fbt return probes. Ok'd by: rstone Modified: stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S ============================================================================== --- stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S Sat Mar 17 03:31:11 2012 (r233075) +++ stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S Sat Mar 17 05:45:21 2012 (r233076) @@ -125,11 +125,11 @@ invop_leave: movl 8(%esp), %eax /* load calling EIP */ incl %eax /* increment over LOCK prefix */ movl %eax, -8(%ebx) /* store calling EIP */ - movl %ebx, -4(%esp) /* temporarily store new %esp */ + subl $8, %ebx /* adjust for three pushes, one pop */ + movl %ebx, 8(%esp) /* temporarily store new %esp */ popl %ebx /* pop off temp */ popl %eax /* pop off temp */ - movl -12(%esp), %esp /* set stack pointer */ - subl $8, %esp /* adjust for three pushes, one pop */ + movl (%esp), %esp /* set stack pointer */ iret /* return from interrupt */ invop_nop: /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 06:07:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0725106564A; Sat, 17 Mar 2012 06:07:11 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 991A28FC0C; Sat, 17 Mar 2012 06:07:11 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id q2H671Hq000392 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 16 Mar 2012 23:07:04 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4F642A1A.4070006@freebsd.org> Date: Fri, 16 Mar 2012 23:07:22 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: Tijl Coosemans References: <201203161942.q2GJgdPU032060@svn.freebsd.org> In-Reply-To: <201203161942.q2GJgdPU032060@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233043 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 06:07:12 -0000 On 3/16/12 12:42 PM, Tijl Coosemans wrote: > int32_t en_sw; /* status word (16bits) */ what's wrong with this picture? From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 06:48:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95B841065670; Sat, 17 Mar 2012 06:48:14 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8455B8FC0A; Sat, 17 Mar 2012 06:48:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H6mElg054791; Sat, 17 Mar 2012 06:48:14 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H6mE9V054789; Sat, 17 Mar 2012 06:48:14 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201203170648.q2H6mE9V054789@svn.freebsd.org> From: Mitsuru IWASAKI Date: Sat, 17 Mar 2012 06:48:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233077 - stable/9/sys/dev/iwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 06:48:14 -0000 Author: iwasaki Date: Sat Mar 17 06:48:13 2012 New Revision: 233077 URL: http://svn.freebsd.org/changeset/base/233077 Log: MFC r232785 Fix wrong asresp frame parsing in iwi_checkforqos(). Modified: stable/9/sys/dev/iwi/if_iwi.c Modified: stable/9/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/9/sys/dev/iwi/if_iwi.c Sat Mar 17 05:45:21 2012 (r233076) +++ stable/9/sys/dev/iwi/if_iwi.c Sat Mar 17 06:48:13 2012 (r233077) @@ -1357,8 +1357,8 @@ iwi_checkforqos(struct ieee80211vap *vap frm += 2; wme = NULL; - while (frm < efrm) { - IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1], return); + while (efrm - frm > 1) { + IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, return); switch (*frm) { case IEEE80211_ELEMID_VENDOR: if (iswmeoui(frm)) From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 06:49:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41771106566C; Sat, 17 Mar 2012 06:49:54 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 300F38FC15; Sat, 17 Mar 2012 06:49:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H6nsYk054881; Sat, 17 Mar 2012 06:49:54 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H6nr6S054879; Sat, 17 Mar 2012 06:49:53 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201203170649.q2H6nr6S054879@svn.freebsd.org> From: Mitsuru IWASAKI Date: Sat, 17 Mar 2012 06:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233078 - stable/8/sys/dev/iwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 06:49:54 -0000 Author: iwasaki Date: Sat Mar 17 06:49:53 2012 New Revision: 233078 URL: http://svn.freebsd.org/changeset/base/233078 Log: MFC r232785 Fix wrong asresp frame parsing in iwi_checkforqos(). Modified: stable/8/sys/dev/iwi/if_iwi.c Modified: stable/8/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/8/sys/dev/iwi/if_iwi.c Sat Mar 17 06:48:13 2012 (r233077) +++ stable/8/sys/dev/iwi/if_iwi.c Sat Mar 17 06:49:53 2012 (r233078) @@ -1355,8 +1355,8 @@ iwi_checkforqos(struct ieee80211vap *vap frm += 2; wme = NULL; - while (frm < efrm) { - IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1], return); + while (efrm - frm > 1) { + IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, return); switch (*frm) { case IEEE80211_ELEMID_VENDOR: if (iswmeoui(frm)) From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 07:25:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 644FC106564A; Sat, 17 Mar 2012 07:25:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48FDC8FC14; Sat, 17 Mar 2012 07:25:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H7POmm056091; Sat, 17 Mar 2012 07:25:24 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H7POxr056085; Sat, 17 Mar 2012 07:25:24 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203170725.q2H7POxr056085@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Mar 2012 07:25: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: r233081 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 07:25:24 -0000 Author: adrian Date: Sat Mar 17 07:25:23 2012 New Revision: 233081 URL: http://svn.freebsd.org/changeset/base/233081 Log: Begin fleshing out MII clock rate configuration changes. These are needed for some particular port configurations where the default speed isn't suitable for all link speed types. (Ie, changing 10/100/1000MBit PLL rate requires a similar MII clock rate, rather than a fixed MII rate.) This is: * only currently implemented for the ar71xx; * isn't used anywhere (yet), as the final interface for this hasn't yet been determined. Modified: head/sys/mips/atheros/ar71xx_chip.c head/sys/mips/atheros/ar71xx_cpudef.h head/sys/mips/atheros/ar71xxreg.h head/sys/mips/atheros/ar724x_chip.c head/sys/mips/atheros/ar91xx_chip.c Modified: head/sys/mips/atheros/ar71xx_chip.c ============================================================================== --- head/sys/mips/atheros/ar71xx_chip.c Sat Mar 17 06:54:42 2012 (r233080) +++ head/sys/mips/atheros/ar71xx_chip.c Sat Mar 17 07:25:23 2012 (r233081) @@ -136,6 +136,46 @@ ar71xx_chip_device_stopped(uint32_t mask return ((reg & mask) == mask); } +static void +ar71xx_chip_set_mii_speed(uint32_t unit, uint32_t speed) +{ + uint32_t val, reg, ctrl; + + switch (unit) { + case 0: + reg = AR71XX_MII0_CTRL; + break; + case 1: + reg = AR71XX_MII1_CTRL; + break; + default: + printf("%s: invalid MII unit set for arge unit: %d\n", + __func__, unit); + return; + } + + switch (speed) { + case 10: + ctrl = MII_CTRL_SPEED_10; + break; + case 100: + ctrl = MII_CTRL_SPEED_100; + break; + case 1000: + ctrl = MII_CTRL_SPEED_1000; + break; + default: + printf("%s: invalid MII speed (%d) set for arge unit: %d\n", + __func__, speed, unit); + return; + } + + val = ATH_READ_REG(reg); + val &= ~(MII_CTRL_SPEED_MASK << MII_CTRL_SPEED_SHIFT); + val |= (ctrl & MII_CTRL_SPEED_MASK) << MII_CTRL_SPEED_SHIFT; + ATH_WRITE_REG(reg, val); +} + /* Speed is either 10, 100 or 1000 */ static void ar71xx_chip_set_pll_ge(int unit, int speed) @@ -237,6 +277,7 @@ struct ar71xx_cpu_def ar71xx_chip_def = &ar71xx_chip_device_start, &ar71xx_chip_device_stopped, &ar71xx_chip_set_pll_ge, + &ar71xx_chip_set_mii_speed, &ar71xx_chip_ddr_flush_ge, &ar71xx_chip_get_eth_pll, &ar71xx_chip_ddr_flush_ip2, Modified: head/sys/mips/atheros/ar71xx_cpudef.h ============================================================================== --- head/sys/mips/atheros/ar71xx_cpudef.h Sat Mar 17 06:54:42 2012 (r233080) +++ head/sys/mips/atheros/ar71xx_cpudef.h Sat Mar 17 07:25:23 2012 (r233081) @@ -36,6 +36,7 @@ struct ar71xx_cpu_def { void (* ar71xx_chip_device_start) (uint32_t); int (* ar71xx_chip_device_stopped) (uint32_t); void (* ar71xx_chip_set_pll_ge) (int, int); + void (* ar71xx_chip_set_mii_speed) (uint32_t, uint32_t); void (* ar71xx_chip_ddr_flush_ge) (int); uint32_t (* ar71xx_chip_get_eth_pll) (unsigned int, int); @@ -84,6 +85,11 @@ static inline void ar71xx_device_set_pll ar71xx_cpu_ops->ar71xx_chip_set_pll_ge(unit, speed); } +static inline void ar71xx_device_set_mii_speed(int unit, int speed) +{ + ar71xx_cpu_ops->ar71xx_chip_set_mii_speed(unit, speed); +} + static inline void ar71xx_device_flush_ddr_ge(int unit) { ar71xx_cpu_ops->ar71xx_chip_ddr_flush_ge(unit); Modified: head/sys/mips/atheros/ar71xxreg.h ============================================================================== --- head/sys/mips/atheros/ar71xxreg.h Sat Mar 17 06:54:42 2012 (r233080) +++ head/sys/mips/atheros/ar71xxreg.h Sat Mar 17 07:25:23 2012 (r233081) @@ -268,6 +268,17 @@ #define AR91XX_REV_ID_REVISION_SHIFT 2 /* + * AR71xx MII control region + */ +#define AR71XX_MII0_CTRL 0x18070000 +#define AR71XX_MII1_CTRL 0x18070004 +#define MII_CTRL_SPEED_SHIFT 4 +#define MII_CTRL_SPEED_MASK 3 +#define MII_CTRL_SPEED_10 0 +#define MII_CTRL_SPEED_100 1 +#define MII_CTRL_SPEED_1000 2 + +/* * GigE adapters region */ #define AR71XX_MAC0_BASE 0x19000000 Modified: head/sys/mips/atheros/ar724x_chip.c ============================================================================== --- head/sys/mips/atheros/ar724x_chip.c Sat Mar 17 06:54:42 2012 (r233080) +++ head/sys/mips/atheros/ar724x_chip.c Sat Mar 17 07:25:23 2012 (r233081) @@ -123,6 +123,13 @@ ar724x_chip_device_stopped(uint32_t mask } static void +ar724x_chip_set_mii_speed(uint32_t unit, uint32_t speed) +{ + /* XXX TODO */ + return; +} + +static void ar724x_chip_set_pll_ge(int unit, int speed) { @@ -220,6 +227,7 @@ struct ar71xx_cpu_def ar724x_chip_def = &ar724x_chip_device_start, &ar724x_chip_device_stopped, &ar724x_chip_set_pll_ge, + &ar724x_chip_set_mii_speed, &ar724x_chip_ddr_flush_ge, &ar724x_chip_get_eth_pll, &ar724x_chip_ddr_flush_ip2, Modified: head/sys/mips/atheros/ar91xx_chip.c ============================================================================== --- head/sys/mips/atheros/ar91xx_chip.c Sat Mar 17 06:54:42 2012 (r233080) +++ head/sys/mips/atheros/ar91xx_chip.c Sat Mar 17 07:25:23 2012 (r233081) @@ -111,6 +111,13 @@ ar91xx_chip_device_stopped(uint32_t mask } static void +ar91xx_chip_set_mii_speed(uint32_t unit, uint32_t speed) +{ + /* XXX TODO */ +} + + +static void ar91xx_chip_set_pll_ge(int unit, int speed) { uint32_t pll; @@ -209,6 +216,7 @@ struct ar71xx_cpu_def ar91xx_chip_def = &ar91xx_chip_device_start, &ar91xx_chip_device_stopped, &ar91xx_chip_set_pll_ge, + &ar91xx_chip_set_mii_speed, &ar91xx_chip_ddr_flush_ge, &ar91xx_chip_get_eth_pll, &ar91xx_chip_ddr_flush_ip2, From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 07:29:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0C631065674; Sat, 17 Mar 2012 07:29:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E039F8FC1A; Sat, 17 Mar 2012 07:29:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H7TBsL056234; Sat, 17 Mar 2012 07:29:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H7TBDv056232; Sat, 17 Mar 2012 07:29:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203170729.q2H7TBDv056232@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Mar 2012 07:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233082 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 07:29:12 -0000 Author: adrian Date: Sat Mar 17 07:29:11 2012 New Revision: 233082 URL: http://svn.freebsd.org/changeset/base/233082 Log: style(9) changes. Modified: head/sys/mips/atheros/ar724x_chip.c Modified: head/sys/mips/atheros/ar724x_chip.c ============================================================================== --- head/sys/mips/atheros/ar724x_chip.c Sat Mar 17 07:25:23 2012 (r233081) +++ head/sys/mips/atheros/ar724x_chip.c Sat Mar 17 07:29:11 2012 (r233082) @@ -125,6 +125,7 @@ ar724x_chip_device_stopped(uint32_t mask static void ar724x_chip_set_mii_speed(uint32_t unit, uint32_t speed) { + /* XXX TODO */ return; } @@ -221,15 +222,15 @@ ar724x_chip_init_usb_peripheral(void) } struct ar71xx_cpu_def ar724x_chip_def = { - &ar724x_chip_detect_mem_size, - &ar724x_chip_detect_sys_frequency, - &ar724x_chip_device_stop, - &ar724x_chip_device_start, - &ar724x_chip_device_stopped, - &ar724x_chip_set_pll_ge, + &ar724x_chip_detect_mem_size, + &ar724x_chip_detect_sys_frequency, + &ar724x_chip_device_stop, + &ar724x_chip_device_start, + &ar724x_chip_device_stopped, + &ar724x_chip_set_pll_ge, &ar724x_chip_set_mii_speed, - &ar724x_chip_ddr_flush_ge, - &ar724x_chip_get_eth_pll, - &ar724x_chip_ddr_flush_ip2, + &ar724x_chip_ddr_flush_ge, + &ar724x_chip_get_eth_pll, + &ar724x_chip_ddr_flush_ip2, &ar724x_chip_init_usb_peripheral }; From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 09:10:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4998C106566B; Sat, 17 Mar 2012 09:10:44 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E9898FC0A; Sat, 17 Mar 2012 09:10:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H9Aig4059437; Sat, 17 Mar 2012 09:10:44 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2H9Ahc4059435; Sat, 17 Mar 2012 09:10:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201203170910.q2H9Ahc4059435@svn.freebsd.org> From: Ed Schouten Date: Sat, 17 Mar 2012 09:10:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233083 - stable/9/usr.sbin/watch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 09:10:44 -0000 Author: ed Date: Sat Mar 17 09:10:43 2012 New Revision: 233083 URL: http://svn.freebsd.org/changeset/base/233083 Log: MFC r232780 and r232781: Fix whitespace. Modified: stable/9/usr.sbin/watch/watch.c Directory Properties: stable/9/usr.sbin/watch/ (props changed) Modified: stable/9/usr.sbin/watch/watch.c ============================================================================== --- stable/9/usr.sbin/watch/watch.c Sat Mar 17 07:29:11 2012 (r233082) +++ stable/9/usr.sbin/watch/watch.c Sat Mar 17 09:10:43 2012 (r233083) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #define MSG_CHANGE "Snoop device change by user request." #define MSG_NOWRITE "Snoop device change due to write failure." - #define DEV_NAME_LEN 1024 /* for /dev/ttyXX++ */ #define MIN_SIZE 256 @@ -65,27 +64,26 @@ static void detach_snp(void); static void set_dev(const char *); static void ask_dev(char *, const char *); -int opt_reconn_close = 0; -int opt_reconn_oflow = 0; -int opt_interactive = 1; -int opt_timestamp = 0; +int opt_reconn_close = 0; +int opt_reconn_oflow = 0; +int opt_interactive = 1; +int opt_timestamp = 0; int opt_write = 0; int opt_no_switch = 0; const char *opt_snpdev; -char dev_name[DEV_NAME_LEN]; -int snp_io; -int std_in = 0, std_out = 1; - - -int clear_ok = 0; -struct termios otty; -char tbuf[1024], gbuf[1024]; - +char dev_name[DEV_NAME_LEN]; +int snp_io; +int std_in = 0, std_out = 1; + +int clear_ok = 0; +struct termios otty; +char tbuf[1024], gbuf[1024]; static void clear(void) { + if (clear_ok) tputs(gbuf, 1, putchar); fflush(stdout); @@ -94,8 +92,9 @@ clear(void) static void timestamp(const char *buf) { - time_t t; - char btmp[1024]; + time_t t; + char btmp[1024]; + clear(); printf("\n---------------------------------------------\n"); t = time(NULL); @@ -109,11 +108,11 @@ timestamp(const char *buf) static void set_tty(void) { - struct termios ntty; + struct termios ntty; - tcgetattr (std_in, &otty); + tcgetattr(std_in, &otty); ntty = otty; - ntty.c_lflag &= ~ICANON; /* disable canonical operation */ + ntty.c_lflag &= ~ICANON; /* disable canonical operation */ ntty.c_lflag &= ~ECHO; #ifdef FLUSHO ntty.c_lflag &= ~FLUSHO; @@ -124,24 +123,25 @@ set_tty(void) #ifdef IEXTEN ntty.c_lflag &= ~IEXTEN; #endif - ntty.c_cc[VMIN] = 1; /* minimum of one character */ - ntty.c_cc[VTIME] = 0; /* timeout value */ + ntty.c_cc[VMIN] = 1; /* minimum of one character */ + ntty.c_cc[VTIME] = 0; /* timeout value */ - ntty.c_cc[VINTR] = 07; /* ^G */ - ntty.c_cc[VQUIT] = 07; /* ^G */ - tcsetattr (std_in, TCSANOW, &ntty); + ntty.c_cc[VINTR] = 07; /* ^G */ + ntty.c_cc[VQUIT] = 07; /* ^G */ + tcsetattr(std_in, TCSANOW, &ntty); } static void unset_tty(void) { - tcsetattr (std_in, TCSANOW, &otty); -} + tcsetattr(std_in, TCSANOW, &otty); +} static void fatal(int error, const char *buf) { + unset_tty(); if (buf) errx(error, "fatal: %s", buf); @@ -169,10 +169,10 @@ open_snp(void) return (f); } - static void cleanup(int signo __unused) { + if (opt_timestamp) timestamp("Logging Exited."); close(snp_io); @@ -180,10 +180,10 @@ cleanup(int signo __unused) exit(EX_OK); } - static void usage(void) { + fprintf(stderr, "usage: watch [-ciotnW] [tty name]\n"); exit(EX_USAGE); } @@ -191,7 +191,8 @@ usage(void) static void setup_scr(void) { - char *cbuf = gbuf, *term; + char *cbuf = gbuf, *term; + if (!opt_interactive) return; if ((term = getenv("TERM"))) @@ -226,11 +227,10 @@ attach_snp(void) timestamp("Logging Started."); } - static void set_dev(const char *name) { - char buf[DEV_NAME_LEN]; + char buf[DEV_NAME_LEN]; struct stat sb; if (strlen(name) > 5 && !strncmp(name, _PATH_DEV, sizeof _PATH_DEV - 1)) { @@ -256,8 +256,8 @@ set_dev(const char *name) void ask_dev(char *dbuf, const char *msg) { - char buf[DEV_NAME_LEN]; - int len; + char buf[DEV_NAME_LEN]; + int len; clear(); unset_tty(); @@ -284,10 +284,10 @@ ask_dev(char *dbuf, const char *msg) int main(int ac, char *av[]) { - int ch, res, rv, nread; + int ch, res, rv, nread; size_t b_size = MIN_SIZE; - char *buf, chb[READB_LEN]; - fd_set fd_s; + char *buf, chb[READB_LEN]; + fd_set fd_s; (void) setlocale(LC_TIME, ""); @@ -296,7 +296,6 @@ main(int ac, char *av[]) else opt_interactive = 0; - while ((ch = getopt(ac, av, "Wciotnf:")) != -1) switch (ch) { case 'W': @@ -349,7 +348,7 @@ main(int ac, char *av[]) FD_ZERO(&fd_s); - while (1) { + for (;;) { if (opt_interactive) FD_SET(std_in, &fd_s); FD_SET(snp_io, &fd_s); @@ -382,7 +381,7 @@ main(int ac, char *av[]) detach_snp(); if (opt_no_switch) fatal(EX_IOERR, - "write failed"); + "write failed"); ask_dev(dev_name, MSG_NOWRITE); set_dev(dev_name); } @@ -439,4 +438,3 @@ main(int ac, char *av[]) } /* While */ return(0); } - From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 11:48:27 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CFD04106564A; Sat, 17 Mar 2012 11:48:27 +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 50F548FC08; Sat, 17 Mar 2012 11:48:26 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q2HBmHaK031651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 17 Mar 2012 22:48:18 +1100 Date: Sat, 17 Mar 2012 22:48:17 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Julian Elischer In-Reply-To: <4F642A1A.4070006@freebsd.org> Message-ID: <20120317223612.D2494@besplex.bde.org> References: <201203161942.q2GJgdPU032060@svn.freebsd.org> <4F642A1A.4070006@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, Tijl Coosemans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r233043 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 11:48:27 -0000 On Fri, 16 Mar 2012, Julian Elischer wrote: > On 3/16/12 12:42 PM, Tijl Coosemans wrote: >> int32_t en_sw; /* status word (16bits) */ > > what's wrong with this picture? Only the excessive indentation in the new version. The 16 in the comment is not mismatched with 32 in the code, but is less needed that before, since it is more obvious that the code uses 32 and it goes without saying that this would only be used if it is correct. The comment says that although field has 32 bits in memory, only 16 bits of it are used in the status word register. For fields in this struct that use all of the bits in memory, no comment is made about the number of bits in the register, and vice versa. I forget if the padding bits in memory are read or written by the hardware. On write, they might not be touched, or they might be filled with garbage, or all zeros, or all 1's, or a "reserved" not-quite garbage value. Probably closest the latter, with the actual bits being all 0 or all 1. On read, they might be ignored or checked for garbage. I think they are ignored for this file.d Bruce From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 12:11:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12BD4106566B; Sat, 17 Mar 2012 12:11:54 +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 013F98FC0A; Sat, 17 Mar 2012 12:11:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HCBrx4069222; Sat, 17 Mar 2012 12:11:53 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HCBrr4069220; Sat, 17 Mar 2012 12:11:53 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201203171211.q2HCBrr4069220@svn.freebsd.org> From: Christian Brueffer Date: Sat, 17 Mar 2012 12:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233084 - in stable/9/sys: i386/conf net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 12:11:54 -0000 Author: brueffer Date: Sat Mar 17 12:11:53 2012 New Revision: 233084 URL: http://svn.freebsd.org/changeset/base/233084 Log: MFC: r232315 Use a more appropriate default for the maximum number of addresses in the bridge forwarding table. Modified: stable/9/sys/net/if_bridge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/net/if_bridge.c ============================================================================== --- stable/9/sys/net/if_bridge.c Sat Mar 17 09:10:43 2012 (r233083) +++ stable/9/sys/net/if_bridge.c Sat Mar 17 12:11:53 2012 (r233084) @@ -144,10 +144,10 @@ __FBSDID("$FreeBSD$"); #define BRIDGE_RTHASH_MASK (BRIDGE_RTHASH_SIZE - 1) /* - * Maximum number of addresses to cache. + * Default maximum number of addresses to cache. */ #ifndef BRIDGE_RTABLE_MAX -#define BRIDGE_RTABLE_MAX 100 +#define BRIDGE_RTABLE_MAX 2000 #endif /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 12:15:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 913121065676; Sat, 17 Mar 2012 12:15: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 7F87A8FC08; Sat, 17 Mar 2012 12:15:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HCFaK0069397; Sat, 17 Mar 2012 12:15:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HCFahb069394; Sat, 17 Mar 2012 12:15:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201203171215.q2HCFahb069394@svn.freebsd.org> From: Christian Brueffer Date: Sat, 17 Mar 2012 12:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233085 - in stable/8/sys: i386/conf net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 12:15:36 -0000 Author: brueffer Date: Sat Mar 17 12:15:35 2012 New Revision: 233085 URL: http://svn.freebsd.org/changeset/base/233085 Log: MFC: r232315 Use a more appropriate default for the maximum number of addresses in the bridge forwarding table. Modified: stable/8/sys/net/if_bridge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (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/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/net/if_bridge.c ============================================================================== --- stable/8/sys/net/if_bridge.c Sat Mar 17 12:11:53 2012 (r233084) +++ stable/8/sys/net/if_bridge.c Sat Mar 17 12:15:35 2012 (r233085) @@ -144,10 +144,10 @@ __FBSDID("$FreeBSD$"); #define BRIDGE_RTHASH_MASK (BRIDGE_RTHASH_SIZE - 1) /* - * Maximum number of addresses to cache. + * Default maximum number of addresses to cache. */ #ifndef BRIDGE_RTABLE_MAX -#define BRIDGE_RTABLE_MAX 100 +#define BRIDGE_RTABLE_MAX 2000 #endif /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 12:24:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BDCC4106566C; Sat, 17 Mar 2012 12:24:17 +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 A8C868FC14; Sat, 17 Mar 2012 12:24:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HCOH6N069742; Sat, 17 Mar 2012 12:24:17 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HCOH1n069740; Sat, 17 Mar 2012 12:24:17 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201203171224.q2HCOH1n069740@svn.freebsd.org> From: Christian Brueffer Date: Sat, 17 Mar 2012 12:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233086 - stable/7/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 12:24:17 -0000 Author: brueffer Date: Sat Mar 17 12:24:17 2012 New Revision: 233086 URL: http://svn.freebsd.org/changeset/base/233086 Log: MFC: r232315 Use a more appropriate default for the maximum number of addresses in the bridge forwarding table. Modified: stable/7/sys/net/if_bridge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/net/if_bridge.c ============================================================================== --- stable/7/sys/net/if_bridge.c Sat Mar 17 12:15:35 2012 (r233085) +++ stable/7/sys/net/if_bridge.c Sat Mar 17 12:24:17 2012 (r233086) @@ -142,10 +142,10 @@ __FBSDID("$FreeBSD$"); #define BRIDGE_RTHASH_MASK (BRIDGE_RTHASH_SIZE - 1) /* - * Maximum number of addresses to cache. + * Default maximum number of addresses to cache. */ #ifndef BRIDGE_RTABLE_MAX -#define BRIDGE_RTABLE_MAX 100 +#define BRIDGE_RTABLE_MAX 2000 #endif /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 12:33:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C48711065670; Sat, 17 Mar 2012 12:33:13 +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 ADC8F8FC08; Sat, 17 Mar 2012 12:33:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HCXDBY070113; Sat, 17 Mar 2012 12:33:13 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HCXDEL070111; Sat, 17 Mar 2012 12:33:13 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201203171233.q2HCXDEL070111@svn.freebsd.org> From: Christian Brueffer Date: Sat, 17 Mar 2012 12:33:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233087 - stable/9/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 12:33:13 -0000 Author: brueffer Date: Sat Mar 17 12:33:12 2012 New Revision: 233087 URL: http://svn.freebsd.org/changeset/base/233087 Log: MFC: r232316 Update bridge(4) default values. Modified: stable/9/sbin/ifconfig/ifconfig.8 Directory Properties: stable/9/sbin/ifconfig/ (props changed) Modified: stable/9/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/9/sbin/ifconfig/ifconfig.8 Sat Mar 17 12:24:17 2012 (r233086) +++ stable/9/sbin/ifconfig/ifconfig.8 Sat Mar 17 12:33:12 2012 (r233087) @@ -2074,7 +2074,7 @@ it is removed from the bridge. .It Cm maxaddr Ar size Set the size of the bridge address cache to .Ar size . -The default is 100 entries. +The default is 2000 entries. .It Cm timeout Ar seconds Set the timeout of address cache entries to .Ar seconds @@ -2082,7 +2082,7 @@ seconds. If .Ar seconds is zero, then address cache entries will not be expired. -The default is 240 seconds. +The default is 1200 seconds. .It Cm addr Display the addresses that have been learned by the bridge. .It Cm static Ar interface-name Ar address From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 12:35:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6B63106566C; Sat, 17 Mar 2012 12:35: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 A24028FC12; Sat, 17 Mar 2012 12:35:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HCZnZQ070308; Sat, 17 Mar 2012 12:35:49 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HCZnw8070306; Sat, 17 Mar 2012 12:35:49 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201203171235.q2HCZnw8070306@svn.freebsd.org> From: Christian Brueffer Date: Sat, 17 Mar 2012 12:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233088 - stable/8/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 12:35:49 -0000 Author: brueffer Date: Sat Mar 17 12:35:49 2012 New Revision: 233088 URL: http://svn.freebsd.org/changeset/base/233088 Log: MFC: r232316 Update bridge(4) default values. Modified: stable/8/sbin/ifconfig/ifconfig.8 Directory Properties: stable/8/sbin/ifconfig/ (props changed) Modified: stable/8/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/8/sbin/ifconfig/ifconfig.8 Sat Mar 17 12:33:12 2012 (r233087) +++ stable/8/sbin/ifconfig/ifconfig.8 Sat Mar 17 12:35:49 2012 (r233088) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd December 17, 2011 +.Dd February 29, 2012 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2031,7 +2031,7 @@ it is removed from the bridge. .It Cm maxaddr Ar size Set the size of the bridge address cache to .Ar size . -The default is 100 entries. +The default is 2000 entries. .It Cm timeout Ar seconds Set the timeout of address cache entries to .Ar seconds @@ -2039,7 +2039,7 @@ seconds. If .Ar seconds is zero, then address cache entries will not be expired. -The default is 240 seconds. +The default is 1200 seconds. .It Cm addr Display the addresses that have been learned by the bridge. .It Cm static Ar interface-name Ar address From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 12:36:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7CA7D106566C; Sat, 17 Mar 2012 12:36:46 +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 65E7A8FC12; Sat, 17 Mar 2012 12:36:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HCakaX070393; Sat, 17 Mar 2012 12:36:46 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HCajhl070391; Sat, 17 Mar 2012 12:36:45 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201203171236.q2HCajhl070391@svn.freebsd.org> From: Christian Brueffer Date: Sat, 17 Mar 2012 12:36: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: r233089 - stable/7/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 12:36:46 -0000 Author: brueffer Date: Sat Mar 17 12:36:45 2012 New Revision: 233089 URL: http://svn.freebsd.org/changeset/base/233089 Log: MFC: r232316 Update bridge(4) default values. Modified: stable/7/sbin/ifconfig/ifconfig.8 Directory Properties: stable/7/sbin/ifconfig/ (props changed) Modified: stable/7/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/7/sbin/ifconfig/ifconfig.8 Sat Mar 17 12:35:49 2012 (r233088) +++ stable/7/sbin/ifconfig/ifconfig.8 Sat Mar 17 12:36:45 2012 (r233089) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd December 17, 2011 +.Dd February 29, 2012 .Dt IFCONFIG 8 .Os .Sh NAME @@ -1481,7 +1481,7 @@ it is removed from the bridge. .It Cm maxaddr Ar size Set the size of the bridge address cache to .Ar size . -The default is 100 entries. +The default is 2000 entries. .It Cm timeout Ar seconds Set the timeout of address cache entries to .Ar seconds @@ -1489,7 +1489,7 @@ seconds. If .Ar seconds is zero, then address cache entries will not be expired. -The default is 240 seconds. +The default is 1200 seconds. .It Cm addr Display the addresses that have been learned by the bridge. .It Cm static Ar interface-name Ar address From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 16:15:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B952106564A; Sat, 17 Mar 2012 16:15:06 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id AC85B8FC12; Sat, 17 Mar 2012 16:15:05 +0000 (UTC) Received: from outgoing.leidinger.net (p5796C32E.dip.t-dialin.net [87.150.195.46]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 30B468444D7; Sat, 17 Mar 2012 17:14:52 +0100 (CET) Received: from unknown (IO.Leidinger.net [192.168.1.12]) by outgoing.leidinger.net (Postfix) with ESMTPS id 49B1C20EA; Sat, 17 Mar 2012 17:14:49 +0100 (CET) Date: Sat, 17 Mar 2012 16:35:39 +0100 From: Alexander Leidinger To: Martin Matuska Message-ID: <20120317163539.00004d8f@unknown> In-Reply-To: <201203162130.q2GLUQaw035726@svn.freebsd.org> References: <201203162130.q2GLUQaw035726@svn.freebsd.org> X-Mailer: Claws Mail 3.7.10cvs42 (GTK+ 2.16.6; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 30B468444D7.AE132 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.88, required 6, autolearn=disabled, ALL_TRUSTED -1.00, AWL -0.02, TW_SV 0.08, TW_ZF 0.08, T_RP_MATCHES_RCVD -0.01) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1332605692.74537@0NE5q4souhcj1iBkL4CuQA X-EBL-Spam-Status: No Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, pjd@FreeBSD.org, jamie@FreeBSD.org Subject: Re: svn commit: r233048 - head/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 16:15:06 -0000 On Fri, 16 Mar 2012 21:30:26 +0000 (UTC) Martin Matuska wrote: > Author: mm > Date: Fri Mar 16 21:30:26 2012 > New Revision: 233048 > URL: http://svn.freebsd.org/changeset/base/233048 > > Log: > Unhide /dev/zfs in devfsrules_jail. > > The /dev/zfs device is required for managing jailed ZFS datasets. This may give more info to a jail (ZFS is in use on this machine) than what someone may want to provide. I have separate rulesets for jails without and with ZFS (actually the one without is the default one and the one with is a new one): ---snip--- ... [devfsrules_unhide_zfs=12] add path zfs unhide ... [devfsrules_jail_withzfs=16] add include $devfsrules_hide_all add include $devfsrules_unhide_basic add include $devfsrules_unhide_login add include $devfsrules_unhide_zfs ---snip--- Anyone with arguments why this may be overly paranoid? If not, I would suggest that we go this way instead. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 16:40:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AD8E1065676; Sat, 17 Mar 2012 16:40:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 564108FC15; Sat, 17 Mar 2012 16:40:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HGeGg6078707; Sat, 17 Mar 2012 16:40:16 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HGeGFf078705; Sat, 17 Mar 2012 16:40:16 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203171640.q2HGeGFf078705@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 17 Mar 2012 16:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233090 - head/usr.sbin/moused X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 16:40:16 -0000 Author: hselasky Date: Sat Mar 17 16:40:15 2012 New Revision: 233090 URL: http://svn.freebsd.org/changeset/base/233090 Log: The UMS module is now loaded by rules in /etc/devd/usb.conf which are executed by devd. Remove duplicate kldload. Reported by: joel @ MFC after: 1 week Modified: head/usr.sbin/moused/moused.c Modified: head/usr.sbin/moused/moused.c ============================================================================== --- head/usr.sbin/moused/moused.c Sat Mar 17 12:36:45 2012 (r233089) +++ head/usr.sbin/moused/moused.c Sat Mar 17 16:40:15 2012 (r233090) @@ -564,8 +564,6 @@ static void mremote_clientchg(int add); static int kidspad(u_char rxc, mousestatus_t *act); static int gtco_digipad(u_char, mousestatus_t *); -static int usbmodule(void); - int main(int argc, char *argv[]) { @@ -880,8 +878,7 @@ main(int argc, char *argv[]) retry = 1; if (strncmp(rodent.portname, "/dev/ums", 8) == 0) { - if (usbmodule() != 0) - retry = 5; + retry = 5; } for (;;) { @@ -953,12 +950,6 @@ main(int argc, char *argv[]) exit(0); } -static int -usbmodule(void) -{ - return (kld_isloaded("uhub/ums") || kld_load("ums") != -1); -} - /* * Function to calculate linear acceleration. * From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 21:51:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76EDB106564A; Sat, 17 Mar 2012 21:51:40 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61AF48FC08; Sat, 17 Mar 2012 21:51:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HLpe43088551; Sat, 17 Mar 2012 21:51:40 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HLpeI4088549; Sat, 17 Mar 2012 21:51:40 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201203172151.q2HLpeI4088549@svn.freebsd.org> From: Robert Millan Date: Sat, 17 Mar 2012 21:51: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: r233096 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 21:51:40 -0000 Author: rmh Date: Sat Mar 17 21:51:39 2012 New Revision: 233096 URL: http://svn.freebsd.org/changeset/base/233096 Log: Hide a few declarations from userland (including `struct inpcbgroup'). This removes the dependency on which was introduced with SVN rev 222748 (due to CACHE_LINE_SIZE). Reviewed by: bde MFC after: 10 days Modified: head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Sat Mar 17 19:40:37 2012 (r233095) +++ head/sys/netinet/in_pcb.h Sat Mar 17 21:51:39 2012 (r233096) @@ -364,6 +364,7 @@ struct inpcbinfo { void *ipi_pspare[2]; }; +#ifdef _KERNEL /* * Connection groups hold sets of connections that have similar CPU/thread * affinity. Each connection belongs to exactly one connection group. @@ -406,7 +407,6 @@ struct inpcbgroup { #define INP_WLOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_WLOCKED) #define INP_UNLOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_UNLOCKED) -#ifdef _KERNEL /* * These locking functions are for inpcb consumers outside of sys/netinet, * more specifically, they were added for the benefit of TOE drivers. The From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 22:04:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6825F106564A; Sat, 17 Mar 2012 22:04:59 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37A9C8FC16; Sat, 17 Mar 2012 22:04:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HM4xjn088988; Sat, 17 Mar 2012 22:04:59 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HM4xBH088986; Sat, 17 Mar 2012 22:04:59 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201203172204.q2HM4xBH088986@svn.freebsd.org> From: Alan Cox Date: Sat, 17 Mar 2012 22:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233097 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 22:04:59 -0000 Author: alc Date: Sat Mar 17 22:04:58 2012 New Revision: 233097 URL: http://svn.freebsd.org/changeset/base/233097 Log: With the changes over the past year to how accesses to the page's dirty field are synchronized, there is no need for pmap_protect() to acquire the page queues lock unless it is going to access the pv lists. Reviewed by: kib Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Mar 17 21:51:39 2012 (r233096) +++ head/sys/amd64/amd64/pmap.c Sat Mar 17 22:04:58 2012 (r233097) @@ -2940,6 +2940,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv pd_entry_t ptpaddr, *pde; pt_entry_t *pte; int anychanged; + boolean_t pv_lists_locked; if ((prot & VM_PROT_READ) == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); @@ -2950,9 +2951,10 @@ pmap_protect(pmap_t pmap, vm_offset_t sv (VM_PROT_WRITE|VM_PROT_EXECUTE)) return; + pv_lists_locked = FALSE; +resume: anychanged = 0; - vm_page_lock_queues(); PMAP_LOCK(pmap); for (; sva < eva; sva = va_next) { @@ -3001,9 +3003,25 @@ pmap_protect(pmap_t pmap, vm_offset_t sv if (pmap_protect_pde(pmap, pde, sva, prot)) anychanged = 1; continue; - } else if (!pmap_demote_pde(pmap, pde, sva)) { - /* The large page mapping was destroyed. */ - continue; + } else { + if (!pv_lists_locked) { + pv_lists_locked = TRUE; + if (!mtx_trylock(&vm_page_queue_mtx)) { + if (anychanged) + pmap_invalidate_all( + pmap); + PMAP_UNLOCK(pmap); + vm_page_lock_queues(); + goto resume; + } + } + if (!pmap_demote_pde(pmap, pde, sva)) { + /* + * The large page mapping was + * destroyed. + */ + continue; + } } } @@ -3043,7 +3061,8 @@ retry: } if (anychanged) pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + if (pv_lists_locked) + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 22:12:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27414106564A; Sat, 17 Mar 2012 22:12:10 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 126E78FC15; Sat, 17 Mar 2012 22:12:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HMC9Em089273; Sat, 17 Mar 2012 22:12:09 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HMC9cG089270; Sat, 17 Mar 2012 22:12:09 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201203172212.q2HMC9cG089270@svn.freebsd.org> From: Peter Wemm Date: Sat, 17 Mar 2012 22:12: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: r233098 - in head: . lib/libc++ X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 22:12:10 -0000 Author: peter Date: Sat Mar 17 22:12:09 2012 New Revision: 233098 URL: http://svn.freebsd.org/changeset/base/233098 Log: Make sure libgcc_s is finished building in _startup_libs before building libcxxrt with high -j levels. The workaround in libc++/Makefile isn't necessary once that race is solved. Reviewed by: theravin Modified: head/Makefile.inc1 head/lib/libc++/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Mar 17 22:04:58 2012 (r233097) +++ head/Makefile.inc1 Sat Mar 17 22:12:09 2012 (r233098) @@ -1243,6 +1243,9 @@ _startup_libs+= lib/libcxxrt .endif gnu/lib/libgcc__L: lib/libc__L +.if ${MK_LIBCPLUSPLUS} != "no" +lib/libcxxrt__L: gnu/lib/libgcc__L +.endif _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libhdb} \ ${_kerberos5_lib_libheimntlm} \ Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Sat Mar 17 22:04:58 2012 (r233097) +++ head/lib/libc++/Makefile Sat Mar 17 22:12:09 2012 (r233098) @@ -39,7 +39,7 @@ WARNS= 0 CXXFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -std=c++0x -nostdlib -DLIBCXXRT DPADD= ${LIBCXXRT} -LDADD= -L${.OBJDIR}/../libcxxrt/ -lcxxrt +LDADD= -lcxxrt LDFLAGS+= --verbose INCSGROUPS= STD EXT From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 22:14:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E582B1065673; Sat, 17 Mar 2012 22:14:43 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id B57A78FC12; Sat, 17 Mar 2012 22:14:43 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed; delsp=yes Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M1100300V4CQ100@smtpauth3.wiscmail.wisc.edu>; Sat, 17 Mar 2012 17:14:36 -0500 (CDT) Received: from [10.0.2.93] ([unknown] [76.210.64.28]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M1100LDOV4BSO10@smtpauth3.wiscmail.wisc.edu>; Sat, 17 Mar 2012 17:14:36 -0500 (CDT) Date: Sat, 17 Mar 2012 17:14:34 -0500 From: Nathan Whitehorn In-reply-to: <201203172204.q2HM4xBH088986@svn.freebsd.org> To: Alan Cox Message-id: X-Mailer: Apple Mail (2.936) X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.64.28 X-Spam-PmxInfo: Server=avs-16, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.17.220315, SenderIP=76.210.64.28 References: <201203172204.q2HM4xBH088986@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233097 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 22:14:44 -0000 On Mar 17, 2012, at 5:04 PM, Alan Cox wrote: > Author: alc > Date: Sat Mar 17 22:04:58 2012 > New Revision: 233097 > URL: http://svn.freebsd.org/changeset/base/233097 > > Log: > With the changes over the past year to how accesses to the page's > dirty > field are synchronized, there is no need for pmap_protect() to > acquire > the page queues lock unless it is going to access the pv lists. > > Reviewed by: kib Under what circumstances does the page queue lock actually have to be held? It looks like from this that I can remove the page queue lock from the PPC/AIM pmap_protect() completely, but I don't have a good sense of it. -Nathan From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 22:29:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBB3C106566C; Sat, 17 Mar 2012 22:29:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D134F8FC19; Sat, 17 Mar 2012 22:29:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HMT50i089826; Sat, 17 Mar 2012 22:29:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HMT5Fp089819; Sat, 17 Mar 2012 22:29:05 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203172229.q2HMT5Fp089819@svn.freebsd.org> From: Dimitry Andric Date: Sat, 17 Mar 2012 22:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233099 - in stable/9: . gnu/usr.bin/cc/c++ gnu/usr.bin/cc/cc gnu/usr.bin/cc/cpp share/man/man5 share/mk sys/conf tools/build/options usr.bin/clang/clang X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 22:29:06 -0000 Author: dim Date: Sat Mar 17 22:29:05 2012 New Revision: 233099 URL: http://svn.freebsd.org/changeset/base/233099 Log: MFC 232322: Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp. Note this does *not* disable building and installing gcc, which will still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp. If you want to disable gcc completely, you must use WITHOUT_GCC. MFC 232323: Regenerate src.conf(5) after r232322. MFC 232477: In r232322, I forgot one case where a check for MK_CLANG_IS_CC was needed, in sys/conf/kern.pre.mk. Add it now. MFC 232522: Fix a thinko in r232322, where gcc (and its tools) are not built during the cross-tools stage, if CC=clang and WITH_CLANG_IS_CC is not set. This causes no 'cc' to be installed in the temporary cross-tools tree, making lint fall over later in the build, because it ignores ${CC} and attempts to run 'cc' anyway. To fix this, only skip building gcc during cross-tools, if WITHOUT_GCC is set, or if WITH_CLANG_IS_CC is set. Pointy hat to: dim Added: stable/9/gnu/usr.bin/cc/cpp/gcpp.1 - copied unchanged from r232322, head/gnu/usr.bin/cc/cpp/gcpp.1 stable/9/tools/build/options/WITH_CLANG_IS_CC - copied unchanged from r232322, head/tools/build/options/WITH_CLANG_IS_CC Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/gnu/usr.bin/cc/c++/Makefile stable/9/gnu/usr.bin/cc/cc/Makefile stable/9/gnu/usr.bin/cc/cpp/Makefile stable/9/share/man/man5/src.conf.5 stable/9/share/mk/bsd.own.mk stable/9/share/mk/bsd.sys.mk stable/9/sys/conf/kern.mk stable/9/sys/conf/kern.pre.mk stable/9/sys/conf/kmod.mk stable/9/usr.bin/clang/clang/Makefile Directory Properties: stable/9/share/man/ (props changed) stable/9/share/man/man5/ (props changed) stable/9/share/mk/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/clang/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Sat Mar 17 22:12:09 2012 (r233098) +++ stable/9/Makefile.inc1 Sat Mar 17 22:29:05 2012 (r233099) @@ -1103,6 +1103,10 @@ _aicasm= sys/modules/aic7xxx/aicasm _share= share/syscons/scrnmaps .endif +.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no" +_gcc_tools= gnu/usr.bin/cc/cc_tools +.endif + .if ${MK_KERBEROS} != "no" _kerberos5_tools= kerberos5/tools .endif @@ -1131,7 +1135,7 @@ build-tools: ${MAKE} DIRPRFX=${_tool}/ build-tools .endfor .for _tool in \ - gnu/usr.bin/cc/cc_tools \ + ${_gcc_tools} \ ${_kerberos5_tools} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool}; \ @@ -1161,14 +1165,12 @@ _kgzip= usr.sbin/kgzip _binutils= gnu/usr.bin/binutils .endif -.if ${MK_CLANG} != "no" -.if ${CC:T:Mclang} == "clang" +.if ${MK_CLANG} != "no" && (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") _clang= usr.bin/clang _clang_libs= lib/clang .endif -.endif -.if ${MK_GCC} != "no" +.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no" _cc= gnu/usr.bin/cc .endif Modified: stable/9/gnu/usr.bin/cc/c++/Makefile ============================================================================== --- stable/9/gnu/usr.bin/cc/c++/Makefile Sat Mar 17 22:12:09 2012 (r233098) +++ stable/9/gnu/usr.bin/cc/c++/Makefile Sat Mar 17 22:29:05 2012 (r233099) @@ -1,14 +1,18 @@ # $FreeBSD$ +.include + .include "../Makefile.inc" .include "../Makefile.fe" .PATH: ${GCCDIR}/cp -PROG= c++ +PROG= g++ SRCS+= g++spec.c -LINKS= ${BINDIR}/c++ ${BINDIR}/g++ -LINKS+= ${BINDIR}/c++ ${BINDIR}/CC +.if ${MK_CLANG_IS_CC} == "no" +LINKS= ${BINDIR}/g++ ${BINDIR}/c++ +LINKS+= ${BINDIR}/g++ ${BINDIR}/CC +.endif NO_MAN= DPADD= ${LIBCPP} ${LIBIBERTY} Modified: stable/9/gnu/usr.bin/cc/cc/Makefile ============================================================================== --- stable/9/gnu/usr.bin/cc/cc/Makefile Sat Mar 17 22:12:09 2012 (r233098) +++ stable/9/gnu/usr.bin/cc/cc/Makefile Sat Mar 17 22:29:05 2012 (r233099) @@ -1,15 +1,20 @@ # $FreeBSD$ +.include + .include "../Makefile.inc" .include "../Makefile.fe" -PROG= cc +PROG= gcc MAN= gcc.1 SRCS+= gccspec.c NO_SHARED?=yes -LINKS= ${BINDIR}/cc ${BINDIR}/gcc -MLINKS= gcc.1 cc.1 gcc.1 c++.1 gcc.1 g++.1 gcc.1 CC.1 +MLINKS= gcc.1 g++.1 +.if ${MK_CLANG_IS_CC} == "no" +LINKS= ${BINDIR}/gcc ${BINDIR}/cc +MLINKS+= gcc.1 cc.1 gcc.1 c++.1 gcc.1 CC.1 +.endif .include Modified: stable/9/gnu/usr.bin/cc/cpp/Makefile ============================================================================== --- stable/9/gnu/usr.bin/cc/cpp/Makefile Sat Mar 17 22:12:09 2012 (r233098) +++ stable/9/gnu/usr.bin/cc/cpp/Makefile Sat Mar 17 22:29:05 2012 (r233099) @@ -1,10 +1,16 @@ # $FreeBSD$ +.include .include "../Makefile.inc" .include "../Makefile.fe" -PROG= cpp +PROG= gcpp SRCS+= cppspec.c +.if ${MK_CLANG_IS_CC} == "no" +LINKS= ${BINDIR}/gcpp ${BINDIR}/cpp +MLINKS= gcpp.1 cpp.1 +.endif + .include Copied: stable/9/gnu/usr.bin/cc/cpp/gcpp.1 (from r232322, head/gnu/usr.bin/cc/cpp/gcpp.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/gnu/usr.bin/cc/cpp/gcpp.1 Sat Mar 17 22:29:05 2012 (r233099, copy of r232322, head/gnu/usr.bin/cc/cpp/gcpp.1) @@ -0,0 +1,929 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "CPP 1" +.TH CPP 1 "2007-07-19" "gcc-4.2.1" "GNU" +.SH "NAME" +cpp \- The C Preprocessor +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +cpp [\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR] + [\fB\-I\fR\fIdir\fR...] [\fB\-iquote\fR\fIdir\fR...] + [\fB\-W\fR\fIwarn\fR...] + [\fB\-M\fR|\fB\-MM\fR] [\fB\-MG\fR] [\fB\-MF\fR \fIfilename\fR] + [\fB\-MP\fR] [\fB\-MQ\fR \fItarget\fR...] + [\fB\-MT\fR \fItarget\fR...] + [\fB\-P\fR] [\fB\-fno\-working\-directory\fR] + [\fB\-x\fR \fIlanguage\fR] [\fB\-std=\fR\fIstandard\fR] + \fIinfile\fR \fIoutfile\fR +.PP +Only the most useful options are listed here; see below for the remainder. +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +The C preprocessor, often known as \fIcpp\fR, is a \fImacro processor\fR +that is used automatically by the C compiler to transform your program +before compilation. It is called a macro processor because it allows +you to define \fImacros\fR, which are brief abbreviations for longer +constructs. +.PP +The C preprocessor is intended to be used only with C and \*(C+ source +code. In the past, it has been abused as a general text processor. It +will choke on input which does not obey C's lexical rules. For +example, apostrophes will be interpreted as the beginning of character +constants, and cause errors. Also, you cannot rely on it preserving +characteristics of the input which are not significant to C\-family +languages. If a Makefile is preprocessed, all the hard tabs will be +removed, and the Makefile will not work. +.PP +Having said that, you can often get away with using cpp on things which +are not C. Other Algol-ish programming languages are often safe +(Pascal, Ada, etc.) So is assembly, with caution. \fB\-traditional\-cpp\fR +mode preserves more white space, and is otherwise more permissive. Many +of the problems can be avoided by writing C or \*(C+ style comments +instead of native language comments, and keeping macros simple. +.PP +Wherever possible, you should use a preprocessor geared to the language +you are writing in. Modern versions of the \s-1GNU\s0 assembler have macro +facilities. Most high level programming languages have their own +conditional compilation and inclusion mechanism. If all else fails, +try a true general text processor, such as \s-1GNU\s0 M4. +.PP +C preprocessors vary in some details. This manual discusses the \s-1GNU\s0 C +preprocessor, which provides a small superset of the features of \s-1ISO\s0 +Standard C. In its default mode, the \s-1GNU\s0 C preprocessor does not do a +few things required by the standard. These are features which are +rarely, if ever, used, and may cause surprising changes to the meaning +of a program which does not expect them. To get strict \s-1ISO\s0 Standard C, +you should use the \fB\-std=c89\fR or \fB\-std=c99\fR options, depending +on which version of the standard you want. To get all the mandatory +diagnostics, you must also use \fB\-pedantic\fR. +.PP +This manual describes the behavior of the \s-1ISO\s0 preprocessor. To +minimize gratuitous differences, where the \s-1ISO\s0 preprocessor's +behavior does not conflict with traditional semantics, the +traditional preprocessor should behave the same way. The various +differences that do exist are detailed in the section \fBTraditional +Mode\fR. +.PP +For clarity, unless noted otherwise, references to \fB\s-1CPP\s0\fR in this +manual refer to \s-1GNU\s0 \s-1CPP\s0. +.SH "OPTIONS" +.IX Header "OPTIONS" +The C preprocessor expects two file names as arguments, \fIinfile\fR and +\&\fIoutfile\fR. The preprocessor reads \fIinfile\fR together with any +other files it specifies with \fB#include\fR. All the output generated +by the combined input files is written in \fIoutfile\fR. +.PP +Either \fIinfile\fR or \fIoutfile\fR may be \fB\-\fR, which as +\&\fIinfile\fR means to read from standard input and as \fIoutfile\fR +means to write to standard output. Also, if either file is omitted, it +means the same as if \fB\-\fR had been specified for that file. +.PP +Unless otherwise noted, or the option ends in \fB=\fR, all options +which take an argument may have that argument appear either immediately +after the option, or with a space between option and argument: +\&\fB\-Ifoo\fR and \fB\-I foo\fR have the same effect. +.PP +Many options have multi-letter names; therefore multiple single-letter +options may \fInot\fR be grouped: \fB\-dM\fR is very different from +\&\fB\-d\ \-M\fR. +.IP "\fB\-D\fR \fIname\fR" 4 +.IX Item "-D name" +Predefine \fIname\fR as a macro, with definition \f(CW1\fR. +.IP "\fB\-D\fR \fIname\fR\fB=\fR\fIdefinition\fR" 4 +.IX Item "-D name=definition" +The contents of \fIdefinition\fR are tokenized and processed as if +they appeared during translation phase three in a \fB#define\fR +directive. In particular, the definition will be truncated by +embedded newline characters. +.Sp +If you are invoking the preprocessor from a shell or shell-like +program you may need to use the shell's quoting syntax to protect +characters such as spaces that have a meaning in the shell syntax. +.Sp +If you wish to define a function-like macro on the command line, write +its argument list with surrounding parentheses before the equals sign +(if any). Parentheses are meaningful to most shells, so you will need +to quote the option. With \fBsh\fR and \fBcsh\fR, +\&\fB\-D'\fR\fIname\fR\fB(\fR\fIargs...\fR\fB)=\fR\fIdefinition\fR\fB'\fR works. +.Sp +\&\fB\-D\fR and \fB\-U\fR options are processed in the order they +are given on the command line. All \fB\-imacros\fR \fIfile\fR and +\&\fB\-include\fR \fIfile\fR options are processed after all +\&\fB\-D\fR and \fB\-U\fR options. +.IP "\fB\-U\fR \fIname\fR" 4 +.IX Item "-U name" +Cancel any previous definition of \fIname\fR, either built in or +provided with a \fB\-D\fR option. +.IP "\fB\-undef\fR" 4 +.IX Item "-undef" +Do not predefine any system-specific or GCC-specific macros. The +standard predefined macros remain defined. +.IP "\fB\-I\fR \fIdir\fR" 4 +.IX Item "-I dir" +Add the directory \fIdir\fR to the list of directories to be searched +for header files. +.Sp +Directories named by \fB\-I\fR are searched before the standard +system include directories. If the directory \fIdir\fR is a standard +system include directory, the option is ignored to ensure that the +default search order for system directories and the special treatment +of system headers are not defeated +\&. +.IP "\fB\-o\fR \fIfile\fR" 4 +.IX Item "-o file" +Write output to \fIfile\fR. This is the same as specifying \fIfile\fR +as the second non-option argument to \fBcpp\fR. \fBgcc\fR has a +different interpretation of a second non-option argument, so you must +use \fB\-o\fR to specify the output file. +.IP "\fB\-Wall\fR" 4 +.IX Item "-Wall" +Turns on all optional warnings which are desirable for normal code. +At present this is \fB\-Wcomment\fR, \fB\-Wtrigraphs\fR, +\&\fB\-Wmultichar\fR and a warning about integer promotion causing a +change of sign in \f(CW\*(C`#if\*(C'\fR expressions. Note that many of the +preprocessor's warnings are on by default and have no options to +control them. +.IP "\fB\-Wcomment\fR" 4 +.IX Item "-Wcomment" +.PD 0 +.IP "\fB\-Wcomments\fR" 4 +.IX Item "-Wcomments" +.PD +Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR +comment, or whenever a backslash-newline appears in a \fB//\fR comment. +(Both forms have the same effect.) +.IP "\fB\-Wtrigraphs\fR" 4 +.IX Item "-Wtrigraphs" +Most trigraphs in comments cannot affect the meaning of the program. +However, a trigraph that would form an escaped newline (\fB??/\fR at +the end of a line) can, by changing where the comment begins or ends. +Therefore, only trigraphs that would form escaped newlines produce +warnings inside a comment. +.Sp +This option is implied by \fB\-Wall\fR. If \fB\-Wall\fR is not +given, this option is still enabled unless trigraphs are enabled. To +get trigraph conversion without warnings, but get the other +\&\fB\-Wall\fR warnings, use \fB\-trigraphs \-Wall \-Wno\-trigraphs\fR. +.IP "\fB\-Wtraditional\fR" 4 +.IX Item "-Wtraditional" +Warn about certain constructs that behave differently in traditional and +\&\s-1ISO\s0 C. Also warn about \s-1ISO\s0 C constructs that have no traditional C +equivalent, and problematic constructs which should be avoided. +.IP "\fB\-Wimport\fR" 4 +.IX Item "-Wimport" +Warn the first time \fB#import\fR is used. +.IP "\fB\-Wundef\fR" 4 +.IX Item "-Wundef" +Warn whenever an identifier which is not a macro is encountered in an +\&\fB#if\fR directive, outside of \fBdefined\fR. Such identifiers are +replaced with zero. +.IP "\fB\-Wunused\-macros\fR" 4 +.IX Item "-Wunused-macros" +Warn about macros defined in the main file that are unused. A macro +is \fIused\fR if it is expanded or tested for existence at least once. +The preprocessor will also warn if the macro has not been used at the +time it is redefined or undefined. +.Sp +Built-in macros, macros defined on the command line, and macros +defined in include files are not warned about. +.Sp +\&\fINote:\fR If a macro is actually used, but only used in skipped +conditional blocks, then \s-1CPP\s0 will report it as unused. To avoid the +warning in such a case, you might improve the scope of the macro's +definition by, for example, moving it into the first skipped block. +Alternatively, you could provide a dummy use with something like: +.Sp +.Vb 2 +\& #if defined the_macro_causing_the_warning +\& #endif +.Ve +.IP "\fB\-Wendif\-labels\fR" 4 +.IX Item "-Wendif-labels" +Warn whenever an \fB#else\fR or an \fB#endif\fR are followed by text. +This usually happens in code of the form +.Sp +.Vb 5 +\& #if FOO +\& ... +\& #else FOO +\& ... +\& #endif FOO +.Ve +.Sp +The second and third \f(CW\*(C`FOO\*(C'\fR should be in comments, but often are not +in older programs. This warning is on by default. +.IP "\fB\-Werror\fR" 4 +.IX Item "-Werror" +Make all warnings into hard errors. Source code which triggers warnings +will be rejected. +.IP "\fB\-Wsystem\-headers\fR" 4 +.IX Item "-Wsystem-headers" +Issue warnings for code in system headers. These are normally unhelpful +in finding bugs in your own code, therefore suppressed. If you are +responsible for the system library, you may want to see them. +.IP "\fB\-w\fR" 4 +.IX Item "-w" +Suppress all warnings, including those which \s-1GNU\s0 \s-1CPP\s0 issues by default. +.IP "\fB\-pedantic\fR" 4 +.IX Item "-pedantic" +Issue all the mandatory diagnostics listed in the C standard. Some of +them are left out by default, since they trigger frequently on harmless +code. +.IP "\fB\-pedantic\-errors\fR" 4 +.IX Item "-pedantic-errors" +Issue all the mandatory diagnostics, and make all mandatory diagnostics +into errors. This includes mandatory diagnostics that \s-1GCC\s0 issues +without \fB\-pedantic\fR but treats as warnings. +.IP "\fB\-M\fR" 4 +.IX Item "-M" +Instead of outputting the result of preprocessing, output a rule +suitable for \fBmake\fR describing the dependencies of the main +source file. The preprocessor outputs one \fBmake\fR rule containing +the object file name for that source file, a colon, and the names of all +the included files, including those coming from \fB\-include\fR or +\&\fB\-imacros\fR command line options. +.Sp +Unless specified explicitly (with \fB\-MT\fR or \fB\-MQ\fR), the +object file name consists of the basename of the source file with any +suffix replaced with object file suffix. If there are many included +files then the rule is split into several lines using \fB\e\fR\-newline. +The rule has no commands. +.Sp +This option does not suppress the preprocessor's debug output, such as +\&\fB\-dM\fR. To avoid mixing such debug output with the dependency +rules you should explicitly specify the dependency output file with +\&\fB\-MF\fR, or use an environment variable like +\&\fB\s-1DEPENDENCIES_OUTPUT\s0\fR. Debug output +will still be sent to the regular output stream as normal. +.Sp +Passing \fB\-M\fR to the driver implies \fB\-E\fR, and suppresses +warnings with an implicit \fB\-w\fR. +.IP "\fB\-MM\fR" 4 +.IX Item "-MM" +Like \fB\-M\fR but do not mention header files that are found in +system header directories, nor header files that are included, +directly or indirectly, from such a header. +.Sp +This implies that the choice of angle brackets or double quotes in an +\&\fB#include\fR directive does not in itself determine whether that +header will appear in \fB\-MM\fR dependency output. This is a +slight change in semantics from \s-1GCC\s0 versions 3.0 and earlier. +.IP "\fB\-MF\fR \fIfile\fR" 4 +.IX Item "-MF file" +When used with \fB\-M\fR or \fB\-MM\fR, specifies a +file to write the dependencies to. If no \fB\-MF\fR switch is given +the preprocessor sends the rules to the same place it would have sent +preprocessed output. +.Sp +When used with the driver options \fB\-MD\fR or \fB\-MMD\fR, +\&\fB\-MF\fR overrides the default dependency output file. +.IP "\fB\-MG\fR" 4 +.IX Item "-MG" +In conjunction with an option such as \fB\-M\fR requesting +dependency generation, \fB\-MG\fR assumes missing header files are +generated files and adds them to the dependency list without raising +an error. The dependency filename is taken directly from the +\&\f(CW\*(C`#include\*(C'\fR directive without prepending any path. \fB\-MG\fR +also suppresses preprocessed output, as a missing header file renders +this useless. +.Sp +This feature is used in automatic updating of makefiles. +.IP "\fB\-MP\fR" 4 +.IX Item "-MP" +This option instructs \s-1CPP\s0 to add a phony target for each dependency +other than the main file, causing each to depend on nothing. These +dummy rules work around errors \fBmake\fR gives if you remove header +files without updating the \fIMakefile\fR to match. +.Sp +This is typical output: +.Sp +.Vb 1 +\& test.o: test.c test.h +.Ve +.Sp +.Vb 1 +\& test.h: +.Ve +.IP "\fB\-MT\fR \fItarget\fR" 4 +.IX Item "-MT target" +Change the target of the rule emitted by dependency generation. By +default \s-1CPP\s0 takes the name of the main input file, including any path, +deletes any file suffix such as \fB.c\fR, and appends the platform's +usual object suffix. The result is the target. +.Sp +An \fB\-MT\fR option will set the target to be exactly the string you +specify. If you want multiple targets, you can specify them as a single +argument to \fB\-MT\fR, or use multiple \fB\-MT\fR options. +.Sp +For example, \fB\-MT\ '$(objpfx)foo.o'\fR might give +.Sp +.Vb 1 +\& $(objpfx)foo.o: foo.c +.Ve +.IP "\fB\-MQ\fR \fItarget\fR" 4 +.IX Item "-MQ target" +Same as \fB\-MT\fR, but it quotes any characters which are special to +Make. \fB\-MQ\ '$(objpfx)foo.o'\fR gives +.Sp +.Vb 1 +\& $$(objpfx)foo.o: foo.c +.Ve +.Sp +The default target is automatically quoted, as if it were given with +\&\fB\-MQ\fR. +.IP "\fB\-MD\fR" 4 +.IX Item "-MD" +\&\fB\-MD\fR is equivalent to \fB\-M \-MF\fR \fIfile\fR, except that +\&\fB\-E\fR is not implied. The driver determines \fIfile\fR based on +whether an \fB\-o\fR option is given. If it is, the driver uses its +argument but with a suffix of \fI.d\fR, otherwise it take the +basename of the input file and applies a \fI.d\fR suffix. +.Sp +If \fB\-MD\fR is used in conjunction with \fB\-E\fR, any +\&\fB\-o\fR switch is understood to specify the dependency output file, but if used without \fB\-E\fR, each \fB\-o\fR +is understood to specify a target object file. +.Sp +Since \fB\-E\fR is not implied, \fB\-MD\fR can be used to generate +a dependency output file as a side-effect of the compilation process. +.IP "\fB\-MMD\fR" 4 +.IX Item "-MMD" +Like \fB\-MD\fR except mention only user header files, not system +header files. +.IP "\fB\-x c\fR" 4 +.IX Item "-x c" +.PD 0 +.IP "\fB\-x c++\fR" 4 +.IX Item "-x c++" +.IP "\fB\-x assembler-with-cpp\fR" 4 +.IX Item "-x assembler-with-cpp" +.PD +Specify the source language: C, \*(C+, or assembly. This has nothing +to do with standards conformance or extensions; it merely selects which +base syntax to expect. If you give none of these options, cpp will +deduce the language from the extension of the source file: \&\fB.c\fR, +\fB.cc\fR, or \fB.S\fR. Some other common extensions for \*(C+ and +assembly are also recognized. If cpp does not recognize the extension, +it will treat the file as C; this is the most generic mode. +.Sp +\&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option +which selected both the language and the standards conformance level. +This option has been removed, because it conflicts with the \fB\-l\fR +option. +.IP "\fB\-std=\fR\fIstandard\fR" 4 +.IX Item "-std=standard" +.PD 0 +.IP "\fB\-ansi\fR" 4 +.IX Item "-ansi" +.PD +Specify the standard to which the code should conform. Currently \s-1CPP\s0 +knows about C and \*(C+ standards; others may be added in the future. +.Sp +\&\fIstandard\fR +may be one of: +.RS 4 +.ie n .IP """iso9899:1990""" 4 +.el .IP "\f(CWiso9899:1990\fR" 4 +.IX Item "iso9899:1990" +.PD 0 +.ie n .IP """c89""" 4 +.el .IP "\f(CWc89\fR" 4 +.IX Item "c89" +.PD +The \s-1ISO\s0 C standard from 1990. \fBc89\fR is the customary shorthand for +this version of the standard. +.Sp +The \fB\-ansi\fR option is equivalent to \fB\-std=c89\fR. +.ie n .IP """iso9899:199409""" 4 +.el .IP "\f(CWiso9899:199409\fR" 4 +.IX Item "iso9899:199409" +The 1990 C standard, as amended in 1994. +.ie n .IP """iso9899:1999""" 4 +.el .IP "\f(CWiso9899:1999\fR" 4 +.IX Item "iso9899:1999" +.PD 0 +.ie n .IP """c99""" 4 +.el .IP "\f(CWc99\fR" 4 +.IX Item "c99" +.ie n .IP """iso9899:199x""" 4 +.el .IP "\f(CWiso9899:199x\fR" 4 +.IX Item "iso9899:199x" +.ie n .IP """c9x""" 4 +.el .IP "\f(CWc9x\fR" 4 +.IX Item "c9x" +.PD +The revised \s-1ISO\s0 C standard, published in December 1999. Before +publication, this was known as C9X. +.ie n .IP """gnu89""" 4 +.el .IP "\f(CWgnu89\fR" 4 +.IX Item "gnu89" +The 1990 C standard plus \s-1GNU\s0 extensions. This is the default. +.ie n .IP """gnu99""" 4 +.el .IP "\f(CWgnu99\fR" 4 +.IX Item "gnu99" +.PD 0 +.ie n .IP """gnu9x""" 4 +.el .IP "\f(CWgnu9x\fR" 4 +.IX Item "gnu9x" +.PD +The 1999 C standard plus \s-1GNU\s0 extensions. +.ie n .IP """c++98""" 4 +.el .IP "\f(CWc++98\fR" 4 +.IX Item "c++98" +The 1998 \s-1ISO\s0 \*(C+ standard plus amendments. +.ie n .IP """gnu++98""" 4 +.el .IP "\f(CWgnu++98\fR" 4 +.IX Item "gnu++98" +The same as \fB\-std=c++98\fR plus \s-1GNU\s0 extensions. This is the +default for \*(C+ code. +.RE +.RS 4 +.RE +.IP "\fB\-I\-\fR" 4 +.IX Item "-I-" +Split the include path. Any directories specified with \fB\-I\fR +options before \fB\-I\-\fR are searched only for headers requested with +\&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for +\&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR. If additional directories are +specified with \fB\-I\fR options after the \fB\-I\-\fR, those +directories are searched for all \fB#include\fR directives. +.Sp +In addition, \fB\-I\-\fR inhibits the use of the directory of the current +file directory as the first search directory for \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR. +.Sp +This option has been deprecated. +.IP "\fB\-nostdinc\fR" 4 +.IX Item "-nostdinc" +Do not search the standard system directories for header files. +Only the directories you have specified with \fB\-I\fR options +(and the directory of the current file, if appropriate) are searched. +.IP "\fB\-nostdinc++\fR" 4 +.IX Item "-nostdinc++" +Do not search for header files in the \*(C+\-specific standard directories, +but do still search the other standard directories. (This option is +used when building the \*(C+ library.) +.IP "\fB\-include\fR \fIfile\fR" 4 +.IX Item "-include file" +Process \fIfile\fR as if \f(CW\*(C`#include "file"\*(C'\fR appeared as the first +line of the primary source file. However, the first directory searched +for \fIfile\fR is the preprocessor's working directory \fIinstead of\fR +the directory containing the main source file. If not found there, it +is searched for in the remainder of the \f(CW\*(C`#include "..."\*(C'\fR search +chain as normal. +.Sp +If multiple \fB\-include\fR options are given, the files are included +in the order they appear on the command line. +.IP "\fB\-imacros\fR \fIfile\fR" 4 +.IX Item "-imacros file" +Exactly like \fB\-include\fR, except that any output produced by +scanning \fIfile\fR is thrown away. Macros it defines remain defined. +This allows you to acquire all the macros from a header without also +processing its declarations. +.Sp +All files specified by \fB\-imacros\fR are processed before all files +specified by \fB\-include\fR. +.IP "\fB\-idirafter\fR \fIdir\fR" 4 +.IX Item "-idirafter dir" +Search \fIdir\fR for header files, but do it \fIafter\fR all +directories specified with \fB\-I\fR and the standard system directories +have been exhausted. \fIdir\fR is treated as a system include directory. +.IP "\fB\-iprefix\fR \fIprefix\fR" 4 +.IX Item "-iprefix prefix" +Specify \fIprefix\fR as the prefix for subsequent \fB\-iwithprefix\fR +options. If the prefix represents a directory, you should include the +final \fB/\fR. +.IP "\fB\-iwithprefix\fR \fIdir\fR" 4 +.IX Item "-iwithprefix dir" +.PD 0 +.IP "\fB\-iwithprefixbefore\fR \fIdir\fR" 4 +.IX Item "-iwithprefixbefore dir" +.PD +Append \fIdir\fR to the prefix specified previously with +\&\fB\-iprefix\fR, and add the resulting directory to the include search +path. \fB\-iwithprefixbefore\fR puts it in the same place \fB\-I\fR +would; \fB\-iwithprefix\fR puts it where \fB\-idirafter\fR would. +.IP "\fB\-isysroot\fR \fIdir\fR" 4 +.IX Item "-isysroot dir" +This option is like the \fB\-\-sysroot\fR option, but applies only to +header files. See the \fB\-\-sysroot\fR option for more information. +.IP "\fB\-imultilib\fR \fIdir\fR" 4 +.IX Item "-imultilib dir" +Use \fIdir\fR as a subdirectory of the directory containing +target-specific \*(C+ headers. +.IP "\fB\-isystem\fR \fIdir\fR" 4 +.IX Item "-isystem dir" +Search \fIdir\fR for header files, after all directories specified by +\&\fB\-I\fR but before the standard system directories. Mark it +as a system directory, so that it gets the same special treatment as +is applied to the standard system directories. +.IP "\fB\-iquote\fR \fIdir\fR" 4 +.IX Item "-iquote dir" +Search \fIdir\fR only for header files requested with +\&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for +\&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR, before all directories specified by +\&\fB\-I\fR and before the standard system directories. +.IP "\fB\-fdollars\-in\-identifiers\fR" 4 +.IX Item "-fdollars-in-identifiers" +Accept \fB$\fR in identifiers. +.IP "\fB\-fextended\-identifiers\fR" 4 +.IX Item "-fextended-identifiers" +Accept universal character names in identifiers. This option is +experimental; in a future version of \s-1GCC\s0, it will be enabled by +default for C99 and \*(C+. +.IP "\fB\-fpreprocessed\fR" 4 +.IX Item "-fpreprocessed" +Indicate to the preprocessor that the input file has already been +preprocessed. This suppresses things like macro expansion, trigraph +conversion, escaped newline splicing, and processing of most directives. +The preprocessor still recognizes and removes comments, so that you can +pass a file preprocessed with \fB\-C\fR to the compiler without +problems. In this mode the integrated preprocessor is little more than +a tokenizer for the front ends. +.Sp +\&\fB\-fpreprocessed\fR is implicit if the input file has one of the +extensions \fB.i\fR, \fB.ii\fR or \fB.mi\fR. These are the +extensions that \s-1GCC\s0 uses for preprocessed files created by +\&\fB\-save\-temps\fR. +.IP "\fB\-ftabstop=\fR\fIwidth\fR" 4 +.IX Item "-ftabstop=width" +Set the distance between tab stops. This helps the preprocessor report +correct column numbers in warnings or errors, even if tabs appear on the +line. If the value is less than 1 or greater than 100, the option is +ignored. The default is 8. +.IP "\fB\-fexec\-charset=\fR\fIcharset\fR" 4 +.IX Item "-fexec-charset=charset" +Set the execution character set, used for string and character +constants. The default is \s-1UTF\-8\s0. \fIcharset\fR can be any encoding +supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine. +.IP "\fB\-fwide\-exec\-charset=\fR\fIcharset\fR" 4 +.IX Item "-fwide-exec-charset=charset" +Set the wide execution character set, used for wide string and +character constants. The default is \s-1UTF\-32\s0 or \s-1UTF\-16\s0, whichever +corresponds to the width of \f(CW\*(C`wchar_t\*(C'\fR. As with +\&\fB\-fexec\-charset\fR, \fIcharset\fR can be any encoding supported +by the system's \f(CW\*(C`iconv\*(C'\fR library routine; however, you will have +problems with encodings that do not fit exactly in \f(CW\*(C`wchar_t\*(C'\fR. +.IP "\fB\-finput\-charset=\fR\fIcharset\fR" 4 +.IX Item "-finput-charset=charset" +Set the input character set, used for translation from the character +set of the input file to the source character set used by \s-1GCC\s0. If the +locale does not specify, or \s-1GCC\s0 cannot get this information from the +locale, the default is \s-1UTF\-8\s0. This can be overridden by either the locale +or this command line option. Currently the command line option takes +precedence if there's a conflict. \fIcharset\fR can be any encoding +supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine. +.IP "\fB\-fworking\-directory\fR" 4 +.IX Item "-fworking-directory" +Enable generation of linemarkers in the preprocessor output that will +let the compiler know the current working directory at the time of +preprocessing. When this option is enabled, the preprocessor will +emit, after the initial linemarker, a second linemarker with the +current working directory followed by two slashes. \s-1GCC\s0 will use this +directory, when it's present in the preprocessed input, as the +directory emitted as the current working directory in some debugging +information formats. This option is implicitly enabled if debugging +information is enabled, but this can be inhibited with the negated +form \fB\-fno\-working\-directory\fR. If the \fB\-P\fR flag is +present in the command line, this option has no effect, since no +\&\f(CW\*(C`#line\*(C'\fR directives are emitted whatsoever. +.IP "\fB\-fno\-show\-column\fR" 4 +.IX Item "-fno-show-column" +Do not print column numbers in diagnostics. This may be necessary if +diagnostics are being scanned by a program that does not understand the +column numbers, such as \fBdejagnu\fR. +.IP "\fB\-A\fR \fIpredicate\fR\fB=\fR\fIanswer\fR" 4 +.IX Item "-A predicate=answer" +Make an assertion with the predicate \fIpredicate\fR and answer +\&\fIanswer\fR. This form is preferred to the older form \fB\-A\fR +\&\fIpredicate\fR\fB(\fR\fIanswer\fR\fB)\fR, which is still supported, because +it does not use shell special characters. +.IP "\fB\-A \-\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4 +.IX Item "-A -predicate=answer" +Cancel an assertion with the predicate \fIpredicate\fR and answer +\&\fIanswer\fR. +.IP "\fB\-dCHARS\fR" 4 +.IX Item "-dCHARS" +\&\fI\s-1CHARS\s0\fR is a sequence of one or more of the following characters, +and must not be preceded by a space. Other characters are interpreted +by the compiler proper, or reserved for future versions of \s-1GCC\s0, and so +are silently ignored. If you specify characters whose behavior +conflicts, the result is undefined. +.RS 4 +.IP "\fBM\fR" 4 +.IX Item "M" +Instead of the normal output, generate a list of \fB#define\fR +directives for all the macros defined during the execution of the +preprocessor, including predefined macros. This gives you a way of +finding out what is predefined in your version of the preprocessor. +Assuming you have no file \fIfoo.h\fR, the command +.Sp +.Vb 1 +\& touch foo.h; cpp -dM foo.h +.Ve +.Sp +will show all the predefined macros. +.IP "\fBD\fR" 4 +.IX Item "D" +Like \fBM\fR except in two respects: it does \fInot\fR include the +predefined macros, and it outputs \fIboth\fR the \fB#define\fR +directives and the result of preprocessing. Both kinds of output go to +the standard output file. +.IP "\fBN\fR" 4 +.IX Item "N" +Like \fBD\fR, but emit only the macro names, not their expansions. +.IP "\fBI\fR" 4 +.IX Item "I" +Output \fB#include\fR directives in addition to the result of +preprocessing. +.RE +.RS 4 +.RE +.IP "\fB\-P\fR" 4 +.IX Item "-P" +Inhibit generation of linemarkers in the output from the preprocessor. +This might be useful when running the preprocessor on something that is +not C code, and will be sent to a program which might be confused by the +linemarkers. +.IP "\fB\-C\fR" 4 +.IX Item "-C" +Do not discard comments. All comments are passed through to the output +file, except for comments in processed directives, which are deleted +along with the directive. +.Sp +You should be prepared for side effects when using \fB\-C\fR; it +causes the preprocessor to treat comments as tokens in their own right. +For example, comments appearing at the start of what would be a +directive line have the effect of turning that line into an ordinary +source line, since the first token on the line is no longer a \fB#\fR. +.IP "\fB\-CC\fR" 4 +.IX Item "-CC" +Do not discard comments, including during macro expansion. This is +like \fB\-C\fR, except that comments contained within macros are +also passed through to the output file where the macro is expanded. +.Sp +In addition to the side-effects of the \fB\-C\fR option, the +\&\fB\-CC\fR option causes all \*(C+\-style comments inside a macro +to be converted to C\-style comments. This is to prevent later use +of that macro from inadvertently commenting out the remainder of +the source line. +.Sp +The \fB\-CC\fR option is generally used to support lint comments. +.IP "\fB\-traditional\-cpp\fR" 4 +.IX Item "-traditional-cpp" +Try to imitate the behavior of old-fashioned C preprocessors, as +opposed to \s-1ISO\s0 C preprocessors. +.IP "\fB\-trigraphs\fR" 4 +.IX Item "-trigraphs" +Process trigraph sequences. +.IP "\fB\-remap\fR" 4 +.IX Item "-remap" +Enable special code to work around file systems which only permit very +short file names, such as \s-1MS\-DOS\s0. +.IP "\fB\-\-help\fR" 4 +.IX Item "--help" +.PD 0 +.IP "\fB\-\-target\-help\fR" 4 +.IX Item "--target-help" +.PD +Print text describing all the command line options instead of +preprocessing anything. +.IP "\fB\-v\fR" 4 +.IX Item "-v" +Verbose mode. Print out \s-1GNU\s0 \s-1CPP\s0's version number at the beginning of +execution, and report the final form of the include path. +.IP "\fB\-H\fR" 4 +.IX Item "-H" +Print the name of each header file used, in addition to other normal +activities. Each name is indented to show how deep in the +\&\fB#include\fR stack it is. Precompiled header files are also +printed, even if they are found to be invalid; an invalid precompiled +header file is printed with \fB...x\fR and a valid one with \fB...!\fR . +.IP "\fB\-version\fR" 4 +.IX Item "-version" +.PD 0 +.IP "\fB\-\-version\fR" 4 +.IX Item "--version" +.PD +Print out \s-1GNU\s0 \s-1CPP\s0's version number. With one dash, proceed to +preprocess as normal. With two dashes, exit immediately. +.SH "ENVIRONMENT" +.IX Header "ENVIRONMENT" +This section describes the environment variables that affect how \s-1CPP\s0 +operates. You can use them to specify directories or prefixes to use +when searching for include files, or to control dependency output. +.PP +Note that you can also specify places to search using options such as +\&\fB\-I\fR, and control dependency output with options like +\&\fB\-M\fR. These take precedence over +environment variables, which in turn take precedence over the +configuration of \s-1GCC\s0. +.IP "\fB\s-1CPATH\s0\fR" 4 +.IX Item "CPATH" +.PD 0 +.IP "\fBC_INCLUDE_PATH\fR" 4 +.IX Item "C_INCLUDE_PATH" +.IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 +.IX Item "CPLUS_INCLUDE_PATH" +.PD +Each variable's value is a list of directories separated by a special +character, much like \fB\s-1PATH\s0\fR, in which to look for header files. +The special character, \f(CW\*(C`PATH_SEPARATOR\*(C'\fR, is target-dependent and +determined at \s-1GCC\s0 build time. For Microsoft Windows-based targets it is a +semicolon, and for almost all other targets it is a colon. +.Sp +\&\fB\s-1CPATH\s0\fR specifies a list of directories to be searched as if +specified with \fB\-I\fR, but after any paths given with \fB\-I\fR +options on the command line. This environment variable is used +regardless of which language is being preprocessed. +.Sp +The remaining environment variables apply only when preprocessing the +particular language indicated. Each specifies a list of directories +to be searched as if specified with \fB\-isystem\fR, but after any +paths given with \fB\-isystem\fR options on the command line. +.Sp +In all these variables, an empty element instructs the compiler to +search its current working directory. Empty elements can appear at the +beginning or end of a path. For instance, if the value of +\&\fB\s-1CPATH\s0\fR is \f(CW\*(C`:/special/include\*(C'\fR, that has the same +effect as \fB\-I.\ \-I/special/include\fR. +.IP "\fB\s-1DEPENDENCIES_OUTPUT\s0\fR" 4 +.IX Item "DEPENDENCIES_OUTPUT" +If this variable is set, its value specifies how to output +dependencies for Make based on the non-system header files processed +by the compiler. System header files are ignored in the dependency +output. +.Sp +The value of \fB\s-1DEPENDENCIES_OUTPUT\s0\fR can be just a file name, in +which case the Make rules are written to that file, guessing the target +name from the source file name. Or the value can have the form +\&\fIfile\fR\fB \fR\fItarget\fR, in which case the rules are written to +file \fIfile\fR using \fItarget\fR as the target name. +.Sp *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 22:38:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 0B52A106566B; Sat, 17 Mar 2012 22:38:55 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 85F0B14F54C; Sat, 17 Mar 2012 22:38:54 +0000 (UTC) Message-ID: <4F65127E.1090800@FreeBSD.org> Date: Sat, 17 Mar 2012 15:38:54 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:10.0.2) Gecko/20120218 Thunderbird/10.0.2 MIME-Version: 1.0 To: Hans Petter Selasky References: <201203171640.q2HGeGFf078705@svn.freebsd.org> In-Reply-To: <201203171640.q2HGeGFf078705@svn.freebsd.org> X-Enigmail-Version: 1.3.5 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233090 - head/usr.sbin/moused X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 22:38:55 -0000 On 03/17/2012 09:40, Hans Petter Selasky wrote: > Author: hselasky > Date: Sat Mar 17 16:40:15 2012 > New Revision: 233090 > URL: http://svn.freebsd.org/changeset/base/233090 > > Log: > The UMS module is now loaded by rules in /etc/devd/usb.conf which > are executed by devd. Remove duplicate kldload. Are the calls you removed hurting anything? Use of devd is not mandatory. Doug -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 22:53:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C466F1065675; Sat, 17 Mar 2012 22:53:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe09.c2i.net [212.247.155.2]) by mx1.freebsd.org (Postfix) with ESMTP id BFB208FC12; Sat, 17 Mar 2012 22:53:16 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe09.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 77696416; Sat, 17 Mar 2012 23:48:07 +0100 From: Hans Petter Selasky To: Doug Barton Date: Sat, 17 Mar 2012 23:46:29 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <201203171640.q2HGeGFf078705@svn.freebsd.org> <4F65127E.1090800@FreeBSD.org> In-Reply-To: <4F65127E.1090800@FreeBSD.org> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201203172346.30396.hselasky@c2i.net> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r233090 - head/usr.sbin/moused X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 22:53:17 -0000 On Saturday 17 March 2012 23:38:54 Doug Barton wrote: > On 03/17/2012 09:40, Hans Petter Selasky wrote: > > Author: hselasky > > Date: Sat Mar 17 16:40:15 2012 > > New Revision: 233090 > > URL: http://svn.freebsd.org/changeset/base/233090 > > > > Log: > > The UMS module is now loaded by rules in /etc/devd/usb.conf which > > are executed by devd. Remove duplicate kldload. > Hi, > Are the calls you removed hurting anything? Use of devd is not mandatory. You get some warnings in the console from kldload that the module already exists, because moused is now racing with devd to load ums. --HPS From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 23:00:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6BC18106566C; Sat, 17 Mar 2012 23:00:33 +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 55C838FC15; Sat, 17 Mar 2012 23:00:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HN0XLP090889; Sat, 17 Mar 2012 23:00:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HN0XpQ090881; Sat, 17 Mar 2012 23:00:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203172300.q2HN0XpQ090881@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Mar 2012 23:00: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: r233100 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 23:00:33 -0000 Author: kib Date: Sat Mar 17 23:00:32 2012 New Revision: 233100 URL: http://svn.freebsd.org/changeset/base/233100 Log: In vm_object_page_clean(), do not clean OBJ_MIGHTBEDIRTY object flag if the filesystem performed short write and we are skipping the page due to this. Propogate write error from the pager back to the callers of vm_pageout_flush(). Report the failure to write a page from the requested range as the FALSE return value from vm_object_page_clean(), and propagate it back to msync(2) to return EIO to usermode. While there, convert the clearobjflags variable in the vm_object_page_clean() and arguments of the helper functions to boolean. PR: kern/165927 Reviewed by: alc MFC after: 2 weeks Modified: head/sys/vm/vm_contig.c head/sys/vm/vm_map.c head/sys/vm/vm_mmap.c head/sys/vm/vm_object.c head/sys/vm/vm_object.h head/sys/vm/vm_pageout.c head/sys/vm/vm_pageout.h Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Sat Mar 17 22:29:05 2012 (r233099) +++ head/sys/vm/vm_contig.c Sat Mar 17 23:00:32 2012 (r233100) @@ -137,7 +137,8 @@ vm_contig_launder_page(vm_page_t m, vm_p object->type == OBJT_DEFAULT) { vm_page_unlock_queues(); m_tmp = m; - vm_pageout_flush(&m_tmp, 1, VM_PAGER_PUT_SYNC, 0, NULL); + vm_pageout_flush(&m_tmp, 1, VM_PAGER_PUT_SYNC, 0, + NULL, NULL); VM_OBJECT_UNLOCK(object); vm_page_lock_queues(); return (0); Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Mar 17 22:29:05 2012 (r233099) +++ head/sys/vm/vm_map.c Sat Mar 17 23:00:32 2012 (r233100) @@ -2591,6 +2591,7 @@ vm_map_sync( vm_object_t object; vm_ooffset_t offset; unsigned int last_timestamp; + boolean_t failed; vm_map_lock_read(map); VM_MAP_RANGE_CHECK(map, start, end); @@ -2620,6 +2621,7 @@ vm_map_sync( if (invalidate) pmap_remove(map->pmap, start, end); + failed = FALSE; /* * Make a second pass, cleaning/uncaching pages from the indicated @@ -2648,7 +2650,8 @@ vm_map_sync( vm_object_reference(object); last_timestamp = map->timestamp; vm_map_unlock_read(map); - vm_object_sync(object, offset, size, syncio, invalidate); + if (!vm_object_sync(object, offset, size, syncio, invalidate)) + failed = TRUE; start += size; vm_object_deallocate(object); vm_map_lock_read(map); @@ -2658,7 +2661,7 @@ vm_map_sync( } vm_map_unlock_read(map); - return (KERN_SUCCESS); + return (failed ? KERN_FAILURE : KERN_SUCCESS); } /* Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Mar 17 22:29:05 2012 (r233099) +++ head/sys/vm/vm_mmap.c Sat Mar 17 23:00:32 2012 (r233100) @@ -508,6 +508,8 @@ sys_msync(td, uap) return (EINVAL); /* Sun returns ENOMEM? */ case KERN_INVALID_ARGUMENT: return (EBUSY); + case KERN_FAILURE: + return (EIO); default: return (EINVAL); } Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sat Mar 17 22:29:05 2012 (r233099) +++ head/sys/vm/vm_object.c Sat Mar 17 23:00:32 2012 (r233100) @@ -101,9 +101,10 @@ SYSCTL_INT(_vm, OID_AUTO, old_msync, CTL "Use old (insecure) msync behavior"); static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, - int pagerflags, int flags, int *clearobjflags); + int pagerflags, int flags, boolean_t *clearobjflags, + boolean_t *eio); static boolean_t vm_object_page_remove_write(vm_page_t p, int flags, - int *clearobjflags); + boolean_t *clearobjflags); static void vm_object_qcollapse(vm_object_t object); static void vm_object_vndeallocate(vm_object_t object); @@ -775,7 +776,7 @@ vm_object_terminate(vm_object_t object) * page should be flushed, and FALSE otherwise. */ static boolean_t -vm_object_page_remove_write(vm_page_t p, int flags, int *clearobjflags) +vm_object_page_remove_write(vm_page_t p, int flags, boolean_t *clearobjflags) { /* @@ -784,7 +785,7 @@ vm_object_page_remove_write(vm_page_t p, * cleared in this case so we do not have to set them. */ if ((flags & OBJPC_NOSYNC) != 0 && (p->oflags & VPO_NOSYNC) != 0) { - *clearobjflags = 0; + *clearobjflags = FALSE; return (FALSE); } else { pmap_remove_write(p); @@ -806,21 +807,25 @@ vm_object_page_remove_write(vm_page_t p, * Odd semantics: if start == end, we clean everything. * * The object must be locked. + * + * Returns FALSE if some page from the range was not written, as + * reported by the pager, and TRUE otherwise. */ -void +boolean_t vm_object_page_clean(vm_object_t object, vm_ooffset_t start, vm_ooffset_t end, int flags) { vm_page_t np, p; vm_pindex_t pi, tend, tstart; - int clearobjflags, curgeneration, n, pagerflags; + int curgeneration, n, pagerflags; + boolean_t clearobjflags, eio, res; mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED); VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); KASSERT(object->type == OBJT_VNODE, ("Not a vnode object")); if ((object->flags & OBJ_MIGHTBEDIRTY) == 0 || object->resident_page_count == 0) - return; + return (TRUE); pagerflags = (flags & (OBJPC_SYNC | OBJPC_INVAL)) != 0 ? VM_PAGER_PUT_SYNC : VM_PAGER_CLUSTER_OK; @@ -829,6 +834,7 @@ vm_object_page_clean(vm_object_t object, tstart = OFF_TO_IDX(start); tend = (end == 0) ? object->size : OFF_TO_IDX(end + PAGE_MASK); clearobjflags = tstart == 0 && tend >= object->size; + res = TRUE; rescan: curgeneration = object->generation; @@ -845,7 +851,7 @@ rescan: if ((flags & OBJPC_SYNC) != 0) goto rescan; else - clearobjflags = 0; + clearobjflags = FALSE; } np = vm_page_find_least(object, pi); continue; @@ -854,12 +860,16 @@ rescan: continue; n = vm_object_page_collect_flush(object, p, pagerflags, - flags, &clearobjflags); + flags, &clearobjflags, &eio); + if (eio) { + res = FALSE; + clearobjflags = FALSE; + } if (object->generation != curgeneration) { if ((flags & OBJPC_SYNC) != 0) goto rescan; else - clearobjflags = 0; + clearobjflags = FALSE; } /* @@ -874,8 +884,10 @@ rescan: * behind, but there is not much we can do there if * filesystem refuses to write it. */ - if (n == 0) + if (n == 0) { n = 1; + clearobjflags = FALSE; + } np = vm_page_find_least(object, pi + n); } #if 0 @@ -884,11 +896,12 @@ rescan: if (clearobjflags) vm_object_clear_flag(object, OBJ_MIGHTBEDIRTY); + return (res); } static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int pagerflags, - int flags, int *clearobjflags) + int flags, boolean_t *clearobjflags, boolean_t *eio) { vm_page_t ma[vm_pageout_page_count], p_first, tp; int count, i, mreq, runlen; @@ -921,7 +934,7 @@ vm_object_page_collect_flush(vm_object_t for (tp = p_first, i = 0; i < count; tp = TAILQ_NEXT(tp, listq), i++) ma[i] = tp; - vm_pageout_flush(ma, count, pagerflags, mreq, &runlen); + vm_pageout_flush(ma, count, pagerflags, mreq, &runlen, eio); return (runlen); } @@ -939,17 +952,20 @@ vm_object_page_collect_flush(vm_object_t * Note: certain anonymous maps, such as MAP_NOSYNC maps, * may start out with a NULL object. */ -void +boolean_t vm_object_sync(vm_object_t object, vm_ooffset_t offset, vm_size_t size, boolean_t syncio, boolean_t invalidate) { vm_object_t backing_object; struct vnode *vp; struct mount *mp; - int flags, fsync_after; + int error, flags, fsync_after; + boolean_t res; if (object == NULL) - return; + return (TRUE); + res = TRUE; + error = 0; VM_OBJECT_LOCK(object); while ((backing_object = object->backing_object) != NULL) { VM_OBJECT_LOCK(backing_object); @@ -995,13 +1011,16 @@ vm_object_sync(vm_object_t object, vm_oo fsync_after = FALSE; } VM_OBJECT_LOCK(object); - vm_object_page_clean(object, offset, offset + size, flags); + res = vm_object_page_clean(object, offset, offset + size, + flags); VM_OBJECT_UNLOCK(object); if (fsync_after) - (void) VOP_FSYNC(vp, MNT_WAIT, curthread); + error = VOP_FSYNC(vp, MNT_WAIT, curthread); VOP_UNLOCK(vp, 0); VFS_UNLOCK_GIANT(vfslocked); vn_finished_write(mp); + if (error != 0) + res = FALSE; VM_OBJECT_LOCK(object); } if ((object->type == OBJT_VNODE || @@ -1021,6 +1040,7 @@ vm_object_sync(vm_object_t object, vm_oo OFF_TO_IDX(offset + size + PAGE_MASK), flags); } VM_OBJECT_UNLOCK(object); + return (res); } /* Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Sat Mar 17 22:29:05 2012 (r233099) +++ head/sys/vm/vm_object.h Sat Mar 17 23:00:32 2012 (r233100) @@ -227,7 +227,7 @@ void vm_object_set_writeable_dirty (vm_o void vm_object_init (void); void vm_object_page_cache(vm_object_t object, vm_pindex_t start, vm_pindex_t end); -void vm_object_page_clean(vm_object_t object, vm_ooffset_t start, +boolean_t vm_object_page_clean(vm_object_t object, vm_ooffset_t start, vm_ooffset_t end, int flags); void vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end, int options); @@ -238,7 +238,7 @@ void vm_object_reference_locked(vm_objec int vm_object_set_memattr(vm_object_t object, vm_memattr_t memattr); void vm_object_shadow (vm_object_t *, vm_ooffset_t *, vm_size_t); void vm_object_split(vm_map_entry_t); -void vm_object_sync(vm_object_t, vm_ooffset_t, vm_size_t, boolean_t, +boolean_t vm_object_sync(vm_object_t, vm_ooffset_t, vm_size_t, boolean_t, boolean_t); void vm_object_madvise (vm_object_t, vm_pindex_t, int, int); #endif /* _KERNEL */ Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Mar 17 22:29:05 2012 (r233099) +++ head/sys/vm/vm_pageout.c Sat Mar 17 23:00:32 2012 (r233100) @@ -445,7 +445,8 @@ more: /* * we allow reads during pageouts... */ - return (vm_pageout_flush(&mc[page_base], pageout_count, 0, 0, NULL)); + return (vm_pageout_flush(&mc[page_base], pageout_count, 0, 0, NULL, + NULL)); } /* @@ -459,9 +460,12 @@ more: * * Returned runlen is the count of pages between mreq and first * page after mreq with status VM_PAGER_AGAIN. + * *eio is set to TRUE if pager returned VM_PAGER_ERROR or VM_PAGER_FAIL + * for any page in runlen set. */ int -vm_pageout_flush(vm_page_t *mc, int count, int flags, int mreq, int *prunlen) +vm_pageout_flush(vm_page_t *mc, int count, int flags, int mreq, int *prunlen, + boolean_t *eio) { vm_object_t object = mc[0]->object; int pageout_status[count]; @@ -493,6 +497,8 @@ vm_pageout_flush(vm_page_t *mc, int coun vm_pager_put_pages(object, mc, count, flags, pageout_status); runlen = count - mreq; + if (eio != NULL) + *eio = FALSE; for (i = 0; i < count; i++) { vm_page_t mt = mc[i]; @@ -522,6 +528,8 @@ vm_pageout_flush(vm_page_t *mc, int coun vm_page_lock(mt); vm_page_activate(mt); vm_page_unlock(mt); + if (eio != NULL && i >= mreq && i - mreq < runlen) + *eio = TRUE; break; case VM_PAGER_AGAIN: if (i >= mreq && i - mreq < runlen) Modified: head/sys/vm/vm_pageout.h ============================================================================== --- head/sys/vm/vm_pageout.h Sat Mar 17 22:29:05 2012 (r233099) +++ head/sys/vm/vm_pageout.h Sat Mar 17 23:00:32 2012 (r233100) @@ -102,7 +102,7 @@ extern void vm_waitpfault(void); #ifdef _KERNEL boolean_t vm_pageout_fallback_object_lock(vm_page_t, vm_page_t *); -int vm_pageout_flush(vm_page_t *, int, int, int, int *); +int vm_pageout_flush(vm_page_t *, int, int, int, int *, boolean_t *); void vm_pageout_oom(int shortage); boolean_t vm_pageout_page_lock(vm_page_t, vm_page_t *); void vm_contig_grow_cache(int, vm_paddr_t, vm_paddr_t); From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 23:03:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C731E1065690; Sat, 17 Mar 2012 23:03:21 +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 15D3D8FC18; Sat, 17 Mar 2012 23:03:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HN3KjA091012; Sat, 17 Mar 2012 23:03:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HN3Kjo091009; Sat, 17 Mar 2012 23:03:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203172303.q2HN3Kjo091009@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Mar 2012 23:03: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: r233101 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 23:03:21 -0000 Author: kib Date: Sat Mar 17 23:03:20 2012 New Revision: 233101 URL: http://svn.freebsd.org/changeset/base/233101 Log: Add sysctl vfs.nfs.nfs_keep_dirty_on_error to switch the nfs client behaviour on error from write RPC back to behaviour of old nfs client. When set to not zero, the pages for which write failed are kept dirty. PR: kern/165927 Reviewed by: alc MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Sat Mar 17 23:00:32 2012 (r233100) +++ head/sys/fs/nfsclient/nfs_clbio.c Sat Mar 17 23:03:20 2012 (r233101) @@ -66,6 +66,7 @@ extern int ncl_numasync; extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON]; extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON]; extern int newnfs_directio_enable; +extern int nfs_keep_dirty_on_error; int ncl_pbuf_freecnt = -1; /* start out unlimited */ @@ -348,9 +349,11 @@ ncl_putpages(struct vop_putpages_args *a pmap_qremove(kva, npages); relpbuf(bp, &ncl_pbuf_freecnt); - vnode_pager_undirty_pages(pages, rtvals, count - uio.uio_resid); - if (must_commit) - ncl_clearcommit(vp->v_mount); + if (error == 0 || !nfs_keep_dirty_on_error) { + vnode_pager_undirty_pages(pages, rtvals, count - uio.uio_resid); + if (must_commit) + ncl_clearcommit(vp->v_mount); + } return rtvals[0]; } Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sat Mar 17 23:00:32 2012 (r233100) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sat Mar 17 23:03:20 2012 (r233101) @@ -241,6 +241,10 @@ int newnfs_directio_enable = 0; SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_directio_enable, CTLFLAG_RW, &newnfs_directio_enable, 0, "Enable NFS directio"); +int nfs_keep_dirty_on_error; +SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_keep_dirty_on_error, CTLFLAG_RW, + &nfs_keep_dirty_on_error, 0, "Retry pageout if error returned"); + /* * This sysctl allows other processes to mmap a file that has been opened * O_DIRECT by a process. In general, having processes mmap the file while From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 23:38:52 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7317C1065670; Sat, 17 Mar 2012 23:38:52 +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 20B768FC14; Sat, 17 Mar 2012 23:38:51 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id q2HNJn7Z025601; Sat, 17 Mar 2012 19:19:49 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.5/8.14.2/Submit) id q2HNJnUB025600; Sat, 17 Mar 2012 19:19:49 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Sat, 17 Mar 2012 19:19:49 -0400 From: David Schultz To: Martin Cracauer Message-ID: <20120317231949.GA25480@zim.MIT.EDU> Mail-Followup-To: Martin Cracauer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201202102216.q1AMGI0m098192@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201202102216.q1AMGI0m098192@svn.freebsd.org> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r231449 - head/usr.bin/tee X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 23:38:52 -0000 On Fri, Feb 10, 2012, Martin Cracauer wrote: > Author: cracauer > Date: Fri Feb 10 22:16:17 2012 > New Revision: 231449 > URL: http://svn.freebsd.org/changeset/base/231449 > > Log: > Fix bin/164947: tee looses data when writing to non-blocking file descriptors > > tee was not handling EAGAIN FWIW, I suspect that most programs are unprepared to deal with a non-blocking stdout. I don't think that's a bug on those programs. Back in the 4.X days, there was a bug in the user-level threading library that resulted in stdout being marked nonblocking occasionally, and indeed stuff broke: http://lists.freebsd.org/pipermail/freebsd-hackers/2005-January/009741.html From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 23:50:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88D881065670; Sat, 17 Mar 2012 23:50:00 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by mx1.freebsd.org (Postfix) with ESMTP id 557098FC08; Sat, 17 Mar 2012 23:50:00 +0000 (UTC) Received: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id DB231291E62; Sat, 17 Mar 2012 18:49:52 -0500 (CDT) Received: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id CF0E8297615; Sat, 17 Mar 2012 18:49:52 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh1.mail.rice.edu, auth channel Received: from mh1.mail.rice.edu ([127.0.0.1]) by mh1.mail.rice.edu (mh1.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id DRPBASXLP7LB; Sat, 17 Mar 2012 18:49:52 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id F21BF291DF5; Sat, 17 Mar 2012 18:49:51 -0500 (CDT) Message-ID: <4F65231F.1000101@rice.edu> Date: Sat, 17 Mar 2012 18:49:51 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111113 Thunderbird/8.0 MIME-Version: 1.0 To: Nathan Whitehorn References: <201203172204.q2HM4xBH088986@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alan Cox , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233097 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 23:50:00 -0000 On 03/17/2012 17:14, Nathan Whitehorn wrote: > > > On Mar 17, 2012, at 5:04 PM, Alan Cox wrote: > >> Author: alc >> Date: Sat Mar 17 22:04:58 2012 >> New Revision: 233097 >> URL: http://svn.freebsd.org/changeset/base/233097 >> >> Log: >> With the changes over the past year to how accesses to the page's dirty >> field are synchronized, there is no need for pmap_protect() to acquire >> the page queues lock unless it is going to access the pv lists. >> >> Reviewed by: kib > > Under what circumstances does the page queue lock actually have to be > held? You need it when you are manipulating the pvo_vlink lists. That said, we are at the point where the PPC/AIM pmap could define its own PVO list mutex and not (ab)use the page queues mutex for this purpose. Just do a straightforward, mechanical substitution, and you should be fine. > It looks like from this that I can remove the page queue lock from the > PPC/AIM pmap_protect() completely, but I don't have a good sense of it. Yes, you can this instant remove the acquisition and release of the page queues lock from this function. From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 23:53:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC53B106566B; Sat, 17 Mar 2012 23:53:43 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay020.isp.belgacom.be (mailrelay020.isp.belgacom.be [195.238.6.95]) by mx1.freebsd.org (Postfix) with ESMTP id DA9BA8FC08; Sat, 17 Mar 2012 23:53:42 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlcFAEQjZU9bsV9U/2dsb2JhbABCsziDCIEIggkBAQQBViMFCwsOCi45HgaIGAm5NJB8BIgjihMCApNWgmc Received: from 84.95-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.95.84]) by relay.skynet.be with ESMTP; 18 Mar 2012 00:52:33 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q2HNqVDg004754; Sun, 18 Mar 2012 00:52:32 +0100 (CET) (envelope-from tijl@freebsd.org) From: Tijl Coosemans To: Bruce Evans Date: Sun, 18 Mar 2012 00:52:23 +0100 User-Agent: KMail/1.13.7 (FreeBSD/10.0-CURRENT; KDE/4.7.3; i386; ; ) References: <201203161942.q2GJgdPU032060@svn.freebsd.org> <4F642A1A.4070006@freebsd.org> <20120317223612.D2494@besplex.bde.org> In-Reply-To: <20120317223612.D2494@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart12110572.yYjvuLxiXs"; protocol="application/pgp-signature"; micalg=pgp-sha256 Content-Transfer-Encoding: 7bit Message-Id: <201203180052.29167.tijl@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r233043 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 23:53:44 -0000 --nextPart12110572.yYjvuLxiXs Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Saturday 17 March 2012 12:48:17 Bruce Evans wrote: > On Fri, 16 Mar 2012, Julian Elischer wrote: >> On 3/16/12 12:42 PM, Tijl Coosemans wrote: >>> int32_t en_sw; /* status word (16bits) */ >> >> what's wrong with this picture? >=20 > Only the excessive indentation in the new version. There's only one tab in the uint16_t fields and style(9) says two tabs for the other fields is ok unless it affects at least 90% of the fields which isn't the case here. > The 16 in the comment is not mismatched with 32 in the code, but is > less needed that before, since it is more obvious that the code uses > 32 and it goes without saying that this would only be used if it is > correct. The comment says that although field has 32 bits in memory, > only 16 bits of it are used in the status word register. For fields > in this struct that use all of the bits in memory, no comment is made > about the number of bits in the register, and vice versa. I forget > if the padding bits in memory are read or written by the hardware. On > write, they might not be touched, or they might be filled with garbage, > or all zeros, or all 1's, or a "reserved" not-quite garbage value. > Probably closest the latter, with the actual bits being all 0 or all > 1. On read, they might be ignored or checked for garbage. I think > they are ignored for this file.d AMD documentation says the upper 16 bits are "reserved,ignored" which means their value is indeterminate, but the cpu doesn't care about them. --nextPart12110572.yYjvuLxiXs Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EABEIAAYFAk9lI7wACgkQfoCS2CCgtiuWtwD/dgrxDW/F7ESV3TybI1rpQjc4 RNqV8+0cgOke2BQRxccA/3XUIZHY7AiWTMk3c/lT2QMsj4PgKcdDP31WDNF6g7DZ =sc3k -----END PGP SIGNATURE----- --nextPart12110572.yYjvuLxiXs-- From owner-svn-src-all@FreeBSD.ORG Sat Mar 17 23:55:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A476106566C; Sat, 17 Mar 2012 23:55: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 34EE08FC08; Sat, 17 Mar 2012 23:55:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2HNtJEN092629; Sat, 17 Mar 2012 23:55:19 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2HNtJns092626; Sat, 17 Mar 2012 23:55:19 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203172355.q2HNtJns092626@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Mar 2012 23:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233102 - 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: Sat, 17 Mar 2012 23:55:19 -0000 Author: kib Date: Sat Mar 17 23:55:18 2012 New Revision: 233102 URL: http://svn.freebsd.org/changeset/base/233102 Log: Do not claim that msync(2) is obsoleted [1]. Document EIO from msync(2). Inspired by PR: docs/165929 [1] Reviewed by: jilles MFC after: 2 weeks Modified: head/lib/libc/sys/mmap.2 head/lib/libc/sys/msync.2 Modified: head/lib/libc/sys/mmap.2 ============================================================================== --- head/lib/libc/sys/mmap.2 Sat Mar 17 23:03:20 2012 (r233101) +++ head/lib/libc/sys/mmap.2 Sat Mar 17 23:55:18 2012 (r233102) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd August 28, 2010 +.Dd March 18, 2012 .Dt MMAP 2 .Os .Sh NAME @@ -205,7 +205,7 @@ command and system call generally do not flush dirty NOSYNC VM data. The .Xr msync 2 -system call is obsolete since +system call is usually not needed since .Bx implements a coherent file system buffer cache. However, it may be Modified: head/lib/libc/sys/msync.2 ============================================================================== --- head/lib/libc/sys/msync.2 Sat Mar 17 23:03:20 2012 (r233101) +++ head/lib/libc/sys/msync.2 Sat Mar 17 23:55:18 2012 (r233102) @@ -28,7 +28,7 @@ .\" @(#)msync.2 8.2 (Berkeley) 6/21/94 .\" $FreeBSD$ .\" -.Dd June 21, 1994 +.Dd March 18, 2012 .Dt MSYNC 2 .Os .Sh NAME @@ -98,6 +98,9 @@ The argument was both MS_ASYNC and MS_INVALIDATE. Only one of these flags is allowed. +.It Bq Er EIO + An error occurred while writing at least one of the pages in +the specified region. .El .Sh SEE ALSO .Xr madvise 2 , @@ -113,7 +116,7 @@ system call first appeared in .Sh BUGS The .Fn msync -system call is obsolete since +system call is usually not needed since .Bx implements a coherent file system buffer cache. However, it may be used to associate dirty VM pages with file system