From owner-svn-src-head@FreeBSD.ORG Sun May 17 00:55:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31A048DF; Sun, 17 May 2015 00:55:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F74C1A42; Sun, 17 May 2015 00:55:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4H0tiK5017039; Sun, 17 May 2015 00:55:44 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4H0tiJk017038; Sun, 17 May 2015 00:55:44 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201505170055.t4H0tiJk017038@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 17 May 2015 00:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283023 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 00:55:45 -0000 Author: allanjude (doc committer) Date: Sun May 17 00:55:44 2015 New Revision: 283023 URL: https://svnweb.freebsd.org/changeset/base/283023 Log: bsdinstall/zfsboot: Skip adding swap lines to /etc/fstab if swap is 0 sized Differential Revision: https://reviews.freebsd.org/D2571 Reviewed by: dim Approved by: eadler (mentor) Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Sat May 16 23:51:24 2015 (r283022) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Sun May 17 00:55:44 2015 (r283023) @@ -953,6 +953,8 @@ zfs_create_diskpart() esac # $ZFSBOOT_PARTITION_SCHEME # Update fstab(5) + local swapsize + f_expand_number "$ZFSBOOT_SWAP_SIZE" swapsize if [ "$isswapmirror" ]; then # This is not the first disk in the mirror, do nothing elif [ "$ZFSBOOT_SWAP_ENCRYPTION" -a "$ZFSBOOT_SWAP_MIRROR" ]; then @@ -972,6 +974,8 @@ zfs_create_diskpart() /dev/$disk${swappart}.eli none swap sw 0 0 \ $BSDINSTALL_TMPETC/fstab || return $FAILURE + elif [ ${swapsize:-0} -eq 0 ] + # If swap is 0 sized, don't add it to fstab else f_eval_catch $funcname printf "$PRINTF_FSTAB" \ /dev/$disk$swappart none swap sw 0 0 \ From owner-svn-src-head@FreeBSD.ORG Sun May 17 01:45:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AE2AD13; Sun, 17 May 2015 01:45:57 +0000 (UTC) Received: from mail-ie0-x22c.google.com (mail-ie0-x22c.google.com [IPv6:2607:f8b0:4001:c03::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 339DD1E62; Sun, 17 May 2015 01:45:57 +0000 (UTC) Received: by iesa3 with SMTP id a3so60682931ies.2; Sat, 16 May 2015 18:45:56 -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:message-id:subject :from:to:cc:content-type; bh=ZGHijN5NEBX4SyPhEgLOnbo7lTa1PfQrBfuK5ZzwWyo=; b=U5Dw6z4IY2HpDi/29JX+SvSAh5GORnuZq9jXWyHUg8+KMnkCl8BnTCf6W3BLEXMI84 qc+i+fqoKZFPWZImkw2gnsqdcovbQFSwUBliQUYxocqwyVhHy7WtBwylxTMW7mXQt490 Og2UdwtuswYAe1kqnFfLLj4iiW6UBbriv5bAK8oqxEThyAuPA5Kr+A0/1Zq1gmzZjg1V GS9OsIBt2SLukCf43YARyOTemGmcdY1W7y6L1z8DO4xE65QssYkf6O/O6iX1PPxp2h+q A5JZvWdDA9DVjcSLyRH0kF/i1ubgZ3p3sdu8lhTSVmhgyPF6q29+RhFVSyWbBvuCWG1E zMrg== MIME-Version: 1.0 X-Received: by 10.107.34.140 with SMTP id i134mr10469956ioi.88.1431827156401; Sat, 16 May 2015 18:45:56 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Sat, 16 May 2015 18:45:56 -0700 (PDT) In-Reply-To: <201505151825.t4FIPnxJ099637@svn.freebsd.org> References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> Date: Sat, 16 May 2015 18:45:56 -0700 X-Google-Sender-Auth: meYDkx8QayqDuEYBBYPYpiHLhJA Message-ID: Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm From: Adrian Chadd To: Zbigniew Bodek Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 01:45:57 -0000 Did you commit files with DOS newlines in them? :) tsk tsk tsk tsk tsk. I think should fix that.. -adrian From owner-svn-src-head@FreeBSD.ORG Sun May 17 03:50:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7FAD6FE; Sun, 17 May 2015 03:50:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BC931A98; Sun, 17 May 2015 03:50:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4H3oh1a002692; Sun, 17 May 2015 03:50:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4H3ohGA002691; Sun, 17 May 2015 03:50:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505170350.t4H3ohGA002691@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 17 May 2015 03:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283024 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 03:50:43 -0000 Author: markj Date: Sun May 17 03:50:42 2015 New Revision: 283024 URL: https://svnweb.freebsd.org/changeset/base/283024 Log: When in lazyload mode, write the DOF to a temporary file and rename it rather than writing directly to the output file. CID: 1147172 Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun May 17 00:55:44 2015 (r283023) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun May 17 03:50:42 2015 (r283024) @@ -1785,17 +1785,11 @@ dtrace_program_link(dtrace_hdl_t *dtp, d "failed to open %s: %s", file, strerror(errno))); } #else - if (dtp->dt_lazyload) { - if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, 0666)) < 0) - return (dt_link_error(dtp, NULL, -1, NULL, - "failed to open %s: %s", file, strerror(errno))); - } else { - snprintf(tfile, sizeof(tfile), "%s.XXXXXX", file); - if ((fd = mkstemp(tfile)) == -1) - return (dt_link_error(dtp, NULL, -1, NULL, - "failed to create temporary file %s: %s", - tfile, strerror(errno))); - } + snprintf(tfile, sizeof(tfile), "%s.XXXXXX", file); + if ((fd = mkostemp(tfile, O_CLOEXEC)) == -1) + return (dt_link_error(dtp, NULL, -1, NULL, + "failed to create temporary file %s: %s", + tfile, strerror(errno))); #endif /* @@ -1951,14 +1945,23 @@ dtrace_program_link(dtrace_hdl_t *dtp, d } #endif } else { +#ifdef __FreeBSD__ + if (rename(tfile, file) != 0) { + ret = dt_link_error(dtp, NULL, fd, NULL, + "failed to rename %s to %s: %s", tfile, file, + strerror(errno)); + goto done; + } +#endif (void) close(fd); } done: dtrace_dof_destroy(dtp, dof); -#ifndef illumos - unlink(tfile); +#ifdef illumos + if (!dtp->dt_lazyload) + (void) unlink(tfile); #endif return (ret); } From owner-svn-src-head@FreeBSD.ORG Sun May 17 03:59:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2A4A89D; Sun, 17 May 2015 03:59:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B033C1B81; Sun, 17 May 2015 03:59:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4H3x90S006156; Sun, 17 May 2015 03:59:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4H3x9uK006154; Sun, 17 May 2015 03:59:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505170359.t4H3x9uK006154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 17 May 2015 03:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283025 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 03:59:09 -0000 Author: markj Date: Sun May 17 03:59:08 2015 New Revision: 283025 URL: https://svnweb.freebsd.org/changeset/base/283025 Log: As dtrace(1) processes D libraries under /usr/lib/dtrace, the compiler may return an error if one of the depends_on directives in a library is not satisfied. In this case, libdtrace is supposed to ignore the library and carry on. However, the remainder of the library may still be buffered by the lexer, causing libdtrace to erroneously continue processing it on the next call to yyparse(). Fix this by explicitly flushing the input buffer each time the compiler state is reset. MFC after: 3 weeks Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Sun May 17 03:50:42 2015 (r283024) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Sun May 17 03:59:08 2015 (r283025) @@ -743,6 +743,7 @@ yyinit(dt_pcb_t *pcb) #ifdef illumos yysptr = yysbuf; #endif + YY_FLUSH_BUFFER; } /* From owner-svn-src-head@FreeBSD.ORG Sun May 17 04:04:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 225EBA4E; Sun, 17 May 2015 04:04:11 +0000 (UTC) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E49D01C41; Sun, 17 May 2015 04:04:10 +0000 (UTC) Received: by padbw4 with SMTP id bw4so93473443pad.0; Sat, 16 May 2015 21:04:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=6/tTjlPMpKM/7TvcXb6Ru5Y7tui8PPPsnVx2LS0aFy0=; b=sAvD5A61eDA9Q7+vcStNzfAz63JhfuP+KALlTNU4avT4v9mq6ZY3x7mR9mcHGg175a RXIdWfmUdu93N3iTPpYQz6Uc15j+Tw2c3UlDDR0W1obeinnvWM6/uVL4zcNKZJPxJPiU ITBtFGbjN6AD104p8BN1aZX98jc6vLdu+nfKElGMRfBPm1UV4SgRigh7hKSAVFrga1cd 73EFVsjCH7J+yxCeUD+raLynah3po6S2jaEocgGTzy5kYWzovQsByXRxkMSL3pmfWhY7 EYP2xTEZJhWoQa8DVLNIDFps9s7K1Ew8oRofsdgwiMzQqj1cbjdaUwkEXZ79RbtsTdLi 25Ag== X-Received: by 10.68.161.4 with SMTP id xo4mr32859342pbb.65.1431835450426; Sat, 16 May 2015 21:04:10 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:5dd1:12a1:1efc:759d? ([2601:8:ab80:7d6:5dd1:12a1:1efc:759d]) by mx.google.com with ESMTPSA id af1sm6093628pad.34.2015.05.16.21.04.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 16 May 2015 21:04:09 -0700 (PDT) References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> Cc: Zbigniew Bodek , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Mailer: iPhone Mail (12F70) From: Garrett Cooper Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm Date: Sat, 16 May 2015 21:04:07 -0700 To: Adrian Chadd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 04:04:11 -0000 > On May 16, 2015, at 18:45, Adrian Chadd wrote: > > Did you commit files with DOS newlines in them? :) > > tsk tsk tsk tsk tsk. I think should fix that.. Better yet it should probably be disabled in svn... From owner-svn-src-head@FreeBSD.ORG Sun May 17 04:09:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7650BB2; Sun, 17 May 2015 04:09:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D586F1C5C; Sun, 17 May 2015 04:09:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4H49NE1011269; Sun, 17 May 2015 04:09:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4H49NTG011267; Sun, 17 May 2015 04:09:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505170409.t4H49NTG011267@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 17 May 2015 04:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283026 - head/cddl/lib/libdtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 04:09:24 -0000 Author: markj Date: Sun May 17 04:09:22 2015 New Revision: 283026 URL: https://svnweb.freebsd.org/changeset/base/283026 Log: Move siftr-related definitions out of tcp.d and into a separate library which declares a dependency on siftr(4). This is necessitated by a reference to struct pkt_node, which is defined in siftr(4): otherwise, dtrace(1) will return an error during startup if siftr.ko is not loaded. Added: head/cddl/lib/libdtrace/siftr.d (contents, props changed) Modified: head/cddl/lib/libdtrace/Makefile Modified: head/cddl/lib/libdtrace/Makefile ============================================================================== --- head/cddl/lib/libdtrace/Makefile Sun May 17 03:59:08 2015 (r283025) +++ head/cddl/lib/libdtrace/Makefile Sun May 17 04:09:22 2015 (r283026) @@ -50,6 +50,7 @@ DSRCS= errno.d \ io.d \ ip.d \ psinfo.d \ + siftr.d \ signal.d \ tcp.d \ udp.d \ Added: head/cddl/lib/libdtrace/siftr.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/lib/libdtrace/siftr.d Sun May 17 04:09:22 2015 (r283026) @@ -0,0 +1,100 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * $FreeBSD$ + */ + +#pragma D depends_on module siftr +#pragma D depends_on provider tcp + +/* + * Convert a SIFTR direction value to a string + */ +#pragma D binding "1.12.1" SIFTR_IN +inline int SIFTR_IN = 1; +#pragma D binding "1.12.1" SIFTR_OUT +inline int SIFTR_OUT = 2; + +/* SIFTR direction strings. */ +#pragma D binding "1.12.1" siftr_dir_string +inline string siftr_dir_string[uint8_t direction] = + direction == SIFTR_IN ? "in" : + direction == SIFTR_OUT ? "out" : + "unknown" ; + +typedef struct siftrinfo { + struct timeval tval; + uint8_t direction; + uint8_t ipver; + uint32_t hash; + uint16_t tcp_localport; + uint16_t tcp_foreignport; + uint64_t snd_cwnd; + u_long snd_wnd; + u_long rcv_wnd; + u_long snd_bwnd; + u_long snd_ssthresh; + int conn_state; + u_int max_seg_size; + int smoothed_rtt; + u_char sack_enabled; + u_char snd_scale; + u_char rcv_scale; + u_int flags; + int rxt_length; + u_int snd_buf_hiwater; + u_int snd_buf_cc; + u_int rcv_buf_hiwater; + u_int rcv_buf_cc; + u_int sent_inflight_bytes; + int t_segqlen; + u_int flowid; + u_int flowtype; +} siftrinfo_t; + +#pragma D binding "1.12.1" translator +translator siftrinfo_t < struct pkt_node *p > { + direction = p == NULL ? 0 : p->direction; + ipver = p == NULL ? 0 : p->ipver; + hash = p == NULL ? 0 : p->hash; + tcp_localport = p == NULL ? 0 : ntohs(p->tcp_localport); + tcp_foreignport = p == NULL ? 0 : ntohs(p->tcp_foreignport); + snd_cwnd = p == NULL ? 0 : p->snd_cwnd; + snd_wnd = p == NULL ? 0 : p->snd_wnd; + rcv_wnd = p == NULL ? 0 : p->rcv_wnd; + snd_bwnd = p == NULL ? 0 : p->snd_bwnd; + snd_ssthresh = p == NULL ? 0 : p->snd_ssthresh; + conn_state = p == NULL ? 0 : p->conn_state; + max_seg_size = p == NULL ? 0 : p->max_seg_size; + smoothed_rtt = p == NULL ? 0 : p->smoothed_rtt; + sack_enabled = p == NULL ? 0 : p->sack_enabled; + snd_scale = p == NULL ? 0 : p->snd_scale; + rcv_scale = p == NULL ? 0 : p->rcv_scale; + flags = p == NULL ? 0 : p->flags; + rxt_length = p == NULL ? 0 : p->rxt_length; + snd_buf_hiwater = p == NULL ? 0 : p->snd_buf_hiwater; + snd_buf_cc = p == NULL ? 0 : p->snd_buf_cc; + rcv_buf_hiwater = p == NULL ? 0 : p->rcv_buf_hiwater; + rcv_buf_cc = p == NULL ? 0 : p->rcv_buf_cc; + sent_inflight_bytes = p == NULL ? 0 : p->sent_inflight_bytes; + t_segqlen = p == NULL ? 0 : p->t_segqlen; + flowid = p == NULL ? 0 : p->flowid; + flowtype = p == NULL ? 0 : p->flowtype; +}; From owner-svn-src-head@FreeBSD.ORG Sun May 17 04:17:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E9FFD63; Sun, 17 May 2015 04:17:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FA321D25; Sun, 17 May 2015 04:17:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4H4H9b7015911; Sun, 17 May 2015 04:17:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4H4H9wo015910; Sun, 17 May 2015 04:17:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505170417.t4H4H9wo015910@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 17 May 2015 04:17:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283027 - head/cddl/lib/libdtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 04:17:09 -0000 Author: markj Date: Sun May 17 04:17:08 2015 New Revision: 283027 URL: https://svnweb.freebsd.org/changeset/base/283027 Log: Actually remove siftr-related definitions from tcp.d, missed in r283026. Modified: head/cddl/lib/libdtrace/tcp.d Modified: head/cddl/lib/libdtrace/tcp.d ============================================================================== --- head/cddl/lib/libdtrace/tcp.d Sun May 17 04:09:22 2015 (r283026) +++ head/cddl/lib/libdtrace/tcp.d Sun May 17 04:17:08 2015 (r283027) @@ -241,78 +241,3 @@ translator tcpinfoh_t < struct tcphdr *p translator tcplsinfo_t < int s > { tcps_state = s; }; - -/* - * Convert a SIFTR direction value to a string - */ -#pragma D binding "1.12.1" SIFTR_IN -inline int SIFTR_IN = 1; -#pragma D binding "1.12.1" SIFTR_OUT -inline int SIFTR_OUT = 2; - -/* SIFTR direction strings. */ -#pragma D binding "1.12.1" siftr_dir_string -inline string siftr_dir_string[uint8_t direction] = - direction == SIFTR_IN ? "in" : - direction == SIFTR_OUT ? "out" : - "unknown" ; - -typedef struct siftrinfo { - struct timeval tval; - uint8_t direction; - uint8_t ipver; - uint32_t hash; - uint16_t tcp_localport; - uint16_t tcp_foreignport; - uint64_t snd_cwnd; - u_long snd_wnd; - u_long rcv_wnd; - u_long snd_bwnd; - u_long snd_ssthresh; - int conn_state; - u_int max_seg_size; - int smoothed_rtt; - u_char sack_enabled; - u_char snd_scale; - u_char rcv_scale; - u_int flags; - int rxt_length; - u_int snd_buf_hiwater; - u_int snd_buf_cc; - u_int rcv_buf_hiwater; - u_int rcv_buf_cc; - u_int sent_inflight_bytes; - int t_segqlen; - u_int flowid; - u_int flowtype; -} siftrinfo_t; - -#pragma D binding "1.12.1" translator -translator siftrinfo_t < struct pkt_node *p > { - direction = p == NULL ? 0 : p->direction; - ipver = p == NULL ? 0 : p->ipver; - hash = p == NULL ? 0 : p->hash; - tcp_localport = p == NULL ? 0 : ntohs(p->tcp_localport); - tcp_foreignport = p == NULL ? 0 : ntohs(p->tcp_foreignport); - snd_cwnd = p == NULL ? 0 : p->snd_cwnd; - snd_wnd = p == NULL ? 0 : p->snd_wnd; - rcv_wnd = p == NULL ? 0 : p->rcv_wnd; - snd_bwnd = p == NULL ? 0 : p->snd_bwnd; - snd_ssthresh = p == NULL ? 0 : p->snd_ssthresh; - conn_state = p == NULL ? 0 : p->conn_state; - max_seg_size = p == NULL ? 0 : p->max_seg_size; - smoothed_rtt = p == NULL ? 0 : p->smoothed_rtt; - sack_enabled = p == NULL ? 0 : p->sack_enabled; - snd_scale = p == NULL ? 0 : p->snd_scale; - rcv_scale = p == NULL ? 0 : p->rcv_scale; - flags = p == NULL ? 0 : p->flags; - rxt_length = p == NULL ? 0 : p->rxt_length; - snd_buf_hiwater = p == NULL ? 0 : p->snd_buf_hiwater; - snd_buf_cc = p == NULL ? 0 : p->snd_buf_cc; - rcv_buf_hiwater = p == NULL ? 0 : p->rcv_buf_hiwater; - rcv_buf_cc = p == NULL ? 0 : p->rcv_buf_cc; - sent_inflight_bytes = p == NULL ? 0 : p->sent_inflight_bytes; - t_segqlen = p == NULL ? 0 : p->t_segqlen; - flowid = p == NULL ? 0 : p->flowid; - flowtype = p == NULL ? 0 : p->flowtype; -}; From owner-svn-src-head@FreeBSD.ORG Sun May 17 15:12:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 755518FF; Sun, 17 May 2015 15:12:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 640F91A3F; Sun, 17 May 2015 15:12:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4HFCuYR037118; Sun, 17 May 2015 15:12:56 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4HFCuFs037117; Sun, 17 May 2015 15:12:56 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505171512.t4HFCuFs037117@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sun, 17 May 2015 15:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283028 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 15:12:56 -0000 Author: loos Date: Sun May 17 15:12:55 2015 New Revision: 283028 URL: https://svnweb.freebsd.org/changeset/base/283028 Log: Adjust the string format to match the actual number of arguments. This fix a segmentation fault on ARM when netstat -r is used together with -W. This issue was introduced in r279122. Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Sun May 17 04:17:08 2015 (r283027) +++ head/usr.bin/netstat/route.c Sun May 17 15:12:55 2015 (r283028) @@ -236,7 +236,7 @@ pr_rthdr(int af1) xo_emit("{T:/%-8.8s} ","Address"); if (Wflag) { xo_emit("{T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%*.*s} " - "{T:/%*.*s} {T:/%*.*s} {T:/%*.*s} {T:/%*s}\n", + "{T:/%*.*s} {T:/%*.*s} {T:/%*s}\n", wid_dst, wid_dst, "Destination", wid_gw, wid_gw, "Gateway", wid_flags, wid_flags, "Flags", From owner-svn-src-head@FreeBSD.ORG Sun May 17 15:32:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22817CD5; Sun, 17 May 2015 15:32:57 +0000 (UTC) Received: from mail-la0-x232.google.com (mail-la0-x232.google.com [IPv6:2a00:1450:4010:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BEC81C42; Sun, 17 May 2015 15:32:56 +0000 (UTC) Received: by lagv1 with SMTP id v1so186162625lag.3; Sun, 17 May 2015 08:32:54 -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:message-id:subject :from:to:cc:content-type; bh=ziZfVm3N9UNOnV11xRn5WPR52f6d5Gf+flIxbgJJyYs=; b=DuS/FZHNLpZnymKjqmaZsCNHuIYKsqYu3Ykgpb5RR0Dl1PCvQB0m+vCCKbljnHVclK 01GrtN8UwdnRtTxiSYyiQmpss81AxuQhLGXmR6uiCItKYPn6OfNM2g6KWuAyzKwLcGUe Y9ZOmEBS7nnVlgDse92Oljyi9J4fqzothnNFAgyXrOCU2e9FnJ8NeuGw7KCgDphBlieD On3nHt6CYbMGd6+8NSlGfwiOoDVVMg9mThj0Qti4y2DOr5LgoRrE+7AXBXPU7BKUb78z hEYS/cy3XrfZWnV7KtNBNf2sG/7Fdt26GkoRFtyFuN+e8pNcCXrcd5TRpFC8xfb55+3E N+5Q== MIME-Version: 1.0 X-Received: by 10.112.188.194 with SMTP id gc2mr14208081lbc.25.1431876774379; Sun, 17 May 2015 08:32:54 -0700 (PDT) Sender: zbodek@gmail.com Received: by 10.112.55.42 with HTTP; Sun, 17 May 2015 08:32:54 -0700 (PDT) In-Reply-To: References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> Date: Sun, 17 May 2015 17:32:54 +0200 X-Google-Sender-Auth: 013wv4reT5fYfdyyYdDrh3_PIT8 Message-ID: Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm From: Zbigniew Bodek To: Adrian Chadd Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 15:32:57 -0000 Hmmm...(facepalm). Sorry... I did not check the patch for DOS newlines -_-' (I guess I will need to start doing so starting from now). Nevertheless I can't see any ^Ms in files now (ff=unix doesn't show anything and dos2unix did not change the files). As far as I can see bz@ fixed the only DOS newlines committed. How is it possible that you still see them in files? Sorry again and best regards zbb 2015-05-17 3:45 GMT+02:00 Adrian Chadd : > Did you commit files with DOS newlines in them? :) > > tsk tsk tsk tsk tsk. I think should fix that.. > > > -adrian From owner-svn-src-head@FreeBSD.ORG Sun May 17 15:46:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60045A7 for ; Sun, 17 May 2015 15:46:25 +0000 (UTC) Received: from pmta2.delivery4.ore.mailhop.org (pmta2.delivery4.ore.mailhop.org [54.200.247.200]) by mx1.freebsd.org (Postfix) with SMTP id 376561D82 for ; Sun, 17 May 2015 15:46:24 +0000 (UTC) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sun, 17 May 2015 15:46:22 +0000 (UTC) Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t4HFkLeP012497; Sun, 17 May 2015 09:46:21 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1431877581.91685.49.camel@freebsd.org> Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm From: Ian Lepore To: Garrett Cooper Cc: Adrian Chadd , Zbigniew Bodek , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Sun, 17 May 2015 09:46:21 -0600 In-Reply-To: <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 15:46:25 -0000 On Sat, 2015-05-16 at 21:04 -0700, Garrett Cooper wrote: > > On May 16, 2015, at 18:45, Adrian Chadd wrote: > > > > Did you commit files with DOS newlines in them? :) > > > > tsk tsk tsk tsk tsk. I think should fix that.. > > Better yet it should probably be disabled in svn... > Or flagged by some filter as a diff is uploaded to phabricator, since the web display obscures whitespace. -- Ian From owner-svn-src-head@FreeBSD.ORG Sun May 17 15:49:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22195403; Sun, 17 May 2015 15:49:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FD511DA9; Sun, 17 May 2015 15:49:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4HFne1j053233; Sun, 17 May 2015 15:49:40 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4HFnchs053223; Sun, 17 May 2015 15:49:38 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201505171549.t4HFnchs053223@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 17 May 2015 15:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283029 - in head/contrib: gcc gdb/gdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 15:49:41 -0000 Author: sbruno Date: Sun May 17 15:49:38 2015 New Revision: 283029 URL: https://svnweb.freebsd.org/changeset/base/283029 Log: Update intree gdb/kgdb to handle 2 dwarf types: DW_OP_GNU_uninit DW_OP_piece This squashes the warnings about type 0x93 not known in kgdb when opening a kernel crash dump. Upstream refs: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=87808bd699575a850139a1f916512ab7a47fd496 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=42be36b328ae784ae6981da7c7cab95b67ed7737 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=23572ecadc89af384c1804ad7692f32c55fbfc80 Differential Revision: https://reviews.freebsd.org/D2534 Reviewed by: emaste, jhb, davide Modified: head/contrib/gcc/dwarf2.h head/contrib/gdb/gdb/c-valprint.c head/contrib/gdb/gdb/dwarf2expr.c head/contrib/gdb/gdb/dwarf2expr.h head/contrib/gdb/gdb/dwarf2loc.c head/contrib/gdb/gdb/dwarf2read.c head/contrib/gdb/gdb/value.h head/contrib/gdb/gdb/values.c Modified: head/contrib/gcc/dwarf2.h ============================================================================== --- head/contrib/gcc/dwarf2.h Sun May 17 15:12:55 2015 (r283028) +++ head/contrib/gcc/dwarf2.h Sun May 17 15:49:38 2015 (r283029) @@ -547,6 +547,7 @@ enum dwarf_location_atom DW_OP_bit_piece = 0x9d, /* GNU extensions. */ DW_OP_GNU_push_tls_address = 0xe0, + DW_OP_GNU_uninit = 0xf0, /* HP extensions. */ DW_OP_HP_unknown = 0xe0, /* Ouch, the same as GNU_push_tls_address. */ DW_OP_HP_is_value = 0xe1, Modified: head/contrib/gdb/gdb/c-valprint.c ============================================================================== --- head/contrib/gdb/gdb/c-valprint.c Sun May 17 15:12:55 2015 (r283028) +++ head/contrib/gdb/gdb/c-valprint.c Sun May 17 15:49:38 2015 (r283029) @@ -559,6 +559,10 @@ c_value_print (struct value *val, struct fprintf_filtered (stream, ") "); } } + + if (!value_initialized (val)) + fprintf_filtered (stream, " [uninitialized] "); + if (objectprint && (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_CLASS)) { /* Attempt to determine real type of object */ Modified: head/contrib/gdb/gdb/dwarf2expr.c ============================================================================== --- head/contrib/gdb/gdb/dwarf2expr.c Sun May 17 15:12:55 2015 (r283028) +++ head/contrib/gdb/gdb/dwarf2expr.c Sun May 17 15:49:38 2015 (r283029) @@ -42,6 +42,8 @@ new_dwarf_expr_context (void) retval->stack_len = 0; retval->stack_allocated = 10; retval->stack = xmalloc (retval->stack_allocated * sizeof (CORE_ADDR)); + retval->num_pieces = 0; + retval->pieces = 0; return retval; } @@ -51,6 +53,7 @@ void free_dwarf_expr_context (struct dwarf_expr_context *ctx) { xfree (ctx->stack); + xfree (ctx->pieces); xfree (ctx); } @@ -100,6 +103,29 @@ dwarf_expr_fetch (struct dwarf_expr_cont } +/* Add a new piece to CTX's piece list. */ +static void +add_piece (struct dwarf_expr_context *ctx, + int in_reg, CORE_ADDR value, ULONGEST size) +{ + struct dwarf_expr_piece *p; + + ctx->num_pieces++; + + if (ctx->pieces) + ctx->pieces = xrealloc (ctx->pieces, + (ctx->num_pieces + * sizeof (struct dwarf_expr_piece))); + else + ctx->pieces = xmalloc (ctx->num_pieces + * sizeof (struct dwarf_expr_piece)); + + p = &ctx->pieces[ctx->num_pieces - 1]; + p->in_reg = in_reg; + p->value = value; + p->size = size; +} + /* Evaluate the expression at ADDR (LEN bytes long) using the context CTX. */ @@ -230,6 +256,7 @@ execute_stack_op (struct dwarf_expr_cont unsigned char *op_end) { ctx->in_reg = 0; + ctx->initialized = 1; /* Default is initialized. */ while (op_ptr < op_end) { @@ -356,9 +383,12 @@ execute_stack_op (struct dwarf_expr_cont case DW_OP_reg29: case DW_OP_reg30: case DW_OP_reg31: - if (op_ptr != op_end && *op_ptr != DW_OP_piece) - error ("DWARF-2 expression error: DW_OP_reg operations must be " - "used either alone or in conjuction with DW_OP_piece."); + if (op_ptr != op_end + && *op_ptr != DW_OP_piece + && *op_ptr != DW_OP_bit_piece + && *op_ptr != DW_OP_GNU_uninit) + error (_("DWARF-2 expression error: DW_OP_reg operations must be " + "used either alone or in conjuction with DW_OP_piece.")); result = op - DW_OP_reg0; ctx->in_reg = 1; @@ -661,6 +691,30 @@ execute_stack_op (struct dwarf_expr_cont case DW_OP_nop: goto no_push; + case DW_OP_piece: + { + ULONGEST size; + CORE_ADDR addr_or_regnum; + + /* Record the piece. */ + op_ptr = read_uleb128 (op_ptr, op_end, &size); + addr_or_regnum = dwarf_expr_fetch (ctx, 0); + add_piece (ctx, ctx->in_reg, addr_or_regnum, size); + + /* Pop off the address/regnum, and clear the in_reg flag. */ + dwarf_expr_pop (ctx); + ctx->in_reg = 0; + } + goto no_push; + + case DW_OP_GNU_uninit: + if (op_ptr != op_end) + error (_("DWARF-2 expression error: DW_OP_GNU_unint must always " + "be the very last op.")); + + ctx->initialized = 0; + goto no_push; + default: error ("Unhandled dwarf expression opcode 0x%x", op); } Modified: head/contrib/gdb/gdb/dwarf2expr.h ============================================================================== --- head/contrib/gdb/gdb/dwarf2expr.h Sun May 17 15:12:55 2015 (r283028) +++ head/contrib/gdb/gdb/dwarf2expr.h Sun May 17 15:49:38 2015 (r283029) @@ -74,6 +74,51 @@ struct dwarf_expr_context /* Non-zero if the result is in a register. The register number will be on the expression stack. */ int in_reg; + /* Initialization status of variable: Non-zero if variable has been + initialized; zero otherwise. */ + int initialized; + + /* An array of pieces. PIECES points to its first element; + NUM_PIECES is its length. + + Each time DW_OP_piece is executed, we add a new element to the + end of this array, recording the current top of the stack, the + current in_reg flag, and the size given as the operand to + DW_OP_piece. We then pop the top value from the stack, clear the + in_reg flag, and resume evaluation. + + The Dwarf spec doesn't say whether DW_OP_piece pops the top value + from the stack. We do, ensuring that clients of this interface + expecting to see a value left on the top of the stack (say, code + evaluating frame base expressions or CFA's specified with + DW_CFA_def_cfa_expression) will get an error if the expression + actually marks all the values it computes as pieces. + + If an expression never uses DW_OP_piece, num_pieces will be zero. + (It would be nice to present these cases as expressions yielding + a single piece, with in_reg clear, so that callers need not + distinguish between the no-DW_OP_piece and one-DW_OP_piece cases. + But expressions with no DW_OP_piece operations have no value to + place in a piece's 'size' field; the size comes from the + surrounding data. So the two cases need to be handled + separately.) */ + int num_pieces; + struct dwarf_expr_piece *pieces; +}; + +/* A piece of an object, as recorded by DW_OP_piece or DW_OP_bit_piece. */ +struct dwarf_expr_piece +{ + /* If IN_REG is zero, then the piece is in memory, and VALUE is its address. + If IN_REG is non-zero, then the piece is in a register, and VALUE + is the register number. */ + int in_reg; + + /* This piece's address or register number. */ + CORE_ADDR value; + + /* The length of the piece, in bytes. */ + ULONGEST size; }; struct dwarf_expr_context *new_dwarf_expr_context (void); Modified: head/contrib/gdb/gdb/dwarf2loc.c ============================================================================== --- head/contrib/gdb/gdb/dwarf2loc.c Sun May 17 15:12:55 2015 (r283028) +++ head/contrib/gdb/gdb/dwarf2loc.c Sun May 17 15:49:38 2015 (r283029) @@ -206,6 +206,7 @@ dwarf2_evaluate_loc_desc (struct symbol struct objfile *objfile) { CORE_ADDR result; + struct gdbarch *arch = get_frame_arch (frame); struct value *retval; struct dwarf_expr_baton baton; struct dwarf_expr_context *ctx; @@ -230,7 +231,32 @@ dwarf2_evaluate_loc_desc (struct symbol dwarf_expr_eval (ctx, data, size); result = dwarf_expr_fetch (ctx, 0); - if (ctx->in_reg) + if (ctx->num_pieces > 0) + { + int i; + long offset = 0; + bfd_byte *contents; + + retval = allocate_value (SYMBOL_TYPE (var)); + contents = VALUE_CONTENTS_RAW (retval); + for (i = 0; i < ctx->num_pieces; i++) + { + struct dwarf_expr_piece *p = &ctx->pieces[i]; + if (p->in_reg) + { + bfd_byte regval[MAX_REGISTER_SIZE]; + int gdb_regnum = DWARF2_REG_TO_REGNUM (p->value); + get_frame_register (frame, gdb_regnum, regval); + memcpy (contents + offset, regval, p->size); + } + else /* In memory? */ + { + read_memory (p->value, contents + offset, p->size); + } + offset += p->size; + } + } + else if (ctx->in_reg) { int regnum = DWARF2_REG_TO_REGNUM (result); retval = value_from_register (SYMBOL_TYPE (var), regnum, frame); @@ -245,6 +271,8 @@ dwarf2_evaluate_loc_desc (struct symbol VALUE_ADDRESS (retval) = result; } + set_value_initialized (retval, ctx->initialized); + free_dwarf_expr_context (ctx); return retval; @@ -322,6 +350,17 @@ dwarf2_loc_desc_needs_frame (unsigned ch in_reg = ctx->in_reg; + if (ctx->num_pieces > 0) + { + int i; + + /* If the location has several pieces, and any of them are in + registers, then we will need a frame to fetch them from. */ + for (i = 0; i < ctx->num_pieces; i++) + if (ctx->pieces[i].in_reg) + in_reg = 1; + } + free_dwarf_expr_context (ctx); return baton.needs_frame || in_reg; Modified: head/contrib/gdb/gdb/dwarf2read.c ============================================================================== --- head/contrib/gdb/gdb/dwarf2read.c Sun May 17 15:12:55 2015 (r283028) +++ head/contrib/gdb/gdb/dwarf2read.c Sun May 17 15:49:38 2015 (r283029) @@ -7110,6 +7110,8 @@ dwarf_stack_op_name (unsigned op) /* GNU extensions. */ case DW_OP_GNU_push_tls_address: return "DW_OP_GNU_push_tls_address"; + case DW_OP_GNU_uninit: + return "DW_OP_GNU_uninit"; default: return "OP_"; } @@ -7634,6 +7636,9 @@ decode_locdesc (struct dwarf_block *blk, dwarf2_complex_location_expr_complaint (); break; + case DW_OP_GNU_uninit: + break; + default: complaint (&symfile_complaints, "unsupported stack op: '%s'", dwarf_stack_op_name (op)); Modified: head/contrib/gdb/gdb/value.h ============================================================================== --- head/contrib/gdb/gdb/value.h Sun May 17 15:12:55 2015 (r283028) +++ head/contrib/gdb/gdb/value.h Sun May 17 15:49:38 2015 (r283029) @@ -165,6 +165,9 @@ struct value /* The BFD section associated with this value. */ asection *bfd_section; + /* If value is a variable, is it initialized or not. */ + int initialized; + /* Actual contents of the value. For use of this value; setting it uses the stuff above. Not valid if lazy is nonzero. Target byte-order. We force it to be aligned properly for any Modified: head/contrib/gdb/gdb/values.c ============================================================================== --- head/contrib/gdb/gdb/values.c Sun May 17 15:12:55 2015 (r283028) +++ head/contrib/gdb/gdb/values.c Sun May 17 15:49:38 2015 (r283029) @@ -101,6 +101,7 @@ allocate_value (struct type *type) VALUE_EMBEDDED_OFFSET (val) = 0; VALUE_POINTED_TO_OFFSET (val) = 0; val->modifiable = 1; + val->initialized = 1; /* Default to initialized. */ return val; } @@ -1311,6 +1312,22 @@ using_struct_return (struct type *value_ == RETURN_VALUE_STRUCT_CONVENTION); } +/* Set the initialized field in a value struct. */ + +void +set_value_initialized (struct value *val, int status) +{ + val->initialized = status; +} + +/* Return the initialized field in a value struct. */ + +int +value_initialized (struct value *val) +{ + return val->initialized; +} + void _initialize_values (void) { From owner-svn-src-head@FreeBSD.ORG Sun May 17 16:27:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A11A2B7A; Sun, 17 May 2015 16:27:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76332117F; Sun, 17 May 2015 16:27:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4HGR8HX073079; Sun, 17 May 2015 16:27:08 GMT (envelope-from kargl@FreeBSD.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4HGR7iq073075; Sun, 17 May 2015 16:27:07 GMT (envelope-from kargl@FreeBSD.org) Message-Id: <201505171627.t4HGR7iq073075@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kargl set sender to kargl@FreeBSD.org using -f From: Steve Kargl Date: Sun, 17 May 2015 16:27:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283032 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 16:27:08 -0000 Author: kargl Date: Sun May 17 16:27:06 2015 New Revision: 283032 URL: https://svnweb.freebsd.org/changeset/base/283032 Log: In r279493, the functions pzero[f](), qzero[f], pone[f](), and qone[f]() were marked as __inline, but their forward declarations were not updated. Fix the forward declarations to match the actual function declarations. Requested by: bde Modified: head/lib/msun/src/e_j0.c head/lib/msun/src/e_j0f.c head/lib/msun/src/e_j1.c head/lib/msun/src/e_j1f.c Modified: head/lib/msun/src/e_j0.c ============================================================================== --- head/lib/msun/src/e_j0.c Sun May 17 16:17:15 2015 (r283031) +++ head/lib/msun/src/e_j0.c Sun May 17 16:27:06 2015 (r283032) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" -static double pzero(double), qzero(double); +static __inline double pzero(double), qzero(double); static const volatile double vone = 1, vzero = 0; Modified: head/lib/msun/src/e_j0f.c ============================================================================== --- head/lib/msun/src/e_j0f.c Sun May 17 16:17:15 2015 (r283031) +++ head/lib/msun/src/e_j0f.c Sun May 17 16:27:06 2015 (r283032) @@ -23,7 +23,7 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" -static float pzerof(float), qzerof(float); +static __inline float pzerof(float), qzerof(float); static const volatile float vone = 1, vzero = 0; Modified: head/lib/msun/src/e_j1.c ============================================================================== --- head/lib/msun/src/e_j1.c Sun May 17 16:17:15 2015 (r283031) +++ head/lib/msun/src/e_j1.c Sun May 17 16:27:06 2015 (r283032) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" -static double pone(double), qone(double); +static __inline double pone(double), qone(double); static const volatile double vone = 1, vzero = 0; Modified: head/lib/msun/src/e_j1f.c ============================================================================== --- head/lib/msun/src/e_j1f.c Sun May 17 16:17:15 2015 (r283031) +++ head/lib/msun/src/e_j1f.c Sun May 17 16:27:06 2015 (r283032) @@ -23,7 +23,7 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" -static float ponef(float), qonef(float); +static __inline float ponef(float), qonef(float); static const volatile float vone = 1, vzero = 0; From owner-svn-src-head@FreeBSD.ORG Sun May 17 17:03:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F7A8596; Sun, 17 May 2015 17:03:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E69115F2; Sun, 17 May 2015 17:03:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4HH3cKp092638; Sun, 17 May 2015 17:03:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4HH3cel092637; Sun, 17 May 2015 17:03:38 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505171703.t4HH3cel092637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 17 May 2015 17:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283033 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 17:03:38 -0000 Author: ian Date: Sun May 17 17:03:37 2015 New Revision: 283033 URL: https://svnweb.freebsd.org/changeset/base/283033 Log: Do not set preload_addr_relocate for ARM. Apparently there was a time when loader(8) passed physical addresses in loader metadata for arm, but that is no longer true; all metadata has already been adjusted to vitual addresses by loader. I can't track down the exact revision in loader where a change from physical to virtual metadata addresses happened. The code involved is very twisty and complicated. I suspect the change was an unintended consequence of the r247301, r247413, r248118 series of changes I made a couple years ago. Modified: head/sys/arm/arm/machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun May 17 16:27:06 2015 (r283032) +++ head/sys/arm/arm/machdep.c Sun May 17 17:03:37 2015 (r283033) @@ -1019,7 +1019,6 @@ freebsd_parse_boot_param(struct arm_boot ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); db_fetch_ksymtab(ksym_start, ksym_end); #endif - preload_addr_relocate = KERNVIRTADDR - abp->abp_physaddr; return lastaddr; } #endif From owner-svn-src-head@FreeBSD.ORG Sun May 17 18:08:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B4EF289; Sun, 17 May 2015 18:08:23 +0000 (UTC) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 173CA1C38; Sun, 17 May 2015 18:08:22 +0000 (UTC) Received: from bender.Home (97e07b11.skybroadband.com [151.224.123.17]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 48F5ED7A6F; Sun, 17 May 2015 18:08:14 +0000 (UTC) Date: Sun, 17 May 2015 19:08:10 +0100 From: Andrew Turner To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282415 - head/usr.sbin/ntp Message-ID: <20150517190810.4006b7bb@bender.Home> In-Reply-To: <201505041242.t44CgrTd090709@svn.freebsd.org> References: <201505041242.t44CgrTd090709@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 18:08:23 -0000 On Mon, 4 May 2015 12:42:53 +0000 (UTC) Cy Schubert wrote: > Author: cy > Date: Mon May 4 12:42:52 2015 > New Revision: 282415 > URL: https://svnweb.freebsd.org/changeset/base/282415 > > Log: > Restore CPU dependent compile time conditionals. > > MFC after: 1 month (with r281143 and r282408) Do you have any plans on fixing this before you MFC it? Specifically: * sizeof(char *) == 8 on arm64, powerpc64, and mips64 * sizeof(long) == 8 on arm64, powerpc64, and mips64 * sizeof(time_t) == 8 on arm, arm64, powerpc64, mips, and mips64 * STR_SYSTEM is incorrect on arm, arm64, powerpc64, mips, and mips64, however this is now less broken as it was previously also broken on i386, and sparc64. This change is only correct for amd64, i386, and sparc64. I suspect all of the above will also be relevant on ia64. We still have support in 10-STABLE for this so should be fixed before an MFC. I have heard reports that NTP is broken on some of the above platforms so they don't keep very accurate time. Can you fix this, or revert this change until a fix can be written. Andrew From owner-svn-src-head@FreeBSD.ORG Sun May 17 18:35:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E91AC9EA; Sun, 17 May 2015 18:35:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6B4A1F03; Sun, 17 May 2015 18:35:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4HIZwZa037954; Sun, 17 May 2015 18:35:58 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4HIZwpC037953; Sun, 17 May 2015 18:35:58 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505171835.t4HIZwpC037953@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 17 May 2015 18:35:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283034 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 18:35:59 -0000 Author: andrew Date: Sun May 17 18:35:58 2015 New Revision: 283034 URL: https://svnweb.freebsd.org/changeset/base/283034 Log: Clean up struct syscall_args: 1. Align to a 64-bit address so 64-bit data will be correctly aligned. 2. Add a comment explaining why. 3. Remove an unneeded value from the struct. This fixes an issue where the struct may not be correctly aligned on the stack in the syscall function. This may lead to accesing a 64-bit value at a non 64-bit. This will raise an exception and panic the kernel. We have been lucky where on arm and armv6 both clang and gcc correctly align the data, even without us asking to, however, on armeb with clang to not be the case. This tells the compiler we really do need this to be aligned. Reported and tested by: jmg (on armeb with clang) MFC after: 1 Week [1, 2] Modified: head/sys/arm/include/proc.h Modified: head/sys/arm/include/proc.h ============================================================================== --- head/sys/arm/include/proc.h Sun May 17 17:03:37 2015 (r283033) +++ head/sys/arm/include/proc.h Sun May 17 18:35:58 2015 (r283034) @@ -68,15 +68,20 @@ struct mdproc { #endif #define MAXARGS 8 +/* + * This holds the syscall state for a single system call. + * As some syscall arguments may be 64-bit aligned we need to ensure the + * args value is 64-bit aligned. The ABI will then ensure any 64-bit + * arguments are already correctly aligned, even if they were passed in + * via registers, we just need to make sure we copy them to an algned + * buffer. + */ struct syscall_args { u_int code; struct sysent *callp; register_t args[MAXARGS]; int narg; u_int nap; -#ifndef __ARM_EABI__ - u_int32_t insn; -#endif -}; +} __aligned(8); #endif /* !_MACHINE_PROC_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun May 17 19:13:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D56BFDE; Sun, 17 May 2015 19:13:21 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5241C1308; Sun, 17 May 2015 19:13:21 +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 3897325D3894; Sun, 17 May 2015 19:13:10 +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 D7B3CC770C9; Sun, 17 May 2015 19:13:09 +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 mV3FoYQraqay; Sun, 17 May 2015 19:13:08 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:e1fd:54af:a47e:9dd1] (unknown [IPv6:fde9:577b:c1a9:4410:e1fd:54af:a47e:9dd1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id DBC71C770C8; Sun, 17 May 2015 19:13:07 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm From: "Bjoern A. Zeeb" In-Reply-To: <1431877581.91685.49.camel@freebsd.org> Date: Sun, 17 May 2015 19:12:34 +0000 Cc: "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> <1431877581.91685.49.camel@freebsd.org> To: "src-committers@freebsd.org" X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 19:13:21 -0000 > On 17 May 2015, at 15:46 , Ian Lepore wrote: >=20 > On Sat, 2015-05-16 at 21:04 -0700, Garrett Cooper wrote: >>> On May 16, 2015, at 18:45, Adrian Chadd wrote: >>>=20 >>> Did you commit files with DOS newlines in them? :) >>>=20 >>> tsk tsk tsk tsk tsk. I think should fix that.. >>=20 >> Better yet it should probably be disabled in svn... >>=20 >=20 > Or flagged by some filter as a diff is uploaded to phabricator, since > the web display obscures whitespace. Or rejected by an SVN commit hook? =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-head@FreeBSD.ORG Sun May 17 19:59:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8DEF8AA; Sun, 17 May 2015 19:59:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5521173B; Sun, 17 May 2015 19:59:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4HJx7Dm077334; Sun, 17 May 2015 19:59:07 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4HJx6JA077329; Sun, 17 May 2015 19:59:06 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505171959.t4HJx6JA077329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 17 May 2015 19:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283035 - in head/sys/boot: common uboot/common uboot/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 19:59:07 -0000 Author: ian Date: Sun May 17 19:59:05 2015 New Revision: 283035 URL: https://svnweb.freebsd.org/changeset/base/283035 Log: An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that. Previously, ubldr would use the virtual addresses in the elf headers by masking off the high bits and assuming the result was a physical address where the kernel should be loaded. That would sometimes discard significant bits of the physical address, but the effects of that were undone by archsw copy code that would find a large block of memory and apply an offset to the source/dest copy addresses. The result was that things were loaded at a different physical address than requested by the higher code layers, but that worked because other adjustments were applied later (such as when jumping to the entry point). Very confusing, and somewhat fragile. Now the archsw copy routines are just simple copies, and instead archsw.arch_loadaddr is implemented to choose a load address. The new routine uses some of the code from the old offset-translation routine to find the largest block of ram, but it excludes ubldr itself from that range, and also excludes If ubldr splits the largest block of ram in two, the kernel is loaded into the bottom of whichever resulting block is larger. As part of eliminating ubldr itself from the ram ranges, export the heap start/end addresses in a pair of new global variables. This change means that the virtual addresses in the arm kernel elf headers now have no meaning at all, except for the entry point address. There is an implicit assumption that the entry point is in the first text page, and that the address in the the header can be turned into an offset by masking it with PAGE_MASK. In the future we can link all arm kernels at a virtual address of 0xC0000000 with no need to use any low-order part of the address to influence where in ram the kernel gets loaded. Modified: head/sys/boot/common/load_elf.c head/sys/boot/uboot/common/main.c head/sys/boot/uboot/lib/copy.c head/sys/boot/uboot/lib/elf_freebsd.c head/sys/boot/uboot/lib/libuboot.h Modified: head/sys/boot/common/load_elf.c ============================================================================== --- head/sys/boot/common/load_elf.c Sun May 17 18:35:58 2015 (r283034) +++ head/sys/boot/common/load_elf.c Sun May 17 19:59:05 2015 (r283035) @@ -191,10 +191,17 @@ __elfN(loadfile_raw)(char *filename, u_i goto oerr; } /* - * Calculate destination address based on kernel entrypoint + * Calculate destination address based on kernel entrypoint. + * + * For ARM, the destination address is independent of any values in the + * elf header (an ARM kernel can be loaded at any 2MB boundary), so we + * leave dest set to the value calculated by archsw.arch_loadaddr() and + * passed in to this function. */ +#ifndef __arm__ if (ehdr->e_type == ET_EXEC) dest = (ehdr->e_entry & ~PAGE_MASK); +#endif if ((ehdr->e_entry & ~PAGE_MASK) == 0) { printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: not a kernel (maybe static binary?)\n"); err = EPERM; @@ -348,22 +355,18 @@ __elfN(loadimage)(struct preloaded_file off = 0; #elif defined(__arm__) /* - * The elf headers in some kernels specify virtual addresses in all - * header fields. More recently, the e_entry and p_paddr fields are the - * proper physical addresses. Even when the p_paddr fields are correct, - * the MI code below uses the p_vaddr fields with an offset added for - * loading (doing so is arguably wrong). To make loading work, we need - * an offset that represents the difference between physical and virtual - * addressing. ARM kernels are always linked at 0xCnnnnnnn. Depending - * on the headers, the offset value passed in may be physical or virtual - * (because it typically comes from e_entry), but we always replace - * whatever is passed in with the va<->pa offset. On the other hand, we - * always remove the high-order part of the entry address whether it's - * physical or virtual, because it will be adjusted later for the actual - * physical entry point based on where the image gets loaded. + * The elf headers in arm kernels specify virtual addresses in all + * header fields, even the ones that should be physical addresses. + * We assume the entry point is in the first page, and masking the page + * offset will leave us with the virtual address the kernel was linked + * at. We subtract that from the load offset, making 'off' into the + * value which, when added to a virtual address in an elf header, + * translates it to a physical address. We do the va->pa conversion on + * the entry point address in the header now, so that later we can + * launch the kernel by just jumping to that address. */ - off = -0xc0000000; - ehdr->e_entry &= ~0xf0000000; + off -= ehdr->e_entry & ~PAGE_MASK; + ehdr->e_entry += off; #ifdef ELF_VERBOSE printf("ehdr->e_entry 0x%08x, va<->pa off %llx\n", ehdr->e_entry, off); #endif Modified: head/sys/boot/uboot/common/main.c ============================================================================== --- head/sys/boot/uboot/common/main.c Sun May 17 18:35:58 2015 (r283034) +++ head/sys/boot/uboot/common/main.c Sun May 17 19:59:05 2015 (r283035) @@ -28,6 +28,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include @@ -44,6 +45,9 @@ struct uboot_devdesc currdev; struct arch_switch archsw; /* MI/MD interface boundary */ int devs_no; +uintptr_t uboot_heap_start; +uintptr_t uboot_heap_end; + struct device_type { const char *name; int type; @@ -414,7 +418,9 @@ main(void) * Initialise the heap as early as possible. Once this is done, * alloc() is usable. The stack is buried inside us, so this is safe. */ - setheap((void *)end, (void *)(end + 512 * 1024)); + uboot_heap_start = round_page((uintptr_t)end); + uboot_heap_end = uboot_heap_start + 512 * 1024; + setheap((void *)uboot_heap_start, (void *)uboot_heap_end); /* * Set up console. @@ -487,6 +493,7 @@ main(void) setenv("LINES", "24", 1); /* optional */ setenv("prompt", "loader>", 1); + archsw.arch_loadaddr = uboot_loadaddr; archsw.arch_getdev = uboot_getdev; archsw.arch_copyin = uboot_copyin; archsw.arch_copyout = uboot_copyout; Modified: head/sys/boot/uboot/lib/copy.c ============================================================================== --- head/sys/boot/uboot/lib/copy.c Sun May 17 18:35:58 2015 (r283034) +++ head/sys/boot/uboot/lib/copy.c Sun May 17 19:59:05 2015 (r283035) @@ -27,66 +27,131 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include "api_public.h" #include "glue.h" +#include "libuboot.h" /* * MD primitives supporting placement of module data */ -void * -uboot_vm_translate(vm_offset_t o) { +#ifdef __arm__ +#define KERN_ALIGN (2 * 1024 * 1024) +#else +#define KERN_ALIGN PAGE_SIZE +#endif + +/* + * Avoid low memory, u-boot puts things like args and dtb blobs there. + */ +#define KERN_MINADDR max(KERN_ALIGN, (1024 * 1024)) + +extern void _start(void); /* ubldr entry point address. */ + +/* + * This is called for every object loaded (kernel, module, dtb file, etc). The + * expected return value is the next address at or after the given addr which is + * appropriate for loading the given object described by type and data. On each + * call the addr is the next address following the previously loaded object. + * + * The first call is for loading the kernel, and the addr argument will be zero, + * and we search for a big block of ram to load the kernel and modules. + * + * On subsequent calls the addr will be non-zero, and we just round it up so + * that each object begins on a page boundary. + */ +uint64_t +uboot_loadaddr(u_int type, void *data, uint64_t addr) +{ struct sys_info *si; - static uintptr_t start = 0; - static size_t size = 0; + uintptr_t sblock, eblock, subldr, eubldr; + uintptr_t biggest_block, this_block; + size_t biggest_size, this_size; int i; + char * envstr; + + if (addr == 0) { + /* + * If the loader_kernaddr environment variable is set, blindly + * honor it. It had better be right. We force interpretation + * of the value in base-16 regardless of any leading 0x prefix, + * because that's the U-Boot convention. + */ + envstr = ub_env_get("loader_kernaddr"); + if (envstr != NULL) + return (strtoul(envstr, NULL, 16)); - if (size == 0) { + /* + * Find addr/size of largest DRAM block. Carve our own address + * range out of the block, because loading the kernel over the + * top ourself is a poor memory-conservation strategy. Avoid + * memory at beginning of the first block of physical ram, + * since u-boot likes to pass args and data there. Assume that + * u-boot has moved itself to the very top of ram and + * optimistically assume that we won't run into it up there. + */ if ((si = ub_get_sys_info()) == NULL) panic("could not retrieve system info"); - /* Find start/size of largest DRAM block. */ + biggest_block = 0; + biggest_size = 0; + subldr = rounddown2((uintptr_t)_start, KERN_ALIGN); + eubldr = roundup2(uboot_heap_end, KERN_ALIGN); for (i = 0; i < si->mr_no; i++) { - if (si->mr[i].flags == MR_ATTR_DRAM - && si->mr[i].size > size) { - start = si->mr[i].start; - size = si->mr[i].size; + if (si->mr[i].flags != MR_ATTR_DRAM) + continue; + sblock = roundup2(si->mr[i].start, KERN_ALIGN); + eblock = rounddown2(si->mr[i].start + si->mr[i].size, + KERN_ALIGN); + if (biggest_size == 0) + sblock += KERN_MINADDR; + if (subldr >= sblock && subldr < eblock) { + if (subldr - sblock > eblock - eubldr) { + this_block = sblock; + this_size = subldr - sblock; + } else { + this_block = eubldr; + this_size = eblock - eubldr; + } + } + if (biggest_size < this_size) { + biggest_block = this_block; + biggest_size = this_size; } } - - if (size <= 0) - panic("No suitable DRAM?\n"); - /* - printf("Loading into memory region 0x%08X-0x%08X (%d MiB)\n", - start, start + size, size / 1024 / 1024); - */ + if (biggest_size == 0) + panic("Not enough DRAM to load kernel\n"); +#if 0 + printf("Loading kernel into region 0x%08x-0x%08x (%u MiB)\n", + biggest_block, biggest_block + biggest_size - 1, + biggest_size / 1024 / 1024); +#endif + return (biggest_block); } - if (o > size) - panic("Address offset 0x%08jX bigger than size 0x%08X\n", - (intmax_t)o, size); - return (void *)(start + o); + return roundup2(addr, PAGE_SIZE); } ssize_t uboot_copyin(const void *src, vm_offset_t dest, const size_t len) { - bcopy(src, uboot_vm_translate(dest), len); + bcopy(src, (void *)dest, len); return (len); } ssize_t uboot_copyout(const vm_offset_t src, void *dest, const size_t len) { - bcopy(uboot_vm_translate(src), dest, len); + bcopy((void *)src, dest, len); return (len); } ssize_t uboot_readin(const int fd, vm_offset_t dest, const size_t len) { - return (read(fd, uboot_vm_translate(dest), len)); + return (read(fd, (void *)dest, len)); } Modified: head/sys/boot/uboot/lib/elf_freebsd.c ============================================================================== --- head/sys/boot/uboot/lib/elf_freebsd.c Sun May 17 18:35:58 2015 (r283034) +++ head/sys/boot/uboot/lib/elf_freebsd.c Sun May 17 19:59:05 2015 (r283035) @@ -80,7 +80,7 @@ __elfN(uboot_exec)(struct preloaded_file if ((error = md_load(fp->f_args, &mdp)) != 0) return (error); - entry = uboot_vm_translate(e->e_entry); + entry = (void *)e->e_entry; printf("Kernel entry at 0x%x...\n", (unsigned)entry); dev_cleanup(); Modified: head/sys/boot/uboot/lib/libuboot.h ============================================================================== --- head/sys/boot/uboot/lib/libuboot.h Sun May 17 18:35:58 2015 (r283034) +++ head/sys/boot/uboot/lib/libuboot.h Sun May 17 19:59:05 2015 (r283035) @@ -57,7 +57,10 @@ extern int devs_no; extern struct netif_driver uboot_net; extern struct devsw uboot_storage; -void *uboot_vm_translate(vm_offset_t); +extern uintptr_t uboot_heap_start; +extern uintptr_t uboot_heap_end; + +uint64_t uboot_loadaddr(u_int type, void *data, uint64_t addr); ssize_t uboot_copyin(const void *src, vm_offset_t dest, const size_t len); ssize_t uboot_copyout(const vm_offset_t src, void *dest, const size_t len); ssize_t uboot_readin(const int fd, vm_offset_t dest, const size_t len); From owner-svn-src-head@FreeBSD.ORG Sun May 17 23:08:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31AA8A1E; Sun, 17 May 2015 23:08:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 061AE1A87; Sun, 17 May 2015 23:08:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4HN82HJ070414; Sun, 17 May 2015 23:08:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4HN829d070411; Sun, 17 May 2015 23:08:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505172308.t4HN829d070411@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 17 May 2015 23:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283038 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 23:08:03 -0000 Author: markj Date: Sun May 17 23:08:01 2015 New Revision: 283038 URL: https://svnweb.freebsd.org/changeset/base/283038 Log: Respect the libdir option when linking drti.o, rather than hardcoding the default path of /usr/lib(32)/dtrace. MFC after: 3 weeks Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun May 17 20:39:29 2015 (r283037) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun May 17 23:08:01 2015 (r283038) @@ -1862,23 +1862,9 @@ dtrace_program_link(dtrace_hdl_t *dtp, d (void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file, fd, drti); #else const char *fmt = "%s -o %s -r %s %s"; + dt_dirpath_t *dp = dt_list_next(&dtp->dt_lib_path); -#if defined(__amd64__) - /* - * Arches which default to 64-bit need to explicitly use - * the 32-bit library path. - */ - int use_32 = (dtp->dt_oflags & DTRACE_O_ILP32); -#else - /* - * Arches which are 32-bit only just use the normal - * library path. - */ - int use_32 = 0; -#endif - - (void) snprintf(drti, sizeof (drti), "/usr/lib%s/dtrace/drti.o", - use_32 ? "32" : ""); + (void) snprintf(drti, sizeof (drti), "%s/drti.o", dp->dir_path); len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile, drti) + 1; Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun May 17 20:39:29 2015 (r283037) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun May 17 23:08:01 2015 (r283038) @@ -792,6 +792,7 @@ const char *_dtrace_libdir = "/usr/lib/d #ifdef illumos const char *_dtrace_provdir = "/dev/dtrace/provider"; /* provider directory */ #else +const char *_dtrace_libdir32 = "/usr/lib32/dtrace"; const char *_dtrace_provdir = "/dev/dtrace"; /* provider directory */ #endif @@ -1581,8 +1582,19 @@ alloc: * compile, and to provide better error reporting (because the full * reporting of compiler errors requires dtrace_open() to succeed). */ +#ifdef __FreeBSD__ +#ifdef __LP64__ + if ((dtp->dt_oflags & DTRACE_O_ILP32) != 0) { + if (dtrace_setopt(dtp, "libdir", _dtrace_libdir32) != 0) + return (set_open_errno(dtp, errp, dtp->dt_errno)); + } +#endif if (dtrace_setopt(dtp, "libdir", _dtrace_libdir) != 0) return (set_open_errno(dtp, errp, dtp->dt_errno)); +#else + if (dtrace_setopt(dtp, "libdir", _dtrace_libdir) != 0) + return (set_open_errno(dtp, errp, dtp->dt_errno)); +#endif return (dtp); } From owner-svn-src-head@FreeBSD.ORG Sun May 17 23:09:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2384FB71; Sun, 17 May 2015 23:09:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 119921A96; Sun, 17 May 2015 23:09:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4HN9w61070683; Sun, 17 May 2015 23:09:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4HN9w0l070681; Sun, 17 May 2015 23:09:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505172309.t4HN9w0l070681@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 17 May 2015 23:09:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283039 - in head/cddl: contrib/opensolaris/lib/libdtrace/common usr.sbin/dtrace/tests/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 23:09:59 -0000 Author: markj Date: Sun May 17 23:09:58 2015 New Revision: 283039 URL: https://svnweb.freebsd.org/changeset/base/283039 Log: Fix a typo that snuck in with r283024, and remove the EXFAIL annotation from a test which now passes as a result of that change. Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun May 17 23:08:01 2015 (r283038) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun May 17 23:09:58 2015 (r283039) @@ -1945,7 +1945,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d done: dtrace_dof_destroy(dtp, dof); -#ifdef illumos +#ifdef __FreeBSD__ if (!dtp->dt_lazyload) (void) unlink(tfile); #endif Modified: head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Sun May 17 23:08:01 2015 (r283038) +++ head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Sun May 17 23:09:58 2015 (r283039) @@ -38,7 +38,6 @@ exclude EXFAIL common/ip/tst.ipv4localud exclude EXFAIL common/mdb/tst.dtracedcmd.ksh exclude EXFAIL common/misc/tst.dofmax.ksh exclude EXFAIL common/misc/tst.include.ksh -exclude EXFAIL common/pragma/tst.libchain.ksh exclude EXFAIL common/safety/tst.copyin2.d exclude EXFAIL common/safety/tst.msgdsize.d exclude EXFAIL common/safety/tst.msgsize.d From owner-svn-src-head@FreeBSD.ORG Mon May 18 00:54:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26718762; Mon, 18 May 2015 00:54:06 +0000 (UTC) Received: from smtp-out-02.shaw.ca (smtp-out-02.shaw.ca [64.59.136.138]) by mx1.freebsd.org (Postfix) with ESMTP id C85BB14A6; Mon, 18 May 2015 00:54:05 +0000 (UTC) Received: from spqr.komquats.com ([24.68.119.200]) by shaw.ca with SMTP id u9JaY1cma7BFNu9JbY2ZZZ; Sun, 17 May 2015 18:53:58 -0600 X-Authority-Analysis: v=2.1 cv=D/qNUKlj c=1 sm=1 tr=0 a=DtyMuQCYAJf2vvIh/Mv8eA==:117 a=DtyMuQCYAJf2vvIh/Mv8eA==:17 a=BWvPGDcYAAAA:8 a=kj9zAlcOel0A:10 a=VxmjJ2MpAAAA:8 a=h1PgugrvaO0A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=nw-bFE1efLBgUkvGWoEA:9 a=CjuIK1q_8ugA:10 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 8C5229BF6; Sun, 17 May 2015 17:53:54 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.14.9/8.14.9) with ESMTP id t4I0rsOR020656; Sun, 17 May 2015 17:53:54 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.14.9/8.14.8/Submit) with ESMTP id t4I0rqv4020640; Sun, 17 May 2015 17:53:52 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201505180053.t4I0rqv4020640@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Andrew Turner cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282415 - head/usr.sbin/ntp In-Reply-To: Message from Andrew Turner of "Sun, 17 May 2015 19:08:10 +0100." <20150517190810.4006b7bb@bender.Home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 17 May 2015 17:53:52 -0700 X-CMAE-Envelope: MS4wfL7bdrZoWHvivWZmMaglcGrSZaIv1VkxTdX+RAKfmTclpnnYwMW7vcSCuR+wsWuPS94mXi2S54D9wtB+iU8sdnxOnCDhW5QnTD0f8SVIdXePDv7UryxGZstcUnpbEMH9AqRFfYcESIoQliEUqb6SOPmVUEXr+tcRzdwfE8dCgS8qS8XZpBH11RVeXyoGVEjuTovMcPo+7tDJe6zS4skZCgSNSlYW6RyjodYY5wqI2eBiOG/J5mf+Po3n5OJrM7SwLHJbAZJbM+LdtTq8/Op9MirciKIy833LdIL+FKrEAZU63ueBkfsHWcNe87K2cPCYWQ== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 00:54:06 -0000 In message <20150517190810.4006b7bb@bender.Home>, Andrew Turner writes: > On Mon, 4 May 2015 12:42:53 +0000 (UTC) > Cy Schubert wrote: > > > Author: cy > > Date: Mon May 4 12:42:52 2015 > > New Revision: 282415 > > URL: https://svnweb.freebsd.org/changeset/base/282415 > > > > Log: > > Restore CPU dependent compile time conditionals. > > > > MFC after: 1 month (with r281143 and r282408) > > Do you have any plans on fixing this before you MFC it? Specifically: > * sizeof(char *) == 8 on arm64, powerpc64, and mips64 > * sizeof(long) == 8 on arm64, powerpc64, and mips64 > * sizeof(time_t) == 8 on arm, arm64, powerpc64, mips, and mips64 > * STR_SYSTEM is incorrect on arm, arm64, powerpc64, mips, and mips64, > however this is now less broken as it was previously also broken on > i386, and sparc64. > > This change is only correct for amd64, i386, and sparc64. That is correct. > > I suspect all of the above will also be relevant on ia64. We still have > support in 10-STABLE for this so should be fixed before an MFC. We should support ia64 at least until it's no longer supported in -stable. > > I have heard reports that NTP is broken on some of the above platforms > so they don't keep very accurate time. Can you fix this, or revert this > change until a fix can be written. Unfortunately -stable is currently as broken as it is in -current. The quick fix is to add all supported platforms. The other unfortunate fact is that, scanning the tree for other examples there's more code as broken as this is. I propose: 1. Fix NTP -- I will do this. I have some free time coming up this week to focus on this. 2. Identify other parts of the tree needing a little love and either putting it up on the wiki or in phabricator. 3. Fix #2 (either me or others as we see fit). Alternatively, a common solution for all parts of the tree, if possible. This is probably a long term solution though. (The purist in me prefers this but I am practical too.) -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@FreeBSD.ORG Mon May 18 01:59:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4447A210; Mon, 18 May 2015 01:59:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31BD01A6B; Mon, 18 May 2015 01:59:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4I1x4TE055961; Mon, 18 May 2015 01:59:04 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I1x2L6055954; Mon, 18 May 2015 01:59:02 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505180159.t4I1x2L6055954@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Mon, 18 May 2015 01:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283042 - head/contrib/tzdata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 01:59:04 -0000 Author: edwin Date: Mon May 18 01:59:02 2015 New Revision: 283042 URL: https://svnweb.freebsd.org/changeset/base/283042 Log: MFV of 283040,tzdata{2015c} Update to tzdata2015c: Release 2015c - 2015-04-11 08:55:55 -0700 Changes affecting future time stamps Egypt's spring-forward transition is at 24:00 on April's last Thursday, not 00:00 on April's last Friday. 2015's transition will therefore be on Thursday, April 30 at 24:00, not Friday, April 24 at 00:00. Similar fixes apply to 2026, 2037, 2043, etc. (Thanks to Steffen Thorsen.) Modified: head/contrib/tzdata/africa head/contrib/tzdata/antarctica head/contrib/tzdata/backward head/contrib/tzdata/europe head/contrib/tzdata/northamerica head/contrib/tzdata/southamerica Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/africa ============================================================================== --- head/contrib/tzdata/africa Mon May 18 01:57:52 2015 (r283041) +++ head/contrib/tzdata/africa Mon May 18 01:59:02 2015 (r283042) @@ -319,13 +319,22 @@ Rule Egypt 2007 only - Sep Thu>=1 24:00 # above) says DST had no affect on electricity consumption. There is # no information about when DST will end this fall. See: # http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 -# + +# From Steffen Thorsen (2015-04-08): +# Egypt will start DST on midnight after Thursday, April 30, 2015. +# This is based on a law (no 35) from May 15, 2014 saying it starts the last +# Thursday of April.... Clocks will still be turned back for Ramadan, but +# dates not yet announced.... +# http://almogaz.com/news/weird-news/2015/04/05/1947105 ... +# http://www.timeanddate.com/news/time/egypt-starts-dst-2015.html + +# From Paul Eggert (2015-04-08): # For now, guess that later spring and fall transitions will use -# 2010's rules, and guess that Egypt will switch to standard time at +# 2014's rules, and guess that Egypt will switch to standard time at # 24:00 the last Thursday before Ramadan, and back to DST at 00:00 the # first Friday after Ramadan. To implement this, # transition dates for 2015 through 2037 were determined by running -# the following program under GNU Emacs 24.3, with the results integrated +# the following program under GNU Emacs 24.4, with the results integrated # by hand into the table below. Ramadan again intrudes on the guessed # DST starting in 2038, but that's beyond our somewhat-arbitrary cutoff. # (let ((islamic-year 1436)) @@ -357,7 +366,7 @@ Rule Egypt 2014 only - May 15 24:00 1:00 Rule Egypt 2014 only - Jun 26 24:00 0 - Rule Egypt 2014 only - Jul 31 24:00 1:00 S Rule Egypt 2014 max - Sep lastThu 24:00 0 - -Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S +Rule Egypt 2015 2019 - Apr lastThu 24:00 1:00 S Rule Egypt 2015 only - Jun 11 24:00 0 - Rule Egypt 2015 only - Jul 23 24:00 1:00 S Rule Egypt 2016 only - Jun 2 24:00 0 - @@ -371,7 +380,7 @@ Rule Egypt 2019 only - Jun 6 24:00 1:00 Rule Egypt 2020 only - May 28 24:00 1:00 S Rule Egypt 2021 only - May 13 24:00 1:00 S Rule Egypt 2022 only - May 5 24:00 1:00 S -Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S +Rule Egypt 2023 max - Apr lastThu 24:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct Modified: head/contrib/tzdata/antarctica ============================================================================== --- head/contrib/tzdata/antarctica Mon May 18 01:57:52 2015 (r283041) +++ head/contrib/tzdata/antarctica Mon May 18 01:59:02 2015 (r283042) @@ -15,41 +15,6 @@ # I made up all time zone abbreviations mentioned here; corrections welcome! # FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited. -# These rules are stolen from the 'southamerica' file. -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule ArgAQ 1964 1966 - Mar 1 0:00 0 - -Rule ArgAQ 1964 1966 - Oct 15 0:00 1:00 S -Rule ArgAQ 1967 only - Apr 2 0:00 0 - -Rule ArgAQ 1967 1968 - Oct Sun>=1 0:00 1:00 S -Rule ArgAQ 1968 1969 - Apr Sun>=1 0:00 0 - -Rule ArgAQ 1974 only - Jan 23 0:00 1:00 S -Rule ArgAQ 1974 only - May 1 0:00 0 - -Rule ChileAQ 1972 1986 - Mar Sun>=9 3:00u 0 - -Rule ChileAQ 1974 1987 - Oct Sun>=9 4:00u 1:00 S -Rule ChileAQ 1987 only - Apr 12 3:00u 0 - -Rule ChileAQ 1988 1989 - Mar Sun>=9 3:00u 0 - -Rule ChileAQ 1988 only - Oct Sun>=1 4:00u 1:00 S -Rule ChileAQ 1989 only - Oct Sun>=9 4:00u 1:00 S -Rule ChileAQ 1990 only - Mar 18 3:00u 0 - -Rule ChileAQ 1990 only - Sep 16 4:00u 1:00 S -Rule ChileAQ 1991 1996 - Mar Sun>=9 3:00u 0 - -Rule ChileAQ 1991 1997 - Oct Sun>=9 4:00u 1:00 S -Rule ChileAQ 1997 only - Mar 30 3:00u 0 - -Rule ChileAQ 1998 only - Mar Sun>=9 3:00u 0 - -Rule ChileAQ 1998 only - Sep 27 4:00u 1:00 S -Rule ChileAQ 1999 only - Apr 4 3:00u 0 - -Rule ChileAQ 1999 2010 - Oct Sun>=9 4:00u 1:00 S -Rule ChileAQ 2000 2007 - Mar Sun>=9 3:00u 0 - -# N.B.: the end of March 29 in Chile is March 30 in Universal time, -# which is used below in specifying the transition. -Rule ChileAQ 2008 only - Mar 30 3:00u 0 - -Rule ChileAQ 2009 only - Mar Sun>=9 3:00u 0 - -Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 - -Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 - -Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule ChileAQ 2012 2015 - Apr Sun>=23 3:00u 0 - -Rule ChileAQ 2012 2014 - Sep Sun>=2 4:00u 1:00 S - # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 # Carlini, Potter Cove, King George Island, -6414-0602320, since 1982-01 @@ -344,21 +309,7 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec # USA - year-round bases # # Palmer, Anvers Island, since 1965 (moved 2 miles in 1968) -# -# From Ethan Dicks (1996-10-06): -# It keeps the same time as Punta Arenas, Chile, because, just like us -# and the South Pole, that's the other end of their supply line.... -# I verified with someone who was there that since 1980, -# Palmer has followed Chile. Prior to that, before the Falklands War, -# Palmer used to be supplied from Argentina. -# -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/Palmer 0 - zzz 1965 - -4:00 ArgAQ AR%sT 1969 Oct 5 - -3:00 ArgAQ AR%sT 1982 May - -4:00 ChileAQ CL%sT 2015 Apr 26 3:00u - -3:00 - CLT -# +# See 'southamerica' for Antarctica/Palmer, since it uses South American DST. # # McMurdo Station, Ross Island, since 1955-12 # Amundsen-Scott South Pole Station, continuously occupied since 1956-11-20 Modified: head/contrib/tzdata/backward ============================================================================== --- head/contrib/tzdata/backward Mon May 18 01:57:52 2015 (r283041) +++ head/contrib/tzdata/backward Mon May 18 01:59:02 2015 (r283042) @@ -20,6 +20,7 @@ Link America/Argentina/Jujuy America/Juj Link America/Indiana/Knox America/Knox_IN Link America/Kentucky/Louisville America/Louisville Link America/Argentina/Mendoza America/Mendoza +Link America/Toronto America/Montreal Link America/Rio_Branco America/Porto_Acre Link America/Argentina/Cordoba America/Rosario Link America/Denver America/Shiprock Modified: head/contrib/tzdata/europe ============================================================================== --- head/contrib/tzdata/europe Mon May 18 01:57:52 2015 (r283041) +++ head/contrib/tzdata/europe Mon May 18 01:59:02 2015 (r283042) @@ -76,7 +76,7 @@ # 1:00:14 SET Swedish (1879-1899)* # 2:00 EET EEST Eastern Europe # 3:00 FET Further-eastern Europe (2011-2014)* -# 3:00 MSK MSD MSM* Moscow +# 3:00 MSK MSD MSM* Minsk, Moscow # From Peter Ilieve (1994-12-04), # The original six [EU members]: Belgium, France, (West) Germany, Italy, Modified: head/contrib/tzdata/northamerica ============================================================================== --- head/contrib/tzdata/northamerica Mon May 18 01:57:52 2015 (r283041) +++ head/contrib/tzdata/northamerica Mon May 18 01:59:02 2015 (r283042) @@ -1331,14 +1331,9 @@ Zone America/Moncton -4:19:08 - LMT 1883 # Quebec -# From Paul Eggert (2013-08-30): -# Since 1970 most of Quebec has been like Toronto. -# However, because earlier versions of the tz database mistakenly relied on data -# from Shanks & Pottenger saying that Quebec differed from Ontario after 1970, -# a separate entry was created for most of Quebec. We're loath to lose -# its pre-1970 info, even though the tz database is normally limited to -# zones that differ after 1970, so keep this otherwise out-of-scope entry. - +# From Paul Eggert (2015-03-24): +# See America/Toronto for most of Quebec, including Montreal. +# # Matthews and Vincent (1998) also write that Quebec east of the -63 # meridian is supposed to observe AST, but residents as far east as # Natashquan use EST/EDT, and residents east of Natashquan use AST. @@ -1352,39 +1347,10 @@ Zone America/Moncton -4:19:08 - LMT 1883 # For lack of better info, guess this practice began around 1970, contra to # Shanks & Pottenger who have this region observing AST/ADT. -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Mont 1917 only - Mar 25 2:00 1:00 D -Rule Mont 1917 only - Apr 24 0:00 0 S -Rule Mont 1919 only - Mar 31 2:30 1:00 D -Rule Mont 1919 only - Oct 25 2:30 0 S -Rule Mont 1920 only - May 2 2:30 1:00 D -Rule Mont 1920 1922 - Oct Sun>=1 2:30 0 S -Rule Mont 1921 only - May 1 2:00 1:00 D -Rule Mont 1922 only - Apr 30 2:00 1:00 D -Rule Mont 1924 only - May 17 2:00 1:00 D -Rule Mont 1924 1926 - Sep lastSun 2:30 0 S -Rule Mont 1925 1926 - May Sun>=1 2:00 1:00 D -Rule Mont 1927 1937 - Apr lastSat 24:00 1:00 D -Rule Mont 1927 1937 - Sep lastSat 24:00 0 S -Rule Mont 1938 1940 - Apr lastSun 0:00 1:00 D -Rule Mont 1938 1939 - Sep lastSun 0:00 0 S -Rule Mont 1946 1973 - Apr lastSun 2:00 1:00 D -Rule Mont 1945 1948 - Sep lastSun 2:00 0 S -Rule Mont 1949 1950 - Oct lastSun 2:00 0 S -Rule Mont 1951 1956 - Sep lastSun 2:00 0 S -Rule Mont 1957 1973 - Oct lastSun 2:00 0 S - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Blanc-Sablon -3:48:28 - LMT 1884 -4:00 Canada A%sT 1970 -4:00 - AST -Zone America/Montreal -4:54:16 - LMT 1884 - -5:00 Mont E%sT 1918 - -5:00 Canada E%sT 1919 - -5:00 Mont E%sT 1942 Feb 9 2:00s - -5:00 Canada E%sT 1946 - -5:00 Mont E%sT 1974 - -5:00 Canada E%sT # Ontario Modified: head/contrib/tzdata/southamerica ============================================================================== --- head/contrib/tzdata/southamerica Mon May 18 01:57:52 2015 (r283041) +++ head/contrib/tzdata/southamerica Mon May 18 01:59:02 2015 (r283042) @@ -1098,6 +1098,60 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # Chile +# From Paul Eggert (2015-04-03): +# Shanks & Pottenger says America/Santiago introduced standard time in +# 1890 and rounds its UTC offset to 70W40; guess that in practice this +# was the same offset as in 1916-1919. It also says Pacific/Easter +# standardized on 109W22 in 1890; assume this didn't change the clocks. +# +# Dates for America/Santiago from 1910 to 2004 are primarily from +# the following source, cited by Oscar van Vlijmen (2006-10-08): +# [1] Chile Law +# http://www.webexhibits.org/daylightsaving/chile.html +# This contains a copy of a this official table: +# Cambios en la hora oficial de Chile desde 1900 (retrieved 2008-03-30) +# http://web.archive.org/web/20080330200901/http://www.horaoficial.cl/cambio.htm +# [1] needs several corrections, though. +# +# The first set of corrections is from: +# [2] History of the Official Time of Chile +# http://www.horaoficial.cl/ing/horaof_ing.html (retrieved 2012-03-06). See: +# http://web.archive.org/web/20120306042032/http://www.horaoficial.cl/ing/horaof_ing.html +# This is an English translation of: +# Historia de la hora oficial de Chile (retrieved 2012-10-24). See: +# http://web.archive.org/web/20121024234627/http://www.horaoficial.cl/horaof.htm +# A fancier Spanish version (requiring mouse-clicking) is at: +# http://www.horaoficial.cl/historia_hora.html +# Conflicts between [1] and [2] were resolved as follows: +# +# - [1] says the 1910 transition was Jan 1, [2] says Jan 10 and cites +# Boletín Nº 1, Aviso Nº 1 (1910). Go with [2]. +# +# - [1] says SMT was -4:42:45, [2] says Chile's official time from +# 1916 to 1919 was -4:42:46.3, the meridian of Chile's National +# Astronomical Observatory (OAN), then located in what is now +# Quinta Normal in Santiago. Go with [2], rounding it to -4:42:46. +# +# - [1] says the 1918 transition was Sep 1, [2] says Sep 10 and cites +# Boletín Nº 22, Aviso Nº 129/1918 (1918-08-23). Go with [2]. +# +# - [1] does not give times for transitions; assume they occur +# at midnight mainland time, the current common practice. However, +# go with [2]'s specification of 23:00 for the 1947-05-21 transition. +# +# Another correction to [1] is from Jesper Nørgaard Welen, who +# wrote (2006-10-08), "I think that there are some obvious mistakes in +# the suggested link from Oscar van Vlijmen,... for instance entry 66 +# says that GMT-4 ended 1990-09-12 while entry 67 only begins GMT-3 at +# 1990-09-15 (they should have been 1990-09-15 and 1990-09-16 +# respectively), but anyhow it clears up some doubts too." +# +# Data for Pacific/Easter from 1910 through 1967 come from Shanks & +# Pottenger. After that, for lack of better info assume +# Pacific/Easter is always two hours behind America/Santiago; +# this is known to work for DST transitions starting in 2008 and +# may well be true for earlier transitions. + # From Eduardo Krell (1995-10-19): # The law says to switch to DST at midnight [24:00] on the second SATURDAY # of October.... The law is the same for March and October. @@ -1110,78 +1164,35 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # Because of the same drought, the government decided to end DST later, # on April 3, (one-time change). -# From Oscar van Vlijmen (2006-10-08): -# http://www.horaoficial.cl/cambio.htm - -# From Jesper Nørgaard Welen (2006-10-08): -# I think that there are some obvious mistakes in the suggested link -# from Oscar van Vlijmen,... for instance entry 66 says that GMT-4 -# ended 1990-09-12 while entry 67 only begins GMT-3 at 1990-09-15 -# (they should have been 1990-09-15 and 1990-09-16 respectively), but -# anyhow it clears up some doubts too. - -# From Paul Eggert (2014-08-12): -# The following data entries for Chile and America/Santiago are from -# (2006-09-20), transcribed by -# Jesper Nørgaard Welen. The data entries for Pacific/Easter are from Shanks -# & Pottenger, except with DST transitions after 1932 cloned from -# America/Santiago. The pre-1980 Pacific/Easter data entries are dubious, -# but we have no other source. - # From Germán Poo-Caamaño (2008-03-03): # Due to drought, Chile extends Daylight Time in three weeks. This # is one-time change (Saturday 3/29 at 24:00 for America/Santiago # and Saturday 3/29 at 22:00 for Pacific/Easter) # The Supreme Decree is located at # http://www.shoa.cl/servicios/supremo316.pdf -# and the instructions for 2008 are located in: -# http://www.horaoficial.cl/cambio.htm - +# # From José Miguel Garrido (2008-03-05): -# ... -# You could see the announces of the change on # http://www.shoa.cl/noticias/2008/04hora/hora.htm # From Angel Chiang (2010-03-04): # Subject: DST in Chile exceptionally extended to 3 April due to earthquake # http://www.gobiernodechile.cl/viewNoticia.aspx?idArticulo=30098 -# (in Spanish, last paragraph). # -# This is breaking news. There should be more information available later. - # From Arthur David Olson (2010-03-06): # Angel Chiang's message confirmed by Julio Pacheco; Julio provided a patch. -# From Glenn Eychaner (2011-03-02): -# It appears that the Chilean government has decided to postpone the -# change from summer time to winter time again, by three weeks to April -# 2nd: -# http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651 -# -# This is not yet reflected in the official "cambio de hora" site, but -# probably will be soon: -# http://www.horaoficial.cl/cambio.htm - -# From Arthur David Olson (2011-03-02): -# The emol.com article mentions a water shortage as the cause of the -# postponement, which may mean that it's not a permanent change. - # From Glenn Eychaner (2011-03-28): -# The article: # http://diario.elmercurio.com/2011/03/28/_portada/_portada/noticias/7565897A-CA86-49E6-9E03-660B21A4883E.htm?id=3D{7565897A-CA86-49E6-9E03-660B21A4883E} -# # In English: # Chile's clocks will go back an hour this year on the 7th of May instead # of this Saturday. They will go forward again the 3rd Saturday in -# August, not in October as they have since 1968. This is a pilot plan -# which will be reevaluated in 2012. +# August, not in October as they have since 1968. # From Mauricio Parada (2012-02-22), translated by Glenn Eychaner (2012-02-23): # As stated in the website of the Chilean Energy Ministry # http://www.minenergia.cl/ministerio/noticias/generales/gobierno-anuncia-fechas-de-cambio-de.html # The Chilean Government has decided to postpone the entrance into winter time -# (to leave DST) from March 11 2012 to April 28th 2012. The decision has not -# been yet formalized but it will within the next days. +# (to leave DST) from March 11 2012 to April 28th 2012.... # Quote from the website communication: # # 6. For the year 2012, the dates of entry into winter time will be as follows: @@ -1214,17 +1225,9 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # From Paul Eggert (2015-03-03): # For now, assume that the extension will persist indefinitely. -# NOTE: ChileAQ rules for Antarctic bases are stored separately in the -# 'antarctica' file. - # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Chile 1927 1932 - Sep 1 0:00 1:00 S +Rule Chile 1927 1931 - Sep 1 0:00 1:00 S Rule Chile 1928 1932 - Apr 1 0:00 0 - -Rule Chile 1942 only - Jun 1 4:00u 0 - -Rule Chile 1942 only - Aug 1 5:00u 1:00 S -Rule Chile 1946 only - Jul 15 4:00u 1:00 S -Rule Chile 1946 only - Sep 1 3:00u 0:00 - -Rule Chile 1947 only - Apr 1 4:00u 0 - Rule Chile 1968 only - Nov 3 4:00u 1:00 S Rule Chile 1969 only - Mar 30 3:00u 0 - Rule Chile 1969 only - Nov 23 4:00u 1:00 S @@ -1235,10 +1238,8 @@ Rule Chile 1972 1986 - Mar Sun>=9 3:00u Rule Chile 1973 only - Sep 30 4:00u 1:00 S Rule Chile 1974 1987 - Oct Sun>=9 4:00u 1:00 S Rule Chile 1987 only - Apr 12 3:00u 0 - -Rule Chile 1988 1989 - Mar Sun>=9 3:00u 0 - -Rule Chile 1988 only - Oct Sun>=1 4:00u 1:00 S -Rule Chile 1989 only - Oct Sun>=9 4:00u 1:00 S -Rule Chile 1990 only - Mar 18 3:00u 0 - +Rule Chile 1988 1990 - Mar Sun>=9 3:00u 0 - +Rule Chile 1988 1989 - Oct Sun>=9 4:00u 1:00 S Rule Chile 1990 only - Sep 16 4:00u 1:00 S Rule Chile 1991 1996 - Mar Sun>=9 3:00u 0 - Rule Chile 1991 1997 - Oct Sun>=9 4:00u 1:00 S @@ -1261,15 +1262,21 @@ Rule Chile 2012 2014 - Sep Sun>=2 4:00u # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Santiago -4:42:46 - LMT 1890 - -4:42:46 - SMT 1910 # Santiago Mean Time + -4:42:46 - SMT 1910 Jan 10 # Santiago Mean Time -5:00 - CLT 1916 Jul 1 # Chile Time - -4:42:46 - SMT 1918 Sep 1 # Santiago Mean Time - -4:00 - CLT 1919 Jul 1 # Chile Time - -4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time - -5:00 Chile CL%sT 1947 May 22 # Chile Time + -4:42:46 - SMT 1918 Sep 10 + -4:00 - CLT 1919 Jul 1 + -4:42:46 - SMT 1927 Sep 1 + -5:00 Chile CL%sT 1932 Sep 1 + -4:00 - CLT 1942 Jun 1 + -5:00 - CLT 1942 Aug 1 + -4:00 - CLT 1946 Jul 15 + -4:00 1:00 CLST 1946 Sep 1 # central Chile + -4:00 - CLT 1947 Apr 1 + -5:00 - CLT 1947 May 21 23:00 -4:00 Chile CL%sT 2015 Apr 26 3:00u -3:00 - CLT -Zone Pacific/Easter -7:17:44 - LMT 1890 +Zone Pacific/Easter -7:17:28 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time -6:00 Chile EAS%sT 2015 Apr 26 3:00u @@ -1279,6 +1286,25 @@ Zone Pacific/Easter -7:17:44 - LMT 1890 # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, # and Antarctic bases, are like America/Santiago. +# Antarctic base using South American rules +# (See the file 'antarctica' for more.) +# +# Palmer, Anvers Island, since 1965 (moved 2 miles in 1968) +# +# From Ethan Dicks (1996-10-06): +# It keeps the same time as Punta Arenas, Chile, because, just like us +# and the South Pole, that's the other end of their supply line.... +# I verified with someone who was there that since 1980, +# Palmer has followed Chile. Prior to that, before the Falklands War, +# Palmer used to be supplied from Argentina. +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/Palmer 0 - zzz 1965 + -4:00 Arg AR%sT 1969 Oct 5 + -3:00 Arg AR%sT 1982 May + -4:00 Chile CL%sT 2015 Apr 26 3:00u + -3:00 - CLT + # Colombia # Milne gives 4:56:16.4 for Bogotá time in 1899; round to nearest. He writes, From owner-svn-src-head@FreeBSD.ORG Mon May 18 06:02:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66F5E5B8; Mon, 18 May 2015 06:02:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BCBA12E8; Mon, 18 May 2015 06:02:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4I62N5g081301; Mon, 18 May 2015 06:02:23 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I62Nun081300; Mon, 18 May 2015 06:02:23 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505180602.t4I62Nun081300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 18 May 2015 06:02:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283048 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 06:02:23 -0000 Author: arybchik Date: Mon May 18 06:02:22 2015 New Revision: 283048 URL: https://svnweb.freebsd.org/changeset/base/283048 Log: sfxge: fix overflow queue freeze If TxQ lock is obtained, deferred packet list shold be serviced even if the packet addition fails because of overflow. Without the patch freeze happens if: - queue is not blocked (i.e. completion does not trigger unblock and service) - put-list overflow (1024 entries) - sfxge_tx_packet_add() acquires TxQ lock just as it is released it in sfxge_tx_qdpl_service() on the second CPU but before pending check - sfxge_tx_packet_add() swizzles put-list to get-list, fails because of non-tcp get-list overflow and returns without packet list service - sfxge_tx_qdpl_service() on the second CPU checks that there are no pending packets in the put-list and returns Other possible solution is to guaranee that maximum length of the put-list is less than maximum length of any get-list. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2562 Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Mon May 18 02:11:09 2015 (r283047) +++ head/sys/dev/sfxge/sfxge_tx.c Mon May 18 06:02:22 2015 (r283048) @@ -619,18 +619,12 @@ sfxge_tx_packet_add(struct sfxge_txq *tx sfxge_tx_qdpl_swizzle(txq); rc = sfxge_tx_qdpl_put_locked(txq, m); - if (rc != 0) { - SFXGE_TXQ_UNLOCK(txq); - return (rc); - } /* Try to service the list. */ sfxge_tx_qdpl_service(txq); /* Lock has been dropped. */ } else { rc = sfxge_tx_qdpl_put_unlocked(txq, m); - if (rc != 0) - return (rc); /* * Try to grab the lock again. @@ -639,7 +633,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx * the deferred packet list. If we are not able to get * the lock, another thread is processing the list. */ - if (SFXGE_TXQ_TRYLOCK(txq)) { + if ((rc == 0) && SFXGE_TXQ_TRYLOCK(txq)) { sfxge_tx_qdpl_service(txq); /* Lock has been dropped. */ } @@ -647,7 +641,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(txq); - return (0); + return (rc); } static void From owner-svn-src-head@FreeBSD.ORG Mon May 18 06:03:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E51F720; Mon, 18 May 2015 06:03:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C9C01302; Mon, 18 May 2015 06:03:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4I63MYR081487; Mon, 18 May 2015 06:03:22 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I63MJe081486; Mon, 18 May 2015 06:03:22 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505180603.t4I63MJe081486@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 18 May 2015 06:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283049 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 06:03:22 -0000 Author: arybchik Date: Mon May 18 06:03:21 2015 New Revision: 283049 URL: https://svnweb.freebsd.org/changeset/base/283049 Log: sfxge: allow to disable checksum offloads over VLAN It just affects capabilities of the created VLAN interface. Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2563 Modified: head/sys/dev/sfxge/sfxge.c Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Mon May 18 06:02:22 2015 (r283048) +++ head/sys/dev/sfxge/sfxge.c Mon May 18 06:03:21 2015 (r283049) @@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$"); IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWSTATS) #define SFXGE_CAP_ENABLE SFXGE_CAP -#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ +#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE | IFCAP_HWSTATS) MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); From owner-svn-src-head@FreeBSD.ORG Mon May 18 06:04:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 087258A5; Mon, 18 May 2015 06:04:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1C00131E; Mon, 18 May 2015 06:04:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4I64KdR081677; Mon, 18 May 2015 06:04:20 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I64Kc8081676; Mon, 18 May 2015 06:04:20 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505180604.t4I64Kc8081676@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 18 May 2015 06:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283050 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 06:04:21 -0000 Author: arybchik Date: Mon May 18 06:04:20 2015 New Revision: 283050 URL: https://svnweb.freebsd.org/changeset/base/283050 Log: sfxge: automatically turn off TSO when Tx checksum offload is disabled Also return error if TSO is requested without Tx checksum offload. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2564 Modified: head/sys/dev/sfxge/sfxge.c Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Mon May 18 06:03:21 2015 (r283049) +++ head/sys/dev/sfxge/sfxge.c Mon May 18 06:04:20 2015 (r283050) @@ -60,8 +60,9 @@ __FBSDID("$FreeBSD$"); #include "sfxge_version.h" #define SFXGE_CAP (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ - IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO | \ + IFCAP_RXCSUM | IFCAP_TXCSUM | \ IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6 | \ + IFCAP_TSO4 | IFCAP_TSO6 | \ IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWSTATS) #define SFXGE_CAP_ENABLE SFXGE_CAP @@ -283,14 +284,42 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign break; } - if (reqcap & IFCAP_TXCSUM) + /* Check request before any changes */ + if ((capchg_mask & IFCAP_TSO4) && + (reqcap & (IFCAP_TSO4 | IFCAP_TXCSUM)) == IFCAP_TSO4) { + error = EAGAIN; + SFXGE_ADAPTER_UNLOCK(sc); + if_printf(ifp, "enable txcsum before tso4\n"); + break; + } + if ((capchg_mask & IFCAP_TSO6) && + (reqcap & (IFCAP_TSO6 | IFCAP_TXCSUM_IPV6)) == IFCAP_TSO6) { + error = EAGAIN; + SFXGE_ADAPTER_UNLOCK(sc); + if_printf(ifp, "enable txcsum6 before tso6\n"); + break; + } + + if (reqcap & IFCAP_TXCSUM) { ifp->if_hwassist |= (CSUM_IP | CSUM_TCP | CSUM_UDP); - else + } else { ifp->if_hwassist &= ~(CSUM_IP | CSUM_TCP | CSUM_UDP); - if (reqcap & IFCAP_TXCSUM_IPV6) + if (reqcap & IFCAP_TSO4) { + reqcap &= ~IFCAP_TSO4; + if_printf(ifp, + "tso4 disabled due to -txcsum\n"); + } + } + if (reqcap & IFCAP_TXCSUM_IPV6) { ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); - else + } else { ifp->if_hwassist &= ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); + if (reqcap & IFCAP_TSO6) { + reqcap &= ~IFCAP_TSO6; + if_printf(ifp, + "tso6 disabled due to -txcsum6\n"); + } + } /* * The kernel takes both IFCAP_TSOx and CSUM_TSO into From owner-svn-src-head@FreeBSD.ORG Mon May 18 06:07:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A069A2B; Mon, 18 May 2015 06:07:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 486111349; Mon, 18 May 2015 06:07:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4I673Bh082092; Mon, 18 May 2015 06:07:03 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I673gc082091; Mon, 18 May 2015 06:07:03 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505180607.t4I673gc082091@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 18 May 2015 06:07:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283051 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 06:07:03 -0000 Author: arybchik Date: Mon May 18 06:07:02 2015 New Revision: 283051 URL: https://svnweb.freebsd.org/changeset/base/283051 Log: sfxge: do not advertise LRO capability if LRO is compiled out Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2565 Modified: head/sys/dev/sfxge/sfxge.c Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Mon May 18 06:04:20 2015 (r283050) +++ head/sys/dev/sfxge/sfxge.c Mon May 18 06:07:02 2015 (r283051) @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); IFCAP_RXCSUM | IFCAP_TXCSUM | \ IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6 | \ IFCAP_TSO4 | IFCAP_TSO6 | \ - IFCAP_JUMBO_MTU | IFCAP_LRO | \ + IFCAP_JUMBO_MTU | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWSTATS) #define SFXGE_CAP_ENABLE SFXGE_CAP #define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | \ @@ -89,7 +89,6 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_ring, &sfxge_tx_ring_entries, 0, "Maximum number of descriptors in a transmit ring"); - static void sfxge_reset(void *arg, int npending); @@ -377,6 +376,12 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ifp->if_capabilities = SFXGE_CAP; ifp->if_capenable = SFXGE_CAP_ENABLE; + +#ifdef SFXGE_LRO + ifp->if_capabilities |= IFCAP_LRO; + ifp->if_capenable |= IFCAP_LRO; +#endif + ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_TCP_IPV6 | CSUM_UDP_IPV6; From owner-svn-src-head@FreeBSD.ORG Mon May 18 07:22:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2180210 for ; Mon, 18 May 2015 07:22:15 +0000 (UTC) Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [IPv6:2a00:1450:400c:c00::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7268F1B33 for ; Mon, 18 May 2015 07:22:15 +0000 (UTC) Received: by wgjc11 with SMTP id c11so15318538wgj.0 for ; Mon, 18 May 2015 00:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=1n++m4/xeIjWmfx1of+qtGGpsMGbsIXgo3gBdmPFdGI=; b=PeFviCqMKNjm1ecqD0URyxpw9x5S0Qw/L3rBJFl5RN/UTm47EhW1YzbvFLT8O4Obfv sM7OS377yFGa0tmP15ZbtwIZyKvlxymFzpTJWNO3x21H6j2qSWsg1MdVNZwN1GAF4+RN SSG8qoxHDyTytcGnuKaJjJh5OZVF7rkQR96PE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=1n++m4/xeIjWmfx1of+qtGGpsMGbsIXgo3gBdmPFdGI=; b=YtsL0GbOzUoIRRdQkw3ktcmg0NOYhEJ9orvpAWzZPtb3AN0lRTxq/y0qdQAMSpTztc MzVgDIKPtfeIf6wl56SP4KDuSPkpm62utT1z4MU20YYqUNX+v9kjTGPi3FRJPnFi6iI7 OKwHT6Ub8Xk9mDW2+56ko0XzuNGZ1IHJ7E8nBAuV2vvRcKei1bCZBDSCvn0AW7Xfkt+d qoMfDeieSJfh5CMzMaqW3yG2XhFKn8rIWq6dxSbgPwr9/4x5JRIfr4C60+Bv6/wYGNGA 3TFwbZsUHwNvTYyp/PARWhUSD4per6FaShtqhUoCTTVr5Yzip0l793UeBebhn9OGGXeI vbDA== X-Gm-Message-State: ALoCoQlpNgLD4BA5Ps5CNzXPhNZ/dRRFrYFPfXPaZmX1CLQMQ0gWYl56Gdfs4zoNansqUjbedMJm X-Received: by 10.194.9.6 with SMTP id v6mr41715049wja.13.1431933733634; Mon, 18 May 2015 00:22:13 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.20.75 with HTTP; Mon, 18 May 2015 00:21:43 -0700 (PDT) In-Reply-To: <1431877581.91685.49.camel@freebsd.org> References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> <1431877581.91685.49.camel@freebsd.org> From: Eitan Adler Date: Mon, 18 May 2015 00:21:43 -0700 X-Google-Sender-Auth: TjxKPSkjznMNrSsghJDfz8KzTMc Message-ID: Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm To: Ian Lepore , phabric-admin@freebsd.org Cc: Garrett Cooper , Adrian Chadd , Zbigniew Bodek , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 07:22:16 -0000 On 17 May 2015 at 08:46, Ian Lepore wrote: > On Sat, 2015-05-16 at 21:04 -0700, Garrett Cooper wrote: >> > On May 16, 2015, at 18:45, Adrian Chadd wrote: >> > >> > Did you commit files with DOS newlines in them? :) >> > >> > tsk tsk tsk tsk tsk. I think should fix that.. >> >> Better yet it should probably be disabled in svn... >> > > Or flagged by some filter as a diff is uploaded to phabricator, since > the web display obscures whitespace. This is possible. Would blocking all diffs that match /\r\n$/ work? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Mon May 18 08:12:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A46C2B01; Mon, 18 May 2015 08:12:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92BFF10C4; Mon, 18 May 2015 08:12:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4I8C8NX044221; Mon, 18 May 2015 08:12:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I8C8Dp044220; Mon, 18 May 2015 08:12:08 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505180812.t4I8C8Dp044220@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 18 May 2015 08:12:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283052 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 08:12:10 -0000 Author: andrew Date: Mon May 18 08:12:08 2015 New Revision: 283052 URL: https://svnweb.freebsd.org/changeset/base/283052 Log: Clean up the style to be "include" and remove options already in std.armv6. Modified: head/sys/arm/conf/ALPINE Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Mon May 18 06:07:02 2015 (r283051) +++ head/sys/arm/conf/ALPINE Mon May 18 08:12:08 2015 (r283052) @@ -19,8 +19,8 @@ ident ALPINE -include "std.armv6" -include "../annapurna/alpine/std.alpine" +include "std.armv6" +include "../annapurna/alpine/std.alpine" makeoptions MODULES_OVERRIDE="" makeoptions WERROR="-Werror" @@ -35,11 +35,6 @@ options BREAK_TO_DEBUGGER options KDB options DDB #Enable the kernel debugger -# NFS support -options NFSCL #Network Filesystem Client -options NFSLOCKD #Network Lock Manager -options NFS_ROOT #NFS usable as /, requires NFSCLIENT - # Interrupt controller device gic From owner-svn-src-head@FreeBSD.ORG Mon May 18 08:14:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67238C5A; Mon, 18 May 2015 08:14:34 +0000 (UTC) Received: from prod2.absolight.net (mx3.absolight.net [IPv6:2a01:678:2:100::25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "plouf.absolight.net", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 234A210D3; Mon, 18 May 2015 08:14:33 +0000 (UTC) Received: from prod2.absolight.net (localhost [127.0.0.1]) by prod2.absolight.net (Postfix) with ESMTP id C84D9BDC24; Mon, 18 May 2015 10:14:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=absolight.fr; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=plouf; bh=Bb5t62GF56e 0GrCSSk05aMvBh+c=; b=slcIaTCXAqRyc0Io9GNcDn3SYVtd4DyLlSjHDEEyVRB +zyFIYb6tY5Is4074Ei61KoJ3Tg0TfkGknHFHdHDRL7peC1xc3g3BKuVCD/YyPgk IF+SfF15Cb8BfNq3EaybV1dQa0QYifPgYEolk0GOcbDYFwGsZ6AKmWDXtWjr7imk = Received: from atuin.in.mat.cc (atuin.in.mat.cc [79.143.241.205]) by prod2.absolight.net (Postfix) with ESMTPA id AD4CEBDC1F; Mon, 18 May 2015 10:14:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by atuin.in.mat.cc (Postfix) with ESMTP id 78A0B357389E; Mon, 18 May 2015 10:14:30 +0200 (CEST) Date: Mon, 18 May 2015 10:14:30 +0200 From: Mathieu Arnold To: Eitan Adler , Ian Lepore , phabric-admin@freebsd.org cc: Garrett Cooper , Adrian Chadd , Zbigniew Bodek , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm Message-ID: <7F73A915E7DF0EE8DC6149EC@atuin.in.mat.cc> In-Reply-To: References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> <1431877581.91685.49.camel@freebsd.org> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 08:14:34 -0000 +--On 18 mai 2015 00:21:43 -0700 Eitan Adler wrote: | On 17 May 2015 at 08:46, Ian Lepore wrote: |> On Sat, 2015-05-16 at 21:04 -0700, Garrett Cooper wrote: |>> > On May 16, 2015, at 18:45, Adrian Chadd wrote: |>> > |>> > Did you commit files with DOS newlines in them? :) |>> > |>> > tsk tsk tsk tsk tsk. I think should fix that.. |>> |>> Better yet it should probably be disabled in svn... |>> |> |> Or flagged by some filter as a diff is uploaded to phabricator, since |> the web display obscures whitespace. | | This is possible. Would blocking all diffs that match /\r\n$/ work? That would crap up all patches that match that, which is a bad idea. -- Mathieu Arnold From owner-svn-src-head@FreeBSD.ORG Mon May 18 10:15:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32D7021D; Mon, 18 May 2015 10:15:59 +0000 (UTC) Received: from mail-pd0-x232.google.com (mail-pd0-x232.google.com [IPv6:2607:f8b0:400e:c02::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF2841F35; Mon, 18 May 2015 10:15:58 +0000 (UTC) Received: by pdbqa5 with SMTP id qa5so143351020pdb.0; Mon, 18 May 2015 03:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=Kbwm98kWVqsYwD2zrxw/Eb8I82ijDEYK7QK9SMPR/jA=; b=lLpgo0SD+GNB2k+xc5xCbUpSyPHiP51k282T2xfgnfN9K9fAYH1zKIjco314yftXwT k4P/cgjjBl0F2pJ7wyxOZ1WOVw6WJ4koP6TRG4nqlvUFOQVUL7m3VnOQ5hOGeIefjqMb XgCX40tNIFA30ul3oeWUDbysCRUMQnlyboP0tfOaxIJB7EIVSEkoNcz7OTl788aTi/Lj S7rUxiwDyNUh0BiwGk9LArn070eIDZxD6h3ycavUEQnoseS4QetqN/bR7bbiI3GwP5fS 4NW0G4Qrryg6jYGPjs/Cgd0z4M/n4nBTqUe0akLZ1Iyia8oyTU1/WqWPr6vjFKd10o6k TUUw== X-Received: by 10.70.34.134 with SMTP id z6mr42870389pdi.125.1431944158270; Mon, 18 May 2015 03:15:58 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:e89f:787f:de93:2c95? ([2601:8:ab80:7d6:e89f:787f:de93:2c95]) by mx.google.com with ESMTPSA id fe10sm9575211pdb.59.2015.05.18.03.15.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 May 2015 03:15:57 -0700 (PDT) Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_467DC516-D94E-446B-9205-EA3CE8B1B1D0"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: Date: Mon, 18 May 2015 03:15:52 -0700 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <735E0F98-ACB9-4FDC-9D88-F6F32F892C35@gmail.com> References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> <1431877581.91685.49.camel@freebsd.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 10:15:59 -0000 --Apple-Mail=_467DC516-D94E-446B-9205-EA3CE8B1B1D0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On May 17, 2015, at 12:12, Bjoern A. Zeeb wrote: >=20 >> On 17 May 2015, at 15:46 , Ian Lepore wrote: >>=20 >> On Sat, 2015-05-16 at 21:04 -0700, Garrett Cooper wrote: >>>> On May 16, 2015, at 18:45, Adrian Chadd wrote: >>>>=20 >>>> Did you commit files with DOS newlines in them? :) >>>>=20 >>>> tsk tsk tsk tsk tsk. I think should fix that.. >>>=20 >>> Better yet it should probably be disabled in svn... >>>=20 >>=20 >> Or flagged by some filter as a diff is uploaded to phabricator, since >> the web display obscures whitespace. >=20 > Or rejected by an SVN commit hook? I can do the initial commit to fix the EOL property on all files under = sys/conf. Does this look ok (note: this sets the EOL-type for all = checked out files under sys/conf to LR -> \n, not CRLF -> \r\n, per = http://svnbook.red-bean.com/en/1.7/svn.advanced.props.file-portability.htm= l )? svn propset -R eol-type LF sys/conf/ sys/*/conf FWIW config(8) should support \r\n or at least be able to go between = \r\n and \n IMHO... Thanks! --Apple-Mail=_467DC516-D94E-446B-9205-EA3CE8B1B1D0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVWbvZAAoJEMZr5QU6S73eBEAH/iRe7Jj642txmByYtxzCmq1i i1tMOh4Yszf+8vnrm4TrSkLzFr88Ophd33oSfFOxLFYJnJJNmxkIvmbeKJuOU0m+ TEJjUf4TGxjD4Yq5wKebXaF93MP/sWBGoSklJBA1b9+eHYYBsISZ7WSOgxnlP/ar Mjd7XqVn7cNPPzvT0eh7WQq9WvOXHqbAmFEG8nwaZP9DCx0XmBtknbAyDVCVwinp j1GYywKjlAOnRe9w0e/pm+PFNiGSrgQBLWsjtyg8TwMTjBEHAqc5Cl0QUGpJ399c fWNQCXn/bHCdR7tC3jME8F8hz26wINeUVx+oiFN4X4iHong7+Dy+jh8A4V7Y3fM= =eBya -----END PGP SIGNATURE----- --Apple-Mail=_467DC516-D94E-446B-9205-EA3CE8B1B1D0-- From owner-svn-src-head@FreeBSD.ORG Mon May 18 10:31:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C083554; Mon, 18 May 2015 10:31:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A5B71187; Mon, 18 May 2015 10:31:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IAVOwd012356; Mon, 18 May 2015 10:31:24 GMT (envelope-from whu@FreeBSD.org) Received: (from whu@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IAVOlA012354; Mon, 18 May 2015 10:31:24 GMT (envelope-from whu@FreeBSD.org) Message-Id: <201505181031.t4IAVOlA012354@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: whu set sender to whu@FreeBSD.org using -f From: Wei Hu Date: Mon, 18 May 2015 10:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283053 - head/sys/dev/hyperv/storvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 10:31:24 -0000 Author: whu Date: Mon May 18 10:31:23 2015 New Revision: 283053 URL: https://svnweb.freebsd.org/changeset/base/283053 Log: Add support for SCSI disk hot add and remove. Also add padding according to the requirement of different hypervisor releases. Submitted by: whu Reviewed by: royger Approved by: royger MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D2512 Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c head/sys/dev/hyperv/storvsc/hv_vstorage.h Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Mon May 18 08:12:08 2015 (r283052) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Mon May 18 10:31:23 2015 (r283053) @@ -87,6 +87,8 @@ __FBSDID("$FreeBSD$"); #define STORVSC_WIN8_MAJOR 5 #define STORVSC_WIN8_MINOR 1 +#define VSTOR_PKT_SIZE (sizeof(struct vstor_packet) - vmscsi_size_delta) + #define HV_ALIGN(x, a) roundup2(x, a) struct storvsc_softc; @@ -202,6 +204,21 @@ static struct storvsc_driver_props g_drv STORVSC_RINGBUFFER_SIZE} }; +/* + * Sense buffer size changed in win8; have a run-time + * variable to track the size we should use. + */ +static int sense_buffer_size; + +/* + * The size of the vmscsi_request has changed in win8. The + * additional size is for the newly added elements in the + * structure. These elements are valid only when we are talking + * to a win8 host. + * Track the correct size we need to apply. + */ +static int vmscsi_size_delta; + static int storvsc_current_major; static int storvsc_current_minor; @@ -214,6 +231,7 @@ static void storvsc_action(struct cam_si static int create_storvsc_request(union ccb *ccb, struct hv_storvsc_request *reqp); static void storvsc_free_request(struct storvsc_softc *sc, struct hv_storvsc_request *reqp); static enum hv_storage_type storvsc_get_storage_type(device_t dev); +static void hv_storvsc_rescan_target(struct storvsc_softc *sc); static void hv_storvsc_on_channel_callback(void *context); static void hv_storvsc_on_iocompletion( struct storvsc_softc *sc, struct vstor_packet *vstor_packet, @@ -381,7 +399,7 @@ storvsc_send_multichannel_request(struct ret = hv_vmbus_channel_send_packet( dev->channel, vstor_packet, - sizeof(struct vstor_packet), + VSTOR_PKT_SIZE, (uint64_t)(uintptr_t)request, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -448,7 +466,7 @@ hv_storvsc_channel_init(struct hv_device ret = hv_vmbus_channel_send_packet( dev->channel, vstor_packet, - sizeof(struct vstor_packet), + VSTOR_PKT_SIZE, (uint64_t)(uintptr_t)request, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -481,7 +499,7 @@ hv_storvsc_channel_init(struct hv_device ret = hv_vmbus_channel_send_packet( dev->channel, vstor_packet, - sizeof(struct vstor_packet), + VSTOR_PKT_SIZE, (uint64_t)(uintptr_t)request, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -510,7 +528,7 @@ hv_storvsc_channel_init(struct hv_device ret = hv_vmbus_channel_send_packet( dev->channel, vstor_packet, - sizeof(struct vstor_packet), + VSTOR_PKT_SIZE, (uint64_t)(uintptr_t)request, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -546,7 +564,7 @@ hv_storvsc_channel_init(struct hv_device ret = hv_vmbus_channel_send_packet( dev->channel, vstor_packet, - sizeof(struct vstor_packet), + VSTOR_PKT_SIZE, (uint64_t)(uintptr_t)request, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -644,7 +662,7 @@ hv_storvsc_host_reset(struct hv_device * ret = hv_vmbus_channel_send_packet(dev->channel, vstor_packet, - sizeof(struct vstor_packet), + VSTOR_PKT_SIZE, (uint64_t)(uintptr_t)&sc->hs_reset_req, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -695,9 +713,9 @@ hv_storvsc_io_request(struct hv_device * vstor_packet->flags |= REQUEST_COMPLETION_FLAG; - vstor_packet->u.vm_srb.length = sizeof(struct vmscsi_req); + vstor_packet->u.vm_srb.length = VSTOR_PKT_SIZE; - vstor_packet->u.vm_srb.sense_info_len = SENSE_BUFFER_SIZE; + vstor_packet->u.vm_srb.sense_info_len = sense_buffer_size; vstor_packet->u.vm_srb.transfer_len = request->data_buf.length; @@ -711,14 +729,14 @@ hv_storvsc_io_request(struct hv_device * outgoing_channel, &request->data_buf, vstor_packet, - sizeof(struct vstor_packet), + VSTOR_PKT_SIZE, (uint64_t)(uintptr_t)request); } else { ret = hv_vmbus_channel_send_packet( outgoing_channel, vstor_packet, - sizeof(struct vstor_packet), + VSTOR_PKT_SIZE, (uint64_t)(uintptr_t)request, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -772,6 +790,41 @@ hv_storvsc_on_iocompletion(struct storvs } static void +hv_storvsc_rescan_target(struct storvsc_softc *sc) +{ + path_id_t pathid; + target_id_t targetid; + union ccb *ccb; + + pathid = cam_sim_path(sc->hs_sim); + targetid = CAM_TARGET_WILDCARD; + + /* + * Allocate a CCB and schedule a rescan. + */ + ccb = xpt_alloc_ccb_nowait(); + if (ccb == NULL) { + printf("unable to alloc CCB for rescan\n"); + return; + } + + if (xpt_create_path(&ccb->ccb_h.path, NULL, pathid, targetid, + CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + printf("unable to create path for rescan, pathid: %d," + "targetid: %d\n", pathid, targetid); + xpt_free_ccb(ccb); + return; + } + + if (targetid == CAM_TARGET_WILDCARD) + ccb->ccb_h.func_code = XPT_SCAN_BUS; + else + ccb->ccb_h.func_code = XPT_SCAN_TGT; + + xpt_rescan(ccb); +} + +static void hv_storvsc_on_channel_callback(void *context) { int ret = 0; @@ -801,7 +854,7 @@ hv_storvsc_on_channel_callback(void *con ret = hv_vmbus_channel_recv_packet( channel, packet, - roundup2(sizeof(struct vstor_packet), 8), + roundup2(VSTOR_PKT_SIZE, 8), &bytes_recvd, &request_id); @@ -826,11 +879,13 @@ hv_storvsc_on_channel_callback(void *con vstor_packet, request); break; case VSTOR_OPERATION_REMOVEDEVICE: - case VSTOR_OPERATION_ENUMERATE_BUS: printf("VMBUS: storvsc operation %d not " "implemented.\n", vstor_packet->operation); /* TODO: implement */ break; + case VSTOR_OPERATION_ENUMERATE_BUS: + hv_storvsc_rescan_target(sc); + break; default: break; } @@ -838,7 +893,7 @@ hv_storvsc_on_channel_callback(void *con ret = hv_vmbus_channel_recv_packet( channel, packet, - roundup2(sizeof(struct vstor_packet), 8), + roundup2(VSTOR_PKT_SIZE, 8), &bytes_recvd, &request_id); } @@ -861,13 +916,17 @@ storvsc_probe(device_t dev) int ata_disk_enable = 0; int ret = ENXIO; - if ((HV_VMBUS_VERSION_WIN8 == hv_vmbus_protocal_version) || - (HV_VMBUS_VERSION_WIN8_1 == hv_vmbus_protocal_version)){ - storvsc_current_major = STORVSC_WIN8_MAJOR; - storvsc_current_minor = STORVSC_WIN8_MINOR; - } else { + if (hv_vmbus_protocal_version == HV_VMBUS_VERSION_WS2008 || + hv_vmbus_protocal_version == HV_VMBUS_VERSION_WIN7) { + sense_buffer_size = PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE; + vmscsi_size_delta = sizeof(struct vmscsi_win8_extension); storvsc_current_major = STORVSC_WIN7_MAJOR; storvsc_current_minor = STORVSC_WIN7_MINOR; + } else { + sense_buffer_size = POST_WIN7_STORVSC_SENSE_BUFFER_SIZE; + vmscsi_size_delta = 0; + storvsc_current_major = STORVSC_WIN8_MAJOR; + storvsc_current_minor = STORVSC_WIN8_MINOR; } switch (storvsc_get_storage_type(dev)) { Modified: head/sys/dev/hyperv/storvsc/hv_vstorage.h ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_vstorage.h Mon May 18 08:12:08 2015 (r283052) +++ head/sys/dev/hyperv/storvsc/hv_vstorage.h Mon May 18 10:31:23 2015 (r283053) @@ -51,6 +51,8 @@ * V1 Beta 0.1 * V1 RC < 2008/1/31 1.0 * V1 RC > 2008/1/31 2.0 + * Win7: 4.2 + * Win8: 5.1 */ #define VMSTOR_PROTOCOL_VERSION_CURRENT VMSTOR_PROTOCOL_VERSION(5, 1) @@ -83,9 +85,25 @@ enum vstor_packet_ops { */ #define CDB16GENERIC_LENGTH 0x10 -#define SENSE_BUFFER_SIZE 0x12 +#define SENSE_BUFFER_SIZE 0x14 #define MAX_DATA_BUFFER_LENGTH_WITH_PADDING 0x14 +#define POST_WIN7_STORVSC_SENSE_BUFFER_SIZE 0x14 +#define PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE 0x12 + + +struct vmscsi_win8_extension { + /* + * The following were added in Windows 8 + */ + uint16_t reserve; + uint8_t queue_tag; + uint8_t queue_action; + uint32_t srb_flags; + uint32_t time_out_value; + uint32_t queue_sort_ey; +} __packed; + struct vmscsi_req { uint16_t length; uint8_t srb_status; @@ -114,6 +132,11 @@ struct vmscsi_req { uint8_t reserved_array[MAX_DATA_BUFFER_LENGTH_WITH_PADDING]; } u; + /* + * The following was added in win8. + */ + struct vmscsi_win8_extension win8_extension; + } __packed; /** From owner-svn-src-head@FreeBSD.ORG Mon May 18 11:02:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB93DED4; Mon, 18 May 2015 11:02:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFB011601; Mon, 18 May 2015 11:02:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IB2iLW028217; Mon, 18 May 2015 11:02:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IB2hP0028212; Mon, 18 May 2015 11:02:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505181102.t4IB2hP0028212@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 18 May 2015 11:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283056 - in head: etc etc/rc.d etc/rc.d/tests etc/tests tests tests/etc tests/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 11:02:45 -0000 Author: ngie Date: Mon May 18 11:02:43 2015 New Revision: 283056 URL: https://svnweb.freebsd.org/changeset/base/283056 Log: Move all test integration pieces for etc/ from etc/ to tests/ This is being done to fix breakage with make distribution with read-only source trees as make distribution doesn't use make obj like building tests/ does in all cases Reported by: Wolfgang Zenker Suggested by: jhb X-MFC with: r282059 MFC after: 1 week Added: head/tests/etc/ head/tests/etc/Makefile - copied, changed from r283052, head/etc/tests/Makefile head/tests/etc/rc.d/ - copied from r283052, head/etc/rc.d/tests/ Deleted: head/etc/rc.d/tests/ head/etc/tests/Makefile Modified: head/etc/Makefile head/etc/rc.d/Makefile head/tests/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Mon May 18 10:46:51 2015 (r283055) +++ head/etc/Makefile Mon May 18 11:02:43 2015 (r283056) @@ -10,10 +10,6 @@ SUBDIR= \ SUBDIR+=sendmail .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif - BIN1= crontab \ devd.conf \ devfs.conf \ Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon May 18 10:46:51 2015 (r283055) +++ head/etc/rc.d/Makefile Mon May 18 11:02:43 2015 (r283056) @@ -263,10 +263,6 @@ FILES+= routed FILES+= sendmail .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif - .if ${MK_TIMED} != "no" FILES+= timed .endif Modified: head/tests/Makefile ============================================================================== --- head/tests/Makefile Mon May 18 10:46:51 2015 (r283055) +++ head/tests/Makefile Mon May 18 11:02:43 2015 (r283056) @@ -2,6 +2,7 @@ .include +SUBDIR= etc SUBDIR= sys TESTSDIR= ${TESTSBASE} Copied and modified: head/tests/etc/Makefile (from r283052, head/etc/tests/Makefile) ============================================================================== --- head/etc/tests/Makefile Mon May 18 08:12:08 2015 (r283052, copy source) +++ head/tests/etc/Makefile Mon May 18 11:02:43 2015 (r283056) @@ -4,7 +4,9 @@ TESTSDIR= ${TESTSBASE}/etc -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${.CURDIR:H} KYUAFILE= yes +SUBDIR+= rc.d + .include From owner-svn-src-head@FreeBSD.ORG Mon May 18 11:04:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0E79235; Mon, 18 May 2015 11:04:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1D03161E; Mon, 18 May 2015 11:04:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IB49EX028487; Mon, 18 May 2015 11:04:09 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IB47kg028479; Mon, 18 May 2015 11:04:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505181104.t4IB47kg028479@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 18 May 2015 11:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283057 - in head/sys: arm/amlogic/aml8726 arm/conf conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 11:04:10 -0000 Author: andrew Date: Mon May 18 11:04:07 2015 New Revision: 283057 URL: https://svnweb.freebsd.org/changeset/base/283057 Log: Clean up the Amlogic interrupt controller driver to handle the case where we have both the Amlogic pic and a GIC. This may be the case in some configurations. Differential Revision: https://reviews.freebsd.org/D2432 Submitted by: John Wehle Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c head/sys/arm/amlogic/aml8726/aml8726_pic.c head/sys/arm/amlogic/aml8726/files.aml8726 head/sys/arm/conf/AML8726 head/sys/arm/conf/ODROIDC1 head/sys/arm/conf/VSATV102 head/sys/conf/options.arm Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_machdep.c Mon May 18 11:02:43 2015 (r283056) +++ head/sys/arm/amlogic/aml8726/aml8726_machdep.c Mon May 18 11:04:07 2015 (r283057) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -181,43 +182,31 @@ struct fdt_fixup_entry fdt_fixup_table[] { NULL, NULL } }; +#ifndef DEV_GIC static int fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, int *pol) { /* - * The single core chips have just an Amlogic PIC. However the - * multi core chips also have a GIC. + * The single core chips have just an Amlogic PIC. */ -#ifdef SMP - if (!fdt_is_compatible_strict(node, "arm,cortex-a9-gic")) -#else if (!fdt_is_compatible_strict(node, "amlogic,aml8726-pic")) -#endif return (ENXIO); *interrupt = fdt32_to_cpu(intr[1]); *trig = INTR_TRIGGER_EDGE; *pol = INTR_POLARITY_HIGH; - switch (*interrupt) { - case 30: /* INT_USB_A */ - case 31: /* INT_USB_B */ - *trig = INTR_TRIGGER_LEVEL; - break; - default: - break; - } - -#ifdef SMP - *interrupt += 32; -#endif - return (0); } +#endif fdt_pic_decode_t fdt_pic_table[] = { +#ifdef DEV_GIC + &gic_decode_fdt, +#else &fdt_pic_decode_ic, +#endif NULL }; Modified: head/sys/arm/amlogic/aml8726/aml8726_pic.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_pic.c Mon May 18 11:02:43 2015 (r283056) +++ head/sys/arm/amlogic/aml8726/aml8726_pic.c Mon May 18 11:04:07 2015 (r283057) @@ -169,7 +169,7 @@ aml8726_pic_attach(device_t dev) CSR_WRITE_4(sc, AML_PIC_0_FIRQ_SEL + i * 16, 0); } -#ifndef SMP +#ifndef DEV_GIC arm_post_filter = aml8726_pic_eoi; #else device_printf(dev, "disabled in favor of gic\n"); @@ -207,7 +207,7 @@ static devclass_t aml8726_pic_devclass; EARLY_DRIVER_MODULE(pic, simplebus, aml8726_pic_driver, aml8726_pic_devclass, 0, 0, BUS_PASS_INTERRUPT); -#ifndef SMP +#ifndef DEV_GIC int arm_get_next_irq(int last) { Modified: head/sys/arm/amlogic/aml8726/files.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/files.aml8726 Mon May 18 11:02:43 2015 (r283056) +++ head/sys/arm/amlogic/aml8726/files.aml8726 Mon May 18 11:04:07 2015 (r283057) @@ -13,7 +13,7 @@ arm/amlogic/aml8726/aml8726_mp.c option arm/amlogic/aml8726/aml8726_identsoc.c standard arm/amlogic/aml8726/aml8726_ccm.c standard arm/amlogic/aml8726/aml8726_clkmsr.c standard -arm/amlogic/aml8726/aml8726_pic.c standard +arm/amlogic/aml8726/aml8726_pic.c optional aml_pic arm/amlogic/aml8726/aml8726_rtc.c standard arm/amlogic/aml8726/aml8726_timer.c standard arm/amlogic/aml8726/aml8726_wdt.c standard Modified: head/sys/arm/conf/AML8726 ============================================================================== --- head/sys/arm/conf/AML8726 Mon May 18 11:02:43 2015 (r283056) +++ head/sys/arm/conf/AML8726 Mon May 18 11:04:07 2015 (r283057) @@ -27,7 +27,6 @@ options HZ=100 options SCHED_ULE # ULE scheduler options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options LINUX_BOOT_ABI -options SMP # Enable multiple cores # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols @@ -52,6 +51,9 @@ options WITNESS_SKIPSPIN # Don't run wi #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=axe0 +# Interrupt controller +device aml_pic + # MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards @@ -59,9 +61,6 @@ device mmcsd # mmc/sd flash cards # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:mmcsd0s2\" -# Interrupt controller -device gic - # GPIO device gpio device gpioled Modified: head/sys/arm/conf/ODROIDC1 ============================================================================== --- head/sys/arm/conf/ODROIDC1 Mon May 18 11:02:43 2015 (r283056) +++ head/sys/arm/conf/ODROIDC1 Mon May 18 11:04:07 2015 (r283057) @@ -22,5 +22,8 @@ include "AML8726" ident ODROIDC1 +# Interrupt controller +device gic + options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=odroidc1.dts Modified: head/sys/arm/conf/VSATV102 ============================================================================== --- head/sys/arm/conf/VSATV102 Mon May 18 11:02:43 2015 (r283056) +++ head/sys/arm/conf/VSATV102 Mon May 18 11:04:07 2015 (r283057) @@ -22,5 +22,8 @@ include "AML8726" ident VSATV102 +# Interrupt controller +device gic + options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=vsatv102-m6.dts Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Mon May 18 11:02:43 2015 (r283056) +++ head/sys/conf/options.arm Mon May 18 11:04:07 2015 (r283057) @@ -21,6 +21,7 @@ CPU_XSCALE_81342 opt_global.h CPU_XSCALE_IXP425 opt_global.h CPU_XSCALE_IXP435 opt_global.h CPU_XSCALE_PXA2X0 opt_global.h +DEV_GIC opt_global.h FLASHADDR opt_global.h GIC_DEFAULT_ICFGR_INIT opt_global.h IPI_IRQ_START opt_smp.h From owner-svn-src-head@FreeBSD.ORG Mon May 18 11:30:54 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A2CE993; Mon, 18 May 2015 11:30:54 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4855918CF; Mon, 18 May 2015 11:30:52 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA07047; Mon, 18 May 2015 14:30:44 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1YuJFs-000Bq6-7Y; Mon, 18 May 2015 14:30:44 +0300 Message-ID: <5559CD29.8020106@FreeBSD.org> Date: Mon, 18 May 2015 14:29:45 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r282678 - in head: share/man/man4 sys/amd64/acpica sys/amd64/include sys/dev/acpica sys/i386/acpica sys/i386/include sys/x86/include sys/x86/x86 References: <201505091228.t49CSmVv062442@svn.freebsd.org> In-Reply-To: <201505091228.t49CSmVv062442@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 11:30:54 -0000 On 09/05/2015 15:28, Konstantin Belousov wrote: > +void > +acpi_cpu_idle_mwait(uint32_t mwait_hint) > +{ > + int *state; > + > + state = (int *)PCPU_PTR(monitorbuf); > + /* > + * XXXKIB. Software coordination mode should be supported, > + * but all Intel CPUs provide hardware coordination. > + */ > + cpu_monitor(state, 0, 0); > + cpu_mwait(MWAIT_INTRBREAK, mwait_hint); > +} > + Kostik, it's been a while since I studied this code, so please pardon me if I am asking something obvious or silly. I wonder why this function does not set 'state' before monitor + mwait. As far as I can see, all other idling functions do that. And cpu_idle_wakeup() compares the state to STATE_MWAIT before changing it. So, I am concerned that if the state happens to be anything other than STATE_MWAIT when acpi_cpu_idle_mwait() is called, then cpu_idle_wakeup() won't wake up the idled CPU. It seems that if the state is not STATE_SLEEPING then an IPI won't be sent either. Actually, that leaves STATE_RUNNING is the only problematic case, but that's probably the state that the CPU would have before idling. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Mon May 18 11:41:55 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CB96E45; Mon, 18 May 2015 11:41:55 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1F7081AE2; Mon, 18 May 2015 11:41:53 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA07163; Mon, 18 May 2015 14:41:52 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1YuJQd-000BqY-UV; Mon, 18 May 2015 14:41:51 +0300 Message-ID: <5559CFC8.3090001@FreeBSD.org> Date: Mon, 18 May 2015 14:40:56 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r282678 - in head: share/man/man4 sys/amd64/acpica sys/amd64/include sys/dev/acpica sys/i386/acpica sys/i386/include sys/x86/include sys/x86/x86 References: <201505091228.t49CSmVv062442@svn.freebsd.org> <5559CD29.8020106@FreeBSD.org> In-Reply-To: <5559CD29.8020106@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 11:41:55 -0000 On 18/05/2015 14:29, Andriy Gapon wrote: > On 09/05/2015 15:28, Konstantin Belousov wrote: >> +void >> +acpi_cpu_idle_mwait(uint32_t mwait_hint) >> +{ >> + int *state; >> + >> + state = (int *)PCPU_PTR(monitorbuf); >> + /* >> + * XXXKIB. Software coordination mode should be supported, >> + * but all Intel CPUs provide hardware coordination. >> + */ >> + cpu_monitor(state, 0, 0); >> + cpu_mwait(MWAIT_INTRBREAK, mwait_hint); >> +} >> + > > Kostik, > > it's been a while since I studied this code, so please pardon me if I am asking > something obvious or silly. > > I wonder why this function does not set 'state' before monitor + mwait. > As far as I can see, all other idling functions do that. And cpu_idle_wakeup() > compares the state to STATE_MWAIT before changing it. > > So, I am concerned that if the state happens to be anything other than > STATE_MWAIT when acpi_cpu_idle_mwait() is called, then cpu_idle_wakeup() won't > wake up the idled CPU. It seems that if the state is not STATE_SLEEPING then an > IPI won't be sent either. Actually, that leaves STATE_RUNNING is the only > problematic case, but that's probably the state that the CPU would have before > idling. > After having written the above I realized what I overlooked: acpi_cpu_idle_mwait() is called from the ACPI idle method, so the state must already be set to STATE_SLEEPING. So, looks like the wake-up would always be done by an IPI... Just in case, here's what I had in my old local code: void acpi_cpu_mwait_cx(u_int hints) { int *state; state = (int *)PCPU_PTR(monitorbuf); KASSERT(*state == STATE_SLEEPING, ("cpu_mwait_cx: wrong monitorbuf state")); *state = STATE_MWAIT; cpu_monitor(state, 0, 0); if (*state == STATE_MWAIT) cpu_mwait(MWAIT_INTR_BRK, hints); /* * We should exit on any event that interrupts mwait, * because that event might be a wanted interrupt. */ *state = STATE_RUNNING; } This code also accounted for a time window between the CPU wanting to go idle and it calling mwait. During that window other CPU could want to wake up the first CPU. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Mon May 18 13:43:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C788464F; Mon, 18 May 2015 13:43:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B64271A9C; Mon, 18 May 2015 13:43:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IDhY4f008723; Mon, 18 May 2015 13:43:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IDhYCZ008722; Mon, 18 May 2015 13:43:34 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201505181343.t4IDhYCZ008722@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 18 May 2015 13:43:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283058 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 13:43:34 -0000 Author: mjg Date: Mon May 18 13:43:33 2015 New Revision: 283058 URL: https://svnweb.freebsd.org/changeset/base/283058 Log: Tidy up sys_umask a little bit Consistently use saved fdp pointer as it cannot change. If it could change the code would be already incorrect. No functional changes. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon May 18 11:04:07 2015 (r283057) +++ head/sys/kern/vfs_syscalls.c Mon May 18 13:43:33 2015 (r283058) @@ -4158,13 +4158,13 @@ sys_umask(td, uap) int newmask; } */ *uap; { - register struct filedesc *fdp; + struct filedesc *fdp; - FILEDESC_XLOCK(td->td_proc->p_fd); fdp = td->td_proc->p_fd; + FILEDESC_XLOCK(fdp); td->td_retval[0] = fdp->fd_cmask; fdp->fd_cmask = uap->newmask & ALLPERMS; - FILEDESC_XUNLOCK(td->td_proc->p_fd); + FILEDESC_XUNLOCK(fdp); return (0); } From owner-svn-src-head@FreeBSD.ORG Mon May 18 14:05:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BFD9C5E for ; Mon, 18 May 2015 14:05:14 +0000 (UTC) Received: from outbound3.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) by mx1.freebsd.org (Postfix) with SMTP id 16F151CF4 for ; Mon, 18 May 2015 14:05:14 +0000 (UTC) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Mon, 18 May 2015 14:04:18 +0000 (UTC) Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t4IE4OeM014550; Mon, 18 May 2015 08:04:26 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1431957864.91685.57.camel@freebsd.org> Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm From: Ian Lepore To: Mathieu Arnold Cc: Eitan Adler , phabric-admin@freebsd.org, Garrett Cooper , Adrian Chadd , Zbigniew Bodek , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 18 May 2015 08:04:24 -0600 In-Reply-To: <7F73A915E7DF0EE8DC6149EC@atuin.in.mat.cc> References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> <1431877581.91685.49.camel@freebsd.org> <7F73A915E7DF0EE8DC6149EC@atuin.in.mat.cc> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 14:05:14 -0000 On Mon, 2015-05-18 at 10:14 +0200, Mathieu Arnold wrote: > +--On 18 mai 2015 00:21:43 -0700 Eitan Adler wrote: > | On 17 May 2015 at 08:46, Ian Lepore wrote: > |> On Sat, 2015-05-16 at 21:04 -0700, Garrett Cooper wrote: > |>> > On May 16, 2015, at 18:45, Adrian Chadd wrote: > |>> > > |>> > Did you commit files with DOS newlines in them? :) > |>> > > |>> > tsk tsk tsk tsk tsk. I think should fix that.. > |>> > |>> Better yet it should probably be disabled in svn... > |>> > |> > |> Or flagged by some filter as a diff is uploaded to phabricator, since > |> the web display obscures whitespace. > | > | This is possible. Would blocking all diffs that match /\r\n$/ work? > > That would crap up all patches that match that, which is a bad idea. > Why would that be a bad idea? Do we have files in the system that legitimately end with MSDOS line endings that need to be preserved as such? I'm not sure blocking is the right thing anyway, it would be better if it was like a warning dialog..."The diff you just uploaded contains DOS line endings, continue?" -- Ian From owner-svn-src-head@FreeBSD.ORG Mon May 18 14:11:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE9D9FE0; Mon, 18 May 2015 14:11:15 +0000 (UTC) Received: from prod2.absolight.net (mx3.absolight.net [IPv6:2a01:678:2:100::25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "plouf.absolight.net", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 677EE1DFC; Mon, 18 May 2015 14:11:15 +0000 (UTC) Received: from prod2.absolight.net (localhost [127.0.0.1]) by prod2.absolight.net (Postfix) with ESMTP id AD426BDC25; Mon, 18 May 2015 16:11:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=absolight.fr; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=plouf; bh=keWKYU+x/CI eeYCNhR/qUqCvqw0=; b=BmnUwE0evlarmAM+XwvzVLbDbQMfrEgBpvR7AAlgyw+ mnhJpG+M7LcWjomNbtYhCuqW92iHlqsJPsKipDxNSBJ3Fk7cLBNyWKUVm306woH/ Q+/6RAeIL3RdJjwUPxMHg0E5ogT274Nc3fomK6Lz3jBHSbBqH+GXgNTi91E/watk = Received: from gw.in.absolight.net (gw-ecl.in.absolight.net [79.143.241.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gw.in.absolight.net", Issuer "CA Cert Signing Authority" (not verified)) by prod2.absolight.net (Postfix) with ESMTPSA id 91BA6BDC24; Mon, 18 May 2015 16:11:13 +0200 (CEST) Received: from ogg.in.absolight.net (ogg.in.absolight.net [79.143.241.239]) by gw.in.absolight.net (Postfix) with ESMTP id 2BD8C616A; Mon, 18 May 2015 16:11:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by ogg.in.absolight.net (Postfix) with ESMTP id 91D9C5E00B4; Mon, 18 May 2015 16:11:10 +0200 (CEST) Date: Mon, 18 May 2015 16:11:10 +0200 From: Mathieu Arnold To: Ian Lepore cc: Adrian Chadd , src-committers@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, phabric-admin@freebsd.org, Zbigniew Bodek , svn-src-head@freebsd.org, Garrett Cooper Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm Message-ID: <64FE26BD563665E5F1B3D0C8@ogg.in.absolight.net> In-Reply-To: <1431957864.91685.57.camel@freebsd.org> References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> <1431877581.91685.49.camel@freebsd.org> <7F73A915E7DF0EE8DC6149EC@atuin.in.mat.cc> <1431957864.91685.57.camel@freebsd.org> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 14:11:15 -0000 +--On 18 mai 2015 08:04:24 -0600 Ian Lepore wrote: | On Mon, 2015-05-18 at 10:14 +0200, Mathieu Arnold wrote: |> +--On 18 mai 2015 00:21:43 -0700 Eitan Adler wrote: |> | On 17 May 2015 at 08:46, Ian Lepore wrote: |> |> On Sat, 2015-05-16 at 21:04 -0700, Garrett Cooper wrote: |> |>> > On May 16, 2015, at 18:45, Adrian Chadd wrote: |> |>> > |> |>> > Did you commit files with DOS newlines in them? :) |> |>> > |> |>> > tsk tsk tsk tsk tsk. I think should fix that.. |> |>> |> |>> Better yet it should probably be disabled in svn... |> |>> |> |> |> |> Or flagged by some filter as a diff is uploaded to phabricator, since |> |> the web display obscures whitespace. |> | |> | This is possible. Would blocking all diffs that match /\r\n$/ work? |> |> That would crap up all patches that match that, which is a bad idea. |> | | Why would that be a bad idea? Do we have files in the system that | legitimately end with MSDOS line endings that need to be preserved as | such? | | I'm not sure blocking is the right thing anyway, it would be better if | it was like a warning dialog..."The diff you just uploaded contains DOS | line endings, continue?" Mmmm, if this can be done only for base, and not for ports, sure, but ports need to be able to add patches with CRLF endings, because upstream software comes in all flavors, including CRLF files we need to be able to patch. The thing is, in that case, the patch files won't be DOS files, they'll be UNIX files with some lines having \r before the end of line. -- Mathieu Arnold From owner-svn-src-head@FreeBSD.ORG Mon May 18 14:27:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CFCA51A; Mon, 18 May 2015 14:27:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2971F6D; Mon, 18 May 2015 14:27:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IER4Q9029343; Mon, 18 May 2015 14:27:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IER4Xj029342; Mon, 18 May 2015 14:27:04 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201505181427.t4IER4Xj029342@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 18 May 2015 14:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283059 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 14:27:05 -0000 Author: mjg Date: Mon May 18 14:27:04 2015 New Revision: 283059 URL: https://svnweb.freebsd.org/changeset/base/283059 Log: fd: fix imbalanced fdp unlock in F_SETLK and F_GETLK MFC after: 3 days Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Mon May 18 13:43:33 2015 (r283058) +++ head/sys/kern/kern_descrip.c Mon May 18 14:27:04 2015 (r283059) @@ -617,7 +617,6 @@ kern_fcntl(struct thread *td, int fd, in if (foffset < 0 || (flp->l_start > 0 && foffset > OFF_MAX - flp->l_start)) { - FILEDESC_SUNLOCK(fdp); error = EOVERFLOW; fdrop(fp, td); break; @@ -731,7 +730,6 @@ kern_fcntl(struct thread *td, int fd, in foffset > OFF_MAX - flp->l_start) || (flp->l_start < 0 && foffset < OFF_MIN - flp->l_start)) { - FILEDESC_SUNLOCK(fdp); error = EOVERFLOW; fdrop(fp, td); break; From owner-svn-src-head@FreeBSD.ORG Mon May 18 14:52:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3062CD2; Mon, 18 May 2015 14:52:51 +0000 (UTC) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 77C7912DD; Mon, 18 May 2015 14:52:51 +0000 (UTC) Received: by iebgx4 with SMTP id gx4so172659023ieb.0; Mon, 18 May 2015 07:52:50 -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:from:date:message-id :subject:to:cc:content-type; bh=xwEAamWIaTo4j4+ncPTGURdecOP6DbW1BEdX0Gk6oPg=; b=TB0CfNQjPVMNaZqxeetphqwnpxRNB4/qhF6uudBHChQDYhcKcNA4yVY1Y6KdcmRXSQ iam1eFuDA2CiEbcGW3wli+sVF8fkbd1JXXpQ9hd1jfcivU1FM+n8fHb+lqx7WandwYjT JIWlAF+OfUjW/gtnCMZNg9M4f97EV3GDTSKSKiORIi7eebO4oWW0TQ8vACqPWCGtnTT/ JuMkptsCIyp0xg917plCSx8J/SDW5Gr4Es+hUcfvSE468ltQuD9WF1FkRg4/bdhznHNb CsKA48RZ3fiBtJ0KEpJRRyprG1FDTGZWjZECXY1+K2KnqjSOPlo6qaetyxjp4LyF16xN tjMg== X-Received: by 10.50.126.105 with SMTP id mx9mr14830885igb.21.1431960770388; Mon, 18 May 2015 07:52:50 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.48.3 with HTTP; Mon, 18 May 2015 07:52:29 -0700 (PDT) In-Reply-To: <64FE26BD563665E5F1B3D0C8@ogg.in.absolight.net> References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> <1431877581.91685.49.camel@freebsd.org> <7F73A915E7DF0EE8DC6149EC@atuin.in.mat.cc> <1431957864.91685.57.camel@freebsd.org> <64FE26BD563665E5F1B3D0C8@ogg.in.absolight.net> From: Ed Maste Date: Mon, 18 May 2015 10:52:29 -0400 X-Google-Sender-Auth: 0Ni8BmUzSe7TrXis7HzJlRg3uiQ Message-ID: Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm To: Mathieu Arnold Cc: Ian Lepore , "src-committers@freebsd.org" , Eitan Adler , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Garrett Cooper Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 14:52:51 -0000 On 18 May 2015 at 10:11, Mathieu Arnold wrote: > > Mmmm, if this can be done only for base, and not for ports, sure, but ports > need to be able to add patches with CRLF endings, because upstream software > comes in all flavors, including CRLF files we need to be able to patch. Sure it could, we could configure it however we want. Note that we'll likely need to support CRLF in base anyway - one obvious example is test cases for CRLF handling in various tools. I'd imagine we could add an SVN keyword like fbsd:crlf=yes, along the lines of fbsd:nokeywords=yes. Do you know how common CRLF or partial CRLF files are in the ports tree? If it's only a handful that scheme could work there too. From owner-svn-src-head@FreeBSD.ORG Mon May 18 15:02:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEB9A300; Mon, 18 May 2015 15:02:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD85B1488; Mon, 18 May 2015 15:02:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IF2aVp048457; Mon, 18 May 2015 15:02:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IF2auV048455; Mon, 18 May 2015 15:02:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505181502.t4IF2auV048455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 18 May 2015 15:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283060 - in head: gnu/lib tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 15:02:37 -0000 Author: emaste Date: Mon May 18 15:02:35 2015 New Revision: 283060 URL: https://svnweb.freebsd.org/changeset/base/283060 Log: Build libgcov only if we're building base system GCC Clang uses compiler-rt for the code coverage runtime, and ports GCC provides its own libgcov. PR: 200203 (exp-run) Sponsored by: The FreeBSD Foundation Modified: head/gnu/lib/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/gnu/lib/Makefile ============================================================================== --- head/gnu/lib/Makefile Mon May 18 14:27:04 2015 (r283059) +++ head/gnu/lib/Makefile Mon May 18 15:02:35 2015 (r283060) @@ -2,10 +2,10 @@ .include -SUBDIR= csu libgcc libgcov libdialog libregex libreadline +SUBDIR= csu libgcc libdialog libregex libreadline .if ${MK_GCC} != "no" -SUBDIR+= libgomp +SUBDIR+= libgcov libgomp .endif .if ${MK_SSP} != "no" Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon May 18 14:27:04 2015 (r283059) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon May 18 15:02:35 2015 (r283060) @@ -1744,6 +1744,7 @@ OLD_FILES+=usr/include/gcc/4.2/ppc-asm.h OLD_FILES+=usr/include/gcc/4.2/spe.h .endif OLD_FILES+=usr/include/omp.h +OLD_FILES+=usr/lib/libgcov.a OLD_FILES+=usr/lib/libgomp.a OLD_FILES+=usr/lib/libgomp.so OLD_FILES+=usr/lib/libgomp.so.1 From owner-svn-src-head@FreeBSD.ORG Mon May 18 15:05:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57340602; Mon, 18 May 2015 15:05:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4573414C7; Mon, 18 May 2015 15:05:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IF5DQ4048866; Mon, 18 May 2015 15:05:13 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IF5D3G048864; Mon, 18 May 2015 15:05:13 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201505181505.t4IF5D3G048864@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 18 May 2015 15:05:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283061 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 15:05:13 -0000 Author: glebius Date: Mon May 18 15:05:12 2015 New Revision: 283061 URL: https://svnweb.freebsd.org/changeset/base/283061 Log: Don't dereference NULL is pf_get_mtag() fails. PR: 200222 Submitted by: Franco Fichtner Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Mon May 18 15:02:35 2015 (r283060) +++ head/sys/netpfil/pf/pf.c Mon May 18 15:05:12 2015 (r283061) @@ -5903,13 +5903,14 @@ done: ((pd.pf_mtag = pf_get_mtag(m)) == NULL)) { action = PF_DROP; REASON_SET(&reason, PFRES_MEMORY); + } else { + if (pqid || (pd.tos & IPTOS_LOWDELAY)) + pd.pf_mtag->qid = r->pqid; + else + pd.pf_mtag->qid = r->qid; + /* Add hints for ecn. */ + pd.pf_mtag->hdr = h; } - if (pqid || (pd.tos & IPTOS_LOWDELAY)) - pd.pf_mtag->qid = r->pqid; - else - pd.pf_mtag->qid = r->qid; - /* add hints for ecn */ - pd.pf_mtag->hdr = h; } #endif /* ALTQ */ @@ -6332,13 +6333,14 @@ done: ((pd.pf_mtag = pf_get_mtag(m)) == NULL)) { action = PF_DROP; REASON_SET(&reason, PFRES_MEMORY); + } else { + if (pd.tos & IPTOS_LOWDELAY) + pd.pf_mtag->qid = r->pqid; + else + pd.pf_mtag->qid = r->qid; + /* Add hints for ecn. */ + pd.pf_mtag->hdr = h; } - if (pd.tos & IPTOS_LOWDELAY) - pd.pf_mtag->qid = r->pqid; - else - pd.pf_mtag->qid = r->qid; - /* add hints for ecn */ - pd.pf_mtag->hdr = h; } #endif /* ALTQ */ From owner-svn-src-head@FreeBSD.ORG Mon May 18 15:41:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5FE9EA4; Mon, 18 May 2015 15:41:58 +0000 (UTC) Received: from prod2.absolight.net (mx3.absolight.net [IPv6:2a01:678:2:100::25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "plouf.absolight.net", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC7B1A21; Mon, 18 May 2015 15:41:58 +0000 (UTC) Received: from prod2.absolight.net (localhost [127.0.0.1]) by prod2.absolight.net (Postfix) with ESMTP id A890FBDC2E; Mon, 18 May 2015 17:41:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=absolight.fr; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=plouf; bh=LGpjtsLhLjF 4jejmdwrOT9CCl4w=; b=PmySj/sBdiyMX9tx0t3oxhF14kd7rXnxnWrWcrkAwKE SoZGDx6BE1E/HkQ1Bba5ZWjqSktBllhRDar2s4XyphRNoAXx4kfQvhwyBKmeyJ1i WSPyKZyVRThYw3+T9rJ153eAGCJ+eiJ21jb4TJfa7qoYeLk0gUbur0BsmMhqw4C8 = Received: from gw.in.absolight.net (gw-ecl.in.absolight.net [79.143.241.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gw.in.absolight.net", Issuer "CA Cert Signing Authority" (not verified)) by prod2.absolight.net (Postfix) with ESMTPSA id 834E6BDC25; Mon, 18 May 2015 17:41:55 +0200 (CEST) Received: from ogg.in.absolight.net (ogg.in.absolight.net [79.143.241.239]) by gw.in.absolight.net (Postfix) with ESMTP id 83F236125; Mon, 18 May 2015 17:41:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by ogg.in.absolight.net (Postfix) with ESMTP id CC40F5E0F45; Mon, 18 May 2015 17:41:53 +0200 (CEST) Date: Mon, 18 May 2015 17:41:53 +0200 From: Mathieu Arnold To: Ed Maste cc: Ian Lepore , src-committers@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Garrett Cooper Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm Message-ID: In-Reply-To: References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> <1431877581.91685.49.camel@freebsd.org> <7F73A915E7DF0EE8DC6149EC@atuin.in.mat.cc> <1431957864.91685.57.camel@freebsd.org> <64FE26BD563665E5F1B3D0C8@ogg.in.absolight.net> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 15:41:58 -0000 +--On 18 mai 2015 10:52:29 -0400 Ed Maste wrote: | On 18 May 2015 at 10:11, Mathieu Arnold wrote: |> |> Mmmm, if this can be done only for base, and not for ports, sure, but |> ports need to be able to add patches with CRLF endings, because upstream |> software comes in all flavors, including CRLF files we need to be able |> to patch. | | Sure it could, we could configure it however we want. | | Note that we'll likely need to support CRLF in base anyway - one | obvious example is test cases for CRLF handling in various tools. I'd | imagine we could add an SVN keyword like fbsd:crlf=yes, along the | lines of fbsd:nokeywords=yes. | | Do you know how common CRLF or partial CRLF files are in the ports | tree? If it's only a handful that scheme could work there too. $ ag -l '\r' /usr/ports/|wc -l 95 there's a bit more than a handful, but it could work, yes. If you want to have a look at a typical one, /usr/ports/shells/ibsh/files/patch-Makefile :-) But I think Eitan was talking about Phabricator, in this case, it'd need to work there too. -- Mathieu Arnold From owner-svn-src-head@FreeBSD.ORG Mon May 18 15:46:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAB4811F; Mon, 18 May 2015 15:46:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB9D81A8A; Mon, 18 May 2015 15:46:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IFkij4068565; Mon, 18 May 2015 15:46:44 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IFkiDo068563; Mon, 18 May 2015 15:46:44 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505181546.t4IFkiDo068563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 18 May 2015 15:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283062 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 15:46:45 -0000 Author: ian Date: Mon May 18 15:46:43 2015 New Revision: 283062 URL: https://svnweb.freebsd.org/changeset/base/283062 Log: Refactor net_getparams() to make it easier to get params from sources other than bootp and rarp. The code which splits a serverip:/rootpath string into rootip and a plain pathname is now a separate net_parse_rootpath() function that can be called by others. The code that sets the kernel env vars needed for nfs_diskless is moved into net_open() so that the variables get set no matter where the params came from. There was already code in net_open() that allowed for the possibility that some other entity has set up the network-related global variables. It uses the rootip variable as the key, assuming that if it is set all the other required variables are set too. These changes don't alter the existing behavior, they just make it easier to actually write some new code to get the params from another source (such as the U-Boot environment). Modified: head/sys/boot/common/dev_net.c head/sys/boot/common/dev_net.h Modified: head/sys/boot/common/dev_net.c ============================================================================== --- head/sys/boot/common/dev_net.c Mon May 18 15:05:12 2015 (r283061) +++ head/sys/boot/common/dev_net.c Mon May 18 15:46:43 2015 (r283062) @@ -111,6 +111,8 @@ net_init(void) static int net_open(struct open_file *f, ...) { + char temp[FNAME_SIZE]; + struct iodesc *d; va_list args; char *devname; /* Device part of file name (or NULL). */ int error = 0; @@ -140,6 +142,10 @@ net_open(struct open_file *f, ...) printf("net_open: netif_open() succeeded\n"); #endif } + /* + * If network params were not set by netif_open(), try to get + * them via bootp, rarp, etc. + */ if (rootip.s_addr == 0) { /* Get root IP address, and path, etc. */ error = net_getparams(netdev_sock); @@ -151,6 +157,20 @@ net_open(struct open_file *f, ...) return (error); } } + /* + * Set the variables required by the kernel's nfs_diskless + * mechanism. This is the minimum set of variables required to + * mount a root filesystem without needing to obtain additional + * info from bootp or other sources. + */ + d = socktodesc(netdev_sock); + sprintf(temp, "%6D", d->myea, ":"); + setenv("boot.netif.hwaddr", temp, 1); + setenv("boot.netif.ip", inet_ntoa(myip), 1); + setenv("boot.netif.netmask", intoa(netmask), 1); + setenv("boot.netif.gateway", inet_ntoa(gateip), 1); + setenv("boot.nfsroot.server", inet_ntoa(rootip), 1); + setenv("boot.nfsroot.path", rootpath, 1); } netdev_opens++; f->f_devdata = &netdev_sock; @@ -232,10 +252,7 @@ static int net_getparams(int sock) { char buf[MAXHOSTNAMELEN]; - char temp[FNAME_SIZE]; - struct iodesc *d; - int i; - n_long smask; + n_long rootaddr, smask; #ifdef SUPPORT_BOOTP /* @@ -302,21 +319,9 @@ net_getparams(int sock) return (EIO); } exit: - /* - * If present, strip the server's address off of the rootpath - * before passing it along. This allows us to be compatible with - * the kernel's diskless (BOOTP_NFSROOT) booting conventions - */ - for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) - if (rootpath[i] == ':') - break; - if (i && i != FNAME_SIZE && rootpath[i] == ':') { - rootpath[i++] = '\0'; - if (inet_addr(&rootpath[0]) != INADDR_NONE) - rootip.s_addr = inet_addr(&rootpath[0]); - bcopy(&rootpath[i], &temp[0], strlen(&rootpath[i])+1); - bcopy(&temp[0], &rootpath[0], strlen(&rootpath[i])+1); - } + if ((rootaddr = net_parse_rootpath()) != INADDR_NONE) + rootip.s_addr = rootaddr; + #ifdef NETIF_DEBUG if (debug) { printf("net_open: server addr: %s\n", inet_ntoa(rootip)); @@ -324,15 +329,6 @@ exit: } #endif - d = socktodesc(sock); - sprintf(temp, "%6D", d->myea, ":"); - setenv("boot.netif.ip", inet_ntoa(myip), 1); - setenv("boot.netif.netmask", intoa(netmask), 1); - setenv("boot.netif.gateway", inet_ntoa(gateip), 1); - setenv("boot.netif.hwaddr", temp, 1); - setenv("boot.nfsroot.server", inet_ntoa(rootip), 1); - setenv("boot.nfsroot.path", rootpath, 1); - return (0); } @@ -354,3 +350,24 @@ net_print(int verbose) } printf("\n"); } + +/* + * Strip the server's address off of the rootpath if present and return it in + * network byte order, leaving just the pathname part in the global rootpath. + */ +uint32_t +net_parse_rootpath() +{ + int i; + n_long addr = INADDR_NONE; + + for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) + if (rootpath[i] == ':') + break; + if (i && i != FNAME_SIZE && rootpath[i] == ':') { + rootpath[i++] = '\0'; + addr = inet_addr(&rootpath[0]); + bcopy(&rootpath[i], rootpath, strlen(&rootpath[i])+1); + } + return (addr); +} Modified: head/sys/boot/common/dev_net.h ============================================================================== --- head/sys/boot/common/dev_net.h Mon May 18 15:05:12 2015 (r283061) +++ head/sys/boot/common/dev_net.h Mon May 18 15:46:43 2015 (r283062) @@ -26,5 +26,11 @@ * $FreeBSD$ */ +#ifndef _BOOT_DEV_NET_H_ +#define _BOOT_DEV_NET_H_ + extern struct devsw netdev; +uint32_t net_parse_rootpath(void); + +#endif From owner-svn-src-head@FreeBSD.ORG Mon May 18 15:51:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41209343; Mon, 18 May 2015 15:51:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27DC81BB0; Mon, 18 May 2015 15:51:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IFpS4C070386; Mon, 18 May 2015 15:51:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IFpS3c070383; Mon, 18 May 2015 15:51:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201505181551.t4IFpS3c070383@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 18 May 2015 15:51:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283063 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 15:51:28 -0000 Author: glebius Date: Mon May 18 15:51:27 2015 New Revision: 283063 URL: https://svnweb.freebsd.org/changeset/base/283063 Log: A miss from r283061: don't dereference NULL is pf_get_mtag() fails. PR: 200222 Submitted by: Franco Fichtner Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Mon May 18 15:46:43 2015 (r283062) +++ head/sys/netpfil/pf/pf.c Mon May 18 15:51:27 2015 (r283063) @@ -5949,9 +5949,11 @@ done: log = 1; DPFPRINTF(PF_DEBUG_MISC, ("pf: failed to allocate tag\n")); + } else { + pd.pf_mtag->flags |= + PF_FASTFWD_OURS_PRESENT; + m->m_flags &= ~M_FASTFWD_OURS; } - pd.pf_mtag->flags |= PF_FASTFWD_OURS_PRESENT; - m->m_flags &= ~M_FASTFWD_OURS; } ip_divert_ptr(*m0, dir == PF_IN ? DIR_IN : DIR_OUT); *m0 = NULL; From owner-svn-src-head@FreeBSD.ORG Mon May 18 16:02:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EC9E5E7; Mon, 18 May 2015 16:02:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D7C71CE3; Mon, 18 May 2015 16:02:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IG2j1b077903; Mon, 18 May 2015 16:02:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IG2jSq077902; Mon, 18 May 2015 16:02:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505181602.t4IG2jSq077902@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 18 May 2015 16:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283064 - head/sys/dev/sound/pci/hda X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 16:02:45 -0000 Author: hselasky Date: Mon May 18 16:02:44 2015 New Revision: 283064 URL: https://svnweb.freebsd.org/changeset/base/283064 Log: Fix an off-by-one error by adding proper range checks when parsing the HDA association descriptors. This fixes a crash during device probe for some HDA PCI devices. Reported by: David Wolfskill Reviewed by: mav @ MFC after: 1 week Modified: head/sys/dev/sound/pci/hda/hdaa.c Modified: head/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa.c Mon May 18 15:51:27 2015 (r283063) +++ head/sys/dev/sound/pci/hda/hdaa.c Mon May 18 16:02:44 2015 (r283064) @@ -3203,7 +3203,7 @@ hdaa_audio_as_parse(struct hdaa_devinfo /* Scan associations skipping as=0. */ cnt = 0; - for (j = 1; j < 16; j++) { + for (j = 1; j < 16 && cnt < max; j++) { first = 16; hpredir = 0; for (i = devinfo->startnode; i < devinfo->endnode; i++) { From owner-svn-src-head@FreeBSD.ORG Mon May 18 16:05:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F199878; Mon, 18 May 2015 16:05:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CEB91D0D; Mon, 18 May 2015 16:05:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IG5gs1078348; Mon, 18 May 2015 16:05:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IG5glF078347; Mon, 18 May 2015 16:05:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505181605.t4IG5glF078347@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 18 May 2015 16:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283065 - head/gnu/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 16:05:42 -0000 Author: bapt Date: Mon May 18 16:05:41 2015 New Revision: 283065 URL: https://svnweb.freebsd.org/changeset/base/283065 Log: Only build libreadline if gdb is going to be built gdb is the only consumer of libreadline which is an INTERNALLIB Modified: head/gnu/lib/Makefile Modified: head/gnu/lib/Makefile ============================================================================== --- head/gnu/lib/Makefile Mon May 18 16:02:44 2015 (r283064) +++ head/gnu/lib/Makefile Mon May 18 16:05:41 2015 (r283065) @@ -2,7 +2,7 @@ .include -SUBDIR= csu libgcc libdialog libregex libreadline +SUBDIR= csu libgcc libdialog libregex .if ${MK_GCC} != "no" SUBDIR+= libgcov libgomp @@ -16,6 +16,10 @@ SUBDIR+= libssp SUBDIR+= tests .endif +.if ${MK_GDB} != "no" +SUBDIR+= libreadline +.endif + # libsupc++ uses libstdc++ headers, although 'make includes' should # have taken care of that already. .if ${MK_GNUCXX} != "no" From owner-svn-src-head@FreeBSD.ORG Mon May 18 16:12:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCB31A6C; Mon, 18 May 2015 16:12:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D99F1E06; Mon, 18 May 2015 16:12:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IGCgP6082915; Mon, 18 May 2015 16:12:42 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IGCgUB082914; Mon, 18 May 2015 16:12:42 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505181612.t4IGCgUB082914@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 18 May 2015 16:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283066 - head/sys/boot/uboot/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 16:12:42 -0000 Author: ian Date: Mon May 18 16:12:41 2015 New Revision: 283066 URL: https://svnweb.freebsd.org/changeset/base/283066 Log: Add a routine to obtain netboot parameters from the U-Boot env vars. Call it from the uboot net_init() implementation. The routine uses the standard U-Boot env vars plus a freebsd-specific variable named "rootpath" (the corresponding u-boot variable for that would be "bootfile" except that it refers to ubldr, so a new name was needed to communicate the path to ubldr). This allows ubldr to load a kernel from nfs without requiring a dhcp or bootp server to provide the server ip and rootpath parameters. Modified: head/sys/boot/uboot/lib/net.c Modified: head/sys/boot/uboot/lib/net.c ============================================================================== --- head/sys/boot/uboot/lib/net.c Mon May 18 16:05:41 2015 (r283065) +++ head/sys/boot/uboot/lib/net.c Mon May 18 16:12:41 2015 (r283066) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include "api_public.h" #include "glue.h" #include "libuboot.h" +#include "dev_net.h" static int net_probe(struct netif *, void *); static int net_match(struct netif *, void *); @@ -84,6 +85,109 @@ struct uboot_softc { static struct uboot_softc uboot_softc; +/* + * get_env_net_params() + * + * Attempt to obtain all the parms we need for netbooting from the U-Boot + * environment. If we fail to obtain the values it may still be possible to + * netboot; the net_dev code will attempt to get the values from bootp, rarp, + * and other such sources. + * + * If rootip.s_addr is non-zero net_dev assumes the required global variables + * are set and skips the bootp inquiry. For that reason, we don't set rootip + * until we've verified that we have at least the minimum required info. + * + * This is called from netif_init() which can result in it getting called + * multiple times, by design. The network code at higher layers zeroes out + * rootip when it closes a network interface, so if it gets opened again we have + * to obtain all this info again. + */ +static void +get_env_net_params() +{ + char *envstr; + in_addr_t rootaddr, serveraddr; + + /* Silently get out right away if we don't have rootpath. */ + if (ub_env_get("rootpath") == NULL) + return; + + /* + * Our own IP address must be valid. Silently get out if it's not set, + * but whine if it's there and we can't parse it. + */ + if ((envstr = ub_env_get("ipaddr")) == NULL) + return; + if ((myip.s_addr = inet_addr(envstr)) == INADDR_NONE) { + printf("Could not parse ipaddr '%s'\n", envstr); + return; + } + + /* + * Netmask is optional, default to the "natural" netmask for our IP, but + * whine if it was provided and we couldn't parse it. + */ + if ((envstr = ub_env_get("netmask")) != NULL && + (netmask = inet_addr(envstr)) == INADDR_NONE) { + printf("Could not parse netmask '%s'\n", envstr); + } + if (netmask == INADDR_NONE) { + if (IN_CLASSA(myip.s_addr)) + netmask = IN_CLASSA_NET; + else if (IN_CLASSB(myip.s_addr)) + netmask = IN_CLASSB_NET; + else + netmask = IN_CLASSC_NET; + } + + /* + * Get optional serverip before rootpath; the latter can override it. + * Whine only if it's present but can't be parsed. + */ + serveraddr = INADDR_NONE; + if ((envstr = ub_env_get("serverip")) != NULL) { + if ((serveraddr = inet_addr(envstr)) == INADDR_NONE) + printf("Could not parse serverip '%s'\n", envstr); + } + + /* + * There must be a rootpath. It may be ip:/path or it may be just the + * path in which case the ip needs to be in serverip. + */ + if ((envstr = ub_env_get("rootpath")) == NULL) + return; + strncpy(rootpath, envstr, sizeof(rootpath) - 1); + rootaddr = net_parse_rootpath(); + if (rootaddr == INADDR_NONE) + rootaddr = serveraddr; + if (rootaddr == INADDR_NONE) { + printf("No server address for rootpath '%s'\n", envstr); + return; + } + rootip.s_addr = rootaddr; + + /* + * Gateway IP is optional unless rootip is on a different net in which + * case whine if it's missing or we can't parse it, and set rootip addr + * to zero, which signals to other network code that network params + * aren't set (so it will try dhcp, bootp, etc). + */ + envstr = ub_env_get("gatewayip"); + if (!SAMENET(myip, rootip, netmask)) { + if (envstr == NULL) { + printf("Need gatewayip for a root server on a " + "different network.\n"); + rootip.s_addr = 0; + return; + } + if ((gateip.s_addr = inet_addr(envstr) == INADDR_NONE)) { + printf("Could not parse gatewayip '%s'\n", envstr); + rootip.s_addr = 0; + return; + } + } +} + static int net_match(struct netif *nif, void *machdep_hint) { @@ -222,6 +326,11 @@ net_init(struct iodesc *desc, void *mach nif->nif_driver->netif_bname, nif->nif_unit); } + /* Attempt to get netboot params from the u-boot env. */ + get_env_net_params(); + if (myip.s_addr != 0) + desc->myip = myip; + #if defined(NETIF_DEBUG) printf("network: %s%d attached to %s\n", nif->nif_driver->netif_bname, nif->nif_unit, ether_sprintf(desc->myea)); From owner-svn-src-head@FreeBSD.ORG Mon May 18 16:18:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67C0AC26; Mon, 18 May 2015 16:18:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BD5F1E47; Mon, 18 May 2015 16:18:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IGI5gO083655; Mon, 18 May 2015 16:18:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IGI4oN083653; Mon, 18 May 2015 16:18:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505181618.t4IGI4oN083653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 18 May 2015 16:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283067 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 16:18:05 -0000 Author: hselasky Date: Mon May 18 16:18:04 2015 New Revision: 283067 URL: https://svnweb.freebsd.org/changeset/base/283067 Log: Make the FIFO configuration a bit more flexible for the DWC OTG in device side mode. Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/dwc_otg.h Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Mon May 18 16:12:41 2015 (r283066) +++ head/sys/dev/usb/controller/dwc_otg.c Mon May 18 16:18:04 2015 (r283067) @@ -297,32 +297,29 @@ dwc_otg_init_fifo(struct dwc_otg_softc * if (x < sc->sc_dev_in_ep_max) { uint32_t limit; - limit = (x == 1) ? DWC_OTG_MAX_TXN : - (DWC_OTG_MAX_TXN / 2); + limit = (x == 1) ? MIN(DWC_OTG_TX_MAX_FIFO_SIZE, + DWC_OTG_MAX_TXN) : MIN(DWC_OTG_MAX_TXN / 2, + DWC_OTG_TX_MAX_FIFO_SIZE); - if (fifo_size >= limit) { - DWC_OTG_WRITE_4(sc, DOTG_DIEPTXF(x), - ((limit / 4) << 16) | - (tx_start / 4)); - tx_start += limit; - fifo_size -= limit; - pf->usb.max_in_frame_size = 0x200; - pf->usb.support_in = 1; + /* see if there is enough FIFO space */ + if (limit <= fifo_size) { pf->max_buffer = limit; - - } else if (fifo_size >= 0x80) { - DWC_OTG_WRITE_4(sc, DOTG_DIEPTXF(x), - ((0x80 / 4) << 16) | (tx_start / 4)); - tx_start += 0x80; - fifo_size -= 0x80; - pf->usb.max_in_frame_size = 0x40; pf->usb.support_in = 1; - } else { - pf->usb.is_simplex = 1; - DWC_OTG_WRITE_4(sc, DOTG_DIEPTXF(x), - (0x0 << 16) | (tx_start / 4)); + limit = MIN(DWC_OTG_TX_MAX_FIFO_SIZE, 0x40); + if (limit <= fifo_size) { + pf->usb.support_in = 1; + } else { + pf->usb.is_simplex = 1; + limit = 0; + } } + /* set FIFO size */ + DWC_OTG_WRITE_4(sc, DOTG_DIEPTXF(x), + ((limit / 4) << 16) | (tx_start / 4)); + tx_start += limit; + fifo_size -= limit; + pf->usb.max_in_frame_size = limit; } else { pf->usb.is_simplex = 1; } Modified: head/sys/dev/usb/controller/dwc_otg.h ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.h Mon May 18 16:12:41 2015 (r283066) +++ head/sys/dev/usb/controller/dwc_otg.h Mon May 18 16:18:04 2015 (r283067) @@ -38,6 +38,9 @@ #define DWC_OTG_SLOT_IDLE_MAX 3 #define DWC_OTG_SLOT_IDLE_MIN 2 #define DWC_OTG_NAK_MAX 8 /* 1 ms */ +#ifndef DWC_OTG_TX_MAX_FIFO_SIZE +#define DWC_OTG_TX_MAX_FIFO_SIZE DWC_OTG_MAX_TXN +#endif #define DWC_OTG_READ_4(sc, reg) \ bus_space_read_4((sc)->sc_io_tag, (sc)->sc_io_hdl, reg) From owner-svn-src-head@FreeBSD.ORG Mon May 18 16:28:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AE6CFAA; Mon, 18 May 2015 16:28:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69A3B1FB8; Mon, 18 May 2015 16:28:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IGSEWt088534; Mon, 18 May 2015 16:28:14 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IGSE9v088533; Mon, 18 May 2015 16:28:14 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505181628.t4IGSE9v088533@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 18 May 2015 16:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283068 - head/lib/libc/db/hash X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 16:28:14 -0000 Author: pfg Date: Mon May 18 16:28:13 2015 New Revision: 283068 URL: https://svnweb.freebsd.org/changeset/base/283068 Log: Drop some unnecessary casts. Reported by: Clang static analyzer Obtained from: NetBSD Modified: head/lib/libc/db/hash/hash.c Modified: head/lib/libc/db/hash/hash.c ============================================================================== --- head/lib/libc/db/hash/hash.c Mon May 18 16:18:04 2015 (r283067) +++ head/lib/libc/db/hash/hash.c Mon May 18 16:28:13 2015 (r283068) @@ -808,7 +808,7 @@ __expand_table(HTAB *hashp) hashp->DSIZE = dirsize << 1; } if ((hashp->dir[new_segnum] = - (SEGMENT)calloc(hashp->SGSIZE, sizeof(SEGMENT))) == NULL) + calloc(hashp->SGSIZE, sizeof(SEGMENT))) == NULL) return (-1); hashp->exsegs++; hashp->nsegs++; @@ -877,7 +877,7 @@ alloc_segs(HTAB *hashp, int nsegs) int save_errno; if ((hashp->dir = - (SEGMENT *)calloc(hashp->DSIZE, sizeof(SEGMENT *))) == NULL) { + calloc(hashp->DSIZE, sizeof(SEGMENT *))) == NULL) { save_errno = errno; (void)hdestroy(hashp); errno = save_errno; @@ -887,8 +887,7 @@ alloc_segs(HTAB *hashp, int nsegs) if (nsegs == 0) return (0); /* Allocate segments */ - if ((store = (SEGMENT)calloc(nsegs << hashp->SSHIFT, - sizeof(SEGMENT))) == NULL) { + if ((store = calloc(nsegs << hashp->SSHIFT, sizeof(SEGMENT))) == NULL) { save_errno = errno; (void)hdestroy(hashp); errno = save_errno; From owner-svn-src-head@FreeBSD.ORG Mon May 18 16:41:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97FD9813; Mon, 18 May 2015 16:41:09 +0000 (UTC) Received: from mail-pd0-x235.google.com (mail-pd0-x235.google.com [IPv6:2607:f8b0:400e:c02::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 645E81198; Mon, 18 May 2015 16:41:09 +0000 (UTC) Received: by pdbqa5 with SMTP id qa5so156239717pdb.0; Mon, 18 May 2015 09:41:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=lzJUkatJM+PXmp91jTyMvtXdRBILUh4cWyAJZGlzbEg=; b=WD8/8vzu1x/y+Rlj7lq2AXdziNmST0gKTzZUUKnwE1iVtuXGB7Ld81K+r9BCRFATy/ JLKL5OilBuRNIvVdl5rGHqmXf41XL739US8OJry6guObuX3J8hxVJc/DReV7zsZ4FtSr mxzQuRD9B/dmswvIfTxLhw2b108cWD+3rxMX1lWEKXIIJw50iGiTrS7GamRGJzj14yZb f5w3Ih8W6ABnIKFp/W3O98rm2gXn5SH5t0MjdgZArXcAIEAnBZfF0oG289pEYlXtw9fy 92a1OhcPBKU44MTrsPIXpJiyDndzmw9Ov8OuHmHdEz7izU6X0tO7te/YHk5JR6o1ZTBE 6hTw== X-Received: by 10.70.51.67 with SMTP id i3mr45808886pdo.145.1431967268736; Mon, 18 May 2015 09:41:08 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:87a:83fd:2a24:1b9d? ([2601:8:ab80:7d6:87a:83fd:2a24:1b9d]) by mx.google.com with ESMTPSA id xz3sm10542631pbc.13.2015.05.18.09.41.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 May 2015 09:41:07 -0700 (PDT) References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> <1431877581.91685.49.camel@freebsd.org> <7F73A915E7DF0EE8DC6149EC@atuin.in.mat.cc> <1431957864.91685.57.camel@freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <1431957864.91685.57.camel@freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: Cc: Mathieu Arnold , Eitan Adler , "phabric-admin@freebsd.org" , Adrian Chadd , Zbigniew Bodek , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Mailer: iPhone Mail (12F70) From: Garrett Cooper Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm Date: Mon, 18 May 2015 09:41:06 -0700 To: Ian Lepore X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 16:41:09 -0000 > On May 18, 2015, at 07:04, Ian Lepore wrote: > >> On Mon, 2015-05-18 at 10:14 +0200, Mathieu Arnold wrote: >> +--On 18 mai 2015 00:21:43 -0700 Eitan Adler wrote: >> | On 17 May 2015 at 08:46, Ian Lepore wrote: >> |> On Sat, 2015-05-16 at 21:04 -0700, Garrett Cooper wrote: >> |>> > On May 16, 2015, at 18:45, Adrian Chadd wrote: >> |>> > >> |>> > Did you commit files with DOS newlines in them? :) >> |>> > >> |>> > tsk tsk tsk tsk tsk. I think should fix that.. >> |>> >> |>> Better yet it should probably be disabled in svn... >> |>> >> |> >> |> Or flagged by some filter as a diff is uploaded to phabricator, since >> |> the web display obscures whitespace. >> | >> | This is possible. Would blocking all diffs that match /\r\n$/ work? >> >> That would crap up all patches that match that, which is a bad idea. > > Why would that be a bad idea? Do we have files in the system that > legitimately end with MSDOS line endings that need to be preserved as > such? > > I'm not sure blocking is the right thing anyway, it would be better if > it was like a warning dialog..."The diff you just uploaded contains DOS > line endings, continue?" There are some files in contrib/ with CRLF endings iirc... Thanks! From owner-svn-src-head@FreeBSD.ORG Mon May 18 16:43:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5455AF9; Mon, 18 May 2015 16:43:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3BE31270; Mon, 18 May 2015 16:43:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IGhLkp098063; Mon, 18 May 2015 16:43:21 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IGhLdg098062; Mon, 18 May 2015 16:43:21 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505181643.t4IGhLdg098062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 18 May 2015 16:43:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283069 - head/sys/boot/arm/uboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 16:43:21 -0000 Author: ian Date: Mon May 18 16:43:21 2015 New Revision: 283069 URL: https://svnweb.freebsd.org/changeset/base/283069 Log: Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr. This keeps the network interface open continuously instead of closing it after each filesystem access and reopening it before the next (causing it to re-obtain network params each time). This vastly speeds up netbooting. Modified: head/sys/boot/arm/uboot/Makefile Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Mon May 18 16:28:13 2015 (r283068) +++ head/sys/boot/arm/uboot/Makefile Mon May 18 16:43:21 2015 (r283069) @@ -77,6 +77,8 @@ LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif +CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE + .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes From owner-svn-src-head@FreeBSD.ORG Mon May 18 16:51:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2BC7F9A; Mon, 18 May 2015 16:51:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76F6912ED; Mon, 18 May 2015 16:51:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IGp6Hl003049; Mon, 18 May 2015 16:51:06 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IGp6Oj003048; Mon, 18 May 2015 16:51:06 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505181651.t4IGp6Oj003048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 18 May 2015 16:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283070 - head/gnu/usr.bin/groff/src/preproc/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 16:51:06 -0000 Author: bapt Date: Mon May 18 16:51:05 2015 New Revision: 283070 URL: https://svnweb.freebsd.org/changeset/base/283070 Log: Garbage collect GNU soelim Makefiles which are not in used anymore Deleted: head/gnu/usr.bin/groff/src/preproc/soelim/ From owner-svn-src-head@FreeBSD.ORG Mon May 18 18:03:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 461D771E; Mon, 18 May 2015 18:03:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33CBD1CB4; Mon, 18 May 2015 18:03:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4II3mEC040553; Mon, 18 May 2015 18:03:48 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4II3mLE040552; Mon, 18 May 2015 18:03:48 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505181803.t4II3mLE040552@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 18 May 2015 18:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283071 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 18:03:48 -0000 Author: loos Date: Mon May 18 18:03:47 2015 New Revision: 283071 URL: https://svnweb.freebsd.org/changeset/base/283071 Log: Properly align the header and the data columns for netstat -r with and without the -W flag. Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Mon May 18 16:51:05 2015 (r283070) +++ head/usr.bin/netstat/route.c Mon May 18 18:03:47 2015 (r283071) @@ -245,7 +245,7 @@ pr_rthdr(int af1) wid_if, wid_if, "Netif", wid_expire, "Expire"); } else { - xo_emit("{T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%*.*s} " + xo_emit("{T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%*.*s} " "{T:/%*s}\n", wid_dst, wid_dst, "Destination", wid_gw, wid_gw, "Gateway", @@ -389,7 +389,7 @@ p_rtentry_sysctl(const char *name, struc p_sockaddr("destination", &addr.u_sa, &mask.u_sa, rtm->rtm_flags, wid_dst); p_sockaddr("gateway", &gw.u_sa, NULL, RTF_HOST, wid_gw); - snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:}", + snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:} ", wid_flags); p_flags(rtm->rtm_flags, buffer); if (Wflag) { From owner-svn-src-head@FreeBSD.ORG Mon May 18 18:17:01 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D810DB8; Mon, 18 May 2015 18:17:01 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB9E61E47; Mon, 18 May 2015 18:17:00 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t4IIGtms046693 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 18 May 2015 21:16:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t4IIGtms046693 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t4IIGtkJ046692; Mon, 18 May 2015 21:16:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 18 May 2015 21:16:55 +0300 From: Konstantin Belousov To: Andriy Gapon Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r282678 - in head: share/man/man4 sys/amd64/acpica sys/amd64/include sys/dev/acpica sys/i386/acpica sys/i386/include sys/x86/include sys/x86/x86 Message-ID: <20150518181655.GF2499@kib.kiev.ua> References: <201505091228.t49CSmVv062442@svn.freebsd.org> <5559CD29.8020106@FreeBSD.org> <5559CFC8.3090001@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5559CFC8.3090001@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 18:17:01 -0000 On Mon, May 18, 2015 at 02:40:56PM +0300, Andriy Gapon wrote: > On 18/05/2015 14:29, Andriy Gapon wrote: > > On 09/05/2015 15:28, Konstantin Belousov wrote: > >> +void > >> +acpi_cpu_idle_mwait(uint32_t mwait_hint) > >> +{ > >> + int *state; > >> + > >> + state = (int *)PCPU_PTR(monitorbuf); > >> + /* > >> + * XXXKIB. Software coordination mode should be supported, > >> + * but all Intel CPUs provide hardware coordination. > >> + */ > >> + cpu_monitor(state, 0, 0); > >> + cpu_mwait(MWAIT_INTRBREAK, mwait_hint); > >> +} > >> + > > > > Kostik, > > > > it's been a while since I studied this code, so please pardon me if I am asking > > something obvious or silly. > > > > I wonder why this function does not set 'state' before monitor + mwait. > > As far as I can see, all other idling functions do that. And cpu_idle_wakeup() > > compares the state to STATE_MWAIT before changing it. > > > > So, I am concerned that if the state happens to be anything other than > > STATE_MWAIT when acpi_cpu_idle_mwait() is called, then cpu_idle_wakeup() won't > > wake up the idled CPU. It seems that if the state is not STATE_SLEEPING then an > > IPI won't be sent either. Actually, that leaves STATE_RUNNING is the only > > problematic case, but that's probably the state that the CPU would have before > > idling. > > > > After having written the above I realized what I overlooked: > acpi_cpu_idle_mwait() is called from the ACPI idle method, so the state must > already be set to STATE_SLEEPING. > So, looks like the wake-up would always be done by an IPI... > > Just in case, here's what I had in my old local code: > void > acpi_cpu_mwait_cx(u_int hints) > { > int *state; > > state = (int *)PCPU_PTR(monitorbuf); > KASSERT(*state == STATE_SLEEPING, > ("cpu_mwait_cx: wrong monitorbuf state")); > *state = STATE_MWAIT; > cpu_monitor(state, 0, 0); > if (*state == STATE_MWAIT) > cpu_mwait(MWAIT_INTR_BRK, hints); > > /* > * We should exit on any event that interrupts mwait, > * because that event might be a wanted interrupt. > */ > *state = STATE_RUNNING; > } > > This code also accounted for a time window between the CPU wanting to go idle > and it calling mwait. During that window other CPU could want to wake up the > first CPU. Right. And there is very similar, but having some small important difference, function cpu_idle_mwait(). My plan was to give the commit some time for wider testing, then axe cpu_idle_mwait and corresponding machdep.idle selector, with the move of the fast wakeup code under acpi_cpu_idle_mwait(). Additional reason to wait was the use of cpu_idle_mwait() as the 'fast' idle method for busy CPU, whatever this means. I think I would commit the patch below shortly, with 'Submitted by: avg'. diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c index 7925713..f07b97e 100644 --- a/sys/x86/x86/cpu_machdep.c +++ b/sys/x86/x86/cpu_machdep.c @@ -101,6 +101,10 @@ __FBSDID("$FreeBSD$"); #include #include +#define STATE_RUNNING 0x0 +#define STATE_MWAIT 0x1 +#define STATE_SLEEPING 0x2 + /* * Machine dependent boot() routine * @@ -134,13 +138,24 @@ acpi_cpu_idle_mwait(uint32_t mwait_hint) { int *state; - state = (int *)PCPU_PTR(monitorbuf); /* * XXXKIB. Software coordination mode should be supported, * but all Intel CPUs provide hardware coordination. */ + + state = (int *)PCPU_PTR(monitorbuf); + KASSERT(*state == STATE_SLEEPING, + ("cpu_mwait_cx: wrong monitorbuf state")); + *state = STATE_MWAIT; cpu_monitor(state, 0, 0); - cpu_mwait(MWAIT_INTRBREAK, mwait_hint); + if (*state == STATE_MWAIT) + cpu_mwait(MWAIT_INTRBREAK, mwait_hint); + + /* + * We should exit on any event that interrupts mwait, because + * that event might be a wanted interrupt. + */ + *state = STATE_RUNNING; } /* Get current clock frequency for the given cpu id. */ @@ -231,10 +246,6 @@ static int idle_mwait = 1; /* Use MONITOR/MWAIT for short idle. */ SYSCTL_INT(_machdep, OID_AUTO, idle_mwait, CTLFLAG_RWTUN, &idle_mwait, 0, "Use MONITOR/MWAIT for short idle"); -#define STATE_RUNNING 0x0 -#define STATE_MWAIT 0x1 -#define STATE_SLEEPING 0x2 - #ifndef PC98 static void cpu_idle_acpi(sbintime_t sbt) From owner-svn-src-head@FreeBSD.ORG Mon May 18 18:25:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1190253; Mon, 18 May 2015 18:25:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF2DF1F8C; Mon, 18 May 2015 18:25:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IIPdYA051068; Mon, 18 May 2015 18:25:39 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IIPdtm051066; Mon, 18 May 2015 18:25:39 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505181825.t4IIPdtm051066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 18 May 2015 18:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283072 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 18:25:40 -0000 Author: loos Date: Mon May 18 18:25:38 2015 New Revision: 283072 URL: https://svnweb.freebsd.org/changeset/base/283072 Log: Remove unnecessary devices from allwinner kernels. Modified: head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/CUBIEBOARD2 Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Mon May 18 18:03:47 2015 (r283071) +++ head/sys/arm/conf/CUBIEBOARD Mon May 18 18:25:38 2015 (r283072) @@ -96,8 +96,6 @@ device umass device loop device ether device mii -device smscphy -#device cpsw device bpf device emac Modified: head/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- head/sys/arm/conf/CUBIEBOARD2 Mon May 18 18:03:47 2015 (r283071) +++ head/sys/arm/conf/CUBIEBOARD2 Mon May 18 18:25:38 2015 (r283072) @@ -100,8 +100,6 @@ device umass device loop device ether device mii -device smscphy -#device cpsw device bpf device emac From owner-svn-src-head@FreeBSD.ORG Mon May 18 19:18:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A775DAEA; Mon, 18 May 2015 19:18:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95AF71726; Mon, 18 May 2015 19:18:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IJIhsY077734; Mon, 18 May 2015 19:18:43 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IJIhlx077733; Mon, 18 May 2015 19:18:43 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201505181918.t4IJIhlx077733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Mon, 18 May 2015 19:18:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283073 - head/usr.bin/time X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 19:18:43 -0000 Author: jmg Date: Mon May 18 19:18:42 2015 New Revision: 283073 URL: https://svnweb.freebsd.org/changeset/base/283073 Log: Don't do things we aren't allowed to do in a signal handler... Defer the work to the main thread... This fixes a possible crash if SIGINFO is delivered at the wrong time... This still leaves getrusage broken for some reason, but I believe that is a kernel issue and cannot be fixed here... Modified: head/usr.bin/time/time.c Modified: head/usr.bin/time/time.c ============================================================================== --- head/usr.bin/time/time.c Mon May 18 18:25:38 2015 (r283072) +++ head/usr.bin/time/time.c Mon May 18 19:18:42 2015 (r283073) @@ -65,6 +65,7 @@ static void showtime(FILE *, struct time static void siginfo(int); static void usage(void); +static sig_atomic_t siginfo_recvd; static char decimal_point; static struct timeval before_tv; static int hflag, pflag; @@ -130,8 +131,17 @@ main(int argc, char **argv) /* parent */ (void)signal(SIGINT, SIG_IGN); (void)signal(SIGQUIT, SIG_IGN); + siginfo_recvd = 0; (void)signal(SIGINFO, siginfo); - while (wait4(pid, &status, 0, &ru) != pid); + (void)siginterrupt(SIGINFO, 1); + while (wait4(pid, &status, 0, &ru) != pid) { + if (siginfo_recvd) { + siginfo_recvd = 0; + (void)gettimeofday(&after, NULL); + getrusage(RUSAGE_CHILDREN, &ru); + showtime(stdout, &before_tv, &after, &ru); + } + } (void)gettimeofday(&after, NULL); if ( ! WIFEXITED(status)) warnx("command terminated abnormally"); @@ -292,10 +302,6 @@ showtime(FILE *out, struct timeval *befo static void siginfo(int sig __unused) { - struct timeval after; - struct rusage ru; - (void)gettimeofday(&after, NULL); - getrusage(RUSAGE_CHILDREN, &ru); - showtime(stdout, &before_tv, &after, &ru); + siginfo_recvd = 1; } From owner-svn-src-head@FreeBSD.ORG Mon May 18 19:37:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7832144B; Mon, 18 May 2015 19:37:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4761A12; Mon, 18 May 2015 19:37:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IJbuCm087878; Mon, 18 May 2015 19:37:56 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IJbtxF087876; Mon, 18 May 2015 19:37:55 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201505181937.t4IJbtxF087876@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 18 May 2015 19:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283074 - head/sbin/geom/class/mountver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 19:37:56 -0000 Author: allanjude (doc committer) Date: Mon May 18 19:37:55 2015 New Revision: 283074 URL: https://svnweb.freebsd.org/changeset/base/283074 Log: Fix error in gmountver(8) man page Also fixes the usage statement for the binary to use the correct terms (provider and geom name, rather than dev and prov, which is incorrect in the latter case) Sync the man page summary with the new usage statement PR: 199540 Differential Revision: https://reviews.freebsd.org/D2329 Submitted by: Fabian Keil Reviewed by: trasz Approved by: eadler (mentor) Obtained from: ElectroBSD (original) MFC after: 1 week Sponsored by: ScaleEngine Inc. Modified: head/sbin/geom/class/mountver/geom_mountver.c head/sbin/geom/class/mountver/gmountver.8 Modified: head/sbin/geom/class/mountver/geom_mountver.c ============================================================================== --- head/sbin/geom/class/mountver/geom_mountver.c Mon May 18 19:18:42 2015 (r283073) +++ head/sbin/geom/class/mountver/geom_mountver.c Mon May 18 19:37:55 2015 (r283074) @@ -43,14 +43,14 @@ struct g_command class_commands[] = { { G_OPT_SENTINEL }, - "[-v] dev ..." + "[-v] prov ..." }, { "destroy", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - "[-fv] prov ..." + "[-fv] name" }, G_CMD_SENTINEL }; Modified: head/sbin/geom/class/mountver/gmountver.8 ============================================================================== --- head/sbin/geom/class/mountver/gmountver.8 Mon May 18 19:18:42 2015 (r283073) +++ head/sbin/geom/class/mountver/gmountver.8 Mon May 18 19:37:55 2015 (r283074) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 27, 2015 +.Dd May 18, 2015 .Dt GMOUNTVER 8 .Os .Sh NAME @@ -35,11 +35,11 @@ .Nm .Cm create .Op Fl v -.Ar dev ... +.Ar prov ... .Nm .Cm destroy .Op Fl fv -.Ar prov ... +.Ar name .Nm .Cm list .Nm @@ -66,8 +66,11 @@ The first argument to indicates an action to be performed: .Bl -tag -width ".Cm destroy" .It Cm create -Cache the given devices with specified -.Ar name . +Enable mount verification for the given provider. +If the operation succeeds, a new GEOM provider will be created using the +given provider's name with a +.Ql .mountver +suffix. The kernel module .Pa geom_mountver.ko will be loaded if it is not loaded already. From owner-svn-src-head@FreeBSD.ORG Mon May 18 19:45:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9447280F; Mon, 18 May 2015 19:45:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82AAA1B2D; Mon, 18 May 2015 19:45:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IJjlCq092744; Mon, 18 May 2015 19:45:47 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IJjlSC092743; Mon, 18 May 2015 19:45:47 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201505181945.t4IJjlSC092743@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 18 May 2015 19:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283075 - head/usr.sbin/bhyveload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 19:45:47 -0000 Author: allanjude (doc committer) Date: Mon May 18 19:45:46 2015 New Revision: 283075 URL: https://svnweb.freebsd.org/changeset/base/283075 Log: Fix off-by-one in array index bounds check bhyveload would allow you to create 33 entries on an array that only has 32 slots Differential Revision: https://reviews.freebsd.org/D2569 Reviewed by: araujo Approved by: neel MFC after: 1 week Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/bhyveload/bhyveload.c Modified: head/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.c Mon May 18 19:37:55 2015 (r283074) +++ head/usr.sbin/bhyveload/bhyveload.c Mon May 18 19:45:46 2015 (r283075) @@ -609,7 +609,7 @@ disk_open(char *path) { int err, fd; - if (ndisks > NDISKS) + if (ndisks >= NDISKS) return (ERANGE); err = 0; From owner-svn-src-head@FreeBSD.ORG Mon May 18 21:05:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B297D35A; Mon, 18 May 2015 21:05:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EAC21567; Mon, 18 May 2015 21:05:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IL5CTx036514; Mon, 18 May 2015 21:05:12 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IL5Chi036512; Mon, 18 May 2015 21:05:12 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505182105.t4IL5Chi036512@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Mon, 18 May 2015 21:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283079 - head/contrib/tzdata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 21:05:12 -0000 Author: edwin Date: Mon May 18 21:05:11 2015 New Revision: 283079 URL: https://svnweb.freebsd.org/changeset/base/283079 Log: MFV of 283077,tzdata2015d Update to tzdata2015d: Release 2015d - 2015-04-24 08:09:46 -0700 Changes affecting future time stamps Egypt will not observe DST in 2015 and will consider canceling it permanently. For now, assume no DST indefinitely. (Thanks to Ahmed Nazmy and Tim Parenti.) Change affecting past and future time zone abbreviations The abbreviations for Hawaii-Aleutian standard and daylight times have been changed from HAST/HADT to HST/HDT, as per US Government Printing Office style. This affects only America/Adak since 1983, as America/Honolulu was already using the new style. Modified: head/contrib/tzdata/africa head/contrib/tzdata/northamerica Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/africa ============================================================================== --- head/contrib/tzdata/africa Mon May 18 21:03:25 2015 (r283078) +++ head/contrib/tzdata/africa Mon May 18 21:05:11 2015 (r283079) @@ -328,35 +328,20 @@ Rule Egypt 2007 only - Sep Thu>=1 24:00 # http://almogaz.com/news/weird-news/2015/04/05/1947105 ... # http://www.timeanddate.com/news/time/egypt-starts-dst-2015.html -# From Paul Eggert (2015-04-08): -# For now, guess that later spring and fall transitions will use -# 2014's rules, and guess that Egypt will switch to standard time at -# 24:00 the last Thursday before Ramadan, and back to DST at 00:00 the -# first Friday after Ramadan. To implement this, -# transition dates for 2015 through 2037 were determined by running -# the following program under GNU Emacs 24.4, with the results integrated -# by hand into the table below. Ramadan again intrudes on the guessed -# DST starting in 2038, but that's beyond our somewhat-arbitrary cutoff. -# (let ((islamic-year 1436)) -# (while (< islamic-year 1460) -# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) -# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) -# (friday 5)) -# (while (/= friday (mod a 7)) -# (setq a (1- a))) -# (while (/= friday (mod b 7)) -# (setq b (1+ b))) -# (setq a (1- a)) -# (setq b (1- b)) -# (setq a (calendar-gregorian-from-absolute a)) -# (setq b (calendar-gregorian-from-absolute b)) -# (insert -# (format -# (concat "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t0\t-\n" -# "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t1:00\tS\n") -# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) -# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) -# (setq islamic-year (+ 1 islamic-year)))) +# From Ahmed Nazmy (2015-04-20): +# Egypt's ministers cabinet just announced ... that it will cancel DST at +# least for 2015. +# +# From Tim Parenti (2015-04-20): +# http://english.ahram.org.eg/WriterArticles/NewsContentP/1/128195/Egypt/No-daylight-saving-this-summer-Egypts-prime-minist.aspx +# "Egypt's cabinet agreed on Monday not to switch clocks for daylight saving +# time this summer, and carry out studies on the possibility of canceling the +# practice altogether in future years." +# +# From Paul Eggert (2015-04-20): +# For now, assume DST will be canceled. Any resumption would likely +# use different rules anyway. + Rule Egypt 2008 only - Aug lastThu 24:00 0 - Rule Egypt 2009 only - Aug 20 24:00 0 - Rule Egypt 2010 only - Aug 10 24:00 0 - @@ -365,22 +350,7 @@ Rule Egypt 2010 only - Sep lastThu 24:00 Rule Egypt 2014 only - May 15 24:00 1:00 S Rule Egypt 2014 only - Jun 26 24:00 0 - Rule Egypt 2014 only - Jul 31 24:00 1:00 S -Rule Egypt 2014 max - Sep lastThu 24:00 0 - -Rule Egypt 2015 2019 - Apr lastThu 24:00 1:00 S -Rule Egypt 2015 only - Jun 11 24:00 0 - -Rule Egypt 2015 only - Jul 23 24:00 1:00 S -Rule Egypt 2016 only - Jun 2 24:00 0 - -Rule Egypt 2016 only - Jul 7 24:00 1:00 S -Rule Egypt 2017 only - May 25 24:00 0 - -Rule Egypt 2017 only - Jun 29 24:00 1:00 S -Rule Egypt 2018 only - May 10 24:00 0 - -Rule Egypt 2018 only - Jun 14 24:00 1:00 S -Rule Egypt 2019 only - May 2 24:00 0 - -Rule Egypt 2019 only - Jun 6 24:00 1:00 S -Rule Egypt 2020 only - May 28 24:00 1:00 S -Rule Egypt 2021 only - May 13 24:00 1:00 S -Rule Egypt 2022 only - May 5 24:00 1:00 S -Rule Egypt 2023 max - Apr lastThu 24:00 1:00 S +Rule Egypt 2014 only - Sep lastThu 24:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct Modified: head/contrib/tzdata/northamerica ============================================================================== --- head/contrib/tzdata/northamerica Mon May 18 21:03:25 2015 (r283078) +++ head/contrib/tzdata/northamerica Mon May 18 21:05:11 2015 (r283079) @@ -227,9 +227,14 @@ Zone PST8PDT -8:00 US P%sT # The law doesn't give abbreviations. # # From Paul Eggert (2000-01-08), following a heads-up from Rives McDow: -# Public law 106-564 (2000-12-23) introduced the abbreviation -# "Chamorro Standard Time" for time in Guam and the Northern Marianas. -# See the file "australasia". +# Public law 106-564 (2000-12-23) introduced ... "Chamorro Standard Time" +# for time in Guam and the Northern Marianas. See the file "australasia". +# +# From Paul Eggert (2015-04-17): +# HST and HDT are standardized abbreviations for Hawaii-Aleutian +# standard and daylight times. See section 9.47 (p 234) of the +# U.S. Government Printing Office Style Manual (2008) +# http://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf # From Arthur David Olson, 2005-08-09 # The following was signed into law on 2005-08-08. @@ -536,7 +541,7 @@ Zone America/Adak 12:13:21 - LMT 1867 O -11:00 - BST 1969 -11:00 US B%sT 1983 Oct 30 2:00 -10:00 US AH%sT 1983 Nov 30 - -10:00 US HA%sT + -10:00 US H%sT # The following switches don't quite make our 1970 cutoff. # # Shanks writes that part of southwest Alaska (e.g. Aniak) @@ -1841,17 +1846,115 @@ Zone America/Creston -7:46:04 - LMT 1884 # Dawson switched to PST in 1973. Inuvik switched to MST in 1979. # Mathew Englander (1996-10-07) gives the following refs: # * 1967. Paragraph 28(34)(g) of the Interpretation Act, S.C. 1967-68, -# c. 7 defines Yukon standard time as UTC-9. This is still valid; +# c. 7 defines Yukon standard time as UTC-9.... # see Interpretation Act, R.S.C. 1985, c. I-21, s. 35(1). +# [http://canlii.ca/t/7vhg] # * C.O. 1973/214 switched Yukon to PST on 1973-10-28 00:00. # * O.I.C. 1980/02 established DST. # * O.I.C. 1987/056 changed DST to Apr firstSun 2:00 to Oct lastSun 2:00. -# Shanks & Pottenger say Yukon's 1973-10-28 switch was at 2:00; go -# with Englander. -# From Chris Walton (2006-06-26): -# Here is a link to the old daylight saving portion of the interpretation -# act which was last updated in 1987: -# http://www.gov.yk.ca/legislation/regs/oic1987_056.pdf + +# From Brian Inglis (2015-04-14): +# +# I tried to trace the history of Yukon time and found the following +# regulations, giving the reference title and URL if found, regulation name, +# and relevant quote if available. Each regulation specifically revokes its +# predecessor. The final reference is to the current Interpretation Act +# authorizing and resulting from these regulatory changes. +# +# Only recent regulations were retrievable via Yukon government site search or +# index, and only some via Canadian legal sources. Other sources used include +# articles titled "Standard Time and Time Zones in Canada" from JRASC via ADS +# Abstracts, cited by ADO for 1932 ..., and updated versions from 1958 and +# 1970 quoted below; each article includes current extracts from provincial +# and territorial ST and DST regulations at the end, summaries and details of +# standard times and daylight saving time at many locations across Canada, +# with time zone maps, tables and calculations for Canadian Sunrise, Sunset, +# and LMST; they also cover many countries and global locations, with a chart +# and table showing current Universal Time offsets, and may be useful as +# another source of information for 1970 and earlier. +# +# * Standard Time and Time Zones in Canada; Smith, C.C.; JRASC, Vol. 26, +# pp.49-77; February 1932; SAO/NASA Astrophysics Data System (ADS) +# http://adsabs.harvard.edu/abs/1932JRASC..26...49S from p.75: +# Yukon Interpretation Ordinance +# Yukon standard time is the local mean time at the one hundred and +# thirty-fifth meridian. +# +# * Standard Time and Time Zones in Canada; Smith, C.C.; Thomson, Malcolm M.; +# JRASC, Vol. 52, pp.193-223; October 1958; SAO/NASA Astrophysics Data System +# (ADS) http://adsabs.harvard.edu/abs/1958JRASC..52..193S from pp.220-1: +# Yukon Interpretation Ordinance, 1955, Chap. 16. +# +# (1) Subject to this section, standard time shall be reckoned as nine +# hours behind Greenwich Time and called Yukon Standard Time. +# +# (2) Notwithstanding subsection (1), the Commissioner may make regulations +# varying the manner of reckoning standard time. +# +# * Yukon Territory Commissioner's Order 1966-20 Interpretation Ordinance +# http://? - no online source found +# +# * Standard Time and Time Zones in Canada; Thomson, Malcolm M.; JRASC, +# Vol. 64, pp.129-162; June 1970; SAO/NASA Astrophysics Data System (ADS) +# http://adsabs.harvard.edu/abs/1970JRASC..64..129T from p.156: Yukon +# Territory Commissioner's Order 1967-59 Interpretation Ordinance ... +# +# 1. Commissioner's Order 1966-20 dated at Whitehorse in the Yukon +# Territory on 27th January, 1966, is hereby revoked. +# +# 2. Yukon (East) Standard Time as defined by section 36 of the +# Interpretation Ordinance from and after mid-night on the 28th day of May, +# 1967 shall be reckoned in the same manner as Pacific Standard Time, that +# is to say, eight hours behind Greenwich Time in the area of the Yukon +# Territory lying east of the 138th degree longitude west. +# +# 3. In the remainder of the Territory, lying west of the 138th degree +# longitude west, Yukon (West) Standard Time shall be reckoned as nine +# hours behind Greenwich Time. +# +# * Yukon Standard Time defined as Pacific Standard Time, YCO 1973/214 +# http://www.canlii.org/en/yk/laws/regu/yco-1973-214/latest/yco-1973-214.html +# C.O. 1973/214 INTERPRETATION ACT ... +# +# 1. Effective October 28, 1973 Commissioner's Order 1967/59 is hereby +# revoked. +# +# 2. Yukon Standard Time as defined by section 36 of the Interpretation +# Act from and after midnight on the twenty-eighth day of October, 1973 +# shall be reckoned in the same manner as Pacific Standard Time, that is +# to say eight hours behind Greenwich Time. +# +# * O.I.C. 1980/02 INTERPRETATION ACT +# http://? - no online source found +# +# * Yukon Daylight Saving Time, YOIC 1987/56 +# http://www.canlii.org/en/yk/laws/regu/yoic-1987-56/latest/yoic-1987-56.html +# O.I.C. 1987/056 INTERPRETATION ACT ... +# +# In every year between +# (a) two o'clock in the morning in the first Sunday in April, and +# (b) two o'clock in the morning in the last Sunday in October, +# Standard Time shall be reckoned as seven hours behind Greenwich Time and +# called Yukon Daylight Saving Time. +# ... +# Dated ... 9th day of March, A.D., 1987. +# +# * Yukon Daylight Saving Time 2006, YOIC 2006/127 +# http://www.canlii.org/en/yk/laws/regu/yoic-2006-127/latest/yoic-2006-127.html +# O.I.C. 2006/127 INTERPRETATION ACT ... +# +# 1. In Yukon each year the time for general purposes shall be 7 hours +# behind Greenwich mean time during the period commencing at two o'clock +# in the forenoon on the second Sunday of March and ending at two o'clock +# in the forenoon on the first Sunday of November and shall be called +# Yukon Daylight Saving Time. +# +# 2. Order-in-Council 1987/56 is revoked. +# +# 3. This order comes into force January 1, 2007. +# +# * Interpretation Act, RSY 2002, c 125 +# http://www.canlii.org/en/yk/laws/stat/rsy-2002-c-125/latest/rsy-2002-c-125.html # From Rives McDow (1999-09-04): # Nunavut ... moved ... to incorporate the whole territory into one time zone. @@ -2077,7 +2180,7 @@ Zone America/Inuvik 0 - zzz 1953 # Inuvi -7:00 NT_YK M%sT 1980 -7:00 Canada M%sT Zone America/Whitehorse -9:00:12 - LMT 1900 Aug 20 - -9:00 NT_YK Y%sT 1966 Jul 1 2:00 + -9:00 NT_YK Y%sT 1967 May 28 0:00 -8:00 NT_YK P%sT 1980 -8:00 Canada P%sT Zone America/Dawson -9:17:40 - LMT 1900 Aug 20 From owner-svn-src-head@FreeBSD.ORG Mon May 18 22:03:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A2BE40B; Mon, 18 May 2015 22:03:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67CB91C20; Mon, 18 May 2015 22:03:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IM381B067806; Mon, 18 May 2015 22:03:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IM36R7067791; Mon, 18 May 2015 22:03:06 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505182203.t4IM36R7067791@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 18 May 2015 22:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283084 - in head/lib/libedit: . edit/readline X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 22:03:08 -0000 Author: bapt Date: Mon May 18 22:03:05 2015 New Revision: 283084 URL: https://svnweb.freebsd.org/changeset/base/283084 Log: Synchronize libedit with NetBSD It incorporates and fixes our patches to get el_gets return the proper count of characters in unicode mode. Modified: head/lib/libedit/chartype.c head/lib/libedit/chartype.h head/lib/libedit/edit/readline/readline.h head/lib/libedit/el.c head/lib/libedit/eln.c head/lib/libedit/map.c head/lib/libedit/readline.c head/lib/libedit/tty.c Modified: head/lib/libedit/chartype.c ============================================================================== --- head/lib/libedit/chartype.c Mon May 18 21:27:46 2015 (r283083) +++ head/lib/libedit/chartype.c Mon May 18 22:03:05 2015 (r283084) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.c,v 1.10 2011/08/16 16:25:15 christos Exp $ */ +/* $NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: chartype.c,v 1.10 2011/08/16 16:25:15 christos Exp $"); +__RCSID("$NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $"); #endif /* not lint && not SCCSID */ #include __FBSDID("$FreeBSD$"); @@ -42,31 +42,46 @@ __FBSDID("$FreeBSD$"); #define CT_BUFSIZ ((size_t)1024) #ifdef WIDECHAR -protected void -ct_conv_buff_resize(ct_buffer_t *conv, size_t mincsize, size_t minwsize) +protected int +ct_conv_cbuff_resize(ct_buffer_t *conv, size_t csize) { void *p; - if (mincsize > conv->csize) { - conv->csize = mincsize; - p = el_realloc(conv->cbuff, conv->csize * sizeof(*conv->cbuff)); - if (p == NULL) { - conv->csize = 0; - el_free(conv->cbuff); - conv->cbuff = NULL; - } else - conv->cbuff = p; + + if (csize <= conv->csize) + return 0; + + conv->csize = csize; + + p = el_realloc(conv->cbuff, conv->csize * sizeof(*conv->cbuff)); + if (p == NULL) { + conv->csize = 0; + el_free(conv->cbuff); + conv->cbuff = NULL; + return -1; } + conv->cbuff = p; + return 0; +} - if (minwsize > conv->wsize) { - conv->wsize = minwsize; - p = el_realloc(conv->wbuff, conv->wsize * sizeof(*conv->wbuff)); - if (p == NULL) { - conv->wsize = 0; - el_free(conv->wbuff); - conv->wbuff = NULL; - } else - conv->wbuff = p; +protected int +ct_conv_wbuff_resize(ct_buffer_t *conv, size_t wsize) +{ + void *p; + + if (wsize <= conv->wsize) + return 0; + + conv->wsize = wsize; + + p = el_realloc(conv->wbuff, conv->wsize * sizeof(*conv->wbuff)); + if (p == NULL) { + conv->wsize = 0; + el_free(conv->wbuff); + conv->wbuff = NULL; + return -1; } + conv->wbuff = p; + return 0; } @@ -74,26 +89,22 @@ public char * ct_encode_string(const Char *s, ct_buffer_t *conv) { char *dst; - ssize_t used = 0; + ssize_t used; if (!s) return NULL; - if (!conv->cbuff) - ct_conv_buff_resize(conv, CT_BUFSIZ, (size_t)0); - if (!conv->cbuff) - return NULL; dst = conv->cbuff; - while (*s) { - used = (ssize_t)(conv->csize - (size_t)(dst - conv->cbuff)); - if (used < 5) { - used = dst - conv->cbuff; - ct_conv_buff_resize(conv, conv->csize + CT_BUFSIZ, - (size_t)0); - if (!conv->cbuff) + for (;;) { + used = (ssize_t)(dst - conv->cbuff); + if ((conv->csize - (size_t)used) < 5) { + if (ct_conv_cbuff_resize(conv, + conv->csize + CT_BUFSIZ) == -1) return NULL; dst = conv->cbuff + used; } + if (!*s) + break; used = ct_encode_char(dst, (size_t)5, *s); if (used == -1) /* failed to encode, need more buffer space */ abort(); @@ -107,22 +118,19 @@ ct_encode_string(const Char *s, ct_buffe public Char * ct_decode_string(const char *s, ct_buffer_t *conv) { - size_t len = 0; + size_t len; if (!s) return NULL; - if (!conv->wbuff) - ct_conv_buff_resize(conv, (size_t)0, CT_BUFSIZ); - if (!conv->wbuff) - return NULL; len = ct_mbstowcs(NULL, s, (size_t)0); if (len == (size_t)-1) return NULL; - if (len > conv->wsize) - ct_conv_buff_resize(conv, (size_t)0, len + 1); - if (!conv->wbuff) - return NULL; + + if (conv->wsize < ++len) + if (ct_conv_wbuff_resize(conv, len + CT_BUFSIZ) == -1) + return NULL; + ct_mbstowcs(conv->wbuff, s, conv->wsize); return conv->wbuff; } @@ -141,9 +149,9 @@ ct_decode_argv(int argc, const char *arg * the argv strings. */ for (i = 0, bufspace = 0; i < argc; ++i) bufspace += argv[i] ? strlen(argv[i]) + 1 : 0; - ct_conv_buff_resize(conv, (size_t)0, bufspace); - if (!conv->wsize) - return NULL; + if (conv->wsize < ++bufspace) + if (ct_conv_wbuff_resize(conv, bufspace + CT_BUFSIZ) == -1) + return NULL; wargv = el_malloc((size_t)argc * sizeof(*wargv)); Modified: head/lib/libedit/chartype.h ============================================================================== --- head/lib/libedit/chartype.h Mon May 18 21:27:46 2015 (r283083) +++ head/lib/libedit/chartype.h Mon May 18 22:03:05 2015 (r283084) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.h,v 1.10 2011/11/16 01:45:10 christos Exp $ */ +/* $NetBSD: chartype.h,v 1.15 2015/05/17 13:14:41 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ * supports non-BMP code points without requiring UTF-16, but nothing * seems to actually advertise this properly, despite Unicode 3.1 having * been around since 2001... */ -#if !defined(__NetBSD__) && !defined(__sun) && !(defined(__APPLE__) && defined(__MACH__)) && !defined(__FreeBSD__) +#if !defined(__NetBSD__) && !defined(__sun) && !(defined(__APPLE__) && defined(__MACH__)) && !defined(__OpenBSD__) && !defined(__FreeBSD__) #ifndef __STDC_ISO_10646__ /* In many places it is assumed that the first 127 code points are ASCII * compatible, so ensure wchar_t indeed does ISO 10646 and not some other @@ -67,6 +67,7 @@ #define FUN(prefix,rest) prefix ## _w ## rest #define FUNW(type) type ## _w #define TYPE(type) type ## W +#define FCHAR "%lc" #define FSTR "%ls" #define STR(x) L ## x #define UC(c) c @@ -121,6 +122,7 @@ Width(wchar_t c) #define FUN(prefix,rest) prefix ## _ ## rest #define FUNW(type) type #define TYPE(type) type +#define FCHAR "%c" #define FSTR "%s" #define STR(x) x #define UC(c) (unsigned char)(c) @@ -184,7 +186,8 @@ public Char *ct_decode_string(const char protected Char **ct_decode_argv(int, const char *[], ct_buffer_t *); /* Resizes the conversion buffer(s) if needed. */ -protected void ct_conv_buff_resize(ct_buffer_t *, size_t, size_t); +protected int ct_conv_cbuff_resize(ct_buffer_t *, size_t); +protected int ct_conv_wbuff_resize(ct_buffer_t *, size_t); protected ssize_t ct_encode_char(char *, size_t, Char); protected size_t ct_enc_width(Char); @@ -194,7 +197,8 @@ protected size_t ct_enc_width(Char); #define ct_encode_string(s, b) (s) #define ct_decode_string(s, b) (s) #define ct_decode_argv(l, s, b) (s) -#define ct_conv_buff_resize(b, os, ns) +#define ct_conv_cbuff_resize(b, s) ((s) == (0)) +#define ct_conv_wbuff_resize(b, s) ((s) == (0)) #define ct_encode_char(d, l, s) (*d = s, 1) #define ct_free_argv(s) #endif Modified: head/lib/libedit/edit/readline/readline.h ============================================================================== --- head/lib/libedit/edit/readline/readline.h Mon May 18 21:27:46 2015 (r283083) +++ head/lib/libedit/edit/readline/readline.h Mon May 18 22:03:05 2015 (r283084) @@ -1,4 +1,4 @@ -/* $NetBSD: readline.h,v 1.31 2010/08/04 20:29:18 christos Exp $ */ +/* $NetBSD: readline.h,v 1.34 2013/05/28 00:10:34 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. Modified: head/lib/libedit/el.c ============================================================================== --- head/lib/libedit/el.c Mon May 18 21:27:46 2015 (r283083) +++ head/lib/libedit/el.c Mon May 18 22:03:05 2015 (r283084) @@ -96,7 +96,7 @@ el_init_fd(const char *prog, FILE *fin, */ el->el_flags = 0; #ifdef WIDECHAR - if (setlocale(LC_CTYPE, NULL) != NULL) { + if (setlocale(LC_CTYPE, NULL) != NULL){ if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) el->el_flags |= CHARSET_IS_UTF8; } Modified: head/lib/libedit/eln.c ============================================================================== --- head/lib/libedit/eln.c Mon May 18 21:27:46 2015 (r283083) +++ head/lib/libedit/eln.c Mon May 18 22:03:05 2015 (r283084) @@ -1,4 +1,4 @@ -/* $NetBSD: eln.c,v 1.17 2014/06/18 18:12:28 christos Exp $ */ +/* $NetBSD: eln.c,v 1.19 2015/05/18 15:07:04 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: eln.c,v 1.17 2014/06/18 18:12:28 christos Exp $"); +__RCSID("$NetBSD: eln.c,v 1.19 2015/05/18 15:07:04 christos Exp $"); #endif /* not lint && not SCCSID */ #include __FBSDID("$FreeBSD$"); @@ -77,18 +77,18 @@ public const char * el_gets(EditLine *el, int *nread) { const wchar_t *tmp; - int nwread; - - *nread = 0; if (!(el->el_flags & CHARSET_IS_UTF8)) el->el_flags |= IGNORE_EXTCHARS; - tmp = el_wgets(el, &nwread); + tmp = el_wgets(el, nread); + if (tmp != NULL) { + size_t nwread = 0; + for (int i = 0; i < *nread; i++) + nwread += ct_enc_width(tmp[i]); + *nread = (int)nwread; + } if (!(el->el_flags & CHARSET_IS_UTF8)) el->el_flags &= ~IGNORE_EXTCHARS; - for (int i = 0; i < nwread; i++) - *nread += ct_enc_width(tmp[i]); - return ct_encode_string(tmp, &el->el_lgcyconv); } Modified: head/lib/libedit/map.c ============================================================================== --- head/lib/libedit/map.c Mon May 18 21:27:46 2015 (r283083) +++ head/lib/libedit/map.c Mon May 18 22:03:05 2015 (r283084) @@ -1,4 +1,4 @@ -/* $NetBSD: map.c,v 1.34 2014/07/06 18:15:34 christos Exp $ */ +/* $NetBSD: map.c,v 1.35 2015/05/14 10:44:15 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: map.c,v 1.34 2014/07/06 18:15:34 christos Exp $"); +__RCSID("$NetBSD: map.c,v 1.35 2015/05/14 10:44:15 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -1302,8 +1302,8 @@ map_bind(EditLine *el, int argc, const C return 0; default: (void) fprintf(el->el_errfile, - "" FSTR ": Invalid switch `%c'.\n", - argv[0], p[1]); + "" FSTR ": Invalid switch `" FCHAR "'.\n", + argv[0], (Int)p[1]); } else break; Modified: head/lib/libedit/readline.c ============================================================================== --- head/lib/libedit/readline.c Mon May 18 21:27:46 2015 (r283083) +++ head/lib/libedit/readline.c Mon May 18 22:03:05 2015 (r283084) @@ -1,4 +1,4 @@ -/* $NetBSD: readline.c,v 1.113 2014/10/18 08:33:23 snj Exp $ */ +/* $NetBSD: readline.c,v 1.115 2015/04/01 15:23:15 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: readline.c,v 1.113 2014/10/18 08:33:23 snj Exp $"); +__RCSID("$NetBSD: readline.c,v 1.115 2015/04/01 15:23:15 christos Exp $"); #endif /* not lint && not SCCSID */ #include __FBSDID("$FreeBSD$"); @@ -364,6 +364,37 @@ rl_initialize(void) _el_rl_tstp); el_set(e, EL_BIND, "^Z", "rl_tstp", NULL); + /* + * Set some readline compatible key-bindings. + */ + el_set(e, EL_BIND, "^R", "em-inc-search-prev", NULL); + + /* + * Allow the use of Home/End keys. + */ + el_set(e, EL_BIND, "\\e[1~", "ed-move-to-beg", NULL); + el_set(e, EL_BIND, "\\e[4~", "ed-move-to-end", NULL); + el_set(e, EL_BIND, "\\e[7~", "ed-move-to-beg", NULL); + el_set(e, EL_BIND, "\\e[8~", "ed-move-to-end", NULL); + el_set(e, EL_BIND, "\\e[H", "ed-move-to-beg", NULL); + el_set(e, EL_BIND, "\\e[F", "ed-move-to-end", NULL); + + /* + * Allow the use of the Delete/Insert keys. + */ + el_set(e, EL_BIND, "\\e[3~", "ed-delete-next-char", NULL); + el_set(e, EL_BIND, "\\e[2~", "ed-quoted-insert", NULL); + + /* + * Ctrl-left-arrow and Ctrl-right-arrow for word moving. + */ + el_set(e, EL_BIND, "\\e[1;5C", "em-next-word", NULL); + el_set(e, EL_BIND, "\\e[1;5D", "ed-prev-word", NULL); + el_set(e, EL_BIND, "\\e[5C", "em-next-word", NULL); + el_set(e, EL_BIND, "\\e[5D", "ed-prev-word", NULL); + el_set(e, EL_BIND, "\\e\\e[C", "em-next-word", NULL); + el_set(e, EL_BIND, "\\e\\e[D", "ed-prev-word", NULL); + /* read settings from configuration file */ el_source(e, NULL); @@ -950,7 +981,8 @@ loop: for (; str[j]; j++) { if (str[j] == '\\' && str[j + 1] == history_expansion_char) { - (void)strcpy(&str[j], &str[j + 1]); + len = strlen(&str[j + 1]) + 1; + memmove(&str[j], &str[j + 1], len); continue; } if (!loop_again) { Modified: head/lib/libedit/tty.c ============================================================================== --- head/lib/libedit/tty.c Mon May 18 21:27:46 2015 (r283083) +++ head/lib/libedit/tty.c Mon May 18 22:03:05 2015 (r283084) @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.46 2014/06/18 18:52:49 christos Exp $ */ +/* $NetBSD: tty.c,v 1.47 2015/05/14 10:44:15 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tty.c,v 1.46 2014/06/18 18:52:49 christos Exp $"); +__RCSID("$NetBSD: tty.c,v 1.47 2015/05/14 10:44:15 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -1173,8 +1173,8 @@ tty_stty(EditLine *el, int argc __attrib break; default: (void) fprintf(el->el_errfile, - "%s: Unknown switch `%c'.\n", - name, argv[0][1]); + "%s: Unknown switch `" FCHAR "'.\n", + name, (Int)argv[0][1]); return -1; } From owner-svn-src-head@FreeBSD.ORG Mon May 18 22:27:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC3F8ABC; Mon, 18 May 2015 22:27:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAC251E42; Mon, 18 May 2015 22:27:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IMRo4i078833; Mon, 18 May 2015 22:27:50 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IMRljx078812; Mon, 18 May 2015 22:27:47 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505182227.t4IMRljx078812@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 18 May 2015 22:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283088 - head/sys/ddb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 22:27:51 -0000 Author: pfg Date: Mon May 18 22:27:46 2015 New Revision: 283088 URL: https://svnweb.freebsd.org/changeset/base/283088 Log: ddb: stop boolean screaming. TRUE --> true FALSE--> false Hinted by: NetBSD Modified: head/sys/ddb/db_break.c head/sys/ddb/db_command.c head/sys/ddb/db_examine.c head/sys/ddb/db_expr.c head/sys/ddb/db_input.c head/sys/ddb/db_main.c head/sys/ddb/db_ps.c head/sys/ddb/db_run.c head/sys/ddb/db_sym.c head/sys/ddb/db_textdump.c head/sys/ddb/db_watch.c head/sys/ddb/db_write_cmd.c Modified: head/sys/ddb/db_break.c ============================================================================== --- head/sys/ddb/db_break.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_break.c Mon May 18 22:27:46 2015 (r283088) @@ -155,12 +155,12 @@ db_find_breakpoint_here(db_addr_t addr) return db_find_breakpoint(db_map_addr(addr), addr); } -static boolean_t db_breakpoints_inserted = TRUE; +static boolean_t db_breakpoints_inserted = true; #ifndef BKPT_WRITE #define BKPT_WRITE(addr, storage) \ do { \ - *storage = db_get_value(addr, BKPT_SIZE, FALSE); \ + *storage = db_get_value(addr, BKPT_SIZE, false); \ db_put_value(addr, BKPT_SIZE, BKPT_SET(*storage)); \ } while (0) #endif @@ -183,7 +183,7 @@ db_set_breakpoints(void) if (db_map_current(bkpt->map)) { BKPT_WRITE(bkpt->address, &bkpt->bkpt_inst); } - db_breakpoints_inserted = TRUE; + db_breakpoints_inserted = true; } } @@ -200,7 +200,7 @@ db_clear_breakpoints(void) if (db_map_current(bkpt->map)) { BKPT_CLEAR(bkpt->address, &bkpt->bkpt_inst); } - db_breakpoints_inserted = FALSE; + db_breakpoints_inserted = false; } } Modified: head/sys/ddb/db_command.c ============================================================================== --- head/sys/ddb/db_command.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_command.c Mon May 18 22:27:46 2015 (r283088) @@ -151,7 +151,7 @@ static struct command *db_last_command = * and '+' points to next line. * Otherwise: 'dot' points to next item, '..' points to last. */ -static boolean_t db_ed_style = TRUE; +static boolean_t db_ed_style = true; /* * Utility routine - discard tokens through end-of-line. @@ -327,7 +327,7 @@ db_command(struct command **last_cmdp, s int t; char modif[TOK_STRING_SIZE]; db_expr_t addr, count; - boolean_t have_addr = FALSE; + boolean_t have_addr = false; int result; t = db_read_token(); @@ -335,7 +335,7 @@ db_command(struct command **last_cmdp, s /* empty line repeats last command, at 'next' */ cmd = *last_cmdp; addr = (db_expr_t)db_next; - have_addr = FALSE; + have_addr = false; count = 1; modif[0] = '\0'; } @@ -405,11 +405,11 @@ db_command(struct command **last_cmdp, s if (db_expression(&addr)) { db_dot = (db_addr_t) addr; db_last_addr = db_dot; - have_addr = TRUE; + have_addr = true; } else { addr = (db_expr_t) db_dot; - have_addr = FALSE; + have_addr = false; } t = db_read_token(); if (t == tCOMMA) { @@ -530,7 +530,7 @@ db_dump(db_expr_t dummy, boolean_t dummy "run \"textdump unset\" first or \"textdump dump\" for a textdump.\n"); return; } - error = doadump(FALSE); + error = doadump(false); if (error) { db_printf("Cannot dump: "); switch (error) { Modified: head/sys/ddb/db_examine.c ============================================================================== --- head/sys/ddb/db_examine.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_examine.c Mon May 18 22:27:46 2015 (r283088) @@ -110,37 +110,37 @@ db_examine(db_addr_t addr, char *fmt, in width = size * 4; switch (c) { case 'r': /* signed, current radix */ - value = db_get_value(addr, size, TRUE); + value = db_get_value(addr, size, true); addr += size; db_printf("%+-*lr", width, (long)value); break; case 'x': /* unsigned hex */ - value = db_get_value(addr, size, FALSE); + value = db_get_value(addr, size, false); addr += size; db_printf("%-*lx", width, (long)value); break; case 'z': /* signed hex */ - value = db_get_value(addr, size, TRUE); + value = db_get_value(addr, size, true); addr += size; db_printf("%-*ly", width, (long)value); break; case 'd': /* signed decimal */ - value = db_get_value(addr, size, TRUE); + value = db_get_value(addr, size, true); addr += size; db_printf("%-*ld", width, (long)value); break; case 'u': /* unsigned decimal */ - value = db_get_value(addr, size, FALSE); + value = db_get_value(addr, size, false); addr += size; db_printf("%-*lu", width, (long)value); break; case 'o': /* unsigned octal */ - value = db_get_value(addr, size, FALSE); + value = db_get_value(addr, size, false); addr += size; db_printf("%-*lo", width, (long)value); break; case 'c': /* character */ - value = db_get_value(addr, 1, FALSE); + value = db_get_value(addr, 1, false); addr += 1; if (value >= ' ' && value <= '~') db_printf("%c", (int)value); @@ -149,7 +149,7 @@ db_examine(db_addr_t addr, char *fmt, in break; case 's': /* null-terminated string */ for (;;) { - value = db_get_value(addr, 1, FALSE); + value = db_get_value(addr, 1, false); addr += 1; if (value == 0) break; @@ -161,15 +161,15 @@ db_examine(db_addr_t addr, char *fmt, in break; case 'S': /* symbol */ value = db_get_value(addr, sizeof(void *), - FALSE); + false); addr += sizeof(void *); db_printsym(value, DB_STGY_ANY); break; case 'i': /* instruction */ - addr = db_disasm(addr, FALSE); + addr = db_disasm(addr, false); break; case 'I': /* instruction, alternate form */ - addr = db_disasm(addr, TRUE); + addr = db_disasm(addr, true); break; default: break; @@ -236,7 +236,7 @@ db_print_loc_and_inst(db_addr_t loc) { db_printsym(loc, DB_STGY_PROC); db_printf(":\t"); - (void) db_disasm(loc, TRUE); + (void) db_disasm(loc, true); } /* @@ -314,7 +314,7 @@ db_search(db_addr_t addr, int size, db_e { while (count-- != 0) { db_prev = addr; - if ((db_get_value(addr, size, FALSE) & mask) == value) + if ((db_get_value(addr, size, false) & mask) == value) break; addr += size; } Modified: head/sys/ddb/db_expr.c ============================================================================== --- head/sys/ddb/db_expr.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_expr.c Mon May 18 22:27:46 2015 (r283088) @@ -57,32 +57,32 @@ db_term(db_expr_t *valuep) db_error("Symbol not found\n"); /*NOTREACHED*/ } - return (TRUE); + return (true); } if (t == tNUMBER) { *valuep = (db_expr_t)db_tok_number; - return (TRUE); + return (true); } if (t == tDOT) { *valuep = (db_expr_t)db_dot; - return (TRUE); + return (true); } if (t == tDOTDOT) { *valuep = (db_expr_t)db_prev; - return (TRUE); + return (true); } if (t == tPLUS) { *valuep = (db_expr_t) db_next; - return (TRUE); + return (true); } if (t == tDITTO) { *valuep = (db_expr_t)db_last_addr; - return (TRUE); + return (true); } if (t == tDOLLAR) { if (!db_get_variable(valuep)) - return (FALSE); - return (TRUE); + return (false); + return (true); } if (t == tLPAREN) { if (!db_expression(valuep)) { @@ -94,10 +94,10 @@ db_term(db_expr_t *valuep) db_error("Syntax error\n"); /*NOTREACHED*/ } - return (TRUE); + return (true); } db_unread_token(t); - return (FALSE); + return (false); } static boolean_t @@ -112,7 +112,7 @@ db_unary(db_expr_t *valuep) /*NOTREACHED*/ } *valuep = -*valuep; - return (TRUE); + return (true); } if (t == tSTAR) { /* indirection */ @@ -120,8 +120,8 @@ db_unary(db_expr_t *valuep) db_error("Syntax error\n"); /*NOTREACHED*/ } - *valuep = db_get_value((db_addr_t)*valuep, sizeof(void *), FALSE); - return (TRUE); + *valuep = db_get_value((db_addr_t)*valuep, sizeof(void *), false); + return (true); } db_unread_token(t); return (db_term(valuep)); @@ -134,7 +134,7 @@ db_mult_expr(db_expr_t *valuep) int t; if (!db_unary(&lhs)) - return (FALSE); + return (false); t = db_read_token(); while (t == tSTAR || t == tSLASH || t == tPCT || t == tHASH) { @@ -160,7 +160,7 @@ db_mult_expr(db_expr_t *valuep) } db_unread_token(t); *valuep = lhs; - return (TRUE); + return (true); } static boolean_t @@ -170,7 +170,7 @@ db_add_expr(db_expr_t *valuep) int t; if (!db_mult_expr(&lhs)) - return (FALSE); + return (false); t = db_read_token(); while (t == tPLUS || t == tMINUS) { @@ -186,7 +186,7 @@ db_add_expr(db_expr_t *valuep) } db_unread_token(t); *valuep = lhs; - return (TRUE); + return (true); } static boolean_t @@ -196,7 +196,7 @@ db_shift_expr(db_expr_t *valuep) int t; if (!db_add_expr(&lhs)) - return (FALSE); + return (false); t = db_read_token(); while (t == tSHIFT_L || t == tSHIFT_R) { @@ -218,7 +218,7 @@ db_shift_expr(db_expr_t *valuep) } db_unread_token(t); *valuep = lhs; - return (TRUE); + return (true); } int Modified: head/sys/ddb/db_input.c ============================================================================== --- head/sys/ddb/db_input.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_input.c Mon May 18 22:27:46 2015 (r283088) @@ -112,7 +112,7 @@ db_delete(n, bwd) db_le -= n; } -/* returns TRUE at end-of-line */ +/* returns true at end-of-line */ static int db_inputchar(c) int c; Modified: head/sys/ddb/db_main.c ============================================================================== --- head/sys/ddb/db_main.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_main.c Mon May 18 22:27:46 2015 (r283088) @@ -67,7 +67,7 @@ boolean_t X_db_line_at_pc(db_symtab_t *symtab, c_db_sym_t sym, char **file, int *line, db_expr_t off) { - return (FALSE); + return (false); } c_db_sym_t @@ -149,7 +149,7 @@ boolean_t X_db_sym_numargs(db_symtab_t *symtab, c_db_sym_t sym, int *nargp, char **argp) { - return (FALSE); + return (false); } void Modified: head/sys/ddb/db_ps.c ============================================================================== --- head/sys/ddb/db_ps.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_ps.c Mon May 18 22:27:46 2015 (r283088) @@ -303,7 +303,7 @@ DB_SHOW_COMMAND(thread, db_show_thread) /* Determine which thread to examine. */ if (have_addr) - td = db_lookup_thread(addr, FALSE); + td = db_lookup_thread(addr, false); else td = kdb_thread; lock = (struct lock_object *)td->td_lock; @@ -332,28 +332,28 @@ DB_SHOW_COMMAND(thread, db_show_thread) break; case TDS_INHIBITED: db_printf("INHIBITED: {"); - comma = FALSE; + comma = false; if (TD_IS_SLEEPING(td)) { db_printf("SLEEPING"); - comma = TRUE; + comma = true; } if (TD_IS_SUSPENDED(td)) { if (comma) db_printf(", "); db_printf("SUSPENDED"); - comma = TRUE; + comma = true; } if (TD_IS_SWAPPED(td)) { if (comma) db_printf(", "); db_printf("SWAPPED"); - comma = TRUE; + comma = true; } if (TD_ON_LOCK(td)) { if (comma) db_printf(", "); db_printf("LOCK"); - comma = TRUE; + comma = true; } if (TD_AWAITING_INTR(td)) { if (comma) Modified: head/sys/ddb/db_run.c ============================================================================== --- head/sys/ddb/db_run.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_run.c Mon May 18 22:27:46 2015 (r283088) @@ -87,7 +87,7 @@ db_stop_at_pc(boolean_t *is_breakpoint) #ifdef SOFTWARE_SSTEP if ((db_not_taken_bkpt != 0 && pc == db_not_taken_bkpt->address) || (db_taken_bkpt != 0 && pc == db_taken_bkpt->address)) - *is_breakpoint = FALSE; + *is_breakpoint = false; #endif db_clear_single_step(); @@ -112,8 +112,8 @@ db_stop_at_pc(boolean_t *is_breakpoint) if (bkpt) { if (--bkpt->count == 0) { bkpt->count = bkpt->init_count; - *is_breakpoint = TRUE; - return (TRUE); /* stop here */ + *is_breakpoint = true; + return (true); /* stop here */ } } else if (*is_breakpoint) { #ifdef BKPT_SKIP @@ -121,14 +121,14 @@ db_stop_at_pc(boolean_t *is_breakpoint) #endif } - *is_breakpoint = FALSE; + *is_breakpoint = false; if (db_run_mode == STEP_INVISIBLE) { db_run_mode = STEP_CONTINUE; - return (FALSE); /* continue */ + return (false); /* continue */ } if (db_run_mode == STEP_COUNT) { - return (FALSE); /* continue */ + return (false); /* continue */ } if (db_run_mode == STEP_ONCE) { if (--db_loop_count > 0) { @@ -137,14 +137,14 @@ db_stop_at_pc(boolean_t *is_breakpoint) db_print_loc_and_inst(pc); db_printf("\n"); } - return (FALSE); /* continue */ + return (false); /* continue */ } } if (db_run_mode == STEP_RETURN) { /* continue until matching return */ db_expr_t ins; - ins = db_get_value(pc, sizeof(int), FALSE); + ins = db_get_value(pc, sizeof(int), false); if (!inst_trap_return(ins) && (!inst_return(ins) || --db_call_depth != 0)) { if (db_sstep_print) { @@ -160,22 +160,22 @@ db_stop_at_pc(boolean_t *is_breakpoint) } if (inst_call(ins)) db_call_depth++; - return (FALSE); /* continue */ + return (false); /* continue */ } } if (db_run_mode == STEP_CALLT) { /* continue until call or return */ db_expr_t ins; - ins = db_get_value(pc, sizeof(int), FALSE); + ins = db_get_value(pc, sizeof(int), false); if (!inst_call(ins) && !inst_return(ins) && !inst_trap_return(ins)) { - return (FALSE); /* continue */ + return (false); /* continue */ } } db_run_mode = STEP_NONE; - return (TRUE); + return (true); } void @@ -193,7 +193,7 @@ db_restart_at_pc(boolean_t watchpt) #ifdef SOFTWARE_SSTEP db_expr_t ins = #endif - db_get_value(pc, sizeof(int), FALSE); + db_get_value(pc, sizeof(int), false); db_inst_count++; db_load_count += inst_load(ins); db_store_count += inst_store(ins); @@ -201,7 +201,7 @@ db_restart_at_pc(boolean_t watchpt) /* XXX works on mips, but... */ if (inst_branch(ins) || inst_call(ins)) { ins = db_get_value(next_instr_address(pc,1), - sizeof(int), FALSE); + sizeof(int), false); db_inst_count++; db_load_count += inst_load(ins); db_store_count += inst_store(ins); @@ -266,7 +266,7 @@ db_set_single_step(void) * User was stopped at pc, e.g. the instruction * at pc was not executed. */ - inst = db_get_value(pc, sizeof(int), FALSE); + inst = db_get_value(pc, sizeof(int), false); if (inst_branch(inst) || inst_call(inst) || inst_return(inst)) { brpc = branch_taken(inst, pc); if (brpc != pc) { /* self-branches are hopeless */ @@ -305,13 +305,13 @@ db_single_step_cmd(addr, have_addr, coun db_expr_t count; char * modif; { - boolean_t print = FALSE; + boolean_t print = false; if (count == -1) count = 1; if (modif[0] == 'p') - print = TRUE; + print = true; db_run_mode = STEP_ONCE; db_loop_count = count; @@ -329,10 +329,10 @@ void db_trace_until_call_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif) { - boolean_t print = FALSE; + boolean_t print = false; if (modif[0] == 'p') - print = TRUE; + print = true; db_run_mode = STEP_CALLT; db_sstep_print = print; @@ -348,10 +348,10 @@ void db_trace_until_matching_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif) { - boolean_t print = FALSE; + boolean_t print = false; if (modif[0] == 'p') - print = TRUE; + print = true; db_run_mode = STEP_RETURN; db_call_depth = 1; Modified: head/sys/ddb/db_sym.c ============================================================================== --- head/sys/ddb/db_sym.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_sym.c Mon May 18 22:27:46 2015 (r283088) @@ -206,10 +206,10 @@ boolean_t db_eqname(const char *src, const char *dst, int c) { if (!strcmp(src, dst)) - return (TRUE); + return (true); if (src[0] == c) return (!strcmp(src+1,dst)); - return (FALSE); + return (false); } boolean_t @@ -219,9 +219,9 @@ db_value_of_name(const char *name, db_ex sym = db_lookup(name); if (sym == C_DB_SYM_NULL) - return (FALSE); + return (false); db_symbol_values(sym, &name, valuep); - return (TRUE); + return (true); } boolean_t @@ -239,12 +239,12 @@ db_value_of_name_pcpu(const char *name, snprintf(tmp, sizeof(tmp), "pcpu_entry_%s", name); sym = db_lookup(tmp); if (sym == C_DB_SYM_NULL) - return (FALSE); + return (false); db_symbol_values(sym, &name, &value); if (value < DPCPU_START || value >= DPCPU_STOP) - return (FALSE); + return (false); *valuep = (db_expr_t)((uintptr_t)value + dpcpu_off[cpu]); - return (TRUE); + return (true); } boolean_t @@ -263,14 +263,14 @@ db_value_of_name_vnet(const char *name, snprintf(tmp, sizeof(tmp), "vnet_entry_%s", name); sym = db_lookup(tmp); if (sym == C_DB_SYM_NULL) - return (FALSE); + return (false); db_symbol_values(sym, &name, &value); if (value < VNET_START || value >= VNET_STOP) - return (FALSE); + return (false); *valuep = (db_expr_t)((uintptr_t)value + vnet->vnet_data_base); - return (TRUE); + return (true); #else - return (FALSE); + return (false); #endif } @@ -328,10 +328,10 @@ db_lookup(const char *symstr) } /* - * If TRUE, check across symbol tables for multiple occurrences + * If true, check across symbol tables for multiple occurrences * of a name. Might slow things down quite a bit. */ -static volatile boolean_t db_qualify_ambiguous_names = FALSE; +static volatile boolean_t db_qualify_ambiguous_names = false; /* * Does this symbol name appear in more than one symbol table? @@ -343,20 +343,20 @@ db_symbol_is_ambiguous(c_db_sym_t sym) const char *sym_name; register int i; register - boolean_t found_once = FALSE; + boolean_t found_once = false; if (!db_qualify_ambiguous_names) - return FALSE; + return (false); db_symbol_values(sym, &sym_name, 0); for (i = 0; i < db_nsymtab; i++) { if (X_db_lookup(&db_symtabs[i], sym_name)) { if (found_once) - return TRUE; - found_once = TRUE; + return true; + found_once = true; } } - return FALSE; + return (false); } /* Modified: head/sys/ddb/db_textdump.c ============================================================================== --- head/sys/ddb/db_textdump.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_textdump.c Mon May 18 22:27:46 2015 (r283088) @@ -543,7 +543,7 @@ db_textdump_cmd(db_expr_t addr, boolean_ db_printf("textdump unset\n"); } else if (strcmp(db_tok_string, "dump") == 0) { textdump_pending = 1; - doadump(TRUE); + doadump(true); } else { db_textdump_usage(); } Modified: head/sys/ddb/db_watch.c ============================================================================== --- head/sys/ddb/db_watch.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_watch.c Mon May 18 22:27:46 2015 (r283088) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); * Watchpoints. */ -static boolean_t db_watchpoints_inserted = TRUE; +static boolean_t db_watchpoints_inserted = true; #define NWATCHPOINTS 100 static struct db_watchpoint db_watch_table[NWATCHPOINTS]; @@ -129,7 +129,7 @@ db_set_watchpoint(vm_map_t map, db_addr_ watch->link = db_watchpoint_list; db_watchpoint_list = watch; - db_watchpoints_inserted = FALSE; + db_watchpoints_inserted = false; } static void @@ -231,14 +231,14 @@ db_set_watchpoints(void) round_page(watch->hiaddr), VM_PROT_READ); - db_watchpoints_inserted = TRUE; + db_watchpoints_inserted = true; } } void db_clear_watchpoints(void) { - db_watchpoints_inserted = FALSE; + db_watchpoints_inserted = false; } #ifdef notused @@ -254,7 +254,7 @@ db_find_watchpoint(vm_map_t map, db_addr if (db_map_equal(watch->map, map)) { if ((watch->loaddr <= addr) && (addr < watch->hiaddr)) - return (TRUE); + return (true); else if ((trunc_page(watch->loaddr) <= addr) && (addr < round_page(watch->hiaddr))) found = watch; @@ -267,11 +267,11 @@ db_find_watchpoint(vm_map_t map, db_addr */ if (found) { - db_watchpoints_inserted = FALSE; + db_watchpoints_inserted = false; db_single_step(regs); } - return (FALSE); + return (false); } #endif Modified: head/sys/ddb/db_write_cmd.c ============================================================================== --- head/sys/ddb/db_write_cmd.c Mon May 18 22:14:06 2015 (r283087) +++ head/sys/ddb/db_write_cmd.c Mon May 18 22:27:46 2015 (r283088) @@ -52,7 +52,7 @@ db_write_cmd(db_expr_t address, boolean_ db_expr_t old_value; db_expr_t new_value; register int size; - boolean_t wrote_one = FALSE; + boolean_t wrote_one = false; addr = (db_addr_t) address; @@ -73,13 +73,13 @@ db_write_cmd(db_expr_t address, boolean_ } while (db_expression(&new_value)) { - old_value = db_get_value(addr, size, FALSE); + old_value = db_get_value(addr, size, false); db_printsym(addr, DB_STGY_ANY); db_printf("\t\t%#8lr\t=\t%#8lr\n", (long)old_value,(long)new_value); db_put_value(addr, size, new_value); addr += size; - wrote_one = TRUE; + wrote_one = true; } if (!wrote_one) From owner-svn-src-head@FreeBSD.ORG Mon May 18 22:40:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEAD6DFA; Mon, 18 May 2015 22:40:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0E571F5F; Mon, 18 May 2015 22:40:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IMeFGX084384; Mon, 18 May 2015 22:40:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IMeD8x084369; Mon, 18 May 2015 22:40:13 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505182240.t4IMeD8x084369@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 18 May 2015 22:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283089 - head/usr.bin/m4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 22:40:16 -0000 Author: bapt Date: Mon May 18 22:40:12 2015 New Revision: 283089 URL: https://svnweb.freebsd.org/changeset/base/283089 Log: Synchronize with OpenBSD Obtained from: OpenBSD Modified: head/usr.bin/m4/extern.h head/usr.bin/m4/gnum4.c head/usr.bin/m4/look.c head/usr.bin/m4/m4.1 head/usr.bin/m4/main.c head/usr.bin/m4/mdef.h head/usr.bin/m4/misc.c head/usr.bin/m4/parser.y Modified: head/usr.bin/m4/extern.h ============================================================================== --- head/usr.bin/m4/extern.h Mon May 18 22:27:46 2015 (r283088) +++ head/usr.bin/m4/extern.h Mon May 18 22:40:12 2015 (r283089) @@ -43,7 +43,6 @@ extern unsigned long expansion_id; /* expr.c */ extern int expr(const char *); -extern int32_t end_result; /* gnum4.c */ extern void addtoincludepath(const char *); Modified: head/usr.bin/m4/gnum4.c ============================================================================== --- head/usr.bin/m4/gnum4.c Mon May 18 22:27:46 2015 (r283088) +++ head/usr.bin/m4/gnum4.c Mon May 18 22:40:12 2015 (r283089) @@ -1,4 +1,4 @@ -/* $OpenBSD: gnum4.c,v 1.46 2014/07/10 14:12:31 espie Exp $ */ +/* $OpenBSD: gnum4.c,v 1.50 2015/04/29 00:13:26 millert Exp $ */ /* * Copyright (c) 1999 Marc Espie @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); * functions needed to support gnu-m4 extensions, including a fake freezing */ -#include #include #include #include @@ -40,10 +39,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +#include #include "mdef.h" #include "stdd.h" #include "extern.h" @@ -76,9 +77,7 @@ new_path_entry(const char *dirname) n = malloc(sizeof(struct path_entry)); if (!n) errx(1, "out of memory"); - n->name = strdup(dirname); - if (!n->name) - errx(1, "out of memory"); + n->name = xstrdup(dirname); n->next = 0; return n; } @@ -113,9 +112,7 @@ ensure_m4path(void) if (!envpath) return; /* for portability: getenv result is read-only */ - envpath = strdup(envpath); - if (!envpath) - errx(1, "out of memory"); + envpath = xstrdup(envpath); for (sweep = envpath; (path = strsep(&sweep, ":")) != NULL;) addtoincludepath(path); @@ -126,7 +123,7 @@ static struct input_file * dopath(struct input_file *i, const char *filename) { - char path[MAXPATHLEN]; + char path[PATH_MAX]; struct path_entry *pe; FILE *f; @@ -214,8 +211,11 @@ addchars(const char *c, size_t n) while (current + n > bufsize) { if (bufsize == 0) bufsize = 1024; - else + else if (bufsize <= SIZE_MAX/2) { bufsize *= 2; + } else { + errx(1, "size overflow"); + } buffer = xrealloc(buffer, bufsize, NULL); } memcpy(buffer+current, c, n); Modified: head/usr.bin/m4/look.c ============================================================================== --- head/usr.bin/m4/look.c Mon May 18 22:27:46 2015 (r283088) +++ head/usr.bin/m4/look.c Mon May 18 22:40:12 2015 (r283089) @@ -1,4 +1,4 @@ -/* $OpenBSD: look.c,v 1.23 2014/05/12 19:11:19 espie Exp $ */ +/* $OpenBSD: look.c,v 1.24 2014/12/21 09:33:12 espie Exp $ */ /* * Copyright (c) 1989, 1993 @@ -56,6 +56,9 @@ static void hash_free(void *, void *); static void *element_alloc(size_t, void *); static void setup_definition(struct macro_definition *, const char *, const char *); +static void free_definition(char *); +static void keep(char *); +static int string_in_use(const char *); static struct ohash_info macro_info = { offsetof(struct ndblock, name), @@ -155,7 +158,7 @@ macro_define(const char *name, const cha ndptr n = create_entry(name); if (n->d != NULL) { if (n->d->defn != null) - free(n->d->defn); + free_definition(n->d->defn); } else { n->d = xalloc(sizeof(struct macro_definition), NULL); n->d->next = NULL; @@ -273,3 +276,64 @@ macro_getbuiltin(const char *name) else return p; } + +/* XXX things are slightly more complicated than they seem. + * a macro may actually be "live" (in the middle of an expansion + * on the stack. + * So we actually may need to place it in an array for later... + */ + +static int kept_capacity = 0; +static int kept_size = 0; +static char **kept = NULL; + +static void +keep(char *ptr) +{ + if (kept_capacity <= kept_size) { + if (kept_capacity) + kept_capacity *= 2; + else + kept_capacity = 50; + kept = xreallocarray(kept, kept_capacity, + sizeof(char *), "Out of memory while saving %d strings\n", + kept_capacity); + } + kept[kept_size++] = ptr; +} + +static int +string_in_use(const char *ptr) +{ + int i; + for (i = 0; i <= sp; i++) { + if (sstack[i] == STORAGE_MACRO && mstack[i].sstr == ptr) + return 1; + } + return 0; +} + + +static void +free_definition(char *ptr) +{ + int i; + + /* first try to free old strings */ + for (i = 0; i < kept_size; i++) { + if (!string_in_use(kept[i])) { + kept_size--; + free(kept[i]); + if (i != kept_size) + kept[i] = kept[kept_size]; + i--; + } + } + + /* then deal with us */ + if (string_in_use(ptr)) + keep(ptr); + else + free(ptr); +} + Modified: head/usr.bin/m4/m4.1 ============================================================================== --- head/usr.bin/m4/m4.1 Mon May 18 22:27:46 2015 (r283088) +++ head/usr.bin/m4/m4.1 Mon May 18 22:40:12 2015 (r283089) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2014 +.Dd $Mdocdate: April 14 2014 $ .Dt M4 1 .Os .Sh NAME @@ -98,7 +98,9 @@ recognized as special when not followed .Pp The options are as follows: .Bl -tag -width Ds -.It Fl D Ns Ar name Ns Op Pf = Ns Ar value +.It Fl D Ns Ar name Ns Oo +.Pf = Ns Ar value +.Oc Define the symbol .Ar name to have some value (or Modified: head/usr.bin/m4/main.c ============================================================================== --- head/usr.bin/m4/main.c Mon May 18 22:27:46 2015 (r283088) +++ head/usr.bin/m4/main.c Mon May 18 22:40:12 2015 (r283089) @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.83 2014/05/12 19:11:19 espie Exp $ */ +/* $OpenBSD: main.c,v 1.84 2014/12/21 09:33:12 espie Exp $ */ /* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $ */ /*- @@ -144,6 +144,9 @@ static struct keyblk keywrds[] = { /* m4 #define MAXKEYS (sizeof(keywrds)/sizeof(struct keyblk)) +extern int optind; +extern char *optarg; + #define MAXRECORD 50 static struct position { char *name; @@ -396,7 +399,7 @@ macro(void) /* * now push the string arguments: */ - pushs1(macro_getdef(p)->defn); /* defn string */ + pushdef(p); /* defn string */ pushs1((char *)macro_name(p)); /* macro name */ pushs(ep); /* start next..*/ Modified: head/usr.bin/m4/mdef.h ============================================================================== --- head/usr.bin/m4/mdef.h Mon May 18 22:27:46 2015 (r283088) +++ head/usr.bin/m4/mdef.h Mon May 18 22:40:12 2015 (r283089) @@ -1,4 +1,4 @@ -/* $OpenBSD: mdef.h,v 1.31 2011/09/27 07:24:02 espie Exp $ */ +/* $OpenBSD: mdef.h,v 1.32 2014/12/21 09:33:12 espie Exp $ */ /* $NetBSD: mdef.h,v 1.7 1996/01/13 23:25:27 pk Exp $ */ /* @@ -164,6 +164,10 @@ struct input_file { int c; }; +#define STORAGE_STRSPACE 0 +#define STORAGE_MACRO 1 +#define STORAGE_OTHER 2 + #define CURRENT_NAME (infile[ilevel].name) #define CURRENT_LINE (infile[ilevel].lineno) /* @@ -179,7 +183,7 @@ struct input_file { if (++sp == (int)STACKMAX) \ enlarge_stack();\ mstack[sp].sfra = (x); \ - sstack[sp] = 0; \ + sstack[sp] = STORAGE_OTHER; \ } while (0) #define pushs(x) \ @@ -187,7 +191,7 @@ struct input_file { if (++sp == (int)STACKMAX) \ enlarge_stack();\ mstack[sp].sstr = (x); \ - sstack[sp] = 1; \ + sstack[sp] = STORAGE_STRSPACE; \ } while (0) #define pushs1(x) \ @@ -195,8 +199,17 @@ struct input_file { if (++sp == (int)STACKMAX) \ enlarge_stack();\ mstack[sp].sstr = (x); \ - sstack[sp] = 0; \ + sstack[sp] = STORAGE_OTHER; \ + } while (0) + +#define pushdef(p) \ + do { \ + if (++sp == (int)STACKMAX) \ + enlarge_stack();\ + mstack[sp].sstr = macro_getdef(p)->defn;\ + sstack[sp] = STORAGE_MACRO; \ } while (0) + /* * . . Modified: head/usr.bin/m4/misc.c ============================================================================== --- head/usr.bin/m4/misc.c Mon May 18 22:27:46 2015 (r283088) +++ head/usr.bin/m4/misc.c Mon May 18 22:40:12 2015 (r283089) @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.44 2014/05/12 19:11:19 espie Exp $ */ +/* $OpenBSD: misc.c,v 1.45 2014/12/21 09:33:12 espie Exp $ */ /* $NetBSD: misc.c,v 1.6 1995/09/28 05:37:41 tls Exp $ */ /* @@ -64,6 +64,7 @@ unsigned char *bbase[MAXINP]; /* the ba unsigned char *bp; /* first available character */ unsigned char *endpbb; /* end of push-back buffer */ + /* * find the index of second str in the first str. */ @@ -186,7 +187,7 @@ enlarge_strspace(void) errx(1, "string space overflow"); memcpy(newstrspace, strspace, strsize/2); for (i = 0; i <= sp; i++) - if (sstack[i]) + if (sstack[i] == STORAGE_STRSPACE) mstack[i].sstr = (mstack[i].sstr - strspace) + newstrspace; ep = (ep-strspace) + newstrspace; @@ -264,7 +265,7 @@ killdiv(void) extern char *__progname; void -m4errx(int exitstatus, const char *fmt, ...) +m4errx(int eval, const char *fmt, ...) { fprintf(stderr, "%s: ", __progname); fprintf(stderr, "%s at line %lu: ", CURRENT_NAME, CURRENT_LINE); @@ -276,7 +277,7 @@ m4errx(int exitstatus, const char *fmt, va_end(ap); } fprintf(stderr, "\n"); - exit(exitstatus); + exit(eval); } /* Modified: head/usr.bin/m4/parser.y ============================================================================== --- head/usr.bin/m4/parser.y Mon May 18 22:27:46 2015 (r283088) +++ head/usr.bin/m4/parser.y Mon May 18 22:40:12 2015 (r283089) @@ -19,15 +19,9 @@ */ #include -#include -#include #include - -#include "mdef.h" -#include "extern.h" - #define YYSTYPE int32_t - +extern int32_t end_result; extern int yylex(void); extern int yyerror(const char *); %} From owner-svn-src-head@FreeBSD.ORG Mon May 18 23:46:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63135B49; Mon, 18 May 2015 23:46:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DAB316E4; Mon, 18 May 2015 23:46:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4INkE6P018871; Mon, 18 May 2015 23:46:14 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4INkCgo018863; Mon, 18 May 2015 23:46:12 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201505182346.t4INkCgo018863@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 18 May 2015 23:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283092 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/components/disp... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 23:46:14 -0000 Author: jkim Date: Mon May 18 23:46:11 2015 New Revision: 283092 URL: https://svnweb.freebsd.org/changeset/base/283092 Log: Merge ACPICA 20150515. Added: head/sys/contrib/dev/acpica/common/ahtable.c (contents, props changed) - copied, changed from r283090, vendor-sys/acpica/dist/source/common/ahtable.c - copied unchanged from r283090, vendor-sys/acpica/dist/source/include/acuuid.h Directory Properties: head/sys/contrib/dev/acpica/include/acuuid.h (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/compiler/aslascii.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslmessages.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/aslprepkg.c head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/dtcompile.c head/sys/contrib/dev/acpica/compiler/dtcompiler.h head/sys/contrib/dev/acpica/compiler/dtio.c head/sys/contrib/dev/acpica/compiler/dtsubtable.c head/sys/contrib/dev/acpica/compiler/dttable.c head/sys/contrib/dev/acpica/compiler/dttemplate.c head/sys/contrib/dev/acpica/compiler/dttemplate.h head/sys/contrib/dev/acpica/compiler/dtutils.c head/sys/contrib/dev/acpica/compiler/preprocess.h head/sys/contrib/dev/acpica/compiler/prscan.c head/sys/contrib/dev/acpica/compiler/prutils.c head/sys/contrib/dev/acpica/components/debugger/dbfileio.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/components/hardware/hwpci.c head/sys/contrib/dev/acpica/components/namespace/nsprepkg.c head/sys/contrib/dev/acpica/components/namespace/nsrepair.c head/sys/contrib/dev/acpica/components/parser/psopinfo.c head/sys/contrib/dev/acpica/components/utilities/utfileio.c head/sys/contrib/dev/acpica/components/utilities/uthex.c head/sys/contrib/dev/acpica/components/utilities/utxferror.c head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acparser.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/include/actbl3.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/include/platform/acenvex.h head/usr.sbin/acpi/acpidb/acpidb.c head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Mon May 18 23:17:34 2015 (r283091) +++ head/sys/contrib/dev/acpica/changes.txt Mon May 18 23:46:11 2015 (r283092) @@ -1,4 +1,52 @@ ---------------------------------------- +08 April 2015. Summary of changes for version 20150515: + +This release implements most of ACPI 6.0 as described below. + +1) ACPICA kernel-resident subsystem: + +Implemented runtime argument checking and return value checking for all +new ACPI 6.0 predefined names. This includes: _BTH, _CR3, _DSD, _LPI, +_MTL, _PRR, _RDI, _RST, _TFP, _TSN. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 99.9K Code, 27.5K Data, 127.4K Total + Debug Version: 195.2K Code, 80.8K Data, 276.0K Total + Previous Release: + Non-Debug Version: 99.1K Code, 27.3K Data, 126.4K Total + Debug Version: 192.8K Code, 79.9K Data, 272.7K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL compiler: Added compile-time support for all new ACPI 6.0 predefined +names (argument count validation and return value typechecking.) + +iASL disassembler and table compiler: implemented support for all new +ACPI 6.0 tables. This includes: DRTM, IORT, LPIT, NFIT, STAO, WPBT, XENV. + +iASL disassembler and table compiler: Added ACPI 6.0 changes to existing +tables: FADT, MADT. + +iASL preprocessor: Added a new directive to enable inclusion of binary +blobs into ASL code. The new directive is #includebinary. It takes a +binary file as input and emits a named ascii buffer object into the ASL +code. + +AcpiHelp: Added support for all new ACPI 6.0 predefined names. + +AcpiHelp: Added a new option, -d, to display all iASL preprocessor +directives. + +AcpiHelp: Added a new option, -t, to display all known/supported ACPI +tables. + +---------------------------------------- 10 April 2015. Summary of changes for version 20150410: Reverted a change introduced in version 20150408 that caused Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Mon May 18 23:17:34 2015 (r283091) +++ head/sys/contrib/dev/acpica/common/adisasm.c Mon May 18 23:46:11 2015 (r283092) @@ -214,6 +214,7 @@ AdAmlDisassemble ( char **OutFilename) { ACPI_STATUS Status; + ACPI_STATUS GlobalStatus = AE_OK; char *DisasmFilename = NULL; char *ExternalFilename; ACPI_EXTERNAL_FILE *ExternalFileList = AcpiGbl_ExternalFileList; @@ -229,7 +230,7 @@ AdAmlDisassemble ( */ if (Filename) { - Status = AcpiDbGetTableFromFile (Filename, &Table); + Status = AcpiDbGetTableFromFile (Filename, &Table, FALSE); if (ACPI_FAILURE (Status)) { return (Status); @@ -250,9 +251,16 @@ AdAmlDisassemble ( continue; } - Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable); + Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable, TRUE); if (ACPI_FAILURE (Status)) { + if (Status == AE_TYPE) + { + ExternalFileList = ExternalFileList->Next; + GlobalStatus = AE_TYPE; + Status = AE_OK; + continue; + } return (Status); } @@ -282,6 +290,11 @@ AdAmlDisassemble ( ExternalFileList = ExternalFileList->Next; } + if (ACPI_FAILURE (GlobalStatus)) + { + return (GlobalStatus); + } + /* Clear external list generated by Scope in external tables */ if (AcpiGbl_ExternalFileList) Modified: head/sys/contrib/dev/acpica/common/ahpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahpredef.c Mon May 18 23:17:34 2015 (r283091) +++ head/sys/contrib/dev/acpica/common/ahpredef.c Mon May 18 23:46:11 2015 (r283092) @@ -94,6 +94,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_BMS", "Battery Measurement Sampling Time", "Sets the battery measurement sampling time"), AH_PREDEF ("_BQC", "Brightness Query Current", "Returns the current display brightness level"), AH_PREDEF ("_BST", "Battery Status", "Returns a Control Method Battery status block"), + AH_PREDEF ("_BTH", "Battery Throttle Limit", "Thermal limit for charging and discharging"), AH_PREDEF ("_BTM", "Battery Time", "Returns the battery runtime"), AH_PREDEF ("_BTP", "Battery Trip Point", "Sets a Control Method Battery trip point"), AH_PREDEF ("_CBA", "Configuration Base Address", "Sets the base address for a PCI Express host bridge"), @@ -102,6 +103,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_CID", "Compatible ID", "Returns a device's Plug and Play Compatible ID list"), AH_PREDEF ("_CLS", "Class Code", "Returns PCI class code and subclass"), AH_PREDEF ("_CPC", "Continuous Performance Control", "Returns a list of performance control interfaces"), + AH_PREDEF ("_CR3", "Warm/Standby Temperature", "Temperature for a fast low power state"), AH_PREDEF ("_CRS", "Current Resource Settings", "Returns the current resource settings for a device"), AH_PREDEF ("_CRT", "Critical Temperature", "Returns the shutdown critical temperature"), AH_PREDEF ("_CSD", "C-State Dependencies", "Returns a list of C-state dependencies"), @@ -175,6 +177,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_LIN", "Lines In Use", "Handshake lines, Resource Descriptor field"), AH_PREDEF ("_LL_", "Low Level", "Interrupt polarity, Resource Descriptor field"), AH_PREDEF ("_LPD", "Low Power Dependencies", "Returns a list of dependencies for low power idle entry"), + AH_PREDEF ("_LPI", "Low Power Idle States", "Returns a list of supported low power idle states"), AH_PREDEF ("_MAF", "Maximum Address Fixed", "Resource Descriptor field"), AH_PREDEF ("_MAT", "Multiple APIC Table Entry", "Returns a list of MADT APIC structure entries"), AH_PREDEF ("_MAX", "Maximum Base Address", "Resource Descriptor field"), @@ -186,6 +189,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_MOD", "Mode", "Interrupt mode, Resource Descriptor field"), AH_PREDEF ("_MSG", "Message", "Sets the system message waiting status indicator"), AH_PREDEF ("_MSM", "Memory Set Monitoring", "Sets bandwidth monitoring parameters for a memory device"), + AH_PREDEF ("_MTL", "Minimum Throttle Limit", "Returns the minimum throttle limit for a thermal zone"), AH_PREDEF ("_MTP", "Memory Type", "Resource Descriptor field"), AH_PREDEF ("_NTT", "Notification Temperature Threshold", "Returns a threshold for device temperature change that requires platform notification"), AH_PREDEF ("_OFF", "Power Off", "Sets a power resource to the off state"), @@ -209,7 +213,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_PMD", "Power Metered Devices", "Returns a list of devices that are measured by the power meter device"), AH_PREDEF ("_PMM", "Power Meter Measurement", "Returns the current value of the Power Meter"), AH_PREDEF ("_POL", "Polarity", "Interrupt polarity, Resource Descriptor field"), - AH_PREDEF ("_PPC", "Performance Present Capabilites", "Returns a list of the performance states currently supported by the platform"), + AH_PREDEF ("_PPC", "Performance Present Capabilities", "Returns a list of the performance states currently supported by the platform"), AH_PREDEF ("_PPE", "Polling for Platform Error", "Returns the polling interval to retrieve Corrected Platform Error information"), AH_PREDEF ("_PPI", "Pin Configuration", "Resource Descriptor field"), AH_PREDEF ("_PR", "Processor", "Predefined scope for processor objects"), @@ -219,6 +223,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_PR3", "Power Resources for D3hot", "Returns a list of dependent power resources to enter state D3hot"), AH_PREDEF ("_PRE", "Power Resources for Enumeration", "Returns a list of dependent power resources to enumerate devices on a bus"), AH_PREDEF ("_PRL", "Power Source Redundancy List", "Returns a list of power source devices in the same redundancy grouping"), + AH_PREDEF ("_PRR", "Power Resource for Reset", "Execute a reset on a device"), AH_PREDEF ("_PRS", "Possible Resource Settings", "Returns a list of a device's possible resource settings"), AH_PREDEF ("_PRT", "PCI Routing Table", "Returns a list of PCI interrupt mappings"), AH_PREDEF ("_PRW", "Power Resources for Wake", "Returns a list of dependent power resources for waking"), @@ -242,10 +247,12 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_Qxx", "EC Query", "Embedded Controller query and SMBus Alarm control method"), AH_PREDEF ("_RBO", "Register Bit Offset", "Resource Descriptor field"), AH_PREDEF ("_RBW", "Register Bit Width", "Resource Descriptor field"), + AH_PREDEF ("_RDI", "Resource Dependencies for Idle", "Returns a list of dependencies for idle states"), AH_PREDEF ("_REG", "Region Availability", "Inform AML code of an operation region availability change"), AH_PREDEF ("_REV", "Supported ACPI Revision", "Returns the revision of the ACPI specification that is implemented"), AH_PREDEF ("_RMV", "Removal Status", "Returns a device's removal ability status (docking)"), AH_PREDEF ("_RNG", "Range", "Memory range type, Resource Descriptor field"), + AH_PREDEF ("_RST", "Device Reset", "Executes a reset on a device"), AH_PREDEF ("_ROM", "Read-Only Memory", "Returns a copy of the ROM data for a display device"), AH_PREDEF ("_RT_", "Resource Type", "Resource Descriptor field"), AH_PREDEF ("_RTV", "Relative Temperature Values", "Returns temperature value information"), @@ -296,6 +303,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_TC1", "Thermal Constant 1", "Returns TC1 for the passive cooling formula"), AH_PREDEF ("_TC2", "Thermal Constant 2", "Returns TC2 for the passive cooling formula"), AH_PREDEF ("_TDL", "T-State Depth Limit", "Returns the _TSS entry number of the lowest power throttling state"), + AH_PREDEF ("_TFP", "Thermal Fast Sampling Period", "Returns the sampling period for passive cooling"), AH_PREDEF ("_TIP", "Expired Timer Wake Policy", "Returns timer policies of the wake alarm device"), AH_PREDEF ("_TIV", "Timer Values", "Returns remaining time of the wake alarm device"), AH_PREDEF ("_TMP", "Temperature", "Returns a thermal zone's current temperature"), @@ -306,6 +314,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_TRT", "Thermal Relationship Table", "Returns thermal relationships between platform devices"), AH_PREDEF ("_TSD", "Throttling State Dependencies", "Returns a list of T-state dependencies"), AH_PREDEF ("_TSF", "Type-Specific Flags", "Resource Descriptor field"), + AH_PREDEF ("_TSN", "Thermal Sensor Device", "Returns a reference to a thermal sensor"), AH_PREDEF ("_TSP", "Thermal Sampling Period", "Returns the thermal sampling period for passive cooling"), AH_PREDEF ("_TSS", "Throttling Supported States", "Returns supported throttling state information"), AH_PREDEF ("_TST", "Temperature Sensor Threshold", "Returns the minimum separation for a device's temperature trip points"), Copied and modified: head/sys/contrib/dev/acpica/common/ahtable.c (from r283090, vendor-sys/acpica/dist/source/common/ahtable.c) ============================================================================== --- vendor-sys/acpica/dist/source/common/ahtable.c Mon May 18 23:17:05 2015 (r283090, copy source) +++ head/sys/contrib/dev/acpica/common/ahtable.c Mon May 18 23:46:11 2015 (r283092) @@ -41,8 +41,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ -#include "acpi.h" -#include "accommon.h" +#include +#include /* Local prototypes */ Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Mon May 18 23:17:34 2015 (r283091) +++ head/sys/contrib/dev/acpica/common/dmextern.c Mon May 18 23:46:11 2015 (r283092) @@ -1286,7 +1286,9 @@ AcpiDmUnresolvedWarning ( " * compile because the disassembler did not know how many arguments\n" " * to assign to these methods. To specify the tables needed to resolve\n" " * external control method references, the -e option can be used to\n" - " * specify the filenames. Example iASL invocations:\n" + " * specify the filenames. Note: SSDTs can be dynamically loaded at\n" + " * runtime and may or may not be available via the host OS.\n" + " * Example iASL invocations:\n" " * iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml\n" " * iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml\n" " * iasl -e ssdt*.aml -d dsdt.aml\n" @@ -1314,7 +1316,8 @@ AcpiDmUnresolvedWarning ( " * ACPI tables may be required to properly disassemble the code. This\n" " * resulting disassembler output file may not compile because the\n" " * disassembler did not know how many arguments to assign to the\n" - " * unresolved methods.\n" + " * unresolved methods. Note: SSDTs can be dynamically loaded at\n" + " * runtime and may or may not be available via the host OS.\n" " *\n" " * If necessary, the -fe option can be used to specify a file containing\n" " * control method external declarations with the associated method\n" @@ -1345,7 +1348,9 @@ AcpiDmUnresolvedWarning ( "compile because the disassembler did not know how many arguments\n" "to assign to these methods. To specify the tables needed to resolve\n" "external control method references, the -e option can be used to\n" - "specify the filenames. Example iASL invocations:\n" + "specify the filenames. Note: SSDTs can be dynamically loaded at\n" + "runtime and may or may not be available via the host OS.\n" + "Example iASL invocations:\n" " iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml\n" " iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml\n" " iasl -e ssdt*.aml -d dsdt.aml\n" @@ -1368,7 +1373,8 @@ AcpiDmUnresolvedWarning ( "ACPI tables may be required to properly disassemble the code. The\n" "resulting disassembler output file may not compile because the\n" "disassembler did not know how many arguments to assign to the\n" - "unresolved methods.\n" + "unresolved methods. Note: SSDTs can be dynamically loaded at\n" + "runtime and may or may not be available via the host OS.\n" "\n" "If necessary, the -fe option can be used to specify a file containing\n" "control method external declarations with the associated method\n" Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Mon May 18 23:17:34 2015 (r283091) +++ head/sys/contrib/dev/acpica/common/dmtable.c Mon May 18 23:46:11 2015 (r283092) @@ -53,6 +53,11 @@ #define _COMPONENT ACPI_CA_DISASSEMBLER ACPI_MODULE_NAME ("dmtable") +const AH_TABLE * +AcpiAhGetTableInfo ( + char *Signature); + + /* Local Prototypes */ static void @@ -78,7 +83,7 @@ static const char *AcpiDmAsfSu "ASF Remote Control", "ASF RMCP Boot Options", "ASF Address", - "Unknown SubTable Type" /* Reserved */ + "Unknown Subtable Type" /* Reserved */ }; static const char *AcpiDmDmarSubnames[] = @@ -88,7 +93,7 @@ static const char *AcpiDmDmarS "Root Port ATS Capability", "Remapping Hardware Static Affinity", "ACPI Namespace Device Declaration", - "Unknown SubTable Type" /* Reserved */ + "Unknown Subtable Type" /* Reserved */ }; static const char *AcpiDmDmarScope[] = @@ -176,7 +181,7 @@ static const char *AcpiDmGtdtS { "Generic Timer Block", "Generic Watchdog Timer", - "Unknown SubTable Type" /* Reserved */ + "Unknown Subtable Type" /* Reserved */ }; static const char *AcpiDmHestSubnames[] = @@ -191,7 +196,7 @@ static const char *AcpiDmHestS "PCI Express AER (AER Endpoint)", "PCI Express/PCI-X Bridge AER", "Generic Hardware Error Source", - "Unknown SubTable Type" /* Reserved */ + "Unknown Subtable Type" /* Reserved */ }; static const char *AcpiDmHestNotifySubnames[] = @@ -223,14 +228,27 @@ static const char *AcpiDmMadtS "Generic Interrupt Distributor", /* ACPI_MADT_GENERIC_DISTRIBUTOR */ "Generic MSI Frame", /* ACPI_MADT_GENERIC_MSI_FRAME */ "Generic Interrupt Redistributor", /* ACPI_MADT_GENERIC_REDISTRIBUTOR */ - "Unknown SubTable Type" /* Reserved */ + "Generic Interrupt Translator", /* ACPI_MADT_GENERIC_TRANSLATOR */ + "Unknown Subtable Type" /* Reserved */ +}; + +static const char *AcpiDmNfitSubnames[] = +{ + "System Physical Address Range", /* ACPI_NFIT_TYPE_SYSTEM_ADDRESS */ + "Memory Range Map", /* ACPI_NFIT_TYPE_MEMORY_MAP */ + "Interleave Info", /* ACPI_NFIT_TYPE_INTERLEAVE */ + "SMBIOS Information", /* ACPI_NFIT_TYPE_SMBIOS */ + "NVDIMM Control Region", /* ACPI_NFIT_TYPE_CONTROL_REGION */ + "NVDIMM Block Data Window Region", /* ACPI_NFIT_TYPE_DATA_REGION */ + "Flush Hint Address", /* ACPI_NFIT_TYPE_FLUSH_ADDRESS */ + "Unknown Subtable Type" /* Reserved */ }; static const char *AcpiDmPcctSubnames[] = { "Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */ - "HW-Reduced Communications Subspace", - "Unknown SubTable Type" /* Reserved */ + "HW-Reduced Comm Subspace", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE */ + "Unknown Subtable Type" /* Reserved */ }; static const char *AcpiDmPmttSubnames[] = @@ -238,7 +256,7 @@ static const char *AcpiDmPmttS "Socket", /* ACPI_PMTT_TYPE_SOCKET */ "Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */ "Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */ - "Unknown SubTable Type" /* Reserved */ + "Unknown Subtable Type" /* Reserved */ }; static const char *AcpiDmSratSubnames[] = @@ -247,21 +265,20 @@ static const char *AcpiDmSratS "Memory Affinity", "Processor Local x2APIC Affinity", "GICC Affinity", - "Unknown SubTable Type" /* Reserved */ + "Unknown Subtable Type" /* Reserved */ }; static const char *AcpiDmIvrsSubnames[] = { "Hardware Definition Block", "Memory Definition Block", - "Unknown SubTable Type" /* Reserved */ + "Unknown Subtable Type" /* Reserved */ }; static const char *AcpiDmLpitSubnames[] = { "Native C-state Idle Structure", - "Simple I/O Idle Structure", - "Unknown SubTable Type" /* Reserved */ + "Unknown Subtable Type" /* Reserved */ }; #define ACPI_FADT_PM_RESERVED 9 @@ -304,56 +321,65 @@ static const char *AcpiDmGasAc * handler. This table must be NULL terminated. RSDP and FACS are * special-cased elsewhere. * + * Note: Any tables added here should be duplicated within AcpiSupportedTables + * in the file common/ahtable.c + * ******************************************************************************/ -ACPI_DMTABLE_DATA AcpiDmTableData[] = +const ACPI_DMTABLE_DATA AcpiDmTableData[] = { - {ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf, "Alert Standard Format table"}, - {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert, "Boot Error Record Table"}, - {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt, "Boot Graphics Resource Table"}, - {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot, "Simple Boot Flag Table"}, - {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep, "Corrected Platform Error Polling table"}, - {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt, "Core System Resource Table"}, - {ACPI_SIG_DBG2, AcpiDmTableInfoDbg2, AcpiDmDumpDbg2, DtCompileDbg2, TemplateDbg2, "Debug Port table type 2"}, - {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp, "Debug Port table"}, - {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar, "DMA Remapping table"}, - {ACPI_SIG_ECDT, AcpiDmTableInfoEcdt, NULL, NULL, TemplateEcdt, "Embedded Controller Boot Resources Table"}, - {ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, TemplateEinj, "Error Injection table"}, - {ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, TemplateErst, "Error Record Serialization Table"}, - {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, TemplateFadt, "Fixed ACPI Description Table (FADT)"}, - {ACPI_SIG_FPDT, NULL, AcpiDmDumpFpdt, DtCompileFpdt, TemplateFpdt, "Firmware Performance Data Table"}, - {ACPI_SIG_GTDT, NULL, AcpiDmDumpGtdt, DtCompileGtdt, TemplateGtdt, "Generic Timer Description Table"}, - {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest, "Hardware Error Source Table"}, - {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet, "High Precision Event Timer table"}, - {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs, "I/O Virtualization Reporting Structure"}, - {ACPI_SIG_LPIT, NULL, AcpiDmDumpLpit, DtCompileLpit, TemplateLpit, "Low Power Idle Table"}, - {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt, "Multiple APIC Description Table (MADT)"}, - {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg, "Memory Mapped Configuration table"}, - {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi, "Management Controller Host Interface table"}, - {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst, "Memory Power State Table"}, - {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct, "Maximum System Characteristics Table"}, - {ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm, "Microsoft Data Management table"}, - {ACPI_SIG_MTMR, NULL, AcpiDmDumpMtmr, DtCompileMtmr, TemplateMtmr, "MID Timer Table"}, - {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct, "Platform Communications Channel Table"}, - {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt, "Platform Memory Topology Table"}, - {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt, "Root System Description Table"}, - {ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt, "S3 Performance Table"}, - {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst, "Smart Battery Specification Table"}, - {ACPI_SIG_SLIC, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateSlic, "Software Licensing Description Table"}, - {ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, TemplateSlit, "System Locality Information Table"}, - {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, NULL, TemplateSpcr, "Serial Port Console Redirection table"}, - {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi, "Server Platform Management Interface table"}, - {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat, "System Resource Affinity Table"}, - {ACPI_SIG_TCPA, AcpiDmTableInfoTcpa, NULL, NULL, TemplateTcpa, "Trusted Computing Platform Alliance table"}, - {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, NULL, NULL, TemplateTpm2, "Trusted Platform Module hardware interface table"}, - {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi, "UEFI Boot Optimization Table"}, - {ACPI_SIG_VRTC, AcpiDmTableInfoVrtc, AcpiDmDumpVrtc, DtCompileVrtc, TemplateVrtc, "Virtual Real-Time Clock Table"}, - {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet, "Windows ACPI Emulated Devices Table"}, - {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat, "Watchdog Action Table"}, - {ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt, "Watchdog Description Table"}, - {ACPI_SIG_WDRT, AcpiDmTableInfoWdrt, NULL, NULL, TemplateWdrt, "Watchdog Resource Table"}, - {ACPI_SIG_XSDT, NULL, AcpiDmDumpXsdt, DtCompileXsdt, TemplateXsdt, "Extended System Description Table"}, - {NULL, NULL, NULL, NULL, NULL, NULL} + {ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf}, + {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert}, + {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt}, + {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot}, + {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep}, + {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt}, + {ACPI_SIG_DBG2, AcpiDmTableInfoDbg2, AcpiDmDumpDbg2, DtCompileDbg2, TemplateDbg2}, + {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp}, + {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar}, + {ACPI_SIG_DRTM, NULL, AcpiDmDumpDrtm, DtCompileDrtm, TemplateDrtm}, + {ACPI_SIG_ECDT, AcpiDmTableInfoEcdt, NULL, NULL, TemplateEcdt}, + {ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, TemplateEinj}, + {ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, TemplateErst}, + {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, TemplateFadt}, + {ACPI_SIG_FPDT, NULL, AcpiDmDumpFpdt, DtCompileFpdt, TemplateFpdt}, + {ACPI_SIG_GTDT, NULL, AcpiDmDumpGtdt, DtCompileGtdt, TemplateGtdt}, + {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest}, + {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet}, + {ACPI_SIG_IORT, NULL, AcpiDmDumpIort, DtCompileIort, TemplateIort}, + {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs}, + {ACPI_SIG_LPIT, NULL, AcpiDmDumpLpit, DtCompileLpit, TemplateLpit}, + {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt}, + {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg}, + {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi}, + {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst}, + {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct}, + {ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm}, + {ACPI_SIG_MTMR, NULL, AcpiDmDumpMtmr, DtCompileMtmr, TemplateMtmr}, + {ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit}, + {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct}, + {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt}, + {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt}, + {ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt}, + {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst}, + {ACPI_SIG_SLIC, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateSlic}, + {ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, TemplateSlit}, + {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, NULL, TemplateSpcr}, + {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi}, + {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat}, + {ACPI_SIG_STAO, NULL, AcpiDmDumpStao, DtCompileStao, TemplateStao}, + {ACPI_SIG_TCPA, AcpiDmTableInfoTcpa, NULL, NULL, TemplateTcpa}, + {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, NULL, NULL, TemplateTpm2}, + {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi}, + {ACPI_SIG_VRTC, AcpiDmTableInfoVrtc, AcpiDmDumpVrtc, DtCompileVrtc, TemplateVrtc}, + {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet}, + {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat}, + {ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt}, + {ACPI_SIG_WDRT, AcpiDmTableInfoWdrt, NULL, NULL, TemplateWdrt}, + {ACPI_SIG_WPBT, NULL, AcpiDmDumpWpbt, DtCompileWpbt, TemplateWpbt}, + {ACPI_SIG_XENV, AcpiDmTableInfoXenv, NULL, NULL, TemplateXenv}, + {ACPI_SIG_XSDT, NULL, AcpiDmDumpXsdt, DtCompileXsdt, TemplateXsdt}, + {NULL, NULL, NULL, NULL, NULL} }; @@ -407,18 +433,18 @@ AcpiDmGenerateChecksum ( * ******************************************************************************/ -ACPI_DMTABLE_DATA * +const ACPI_DMTABLE_DATA * AcpiDmGetTableData ( char *Signature) { - ACPI_DMTABLE_DATA *TableData; + const ACPI_DMTABLE_DATA *Info; - for (TableData = AcpiDmTableData; TableData->Signature; TableData++) + for (Info = AcpiDmTableData; Info->Signature; Info++) { - if (ACPI_COMPARE_NAME (Signature, TableData->Signature)) + if (ACPI_COMPARE_NAME (Signature, Info->Signature)) { - return (TableData); + return (Info); } } @@ -444,7 +470,7 @@ AcpiDmDumpDataTable ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; - ACPI_DMTABLE_DATA *TableData; + const ACPI_DMTABLE_DATA *TableData; UINT32 Length; @@ -558,7 +584,6 @@ AcpiDmDumpDataTable ( * PARAMETERS: Offset - Current byte offset, from table start * ByteLength - Length of the field in bytes, 0 for flags * Name - Name of this field - * Value - Optional value, displayed on left of ':' * * RETURN: None * @@ -692,7 +717,7 @@ AcpiDmDumpTable ( UINT16 Temp16; UINT32 Temp32; UINT64 Value; - ACPI_DMTABLE_DATA *TableData; + const AH_TABLE *TableData; const char *Name; BOOLEAN LastOutputBlankLine = FALSE; char RepairedName[8]; @@ -715,13 +740,24 @@ AcpiDmDumpTable ( Target = ACPI_ADD_PTR (UINT8, Table, Info->Offset); CurrentOffset = TableOffset + Info->Offset; - /* Check for beyond EOT or beyond subtable end */ + /* Check for beyond subtable end or (worse) beyond EOT */ + + if (SubtableLength && (Info->Offset >= SubtableLength)) + { + AcpiOsPrintf ( + "/**** ACPI subtable terminates early - " + "may be older version (dump table) */\n"); - if ((CurrentOffset >= TableLength) || - (SubtableLength && (Info->Offset >= SubtableLength))) + /* Move on to next subtable */ + + return (AE_OK); + } + + if (CurrentOffset >= TableLength) { AcpiOsPrintf ( - "**** ACPI table terminates in the middle of a data structure! (dump table)\n"); + "/**** ACPI table terminates " + "in the middle of a data structure! (dump table) */\n"); return (AE_BAD_DATA); } @@ -754,6 +790,7 @@ AcpiDmDumpTable ( case ACPI_DMT_UINT16: case ACPI_DMT_DMAR: case ACPI_DMT_HEST: + case ACPI_DMT_NFIT: ByteLength = 2; break; @@ -810,6 +847,7 @@ AcpiDmDumpTable ( ByteLength = 128; break; + case ACPI_DMT_UNICODE: case ACPI_DMT_BUFFER: case ACPI_DMT_RAW_BUFFER: @@ -841,16 +879,39 @@ AcpiDmDumpTable ( ByteLength = sizeof (ACPI_HEST_NOTIFY); break; + case ACPI_DMT_IORTMEM: + + if (!LastOutputBlankLine) + { + LastOutputBlankLine = FALSE; + } + ByteLength = sizeof (ACPI_IORT_MEMORY_ACCESS); + break; + default: ByteLength = 0; break; } + /* Check if we are beyond a subtable, or (worse) beyond EOT */ + if (CurrentOffset + ByteLength > TableLength) { + if (SubtableLength) + { + AcpiOsPrintf ( + "/**** ACPI subtable terminates early - " + "may be older version (dump table) */\n"); + + /* Move on to next subtable */ + + return (AE_OK); + } + AcpiOsPrintf ( - "**** ACPI table terminates in the middle of a data structure!\n"); + "/**** ACPI table terminates " + "in the middle of a data structure! */\n"); return (AE_BAD_DATA); } @@ -980,10 +1041,10 @@ AcpiDmDumpTable ( AcpiDmCheckAscii (Target, RepairedName, 4); AcpiOsPrintf ("\"%.4s\" ", RepairedName); - TableData = AcpiDmGetTableData (ACPI_CAST_PTR (char, Target)); + TableData = AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target)); if (TableData) { - AcpiOsPrintf (STRING_FORMAT, TableData->Name); + AcpiOsPrintf (STRING_FORMAT, TableData->Description); } else { @@ -1209,6 +1270,16 @@ AcpiDmDumpTable ( AcpiDmHestNotifySubnames[Temp8]); break; + case ACPI_DMT_IORTMEM: + + AcpiOsPrintf (STRING_FORMAT, + "IORT Memory Access Properties"); + + AcpiDmDumpTable (TableLength, CurrentOffset, Target, + sizeof (ACPI_IORT_MEMORY_ACCESS), AcpiDmTableInfoIortAcc); + LastOutputBlankLine = TRUE; + break; + case ACPI_DMT_MADT: /* MADT subtable types */ @@ -1223,6 +1294,20 @@ AcpiDmDumpTable ( AcpiDmMadtSubnames[Temp8]); break; + case ACPI_DMT_NFIT: + + /* NFIT subtable types */ + + Temp16 = ACPI_GET16 (Target); + if (Temp16 > ACPI_NFIT_TYPE_RESERVED) + { + Temp16 = ACPI_NFIT_TYPE_RESERVED; + } + + AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), + AcpiDmNfitSubnames[Temp16]); + break; + case ACPI_DMT_PCCT: /* PCCT subtable types */ @@ -1251,16 +1336,27 @@ AcpiDmDumpTable ( AcpiDmPmttSubnames[Temp8]); break; + case ACPI_DMT_UNICODE: + + if (ByteLength == 0) + { + AcpiOsPrintf ("/* Zero-length Data */\n"); + break; + } + + AcpiDmDumpUnicode (Table, CurrentOffset, ByteLength); + break; + case ACPI_DMT_RAW_BUFFER: - /* - * Currently only used for SLIC table - */ - AcpiOsPrintf ("/* Proprietary data structure */ "); - AcpiDmDumpBuffer (Table, sizeof (ACPI_TABLE_HEADER), - ByteLength, sizeof (ACPI_TABLE_HEADER), - "Licensing Data", TRUE); - AcpiOsPrintf ("\n"); + if (ByteLength == 0) + { + AcpiOsPrintf ("/* Zero-length Data */\n"); + break; + } + + AcpiDmDumpBuffer (Table, CurrentOffset, ByteLength, + CurrentOffset, NULL); break; case ACPI_DMT_SRAT: Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Mon May 18 23:17:34 2015 (r283091) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Mon May 18 23:46:11 2015 (r283092) @@ -70,7 +70,6 @@ AcpiDmValidateFadtLength ( * AbsoluteOffset - Offset of buffer in the main ACPI table * Header - Name of the buffer field (printed on the * first line only.) - * MultiLine - TRUE if a large, multi-line buffer * * RETURN: None * @@ -85,8 +84,7 @@ AcpiDmDumpBuffer ( UINT32 BufferOffset, UINT32 Length, UINT32 AbsoluteOffset, - char *Header, - BOOLEAN MultiLine) + char *Header) { UINT8 *Buffer; UINT32 i; @@ -104,18 +102,11 @@ AcpiDmDumpBuffer ( { if (!(i % 16)) { - if (MultiLine) - { - /* Insert a backslash - line continuation character */ + /* Insert a backslash - line continuation character */ - AcpiOsPrintf ("\\\n "); - } - else + if (Length > 16) { - AcpiOsPrintf ("\n"); - AcpiDmLineHeader (AbsoluteOffset, - ((Length - i) > 16) ? 16 : (Length - i), Header); - Header = NULL; + AcpiOsPrintf ("\\\n "); } } @@ -131,6 +122,74 @@ AcpiDmDumpBuffer ( /******************************************************************************* * + * FUNCTION: AcpiDmDumpUnicode + * + * PARAMETERS: Table - ACPI Table or subtable + * BufferOffset - Offset of buffer from Table above + * ByteLength - Length of the buffer + * + * RETURN: None + * + * DESCRIPTION: Validate and dump the contents of a buffer that contains + * unicode data. The output is a standard ASCII string. If it + * appears that the data is not unicode, the buffer is dumped + * as hex characters. + * + ******************************************************************************/ + +void +AcpiDmDumpUnicode ( + void *Table, + UINT32 BufferOffset, + UINT32 ByteLength) +{ + UINT8 *Buffer; + UINT32 Length; + UINT32 i; + + + Buffer = ((UINT8 *) Table) + BufferOffset; + Length = ByteLength - 2; /* Last two bytes are the null terminator */ + + /* Ensure all low bytes are entirely printable ASCII */ + + for (i = 0; i < Length; i += 2) + { + if (!ACPI_IS_PRINT (Buffer[i])) + { + goto DumpRawBuffer; + } + } + + /* Ensure all high bytes are zero */ + + for (i = 1; i < Length; i += 2) + { + if (Buffer[i]) + { + goto DumpRawBuffer; + } + } + + /* Dump the buffer as a normal string */ + + AcpiOsPrintf ("\""); + for (i = 0; i < Length; i += 2) + { + AcpiOsPrintf ("%c", Buffer[i]); + } + AcpiOsPrintf ("\"\n"); + return; + +DumpRawBuffer: + AcpiDmDumpBuffer (Table, BufferOffset, ByteLength, + BufferOffset, NULL); + AcpiOsPrintf ("\n"); +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmDumpRsdp * * PARAMETERS: Table - A RSDP @@ -313,6 +372,13 @@ AcpiDmDumpFadt ( { AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoFadt5); } + + /* Check for FADT revision 6 fields and up (ACPI 6.0+) */ + + if (Table->Length > ACPI_FADT_V3_SIZE) + { + AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoFadt6); + } } /* Validate various fields in the FADT, including length */ @@ -693,10 +759,17 @@ AcpiDmDumpCsrt ( /* Resource-specific info buffer */ InfoLength = SubSubTable->Length - SubSubOffset; - - AcpiDmDumpBuffer (SubSubTable, SubSubOffset, InfoLength, - Offset + SubOffset + SubSubOffset, "ResourceInfo", FALSE); - SubSubOffset += InfoLength; + if (InfoLength) + { + Status = AcpiDmDumpTable (Length, + Offset + SubOffset + SubSubOffset, Table, + InfoLength, AcpiDmTableInfoCsrt2a); + if (ACPI_FAILURE (Status)) + { + return; + } + SubSubOffset += InfoLength; + } /* Point to next sub-subtable */ @@ -814,8 +887,13 @@ AcpiDmDumpDbg2 ( if (SubTable->OemDataOffset) { - AcpiDmDumpBuffer (SubTable, SubTable->OemDataOffset, SubTable->OemDataLength, - Offset + SubTable->OemDataOffset, "OEM Data", FALSE); + Status = AcpiDmDumpTable (Length, Offset + SubTable->OemDataOffset, + Table, SubTable->OemDataLength, + AcpiDmTableInfoDbg2OemData); + if (ACPI_FAILURE (Status)) + { + return; + } } /* Point to next subtable */ @@ -840,7 +918,6 @@ AcpiDmDumpDbg2 ( * ******************************************************************************/ - void AcpiDmDumpDmar ( ACPI_TABLE_HEADER *Table) @@ -985,6 +1062,120 @@ NextSubtable: /******************************************************************************* * + * FUNCTION: AcpiDmDumpDrtm + * + * PARAMETERS: Table - A DRTM table + * + * RETURN: None + * + * DESCRIPTION: Format the contents of a DRTM. + * + ******************************************************************************/ + +void +AcpiDmDumpDrtm ( + ACPI_TABLE_HEADER *Table) +{ + ACPI_STATUS Status; + UINT32 Offset; + ACPI_DRTM_VTABLE_LIST *DrtmVtl; + ACPI_DRTM_RESOURCE_LIST *DrtmRl; + ACPI_DRTM_DPS_ID *DrtmDps; + UINT32 Count; + + + /* Main table */ + + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + AcpiDmTableInfoDrtm); + if (ACPI_FAILURE (Status)) + { + return; + } + + Offset = sizeof (ACPI_TABLE_DRTM); + + /* Sub-tables */ + + /* Dump ValidatedTable length */ + + DrtmVtl = ACPI_ADD_PTR (ACPI_DRTM_VTABLE_LIST, Table, Offset); + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Table->Length, Offset, + DrtmVtl, ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST, ValidatedTables), + AcpiDmTableInfoDrtm0); + if (ACPI_FAILURE (Status)) + { + return; + } + Offset += ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST, ValidatedTables); + + /* Dump Validated table addresses */ + + Count = 0; + while ((Offset < Table->Length) && + (DrtmVtl->ValidatedTableCount > Count)) + { + Status = AcpiDmDumpTable (Table->Length, Offset, + ACPI_ADD_PTR (void, Table, Offset), sizeof (UINT64), + AcpiDmTableInfoDrtm0a); + if (ACPI_FAILURE (Status)) + { + return; + } + Offset += sizeof (UINT64); + Count++; + } + + /* Dump ResourceList length */ + + DrtmRl = ACPI_ADD_PTR (ACPI_DRTM_RESOURCE_LIST, Table, Offset); + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Table->Length, Offset, + DrtmRl, ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST, Resources), + AcpiDmTableInfoDrtm1); + if (ACPI_FAILURE (Status)) + { + return; + } + + Offset += ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST, Resources); + + /* Dump the Resource List */ + + Count = 0; + while ((Offset < Table->Length) && + (DrtmRl->ResourceCount > Count)) + { + Status = AcpiDmDumpTable (Table->Length, Offset, + ACPI_ADD_PTR (void, Table, Offset), + sizeof (ACPI_DRTM_RESOURCE), + AcpiDmTableInfoDrtm1a); + if (ACPI_FAILURE (Status)) + { + return; + } + + Offset += sizeof (ACPI_DRTM_RESOURCE); + Count++; + } + + /* Dump DPS */ + + DrtmDps = ACPI_ADD_PTR (ACPI_DRTM_DPS_ID, Table, Offset); + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Table->Length, Offset, + DrtmDps, sizeof (ACPI_DRTM_DPS_ID), + AcpiDmTableInfoDrtm2); + if (ACPI_FAILURE (Status)) + { + return; + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmDumpEinj * * PARAMETERS: Table - A EINJ table @@ -1429,6 +1620,230 @@ AcpiDmDumpHest ( /******************************************************************************* * + * FUNCTION: AcpiDmDumpIort + * + * PARAMETERS: Table - A IORT table + * + * RETURN: None + * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue May 19 01:10:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01A30A5D; Tue, 19 May 2015 01:10:34 +0000 (UTC) Received: from st11p00im-asmtp003.me.com (st11p00im-asmtp003.me.com [17.172.80.97]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBEE11EB7; Tue, 19 May 2015 01:10:33 +0000 (UTC) Received: from akita.localnet (c-73-162-13-215.hsd1.ca.comcast.net [73.162.13.215]) by st11p00im-asmtp003.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NOK00ABRLTAKG00@st11p00im-asmtp003.me.com>; Tue, 19 May 2015 00:10:24 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-05-18_04:2015-05-18,2015-05-18,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1505190001 From: Rui Paulo To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283025 - head/cddl/contrib/opensolaris/lib/libdtrace/common Date: Mon, 18 May 2015 17:10:21 -0700 Message-id: <1729865.rvUmYdjvWE@akita> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-reply-to: <201505170359.t4H3x9uK006154@svn.freebsd.org> References: <201505170359.t4H3x9uK006154@svn.freebsd.org> MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=us-ascii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 01:10:34 -0000 On Sunday 17 May 2015 03:59:09 Mark Johnston wrote: > Author: markj > Date: Sun May 17 03:59:08 2015 > New Revision: 283025 > URL: https://svnweb.freebsd.org/changeset/base/283025 > > Log: > As dtrace(1) processes D libraries under /usr/lib/dtrace, the compiler may > return an error if one of the depends_on directives in a library is not > satisfied. In this case, libdtrace is supposed to ignore the library and > carry on. However, the remainder of the library may still be buffered by > the lexer, causing libdtrace to erroneously continue processing it on the > next call to yyparse(). Fix this by explicitly flushing the input buffer > each time the compiler state is reset. Hmm, nice catch! -- Rui Paulo From owner-svn-src-head@FreeBSD.ORG Tue May 19 02:12:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 305B3130; Tue, 19 May 2015 02:12:18 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id D3B5A15B8; Tue, 19 May 2015 02:12:17 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 333E47836B7; Tue, 19 May 2015 11:48:07 +1000 (AEST) Date: Tue, 19 May 2015 11:48:00 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283088 - head/sys/ddb In-Reply-To: <201505182227.t4IMRljx078812@svn.freebsd.org> Message-ID: <20150519113755.U1840@besplex.bde.org> References: <201505182227.t4IMRljx078812@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=nOt2o3o-M51unNYgdDEA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 02:12:18 -0000 On Mon, 18 May 2015, Pedro F. Giffuni wrote: > Log: > ddb: stop boolean screaming. > > TRUE --> true > FALSE--> false > > Hinted by: NetBSD This is not just churn to a style regression, but a type mismatch. > Modified: head/sys/ddb/db_break.c > ============================================================================== > --- head/sys/ddb/db_break.c Mon May 18 22:14:06 2015 (r283087) > +++ head/sys/ddb/db_break.c Mon May 18 22:27:46 2015 (r283088) > @@ -155,12 +155,12 @@ db_find_breakpoint_here(db_addr_t addr) > return db_find_breakpoint(db_map_addr(addr), addr); > } > > -static boolean_t db_breakpoints_inserted = TRUE; > +static boolean_t db_breakpoints_inserted = true; This code hasn't been churned to use the boolean type. It still uses boolean_t, which is plain int. TRUE and FALSE go with this type. true and false go with the boolean type. This probably makes no difference, because TRUE happens to be implemented with the same value as true and there are lots of implicit versions between the types. The boolean type is almost useless since C's type system is too weak to distinguish between plain int used as a boolean and pure boolean. If it were stronger, then it would complain about all the implicit conversions between int and boolean, and the boolean type would be harder to use for other reasons. Bruce From owner-svn-src-head@FreeBSD.ORG Tue May 19 02:24:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E989368D; Tue, 19 May 2015 02:24:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D85F616C5; Tue, 19 May 2015 02:24:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4J2OtTB099203; Tue, 19 May 2015 02:24:55 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J2Ot6N099202; Tue, 19 May 2015 02:24:55 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201505190224.t4J2Ot6N099202@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Tue, 19 May 2015 02:24:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283093 - head/share/man/man3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 02:24:56 -0000 Author: pkelsey Date: Tue May 19 02:24:55 2015 New Revision: 283093 URL: https://svnweb.freebsd.org/changeset/base/283093 Log: Added description of POSIX-specified behavior when invoked on a key from within that key's destructor. Reviewed by: jhb, -doc Approved by: jmallett (mentor) MFC after: 3 days Sponsored by: Norse Corp, Inc. Modified: head/share/man/man3/pthread_getspecific.3 Modified: head/share/man/man3/pthread_getspecific.3 ============================================================================== --- head/share/man/man3/pthread_getspecific.3 Mon May 18 23:46:11 2015 (r283092) +++ head/share/man/man3/pthread_getspecific.3 Tue May 19 02:24:55 2015 (r283093) @@ -64,6 +64,11 @@ is undefined. The .Fn pthread_getspecific function may be called from a thread-specific data destructor function. +A call to +.Fn pthread_getspecific +for the thread-specific data key being destroyed returns the value NULL, +unless the value is changed (after the destructor starts) by a call to +.Fn pthread_setspecific . .Sh RETURN VALUES The .Fn pthread_getspecific From owner-svn-src-head@FreeBSD.ORG Tue May 19 03:02:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 225F2EAC; Tue, 19 May 2015 03:02:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10BE61C98; Tue, 19 May 2015 03:02:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4J32qoj021246; Tue, 19 May 2015 03:02:52 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J32qI2021245; Tue, 19 May 2015 03:02:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505190302.t4J32qI2021245@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 19 May 2015 03:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283094 - head/tools/bsdbox X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 03:02:53 -0000 Author: adrian Date: Tue May 19 03:02:52 2015 New Revision: 283094 URL: https://svnweb.freebsd.org/changeset/base/283094 Log: Add mv / expr ; these are used by the updated freebsd-wifi-build environment. Modified: head/tools/bsdbox/Makefile.base Modified: head/tools/bsdbox/Makefile.base ============================================================================== --- head/tools/bsdbox/Makefile.base Tue May 19 02:24:55 2015 (r283093) +++ head/tools/bsdbox/Makefile.base Tue May 19 03:02:52 2015 (r283094) @@ -6,7 +6,7 @@ # CRUNCH_PROGS_sbin+= dmesg sysctl init reboot CRUNCH_PROGS_bin+= ls cat dd df cp hostname kill mkdir sleep ps -CRUNCH_PROGS_bin+= ln rm hostname kenv +CRUNCH_PROGS_bin+= ln rm hostname kenv mv expr CRUNCH_PROGS_usr.bin+= true false hexdump tail nc w head uname tset CRUNCH_PROGS_usr.sbin+= gpioctl CRUNCH_ALIAS_w= uptime From owner-svn-src-head@FreeBSD.ORG Tue May 19 03:50:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59C3461C for ; Tue, 19 May 2015 03:50:08 +0000 (UTC) Received: from nm19-vm0.bullet.mail.bf1.yahoo.com (nm19-vm0.bullet.mail.bf1.yahoo.com [98.139.213.162]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A3021125 for ; Tue, 19 May 2015 03:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1432007399; bh=WMIXdxPZDAsbiudlAV2BrsWTyLb7+v6ilxvFRAnD2F4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=mzYfo1K3kQsuuKFMpYHOj6eDXtJ+YruF/qYhekRCPUctciSAph9hkjx+8ox/BRYV7lRAChnEkbQEEt8O7DkyHG1hvs8PSbbSiJlmFk7PR4zYd55dHPH6NoTYJgMLOKb6wFY2PZZ7kzO/+PjklNp4bEn3GWO/Qg4Nbk6/cEL2YwgjDjWOP/vNalg/DAIbppNCRSrjrTXySj1VhmPzVLdi4lBsRyG/OvRJHXzd7/UdySqVfHKVBgjCSXTefkPHOywUsYPjti8tVabU4nDW7Q5f8srFgKjo0KvHl+635+C3RpVcrAJG+gVc3HKgcl07bQTiLPckZoMiLCY/kJ7M2wETrA== Received: from [66.196.81.174] by nm19.bullet.mail.bf1.yahoo.com with NNFMP; 19 May 2015 03:49:59 -0000 Received: from [98.139.211.203] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 19 May 2015 03:49:59 -0000 Received: from [127.0.0.1] by smtp212.mail.bf1.yahoo.com with NNFMP; 19 May 2015 03:49:59 -0000 X-Yahoo-Newman-Id: 916666.12304.bm@smtp212.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _jOScsgVM1l7vaGBj7y0wOBVKvo2GgIiHJgD4XI2nj6Am9s Lijf5hRh5KlaxutKaXs9hdRHIPA3TedF2JdzQ69d0zmCafM_xah0dWvrZHPA iQsKYbmCvdX3rHe9u56TMJww2oZpyx3GfKvP1nRdbcKQ.ySHn7LwAIkyJ0uE DmqjSBQAiyz2UFQHKBvz.KAhTuRBD8UvCWyUs7UPVbyrl3lqiXFjt_LWbvoJ MNSS_CSdH3F5SWzIW7RJiW51KR_uVOdoAMZ0NHWLOe3xJO5bsFUxGaM.aXm9 cJYtXlK6mlD6HlgwxvaAiyS5iMZW6jAT029wM2xumS5uABefws10V3Be2bd6 M5Wj7YqJH53YAvQY6wXe2u1WV8lyw_k2pbReM0S7nUqPxkw89raric5wxvX5 0k53rutAXRuVTCXRXN8wvXCy.F7yKS5TlarbekrKfxAdmojIYWATnzTjhxsf uL2.wLBuIlRg4uRKFCbmE1AGL0x_tqBaGe.8.7inCieuajlAKUgnK8IK1_VX Yv_2TlPfPXdTTMr6QsYA18EvHZqX.wFWH X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r283088 - head/sys/ddb From: Pedro Giffuni In-Reply-To: <20150519113755.U1840@besplex.bde.org> Date: Mon, 18 May 2015 22:49:57 -0500 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <406A7AE3-1891-4B2C-B917-14C150EBBAB5@FreeBSD.org> References: <201505182227.t4IMRljx078812@svn.freebsd.org> <20150519113755.U1840@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 03:50:08 -0000 > Il giorno 18/mag/2015, alle ore 20:48, Bruce Evans = ha scritto: >=20 > On Mon, 18 May 2015, Pedro F. Giffuni wrote: >=20 >> Log: >> ddb: stop boolean screaming. >>=20 >> TRUE --> true >> FALSE--> false >>=20 >> Hinted by: NetBSD >=20 > This is not just churn to a style regression, but a type mismatch. >=20 It is an attempt to reduce differences with NetBSD. One of the complaints of hear from newcomers to the ddb code is that the format is old-fashioned (it still had pre-ANSI headers not long ago) and unmaintained. >> Modified: head/sys/ddb/db_break.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/ddb/db_break.c Mon May 18 22:14:06 2015 = (r283087) >> +++ head/sys/ddb/db_break.c Mon May 18 22:27:46 2015 = (r283088) >> @@ -155,12 +155,12 @@ db_find_breakpoint_here(db_addr_t addr) >> return db_find_breakpoint(db_map_addr(addr), addr); >> } >>=20 >> -static boolean_t db_breakpoints_inserted =3D TRUE; >> +static boolean_t db_breakpoints_inserted =3D true; >=20 > This code hasn't been churned to use the boolean type. It still uses > boolean_t, which is plain int. TRUE and FALSE go with this type. = true > and false go with the boolean type. This probably makes no = difference, > because TRUE happens to be implemented with the same value as true and > there are lots of implicit versions between the types. >=20 Yes, I noticed the return types are still ints. It doesn=E2=80=99t look = difficult to convert it to use a real boolean type. In any case, I would prefer = to go forward (using bool) instead of reverting this change. > The boolean type is almost useless since C's type system is too weak = to > distinguish between plain int used as a boolean and pure boolean. If > it were stronger, then it would complain about all the implicit = conversions > between int and boolean, and the boolean type would be harder to use = for > other reasons. >=20 And I would like that to happen, but it would probably break a lot of = legacy code. I thought boolean_t was a transition type. Pedro. From owner-svn-src-head@FreeBSD.ORG Tue May 19 04:34:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCA8CAD7; Tue, 19 May 2015 04:34:15 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 694EF168E; Tue, 19 May 2015 04:34:14 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id B7454D6769C; Tue, 19 May 2015 14:34:03 +1000 (AEST) Date: Tue, 19 May 2015 14:34:02 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Pedro Giffuni cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283088 - head/sys/ddb In-Reply-To: <406A7AE3-1891-4B2C-B917-14C150EBBAB5@FreeBSD.org> Message-ID: <20150519135341.R2157@besplex.bde.org> References: <201505182227.t4IMRljx078812@svn.freebsd.org> <20150519113755.U1840@besplex.bde.org> <406A7AE3-1891-4B2C-B917-14C150EBBAB5@FreeBSD.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=QeFf4Krv c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=nlC_4_pT8q9DhB4Ho9EA:9 a=cz2ZRIgtxKwA:10 a=wJWlkF7cXJYA:10 a=c3-DdYJoA5YA:10 a=1ViKctDbZO8BGuLCIr0A:9 a=45ClL6m2LaAA:10 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 04:34:15 -0000 On Mon, 18 May 2015, Pedro Giffuni wrote: >> Il giorno 18/mag/2015, alle ore 20:48, Bruce Evans ha scritto: >> >> On Mon, 18 May 2015, Pedro F. Giffuni wrote: >> >>> Log: >>> ddb: stop boolean screaming. >>> >>> TRUE --> true >>> FALSE--> false >>> >>> Hinted by:=09NetBSD >> >> This is not just churn to a style regression, but a type mismatch. > > It is an attempt to reduce differences with NetBSD. For that, apply the reverse change to NetBSD. > One of the complaints of hear from newcomers to the ddb code is that > the format is old-fashioned (it still had pre-ANSI headers not long ago) > and unmaintained. It is fairly well maintained (not churned to unimprove its portability). Why would newcomers want too look at it? >>> Modified: head/sys/ddb/db_break.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/ddb/db_break.c=09Mon May 18 22:14:06 2015=09(r283087) >>> +++ head/sys/ddb/db_break.c=09Mon May 18 22:27:46 2015=09(r283088) >>> @@ -155,12 +155,12 @@ db_find_breakpoint_here(db_addr_t addr) >>> =09return db_find_breakpoint(db_map_addr(addr), addr); >>> } >>> >>> -static boolean_t=09db_breakpoints_inserted =3D TRUE; >>> +static boolean_t=09db_breakpoints_inserted =3D true; >> >> This code hasn't been churned to use the boolean type. It still uses >> boolean_t, which is plain int. TRUE and FALSE go with this type. true >> and false go with the boolean type. This probably makes no difference, >> because TRUE happens to be implemented with the same value as true and >> there are lots of implicit versions between the types. > > Yes, I noticed the return types are still ints. It doesn=E2=80=99t look d= ifficult > to convert it to use a real boolean type. In any case, I would prefer to= go > forward (using bool) instead of reverting this change. That wuld be sideways. I forgot to mention (again) in my previous reply that boolean_t is a mistak= e by me. KNF code doesn't even use the ! operator, but uses explicit comparison with 0. The boolean_t type and TRUE and FALSE are from Mach. They were used mainly in ddb and vm, and are still almost never used in kern. I used to like typedefs and a typedef for boolean types, and didn't know KNF very well, so in 1995 I moved the declaration of boolean_t from Mach vm code to sys/types.h to try to popularize it. This was a mistake. Fortunately, it is still rarely used in core kernel code. The boolean type is also almost never used for syscalls. In POSIX.1-2001, is inherited from C99, but is never used for any other POSIX API. Using it for syscalls would mainly cause portability problems. >> The boolean type is almost useless since C's type system is too weak to >> distinguish between plain int used as a boolean and pure boolean. If >> it were stronger, then it would complain about all the implicit conversi= ons >> between int and boolean, and the boolean type would be harder to use for >> other reasons. > > And I would like that to happen, but it would probably break a lot of leg= acy code. > I thought boolean_t was a transition type. It is the Mach spelling of a type suitable for holding boolean values. The= re aren't many possible spellings, but even the limited spellings cause namesp= ace problems. C99 uses the spelling _Bool for the basic type to keep away from the application namespace. Applications only get the spellings bool, true and false if they include . These spellings are very likely to conflict with application spellings for a nonstandard implementations of th= e boolean type. The kernel is not careful about this :-(. Someone added the pollution bool, true and false to sys/types.h. Otherwise, your change wouldn't have compiled. The pollution for boolean_t is not as bad. boolean_t is in the POSIX namespace for sys/types.h, and TRUE and FALSE are only defined in sys/param.h. It is interesting that true and false are macros of type int suitable for use in cpp expressions, with values precisely 0 and 1. They are just like TRUE and FALSE, except they are specified in a standard while TRUE and FALSE are not even documented in a man page AFAIK (in section 9 man pages, some functions are documented as returning TRUE or FALSE, but what these are is not documented). This makes the boolean type system even weaker than I thought, and your change not even a type error -- since true and false don't have type bool, the compiler cannot do any extra type checking for them. Bruce From owner-svn-src-head@FreeBSD.ORG Tue May 19 05:06:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6535E05 for ; Tue, 19 May 2015 05:06:19 +0000 (UTC) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DD19198C for ; Tue, 19 May 2015 05:06:19 +0000 (UTC) Received: by wgbgq6 with SMTP id gq6so3829008wgb.3 for ; Mon, 18 May 2015 22:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=28g87T80/+z/BfUe6eEpOoXqm5Ms/NkoshrkCWKSnvY=; b=hUv4TZtrBSd6P4rX2OLbawhBn/IK2dPj92F3iSH3jrF58w9dYRk2XysdxueNg1XgI1 W4sDsu6b1z+GqmymQaEp7/ajhaokHccym+QUZjS3Qxu9rcy37i2EridmIvA+qfeQnCNP ME/xb5DBv8JclgQMGnlO0+Z33hAYzIeQcJFpk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=28g87T80/+z/BfUe6eEpOoXqm5Ms/NkoshrkCWKSnvY=; b=kGOKslaNXr7lN5BLhwjZJXZdMo4ksZDkxP4zRjMyDKtCdYsV95sO/qg6Ywry3NVFWQ 8pzYHVb5zBAH8G2nqhOqc7ys7Zw96L8I3/gNEq1ZVWJRLqVQh+a9rw4ZO3yNmMEHcX+v cBqwcY6zC5x6OxGyf8wTIQrXlEAaiWdtgnzf0gXlREHWrzVOXVioONPNUrwdytqmuIfU Y5EXGzqWG4MeGOm8kebCrbzX2X+sDa2AAkRFcaUOyCjTUUbnMcUvwzn5CzLy8ayIlAF7 SK8WxHpLoGlJLD66YZf1A/81YITyV4Rze60KwsF0RHFpOZOxGpgt9ridWES47nZjASeP wQXg== X-Gm-Message-State: ALoCoQk03QoQgiJqx0X2idlS6f8zL8t6IewWV1Z5Yj8VYjFg8jnlc01Hn8vPFxG4d8uUdLZC13rq X-Received: by 10.194.200.228 with SMTP id jv4mr49493490wjc.157.1432011977645; Mon, 18 May 2015 22:06:17 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.20.75 with HTTP; Mon, 18 May 2015 22:05:46 -0700 (PDT) In-Reply-To: References: <201505151825.t4FIPnxJ099637@svn.freebsd.org> <059F2C65-F92D-445C-B603-0FAE0CAF976D@gmail.com> <1431877581.91685.49.camel@freebsd.org> <7F73A915E7DF0EE8DC6149EC@atuin.in.mat.cc> <1431957864.91685.57.camel@freebsd.org> <64FE26BD563665E5F1B3D0C8@ogg.in.absolight.net> From: Eitan Adler Date: Mon, 18 May 2015 22:05:46 -0700 X-Google-Sender-Auth: l4nJSOGPfox2GbugWzXIGhZaZCI Message-ID: Subject: Re: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/arm To: Mathieu Arnold Cc: Ed Maste , Ian Lepore , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Garrett Cooper Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 05:06:20 -0000 On 18 May 2015 at 08:41, Mathieu Arnold wrote: > +--On 18 mai 2015 10:52:29 -0400 Ed Maste wrote: > | On 18 May 2015 at 10:11, Mathieu Arnold wrote: > |> > |> Mmmm, if this can be done only for base, and not for ports, sure, but > |> ports need to be able to add patches with CRLF endings, because upstream > |> software comes in all flavors, including CRLF files we need to be able > |> to patch. > | > | Sure it could, we could configure it however we want. > | > | Note that we'll likely need to support CRLF in base anyway - one > | obvious example is test cases for CRLF handling in various tools. I'd > | imagine we could add an SVN keyword like fbsd:crlf=yes, along the > | lines of fbsd:nokeywords=yes. > | > | Do you know how common CRLF or partial CRLF files are in the ports > | tree? If it's only a handful that scheme could work there too. > > $ ag -l '\r' /usr/ports/|wc -l > 95 > > there's a bit more than a handful, but it could work, yes. If you want to > have a look at a typical one, /usr/ports/shells/ibsh/files/patch-Makefile > :-) > > But I think Eitan was talking about Phabricator, in this case, it'd need to > work there too. The rule can be limited to the non-contrib portions of the source repository. If svn blocks the commit, and that's enough, that's okay, but if it will help to have phabricator report these as well, I could set that up. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Tue May 19 05:31:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38337625; Tue, 19 May 2015 05:31:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25BC11CAB; Tue, 19 May 2015 05:31:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4J5VxUq003527; Tue, 19 May 2015 05:31:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J5VwfW003517; Tue, 19 May 2015 05:31:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505190531.t4J5VwfW003517@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 19 May 2015 05:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283095 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 05:31:59 -0000 Author: adrian Date: Tue May 19 05:31:58 2015 New Revision: 283095 URL: https://svnweb.freebsd.org/changeset/base/283095 Log: Add initial support for the QCA955x PCIe host controller. The QCA955x looks a lot like the AR724x PCIe controller, except it supports two root complexes. Unfortunately I only have one, so although this code has started down the path of supporting more than one, it's definitely not yet ready. Tested: * AP135 board (QCA9558 SoC), with the 11ac NIC swapped for an AR9380 PCIe NIC. Notes: * Yes, this driver isn't very pretty. I decided to commit what I have versus holding onto something that isn't yet finished. It is enough to bring up the above NIC and interrupt routing works, so it's a good start. * However, yes, the DDR flush routine hooks need to be fixed up. I don't think I'm firing the right one at the moment. Added: head/sys/mips/atheros/qca955x_pci.c (contents, props changed) Modified: head/sys/mips/atheros/files.ar71xx Modified: head/sys/mips/atheros/files.ar71xx ============================================================================== --- head/sys/mips/atheros/files.ar71xx Tue May 19 03:02:52 2015 (r283094) +++ head/sys/mips/atheros/files.ar71xx Tue May 19 05:31:58 2015 (r283095) @@ -30,5 +30,6 @@ mips/atheros/ar934x_chip.c standard mips/atheros/qca955x_chip.c standard mips/atheros/ar71xx_fixup.c optional ar71xx_ath_eeprom mips/atheros/qca955x_apb.c optional qca955x_apb +mips/atheros/qca955x_pci.c optional qca955x_pci pci dev/hwpmc/hwpmc_mips24k.c optional hwpmc_mips24k Added: head/sys/mips/atheros/qca955x_pci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/qca955x_pci.c Tue May 19 05:31:58 2015 (r283095) @@ -0,0 +1,606 @@ +/*- + * Copyright (c) 2009, Oleksandr Tymoshenko + * Copyright (c) 2011, Luiz Otavio O Souza. + * Copyright (c) 2015, Adrian Chadd + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_ar71xx.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include "pcib_if.h" + +#include /* XXX aim to eliminate this! */ +#include +#include +#include + +#include + +#undef AR724X_PCI_DEBUG +//#define AR724X_PCI_DEBUG +#ifdef AR724X_PCI_DEBUG +#define dprintf printf +#else +#define dprintf(x, arg...) +#endif + +/* + * This is a PCI controller for the QCA955x and later SoCs. + * It needs to be aware of >1 PCIe host endpoints. + * + * XXX TODO; it may be nice to merge this with ar724x_pci.c; + * they're very similar. + */ +struct ar71xx_pci_irq { + struct ar71xx_pci_softc *sc; + int irq; +}; + +struct ar71xx_pci_softc { + device_t sc_dev; + + int sc_busno; + struct rman sc_mem_rman; + struct rman sc_irq_rman; + + uint32_t sc_pci_reg_base; /* XXX until bus stuff is done */ + uint32_t sc_pci_crp_base; /* XXX until bus stuff is done */ + uint32_t sc_pci_ctrl_base; /* XXX until bus stuff is done */ + uint32_t sc_pci_mem_base; /* XXX until bus stuff is done */ + uint32_t sc_pci_membase_limit; + + struct intr_event *sc_eventstab[AR71XX_PCI_NIRQS]; + mips_intrcnt_t sc_intr_counter[AR71XX_PCI_NIRQS]; + struct ar71xx_pci_irq sc_pci_irq[AR71XX_PCI_NIRQS]; + struct resource *sc_irq; + void *sc_ih; +}; + +static int qca955x_pci_setup_intr(device_t, device_t, struct resource *, int, + driver_filter_t *, driver_intr_t *, void *, void **); +static int qca955x_pci_teardown_intr(device_t, device_t, struct resource *, + void *); +static int qca955x_pci_intr(void *); + +static void +qca955x_pci_write(uint32_t reg, uint32_t offset, uint32_t data, int bytes) +{ + uint32_t val, mask, shift; + + /* Register access is 32-bit aligned */ + shift = (offset & 3) * 8; + if (bytes % 4) + mask = (1 << (bytes * 8)) - 1; + else + mask = 0xffffffff; + + val = ATH_READ_REG(reg + (offset & ~3)); + val &= ~(mask << shift); + val |= ((data & mask) << shift); + ATH_WRITE_REG(reg + (offset & ~3), val); + + dprintf("%s: %#x/%#x addr=%#x, data=%#x(%#x), bytes=%d\n", __func__, + reg, reg + (offset & ~3), offset, data, val, bytes); +} + +static uint32_t +qca955x_pci_read_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, int bytes) +{ + struct ar71xx_pci_softc *sc = device_get_softc(dev); + uint32_t data, shift, mask; + + /* Register access is 32-bit aligned */ + shift = (reg & 3) * 8; + + /* Create a mask based on the width, post-shift */ + if (bytes == 2) + mask = 0xffff; + else if (bytes == 1) + mask = 0xff; + else + mask = 0xffffffff; + + dprintf("%s: tag (%x, %x, %x) reg %d(%d)\n", __func__, bus, slot, + func, reg, bytes); + + if ((bus == 0) && (slot == 0) && (func == 0)) + data = ATH_READ_REG(sc->sc_pci_reg_base + (reg & ~3)); + else + data = -1; + + /* Get request bytes from 32-bit word */ + data = (data >> shift) & mask; + + dprintf("%s: read 0x%x\n", __func__, data); + + return (data); +} + +static void +qca955x_pci_write_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, uint32_t data, int bytes) +{ + struct ar71xx_pci_softc *sc = device_get_softc(dev); + + dprintf("%s: tag (%x, %x, %x) reg %d(%d): %x\n", __func__, bus, slot, + func, reg, bytes, data); + + if ((bus != 0) || (slot != 0) || (func != 0)) + return; + + qca955x_pci_write(sc->sc_pci_reg_base, reg, data, bytes); +} + +static void +qca955x_pci_mask_irq(void *source) +{ + uint32_t reg; + struct ar71xx_pci_irq *pirq = source; + struct ar71xx_pci_softc *sc = pirq->sc; + + /* XXX - Only one interrupt ? Only one device ? */ + if (pirq->irq != AR71XX_PCI_IRQ_START) + return; + + /* Update the interrupt mask reg */ + reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK); + ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK, + reg & ~QCA955X_PCI_INTR_DEV0); + + /* Clear any pending interrupt */ + reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_STATUS); + ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_STATUS, + reg | QCA955X_PCI_INTR_DEV0); +} + +static void +qca955x_pci_unmask_irq(void *source) +{ + uint32_t reg; + struct ar71xx_pci_irq *pirq = source; + struct ar71xx_pci_softc *sc = pirq->sc; + + if (pirq->irq != AR71XX_PCI_IRQ_START) + return; + + /* Update the interrupt mask reg */ + reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK); + ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK, + reg | QCA955X_PCI_INTR_DEV0); +} + +static int +qca955x_pci_setup(device_t dev) +{ + struct ar71xx_pci_softc *sc = device_get_softc(dev); + uint32_t reg; + + /* setup COMMAND register */ + reg = PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN | PCIM_CMD_SERRESPEN | + PCIM_CMD_BACKTOBACK | PCIM_CMD_PERRESPEN | PCIM_CMD_MWRICEN; + + qca955x_pci_write(sc->sc_pci_crp_base, PCIR_COMMAND, reg, 2); + + /* These are the memory/prefetch base/limit parameters */ + qca955x_pci_write(sc->sc_pci_crp_base, 0x20, sc->sc_pci_membase_limit, 4); + qca955x_pci_write(sc->sc_pci_crp_base, 0x24, sc->sc_pci_membase_limit, 4); + + reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET); + if (reg != 0x7) { + DELAY(100000); + ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET, 0); + ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET); + DELAY(100); + ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET, 4); + ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET); + DELAY(100000); + } + + ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_APP, 0x1ffc1); + /* Flush write */ + (void) ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_APP); + + DELAY(1000); + + reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET); + if ((reg & QCA955X_PCI_RESET_LINK_UP) == 0) { + device_printf(dev, "no PCIe controller found\n"); + return (ENXIO); + } + + return (0); +} + +static int +qca955x_pci_probe(device_t dev) +{ + + return (BUS_PROBE_NOWILDCARD); +} + +static int +qca955x_pci_attach(device_t dev) +{ + struct ar71xx_pci_softc *sc = device_get_softc(dev); + int unit = device_get_unit(dev); + int busno = 0; + int rid = 0; + + /* Dirty; maybe these could all just be hints */ + if (unit == 0) { + sc->sc_pci_reg_base = QCA955X_PCI_CFG_BASE0; + sc->sc_pci_crp_base = QCA955X_PCI_CRP_BASE0; + sc->sc_pci_ctrl_base = QCA955X_PCI_CTRL_BASE0; + sc->sc_pci_mem_base = QCA955X_PCI_MEM_BASE0; + /* XXX verify */ + sc->sc_pci_membase_limit = 0x11f01000; + } else if (unit == 1) { + sc->sc_pci_reg_base = QCA955X_PCI_CFG_BASE1; + sc->sc_pci_crp_base = QCA955X_PCI_CRP_BASE1; + sc->sc_pci_ctrl_base = QCA955X_PCI_CTRL_BASE1; + sc->sc_pci_mem_base = QCA955X_PCI_MEM_BASE1; + /* XXX verify */ + sc->sc_pci_membase_limit = 0x12f01200; + } else { + device_printf(dev, "%s: invalid unit (%d)\n", __func__, unit); + return (ENXIO); + } + + sc->sc_mem_rman.rm_type = RMAN_ARRAY; + sc->sc_mem_rman.rm_descr = "qca955x PCI memory window"; + if (rman_init(&sc->sc_mem_rman) != 0 || + rman_manage_region(&sc->sc_mem_rman, + sc->sc_pci_mem_base, + sc->sc_pci_mem_base + QCA955X_PCI_MEM_SIZE - 1) != 0) { + panic("qca955x_pci_attach: failed to set up I/O rman"); + } + + sc->sc_irq_rman.rm_type = RMAN_ARRAY; + sc->sc_irq_rman.rm_descr = "qca955x PCI IRQs"; + if (rman_init(&sc->sc_irq_rman) != 0 || + rman_manage_region(&sc->sc_irq_rman, AR71XX_PCI_IRQ_START, + AR71XX_PCI_IRQ_END) != 0) + panic("qca955x_pci_attach: failed to set up IRQ rman"); + + /* Disable interrupts */ + ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_STATUS, 0); + ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK, 0); + + /* Hook up our interrupt handler. */ + if ((sc->sc_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE)) == NULL) { + device_printf(dev, "unable to allocate IRQ resource\n"); + return (ENXIO); + } + + if ((bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC, + qca955x_pci_intr, NULL, sc, &sc->sc_ih))) { + device_printf(dev, + "WARNING: unable to register interrupt handler\n"); + return (ENXIO); + } + + /* Reset PCIe core and PCIe PHY */ + ar71xx_device_stop(QCA955X_RESET_PCIE); + ar71xx_device_stop(QCA955X_RESET_PCIE_PHY); + DELAY(100); + ar71xx_device_start(QCA955X_RESET_PCIE_PHY); + ar71xx_device_start(QCA955X_RESET_PCIE); + + if (qca955x_pci_setup(dev)) + return (ENXIO); + + /* + * Write initial base address. + * + * I'm not yet sure why this is required and/or why it isn't + * initialised like this. The AR71xx PCI code initialises + * the PCI windows for each device, but neither it or the + * 724x PCI bridge modules explicitly initialise the BAR. + * + * So before this gets committed, have a chat with jhb@ or + * someone else who knows PCI well and figure out whether + * the initial BAR is supposed to be determined by /other/ + * means. + */ + qca955x_pci_write_config(dev, 0, 0, 0, PCIR_BAR(0), + sc->sc_pci_mem_base, + 4); + + /* Fixup internal PCI bridge */ + qca955x_pci_write_config(dev, 0, 0, 0, PCIR_COMMAND, + PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN + | PCIM_CMD_SERRESPEN | PCIM_CMD_BACKTOBACK + | PCIM_CMD_PERRESPEN | PCIM_CMD_MWRICEN, 2); + + device_add_child(dev, "pci", busno); + return (bus_generic_attach(dev)); +} + +static int +qca955x_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) +{ + struct ar71xx_pci_softc *sc = device_get_softc(dev); + + switch (which) { + case PCIB_IVAR_DOMAIN: + *result = 0; + return (0); + case PCIB_IVAR_BUS: + *result = sc->sc_busno; + return (0); + } + + return (ENOENT); +} + +static int +qca955x_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t result) +{ + struct ar71xx_pci_softc * sc = device_get_softc(dev); + + switch (which) { + case PCIB_IVAR_BUS: + sc->sc_busno = result; + return (0); + } + + return (ENOENT); +} + +static struct resource * +qca955x_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct ar71xx_pci_softc *sc = device_get_softc(bus); + struct resource *rv; + struct rman *rm; + + switch (type) { + case SYS_RES_IRQ: + rm = &sc->sc_irq_rman; + break; + case SYS_RES_MEMORY: + rm = &sc->sc_mem_rman; + break; + default: + return (NULL); + } + + rv = rman_reserve_resource(rm, start, end, count, flags, child); + + if (rv == NULL) + return (NULL); + + rman_set_rid(rv, *rid); + + if (flags & RF_ACTIVE) { + if (bus_activate_resource(child, type, *rid, rv)) { + rman_release_resource(rv); + return (NULL); + } + } + + return (rv); +} + +static int +qca955x_pci_activate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + int res = (BUS_ACTIVATE_RESOURCE(device_get_parent(bus), + child, type, rid, r)); + + if (!res) { + switch(type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + + rman_set_bustag(r, ar71xx_bus_space_pcimem); + break; + } + } + + return (res); +} + +static int +qca955x_pci_setup_intr(device_t bus, device_t child, struct resource *ires, + int flags, driver_filter_t *filt, driver_intr_t *handler, + void *arg, void **cookiep) +{ + struct ar71xx_pci_softc *sc = device_get_softc(bus); + struct intr_event *event; + int irq, error; + + irq = rman_get_start(ires); + if (irq > AR71XX_PCI_IRQ_END) + panic("%s: bad irq %d", __func__, irq); + + event = sc->sc_eventstab[irq]; + if (event == NULL) { + sc->sc_pci_irq[irq].sc = sc; + sc->sc_pci_irq[irq].irq = irq; + error = intr_event_create(&event, (void *)&sc->sc_pci_irq[irq], + 0, irq, + qca955x_pci_mask_irq, + qca955x_pci_unmask_irq, + NULL, NULL, + "pci intr%d:", irq); + + if (error == 0) { + sc->sc_eventstab[irq] = event; + sc->sc_intr_counter[irq] = + mips_intrcnt_create(event->ie_name); + } + else + return error; + } + + intr_event_add_handler(event, device_get_nameunit(child), filt, + handler, arg, intr_priority(flags), flags, cookiep); + mips_intrcnt_setname(sc->sc_intr_counter[irq], event->ie_fullname); + + qca955x_pci_unmask_irq(&sc->sc_pci_irq[irq]); + + return (0); +} + +static int +qca955x_pci_teardown_intr(device_t dev, device_t child, struct resource *ires, + void *cookie) +{ + struct ar71xx_pci_softc *sc = device_get_softc(dev); + int irq, result; + + irq = rman_get_start(ires); + if (irq > AR71XX_PCI_IRQ_END) + panic("%s: bad irq %d", __func__, irq); + + if (sc->sc_eventstab[irq] == NULL) + panic("Trying to teardown unoccupied IRQ"); + + qca955x_pci_mask_irq(&sc->sc_pci_irq[irq]); + + result = intr_event_remove_handler(cookie); + if (!result) + sc->sc_eventstab[irq] = NULL; + + return (result); +} + +static int +qca955x_pci_intr(void *arg) +{ + struct ar71xx_pci_softc *sc = arg; + struct intr_event *event; + uint32_t reg, irq, mask; + + /* XXX TODO - may need to flush a different handler? */ + ar71xx_device_ddr_flush_ip2(); + + reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_STATUS); + mask = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK); + /* + * Handle only unmasked interrupts + */ + reg &= mask; + /* + * XXX TODO: handle >1 PCIe end point! + */ + if (reg & QCA955X_PCI_INTR_DEV0) { + irq = AR71XX_PCI_IRQ_START; + event = sc->sc_eventstab[irq]; + if (!event || TAILQ_EMPTY(&event->ie_handlers)) { + printf("Stray IRQ %d\n", irq); + return (FILTER_STRAY); + } + + /* TODO: frame instead of NULL? */ + intr_event_handle(event, NULL); + mips_intrcnt_inc(sc->sc_intr_counter[irq]); + } + + return (FILTER_HANDLED); +} + +static int +qca955x_pci_maxslots(device_t dev) +{ + + return (PCI_SLOTMAX); +} + +static int +qca955x_pci_route_interrupt(device_t pcib, device_t device, int pin) +{ + + return (pci_get_slot(device)); +} + +static device_method_t qca955x_pci_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, qca955x_pci_probe), + DEVMETHOD(device_attach, qca955x_pci_attach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* Bus interface */ + DEVMETHOD(bus_read_ivar, qca955x_pci_read_ivar), + DEVMETHOD(bus_write_ivar, qca955x_pci_write_ivar), + DEVMETHOD(bus_alloc_resource, qca955x_pci_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, qca955x_pci_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_setup_intr, qca955x_pci_setup_intr), + DEVMETHOD(bus_teardown_intr, qca955x_pci_teardown_intr), + + /* pcib interface */ + DEVMETHOD(pcib_maxslots, qca955x_pci_maxslots), + DEVMETHOD(pcib_read_config, qca955x_pci_read_config), + DEVMETHOD(pcib_write_config, qca955x_pci_write_config), + DEVMETHOD(pcib_route_interrupt, qca955x_pci_route_interrupt), + + DEVMETHOD_END +}; + +static driver_t qca955x_pci_driver = { + "pcib", + qca955x_pci_methods, + sizeof(struct ar71xx_pci_softc), +}; + +static devclass_t qca955x_pci_devclass; + +DRIVER_MODULE(qca955x_pci, nexus, qca955x_pci_driver, qca955x_pci_devclass, 0, 0); +DRIVER_MODULE(qca955x_pci, apb, qca955x_pci_driver, qca955x_pci_devclass, 0, 0); From owner-svn-src-head@FreeBSD.ORG Tue May 19 05:33:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BA6777B; Tue, 19 May 2015 05:33:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A41F1CB5; Tue, 19 May 2015 05:33:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4J5X8lP004334; Tue, 19 May 2015 05:33:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J5X8Jn004333; Tue, 19 May 2015 05:33:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505190533.t4J5X8Jn004333@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 19 May 2015 05:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283096 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 05:33:08 -0000 Author: adrian Date: Tue May 19 05:33:07 2015 New Revision: 283096 URL: https://svnweb.freebsd.org/changeset/base/283096 Log: The AP135 PCIe NIC isn't an ath device, it's an 11ac part (linux ath10k.) So, don't try to attach hints to it here. Modified: head/sys/mips/conf/AP135.hints Modified: head/sys/mips/conf/AP135.hints ============================================================================== --- head/sys/mips/conf/AP135.hints Tue May 19 05:31:58 2015 (r283095) +++ head/sys/mips/conf/AP135.hints Tue May 19 05:33:07 2015 (r283096) @@ -117,11 +117,11 @@ hint.ath.0.eepromsize=16384 # to find it. # ath1 hint - pcie slot 0 -hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1fff4000 -hint.pcib.0.bus.0.0.0.ath_fixup_size=16384 +# hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1fff4000 +# hint.pcib.0.bus.0.0.0.ath_fixup_size=16384 # ath0 - eeprom comes from here -hint.ath.1.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware" +# hint.ath.1.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware" # flash layout: # From owner-svn-src-head@FreeBSD.ORG Tue May 19 05:34:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D230F8D3 for ; Tue, 19 May 2015 05:34:47 +0000 (UTC) Received: from nm44-vm6.bullet.mail.bf1.yahoo.com (nm44-vm6.bullet.mail.bf1.yahoo.com [216.109.115.30]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B6DF1CC4 for ; Tue, 19 May 2015 05:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1432013301; bh=FeI+y70F6auNdfwqYylNFkcTO0Z57NyXDcac9gwLltY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=UzcVvPbvLoJB4LvBj7tu1W+/ouk5NqLGlbB0OTdK7nQ4nNhJYAIPIXMpc7tyFrTV4yPRMhlq7LSfLujiXubUNxSZ6ejtNzawMXci73OMi4TAHBsh1/lGDQL1JXwNXQhht+rxQM1y0RCtYy33LoD3/9PpQmLjnubVmxgvc5vRKcBjUADtURlHc9tmyF9SniFM6XwOKa++Bga/GVuQeAWHp5pVp52d+zaoER/MTZFpMqQ1q7GoO6Y+KDq4BGbr/B3luJoRZsKN+WCfhzxkxsP8VvaNalwsmNRFjqAlOFCh9YmyAdXENwjb8qqCY6tgLYfmgaEbegeK/F2vO4SebVilOw== Received: from [66.196.81.173] by nm44.bullet.mail.bf1.yahoo.com with NNFMP; 19 May 2015 05:28:21 -0000 Received: from [68.142.230.69] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 19 May 2015 05:28:21 -0000 Received: from [127.0.0.1] by smtp226.mail.bf1.yahoo.com with NNFMP; 19 May 2015 05:28:21 -0000 X-Yahoo-Newman-Id: 630517.76090.bm@smtp226.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: AOFLH10VM1nXfrQ1mBTcBEvkqYbQNDb5MUABrFkRiNt.6x7 HNCWf2dZI1.6uesSmSDI.wfMZOuWApdJgXVm.m5dIXeJkB.CPKFr9o7wiZ0M VJQraI6ObTBeUuM0PGDVLHZfzBCxv_wExAAT2mt3u8MtDmeWkubcs2cSTh5j 5jv5m9JANzu.ni.ow._vs0ePf_ByofG_ATLxbXXBLPMJNLSKlkulQXnvNwwO 3h01lGG6MWzPnC5i.EH5zfgay4FvMuPCovjz_RZJNFx.uK456z2Gwm9MjgYh yg0rqhA0fiLV1TK0PfETNmCs_w1HoUNQ0KMXJgFh5P08lIyQ4XZ7ojf_A4SI eiPTG6vzvZVnEzanUxnA2JY_UXoOeRNA7_sT54pDDRCc.0_Nyq1ncmjyA9OG HCcymEU80NkZLN.3OxM7jetCnjezDyK2vD2120vRmTFDOBxT6AjMfRlIWeRx 2pY1lqsLZCi0RSHLtTFiIUbjGCP0jiBcv7fvzoZSd6THDZP1b1qnTkQKFQdK ZWTjLljt2Fl7iZRz86TiM564G1S5t0XKb X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r283088 - head/sys/ddb From: Pedro Giffuni In-Reply-To: <20150519135341.R2157@besplex.bde.org> Date: Tue, 19 May 2015 00:28:05 -0500 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201505182227.t4IMRljx078812@svn.freebsd.org> <20150519113755.U1840@besplex.bde.org> <406A7AE3-1891-4B2C-B917-14C150EBBAB5@FreeBSD.org> <20150519135341.R2157@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2098) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 05:34:47 -0000 > Il giorno 18/mag/2015, alle ore 23:34, Bruce Evans = ha scritto: >=20 > On Mon, 18 May 2015, Pedro Giffuni wrote: >=20 >>> Il giorno 18/mag/2015, alle ore 20:48, Bruce Evans = ha scritto: >>>=20 >>> On Mon, 18 May 2015, Pedro F. Giffuni wrote: >>>=20 >>>> Log: >>>> ddb: stop boolean screaming. >>>>=20 >>>> TRUE --> true >>>> FALSE--> false >>>>=20 >>>> Hinted by: NetBSD >>>=20 >>> This is not just churn to a style regression, but a type mismatch. >>=20 >> It is an attempt to reduce differences with NetBSD. >=20 > For that, apply the reverse change to NetBSD. >=20 Actually, the NetBSD code uses bool. (I hate CVS, commits are not = atomic.) >> One of the complaints of hear from newcomers to the ddb code is that >> the format is old-fashioned (it still had pre-ANSI headers not long = ago) >> and unmaintained. >=20 > It is fairly well maintained (not churned to unimprove its = portability). > Why would newcomers want too look at it? >=20 Unrelated fun: last year a student started adding support for CTF and = pretty printing of the kernel structures. I think the NetBSD guys have = been having fun with Lua. >>>> Modified: head/sys/ddb/db_break.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/ddb/db_break.c Mon May 18 22:14:06 2015 = (r283087) >>>> +++ head/sys/ddb/db_break.c Mon May 18 22:27:46 2015 = (r283088) >>>> @@ -155,12 +155,12 @@ db_find_breakpoint_here(db_addr_t addr) >>>> return db_find_breakpoint(db_map_addr(addr), addr); >>>> } >>>>=20 >>>> -static boolean_t db_breakpoints_inserted =3D TRUE; >>>> +static boolean_t db_breakpoints_inserted =3D true; >>>=20 >>> This code hasn't been churned to use the boolean type. It still = uses >>> boolean_t, which is plain int. TRUE and FALSE go with this type. = true >>> and false go with the boolean type. This probably makes no = difference, >>> because TRUE happens to be implemented with the same value as true = and >>> there are lots of implicit versions between the types. >>=20 >> Yes, I noticed the return types are still ints. It doesn=E2=80=99t = look difficult >> to convert it to use a real boolean type. In any case, I would = prefer to go >> forward (using bool) instead of reverting this change. >=20 > That wuld be sideways. >=20 > I forgot to mention (again) in my previous reply that boolean_t is a = mistake > by me. KNF code doesn't even use the ! operator, but uses explicit > comparison with 0. The boolean_t type and TRUE and FALSE are from = Mach. > They were used mainly in ddb and vm, and are still almost never used = in > kern. I used to like typedefs and a typedef for boolean types, and = didn't > know KNF very well, so in 1995 I moved the declaration of boolean_t = from > Mach vm code to sys/types.h to try to popularize it. This was a = mistake. > Fortunately, it is still rarely used in core kernel code. >=20 > The boolean type is also almost never used for syscalls. In = POSIX.1-2001, > is inherited from C99, but is never used for any other = POSIX > API. Using it for syscalls would mainly cause portability problems. >=20 OK, I do understand the kernel wants to keep the C dialect somewhat = limited, and adding stdbool.h doesn=E2=80=99t buy us any type safety here. I=E2=80=99ll revert the change (prob. tomorrow though). Pedro. From owner-svn-src-head@FreeBSD.ORG Tue May 19 05:41:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AE15B2E; Tue, 19 May 2015 05:41:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D1B41CED; Tue, 19 May 2015 05:41:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4J5f0aE008588; Tue, 19 May 2015 05:41:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J5f0xq008586; Tue, 19 May 2015 05:41:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505190541.t4J5f0xq008586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 19 May 2015 05:41:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283097 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 05:41:01 -0000 Author: adrian Date: Tue May 19 05:41:00 2015 New Revision: 283097 URL: https://svnweb.freebsd.org/changeset/base/283097 Log: QCA955x / AP135 platform tidyups. * Change mips24k -> mips74k for hwpmc, but leave it disabled for now. * don't build pci by default. * build pci and qca955x_pci for AP135, as theres a PCIe NIC. * don't build a hwpmc module, it doesn't really work out well for the mips boards at the moment. * add ipfw and DEFAULT_TO_ACCEPT. Modified: head/sys/mips/conf/AP135 head/sys/mips/conf/QCA955X_BASE Modified: head/sys/mips/conf/AP135 ============================================================================== --- head/sys/mips/conf/AP135 Tue May 19 05:33:07 2015 (r283096) +++ head/sys/mips/conf/AP135 Tue May 19 05:41:00 2015 (r283097) @@ -50,7 +50,12 @@ options GEOM_UNCOMPRESS # Used for the static uboot partition map device geom_map -# yes, this board has a PCI connected atheros device +# yes, this board has a PCIe connected atheros device +# add ath_pci so it can at least attach things when there's a +# ath(4) in there, rather than the 11ac chip we don't support. +device pci +device qca955x_pci + device ath_pci options AR71XX_ATH_EEPROM device firmware # Used by the above @@ -58,3 +63,6 @@ options ATH_EEPROM_FIRMWARE # Boot off of the rootfs, as defined in the geom_map setup. options ROOTDEVNAME=\"ufs:map/rootfs.uncompress\" + +# Default to accept +options IPFIREWALL_DEFAULT_TO_ACCEPT Modified: head/sys/mips/conf/QCA955X_BASE ============================================================================== --- head/sys/mips/conf/QCA955X_BASE Tue May 19 05:33:07 2015 (r283096) +++ head/sys/mips/conf/QCA955X_BASE Tue May 19 05:41:00 2015 (r283097) @@ -27,7 +27,7 @@ hints "QCA955X_BASE.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols # 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" -makeoptions MODULES_OVERRIDE="if_vlan ipfw if_gre if_gif if_bridge bridgestp hwpmc" +makeoptions MODULES_OVERRIDE="if_vlan ipfw if_gre if_gif if_bridge bridgestp" options DDB options KDB @@ -53,10 +53,10 @@ options NBUF=128 # Limit UMTX hash size # options UMTX_NUM_CHAINS=64 -# PMC +# PMC - fow now there's no hwpmc module for mips74k #options HWPMC_HOOKS #device hwpmc -#device hwpmc_mips24k +#device hwpmc_mips74k # options NFS_LEGACYRPC # Debugging for use in -current @@ -109,12 +109,6 @@ options USB_DEBUG options USB_HOST_ALIGN=32 # AR71XX (MIPS in general?) requires this device ehci -device pci -# XXX TODO: need to write a qca955x_pci bridge -# .. since it now handles >1 PCIe bus and the reset -# registers may have changed a bit. -# device ar724x_pci - device scbus device umass device da From owner-svn-src-head@FreeBSD.ORG Tue May 19 05:57:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26D91E1C; Tue, 19 May 2015 05:57:03 +0000 (UTC) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E67C31EC4; Tue, 19 May 2015 05:57:02 +0000 (UTC) Received: by padbw4 with SMTP id bw4so9021989pad.0; Mon, 18 May 2015 22:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=dvx9mVNOMyM06e2VjTyMpZ8YZY507RjyttNsLTTO6/s=; b=FwD5wlwIoHZafhHcGaYMO7PyyarmZvfb3jENgJt+Pp6C46bQ978kVF22QCtbdp0wGf ihRhLWBa8zMpn7Pqz7EHbZ/mWtBUNswloIWOjA1rNoelcS4kLoBQGEU7KMVy6sR1jPa7 XBFaGl42fSHR36BE9zHjJY2Rxym5je9vpxiF/WlF4oW5kAA2vssi2FkHKJHZ+KJcSQc6 U7mOZYEvVeDenRpjKhkXGnBW0SvYAAHZWPVPr+/FQbfY3Ov2gVBfcCpQ3CcI6EWuR4gR PIYhMgSrKoOIb5HVCzXTbNCBNQ/azE/7abRswC4daRFhuDpKrn3i4m766lyglSGThA8y 6Irg== X-Received: by 10.68.219.1 with SMTP id pk1mr50386081pbc.18.1432015022571; Mon, 18 May 2015 22:57:02 -0700 (PDT) Received: from [192.168.169.90] (c-67-170-85-91.hsd1.wa.comcast.net. [67.170.85.91]) by mx.google.com with ESMTPSA id rx6sm10032079pbc.54.2015.05.18.22.57.01 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 May 2015 22:57:01 -0700 (PDT) References: <201505182227.t4IMRljx078812@svn.freebsd.org> <20150519113755.U1840@besplex.bde.org> <406A7AE3-1891-4B2C-B917-14C150EBBAB5@FreeBSD.org> <20150519135341.R2157@besplex.bde.org> Mime-Version: 1.0 (1.0) In-Reply-To: Message-Id: <161C0DB1-E570-4A92-A98B-4098C510E96B@gmail.com> Cc: Bruce Evans , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Mailer: iPhone Mail (12F70) From: Garrett Cooper Subject: Re: svn commit: r283088 - head/sys/ddb Date: Mon, 18 May 2015 22:56:31 -0700 To: Pedro Giffuni Content-Type: text/plain; charset=cp932 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 05:57:03 -0000 > On May 18, 2015, at 22:28, Pedro Giffuni wrote: >=20 >=20 >> Il giorno 18/mag/2015, alle ore 23:34, Bruce Evans = ha scritto: >>=20 >> On Mon, 18 May 2015, Pedro Giffuni wrote: >>=20 >>>> Il giorno 18/mag/2015, alle ore 20:48, Bruce Evans ha scritto: >>>>=20 >>>>> On Mon, 18 May 2015, Pedro F. Giffuni wrote: >>>>>=20 >>>>> Log: >>>>> ddb: stop boolean screaming. >>>>>=20 >>>>> TRUE --> true >>>>> FALSE--> false >>>>>=20 >>>>> Hinted by: NetBSD >>>>=20 >>>> This is not just churn to a style regression, but a type mismatch. >>>=20 >>> It is an attempt to reduce differences with NetBSD. >>=20 >> For that, apply the reverse change to NetBSD. >=20 > Actually, the NetBSD code uses bool. (I hate CVS, commits are not atomic.)= >=20 >>> One of the complaints of hear from newcomers to the ddb code is that >>> the format is old-fashioned (it still had pre-ANSI headers not long ago)= >>> and unmaintained. >>=20 >> It is fairly well maintained (not churned to unimprove its portability). >> Why would newcomers want too look at it? >=20 > Unrelated fun: last year a student started adding support for CTF and pret= ty printing of the kernel structures. I think the NetBSD guys have been havi= ng fun with Lua. >=20 >=20 >>>>> Modified: head/sys/ddb/db_break.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/ddb/db_break.c Mon May 18 22:14:06 2015 (r2= 83087) >>>>> +++ head/sys/ddb/db_break.c Mon May 18 22:27:46 2015 (r2= 83088) >>>>> @@ -155,12 +155,12 @@ db_find_breakpoint_here(db_addr_t addr) >>>>> return db_find_breakpoint(db_map_addr(addr), addr); >>>>> } >>>>>=20 >>>>> -static boolean_t db_breakpoints_inserted =3D TRUE; >>>>> +static boolean_t db_breakpoints_inserted =3D true; >>>>=20 >>>> This code hasn't been churned to use the boolean type. It still uses >>>> boolean_t, which is plain int. TRUE and FALSE go with this type. true= >>>> and false go with the boolean type. This probably makes no difference,= >>>> because TRUE happens to be implemented with the same value as true and >>>> there are lots of implicit versions between the types. >>>=20 >>> Yes, I noticed the return types are still ints. It doesn=81ft look diffi= cult >>> to convert it to use a real boolean type. In any case, I would prefer t= o go >>> forward (using bool) instead of reverting this change. >>=20 >> That wuld be sideways. >>=20 >> I forgot to mention (again) in my previous reply that boolean_t is a mist= ake >> by me. KNF code doesn't even use the ! operator, but uses explicit >> comparison with 0. The boolean_t type and TRUE and FALSE are from Mach. >> They were used mainly in ddb and vm, and are still almost never used in >> kern. I used to like typedefs and a typedef for boolean types, and didn'= t >> know KNF very well, so in 1995 I moved the declaration of boolean_t from >> Mach vm code to sys/types.h to try to popularize it. This was a mistake.= >> Fortunately, it is still rarely used in core kernel code. >>=20 >> The boolean type is also almost never used for syscalls. In POSIX.1-2001= , >> is inherited from C99, but is never used for any other POSIX >> API. Using it for syscalls would mainly cause portability problems. >=20 > OK, I do understand the kernel wants to keep the C dialect somewhat limite= d, > and adding stdbool.h doesn=81ft buy us any type safety here. >=20 > I=81fll revert the change (prob. tomorrow though). Too bad. You could just convert bool to an enum, add a compile-time assert, a= nd chase down all of the -Werrors with clang... ... Nevermind. Not fun :(..= From owner-svn-src-head@FreeBSD.ORG Tue May 19 06:45:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83CA8850; Tue, 19 May 2015 06:45:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72D1814B9; Tue, 19 May 2015 06:45:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4J6j73E043719; Tue, 19 May 2015 06:45:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J6j78f043718; Tue, 19 May 2015 06:45:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505190645.t4J6j78f043718@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 19 May 2015 06:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283098 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 06:45:07 -0000 Author: adrian Date: Tue May 19 06:45:06 2015 New Revision: 283098 URL: https://svnweb.freebsd.org/changeset/base/283098 Log: Migrate RSPRO to use the uncompress module, not uzip. (This is hand-in-hand with what I'm about to do with freebsd-wifi-build.) Modified: head/sys/mips/conf/RSPRO Modified: head/sys/mips/conf/RSPRO ============================================================================== --- head/sys/mips/conf/RSPRO Tue May 19 05:41:00 2015 (r283097) +++ head/sys/mips/conf/RSPRO Tue May 19 06:45:06 2015 (r283098) @@ -13,8 +13,8 @@ device pcf2123_rtc # GEOM modules device geom_redboot # to get access to the SPI flash partitions -device geom_uzip # compressed in-memory filesystem support -options GEOM_UZIP +device geom_uncompress # compressed in-memory filesystem support +options GEOM_UNCOMPRESS # For DOS options MSDOSFS @@ -26,5 +26,5 @@ device etherswitch device arswitch # Boot off of flash -options ROOTDEVNAME=\"ufs:redboot/rootfs.uzip\" +options ROOTDEVNAME=\"ufs:redboot/rootfs.uncompress\" From owner-svn-src-head@FreeBSD.ORG Tue May 19 06:45:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 819FB99D; Tue, 19 May 2015 06:45:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 709D414C3; Tue, 19 May 2015 06:45:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4J6jvFK043913; Tue, 19 May 2015 06:45:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J6jvWD043912; Tue, 19 May 2015 06:45:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505190645.t4J6jvWD043912@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 19 May 2015 06:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283099 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 06:45:57 -0000 Author: adrian Date: Tue May 19 06:45:56 2015 New Revision: 283099 URL: https://svnweb.freebsd.org/changeset/base/283099 Log: Convert routerstation to use geom_uncompress. Modified: head/sys/mips/conf/ROUTERSTATION Modified: head/sys/mips/conf/ROUTERSTATION ============================================================================== --- head/sys/mips/conf/ROUTERSTATION Tue May 19 06:45:06 2015 (r283098) +++ head/sys/mips/conf/ROUTERSTATION Tue May 19 06:45:56 2015 (r283099) @@ -12,8 +12,8 @@ hints "ROUTERSTATION.hints" # GEOM modules device geom_redboot # to get access to the SPI flash partitions -device geom_uzip # compressed in-memory filesystem support -options GEOM_UZIP +device geom_uncompress # compressed in-memory filesystem support +options GEOM_UNCOMPRESS # For DOS options MSDOSFS @@ -25,4 +25,4 @@ device etherswitch device ukswitch # Boot path - redboot MFS -options ROOTDEVNAME=\"ufs:redboot/rootfs.uzip\" +options ROOTDEVNAME=\"ufs:redboot/rootfs.uncompress\" From owner-svn-src-head@FreeBSD.ORG Tue May 19 08:30:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 161C5ABE; Tue, 19 May 2015 08:30:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBA4010AF; Tue, 19 May 2015 08:30:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4J8U45j099901; Tue, 19 May 2015 08:30:04 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J8U4k8099900; Tue, 19 May 2015 08:30:04 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505190830.t4J8U4k8099900@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 19 May 2015 08:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283101 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 08:30:05 -0000 Author: ae Date: Tue May 19 08:30:04 2015 New Revision: 283101 URL: https://svnweb.freebsd.org/changeset/base/283101 Log: Teach key_expire() send SADB_EXPIRE message with the SADB_EXT_LIFETIME_HARD extension header type. The key_flush_sad() now will send SADB_EXPIRE message when HARD lifetime expires. This is required by RFC 2367 and some keying daemons rely on these messages. HARD lifetime messages have precedence over SOFT lifetime messages, so now they will be checked first. Also now SADB_EXPIRE messages will be send even the SA has not been used, because keying daemons might want to rekey such SA. PR: 200282, 200283 Submitted by: Tobias Brunner MFC after: 2 weeks Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Tue May 19 08:00:39 2015 (r283100) +++ head/sys/netipsec/key.c Tue May 19 08:30:04 2015 (r283101) @@ -537,7 +537,7 @@ static int key_acquire2(struct socket *, const struct sadb_msghdr *); static int key_register(struct socket *, struct mbuf *, const struct sadb_msghdr *); -static int key_expire(struct secasvar *); +static int key_expire(struct secasvar *, int); static int key_flush(struct socket *, struct mbuf *, const struct sadb_msghdr *); static int key_dump(struct socket *, struct mbuf *, @@ -4242,41 +4242,29 @@ key_flush_sad(time_t now) "time, why?\n", __func__)); continue; } - - /* check SOFT lifetime */ - if (sav->lft_s->addtime != 0 && - now - sav->created > sav->lft_s->addtime) { - key_sa_chgstate(sav, SADB_SASTATE_DYING); - /* - * Actually, only send expire message if - * SA has been used, as it was done before, - * but should we always send such message, - * and let IKE daemon decide if it should be - * renegotiated or not ? - * XXX expire message will actually NOT be - * sent if SA is only used after soft - * lifetime has been reached, see below - * (DYING state) - */ - if (sav->lft_c->usetime != 0) - key_expire(sav); - } - /* check SOFT lifetime by bytes */ /* - * XXX I don't know the way to delete this SA - * when new SA is installed. Caution when it's - * installed too big lifetime by time. + * RFC 2367: + * HARD lifetimes MUST take precedence over SOFT + * lifetimes, meaning if the HARD and SOFT lifetimes + * are the same, the HARD lifetime will appear on the + * EXPIRE message. */ - else if (sav->lft_s->bytes != 0 && - sav->lft_s->bytes < sav->lft_c->bytes) { - + /* check HARD lifetime */ + if ((sav->lft_h->addtime != 0 && + now - sav->created > sav->lft_h->addtime) || + (sav->lft_h->bytes != 0 && + sav->lft_h->bytes < sav->lft_c->bytes)) { + key_sa_chgstate(sav, SADB_SASTATE_DEAD); + key_expire(sav, 1); + KEY_FREESAV(&sav); + } + /* check SOFT lifetime */ + else if ((sav->lft_s->addtime != 0 && + now - sav->created > sav->lft_s->addtime) || + (sav->lft_s->bytes != 0 && + sav->lft_s->bytes < sav->lft_c->bytes)) { key_sa_chgstate(sav, SADB_SASTATE_DYING); - /* - * XXX If we keep to send expire - * message in the status of - * DYING. Do remove below code. - */ - key_expire(sav); + key_expire(sav, 0); } } @@ -4295,6 +4283,7 @@ key_flush_sad(time_t now) if (sav->lft_h->addtime != 0 && now - sav->created > sav->lft_h->addtime) { + key_expire(sav, 1); key_sa_chgstate(sav, SADB_SASTATE_DEAD); KEY_FREESAV(&sav); } @@ -4311,12 +4300,13 @@ key_flush_sad(time_t now) * If there is no SA then sending * expire message. */ - key_expire(sav); + key_expire(sav, 0); } #endif /* check HARD lifetime by bytes */ else if (sav->lft_h->bytes != 0 && sav->lft_h->bytes < sav->lft_c->bytes) { + key_expire(sav, 1); key_sa_chgstate(sav, SADB_SASTATE_DEAD); KEY_FREESAV(&sav); } @@ -6721,7 +6711,7 @@ key_freereg(struct socket *so) * others : error number */ static int -key_expire(struct secasvar *sav) +key_expire(struct secasvar *sav, int hard) { int satype; struct mbuf *result = NULL, *m; @@ -6779,11 +6769,19 @@ key_expire(struct secasvar *sav) lt->sadb_lifetime_usetime = sav->lft_c->usetime; lt = (struct sadb_lifetime *)(mtod(m, caddr_t) + len / 2); lt->sadb_lifetime_len = PFKEY_UNIT64(sizeof(struct sadb_lifetime)); - lt->sadb_lifetime_exttype = SADB_EXT_LIFETIME_SOFT; - lt->sadb_lifetime_allocations = sav->lft_s->allocations; - lt->sadb_lifetime_bytes = sav->lft_s->bytes; - lt->sadb_lifetime_addtime = sav->lft_s->addtime; - lt->sadb_lifetime_usetime = sav->lft_s->usetime; + if (hard) { + lt->sadb_lifetime_exttype = SADB_EXT_LIFETIME_HARD; + lt->sadb_lifetime_allocations = sav->lft_h->allocations; + lt->sadb_lifetime_bytes = sav->lft_h->bytes; + lt->sadb_lifetime_addtime = sav->lft_h->addtime; + lt->sadb_lifetime_usetime = sav->lft_h->usetime; + } else { + lt->sadb_lifetime_exttype = SADB_EXT_LIFETIME_SOFT; + lt->sadb_lifetime_allocations = sav->lft_s->allocations; + lt->sadb_lifetime_bytes = sav->lft_s->bytes; + lt->sadb_lifetime_addtime = sav->lft_s->addtime; + lt->sadb_lifetime_usetime = sav->lft_s->usetime; + } m_cat(result, m); /* set sadb_address for source */ From owner-svn-src-head@FreeBSD.ORG Tue May 19 08:37:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE070D05; Tue, 19 May 2015 08:37:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCABD11B7; Tue, 19 May 2015 08:37:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4J8b3VY004795; Tue, 19 May 2015 08:37:03 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J8b3ne004794; Tue, 19 May 2015 08:37:03 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505190837.t4J8b3ne004794@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 19 May 2015 08:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283102 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 08:37:04 -0000 Author: ae Date: Tue May 19 08:37:03 2015 New Revision: 283102 URL: https://svnweb.freebsd.org/changeset/base/283102 Log: Change SA's state before sending SADB_EXPIRE message. This state will be reported to keying daemon. MFC after: 2 weeks Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Tue May 19 08:30:04 2015 (r283101) +++ head/sys/netipsec/key.c Tue May 19 08:37:03 2015 (r283102) @@ -4283,8 +4283,8 @@ key_flush_sad(time_t now) if (sav->lft_h->addtime != 0 && now - sav->created > sav->lft_h->addtime) { - key_expire(sav, 1); key_sa_chgstate(sav, SADB_SASTATE_DEAD); + key_expire(sav, 1); KEY_FREESAV(&sav); } #if 0 /* XXX Should we keep to send expire message until HARD lifetime ? */ @@ -4306,8 +4306,8 @@ key_flush_sad(time_t now) /* check HARD lifetime by bytes */ else if (sav->lft_h->bytes != 0 && sav->lft_h->bytes < sav->lft_c->bytes) { - key_expire(sav, 1); key_sa_chgstate(sav, SADB_SASTATE_DEAD); + key_expire(sav, 1); KEY_FREESAV(&sav); } } From owner-svn-src-head@FreeBSD.ORG Tue May 19 09:11:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99C8AC7D; Tue, 19 May 2015 09:11:22 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 243AE1624; Tue, 19 May 2015 09:11:21 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t4J9BIMx035396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 19 May 2015 12:11:18 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t4J9BIfS035395; Tue, 19 May 2015 12:11:18 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 19 May 2015 12:11:18 +0300 From: Gleb Smirnoff To: Andrew Rybchenko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282941 - head/sys/dev/sfxge Message-ID: <20150519091118.GU15393@FreeBSD.org> References: <201505150649.t4F6niTp042894@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201505150649.t4F6niTp042894@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 09:11:22 -0000 Andrew, On Fri, May 15, 2015 at 06:49:44AM +0000, Andrew Rybchenko wrote: A> Author: arybchik A> Date: Fri May 15 06:49:43 2015 A> New Revision: 282941 A> URL: https://svnweb.freebsd.org/changeset/base/282941 A> A> Log: A> sfxge: do not change CSUM_TSO when IFCAP_TSOx is changed A> A> It is simply not required since the kernel checks corresponding A> IFCAP_TSOx capability and CSUM_TSO in hw-assisted offloads. A> Note that CSUM_TSO is two bits (CSUM_IP_TSO|CSUM_IP6_TSO) and both bits A> are set in IPv4 and IPv6 mbufs. I am not sure that this is a part of driver KPI. AFAIU, the if_capenable is user visible declaration of capabilities, and if_hwassist is stack visible. So, they should be changed together. At least all drivers do that. What made you to make such change to sfxge? Whether this is a good KPI or not is of course discussable. If you have ideas and improvements, let's do them in projects/ifnet branch. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue May 19 09:22:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EEA497; Tue, 19 May 2015 09:22:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 139C51814; Tue, 19 May 2015 09:22:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4J9M6tJ029640; Tue, 19 May 2015 09:22:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J9M6eT029639; Tue, 19 May 2015 09:22:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505190922.t4J9M6eT029639@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 19 May 2015 09:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283103 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 09:22:07 -0000 Author: hselasky Date: Tue May 19 09:22:06 2015 New Revision: 283103 URL: https://svnweb.freebsd.org/changeset/base/283103 Log: Fix for DWC OTG device side isochronous transfers. The even or odd isochronous frame bit needs to be flipped. MFC after: 3 days Modified: head/sys/dev/usb/controller/dwc_otg.c Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Tue May 19 08:37:03 2015 (r283102) +++ head/sys/dev/usb/controller/dwc_otg.c Tue May 19 09:22:06 2015 (r283103) @@ -1557,6 +1557,22 @@ dwc_otg_data_rx(struct dwc_otg_softc *sc /* release FIFO */ dwc_otg_common_rx_ack(sc); + temp = sc->sc_out_ctl[td->ep_no]; + + /* check for isochronous mode */ + if ((temp & DIEPCTL_EPTYPE_MASK) == + (DIEPCTL_EPTYPE_ISOC << DIEPCTL_EPTYPE_SHIFT)) { + /* toggle odd or even frame bit */ + if (temp & DIEPCTL_SETD1PID) { + temp &= ~DIEPCTL_SETD1PID; + temp |= DIEPCTL_SETD0PID; + } else { + temp &= ~DIEPCTL_SETD0PID; + temp |= DIEPCTL_SETD1PID; + } + sc->sc_out_ctl[td->ep_no] = temp; + } + /* check if we are complete */ if ((td->remainder == 0) || got_short) { if (td->short_pkt) { @@ -2132,10 +2148,23 @@ repeat: temp = sc->sc_in_ctl[td->ep_no]; + /* check for isochronous mode */ + if ((temp & DIEPCTL_EPTYPE_MASK) == + (DIEPCTL_EPTYPE_ISOC << DIEPCTL_EPTYPE_SHIFT)) { + /* toggle odd or even frame bit */ + if (temp & DIEPCTL_SETD1PID) { + temp &= ~DIEPCTL_SETD1PID; + temp |= DIEPCTL_SETD0PID; + } else { + temp &= ~DIEPCTL_SETD0PID; + temp |= DIEPCTL_SETD1PID; + } + sc->sc_in_ctl[td->ep_no] = temp; + } + /* must enable before writing data to FIFO */ DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(td->ep_no), temp | - DIEPCTL_EPENA | - DIEPCTL_CNAK); + DIEPCTL_EPENA | DIEPCTL_CNAK); td->tx_bytes = count; From owner-svn-src-head@FreeBSD.ORG Tue May 19 09:28:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 143B3367; Tue, 19 May 2015 09:28:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA9121873; Tue, 19 May 2015 09:28:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4J9Sqvs030476; Tue, 19 May 2015 09:28:52 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J9Sq4M030475; Tue, 19 May 2015 09:28:52 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505190928.t4J9Sq4M030475@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 19 May 2015 09:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283104 - head/sys/geom/uncompress X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 09:28:53 -0000 Author: ae Date: Tue May 19 09:28:52 2015 New Revision: 283104 URL: https://svnweb.freebsd.org/changeset/base/283104 Log: Read GEOM_UNCOMPRESS metadata using several requests that fit into MAXPHYS. For large compressed images the metadata size can be bigger than MAXPHYS and this triggers KASSERT in g_read_data(). Also use g_free() to free memory allocated by g_read_data(). PR: 199476 MFC after: 2 weeks Modified: head/sys/geom/uncompress/g_uncompress.c Modified: head/sys/geom/uncompress/g_uncompress.c ============================================================================== --- head/sys/geom/uncompress/g_uncompress.c Tue May 19 09:22:06 2015 (r283103) +++ head/sys/geom/uncompress/g_uncompress.c Tue May 19 09:28:52 2015 (r283104) @@ -464,7 +464,8 @@ g_uncompress_taste(struct g_class *mp, s struct g_provider *pp2; struct g_consumer *cp; struct g_geom *gp; - uint32_t i, total_offsets, type; + uint64_t *offsets; + uint32_t i, r, total, total_offsets, type; uint8_t *buf; int error; @@ -499,8 +500,8 @@ g_uncompress_taste(struct g_class *mp, s */ DPRINTF(("%s: media sectorsize %u, mediasize %jd\n", gp->name, pp->sectorsize, (intmax_t)pp->mediasize)); - i = roundup(sizeof(struct cloop_header), pp->sectorsize); - buf = g_read_data(cp, 0, i, NULL); + total = roundup(sizeof(struct cloop_header), pp->sectorsize); + buf = g_read_data(cp, 0, total, NULL); if (buf == NULL) goto err; header = (struct cloop_header *) buf; @@ -557,20 +558,29 @@ g_uncompress_taste(struct g_class *mp, s gp->name, sc->nblocks); goto err; } - free(buf, M_GEOM); + g_free(buf); - i = roundup((sizeof(struct cloop_header) + - total_offsets * sizeof(uint64_t)), pp->sectorsize); - buf = g_read_data(cp, 0, i, NULL); - if (buf == NULL) - goto err; sc->offsets = malloc(total_offsets * sizeof(uint64_t), - M_GEOM_UNCOMPRESS, M_WAITOK); - for (i = 0; i <= total_offsets; i++) { - sc->offsets[i] = be64toh(((uint64_t *) - (buf+sizeof(struct cloop_header)))[i]); + M_GEOM_UNCOMPRESS, M_WAITOK | M_ZERO); + total = roundup((sizeof(struct cloop_header) + + total_offsets * sizeof(uint64_t)), pp->sectorsize); +#define RSZ ((total - r) > MAXPHYS ? MAXPHYS: (total - r)) + for (r = 0, i = 0; r < total; r += MAXPHYS) { + buf = g_read_data(cp, r, RSZ, &error); + if (buf == NULL) { + free(sc->offsets, M_GEOM_UNCOMPRESS); + goto err; + } + offsets = (uint64_t *)buf; + if (r == 0) + offsets += + sizeof(struct cloop_header) / sizeof(uint64_t); + for (; i < total_offsets && offsets < (uint64_t *)(buf + RSZ); + i++, offsets++) + sc->offsets[i] = be64toh(*offsets); + g_free(buf); } - free(buf, M_GEOM); +#undef RSZ buf = NULL; DPRINTF(("%s: done reading offsets\n", gp->name)); mtx_init(&sc->last_mtx, "geom_uncompress cache", NULL, MTX_DEF); @@ -619,7 +629,7 @@ err: g_topology_lock(); g_access(cp, -1, 0, 0); if (buf != NULL) - free(buf, M_GEOM); + g_free(buf); if (gp->softc != NULL) { g_uncompress_softc_free(gp->softc, NULL); gp->softc = NULL; From owner-svn-src-head@FreeBSD.ORG Tue May 19 11:33:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 741BD12B; Tue, 19 May 2015 11:33:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 481D21CDA; Tue, 19 May 2015 11:33:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JBX5ug093913; Tue, 19 May 2015 11:33:05 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JBX54w093912; Tue, 19 May 2015 11:33:05 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201505191133.t4JBX54w093912@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Tue, 19 May 2015 11:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283105 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 11:33:05 -0000 Author: julian Date: Tue May 19 11:33:04 2015 New Revision: 283105 URL: https://svnweb.freebsd.org/changeset/base/283105 Log: Only several years late, catch the psignal man page up to the fact that psignal has been renamed to kern_psignal since 9.0. MFC after: 1 week Modified: head/share/man/man9/psignal.9 Modified: head/share/man/man9/psignal.9 ============================================================================== --- head/share/man/man9/psignal.9 Tue May 19 09:28:52 2015 (r283104) +++ head/share/man/man9/psignal.9 Tue May 19 11:33:04 2015 (r283105) @@ -33,6 +33,7 @@ .Os .Sh NAME .Nm psignal , +.Nm kern_psignal , .Nm pgsignal , .Nm gsignal , .Nm tdsignal @@ -41,7 +42,7 @@ .In sys/types.h .In sys/signalvar.h .Ft void -.Fn psignal "struct proc *p" "int signum" +.Fn kern_psignal "struct proc *p" "int signum" .Ft void .Fn pgsignal "struct pgrp *pgrp" "int signum" "int checkctty" .Ft void @@ -56,16 +57,21 @@ common to all three functions should be .Bq 1- Ns Dv NSIG . .Pp The -.Fn psignal +.Fn kern_psignal function posts signal number .Fa signum to the process represented by the process structure .Fa p . +The +.Fn kernel_psignal +function used to be called +.Fn psignal +but was renamed. With a few exceptions noted below, the target process signal disposition is updated and is marked as runnable, so further handling of the signal is done in the context of the target process after a context switch. Note that -.Fn psignal +.Fn kern_psignal does not by itself cause a context switch to happen. .Pp The target process is not marked as runnable in the following cases: @@ -91,7 +97,7 @@ regardless of the signal action .El .Pp If the target process is being traced -.Fn psignal +.Fn kern_psignal behaves as if the target process were taking the default action for .Fa signum . This allows the tracing process to be notified of the signal. @@ -113,7 +119,7 @@ of the process group structure pointed at by .Fa pgrp and calling -.Fn psignal +.Fn kern_psignal as appropriate. If .Fa pgrp @@ -149,3 +155,10 @@ to the thread represented by the thread .Xr sigaction 2 , .Xr signal 9 , .Xr tsleep 9 +.Sh HISTORY +The +.Fn psignal +call was renamed to +.Fn kern_psignal +in +.Fx 9.0 . From owner-svn-src-head@FreeBSD.ORG Tue May 19 12:34:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7D4DEBF; Tue, 19 May 2015 12:34:16 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 7E76A1391; Tue, 19 May 2015 12:34:16 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 010A2781D23; Tue, 19 May 2015 22:34:12 +1000 (AEST) Date: Tue, 19 May 2015 22:34:11 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Julian Elischer cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283105 - head/share/man/man9 In-Reply-To: <201505191133.t4JBX54w093912@svn.freebsd.org> Message-ID: <20150519214041.J3472@besplex.bde.org> References: <201505191133.t4JBX54w093912@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=1azgIOBnuRS1gDRdnzEA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 12:34:16 -0000 On Tue, 19 May 2015, Julian Elischer wrote: > Author: julian > > Log: > Only several years late, catch the psignal man page up to the > fact that psignal has been renamed to kern_psignal since 9.0. > > MFC after: 1 week It would be better to fix the function to match its documented name. Many other function names are similarly broken. For example, the primary function in getenv(9). There is not a single syscall named foo() misnamed as sys_foo() in any section 9 man page, but I think that is because there never was a single syscall named whose kernel part foo() is documented as foo(9) in any man page, so there was no documentation except the source code to break by renaming. There is even less than null documentation for the kern_foo() layer of syscalls named foo(). Null documentation would be empty. The actual documentation is ".Xr kern_openat 9" in devfs_set_cdevpriv.9. This reference is more broken than usual. As usual, the man page containing the pointer gives no hint on what might be relevant in the pointed-to man page. Here the pointed-to man page also doesn't exist. > Modified: > head/share/man/man9/psignal.9 > > Modified: head/share/man/man9/psignal.9 Now the name of this manpage is broken. It doesn't match the name of any function in it. > ============================================================================== > --- head/share/man/man9/psignal.9 Tue May 19 09:28:52 2015 (r283104) > +++ head/share/man/man9/psignal.9 Tue May 19 11:33:04 2015 (r283105) > @@ -33,6 +33,7 @@ > .Os > .Sh NAME > .Nm psignal , > +.Nm kern_psignal , > .Nm pgsignal , > .Nm gsignal , > .Nm tdsignal psignal() was misnamed because there is a section 3 psignal() and namespaces are handled badly somewhere. The other functions here don't conflict with application names and were not renamed. This gives an inconsistent namespace here. All the other functions have shorter names without an underscore. If the functions (in userland too) had modern uglier names with 'signal' (or better 'sig', but that wouldn't be verbose enough) as a prefix, then renaming would cause larger inconsistencies, but wouldn't be necessary since there would be no conflict because p would be spelled verbosely as 'process' in the kernel and 'print' in userland. More important functions like printf() and malloc() weren't renamed since the churn from than would be too painful. The kernel is compiled with -ffreestanding to handle namespaces correctly in it. This is the correct way of preventing the compiler knowing too much about printf() and turning it into functions that don't exist in the kernel. The kernel malloc() is even more incompatible. printf(9) has the worse name printk() in Minix and Linux. I liked to get away from that. This was technically needed in Minix before C90 standardized things, in particular freestanding environments. Without a standard, the compiler might rewrite any library function like printf(). gcc didn't implement special support for freestanding environments until much later when it started rewriting printf(). BSD ignored this portability problem and just used printf(9). Bruce From owner-svn-src-head@FreeBSD.ORG Tue May 19 14:02:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F6A87F9; Tue, 19 May 2015 14:02:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1F621F9D; Tue, 19 May 2015 14:02:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JE2elr067682; Tue, 19 May 2015 14:02:40 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JE2evF067681; Tue, 19 May 2015 14:02:40 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201505191402.t4JE2evF067681@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 19 May 2015 14:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283106 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 14:02:41 -0000 Author: glebius Date: Tue May 19 14:02:40 2015 New Revision: 283106 URL: https://svnweb.freebsd.org/changeset/base/283106 Log: During module unload unlock rules before destroying UMA zones, which may sleep in uma_drain(). It is safe to unlock here, since we are already dehooked from pfil(9) and all pf threads had quit. Sponsored by: Nginx, Inc. Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Tue May 19 11:33:04 2015 (r283105) +++ head/sys/netpfil/pf/pf_ioctl.c Tue May 19 14:02:40 2015 (r283106) @@ -3756,6 +3756,7 @@ pf_unload(void) wakeup_one(pf_purge_thread); rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftmo", 0); } + PF_RULES_WUNLOCK(); pf_normalize_cleanup(); pfi_cleanup(); pfr_cleanup(); @@ -3763,7 +3764,6 @@ pf_unload(void) pf_cleanup(); if (IS_DEFAULT_VNET(curvnet)) pf_mtag_cleanup(); - PF_RULES_WUNLOCK(); destroy_dev(pf_dev); rw_destroy(&pf_rules_lock); sx_destroy(&pf_ioctl_lock); From owner-svn-src-head@FreeBSD.ORG Tue May 19 14:03:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E63393C; Tue, 19 May 2015 14:03:04 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8CD81FA3; Tue, 19 May 2015 14:03:03 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BA4E0B989; Tue, 19 May 2015 10:03:02 -0400 (EDT) From: John Baldwin To: Pedro Giffuni Cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283088 - head/sys/ddb Date: Tue, 19 May 2015 09:45:49 -0400 Message-ID: <2053555.dpIzi23R03@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: <201505182227.t4IMRljx078812@svn.freebsd.org> <20150519135341.R2157@besplex.bde.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 19 May 2015 10:03:02 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 14:03:04 -0000 On Tuesday, May 19, 2015 12:28:05 AM Pedro Giffuni wrote: > >>>> Modified: head/sys/ddb/db_break.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/ddb/db_break.c=09Mon May 18 22:14:06 2015=09(r28308= 7) > >>>> +++ head/sys/ddb/db_break.c=09Mon May 18 22:27:46 2015=09(r28308= 8) > >>>> @@ -155,12 +155,12 @@ db_find_breakpoint_here(db_addr_t addr) > >>>> =09return db_find_breakpoint(db_map_addr(addr), addr); > >>>> } > >>>>=20 > >>>> -static boolean_t=09db_breakpoints_inserted =3D TRUE; > >>>> +static boolean_t=09db_breakpoints_inserted =3D true; > >>>=20 > >>> This code hasn't been churned to use the boolean type. It still = uses > >>> boolean_t, which is plain int. TRUE and FALSE go with this type.= true > >>> and false go with the boolean type. This probably makes no diffe= rence, > >>> because TRUE happens to be implemented with the same value as tru= e and > >>> there are lots of implicit versions between the types. > >>=20 > >> Yes, I noticed the return types are still ints. It doesn=E2=80=99t= look difficult > >> to convert it to use a real boolean type. In any case, I would pr= efer to go > >> forward (using bool) instead of reverting this change. > >=20 > > That wuld be sideways. > >=20 > > I forgot to mention (again) in my previous reply that boolean_t is = a mistake > > by me. KNF code doesn't even use the ! operator, but uses explicit= > > comparison with 0. The boolean_t type and TRUE and FALSE are from = Mach. > > They were used mainly in ddb and vm, and are still almost never use= d in > > kern. I used to like typedefs and a typedef for boolean types, and= didn't > > know KNF very well, so in 1995 I moved the declaration of boolean_t= from > > Mach vm code to sys/types.h to try to popularize it. This was a mi= stake. > > Fortunately, it is still rarely used in core kernel code. > >=20 > > The boolean type is also almost never used for syscalls. In POSIX.= 1-2001, > > is inherited from C99, but is never used for any other = POSIX > > API. Using it for syscalls would mainly cause portability problems= . > >=20 >=20 > OK, I do understand the kernel wants to keep the C dialect somewhat l= imited, > and adding stdbool.h doesn=E2=80=99t buy us any type safety here. >=20 > I=E2=80=99ll revert the change (prob. tomorrow though). I will disagree with Bruce a bit and put my vote in for replacing boole= an_t with bool where it is used. I do think that logically (if not strictly= ) your commit is a type mismatch as TRUE/FALSE is for boolean_t and true/false= are for bool. I agree with Bruce that we probably don't want to use bool f= or system calls. However, I think using bool in the kernel itself is ok a= nd that we should replace boolean_t with bool. --=20 John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue May 19 14:03:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11C6C93D; Tue, 19 May 2015 14:03:04 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDACF1FA4; Tue, 19 May 2015 14:03:03 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2FC37B93C; Tue, 19 May 2015 10:03:02 -0400 (EDT) From: John Baldwin To: Bruce Evans Cc: Julian Elischer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283105 - head/share/man/man9 Date: Tue, 19 May 2015 09:52:15 -0400 Message-ID: <3610610.hSkXANVPkf@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <20150519214041.J3472@besplex.bde.org> References: <201505191133.t4JBX54w093912@svn.freebsd.org> <20150519214041.J3472@besplex.bde.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 19 May 2015 10:03:02 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 14:03:04 -0000 On Tuesday, May 19, 2015 10:34:11 PM Bruce Evans wrote: > It would be better to fix the function to match its documented name. > > Many other function names are similarly broken. For example, the primary > function in getenv(9). I agree. :( I would prefer to restore the psignal() and getenv() names. getenv() also has the related misfeature that only getenv() was renamed, but not functions like getenv_int() (similar to pgsignal() for psignal()). Given that no attempt was made to handle the far more pervasive issues with printf and malloc, I think these renames should be reverted. If someone wants to have a user-mode kernel then whatever solution is devised for malloc() (whether #define or symbol renaming trickery) can be done for getenv() and psignal(). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue May 19 14:04:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98BC6BD9; Tue, 19 May 2015 14:04:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79E351FBA; Tue, 19 May 2015 14:04:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JE4MDc068026; Tue, 19 May 2015 14:04:22 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JE4L7x068023; Tue, 19 May 2015 14:04:21 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201505191404.t4JE4L7x068023@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 19 May 2015 14:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283107 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 14:04:22 -0000 Author: glebius Date: Tue May 19 14:04:21 2015 New Revision: 283107 URL: https://svnweb.freebsd.org/changeset/base/283107 Log: Use MTX_SYSINIT() instead of mtx_init() to separate mutex initialization from associated structures initialization. The mutexes are global, while the structures are per-vnet. Submitted by: Nikos Vassiliadis Modified: head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_if.c head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Tue May 19 14:02:40 2015 (r283106) +++ head/sys/netpfil/pf/pf.c Tue May 19 14:04:21 2015 (r283107) @@ -151,6 +151,7 @@ static VNET_DEFINE(struct pf_send_head, #define V_pf_sendqueue VNET(pf_sendqueue) static struct mtx pf_sendqueue_mtx; +MTX_SYSINIT(pf_sendqueue_mtx, &pf_sendqueue_mtx, "pf send queue", MTX_DEF); #define PF_SENDQ_LOCK() mtx_lock(&pf_sendqueue_mtx) #define PF_SENDQ_UNLOCK() mtx_unlock(&pf_sendqueue_mtx) @@ -172,11 +173,15 @@ static VNET_DEFINE(struct task, pf_overl #define V_pf_overloadtask VNET(pf_overloadtask) static struct mtx pf_overloadqueue_mtx; +MTX_SYSINIT(pf_overloadqueue_mtx, &pf_overloadqueue_mtx, + "pf overload/flush queue", MTX_DEF); #define PF_OVERLOADQ_LOCK() mtx_lock(&pf_overloadqueue_mtx) #define PF_OVERLOADQ_UNLOCK() mtx_unlock(&pf_overloadqueue_mtx) VNET_DEFINE(struct pf_rulequeue, pf_unlinked_rules); struct mtx pf_unlnkdrules_mtx; +MTX_SYSINIT(pf_unlnkdrules_mtx, &pf_unlnkdrules_mtx, "pf unlinked rules", + MTX_DEF); static VNET_DEFINE(uma_zone_t, pf_sources_z); #define V_pf_sources_z VNET(pf_sources_z) @@ -804,18 +809,13 @@ pf_initialize() V_pf_altqs_active = &V_pf_altqs[0]; V_pf_altqs_inactive = &V_pf_altqs[1]; - /* Send & overload+flush queues. */ STAILQ_INIT(&V_pf_sendqueue); SLIST_INIT(&V_pf_overloadqueue); TASK_INIT(&V_pf_overloadtask, 0, pf_overload_task, curvnet); - mtx_init(&pf_sendqueue_mtx, "pf send queue", NULL, MTX_DEF); - mtx_init(&pf_overloadqueue_mtx, "pf overload/flush queue", NULL, - MTX_DEF); /* Unlinked, but may be referenced rules. */ TAILQ_INIT(&V_pf_unlinked_rules); - mtx_init(&pf_unlnkdrules_mtx, "pf unlinked rules", NULL, MTX_DEF); } void @@ -858,10 +858,6 @@ pf_cleanup() free(pfse, M_PFTEMP); } - mtx_destroy(&pf_sendqueue_mtx); - mtx_destroy(&pf_overloadqueue_mtx); - mtx_destroy(&pf_unlnkdrules_mtx); - uma_zdestroy(V_pf_sources_z); uma_zdestroy(V_pf_state_z); uma_zdestroy(V_pf_state_key_z); Modified: head/sys/netpfil/pf/pf_if.c ============================================================================== --- head/sys/netpfil/pf/pf_if.c Tue May 19 14:02:40 2015 (r283106) +++ head/sys/netpfil/pf/pf_if.c Tue May 19 14:04:21 2015 (r283107) @@ -103,6 +103,8 @@ LIST_HEAD(pfi_list, pfi_kif); static VNET_DEFINE(struct pfi_list, pfi_unlinked_kifs); #define V_pfi_unlinked_kifs VNET(pfi_unlinked_kifs) static struct mtx pfi_unlnkdkifs_mtx; +MTX_SYSINIT(pfi_unlnkdkifs_mtx, &pfi_unlnkdkifs_mtx, "pf unlinked interfaces", + MTX_DEF); void pfi_initialize(void) @@ -115,8 +117,6 @@ pfi_initialize(void) V_pfi_buffer = malloc(V_pfi_buffer_max * sizeof(*V_pfi_buffer), PFI_MTYPE, M_WAITOK); - mtx_init(&pfi_unlnkdkifs_mtx, "pf unlinked interfaces", NULL, MTX_DEF); - kif = malloc(sizeof(*kif), PFI_MTYPE, M_WAITOK); PF_RULES_WLOCK(); V_pfi_all = pfi_kif_attach(kif, IFG_ALL); @@ -166,8 +166,6 @@ pfi_cleanup(void) free(p, PFI_MTYPE); } - mtx_destroy(&pfi_unlnkdkifs_mtx); - free(V_pfi_buffer, PFI_MTYPE); } Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Tue May 19 14:02:40 2015 (r283106) +++ head/sys/netpfil/pf/pf_norm.c Tue May 19 14:04:21 2015 (r283107) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include "opt_pf.h" #include +#include #include #include #include @@ -108,6 +109,7 @@ struct pf_fragment_tag { }; static struct mtx pf_frag_mtx; +MTX_SYSINIT(pf_frag_mtx, &pf_frag_mtx, "pf fragments", MTX_DEF); #define PF_FRAG_LOCK() mtx_lock(&pf_frag_mtx) #define PF_FRAG_UNLOCK() mtx_unlock(&pf_frag_mtx) #define PF_FRAG_ASSERT() mtx_assert(&pf_frag_mtx, MA_OWNED) @@ -197,8 +199,6 @@ pf_normalize_init(void) uma_zone_set_max(V_pf_frent_z, PFFRAG_FRENT_HIWAT); uma_zone_set_warning(V_pf_frent_z, "PF frag entries limit reached"); - mtx_init(&pf_frag_mtx, "pf fragments", NULL, MTX_DEF); - TAILQ_INIT(&V_pf_fragqueue); TAILQ_INIT(&V_pf_cachequeue); } @@ -210,8 +210,6 @@ pf_normalize_cleanup(void) uma_zdestroy(V_pf_state_scrub_z); uma_zdestroy(V_pf_frent_z); uma_zdestroy(V_pf_frag_z); - - mtx_destroy(&pf_frag_mtx); } static int From owner-svn-src-head@FreeBSD.ORG Tue May 19 14:05:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61722D4D; Tue, 19 May 2015 14:05:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 501761FD9; Tue, 19 May 2015 14:05:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JE5GuU068236; Tue, 19 May 2015 14:05:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JE5GMc068235; Tue, 19 May 2015 14:05:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505191405.t4JE5GMc068235@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 19 May 2015 14:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283108 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 14:05:16 -0000 Author: emaste Date: Tue May 19 14:05:15 2015 New Revision: 283108 URL: https://svnweb.freebsd.org/changeset/base/283108 Log: Update crunch bootstrapping test for recent fixes - r277259 crunchide: Correct 64-bit section header offset - r281674 crunchide: always include both 32- and 64-bit ELF support With built-in cross-size support we also no longer need a special case for cross-build crunchide. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2576 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue May 19 14:04:21 2015 (r283107) +++ head/Makefile.inc1 Tue May 19 14:05:15 2015 (r283108) @@ -1297,7 +1297,9 @@ _cat= bin/cat _lex= usr.bin/lex .endif -.if ${BOOTSTRAPPING} < 1001507 +# r277259 crunchide: Correct 64-bit section header offset +# r281674 crunchide: always include both 32- and 64-bit ELF support +.if ${BOOTSTRAPPING} < 1100071 _crunch= usr.sbin/crunch .endif @@ -1466,11 +1468,6 @@ kernel-tools: .MAKE _btxld= usr.sbin/btxld .endif .endif -.if ${TARGET_ARCH} != ${MACHINE_ARCH} -.if ${MK_RESCUE} != "no" -_crunchide= usr.sbin/crunch/crunchide -.endif -.endif # If we're given an XAS, don't build binutils. .if ${XAS:M/*} == "" From owner-svn-src-head@FreeBSD.ORG Tue May 19 14:11:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46F9BFDB for ; Tue, 19 May 2015 14:11:33 +0000 (UTC) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) by mx1.freebsd.org (Postfix) with SMTP id 0715D1047 for ; Tue, 19 May 2015 14:11:32 +0000 (UTC) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Tue, 19 May 2015 14:11:34 +0000 (UTC) Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t4JEBL7E016811; Tue, 19 May 2015 08:11:21 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1432044681.91685.77.camel@freebsd.org> Subject: Re: svn commit: r283088 - head/sys/ddb From: Ian Lepore To: Pedro Giffuni Cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 19 May 2015 08:11:21 -0600 In-Reply-To: <406A7AE3-1891-4B2C-B917-14C150EBBAB5@FreeBSD.org> References: <201505182227.t4IMRljx078812@svn.freebsd.org> <20150519113755.U1840@besplex.bde.org> <406A7AE3-1891-4B2C-B917-14C150EBBAB5@FreeBSD.org> Content-Type: text/plain; charset="iso-8859-13" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 14:11:33 -0000 On Mon, 2015-05-18 at 22:49 -0500, Pedro Giffuni wrote: > > Il giorno 18/mag/2015, alle ore 20:48, Bruce Evans ha scritto: > > > > On Mon, 18 May 2015, Pedro F. Giffuni wrote: > > > >> Log: > >> ddb: stop boolean screaming. > >> > >> TRUE --> true > >> FALSE--> false > >> > >> Hinted by: NetBSD > > > > This is not just churn to a style regression, but a type mismatch. > > > > It is an attempt to reduce differences with NetBSD. > > One of the complaints of hear from newcomers to the ddb code is that > the format is old-fashioned (it still had pre-ANSI headers not long ago) > and unmaintained. > > >> Modified: head/sys/ddb/db_break.c > >> ============================================================================== > >> --- head/sys/ddb/db_break.c Mon May 18 22:14:06 2015 (r283087) > >> +++ head/sys/ddb/db_break.c Mon May 18 22:27:46 2015 (r283088) > >> @@ -155,12 +155,12 @@ db_find_breakpoint_here(db_addr_t addr) > >> return db_find_breakpoint(db_map_addr(addr), addr); > >> } > >> > >> -static boolean_t db_breakpoints_inserted = TRUE; > >> +static boolean_t db_breakpoints_inserted = true; > > > > This code hasn't been churned to use the boolean type. It still uses > > boolean_t, which is plain int. TRUE and FALSE go with this type. true > > and false go with the boolean type. This probably makes no difference, > > because TRUE happens to be implemented with the same value as true and > > there are lots of implicit versions between the types. > > > > Yes, I noticed the return types are still ints. It doesnÿt look difficult > to convert it to use a real boolean type. In any case, I would prefer to go > forward (using bool) instead of reverting this change. > Yes, please do. Pedanticism aside, boolean types are extremely valuable because they document the intended use of the data. IMO the value in that far outweighs arguments about spelling and conversions and other whinging about things that work just fine. To sum it up, "int" is one of the vaguest things you can say in C, and "boolean" (in any reasonable spelling variation) is one of the clearest. -- Ian > > The boolean type is almost useless since C's type system is too weak to > > distinguish between plain int used as a boolean and pure boolean. If > > it were stronger, then it would complain about all the implicit conversions > > between int and boolean, and the boolean type would be harder to use for > > other reasons. > > > > And I would like that to happen, but it would probably break a lot of legacy code. > I thought boolean_t was a transition type. > > > Pedro. > > > From owner-svn-src-head@FreeBSD.ORG Tue May 19 14:21:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8180CBE7; Tue, 19 May 2015 14:21:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7011B1278; Tue, 19 May 2015 14:21:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JEL1WQ075037; Tue, 19 May 2015 14:21:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JEL1vd075036; Tue, 19 May 2015 14:21:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505191421.t4JEL1vd075036@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 19 May 2015 14:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283109 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 14:21:01 -0000 Author: kib Date: Tue May 19 14:21:00 2015 New Revision: 283109 URL: https://svnweb.freebsd.org/changeset/base/283109 Log: When sleeping in Sx state using MWAIT instruction, accept fast wakeup requests from writes to the monitored line. Submitted by: avg Modified: head/sys/x86/x86/cpu_machdep.c Modified: head/sys/x86/x86/cpu_machdep.c ============================================================================== --- head/sys/x86/x86/cpu_machdep.c Tue May 19 14:05:15 2015 (r283108) +++ head/sys/x86/x86/cpu_machdep.c Tue May 19 14:21:00 2015 (r283109) @@ -101,6 +101,10 @@ __FBSDID("$FreeBSD$"); #include #include +#define STATE_RUNNING 0x0 +#define STATE_MWAIT 0x1 +#define STATE_SLEEPING 0x2 + /* * Machine dependent boot() routine * @@ -134,13 +138,24 @@ acpi_cpu_idle_mwait(uint32_t mwait_hint) { int *state; - state = (int *)PCPU_PTR(monitorbuf); /* * XXXKIB. Software coordination mode should be supported, * but all Intel CPUs provide hardware coordination. */ + + state = (int *)PCPU_PTR(monitorbuf); + KASSERT(*state == STATE_SLEEPING, + ("cpu_mwait_cx: wrong monitorbuf state")); + *state = STATE_MWAIT; cpu_monitor(state, 0, 0); - cpu_mwait(MWAIT_INTRBREAK, mwait_hint); + if (*state == STATE_MWAIT) + cpu_mwait(MWAIT_INTRBREAK, mwait_hint); + + /* + * We should exit on any event that interrupts mwait, because + * that event might be a wanted interrupt. + */ + *state = STATE_RUNNING; } /* Get current clock frequency for the given cpu id. */ @@ -231,10 +246,6 @@ static int idle_mwait = 1; /* Use MONIT SYSCTL_INT(_machdep, OID_AUTO, idle_mwait, CTLFLAG_RWTUN, &idle_mwait, 0, "Use MONITOR/MWAIT for short idle"); -#define STATE_RUNNING 0x0 -#define STATE_MWAIT 0x1 -#define STATE_SLEEPING 0x2 - #ifndef PC98 static void cpu_idle_acpi(sbintime_t sbt) From owner-svn-src-head@FreeBSD.ORG Tue May 19 14:23:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1F0AE4E; Tue, 19 May 2015 14:23:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0AAF12A9; Tue, 19 May 2015 14:23:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JENXZW079061; Tue, 19 May 2015 14:23:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JENXQ3079060; Tue, 19 May 2015 14:23:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505191423.t4JENXQ3079060@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 19 May 2015 14:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283110 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 14:23:34 -0000 Author: emaste Date: Tue May 19 14:23:33 2015 New Revision: 283110 URL: https://svnweb.freebsd.org/changeset/base/283110 Log: Add GRP_COMDAT section group flag to ELF header Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2582 Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Tue May 19 14:21:00 2015 (r283109) +++ head/sys/sys/elf_common.h Tue May 19 14:23:33 2015 (r283110) @@ -473,6 +473,9 @@ typedef struct { #define SHF_MASKOS 0x0ff00000 /* OS-specific semantics. */ #define SHF_MASKPROC 0xf0000000 /* Processor-specific semantics. */ +/* Flags for section groups. */ +#define GRP_COMDAT 0x1 /* COMDAT semantics. */ + /* Values for p_type. */ #define PT_NULL 0 /* Unused entry. */ #define PT_LOAD 1 /* Loadable segment. */ From owner-svn-src-head@FreeBSD.ORG Tue May 19 14:49:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 761D5839; Tue, 19 May 2015 14:49:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64C841638; Tue, 19 May 2015 14:49:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JEnWJj089903; Tue, 19 May 2015 14:49:32 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JEnWTO089902; Tue, 19 May 2015 14:49:32 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201505191449.t4JEnWTO089902@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Tue, 19 May 2015 14:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283111 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 14:49:32 -0000 Author: luigi Date: Tue May 19 14:49:31 2015 New Revision: 283111 URL: https://svnweb.freebsd.org/changeset/base/283111 Log: remove an extra ; after MODULE_DEPEND (would otherwise generate a warning with more verbose compiler flags) MFC after: 1 week Modified: head/sys/netpfil/ipfw/dn_sched.h Modified: head/sys/netpfil/ipfw/dn_sched.h ============================================================================== --- head/sys/netpfil/ipfw/dn_sched.h Tue May 19 14:23:33 2015 (r283110) +++ head/sys/netpfil/ipfw/dn_sched.h Tue May 19 14:49:31 2015 (r283111) @@ -188,5 +188,5 @@ int dn_sched_modevent(module_t mod, int }; \ DECLARE_MODULE(name, name##_mod, \ SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); \ - MODULE_DEPEND(name, dummynet, 3, 3, 3); + MODULE_DEPEND(name, dummynet, 3, 3, 3) #endif /* _DN_SCHED_H */ From owner-svn-src-head@FreeBSD.ORG Tue May 19 15:25:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D88E246A; Tue, 19 May 2015 15:25:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C60F41BCB; Tue, 19 May 2015 15:25:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JFPo4C009822; Tue, 19 May 2015 15:25:50 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JFPm9e009810; Tue, 19 May 2015 15:25:48 GMT (envelope-from br@FreeBSD.org) Message-Id: <201505191525.t4JFPm9e009810@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 19 May 2015 15:25:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283112 - in head: lib/libpmc sys/arm/arm sys/arm64/arm64 sys/arm64/include sys/conf sys/dev/hwpmc sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 15:25:51 -0000 Author: br Date: Tue May 19 15:25:47 2015 New Revision: 283112 URL: https://svnweb.freebsd.org/changeset/base/283112 Log: Add Performance Monitoring Counters support for AArch64. Family-common and CPU-specific counters implemented. Supported CPUs: ARM Cortex A53/57/72. Reviewed by: andrew, bz, emaste, gnn, jhb Sponsored by: ARM Limited Differential Revision: https://reviews.freebsd.org/D2555 Added: head/sys/dev/hwpmc/hwpmc_arm64.c (contents, props changed) head/sys/dev/hwpmc/hwpmc_arm64.h (contents, props changed) head/sys/dev/hwpmc/hwpmc_arm64_md.c (contents, props changed) Modified: head/lib/libpmc/libpmc.c head/sys/arm/arm/pmu.c head/sys/arm64/arm64/intr_machdep.c head/sys/arm64/include/armreg.h head/sys/arm64/include/pmc_mdep.h head/sys/conf/files.arm64 head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Tue May 19 14:49:31 2015 (r283111) +++ head/lib/libpmc/libpmc.c Tue May 19 15:25:47 2015 (r283112) @@ -82,6 +82,10 @@ static int xscale_allocate_pmc(enum pmc_ static int armv7_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif +#if defined(__aarch64__) +static int arm64_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +#endif #if defined(__mips__) static int mips_allocate_pmc(enum pmc_event _pe, char* ctrspec, struct pmc_op_pmcallocate *_pmc_config); @@ -158,6 +162,7 @@ PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); PMC_CLASSDEP_TABLE(xscale, XSCALE); PMC_CLASSDEP_TABLE(armv7, ARMV7); +PMC_CLASSDEP_TABLE(armv8, ARMV8); PMC_CLASSDEP_TABLE(mips24k, MIPS24K); PMC_CLASSDEP_TABLE(mips74k, MIPS74K); PMC_CLASSDEP_TABLE(octeon, OCTEON); @@ -263,6 +268,16 @@ static const struct pmc_event_descr west __PMC_EV_ALIAS_WESTMEREUC() }; +static const struct pmc_event_descr cortex_a53_event_table[] = +{ + __PMC_EV_ALIAS_ARMV8_CORTEX_A53() +}; + +static const struct pmc_event_descr cortex_a57_event_table[] = +{ + __PMC_EV_ALIAS_ARMV8_CORTEX_A57() +}; + /* * PMC_MDEP_TABLE(NAME, PRIMARYCLASS, ADDITIONAL_CLASSES...) * @@ -294,6 +309,8 @@ PMC_MDEP_TABLE(p5, P5, PMC_CLASS_SOFT, P PMC_MDEP_TABLE(p6, P6, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_SOFT, PMC_CLASS_XSCALE); PMC_MDEP_TABLE(armv7, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); +PMC_MDEP_TABLE(cortex_a53, ARMV8, PMC_CLASS_SOFT, PMC_CLASS_ARMV8); +PMC_MDEP_TABLE(cortex_a57, ARMV8, PMC_CLASS_SOFT, PMC_CLASS_ARMV8); PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_SOFT, PMC_CLASS_MIPS24K); PMC_MDEP_TABLE(mips74k, MIPS74K, PMC_CLASS_SOFT, PMC_CLASS_MIPS74K); PMC_MDEP_TABLE(octeon, OCTEON, PMC_CLASS_SOFT, PMC_CLASS_OCTEON); @@ -362,6 +379,10 @@ PMC_CLASS_TABLE_DESC(xscale, XSCALE, xsc #endif PMC_CLASS_TABLE_DESC(armv7, ARMV7, armv7, armv7); #endif +#if defined(__aarch64__) +PMC_CLASS_TABLE_DESC(cortex_a53, ARMV8, cortex_a53, arm64); +PMC_CLASS_TABLE_DESC(cortex_a57, ARMV8, cortex_a57, arm64); +#endif #if defined(__mips__) PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips); PMC_CLASS_TABLE_DESC(mips74k, MIPS74K, mips74k, mips); @@ -2429,6 +2450,26 @@ armv7_allocate_pmc(enum pmc_event pe, ch } #endif +#if defined(__aarch64__) +static struct pmc_event_alias cortex_a53_aliases[] = { + EV_ALIAS(NULL, NULL) +}; +static struct pmc_event_alias cortex_a57_aliases[] = { + EV_ALIAS(NULL, NULL) +}; +static int +arm64_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, + struct pmc_op_pmcallocate *pmc_config __unused) +{ + switch (pe) { + default: + break; + } + + return (0); +} +#endif + #if defined(__mips__) static struct pmc_event_alias mips24k_aliases[] = { @@ -2938,6 +2979,19 @@ pmc_event_names_of_class(enum pmc_class ev = armv7_event_table; count = PMC_EVENT_TABLE_SIZE(armv7); break; + case PMC_CLASS_ARMV8: + switch (cpu_info.pm_cputype) { + default: + case PMC_CPU_ARMV8_CORTEX_A53: + ev = cortex_a53_event_table; + count = PMC_EVENT_TABLE_SIZE(cortex_a53); + break; + case PMC_CPU_ARMV8_CORTEX_A57: + ev = cortex_a57_event_table; + count = PMC_EVENT_TABLE_SIZE(cortex_a57); + break; + } + break; case PMC_CLASS_MIPS24K: ev = mips24k_event_table; count = PMC_EVENT_TABLE_SIZE(mips24k); @@ -3235,6 +3289,16 @@ pmc_init(void) pmc_class_table[n] = &armv7_class_table_descr; break; #endif +#if defined(__aarch64__) + case PMC_CPU_ARMV8_CORTEX_A53: + PMC_MDEP_INIT(cortex_a53); + pmc_class_table[n] = &cortex_a53_class_table_descr; + break; + case PMC_CPU_ARMV8_CORTEX_A57: + PMC_MDEP_INIT(cortex_a57); + pmc_class_table[n] = &cortex_a57_class_table_descr; + break; +#endif #if defined(__mips__) case PMC_CPU_MIPS_24K: PMC_MDEP_INIT(mips24k); @@ -3446,6 +3510,19 @@ _pmc_name_of_event(enum pmc_event pe, en } else if (pe >= PMC_EV_ARMV7_FIRST && pe <= PMC_EV_ARMV7_LAST) { ev = armv7_event_table; evfence = armv7_event_table + PMC_EVENT_TABLE_SIZE(armv7); + } else if (pe >= PMC_EV_ARMV8_FIRST && pe <= PMC_EV_ARMV8_LAST) { + switch (cpu) { + case PMC_CPU_ARMV8_CORTEX_A53: + ev = cortex_a53_event_table; + evfence = cortex_a53_event_table + PMC_EVENT_TABLE_SIZE(cortex_a53); + break; + case PMC_CPU_ARMV8_CORTEX_A57: + ev = cortex_a57_event_table; + evfence = cortex_a57_event_table + PMC_EVENT_TABLE_SIZE(cortex_a57); + break; + default: /* Unknown CPU type. */ + break; + } } else if (pe >= PMC_EV_MIPS24K_FIRST && pe <= PMC_EV_MIPS24K_LAST) { ev = mips24k_event_table; evfence = mips24k_event_table + PMC_EVENT_TABLE_SIZE(mips24k); Modified: head/sys/arm/arm/pmu.c ============================================================================== --- head/sys/arm/arm/pmu.c Tue May 19 14:49:31 2015 (r283111) +++ head/sys/arm/arm/pmu.c Tue May 19 15:25:47 2015 (r283112) @@ -58,13 +58,16 @@ __FBSDID("$FreeBSD$"); #include #include +#define MAX_RLEN 8 + struct pmu_softc { - struct resource *res[1]; + struct resource *res[MAX_RLEN]; device_t dev; - void *ih; + void *ih[MAX_RLEN]; }; static struct ofw_compat_data compat_data[] = { + {"arm,armv8-pmuv3", 1}, {"arm,cortex-a17-pmu", 1}, {"arm,cortex-a15-pmu", 1}, {"arm,cortex-a12-pmu", 1}, @@ -81,6 +84,13 @@ static struct ofw_compat_data compat_dat static struct resource_spec pmu_spec[] = { { SYS_RES_IRQ, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 1, RF_ACTIVE | RF_OPTIONAL }, + { SYS_RES_IRQ, 2, RF_ACTIVE | RF_OPTIONAL }, + { SYS_RES_IRQ, 3, RF_ACTIVE | RF_OPTIONAL }, + { SYS_RES_IRQ, 4, RF_ACTIVE | RF_OPTIONAL }, + { SYS_RES_IRQ, 5, RF_ACTIVE | RF_OPTIONAL }, + { SYS_RES_IRQ, 6, RF_ACTIVE | RF_OPTIONAL }, + { SYS_RES_IRQ, 7, RF_ACTIVE | RF_OPTIONAL }, { -1, 0 } }; @@ -119,6 +129,7 @@ pmu_attach(device_t dev) { struct pmu_softc *sc; int err; + int i; sc = device_get_softc(dev); sc->dev = dev; @@ -129,11 +140,16 @@ pmu_attach(device_t dev) } /* Setup interrupt handler */ - err = bus_setup_intr(dev, sc->res[0], INTR_MPSAFE | INTR_TYPE_MISC, - pmu_intr, NULL, NULL, &sc->ih); - if (err) { - device_printf(dev, "Unable to setup interrupt handler.\n"); - return (ENXIO); + for (i = 0; i < MAX_RLEN; i++) { + if (sc->res[i] == NULL) + break; + + err = bus_setup_intr(dev, sc->res[i], INTR_MPSAFE | INTR_TYPE_MISC, + pmu_intr, NULL, NULL, &sc->ih[i]); + if (err) { + device_printf(dev, "Unable to setup interrupt handler.\n"); + return (ENXIO); + } } return (0); Modified: head/sys/arm64/arm64/intr_machdep.c ============================================================================== --- head/sys/arm64/arm64/intr_machdep.c Tue May 19 14:49:31 2015 (r283111) +++ head/sys/arm64/arm64/intr_machdep.c Tue May 19 15:25:47 2015 (r283112) @@ -430,6 +430,10 @@ stray: if (intr != NULL) PIC_MASK(root_pic, intr->i_hw_irq); +#ifdef HWPMC_HOOKS + if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN)) + pmc_hook(PCPU_GET(curthread), PMC_FN_USER_CALLCHAIN, tf); +#endif } void Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Tue May 19 14:49:31 2015 (r283111) +++ head/sys/arm64/include/armreg.h Tue May 19 15:25:47 2015 (r283112) @@ -212,4 +212,22 @@ #define DBG_MDSCR_KDE (0x1 << 13) #define DBG_MDSCR_MDE (0x1 << 15) +/* Perfomance Monitoring Counters */ +#define PMCR_E (1 << 0) /* Enable all counters */ +#define PMCR_P (1 << 1) /* Reset all counters */ +#define PMCR_C (1 << 2) /* Clock counter reset */ +#define PMCR_D (1 << 3) /* CNTR counts every 64 clk cycles */ +#define PMCR_X (1 << 4) /* Export to ext. monitoring (ETM) */ +#define PMCR_DP (1 << 5) /* Disable CCNT if non-invasive debug*/ +#define PMCR_LC (1 << 6) /* Long cycle count enable */ +#define PMCR_IMP_SHIFT 24 /* Implementer code */ +#define PMCR_IMP_MASK (0xff << PMCR_IMP_SHIFT) +#define PMCR_IDCODE_SHIFT 16 /* Identification code */ +#define PMCR_IDCODE_MASK (0xff << PMCR_IDCODE_SHIFT) +#define PMCR_IDCODE_CORTEX_A57 0x01 +#define PMCR_IDCODE_CORTEX_A72 0x02 +#define PMCR_IDCODE_CORTEX_A53 0x03 +#define PMCR_N_SHIFT 11 /* Number of counters implemented */ +#define PMCR_N_MASK (0x1f << PMCR_N_SHIFT) + #endif /* !_MACHINE_ARMREG_H_ */ Modified: head/sys/arm64/include/pmc_mdep.h ============================================================================== --- head/sys/arm64/include/pmc_mdep.h Tue May 19 14:49:31 2015 (r283111) +++ head/sys/arm64/include/pmc_mdep.h Tue May 19 15:25:47 2015 (r283112) @@ -29,6 +29,14 @@ #ifndef _MACHINE_PMC_MDEP_H_ #define _MACHINE_PMC_MDEP_H_ +#define PMC_MDEP_CLASS_INDEX_ARMV8 1 +/* + * On the ARMv8 platform we support the following PMCs. + * + * ARMV8 ARM Cortex-A53/57/72 processors + */ +#include + union pmc_md_op_pmcallocate { uint64_t __pad[4]; }; @@ -39,12 +47,21 @@ union pmc_md_op_pmcallocate { #ifdef _KERNEL union pmc_md_pmc { + struct pmc_md_arm64_pmc pm_arm64; }; -#define PMC_TRAPFRAME_TO_PC(TF) (0) /* Stubs */ -#define PMC_TRAPFRAME_TO_FP(TF) (0) -#define PMC_TRAPFRAME_TO_SP(TF) (0) - +#define PMC_IN_KERNEL_STACK(S,START,END) \ + ((S) >= (START) && (S) < (END)) +#define PMC_IN_KERNEL(va) INKERNEL((va)) +#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) +#define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_lr) +#define PMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_x[29]) + +/* + * Prototypes + */ +struct pmc_mdep *pmc_arm64_initialize(void); +void pmc_arm64_finalize(struct pmc_mdep *_md); #endif /* _KERNEL */ #endif /* !_MACHINE_PMC_MDEP_H_ */ Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Tue May 19 14:49:31 2015 (r283111) +++ head/sys/conf/files.arm64 Tue May 19 15:25:47 2015 (r283112) @@ -1,6 +1,7 @@ # $FreeBSD$ arm/arm/devmap.c standard arm/arm/generic_timer.c standard +arm/arm/pmu.c standard arm64/arm64/autoconf.c standard arm64/arm64/bcopy.c standard arm64/arm64/bus_machdep.c standard @@ -40,6 +41,8 @@ arm64/arm64/uio_machdep.c standard arm64/arm64/vfp.c standard arm64/arm64/vm_machdep.c standard dev/fdt/fdt_arm64.c optional fdt +dev/hwpmc/hwpmc_arm64.c optional hwpmc +dev/hwpmc/hwpmc_arm64_md.c optional hwpmc dev/ofw/ofw_cpu.c optional fdt dev/psci/psci.c optional psci dev/psci/psci_arm64.S optional psci Added: head/sys/dev/hwpmc/hwpmc_arm64.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hwpmc/hwpmc_arm64.c Tue May 19 15:25:47 2015 (r283112) @@ -0,0 +1,544 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * All rights reserved. + * + * This software was developed by the University of Cambridge Computer + * Laboratory with support from ARM Ltd. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +static int arm64_npmcs; + +struct arm64_event_code_map { + enum pmc_event pe_ev; + uint8_t pe_code; +}; + +/* + * Per-processor information. + */ +struct arm64_cpu { + struct pmc_hw *pc_arm64pmcs; +}; + +static struct arm64_cpu **arm64_pcpu; + +/* + * Interrupt Enable Set Register + */ +static __inline void +arm64_interrupt_enable(uint32_t pmc) +{ + uint32_t reg; + + reg = (1 << pmc); + WRITE_SPECIALREG(PMINTENSET_EL1, reg); + + isb(); +} + +/* + * Interrupt Clear Set Register + */ +static __inline void +arm64_interrupt_disable(uint32_t pmc) +{ + uint32_t reg; + + reg = (1 << pmc); + WRITE_SPECIALREG(PMINTENCLR_EL1, reg); + + isb(); +} + +/* + * Counter Set Enable Register + */ +static __inline void +arm64_counter_enable(unsigned int pmc) +{ + uint32_t reg; + + reg = (1 << pmc); + WRITE_SPECIALREG(PMCNTENSET_EL0, reg); + + isb(); +} + +/* + * Counter Clear Enable Register + */ +static __inline void +arm64_counter_disable(unsigned int pmc) +{ + uint32_t reg; + + reg = (1 << pmc); + WRITE_SPECIALREG(PMCNTENCLR_EL0, reg); + + isb(); +} + +/* + * Performance Monitors Control Register + */ +static uint32_t +arm64_pmcr_read(void) +{ + uint32_t reg; + + reg = READ_SPECIALREG(PMCR_EL0); + + return (reg); +} + +static void +arm64_pmcr_write(uint32_t reg) +{ + + WRITE_SPECIALREG(PMCR_EL0, reg); + + isb(); +} + +/* + * Performance Count Register N + */ +static uint32_t +arm64_pmcn_read(unsigned int pmc) +{ + + KASSERT(pmc < arm64_npmcs, ("%s: illegal PMC number %d", __func__, pmc)); + + WRITE_SPECIALREG(PMSELR_EL0, pmc); + + isb(); + + return (READ_SPECIALREG(PMXEVCNTR_EL0)); +} + +static void +arm64_pmcn_write(unsigned int pmc, uint32_t reg) +{ + + KASSERT(pmc < arm64_npmcs, ("%s: illegal PMC number %d", __func__, pmc)); + + WRITE_SPECIALREG(PMSELR_EL0, pmc); + WRITE_SPECIALREG(PMXEVCNTR_EL0, reg); + + isb(); +} + +static int +arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, + const struct pmc_op_pmcallocate *a) +{ + uint32_t caps, config; + struct arm64_cpu *pac; + enum pmc_event pe; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[arm64,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < arm64_npmcs, + ("[arm64,%d] illegal row index %d", __LINE__, ri)); + + pac = arm64_pcpu[cpu]; + + caps = a->pm_caps; + if (a->pm_class != PMC_CLASS_ARMV8) { + return (EINVAL); + } + pe = a->pm_ev; + + config = (pe & EVENT_ID_MASK); + pm->pm_md.pm_arm64.pm_arm64_evsel = config; + + PMCDBG2(MDP, ALL, 2, "arm64-allocate ri=%d -> config=0x%x", ri, config); + + return 0; +} + + +static int +arm64_read_pmc(int cpu, int ri, pmc_value_t *v) +{ + pmc_value_t tmp; + struct pmc *pm; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[arm64,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < arm64_npmcs, + ("[arm64,%d] illegal row index %d", __LINE__, ri)); + + pm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc; + + tmp = arm64_pmcn_read(ri); + + PMCDBG2(MDP, REA, 2, "arm64-read id=%d -> %jd", ri, tmp); + if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + *v = ARMV8_PERFCTR_VALUE_TO_RELOAD_COUNT(tmp); + else + *v = tmp; + + return 0; +} + +static int +arm64_write_pmc(int cpu, int ri, pmc_value_t v) +{ + struct pmc *pm; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[arm64,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < arm64_npmcs, + ("[arm64,%d] illegal row-index %d", __LINE__, ri)); + + pm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc; + + if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + v = ARMV8_RELOAD_COUNT_TO_PERFCTR_VALUE(v); + + PMCDBG3(MDP, WRI, 1, "arm64-write cpu=%d ri=%d v=%jx", cpu, ri, v); + + arm64_pmcn_write(ri, v); + + return 0; +} + +static int +arm64_config_pmc(int cpu, int ri, struct pmc *pm) +{ + struct pmc_hw *phw; + + PMCDBG3(MDP, CFG, 1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[arm64,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < arm64_npmcs, + ("[arm64,%d] illegal row-index %d", __LINE__, ri)); + + phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri]; + + KASSERT(pm == NULL || phw->phw_pmc == NULL, + ("[arm64,%d] pm=%p phw->pm=%p hwpmc not unconfigured", + __LINE__, pm, phw->phw_pmc)); + + phw->phw_pmc = pm; + + return 0; +} + +static int +arm64_start_pmc(int cpu, int ri) +{ + struct pmc_hw *phw; + uint32_t config; + struct pmc *pm; + + phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri]; + pm = phw->phw_pmc; + config = pm->pm_md.pm_arm64.pm_arm64_evsel; + + /* + * Configure the event selection. + */ + WRITE_SPECIALREG(PMSELR_EL0, ri); + WRITE_SPECIALREG(PMXEVTYPER_EL0, config); + + isb(); + + /* + * Enable the PMC. + */ + arm64_interrupt_enable(ri); + arm64_counter_enable(ri); + + return 0; +} + +static int +arm64_stop_pmc(int cpu, int ri) +{ + struct pmc_hw *phw; + struct pmc *pm; + + phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri]; + pm = phw->phw_pmc; + + /* + * Disable the PMCs. + */ + arm64_counter_disable(ri); + arm64_interrupt_disable(ri); + + return 0; +} + +static int +arm64_release_pmc(int cpu, int ri, struct pmc *pmc) +{ + struct pmc_hw *phw; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[arm64,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < arm64_npmcs, + ("[arm64,%d] illegal row-index %d", __LINE__, ri)); + + phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri]; + KASSERT(phw->phw_pmc == NULL, + ("[arm64,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc)); + + return 0; +} + +static int +arm64_intr(int cpu, struct trapframe *tf) +{ + struct arm64_cpu *pc; + int retval, ri; + struct pmc *pm; + int error; + int reg; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[arm64,%d] CPU %d out of range", __LINE__, cpu)); + + retval = 0; + pc = arm64_pcpu[cpu]; + + for (ri = 0; ri < arm64_npmcs; ri++) { + pm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc; + if (pm == NULL) + continue; + if (!PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + continue; + + /* Check if counter is overflowed */ + reg = (1 << ri); + if ((READ_SPECIALREG(PMOVSCLR_EL0) & reg) == 0) + continue; + /* Clear Overflow Flag */ + WRITE_SPECIALREG(PMOVSCLR_EL0, reg); + + isb(); + + retval = 1; /* Found an interrupting PMC. */ + if (pm->pm_state != PMC_STATE_RUNNING) + continue; + + error = pmc_process_interrupt(cpu, PMC_HR, pm, tf, + TRAPF_USERMODE(tf)); + if (error) + arm64_stop_pmc(cpu, ri); + + /* Reload sampling count */ + arm64_write_pmc(cpu, ri, pm->pm_sc.pm_reloadcount); + } + + return (retval); +} + +static int +arm64_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) +{ + char arm64_name[PMC_NAME_MAX]; + struct pmc_hw *phw; + int error; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[arm64,%d], illegal CPU %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < arm64_npmcs, + ("[arm64,%d] row-index %d out of range", __LINE__, ri)); + + phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri]; + snprintf(arm64_name, sizeof(arm64_name), "ARMV8-%d", ri); + if ((error = copystr(arm64_name, pi->pm_name, PMC_NAME_MAX, + NULL)) != 0) + return (error); + pi->pm_class = PMC_CLASS_ARMV8; + if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { + pi->pm_enabled = TRUE; + *ppmc = phw->phw_pmc; + } else { + pi->pm_enabled = FALSE; + *ppmc = NULL; + } + + return (0); +} + +static int +arm64_get_config(int cpu, int ri, struct pmc **ppm) +{ + + *ppm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc; + + return (0); +} + +/* + * XXX don't know what we should do here. + */ +static int +arm64_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) +{ + + return (0); +} + +static int +arm64_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) +{ + + return (0); +} + +static int +arm64_pcpu_init(struct pmc_mdep *md, int cpu) +{ + struct arm64_cpu *pac; + struct pmc_hw *phw; + struct pmc_cpu *pc; + uint64_t pmcr; + int first_ri; + int i; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[arm64,%d] wrong cpu number %d", __LINE__, cpu)); + PMCDBG1(MDP, INI, 1, "arm64-init cpu=%d", cpu); + + arm64_pcpu[cpu] = pac = malloc(sizeof(struct arm64_cpu), M_PMC, + M_WAITOK | M_ZERO); + + pac->pc_arm64pmcs = malloc(sizeof(struct pmc_hw) * arm64_npmcs, + M_PMC, M_WAITOK | M_ZERO); + pc = pmc_pcpu[cpu]; + first_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_ARMV8].pcd_ri; + KASSERT(pc != NULL, ("[arm64,%d] NULL per-cpu pointer", __LINE__)); + + for (i = 0, phw = pac->pc_arm64pmcs; i < arm64_npmcs; i++, phw++) { + phw->phw_state = PMC_PHW_FLAG_IS_ENABLED | + PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(i); + phw->phw_pmc = NULL; + pc->pc_hwpmcs[i + first_ri] = phw; + } + + /* Enable unit */ + pmcr = arm64_pmcr_read(); + pmcr |= PMCR_E; + arm64_pmcr_write(pmcr); + + return (0); +} + +static int +arm64_pcpu_fini(struct pmc_mdep *md, int cpu) +{ + uint32_t pmcr; + + pmcr = arm64_pmcr_read(); + pmcr &= ~PMCR_E; + arm64_pmcr_write(pmcr); + + return (0); +} + +struct pmc_mdep * +pmc_arm64_initialize() +{ + struct pmc_mdep *pmc_mdep; + struct pmc_classdep *pcd; + int idcode; + int reg; + + reg = arm64_pmcr_read(); + arm64_npmcs = (reg & PMCR_N_MASK) >> PMCR_N_SHIFT; + idcode = (reg & PMCR_IDCODE_MASK) >> PMCR_IDCODE_SHIFT; + + PMCDBG1(MDP, INI, 1, "arm64-init npmcs=%d", arm64_npmcs); + + /* + * Allocate space for pointers to PMC HW descriptors and for + * the MDEP structure used by MI code. + */ + arm64_pcpu = malloc(sizeof(struct arm64_cpu *) * pmc_cpu_max(), + M_PMC, M_WAITOK | M_ZERO); + + /* Just one class */ + pmc_mdep = pmc_mdep_alloc(1); + + switch (idcode) { + case PMCR_IDCODE_CORTEX_A57: + case PMCR_IDCODE_CORTEX_A72: + pmc_mdep->pmd_cputype = PMC_CPU_ARMV8_CORTEX_A57; + break; + default: + case PMCR_IDCODE_CORTEX_A53: + pmc_mdep->pmd_cputype = PMC_CPU_ARMV8_CORTEX_A53; + break; + } + + pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_ARMV8]; + pcd->pcd_caps = ARMV8_PMC_CAPS; + pcd->pcd_class = PMC_CLASS_ARMV8; + pcd->pcd_num = arm64_npmcs; + pcd->pcd_ri = pmc_mdep->pmd_npmc; + pcd->pcd_width = 32; + + pcd->pcd_allocate_pmc = arm64_allocate_pmc; + pcd->pcd_config_pmc = arm64_config_pmc; + pcd->pcd_pcpu_fini = arm64_pcpu_fini; + pcd->pcd_pcpu_init = arm64_pcpu_init; + pcd->pcd_describe = arm64_describe; + pcd->pcd_get_config = arm64_get_config; + pcd->pcd_read_pmc = arm64_read_pmc; + pcd->pcd_release_pmc = arm64_release_pmc; + pcd->pcd_start_pmc = arm64_start_pmc; + pcd->pcd_stop_pmc = arm64_stop_pmc; + pcd->pcd_write_pmc = arm64_write_pmc; + + pmc_mdep->pmd_intr = arm64_intr; + pmc_mdep->pmd_switch_in = arm64_switch_in; + pmc_mdep->pmd_switch_out = arm64_switch_out; + + pmc_mdep->pmd_npmc += arm64_npmcs; + + return (pmc_mdep); +} + +void +pmc_arm64_finalize(struct pmc_mdep *md) +{ + +} Added: head/sys/dev/hwpmc/hwpmc_arm64.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hwpmc/hwpmc_arm64.h Tue May 19 15:25:47 2015 (r283112) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * All rights reserved. + * + * This software was developed by the University of Cambridge Computer + * Laboratory with support from ARM Ltd. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _DEV_HWPMC_ARMV8_H_ +#define _DEV_HWPMC_ARMV8_H_ + +#define ARMV8_PMC_CAPS (PMC_CAP_INTERRUPT | PMC_CAP_USER | \ + PMC_CAP_SYSTEM | PMC_CAP_EDGE | \ + PMC_CAP_THRESHOLD | PMC_CAP_READ | \ + PMC_CAP_WRITE | PMC_CAP_INVERT | \ + PMC_CAP_QUALIFIER) + +#define ARMV8_RELOAD_COUNT_TO_PERFCTR_VALUE(R) (-(R)) +#define ARMV8_PERFCTR_VALUE_TO_RELOAD_COUNT(P) (-(P)) +#define EVENT_ID_MASK 0xFF + +#ifdef _KERNEL +/* MD extension for 'struct pmc' */ +struct pmc_md_arm64_pmc { + uint32_t pm_arm64_evsel; +}; +#endif /* _KERNEL */ +#endif /* _DEV_HWPMC_ARMV8_H_ */ Added: head/sys/dev/hwpmc/hwpmc_arm64_md.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hwpmc/hwpmc_arm64_md.c Tue May 19 15:25:47 2015 (r283112) @@ -0,0 +1,154 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * All rights reserved. + * + * This software was developed by the University of Cambridge Computer + * Laboratory with support from ARM Ltd. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +struct pmc_mdep * +pmc_md_initialize() +{ + + return (pmc_arm64_initialize()); +} + +void +pmc_md_finalize(struct pmc_mdep *md) +{ + + pmc_arm64_finalize(md); +} + +int +pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, + struct trapframe *tf) +{ + uintptr_t pc, r, stackstart, stackend, fp; + struct thread *td; + int count; + + KASSERT(TRAPF_USERMODE(tf) == 0,("[arm,%d] not a kernel backtrace", + __LINE__)); + + td = curthread; + pc = PMC_TRAPFRAME_TO_PC(tf); + *cc++ = pc; + + if (maxsamples <= 1) + return (1); + + stackstart = (uintptr_t) td->td_kstack; + stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; + fp = PMC_TRAPFRAME_TO_FP(tf); + + if (!PMC_IN_KERNEL(pc) || + !PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) + return (1); + + for (count = 1; count < maxsamples; count++) { + /* Use saved lr as pc. */ + r = fp + sizeof(uintptr_t); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue May 19 15:29:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9B0E6AF; Tue, 19 May 2015 15:29:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 988D21C19; Tue, 19 May 2015 15:29:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JFT1Pw010331; Tue, 19 May 2015 15:29:01 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JFT1dE010330; Tue, 19 May 2015 15:29:01 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201505191529.t4JFT1dE010330@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Tue, 19 May 2015 15:29:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283113 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 15:29:01 -0000 Author: luigi Date: Tue May 19 15:29:00 2015 New Revision: 283113 URL: https://svnweb.freebsd.org/changeset/base/283113 Log: remove a redundant ; at the end of a function MFC after: 1 week Modified: head/sys/netpfil/ipfw/ip_dn_private.h Modified: head/sys/netpfil/ipfw/ip_dn_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_dn_private.h Tue May 19 15:25:47 2015 (r283112) +++ head/sys/netpfil/ipfw/ip_dn_private.h Tue May 19 15:29:00 2015 (r283113) @@ -92,7 +92,7 @@ set_oid(struct dn_id *o, int type, int l o->type = type; o->len = len; o->subtype = 0; -}; +} /* * configuration and global data for a dummynet instance From owner-svn-src-head@FreeBSD.ORG Tue May 19 15:43:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58F6EE13; Tue, 19 May 2015 15:43:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4801A1E4C; Tue, 19 May 2015 15:43:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JFhLdd019639; Tue, 19 May 2015 15:43:21 GMT (envelope-from bjk@FreeBSD.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JFhLYm019638; Tue, 19 May 2015 15:43:21 GMT (envelope-from bjk@FreeBSD.org) Message-Id: <201505191543.t4JFhLYm019638@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bjk set sender to bjk@FreeBSD.org using -f From: Benjamin Kaduk Date: Tue, 19 May 2015 15:43:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283114 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 15:43:21 -0000 Author: bjk (doc committer) Date: Tue May 19 15:43:20 2015 New Revision: 283114 URL: https://svnweb.freebsd.org/changeset/base/283114 Log: Fixup to the kern_psignal manpage r283105 misspelled kern_psignal as kernel_psignal in one occurrence, and added trailing whitespace. While here, change 'call' to the more standard 'function', and say why the name was changed (taken from the commit message for r225617). Modified: head/share/man/man9/psignal.9 Modified: head/share/man/man9/psignal.9 ============================================================================== --- head/share/man/man9/psignal.9 Tue May 19 15:29:00 2015 (r283113) +++ head/share/man/man9/psignal.9 Tue May 19 15:43:20 2015 (r283114) @@ -63,10 +63,11 @@ function posts signal number to the process represented by the process structure .Fa p . The -.Fn kernel_psignal -function used to be called +.Fn kern_psignal +function used to be called .Fn psignal -but was renamed. +but was renamed in order to eliminate a name collision with the libc +function of that name and facilitate code reuse. With a few exceptions noted below, the target process signal disposition is updated and is marked as runnable, so further handling of the signal is done in the context of the target process after a context switch. @@ -158,7 +159,7 @@ to the thread represented by the thread .Sh HISTORY The .Fn psignal -call was renamed to +function was renamed to .Fn kern_psignal -in +in .Fx 9.0 . From owner-svn-src-head@FreeBSD.ORG Tue May 19 15:48:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF1AFFBE; Tue, 19 May 2015 15:48:01 +0000 (UTC) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75E6D1E83; Tue, 19 May 2015 15:48:01 +0000 (UTC) Received: by wibt6 with SMTP id t6so27952677wib.0; Tue, 19 May 2015 08:48:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=tePbv5nZTZ2Igq01l4szF3zOZrhYRPjMvxnTZC+cCRI=; b=uUIdvKhB32sx6K2Bw6RkiZ+SowCHnVQ5wu/LZNpCyxTJPUCtue94suYLIYlnTdrFd5 57Pqp6FpohLVO40OJ+1W9rRc6BC8sDvAiwZgXtpM4y/hc8ZighWagjlzhWKzLX4Vybhb 9svWiq+8Rdtmv/qdhWIsDRwzfBxRpl/J+kpiuOZZ2ZRSzLU14WYq2YBeJbwdBEdJD/6c plOh6kAKtXiXX+H/9hddkvhDrf5y7wDKhFe6JfBa4o01paYFWwlpaAgwzBljoiajvZD2 HSWZWMyfkRZBK0Ay+UgEpiNdNpMdy8NqZ76pzHnk8UCCMUDITofAsa7fZtb0ufIJQYEo ffoA== MIME-Version: 1.0 X-Received: by 10.194.187.15 with SMTP id fo15mr57186857wjc.100.1432050479939; Tue, 19 May 2015 08:47:59 -0700 (PDT) Received: by 10.27.77.201 with HTTP; Tue, 19 May 2015 08:47:59 -0700 (PDT) In-Reply-To: <20150519214041.J3472@besplex.bde.org> References: <201505191133.t4JBX54w093912@svn.freebsd.org> <20150519214041.J3472@besplex.bde.org> Date: Tue, 19 May 2015 11:47:59 -0400 Message-ID: Subject: Re: svn commit: r283105 - head/share/man/man9 From: Benjamin Kaduk To: Bruce Evans Cc: Julian Elischer , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 15:48:02 -0000 On Tue, May 19, 2015 at 8:34 AM, Bruce Evans wrote: > On Tue, 19 May 2015, Julian Elischer wrote: > > Author: julian >> >> Log: >> Only several years late, catch the psignal man page up to the >> fact that psignal has been renamed to kern_psignal since 9.0. >> >> MFC after: 1 week >> > > It would be better to fix the function to match its documented name. > Whoops, I missed this prior to committing r283114. Julian, 'mandoc -Tlint share/man/man9/psignal.9' would complain about the trailing whitespace. -Ben From owner-svn-src-head@FreeBSD.ORG Tue May 19 15:58:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA10D50F for ; Tue, 19 May 2015 15:58:30 +0000 (UTC) Received: from nm26-vm0.bullet.mail.bf1.yahoo.com (nm26-vm0.bullet.mail.bf1.yahoo.com [98.139.213.74]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 881B51FC7 for ; Tue, 19 May 2015 15:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1432051108; bh=iF7+j7ysBjJWI0KzvizF25MmcRn931zgXvYLlOh4G/k=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=FbNMSKSBnkCpFSzw763ZfCjGtPnkZmigoo5BqHw90yJvWfbrREOBPiawheNpoaG59/nnQIO8jIRTBt3EnRieRfGOVrNKtqGvXBcSt8E/t38sJk23PEoeQ9WkUtJY+L7DmgJ17DpGqU3uaPWXl5qpnP0SZ4Z3XzBQBPWhyFva5lFS86TlrPSNOTRWa3F8Hr9o9wkdAOyhzb77pB9qhOPYIEaJ9sBS1c9VkubPgJfbxrgpoGBxokqq7A1j2ZHQgI5jK0fD0NAaLOPZ00T8YHTw/JvzXch278+rQCuQMhJeny5UPYRaY1hdOoOkJ/Ho+UqnElc9IJ8Z7SlVNp+ds7a49g== Received: from [98.139.215.141] by nm26.bullet.mail.bf1.yahoo.com with NNFMP; 19 May 2015 15:58:28 -0000 Received: from [98.139.213.15] by tm12.bullet.mail.bf1.yahoo.com with NNFMP; 19 May 2015 15:58:28 -0000 Received: from [127.0.0.1] by smtp115.mail.bf1.yahoo.com with NNFMP; 19 May 2015 15:58:28 -0000 X-Yahoo-Newman-Id: 238177.23413.bm@smtp115.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: N.R5LiUVM1lIJZ.3fWGZ8gZpRLzPVHGjv6eRCK4sxuAMDDE SBtMO2oOte4sdUB.y5MDb7QzEtAoQEUmRiRLdLBffb6eSLKDJMlbkYLjizNw x9.0q7Fg3SgcsI14lGB5nMSkRQ0yIttVLknIh20.hESUB_vvWbQrzzQsCyon 3J.F_KPGifXdz6g8J1qgDGO0TzSj6J7mIHoziqqwev_zyrFIiTf.Wr3aazrA _1vjblFWCxyOPlFIkojnVgepb5wDk7DejCOfw97wqB9gg.Tc8eTS4l8Q01X4 rvAfCpHr_NS_Q70frgwkzWsCfF0uk3GSfNw3eQk4WgigactVn2ikPMQo9Sho tPkAIsCbVQPVlO3ImUKAEsanvbhXjnLDQyv3NlHCOVIuCzj5Dqpi71x_9KpX 2j5LQOlndsl8N3zMGrpRxg9FcMuDGSlk5nXBGDA4BWL5oeCEPNUOhbv5qKma JnAEdGaQYvV2uHtsb96Zi0YQNxNoNSZeDQhRHFYzPVPB4tzDms9RpwmTFOzp j.yBJFd2DvavaK.yti2B0DDCpHEUbvFxy X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <555B5DA7.5000207@FreeBSD.org> Date: Tue, 19 May 2015 10:58:31 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: John Baldwin CC: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283088 - head/sys/ddb References: <201505182227.t4IMRljx078812@svn.freebsd.org> <20150519135341.R2157@besplex.bde.org> <2053555.dpIzi23R03@ralph.baldwin.cx> In-Reply-To: <2053555.dpIzi23R03@ralph.baldwin.cx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 15:58:30 -0000 On 05/19/15 08:45, John Baldwin wrote: > On Tuesday, May 19, 2015 12:28:05 AM Pedro Giffuni wrote: >>>>>> Modified: head/sys/ddb/db_break.c >>>>>> ============================================================================== >>>>>> --- head/sys/ddb/db_break.c Mon May 18 22:14:06 2015 (r283087) >>>>>> +++ head/sys/ddb/db_break.c Mon May 18 22:27:46 2015 (r283088) >>>>>> @@ -155,12 +155,12 @@ db_find_breakpoint_here(db_addr_t addr) >>>>>> return db_find_breakpoint(db_map_addr(addr), addr); >>>>>> } >>>>>> >>>>>> -static boolean_t db_breakpoints_inserted = TRUE; >>>>>> +static boolean_t db_breakpoints_inserted = true; >>>>> This code hasn't been churned to use the boolean type. It still uses >>>>> boolean_t, which is plain int. TRUE and FALSE go with this type. true >>>>> and false go with the boolean type. This probably makes no difference, >>>>> because TRUE happens to be implemented with the same value as true and >>>>> there are lots of implicit versions between the types. >>>> Yes, I noticed the return types are still ints. It doesn’t look difficult >>>> to convert it to use a real boolean type. In any case, I would prefer to go >>>> forward (using bool) instead of reverting this change. >>> That wuld be sideways. >>> >>> I forgot to mention (again) in my previous reply that boolean_t is a mistake >>> by me. KNF code doesn't even use the ! operator, but uses explicit >>> comparison with 0. The boolean_t type and TRUE and FALSE are from Mach. >>> They were used mainly in ddb and vm, and are still almost never used in >>> kern. I used to like typedefs and a typedef for boolean types, and didn't >>> know KNF very well, so in 1995 I moved the declaration of boolean_t from >>> Mach vm code to sys/types.h to try to popularize it. This was a mistake. >>> Fortunately, it is still rarely used in core kernel code. >>> >>> The boolean type is also almost never used for syscalls. In POSIX.1-2001, >>> is inherited from C99, but is never used for any other POSIX >>> API. Using it for syscalls would mainly cause portability problems. >>> >> OK, I do understand the kernel wants to keep the C dialect somewhat limited, >> and adding stdbool.h doesn’t buy us any type safety here. >> >> I’ll revert the change (prob. tomorrow though). > I will disagree with Bruce a bit and put my vote in for replacing boolean_t > with bool where it is used. I do think that logically (if not strictly) your > commit is a type mismatch as TRUE/FALSE is for boolean_t and true/false are > for bool. I agree with Bruce that we probably don't want to use bool for > system calls. However, I think using bool in the kernel itself is ok and that > we should replace boolean_t with bool. > I guess it boils down to the dilemma between modernity and common practice. OK, I know the current change can't stay as-is, and even Bruce admits that boolean_t is a mistake, so I think I will give the bool a try. Thanks for the feedback! Pedro. From owner-svn-src-head@FreeBSD.ORG Tue May 19 16:23:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAE99F28; Tue, 19 May 2015 16:23:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA3961351; Tue, 19 May 2015 16:23:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JGNlri039558; Tue, 19 May 2015 16:23:47 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JGNllP039557; Tue, 19 May 2015 16:23:47 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201505191623.t4JGNllP039557@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 19 May 2015 16:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283115 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 16:23:48 -0000 Author: asomers Date: Tue May 19 16:23:47 2015 New Revision: 283115 URL: https://svnweb.freebsd.org/changeset/base/283115 Log: Properly null-terminate strings in a kernel dump header. A version string longer than 192 bytes will cause the version field of a dump header to overflow. strncpy doesn't null terminate it, so savecore will print a corrupted info file. Using strlcpy fixes the bug. Differential Revision: https://reviews.freebsd.org/D2560 Reviewed by: markj MFC after: 3 weeks Sponsored by: Spectra Logic Modified: head/sys/kern/kern_shutdown.c Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Tue May 19 15:43:20 2015 (r283114) +++ head/sys/kern/kern_shutdown.c Tue May 19 16:23:47 2015 (r283115) @@ -873,16 +873,16 @@ mkdumpheader(struct kerneldumpheader *kd { bzero(kdh, sizeof(*kdh)); - strncpy(kdh->magic, magic, sizeof(kdh->magic)); - strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); + strlcpy(kdh->magic, magic, sizeof(kdh->magic)); + strlcpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); kdh->version = htod32(KERNELDUMPVERSION); kdh->architectureversion = htod32(archver); kdh->dumplength = htod64(dumplen); kdh->dumptime = htod64(time_second); kdh->blocksize = htod32(blksz); - strncpy(kdh->hostname, prison0.pr_hostname, sizeof(kdh->hostname)); - strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); + strlcpy(kdh->hostname, prison0.pr_hostname, sizeof(kdh->hostname)); + strlcpy(kdh->versionstring, version, sizeof(kdh->versionstring)); if (panicstr != NULL) - strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); + strlcpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); kdh->parity = kerneldump_parity(kdh); } From owner-svn-src-head@FreeBSD.ORG Tue May 19 16:51:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C9107F4; Tue, 19 May 2015 16:51:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B6F71703; Tue, 19 May 2015 16:51:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JGpVMr052040; Tue, 19 May 2015 16:51:31 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JGpU9r052037; Tue, 19 May 2015 16:51:30 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201505191651.t4JGpU9r052037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Tue, 19 May 2015 16:51:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283116 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 16:51:31 -0000 Author: luigi Date: Tue May 19 16:51:30 2015 New Revision: 283116 URL: https://svnweb.freebsd.org/changeset/base/283116 Log: use proper types to represent function pointers Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Tue May 19 16:23:47 2015 (r283115) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Tue May 19 16:51:30 2015 (r283116) @@ -505,7 +505,7 @@ static int ipfw_hook(int onoff, int pf) { struct pfil_head *pfh; - void *hook_func; + pfil_func_t hook_func; pfh = pfil_head_get(PFIL_TYPE_AF, pf); if (pfh == NULL) Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue May 19 16:23:47 2015 (r283115) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue May 19 16:51:30 2015 (r283116) @@ -2846,7 +2846,7 @@ compare_sh(const void *_a, const void *_ * Returns pointer to handler or NULL. */ static struct ipfw_sopt_handler * -find_sh(uint16_t code, uint8_t version, void *handler) +find_sh(uint16_t code, uint8_t version, sopt_handler_f *handler) { struct ipfw_sopt_handler *sh, h; From owner-svn-src-head@FreeBSD.ORG Tue May 19 17:14:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C643ADC; Tue, 19 May 2015 17:14:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B55AA19F8; Tue, 19 May 2015 17:14:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JHESsB064873; Tue, 19 May 2015 17:14:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JHESLC064872; Tue, 19 May 2015 17:14:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505191714.t4JHESLC064872@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 19 May 2015 17:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283117 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 17:14:28 -0000 Author: ae Date: Tue May 19 17:14:27 2015 New Revision: 283117 URL: https://svnweb.freebsd.org/changeset/base/283117 Log: Remove unneded mbuf length adjustment, M_PREPEND() already did that. PR: 139387 MFC after: 1 week Modified: head/sys/netipsec/keysock.c Modified: head/sys/netipsec/keysock.c ============================================================================== --- head/sys/netipsec/keysock.c Tue May 19 16:51:30 2015 (r283116) +++ head/sys/netipsec/keysock.c Tue May 19 17:14:27 2015 (r283117) @@ -149,8 +149,6 @@ key_sendup0(struct rawcb *rp, struct mbu PFKEYSTAT_INC(in_nomem); return (ENOBUFS); } - m->m_pkthdr.len += sizeof(*pmsg); /* XXX: is this correct? */ - pmsg = mtod(m, struct sadb_msg *); bzero(pmsg, sizeof(*pmsg)); pmsg->sadb_msg_version = PF_KEY_V2; From owner-svn-src-head@FreeBSD.ORG Tue May 19 17:36:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFB98A2A; Tue, 19 May 2015 17:36:35 +0000 (UTC) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A76E1CAD; Tue, 19 May 2015 17:36:35 +0000 (UTC) Received: by igbpi8 with SMTP id pi8so112610997igb.0; Tue, 19 May 2015 10:36:35 -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:message-id:subject :from:to:cc:content-type; bh=RZJTI4dIfSNUTOUzxy9rF8wpFM6KHp3QjDBT04FimfY=; b=KCZzGRUg4ic0pnHiRLXsHDHEAB299u979WvoIraeplKZEg8bKzz/09JzPD6uGIDs0i LgxEKQcXIjXo++3t+zDSQ1VGweweCbhVxUtwR5Xc0bjSR7p1JTYcwdvv6vTbYgkismaV moxKZN+tJu430tqn2eSgX8M4SYEx6pO6iwsMtq7WZtYPag21Crm5AXqp68tae4BIwzyQ pjQCz013HE9nq2Ugdez5IDG9pf7zXdacwhjHvBmsyJysu35GafN5zyfHQBv/LSXRsmAI Vhe7OThy7keNz3R8jZY94sxd4FFzeO3AHVITSJnyK19hCCatgZkejS6eoZZZ9RAkP2nD p/cg== MIME-Version: 1.0 X-Received: by 10.50.114.9 with SMTP id jc9mr8552514igb.49.1432056994971; Tue, 19 May 2015 10:36:34 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Tue, 19 May 2015 10:36:34 -0700 (PDT) In-Reply-To: <201505190928.t4J9Sq4M030475@svn.freebsd.org> References: <201505190928.t4J9Sq4M030475@svn.freebsd.org> Date: Tue, 19 May 2015 10:36:34 -0700 X-Google-Sender-Auth: fbCAB7m7dN0IFRCMvv04_N2VB_I Message-ID: Subject: Re: svn commit: r283104 - head/sys/geom/uncompress From: Adrian Chadd To: "Andrey V. Elsukov" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 17:36:35 -0000 Hi, How big are the images you were using? Did you try on the smaller footprint boards (eg things with < 128MB RAM) to see if it changed behaviour? -a On 19 May 2015 at 02:28, Andrey V. Elsukov wrote: > Author: ae > Date: Tue May 19 09:28:52 2015 > New Revision: 283104 > URL: https://svnweb.freebsd.org/changeset/base/283104 > > Log: > Read GEOM_UNCOMPRESS metadata using several requests that fit into > MAXPHYS. For large compressed images the metadata size can be bigger > than MAXPHYS and this triggers KASSERT in g_read_data(). > Also use g_free() to free memory allocated by g_read_data(). > > PR: 199476 > MFC after: 2 weeks > > Modified: > head/sys/geom/uncompress/g_uncompress.c > > Modified: head/sys/geom/uncompress/g_uncompress.c > ============================================================================== > --- head/sys/geom/uncompress/g_uncompress.c Tue May 19 09:22:06 2015 (r283103) > +++ head/sys/geom/uncompress/g_uncompress.c Tue May 19 09:28:52 2015 (r283104) > @@ -464,7 +464,8 @@ g_uncompress_taste(struct g_class *mp, s > struct g_provider *pp2; > struct g_consumer *cp; > struct g_geom *gp; > - uint32_t i, total_offsets, type; > + uint64_t *offsets; > + uint32_t i, r, total, total_offsets, type; > uint8_t *buf; > int error; > > @@ -499,8 +500,8 @@ g_uncompress_taste(struct g_class *mp, s > */ > DPRINTF(("%s: media sectorsize %u, mediasize %jd\n", > gp->name, pp->sectorsize, (intmax_t)pp->mediasize)); > - i = roundup(sizeof(struct cloop_header), pp->sectorsize); > - buf = g_read_data(cp, 0, i, NULL); > + total = roundup(sizeof(struct cloop_header), pp->sectorsize); > + buf = g_read_data(cp, 0, total, NULL); > if (buf == NULL) > goto err; > header = (struct cloop_header *) buf; > @@ -557,20 +558,29 @@ g_uncompress_taste(struct g_class *mp, s > gp->name, sc->nblocks); > goto err; > } > - free(buf, M_GEOM); > + g_free(buf); > > - i = roundup((sizeof(struct cloop_header) + > - total_offsets * sizeof(uint64_t)), pp->sectorsize); > - buf = g_read_data(cp, 0, i, NULL); > - if (buf == NULL) > - goto err; > sc->offsets = malloc(total_offsets * sizeof(uint64_t), > - M_GEOM_UNCOMPRESS, M_WAITOK); > - for (i = 0; i <= total_offsets; i++) { > - sc->offsets[i] = be64toh(((uint64_t *) > - (buf+sizeof(struct cloop_header)))[i]); > + M_GEOM_UNCOMPRESS, M_WAITOK | M_ZERO); > + total = roundup((sizeof(struct cloop_header) + > + total_offsets * sizeof(uint64_t)), pp->sectorsize); > +#define RSZ ((total - r) > MAXPHYS ? MAXPHYS: (total - r)) > + for (r = 0, i = 0; r < total; r += MAXPHYS) { > + buf = g_read_data(cp, r, RSZ, &error); > + if (buf == NULL) { > + free(sc->offsets, M_GEOM_UNCOMPRESS); > + goto err; > + } > + offsets = (uint64_t *)buf; > + if (r == 0) > + offsets += > + sizeof(struct cloop_header) / sizeof(uint64_t); > + for (; i < total_offsets && offsets < (uint64_t *)(buf + RSZ); > + i++, offsets++) > + sc->offsets[i] = be64toh(*offsets); > + g_free(buf); > } > - free(buf, M_GEOM); > +#undef RSZ > buf = NULL; > DPRINTF(("%s: done reading offsets\n", gp->name)); > mtx_init(&sc->last_mtx, "geom_uncompress cache", NULL, MTX_DEF); > @@ -619,7 +629,7 @@ err: > g_topology_lock(); > g_access(cp, -1, 0, 0); > if (buf != NULL) > - free(buf, M_GEOM); > + g_free(buf); > if (gp->softc != NULL) { > g_uncompress_softc_free(gp->softc, NULL); > gp->softc = NULL; > From owner-svn-src-head@FreeBSD.ORG Tue May 19 17:53:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12C00F4F; Tue, 19 May 2015 17:53:07 +0000 (UTC) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id 60CA8261E; Tue, 19 May 2015 17:53:02 +0000 (UTC) Message-ID: <555B7804.3090907@FreeBSD.org> Date: Tue, 19 May 2015 20:51:00 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Adrian Chadd CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r283104 - head/sys/geom/uncompress References: <201505190928.t4J9Sq4M030475@svn.freebsd.org> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eRxJpGLOrGKxkefUwtxVI7twXWcgcGlHG" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 17:53:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eRxJpGLOrGKxkefUwtxVI7twXWcgcGlHG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 19.05.2015 20:36, Adrian Chadd wrote: > Hi, >=20 > How big are the images you were using? > Did you try on the smaller footprint boards (eg things with < 128MB > RAM) to see if it changed behaviour? I tried several images with size from 700k to 2G. Something doesn't work for you? It isn't clear from the code, why it used "i <=3D total_offsets" when it filled sc->offsets, it looks like a bug for me. --=20 WBR, Andrey V. Elsukov --eRxJpGLOrGKxkefUwtxVI7twXWcgcGlHG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVW3gEAAoJEAHF6gQQyKF6icwIAIYVVgKKT2dpUrGWwYnVoZH8 bCrwJCHQ1KhIxnPzR23iSjlCPg9LxIrLXLjAcYdOegfrYD4ZkekqPFviOEnKtSg0 zFOLJ65TvfarzgUAvMNbYH5tfo+8pzaK8x44SJl9oFYmP0WnjlcdLjy9Eafg9zBx 8AGT1IiryI3BDT01cvG7jaGFN9+JDmCi9XOJkG7sCuabLfaT4o4+fNlwQAnU7Q0z vpVcVMXPJjDgGfDW44Fv0RrnKTKNeqdSWkgKvnP66aUJuakAlXXXGKwF3Ud5DB9d 72KZDdmhW5If+1m6GVBcSFlV6HOqy18G5lbLqoO/DUmSPAyz0zNp+nEGoTpSdbw= =6AwN -----END PGP SIGNATURE----- --eRxJpGLOrGKxkefUwtxVI7twXWcgcGlHG-- From owner-svn-src-head@FreeBSD.ORG Tue May 19 17:57:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D04CB23E; Tue, 19 May 2015 17:57:00 +0000 (UTC) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id BCADB28AE; Tue, 19 May 2015 17:56:59 +0000 (UTC) Message-ID: <555B78F1.5010501@FreeBSD.org> Date: Tue, 19 May 2015 20:54:57 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Adrian Chadd CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r283104 - head/sys/geom/uncompress References: <201505190928.t4J9Sq4M030475@svn.freebsd.org> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SQ6MhKPQX8GLEwMr58hKdwbqcK3lEa0tU" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 17:57:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SQ6MhKPQX8GLEwMr58hKdwbqcK3lEa0tU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 19.05.2015 20:36, Adrian Chadd wrote: > Did you try on the smaller footprint boards (eg things with < 128MB > RAM) to see if it changed behaviour? No, I have no such boards. This is taste method and it called only once, so I don't expect some changes here. For small images it just will work as before. --=20 WBR, Andrey V. Elsukov --SQ6MhKPQX8GLEwMr58hKdwbqcK3lEa0tU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVW3jxAAoJEAHF6gQQyKF6OXkIAIhw5qqKfkyw29EkPe6ghjqW xXQpZJRp4t32XR3Fk+kJqwSmXD4OhUpo2rZAfZFJyda4GhMjXs0pPlzE/bmfe6GA kAtFbAPDKBmeN/t8i4eN7ZGDp2weMpr4F3qTOBHcbgq+d50sD0nGmSQS88gE9YyB 6Z2AVW62hppB4VWwxTZhGUg9Kho3KiMcbL/hJN9Hd7oUh0ZInVND0KdHI3fRyBb6 9UeWNMdOCdiX7wshXcUubXlwhVEpMOPTaIx0Pv7IT6coDdZP/wexrsz1FGaiJnk+ CliwyjoDwgNVmmwWcpkcjWWO87k6vg9RJfEm0/B4EYCzPUUzcPr7B1new4vcuPM= =gDpa -----END PGP SIGNATURE----- --SQ6MhKPQX8GLEwMr58hKdwbqcK3lEa0tU-- From owner-svn-src-head@FreeBSD.ORG Tue May 19 18:29:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4488D7C2; Tue, 19 May 2015 18:29:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3238B1250; Tue, 19 May 2015 18:29:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JITEsn001069; Tue, 19 May 2015 18:29:14 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JITEWl001068; Tue, 19 May 2015 18:29:14 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201505191829.t4JITEWl001068@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Tue, 19 May 2015 18:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283118 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 18:29:14 -0000 Author: melifaro Date: Tue May 19 18:29:13 2015 New Revision: 283118 URL: https://svnweb.freebsd.org/changeset/base/283118 Log: Bring back support for checking tables via "ipfw -n". Currently we have different table key types which can easily interfere with each other (numbers and IPv4 address, interface names and hostnames, flows and hostnames/addresses). This conflicts are solved by [auto-]creating _typed_ tables, so after table is created, only keys of given type can be inserted to that table. ipfw(8) consults with kernel about key/value type for particular table so it knows key/value interpretation. However, we have 2 cases (adding entries to non-existing table and parsing configuration file via `ipfw -n`) when kernel is unable to provide us table info we need. Fix the latter case by partially importing old `table_fill_xentry()` parse function responsible for guessing key type. Sponsored by: Yandex LLC Modified: head/sbin/ipfw/tables.c Modified: head/sbin/ipfw/tables.c ============================================================================== --- head/sbin/ipfw/tables.c Tue May 19 17:14:27 2015 (r283117) +++ head/sbin/ipfw/tables.c Tue May 19 18:29:13 2015 (r283118) @@ -1310,6 +1310,63 @@ tentry_fill_key_type(char *arg, ipfw_obj tentry->masklen = masklen; } +/* + * Tries to guess table key type. + * This procedure is used in legacy table auto-create + * code AND in `ipfw -n` ruleset checking. + * + * Imported from old table_fill_xentry() parse code. + */ +static int +guess_key_type(char *key, uint8_t *ptype) +{ + char *p; + struct in6_addr addr; + uint32_t kv; + + if (ishexnumber(*key) != 0 || *key == ':') { + /* Remove / if exists */ + if ((p = strchr(key, '/')) != NULL) + *p = '\0'; + + if ((inet_pton(AF_INET, key, &addr) == 1) || + (inet_pton(AF_INET6, key, &addr) == 1)) { + *ptype = IPFW_TABLE_CIDR; + if (p != NULL) + *p = '/'; + return (0); + } else { + /* Port or any other key */ + /* Skip non-base 10 entries like 'fa1' */ + kv = strtol(key, &p, 10); + if (*p == '\0') { + *ptype = IPFW_TABLE_NUMBER; + return (0); + } else if ((p != key) && (*p == '.')) { + /* + * Warn on IPv4 address strings + * which are "valid" for inet_aton() but not + * in inet_pton(). + * + * Typical examples: '10.5' or '10.0.0.05' + */ + return (1); + } + } + } + + if (strchr(key, '.') == NULL) { + *ptype = IPFW_TABLE_INTERFACE; + return (0); + } + + if (lookup_host(key, (struct in_addr *)&addr) != 0) + return (1); + + *ptype = IPFW_TABLE_CIDR; + return (0); +} + static void tentry_fill_key(ipfw_obj_header *oh, ipfw_obj_tentry *tent, char *key, int add, uint8_t *ptype, uint32_t *pvmask, ipfw_xtable_info *xi) @@ -1317,7 +1374,6 @@ tentry_fill_key(ipfw_obj_header *oh, ipf uint8_t type, tflags; uint32_t vmask; int error; - char *del; type = 0; tflags = 0; @@ -1329,10 +1385,24 @@ tentry_fill_key(ipfw_obj_header *oh, ipf error = 0; if (error == 0) { - /* Table found. */ - type = xi->type; - tflags = xi->tflags; - vmask = xi->vmask; + if (co.test_only == 0) { + /* Table found */ + type = xi->type; + tflags = xi->tflags; + vmask = xi->vmask; + } else { + /* + * we're running `ipfw -n` + * Compability layer: try to guess key type + * before failing. + */ + if (guess_key_type(key, &type) != 0) { + /* Inknown key */ + errx(EX_USAGE, "Cannot guess " + "key '%s' type", key); + } + vmask = IPFW_VTYPE_LEGACY; + } } else { if (error != ESRCH) errx(EX_OSERR, "Error requesting table %s info", @@ -1341,24 +1411,16 @@ tentry_fill_key(ipfw_obj_header *oh, ipf errx(EX_DATAERR, "Table %s does not exist", oh->ntlv.name); /* - * Table does not exist. - * Compability layer: try to interpret data as ADDR - * before failing. + * Table does not exist + * Compability layer: try to guess key type before failing. */ - if ((del = strchr(key, '/')) != NULL) - *del = '\0'; - if (inet_pton(AF_INET, key, &tent->k.addr6) == 1 || - inet_pton(AF_INET6, key, &tent->k.addr6) == 1) { - /* OK Prepare and send */ - type = IPFW_TABLE_ADDR; - vmask = IPFW_VTYPE_LEGACY; - } else { + if (guess_key_type(key, &type) != 0) { /* Inknown key */ errx(EX_USAGE, "Table %s does not exist, cannot guess " "key '%s' type", oh->ntlv.name, key); } - if (del != NULL) - *del = '/'; + + vmask = IPFW_VTYPE_LEGACY; } tentry_fill_key_type(key, tent, type, tflags); From owner-svn-src-head@FreeBSD.ORG Tue May 19 18:35:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D406A6C; Tue, 19 May 2015 18:35:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BBB71334; Tue, 19 May 2015 18:35:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JIZIx1005743; Tue, 19 May 2015 18:35:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JIZIN3005742; Tue, 19 May 2015 18:35:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505191835.t4JIZIN3005742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 19 May 2015 18:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283119 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 18:35:19 -0000 Author: jhb Date: Tue May 19 18:35:18 2015 New Revision: 283119 URL: https://svnweb.freebsd.org/changeset/base/283119 Log: Remove executable property from several ixl(4) source files. Differential Revision: https://reviews.freebsd.org/D2583 Reviewed by: erj Modified: Directory Properties: head/sys/dev/ixl/i40e_adminq.c (props changed) head/sys/dev/ixl/i40e_adminq.h (props changed) head/sys/dev/ixl/i40e_adminq_cmd.h (props changed) head/sys/dev/ixl/i40e_alloc.h (props changed) head/sys/dev/ixl/i40e_common.c (props changed) head/sys/dev/ixl/i40e_hmc.c (props changed) head/sys/dev/ixl/i40e_hmc.h (props changed) head/sys/dev/ixl/i40e_lan_hmc.c (props changed) head/sys/dev/ixl/i40e_lan_hmc.h (props changed) head/sys/dev/ixl/i40e_nvm.c (props changed) head/sys/dev/ixl/i40e_osdep.c (props changed) head/sys/dev/ixl/i40e_osdep.h (props changed) head/sys/dev/ixl/i40e_prototype.h (props changed) head/sys/dev/ixl/i40e_register.h (props changed) head/sys/dev/ixl/i40e_status.h (props changed) head/sys/dev/ixl/i40e_type.h (props changed) head/sys/dev/ixl/i40e_virtchnl.h (props changed) head/sys/dev/ixl/if_ixl.c (props changed) head/sys/dev/ixl/ixl_txrx.c (props changed) From owner-svn-src-head@FreeBSD.ORG Tue May 19 18:48:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC39B1F8; Tue, 19 May 2015 18:48:18 +0000 (UTC) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 852A91504; Tue, 19 May 2015 18:48:18 +0000 (UTC) Received: by igbyr2 with SMTP id yr2so83653628igb.0; Tue, 19 May 2015 11:48:17 -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:message-id:subject :from:to:cc:content-type; bh=KtNZXYU0pM0s+091iXiGfS5b7H9wLyOWoRIz03CNA4A=; b=nc4HcGWoKeFSlTFaqzbXUmv2YZcadH1ZG7L/z6FM4aJV2V9IYLBpyC8XmWCatOapw+ v31jhLPF2iiryhZlqZfJvnyyPXHJB2u/TIzOMqgYxHOMCDBULZq21dPTg+mxuKv2F9E+ 7cvhV4RKeRx+YATMx1RVnLg1+nS/3r6Mi/0cSc3a/t1UTOnFDNeUJmpbXl77hZwtIoyZ uFlYijx2B69NG7EzC6VjrYfEqkgYT/GPTLuEEq8HPwFnH1sPKADj2pxy050xL5oYyQUu SLg1HKZSAxwpR3m6oajntEKTs3Sk/oUr7/t51TaoDWyHBtOts5LDtaldH45a2QFCXa8f 64qw== MIME-Version: 1.0 X-Received: by 10.50.79.232 with SMTP id m8mr23100669igx.6.1432061297842; Tue, 19 May 2015 11:48:17 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Tue, 19 May 2015 11:48:17 -0700 (PDT) In-Reply-To: <555B78F1.5010501@FreeBSD.org> References: <201505190928.t4J9Sq4M030475@svn.freebsd.org> <555B78F1.5010501@FreeBSD.org> Date: Tue, 19 May 2015 11:48:17 -0700 X-Google-Sender-Auth: UEiVm3xxTLzNHJCbbvJ4Rx5BvlY Message-ID: Subject: Re: svn commit: r283104 - head/sys/geom/uncompress From: Adrian Chadd To: "Andrey V. Elsukov" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 18:48:18 -0000 Sweet, just checking. Thanks for finding this! -a From owner-svn-src-head@FreeBSD.ORG Tue May 19 18:58:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 140B96A6; Tue, 19 May 2015 18:58:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E76A2166E; Tue, 19 May 2015 18:58:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JIwJQt016664; Tue, 19 May 2015 18:58:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JIwJft016661; Tue, 19 May 2015 18:58:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505191858.t4JIwJft016661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 19 May 2015 18:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283120 - in head: lib/libpmc sys/dev/hwpmc sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 18:58:20 -0000 Author: jhb Date: Tue May 19 18:58:18 2015 New Revision: 283120 URL: https://svnweb.freebsd.org/changeset/base/283120 Log: Use fixed enum values for PMC_CLASSES(). This removes one of the frequent causes of ABI breakage when new CPU types are added to hwpmc(4). Differential Revision: https://reviews.freebsd.org/D2586 Reviewed by: davide, emaste, gnn (earlier version) MFC after: 2 weeks Modified: head/lib/libpmc/libpmc.c head/sys/dev/hwpmc/hwpmc_mod.c head/sys/sys/pmc.h Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Tue May 19 18:35:18 2015 (r283119) +++ head/lib/libpmc/libpmc.c Tue May 19 18:58:18 2015 (r283120) @@ -423,9 +423,14 @@ static const char * pmc_capability_names __PMC_CAPS() }; -static const char * pmc_class_names[] = { +struct pmc_class_map { + enum pmc_class pm_class; + const char *pm_name; +}; + +static const struct pmc_class_map pmc_class_names[] = { #undef __PMC_CLASS -#define __PMC_CLASS(C) #C , +#define __PMC_CLASS(S,V,D) { .pm_class = PMC_CLASS_##S, .pm_name = #S } , __PMC_CLASSES() }; @@ -3362,9 +3367,11 @@ pmc_name_of_capability(enum pmc_caps cap const char * pmc_name_of_class(enum pmc_class pc) { - if ((int) pc >= PMC_CLASS_FIRST && - pc <= PMC_CLASS_LAST) - return (pmc_class_names[pc]); + size_t n; + + for (n = 0; n < PMC_TABLE_SIZE(pmc_class_names); n++) + if (pc == pmc_class_names[n].pm_class) + return (pmc_class_names[n].pm_name); errno = EINVAL; return (NULL); Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Tue May 19 18:35:18 2015 (r283119) +++ head/sys/dev/hwpmc/hwpmc_mod.c Tue May 19 18:58:18 2015 (r283120) @@ -4625,12 +4625,20 @@ pmc_kld_unload(void *arg __unused, const /* * initialization */ +static const char * +pmc_name_of_pmcclass(enum pmc_class class) +{ -static const char *pmc_name_of_pmcclass[] = { + switch (class) { #undef __PMC_CLASS -#define __PMC_CLASS(N) #N , - __PMC_CLASSES() -}; +#define __PMC_CLASS(S,V,D) \ + case PMC_CLASS_##S: \ + return #S; + __PMC_CLASSES(); + default: + return (""); + } +} /* * Base class initializer: allocate structure and set default classes. @@ -4909,7 +4917,7 @@ pmc_initialize(void) for (n = 0; n < (int) md->pmd_nclass; n++) { pcd = &md->pmd_classdep[n]; printf(" %s/%d/%d/0x%b", - pmc_name_of_pmcclass[pcd->pcd_class], + pmc_name_of_pmcclass(pcd->pcd_class), pcd->pcd_num, pcd->pcd_width, pcd->pcd_caps, Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Tue May 19 18:35:18 2015 (r283119) +++ head/sys/sys/pmc.h Tue May 19 18:58:18 2015 (r283120) @@ -123,30 +123,30 @@ enum pmc_cputype { */ #define __PMC_CLASSES() \ - __PMC_CLASS(TSC) /* CPU Timestamp counter */ \ - __PMC_CLASS(K7) /* AMD K7 performance counters */ \ - __PMC_CLASS(K8) /* AMD K8 performance counters */ \ - __PMC_CLASS(P5) /* Intel Pentium counters */ \ - __PMC_CLASS(P6) /* Intel Pentium Pro counters */ \ - __PMC_CLASS(P4) /* Intel Pentium-IV counters */ \ - __PMC_CLASS(IAF) /* Intel Core2/Atom, fixed function */ \ - __PMC_CLASS(IAP) /* Intel Core...Atom, programmable */ \ - __PMC_CLASS(UCF) /* Intel Uncore fixed function */ \ - __PMC_CLASS(UCP) /* Intel Uncore programmable */ \ - __PMC_CLASS(XSCALE) /* Intel XScale counters */ \ - __PMC_CLASS(ARMV7) /* ARMv7 */ \ - __PMC_CLASS(ARMV8) /* ARMv8 */ \ - __PMC_CLASS(MIPS24K) /* MIPS 24K */ \ - __PMC_CLASS(OCTEON) /* Cavium Octeon */ \ - __PMC_CLASS(MIPS74K) /* MIPS 74K */ \ - __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */ \ - __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ - __PMC_CLASS(E500) /* Freescale e500 class */ \ - __PMC_CLASS(SOFT) /* Software events */ + __PMC_CLASS(TSC, 0x000, "CPU Timestamp counter") \ + __PMC_CLASS(K7, 0x100, "AMD K7 performance counters") \ + __PMC_CLASS(K8, 0x101, "AMD K8 performance counters") \ + __PMC_CLASS(P5, 0x102, "Intel Pentium counters") \ + __PMC_CLASS(P6, 0x103, "Intel Pentium Pro counters") \ + __PMC_CLASS(P4, 0x104, "Intel Pentium-IV counters") \ + __PMC_CLASS(IAF, 0x105, "Intel Core2/Atom, fixed function") \ + __PMC_CLASS(IAP, 0x106, "Intel Core...Atom, programmable") \ + __PMC_CLASS(UCF, 0x107, "Intel Uncore fixed function") \ + __PMC_CLASS(UCP, 0x108, "Intel Uncore programmable") \ + __PMC_CLASS(XSCALE, 0x200, "Intel XScale counters") \ + __PMC_CLASS(ARMV7, 0x201, "ARMv7") \ + __PMC_CLASS(ARMV8, 0x202, "ARMv8") \ + __PMC_CLASS(MIPS24K, 0x300, "MIPS 24K") \ + __PMC_CLASS(OCTEON, 0x301, "Cavium Octeon") \ + __PMC_CLASS(MIPS74K, 0x302, "MIPS 74K") \ + __PMC_CLASS(PPC7450, 0x400, "Motorola MPC7450 class") \ + __PMC_CLASS(PPC970, 0x401, "IBM PowerPC 970 class") \ + __PMC_CLASS(E500, 0x402, "Freescale e500 class") \ + __PMC_CLASS(SOFT, 0x8000, "Software events") enum pmc_class { #undef __PMC_CLASS -#define __PMC_CLASS(N) PMC_CLASS_##N , +#define __PMC_CLASS(S,V,D) PMC_CLASS_##S = V, __PMC_CLASSES() }; From owner-svn-src-head@FreeBSD.ORG Tue May 19 19:01:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28CED84E; Tue, 19 May 2015 19:01:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16D9716A5; Tue, 19 May 2015 19:01:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JJ1MX2020819; Tue, 19 May 2015 19:01:22 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JJ1MOd020818; Tue, 19 May 2015 19:01:22 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505191901.t4JJ1MOd020818@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 19 May 2015 19:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283121 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 19:01:23 -0000 Author: jhb Date: Tue May 19 19:01:22 2015 New Revision: 283121 URL: https://svnweb.freebsd.org/changeset/base/283121 Log: Use the proper mask when reloading sampling PMCs for Core CPUs. Differential Revision: https://reviews.freebsd.org/D2492 Reviewed by: emaste MFC after: 1 month Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Tue May 19 18:58:18 2015 (r283120) +++ head/sys/dev/hwpmc/hwpmc_core.c Tue May 19 19:01:22 2015 (r283121) @@ -2588,7 +2588,7 @@ core_intr(int cpu, struct trapframe *tf) TRAPF_USERMODE(tf)); v = pm->pm_sc.pm_reloadcount; - v = iaf_reload_count_to_perfctr_value(v); + v = iap_reload_count_to_perfctr_value(v); /* * Stop the counter, reload it but only restart it if From owner-svn-src-head@FreeBSD.ORG Tue May 19 19:11:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7BB323D; Tue, 19 May 2015 19:11:26 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B49F218CE; Tue, 19 May 2015 19:11:26 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D762FB924; Tue, 19 May 2015 15:11:24 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283121 - head/sys/dev/hwpmc Date: Tue, 19 May 2015 15:11:21 -0400 Message-ID: <2491592.cE8ScIdmpE@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201505191901.t4JJ1MOd020818@svn.freebsd.org> References: <201505191901.t4JJ1MOd020818@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 19 May 2015 15:11:24 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 19:11:27 -0000 On Tuesday, May 19, 2015 07:01:22 PM John Baldwin wrote: > Author: jhb > Date: Tue May 19 19:01:22 2015 > New Revision: 283121 > URL: https://svnweb.freebsd.org/changeset/base/283121 > > Log: > Use the proper mask when reloading sampling PMCs for Core CPUs. > > Differential Revision: https://reviews.freebsd.org/D2492 > Reviewed by: emaste > MFC after: 1 month Ryan Stone attempted to test this but hasn't (yet) been able to do so. If someone has one of these CPUs lying around and can test it, that would be appreciated. This was found purely by code inspection. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue May 19 19:11:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A0E0246; Tue, 19 May 2015 19:11:27 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 753E818D1; Tue, 19 May 2015 19:11:27 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5E764B97A; Tue, 19 May 2015 15:11:26 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283120 - in head: lib/libpmc sys/dev/hwpmc sys/sys Date: Tue, 19 May 2015 15:06:40 -0400 Message-ID: <1908963.8Har9SZnS7@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201505191858.t4JIwJft016661@svn.freebsd.org> References: <201505191858.t4JIwJft016661@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 19 May 2015 15:11:26 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 19:11:27 -0000 On Tuesday, May 19, 2015 06:58:19 PM John Baldwin wrote: > Author: jhb > Date: Tue May 19 18:58:18 2015 > New Revision: 283120 > URL: https://svnweb.freebsd.org/changeset/base/283120 > > Log: > Use fixed enum values for PMC_CLASSES(). > > This removes one of the frequent causes of ABI breakage when new CPU > types are added to hwpmc(4). > > Differential Revision: https://reviews.freebsd.org/D2586 > Reviewed by: davide, emaste, gnn (earlier version) > MFC after: 2 weeks The ABI was already broken today with the ARMv8 counters. Merging this to stable will break the ABI there as well. Since PMC_SOFT always gets renumbered it always breaks pmcccontrol -L when this enum is updated. I believe it has already been broken in once stable/10. My preference would be that we only MFC this the next time we want to add a new class to 10 to avoid being too disruptive. At the time the new class is added, then this change could be merged as well. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue May 19 19:11:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8A8823C; Tue, 19 May 2015 19:11:26 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A464218CD; Tue, 19 May 2015 19:11:26 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 721A7B94E; Tue, 19 May 2015 15:11:25 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283119 - head/sys/dev/ixl Date: Tue, 19 May 2015 15:07:37 -0400 Message-ID: <1506707.pygKoSjLlY@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201505191835.t4JIZIN3005742@svn.freebsd.org> References: <201505191835.t4JIZIN3005742@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 19 May 2015 15:11:25 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 19:11:26 -0000 On Tuesday, May 19, 2015 06:35:18 PM John Baldwin wrote: > Author: jhb > Date: Tue May 19 18:35:18 2015 > New Revision: 283119 > URL: https://svnweb.freebsd.org/changeset/base/283119 > > Log: > Remove executable property from several ixl(4) source files. > > Differential Revision: https://reviews.freebsd.org/D2583 > Reviewed by: erj I did this because any patches to these files would fail the lint check in arcanist, so changes to these files couldn't be uploaded into phabricator via arcanist. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue May 19 19:15:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A81CE74D; Tue, 19 May 2015 19:15:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 896EE190E; Tue, 19 May 2015 19:15:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JJFKMa026682; Tue, 19 May 2015 19:15:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JJFKZI026679; Tue, 19 May 2015 19:15:20 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505191915.t4JJFKZI026679@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 19 May 2015 19:15:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283123 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 19:15:20 -0000 Author: jhb Date: Tue May 19 19:15:19 2015 New Revision: 283123 URL: https://svnweb.freebsd.org/changeset/base/283123 Log: Fix two bugs that could result in PMC sampling effectively stopping. In both cases, the the effect of the bug was that a very small positive number was written to the counter. This means that a large number of events needed to occur before the next sampling interrupt would trigger. Even with very frequently occurring events like clock cycles wrapping all the way around could take a long time. Both bugs occurred when updating the saved reload count for an outgoing thread on a context switch. First, the counter-independent code compares the current reload count against the count set when the thread switched in and generates a delta to apply to the saved count. If this delta causes the reload counter to go negative, it would add a full reload interval to wrap it around to a positive value. The fix is to add the full reload interval if the resulting counter is zero. Second, occasionally the raw counter value read during a context switch has actually wrapped, but an interrupt has not yet triggered. In this case the existing logic would return a very large reload count (e.g. 2^48 - 2 if the counter had overflowed by a count of 2). This was seen both for fixed-function and programmable counters on an E5-2643. Workaround this case by returning a reload count of zero. PR: 198149 Differential Revision: https://reviews.freebsd.org/D2557 Reviewed by: emaste MFC after: 1 week Sponsored by: Norse Corp, Inc. Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Tue May 19 19:01:52 2015 (r283122) +++ head/sys/dev/hwpmc/hwpmc_core.c Tue May 19 19:15:19 2015 (r283123) @@ -203,6 +203,10 @@ core_pcpu_fini(struct pmc_mdep *md, int static pmc_value_t iaf_perfctr_value_to_reload_count(pmc_value_t v) { + + /* If the PMC has overflowed, return a reload count of zero. */ + if ((v & (1ULL << (core_iaf_width - 1))) == 0) + return (0); v &= (1ULL << core_iaf_width) - 1; return (1ULL << core_iaf_width) - v; } @@ -1806,6 +1810,10 @@ static const int niap_events = sizeof(ia static pmc_value_t iap_perfctr_value_to_reload_count(pmc_value_t v) { + + /* If the PMC has overflowed, return a reload count of zero. */ + if ((v & (1ULL << (core_iap_width - 1))) == 0) + return (0); v &= (1ULL << core_iap_width) - 1; return (1ULL << core_iap_width) - v; } Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Tue May 19 19:01:52 2015 (r283122) +++ head/sys/dev/hwpmc/hwpmc_mod.c Tue May 19 19:15:19 2015 (r283123) @@ -1435,7 +1435,7 @@ pmc_process_csw_out(struct thread *td) tmp += pm->pm_sc.pm_reloadcount; mtx_pool_lock_spin(pmc_mtxpool, pm); pp->pp_pmcs[ri].pp_pmcval -= tmp; - if ((int64_t) pp->pp_pmcs[ri].pp_pmcval < 0) + if ((int64_t) pp->pp_pmcs[ri].pp_pmcval <= 0) pp->pp_pmcs[ri].pp_pmcval += pm->pm_sc.pm_reloadcount; mtx_pool_unlock_spin(pmc_mtxpool, pm); From owner-svn-src-head@FreeBSD.ORG Tue May 19 19:17:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81DD6A08; Tue, 19 May 2015 19:17:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 707D0194D; Tue, 19 May 2015 19:17:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JJHLGl027120; Tue, 19 May 2015 19:17:21 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JJHLZQ027119; Tue, 19 May 2015 19:17:21 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201505191917.t4JJHLZQ027119@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Tue, 19 May 2015 19:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283124 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 19:17:21 -0000 Author: hiren Date: Tue May 19 19:17:20 2015 New Revision: 283124 URL: https://svnweb.freebsd.org/changeset/base/283124 Log: Correct the wording as we are increasing the window size. Reviewed by: jhb Sponsored by: Limelight Networks Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue May 19 19:15:19 2015 (r283123) +++ head/sys/netinet/tcp_input.c Tue May 19 19:17:20 2015 (r283124) @@ -1542,7 +1542,7 @@ tcp_do_segment(struct mbuf *m, struct tc tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); /* - * Unscale the window into a 32-bit value. + * Scale up the window into a 32-bit value. * For the SYN_SENT state the scale is zero. */ tiwin = th->th_win << tp->snd_scale; From owner-svn-src-head@FreeBSD.ORG Tue May 19 21:00:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DAE9DAE; Tue, 19 May 2015 21:00:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C011157C; Tue, 19 May 2015 21:00:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JL0ssZ080417; Tue, 19 May 2015 21:00:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JL0s9v080416; Tue, 19 May 2015 21:00:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505192100.t4JL0s9v080416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 19 May 2015 21:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283125 - in head/lib/csu: . i386 i386-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 21:00:54 -0000 Author: emaste Date: Tue May 19 21:00:53 2015 New Revision: 283125 URL: https://svnweb.freebsd.org/changeset/base/283125 Log: All FreeBSD platforms are elf: move i386-elf to i386 This was a leftover from when we had both i386 a.out and ELF. Reviewed by: kib, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2591 Added: head/lib/csu/i386/ - copied from r283117, head/lib/csu/i386-elf/ Deleted: head/lib/csu/i386-elf/ Modified: head/lib/csu/Makefile Modified: head/lib/csu/Makefile ============================================================================== --- head/lib/csu/Makefile Tue May 19 19:17:20 2015 (r283124) +++ head/lib/csu/Makefile Tue May 19 21:00:53 2015 (r283125) @@ -1,8 +1,7 @@ # $FreeBSD$ -ARCH= ${MACHINE_ARCH:S/i386/i386-elf/} -.if exists(${.CURDIR}/${ARCH}) -SUBDIR+= ${ARCH} +.if exists(${.CURDIR}/${MACHINE_ARCH}) +SUBDIR+= ${MACHINE_ARCH} .else SUBDIR+= ${MACHINE_CPUARCH} .endif From owner-svn-src-head@FreeBSD.ORG Tue May 19 21:16:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 558C8289; Tue, 19 May 2015 21:16:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 443FC16BF; Tue, 19 May 2015 21:16:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JLGc6V089368; Tue, 19 May 2015 21:16:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JLGcHO089367; Tue, 19 May 2015 21:16:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505192116.t4JLGcHO089367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 19 May 2015 21:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283126 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 21:16:38 -0000 Author: imp Date: Tue May 19 21:16:37 2015 New Revision: 283126 URL: https://svnweb.freebsd.org/changeset/base/283126 Log: Improve comment about unmapped I/O and fix typos. Submitted by: Matteo Riondato MFC After: 2 days Modified: head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Tue May 19 21:00:53 2015 (r283125) +++ head/sys/arm/arm/pmap.c Tue May 19 21:16:37 2015 (r283126) @@ -4311,10 +4311,10 @@ pmap_copy_page(vm_page_t src, vm_page_t } /* - * We have code to do unmapped I/O. However, it isn't quite right - * an causes un-page-aligned I/O to devices to fail (most notably - * newfs or fsck). We give up a little performance to do this, but - * we trade that for rock-solid stability so it is a good trade. + * We have code to do unmapped I/O. However, it isn't quite right and + * causes un-page-aligned I/O to devices to fail (most notably newfs + * or fsck). We give up a little performance to not allow unmapped I/O + * to gain stability. */ int unmapped_buf_allowed = 0; From owner-svn-src-head@FreeBSD.ORG Tue May 19 21:16:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A4073C7; Tue, 19 May 2015 21:16:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EE1E16C3; Tue, 19 May 2015 21:16:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JLGqAL089443; Tue, 19 May 2015 21:16:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JLGqPF089442; Tue, 19 May 2015 21:16:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505192116.t4JLGqPF089442@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 19 May 2015 21:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283127 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 21:16:52 -0000 Author: imp Date: Tue May 19 21:16:51 2015 New Revision: 283127 URL: https://svnweb.freebsd.org/changeset/base/283127 Log: Add NFS server to mix (for easier, in-place updates). Move to partition 2 for root (since partition 1 is reserved for FAT files the Atmel ROMs can load). Modified: head/sys/arm/conf/SAM9G20EK Modified: head/sys/arm/conf/SAM9G20EK ============================================================================== --- head/sys/arm/conf/SAM9G20EK Tue May 19 21:16:37 2015 (r283126) +++ head/sys/arm/conf/SAM9G20EK Tue May 19 21:16:51 2015 (r283127) @@ -1,4 +1,5 @@ # Kernel configuration for Atmel AT91SAM9G20EK Rev B. development card +# Many after-market boards follow its conventions. # # For more information on this file, please read the handbook section on # Kernel Configuration Files: @@ -40,8 +41,8 @@ options FFS # Berkeley Fast Filesyste #options MD_ROOT_SIZE=4096 # 4MB ram disk options NANDFS # NAND file system options NFSCL # Network Filesystem Client -#options NFSD # Network Filesystem Server -#options NFSLOCKD # Network Lock Manager +options NFSD # Network Filesystem Server +options NFSLOCKD # Network Lock Manager #options NFS_ROOT # NFS usable as /, requires NFSCL #options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem @@ -59,6 +60,7 @@ options _KPOSIX_PRIORITY_SCHEDULING # P # Debugging support. Always need this: options KDB # Enable kernel debugger support options DDB # Enable the kernel debugger +# Always turn these off, even in -current builds, they are too slow. #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles @@ -72,7 +74,9 @@ options DDB # Enable the kernel debug #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ate0 -options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" +# s2 because s1 is reserved for the DOS parittions sometimes needed to +# boot off SD cards on the G20 and newer chips. +options ROOTDEVNAME=\"ufs:/dev/mmcsd0s2a\" # kernel/memory size reduction options MUTEX_NOINLINE From owner-svn-src-head@FreeBSD.ORG Tue May 19 21:16:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A530423; Tue, 19 May 2015 21:16:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECE1016C4; Tue, 19 May 2015 21:16:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JLGrZH089486; Tue, 19 May 2015 21:16:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JLGrkB089485; Tue, 19 May 2015 21:16:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505192116.t4JLGrkB089485@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 19 May 2015 21:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283128 - head/sys/dev/mmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 21:16:54 -0000 Author: imp Date: Tue May 19 21:16:53 2015 New Revision: 283128 URL: https://svnweb.freebsd.org/changeset/base/283128 Log: Re-select the SD card before getting the SD status. On a couple Atmel boards, this prevents some error messages during enumeration and also gives us the correct erase block size. They appear to be harmless elsewhere. # Note: we treat too many commands as 'can't fail' if they don't work # after a couple of retries. We need to fix that, but not today... Modified: head/sys/dev/mmc/mmc.c Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Tue May 19 21:16:51 2015 (r283127) +++ head/sys/dev/mmc/mmc.c Tue May 19 21:16:53 2015 (r283128) @@ -1379,6 +1379,20 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->hs_tran_speed = SD_MAX_HS; } } + + /* + * We reselect the card here. Some cards become + * unselected and timeout with the above two commands, + * although the state tables / diagrams in the standard + * suggest they go back to the transfer state. The only + * thing we use from the sd_status is the erase sector + * size, but it is still nice to get that right. It is + * normally harmless for cards not misbehaving. The + * Atmel bridge will complain about this command timing + * out. Others seem to handle it correctly, so it may + * be a combination of card and controller. + */ + mmc_select_card(sc, ivar->rca); mmc_app_sd_status(sc, ivar->rca, ivar->raw_sd_status); mmc_app_decode_sd_status(ivar->raw_sd_status, &ivar->sd_status); From owner-svn-src-head@FreeBSD.ORG Tue May 19 21:57:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C662C538; Tue, 19 May 2015 21:57:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B56A81B9D; Tue, 19 May 2015 21:57:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JLvCd8010184; Tue, 19 May 2015 21:57:12 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JLvC4f010183; Tue, 19 May 2015 21:57:12 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505192157.t4JLvC4f010183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 19 May 2015 21:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283129 - head/cddl/usr.bin/ctfdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 21:57:12 -0000 Author: bapt Date: Tue May 19 21:57:11 2015 New Revision: 283129 URL: https://svnweb.freebsd.org/changeset/base/283129 Log: Convert to LIBADD Remove dependency on pthread, it is not needed Modified: head/cddl/usr.bin/ctfdump/Makefile Modified: head/cddl/usr.bin/ctfdump/Makefile ============================================================================== --- head/cddl/usr.bin/ctfdump/Makefile Tue May 19 21:16:53 2015 (r283128) +++ head/cddl/usr.bin/ctfdump/Makefile Tue May 19 21:57:11 2015 (r283129) @@ -17,7 +17,6 @@ CFLAGS+= -I${OPENSOLARIS_USR_DISTDIR} \ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common -DPADD= ${LIBPTHREAD} ${LIBELF} ${LIBZ} -LDADD= -lpthread -lelf -lz +LIBADD= elf z .include From owner-svn-src-head@FreeBSD.ORG Tue May 19 21:59:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5BAF692; Tue, 19 May 2015 21:59:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A48FE1BB2; Tue, 19 May 2015 21:59:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JLx199010464; Tue, 19 May 2015 21:59:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JLx1Ub010463; Tue, 19 May 2015 21:59:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505192159.t4JLx1Ub010463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 19 May 2015 21:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283130 - head/cddl/usr.bin/ctfconvert X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 21:59:01 -0000 Author: bapt Date: Tue May 19 21:59:00 2015 New Revision: 283130 URL: https://svnweb.freebsd.org/changeset/base/283130 Log: Convert to LIBADD Modified: head/cddl/usr.bin/ctfconvert/Makefile Modified: head/cddl/usr.bin/ctfconvert/Makefile ============================================================================== --- head/cddl/usr.bin/ctfconvert/Makefile Tue May 19 21:57:11 2015 (r283129) +++ head/cddl/usr.bin/ctfconvert/Makefile Tue May 19 21:59:00 2015 (r283130) @@ -36,7 +36,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common -DPADD= ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD} -LDADD= -ldwarf -lelf -lz -lpthread +LIBADD= dwarf elf z pthread .include From owner-svn-src-head@FreeBSD.ORG Tue May 19 22:22:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BF96E03; Tue, 19 May 2015 22:22:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BEC81E90; Tue, 19 May 2015 22:22:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JMMs5w024992; Tue, 19 May 2015 22:22:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JMMsXx024991; Tue, 19 May 2015 22:22:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505192222.t4JMMsXx024991@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 19 May 2015 22:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283131 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 22:22:54 -0000 Author: bapt Date: Tue May 19 22:22:53 2015 New Revision: 283131 URL: https://svnweb.freebsd.org/changeset/base/283131 Log: Register libdtrace and its direct and indirect dependencies Register librdlt_db Register libproc dependencies Register libctf dependencies Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue May 19 21:59:00 2015 (r283130) +++ head/share/mk/src.libnames.mk Tue May 19 22:22:53 2015 (r283131) @@ -78,6 +78,7 @@ _LIBRARIES= \ devstat \ dialog \ dpv \ + dtrace \ dwarf \ edit \ elf \ @@ -133,6 +134,7 @@ _LIBRARIES= \ rpcsec_gss \ rpcsvc \ rt \ + rtld_db \ sbuf \ sdp \ sm \ @@ -230,6 +232,9 @@ _DP_gssapi_krb5+= gssapi krb5 crypto rok _DP_lzma= pthread _DP_ucl= m _DP_vmmapi= util +_DP_ctf= z +_DP_proc= rtld_db util +_DP_dtrace= rtld_db pthread # Define spacial cases LDADD_supcplusplus= -lsupc++ @@ -275,6 +280,9 @@ LDADD_ipf+= ${LDADD_kvm} DPADD_mt+= ${DPADD_sbuf} LDADD_mt+= ${LDADD_sbuf} +DPADD_dtrace+= ${DPADD_ctf} ${DPADD_elf} ${DPADD_proc} +LDADD_dtrace+= ${LDADD_ctf} ${LDADD_elf} ${LDADD_proc} + # The following depends on libraries which are using pthread DPADD_hdb+= ${DPADD_pthread} LDADD_hdb+= ${LDADD_pthread} From owner-svn-src-head@FreeBSD.ORG Tue May 19 22:23:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98E14F44; Tue, 19 May 2015 22:23:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 883D11E95; Tue, 19 May 2015 22:23:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JMNGed025109; Tue, 19 May 2015 22:23:16 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JMNGDZ025108; Tue, 19 May 2015 22:23:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505192223.t4JMNGDZ025108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 19 May 2015 22:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283132 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 22:23:16 -0000 Author: bapt Date: Tue May 19 22:23:15 2015 New Revision: 283132 URL: https://svnweb.freebsd.org/changeset/base/283132 Log: Fix underlinking Modified: head/lib/libproc/Makefile Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Tue May 19 22:22:53 2015 (r283131) +++ head/lib/libproc/Makefile Tue May 19 22:23:15 2015 (r283132) @@ -23,6 +23,8 @@ LIBADD+= cxxrt LIBADD+= supcplusplus .endif +LIBADD+= elf rtld_db util + .if ${MK_CDDL} != "no" LIBADD+= ctf IGNORE_PRAGMA= YES From owner-svn-src-head@FreeBSD.ORG Tue May 19 22:24:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF9E2132; Tue, 19 May 2015 22:24:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEC781EA7; Tue, 19 May 2015 22:24:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JMOKR9025317; Tue, 19 May 2015 22:24:20 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JMOKIg025314; Tue, 19 May 2015 22:24:20 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505192224.t4JMOKIg025314@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 19 May 2015 22:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283133 - in head/cddl: lib/libdtrace usr.sbin/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 22:24:20 -0000 Author: bapt Date: Tue May 19 22:24:19 2015 New Revision: 283133 URL: https://svnweb.freebsd.org/changeset/base/283133 Log: Correctly link libdtrace and convert to LIBADD Make dtrace only link to libdtrace Modified: head/cddl/lib/libdtrace/Makefile head/cddl/usr.sbin/dtrace/Makefile Modified: head/cddl/lib/libdtrace/Makefile ============================================================================== --- head/cddl/lib/libdtrace/Makefile Tue May 19 22:23:15 2015 (r283132) +++ head/cddl/lib/libdtrace/Makefile Tue May 19 22:24:19 2015 (r283133) @@ -104,6 +104,8 @@ LFLAGS+=-l YFLAGS+=-d +LIBADD= ctf elf proc pthread rtld_db + CLEANFILES= dt_errtags.c dt_names.c dt_errtags.c: Modified: head/cddl/usr.sbin/dtrace/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/Makefile Tue May 19 22:23:15 2015 (r283132) +++ head/cddl/usr.sbin/dtrace/Makefile Tue May 19 22:24:19 2015 (r283133) @@ -20,9 +20,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ #CFLAGS+= -DNEED_ERRLOC #YFLAGS+= -d -DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} \ - ${LIBCTF} ${LIBELF} ${LIBZ} ${LIBUTIL} ${LIBRTLD_DB} -LDADD= -lpthread -ldtrace -ly -ll -lproc -lctf -lelf -lz -lutil \ - -lrtld_db +LIBADD= dtrace .include From owner-svn-src-head@FreeBSD.ORG Tue May 19 22:29:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0BC843A; Tue, 19 May 2015 22:29:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FBB91EE8; Tue, 19 May 2015 22:29:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4JMTCPY026009; Tue, 19 May 2015 22:29:12 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JMTCQw026007; Tue, 19 May 2015 22:29:12 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505192229.t4JMTCQw026007@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 19 May 2015 22:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283134 - in head/cddl/usr.sbin: lockstat plockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 22:29:12 -0000 Author: bapt Date: Tue May 19 22:29:11 2015 New Revision: 283134 URL: https://svnweb.freebsd.org/changeset/base/283134 Log: Reduce overlinking. Because of libdtrace there is still a bit a overlinking but nothing we can deal with easily Modified: head/cddl/usr.sbin/lockstat/Makefile head/cddl/usr.sbin/plockstat/Makefile Modified: head/cddl/usr.sbin/lockstat/Makefile ============================================================================== --- head/cddl/usr.sbin/lockstat/Makefile Tue May 19 22:24:19 2015 (r283133) +++ head/cddl/usr.sbin/lockstat/Makefile Tue May 19 22:29:11 2015 (r283134) @@ -21,10 +21,6 @@ CFLAGS+= -DNEED_ERRLOC -g #YFLAGS+= -d -DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} \ - ${LIBCTF} ${LIBELF} ${LIBZ} ${LIBRT} ${LIBUTIL} \ - ${LIBRTLD_DB} -LDADD= -lpthread -ldtrace -ly -ll -lproc -lctf -lelf -lz -lrt -lutil \ - -lrtld_db +LIBADD= elf dtrace rt .include Modified: head/cddl/usr.sbin/plockstat/Makefile ============================================================================== --- head/cddl/usr.sbin/plockstat/Makefile Tue May 19 22:24:19 2015 (r283133) +++ head/cddl/usr.sbin/plockstat/Makefile Tue May 19 22:29:11 2015 (r283134) @@ -18,9 +18,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${.CURDIR}/../../../cddl/lib/libdtrace \ -I${.CURDIR}/../../../sys -DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} ${LIBCTF}\ - ${LIBELF} ${LIBZ} ${LIBRT} ${LIBRTLD_DB} ${LIBUTIL} -LDADD= -lpthread -ldtrace -ly -ll -lproc -lctf -lelf -lz -lrt \ - -lrtld_db -lutil +LIBADD= dtrace proc .include From owner-svn-src-head@FreeBSD.ORG Wed May 20 01:08:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B6C8130; Wed, 20 May 2015 01:08:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4437116F; Wed, 20 May 2015 01:08:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4K181j7006312; Wed, 20 May 2015 01:08:01 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4K181No006311; Wed, 20 May 2015 01:08:01 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201505200108.t4K181No006311@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Wed, 20 May 2015 01:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283136 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 01:08:02 -0000 Author: hiren Date: Wed May 20 01:08:01 2015 New Revision: 283136 URL: https://svnweb.freebsd.org/changeset/base/283136 Log: Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to expire and purge all entries in hostcache immediately. In collaboration with: bz, rwatson MFC after: 1 week Relnotes: yes Sponsored by: Limelight Networks Modified: head/sys/netinet/tcp_hostcache.c Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Tue May 19 23:53:25 2015 (r283135) +++ head/sys/netinet/tcp_hostcache.c Wed May 20 01:08:01 2015 (r283136) @@ -117,6 +117,7 @@ static VNET_DEFINE(struct callout, tcp_h static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); static struct hc_metrics *tcp_hc_insert(struct in_conninfo *); static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS); +static int sysctl_tcp_hc_purgenow(SYSCTL_HANDLER_ARGS); static void tcp_hc_purge_internal(int); static void tcp_hc_purge(void *); @@ -155,6 +156,9 @@ SYSCTL_PROC(_net_inet_tcp_hostcache, OID CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP, 0, 0, sysctl_tcp_hc_list, "A", "List of all hostcache entries"); +SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, purgenow, + CTLTYPE_INT | CTLFLAG_RW, NULL, 0, + sysctl_tcp_hc_purgenow, "I", "Immediately purge all entries"); static MALLOC_DEFINE(M_HOSTCACHE, "hostcache", "TCP hostcache"); @@ -696,3 +700,24 @@ tcp_hc_purge(void *arg) tcp_hc_purge, arg); CURVNET_RESTORE(); } + +/* + * Expire and purge all entries in hostcache immediately. + */ +static int +sysctl_tcp_hc_purgenow(SYSCTL_HANDLER_ARGS) +{ + int error, val; + + val = 0; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error || !req->newptr) + return (error); + + tcp_hc_purge_internal(1); + + callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz, + tcp_hc_purge, curvnet); + + return (0); +} From owner-svn-src-head@FreeBSD.ORG Wed May 20 04:14:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C076C7A5; Wed, 20 May 2015 04:14:10 +0000 (UTC) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 87D4F174C; Wed, 20 May 2015 04:14:10 +0000 (UTC) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id 894217E84F; Wed, 20 May 2015 14:14:08 +1000 (EST) Message-ID: <555C09D5.9090709@freebsd.org> Date: Wed, 20 May 2015 14:13:09 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Hiren Panchasara , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283136 - head/sys/netinet References: <201505200108.t4K181No006311@svn.freebsd.org> In-Reply-To: <201505200108.t4K181No006311@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.4 required=5.0 tests=DNS_FROM_AHBL_RHSBL, UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 04:14:10 -0000 Hi Hiren, On 05/20/15 11:08, Hiren Panchasara wrote: > Author: hiren > Date: Wed May 20 01:08:01 2015 > New Revision: 283136 > URL: https://svnweb.freebsd.org/changeset/base/283136 > > Log: > Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to expire and purge all > entries in hostcache immediately. > > In collaboration with: bz, rwatson > MFC after: 1 week > Relnotes: yes > Sponsored by: Limelight Networks Why introduce a new sysctl and not change the existing behaviour of net.inet.tcp.hostcache.purge? Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Wed May 20 04:24:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DB4D964; Wed, 20 May 2015 04:24:46 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED6BD1850; Wed, 20 May 2015 04:24:45 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id BB95F1115D6; Tue, 19 May 2015 21:24:38 -0700 (PDT) Date: Tue, 19 May 2015 21:24:38 -0700 From: Hiren Panchasara To: Lawrence Stewart Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283136 - head/sys/netinet Message-ID: <20150520042438.GA95600@strugglingcoder.info> References: <201505200108.t4K181No006311@svn.freebsd.org> <555C09D5.9090709@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline In-Reply-To: <555C09D5.9090709@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 04:24:46 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 05/20/15 at 02:13P, Lawrence Stewart wrote: > Hi Hiren, >=20 > On 05/20/15 11:08, Hiren Panchasara wrote: > > Author: hiren > > Date: Wed May 20 01:08:01 2015 > > New Revision: 283136 > > URL: https://svnweb.freebsd.org/changeset/base/283136 > >=20 > > Log: > > Add a new sysctl net.inet.tcp.hostcache.purgenow=3D1 to expire and pu= rge all > > entries in hostcache immediately. > > =20 > > In collaboration with: bz, rwatson > > MFC after: 1 week > > Relnotes: yes > > Sponsored by: Limelight Networks >=20 > Why introduce a new sysctl and not change the existing behaviour of > net.inet.tcp.hostcache.purge? I thought it'd make more sense to keep the existing behavior as is and provide new knob for the new behavior. cheers, Hiren --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVXAyFXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/leVMH/1lh544U082BQ/LvQncpHxw5 CUysQHOk+/h6IzObnUsOtn4JuCho4LU2njlc/l7wio06fvNbC3fieviV0DAU9cgf x6e8HQi+lricM4HoX4cTUrUcWkJSNHjYWUhXO14fbBPktG+nRnqE4E/wY6nkrbO1 rZutBiUVBtKk5JeboPchjVZ/g+iCeTFT1zJaPW9JJ88JROhgrgQTl9YLDFhk93W8 wVp88Acx7O/sXh09OblMvHPKj448GpQJmlesdA8b5j5Qz0XigX1UmsjtTx2bV6p4 SxDbqtNYpgmk82/h5ttfSOzKulJzZrxQMQLQcG9R63hVeqZAnzvmCqZsxVFL3oQ= =s1Mg -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC-- From owner-svn-src-head@FreeBSD.ORG Wed May 20 05:49:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEE1F5FC; Wed, 20 May 2015 05:49:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD6FE10BB; Wed, 20 May 2015 05:49:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4K5nrw8045520; Wed, 20 May 2015 05:49:53 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4K5nrF9045517; Wed, 20 May 2015 05:49:53 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201505200549.t4K5nrF9045517@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Wed, 20 May 2015 05:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283137 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 05:49:54 -0000 Author: ganbold Date: Wed May 20 05:49:52 2015 New Revision: 283137 URL: https://svnweb.freebsd.org/changeset/base/283137 Log: D2432 (Patch for Amlogic single core PIC) moved the SMP option out of AML8726 and into board specific config files since some boards (e.g. YYHD18) use the aml8726-m3 which only have a single core. r283057 applied most of D2432, however while it removed SMP from AML8726, it missed adding the SMP option to the board specific config files. Differential Revision: https://reviews.freebsd.org/D2589 Submitted by: John Wehle Modified: head/sys/arm/conf/ODROIDC1 head/sys/arm/conf/VSATV102 Modified: head/sys/arm/conf/ODROIDC1 ============================================================================== --- head/sys/arm/conf/ODROIDC1 Wed May 20 01:08:01 2015 (r283136) +++ head/sys/arm/conf/ODROIDC1 Wed May 20 05:49:52 2015 (r283137) @@ -22,6 +22,8 @@ include "AML8726" ident ODROIDC1 +options SMP # Enable multiple cores + # Interrupt controller device gic Modified: head/sys/arm/conf/VSATV102 ============================================================================== --- head/sys/arm/conf/VSATV102 Wed May 20 01:08:01 2015 (r283136) +++ head/sys/arm/conf/VSATV102 Wed May 20 05:49:52 2015 (r283137) @@ -22,6 +22,8 @@ include "AML8726" ident VSATV102 +options SMP # Enable multiple cores + # Interrupt controller device gic From owner-svn-src-head@FreeBSD.ORG Wed May 20 06:23:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54555BC0; Wed, 20 May 2015 06:23:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3614B14C4; Wed, 20 May 2015 06:23:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4K6N2HN064251; Wed, 20 May 2015 06:23:02 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4K6N1Wc064248; Wed, 20 May 2015 06:23:01 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201505200623.t4K6N1Wc064248@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Wed, 20 May 2015 06:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283138 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 06:23:02 -0000 Author: rpaulo Date: Wed May 20 06:23:01 2015 New Revision: 283138 URL: https://svnweb.freebsd.org/changeset/base/283138 Log: ti_pruss: pass the correct IRQ to userland. Also, fix several problems with the kqueue notification. Submitted by: Manuel Stühn freebsdnewbie at freenet.de Modified: head/sys/arm/ti/ti_pruss.c head/sys/arm/ti/ti_pruss.h Modified: head/sys/arm/ti/ti_pruss.c ============================================================================== --- head/sys/arm/ti/ti_pruss.c Wed May 20 05:49:52 2015 (r283137) +++ head/sys/arm/ti/ti_pruss.c Wed May 20 06:23:01 2015 (r283138) @@ -70,7 +70,8 @@ static void ti_pruss_kq_read_detach(s static int ti_pruss_kq_read_event(struct knote *, long); static d_kqfilter_t ti_pruss_kqfilter; -#define TI_PRUSS_IRQS 8 +#define TI_PRUSS_IRQS 8 + struct ti_pruss_softc { struct mtx sc_mtx; struct resource *sc_mem_res; @@ -119,6 +120,7 @@ static struct resource_spec ti_pruss_irq { SYS_RES_IRQ, 7, RF_ACTIVE }, { -1, 0, 0 } }; +CTASSERT(TI_PRUSS_IRQS == nitems(ti_pruss_irq_spec) - 1); static struct ti_pruss_irq_arg { int irq; @@ -166,6 +168,7 @@ ti_pruss_attach(device_t dev) sc = device_get_softc(dev); rid = 0; mtx_init(&sc->sc_mtx, "TI PRUSS", NULL, MTX_DEF); + knlist_init_mtx(&sc->sc_selinfo.si_note, &sc->sc_mtx); sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->sc_mem_res == NULL) { @@ -219,6 +222,9 @@ ti_pruss_detach(device_t dev) rman_get_rid(sc->sc_irq_res[i]), sc->sc_irq_res[i]); } + knlist_clear(&sc->sc_selinfo.si_note, 0); + knlist_destroy(&sc->sc_selinfo.si_note); + mtx_destroy(&sc->sc_mtx); if (sc->sc_mem_res) bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->sc_mem_res), sc->sc_mem_res); @@ -231,13 +237,23 @@ ti_pruss_detach(device_t dev) static void ti_pruss_intr(void *arg) { - struct ti_pruss_irq_arg *iap; - struct ti_pruss_softc *sc; - - iap = arg; - sc = iap->sc; - DPRINTF("interrupt %p", sc); - KNOTE_UNLOCKED(&sc->sc_selinfo.si_note, iap->irq); + int val; + struct ti_pruss_irq_arg *iap = arg; + struct ti_pruss_softc *sc = iap->sc; + /* + * Interrupts pr1_host_intr[0:7] are mapped to + * Host-2 to Host-9 of PRU-ICSS IRQ-controller. + */ + const int pru_int = iap->irq + 2; + const int pru_int_mask = (1 << pru_int); + + val = ti_pruss_reg_read(sc, PRUSS_AM33XX_INTC + PRUSS_INTC_HIER); + DPRINTF("interrupt %p, %d", sc, pru_int); + if (!(val & pru_int_mask)) + return; + ti_pruss_reg_write(sc, PRUSS_AM33XX_INTC + PRUSS_INTC_HIDISR, + pru_int); + KNOTE_UNLOCKED(&sc->sc_selinfo.si_note, pru_int); } static int Modified: head/sys/arm/ti/ti_pruss.h ============================================================================== --- head/sys/arm/ti/ti_pruss.h Wed May 20 05:49:52 2015 (r283137) +++ head/sys/arm/ti/ti_pruss.h Wed May 20 06:23:01 2015 (r283138) @@ -33,4 +33,8 @@ #define PRUSS_AM33XX_REV 0x4e82A900 #define PRUSS_AM33XX_INTC 0x20000 +#define PRUSS_INTC_HIER 0x1500 +#define PRUSS_INTC_HIDISR 0x0038 +#define PRUSS_INTC_HIPIR_BASE 0x0900 + #endif /* _TI_PRUSS_H_ */ From owner-svn-src-head@FreeBSD.ORG Wed May 20 06:34:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D19FE90; Wed, 20 May 2015 06:34:40 +0000 (UTC) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id D8E461608; Wed, 20 May 2015 06:34:39 +0000 (UTC) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id 755847E84F; Wed, 20 May 2015 16:34:31 +1000 (EST) Message-ID: <555C2ABC.60102@freebsd.org> Date: Wed, 20 May 2015 16:33:32 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Hiren Panchasara CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283136 - head/sys/netinet References: <201505200108.t4K181No006311@svn.freebsd.org> <555C09D5.9090709@freebsd.org> <20150520042438.GA95600@strugglingcoder.info> In-Reply-To: <20150520042438.GA95600@strugglingcoder.info> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.4 required=5.0 tests=DNS_FROM_AHBL_RHSBL, UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 06:34:40 -0000 On 05/20/15 14:24, Hiren Panchasara wrote: > On 05/20/15 at 02:13P, Lawrence Stewart wrote: >> Hi Hiren, >> >> On 05/20/15 11:08, Hiren Panchasara wrote: >>> Author: hiren Date: Wed May 20 01:08:01 2015 New Revision: >>> 283136 URL: https://svnweb.freebsd.org/changeset/base/283136 >>> >>> Log: Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to >>> expire and purge all entries in hostcache immediately. >>> >>> In collaboration with: bz, rwatson MFC after: 1 week Relnotes: >>> yes Sponsored by: Limelight Networks >> >> Why introduce a new sysctl and not change the existing behaviour >> of net.inet.tcp.hostcache.purge? > > I thought it'd make more sense to keep the existing behavior as is > and provide new knob for the new behavior. Don't think so - why would deferring a purge to the next purge run be useful compared to purging immediately? I'd strongly suggest you adapt this change to the existing purge sysctl. I can't see why anyone would miss the old functionality. Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Wed May 20 09:23:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BD94A65; Wed, 20 May 2015 09:23:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A3161B03; Wed, 20 May 2015 09:23:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4K9NctP054241; Wed, 20 May 2015 09:23:38 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4K9NcsI054240; Wed, 20 May 2015 09:23:38 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505200923.t4K9NcsI054240@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 20 May 2015 09:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283139 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 09:23:38 -0000 Author: bapt Date: Wed May 20 09:23:37 2015 New Revision: 283139 URL: https://svnweb.freebsd.org/changeset/base/283139 Log: Fix buildworld by adding libproc and librtld_db to the _prebuild_libs Those are needed to build libdtrace Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed May 20 06:23:01 2015 (r283138) +++ head/Makefile.inc1 Wed May 20 09:23:37 2015 (r283139) @@ -1691,6 +1691,8 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libopie lib/libpam ${_lib_libthr} \ ${_lib_libradius} lib/libsbuf lib/libtacplus \ lib/libgeom \ + lib/libproc \ + lib/librtld_db \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libuutil} \ ${_cddl_lib_libavl} \ From owner-svn-src-head@FreeBSD.ORG Wed May 20 09:36:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20E73E45; Wed, 20 May 2015 09:36:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E60C1C94; Wed, 20 May 2015 09:36:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4K9aPYf059607; Wed, 20 May 2015 09:36:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4K9aPhf059606; Wed, 20 May 2015 09:36:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505200936.t4K9aPhf059606@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 20 May 2015 09:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283140 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 09:36:26 -0000 Author: ngie Date: Wed May 20 09:36:25 2015 New Revision: 283140 URL: https://svnweb.freebsd.org/changeset/base/283140 Log: Only build sys/boot/usb/tools if MK_USB != no Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed May 20 09:23:37 2015 (r283139) +++ head/Makefile.inc1 Wed May 20 09:36:25 2015 (r283140) @@ -1502,6 +1502,9 @@ _clang_libs= lib/clang _cc= gnu/usr.bin/cc .endif .endif +.if ${MK_USB} != "no" +_usb_tools= sys/boot/usb/tools +.endif cross-tools: .MAKE .for _tool in \ @@ -1512,7 +1515,7 @@ cross-tools: .MAKE ${_cc} \ ${_btxld} \ ${_crunchide} \ - sys/boot/usb/tools + ${_usb_tools} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ From owner-svn-src-head@FreeBSD.ORG Wed May 20 09:40:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80689108; Wed, 20 May 2015 09:40:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 554941CDA; Wed, 20 May 2015 09:40:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4K9eZTB060232; Wed, 20 May 2015 09:40:35 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4K9eZud060231; Wed, 20 May 2015 09:40:35 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505200940.t4K9eZud060231@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 20 May 2015 09:40:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283141 - head/usr.sbin/uefisign X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 09:40:35 -0000 Author: trasz Date: Wed May 20 09:40:34 2015 New Revision: 283141 URL: https://svnweb.freebsd.org/changeset/base/283141 Log: Remove the warning about invalid PE checksum; apparently nothing cares about those checksums anyway. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/uefisign/pe.c Modified: head/usr.sbin/uefisign/pe.c ============================================================================== --- head/usr.sbin/uefisign/pe.c Wed May 20 09:36:25 2015 (r283140) +++ head/usr.sbin/uefisign/pe.c Wed May 20 09:40:34 2015 (r283141) @@ -346,7 +346,9 @@ static void parse_optional_32_plus(struct executable *x, off_t off, int number_of_sections) { +#if 0 uint32_t computed_checksum; +#endif const struct pe_optional_header_32_plus *po; range_check(x, off, sizeof(*po), "PE Optional Header"); @@ -373,13 +375,13 @@ parse_optional_32_plus(struct executable #if 0 printf("checksum 0x%x at offset %zd, len %zd\n", po->po_checksum, x->x_checksum_off, x->x_checksum_len); -#endif computed_checksum = compute_checksum(x); if (computed_checksum != po->po_checksum) { warnx("invalid PE+ checksum; is 0x%x, should be 0x%x", po->po_checksum, computed_checksum); } +#endif if (x->x_len < x->x_headers_len) errx(1, "invalid SizeOfHeaders %d", po->po_size_of_headers); @@ -393,7 +395,9 @@ parse_optional_32_plus(struct executable static void parse_optional_32(struct executable *x, off_t off, int number_of_sections) { +#if 0 uint32_t computed_checksum; +#endif const struct pe_optional_header_32 *po; range_check(x, off, sizeof(*po), "PE Optional Header"); @@ -420,13 +424,13 @@ parse_optional_32(struct executable *x, #if 0 printf("checksum at offset %zd, len %zd\n", x->x_checksum_off, x->x_checksum_len); -#endif computed_checksum = compute_checksum(x); if (computed_checksum != po->po_checksum) { warnx("invalid PE checksum; is 0x%x, should be 0x%x", po->po_checksum, computed_checksum); } +#endif if (x->x_len < x->x_headers_len) errx(1, "invalid SizeOfHeaders %d", po->po_size_of_headers); From owner-svn-src-head@FreeBSD.ORG Wed May 20 09:42:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3584369; Wed, 20 May 2015 09:42:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 923721DD1; Wed, 20 May 2015 09:42:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4K9gYAq064063; Wed, 20 May 2015 09:42:34 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4K9gYFp064062; Wed, 20 May 2015 09:42:34 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201505200942.t4K9gYFp064062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 20 May 2015 09:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283142 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 09:42:34 -0000 Author: glebius Date: Wed May 20 09:42:33 2015 New Revision: 283142 URL: https://svnweb.freebsd.org/changeset/base/283142 Log: EVENTHANDLER_REGISTER() doesn't fail. Modified: head/sys/net80211/ieee80211_freebsd.c Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Wed May 20 09:40:34 2015 (r283141) +++ head/sys/net80211/ieee80211_freebsd.c Wed May 20 09:42:33 2015 (r283142) @@ -873,14 +873,8 @@ wlan_modevent(module_t mod, int type, vo printf("wlan: <802.11 Link Layer>\n"); wlan_bpfevent = EVENTHANDLER_REGISTER(bpf_track, bpf_track, 0, EVENTHANDLER_PRI_ANY); - if (wlan_bpfevent == NULL) - return ENOMEM; wlan_ifllevent = EVENTHANDLER_REGISTER(iflladdr_event, wlan_iflladdr, NULL, EVENTHANDLER_PRI_ANY); - if (wlan_ifllevent == NULL) { - EVENTHANDLER_DEREGISTER(bpf_track, wlan_bpfevent); - return ENOMEM; - } #if __FreeBSD_version >= 1000020 wlan_cloner = if_clone_simple(wlanname, wlan_clone_create, wlan_clone_destroy, 0); From owner-svn-src-head@FreeBSD.ORG Wed May 20 10:06:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AECA814; Wed, 20 May 2015 10:06:31 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 79DC410B6; Wed, 20 May 2015 10:06:30 +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 4A99425D38A5; Wed, 20 May 2015 10:06:21 +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 6D125C76FED; Wed, 20 May 2015 10:06:20 +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 0F1Oy_tZ6v7d; Wed, 20 May 2015 10:06:19 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (orange-tun0-ula.sbone.de [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id EA1EEC76FEC; Wed, 20 May 2015 10:06:18 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r283139 - head From: "Bjoern A. Zeeb" In-Reply-To: <201505200923.t4K9NcsI054240@svn.freebsd.org> Date: Wed, 20 May 2015 10:06:17 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201505200923.t4K9NcsI054240@svn.freebsd.org> To: Baptiste Daroussin X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 10:06:31 -0000 > On 20 May 2015, at 09:23 , Baptiste Daroussin = wrote: >=20 > Author: bapt > Date: Wed May 20 09:23:37 2015 > New Revision: 283139 > URL: https://svnweb.freebsd.org/changeset/base/283139 >=20 > Log: > Fix buildworld by adding libproc and librtld_db to the _prebuild_libs > Those are needed to build libdtrace Still seeing build failures for sparc64 and arm64 even after this. Could you please check? =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-head@FreeBSD.ORG Wed May 20 10:56:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86BB4E99; Wed, 20 May 2015 10:56:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 749C1163E; Wed, 20 May 2015 10:56:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KAuA2p098676; Wed, 20 May 2015 10:56:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KAuAOH098675; Wed, 20 May 2015 10:56:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505201056.t4KAuAOH098675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 20 May 2015 10:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283143 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 10:56:10 -0000 Author: ngie Date: Wed May 20 10:56:09 2015 New Revision: 283143 URL: https://svnweb.freebsd.org/changeset/base/283143 Log: Remove usr/share/dtrace/{tcpconn,tcpstate,tcptrack,udptrack} if MK_CDDL == no Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed May 20 09:42:33 2015 (r283142) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed May 20 10:56:09 2015 (r283143) @@ -781,6 +781,10 @@ OLD_FILES+=usr/share/dtrace/toolkit/hotk OLD_FILES+=usr/share/dtrace/toolkit/hotuser OLD_FILES+=usr/share/dtrace/toolkit/opensnoop OLD_FILES+=usr/share/dtrace/toolkit/procsystime +OLD_FILES+=usr/share/dtrace/tcpconn +OLD_FILES+=usr/share/dtrace/tcpstate +OLD_FILES+=usr/share/dtrace/tcptrack +OLD_FILES+=usr/share/dtrace/udptrack OLD_FILES+=usr/share/man/man1/dtrace.1.gz OLD_DIRS+=usr/lib/dtrace OLD_DIRS+=usr/lib32/dtrace From owner-svn-src-head@FreeBSD.ORG Wed May 20 11:03:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CCA4104; Wed, 20 May 2015 11:03:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AFD7171F; Wed, 20 May 2015 11:03:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KB3sAM003433; Wed, 20 May 2015 11:03:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KB3sIV003432; Wed, 20 May 2015 11:03:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505201103.t4KB3sIV003432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 20 May 2015 11:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283144 - head/cddl/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 11:03:54 -0000 Author: ngie Date: Wed May 20 11:03:53 2015 New Revision: 283144 URL: https://svnweb.freebsd.org/changeset/base/283144 Log: Articulate dependencies for cddl/lib/libdtrace and cddl/lib/libzfs Parallelize the build in this subdirectory MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/lib/Makefile Modified: head/cddl/lib/Makefile ============================================================================== --- head/cddl/lib/Makefile Wed May 20 10:56:09 2015 (r283143) +++ head/cddl/lib/Makefile Wed May 20 11:03:53 2015 (r283144) @@ -33,4 +33,9 @@ _drti= drti _libdtrace= libdtrace .endif +SUBDIR_DEPEND_libdtrace= libctf +SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core + +SUBDIR_PARALLEL= + .include From owner-svn-src-head@FreeBSD.ORG Wed May 20 11:16:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBE8E428; Wed, 20 May 2015 11:16:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9CF7184F; Wed, 20 May 2015 11:16:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KBGHbC008663; Wed, 20 May 2015 11:16:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KBGHsl008662; Wed, 20 May 2015 11:16:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505201116.t4KBGHsl008662@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 20 May 2015 11:16:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283145 - head/cddl/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 11:16:17 -0000 Author: ngie Date: Wed May 20 11:16:17 2015 New Revision: 283145 URL: https://svnweb.freebsd.org/changeset/base/283145 Log: Add dependencies for libzfs_core and libzpool I missed on my first pass on this Makefile MFC with: r283144 Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/lib/Makefile Modified: head/cddl/lib/Makefile ============================================================================== --- head/cddl/lib/Makefile Wed May 20 11:03:53 2015 (r283144) +++ head/cddl/lib/Makefile Wed May 20 11:16:17 2015 (r283145) @@ -34,7 +34,9 @@ _libdtrace= libdtrace .endif SUBDIR_DEPEND_libdtrace= libctf +SUBDIR_DEPEND_libzfs_core= libnvpair SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core +SUBDIR_DEPEND_libzpool= libavl libnvpair libumem SUBDIR_PARALLEL= From owner-svn-src-head@FreeBSD.ORG Wed May 20 11:57:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 649DAD44; Wed, 20 May 2015 11:57:05 +0000 (UTC) Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38ADA1CBF; Wed, 20 May 2015 11:57:05 +0000 (UTC) Received: by pabts4 with SMTP id ts4so64682212pab.3; Wed, 20 May 2015 04:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=Kq+B3kRfZR+ByXLArspfd9j/N7vMx/NpPpg2NE2ORiw=; b=OTaukNa5G6LMKA3J3IlwhfIxcK5vFqLTGqbQ8Bh374LtS5epnajMzzXuwHW6zV65zV jvxMu9kp2wKy9S5gOYUs1HCkb4KlQ4hOI8IxqfAWEZMa+Xqqf6SKxCfRTdGHpCqRuVk9 lMdBR1js2NYSr9h2v4+SYiiZkbws7/nbZY6zDg61E4La5kQyAJq36wznIkQkJQiWNzew JmZekOkKDKTgJqAcWaTuQ4z5jcXtHj7WvLJlfRQAn6BNhUhT9BshRf7XGWcKPkt3Vohv RePK/eVPTWd6RP8WP1NEhjd5U/FbnY5D/O9X6DUydEtnTGX3vW2wIOje6B41Pzt4lk9h mRGQ== X-Received: by 10.68.221.70 with SMTP id qc6mr62659546pbc.76.1432123024655; Wed, 20 May 2015 04:57:04 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:d5de:dc48:8df9:aa7e? ([2601:8:ab80:7d6:d5de:dc48:8df9:aa7e]) by mx.google.com with ESMTPSA id pc9sm16002989pdb.6.2015.05.20.04.57.03 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 May 2015 04:57:03 -0700 (PDT) Subject: Re: svn commit: r283139 - head Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_9FF643D1-341F-4A3E-BBD3-4634175DAAD0"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: Date: Wed, 20 May 2015 04:56:59 -0700 Cc: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <0DB1E08A-CBC5-45DD-9DDA-623065E38E5A@gmail.com> References: <201505200923.t4K9NcsI054240@svn.freebsd.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 11:57:05 -0000 --Apple-Mail=_9FF643D1-341F-4A3E-BBD3-4634175DAAD0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On May 20, 2015, at 3:06, Bjoern A. Zeeb wrote: >> On 20 May 2015, at 09:23 , Baptiste Daroussin = wrote: >>=20 >> Author: bapt >> Date: Wed May 20 09:23:37 2015 >> New Revision: 283139 >> URL: https://svnweb.freebsd.org/changeset/base/283139 >>=20 >> Log: >> Fix buildworld by adding libproc and librtld_db to the _prebuild_libs >> Those are needed to build libdtrace >=20 > Still seeing build failures for sparc64 and arm64 even after this. > Could you please check? There are a few bugs. 1. arm64/sparc64 don=92t have libproc/librtld_db support at all, = so the library spamming in LIBADD and Makefile.inc1 is wrong in those = cases. 2. There are a lot of missing dependencies in Makefile.inc for = the libproc/librtld_db addition. I=92m testing out fixes for both these issues. Thanks, -NGie --Apple-Mail=_9FF643D1-341F-4A3E-BBD3-4634175DAAD0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVXHaNAAoJEMZr5QU6S73e/G0H/1rTJsU8n22dsjzhzx/O4Xib bAKLcurVTYatPd5S28OKRXOen1r5DxGMQ7+z87Xqk2EYSLJi+vdcfGTCFxUuoy7w lW4wYjlOOhcjNuhmqcrqpgY3TQef6AHfXs6sankOg/cljvI+zWQztsRWslRKMxJT XQNcoVvwNh0SPV39zvBW86E4dM78vWm8pPvMSyLgZoN/dNAjsUN/oQFuxe7Gy4my MA4rt+lzp9WSoonZ9Lhd/zWbL3VYmrMgTpnlSO3TktHrM5KUz9oFP4CPjno4dyg2 BE7+U+Wlgzfl4lF9sf/SkAVBs42WrAS2pi/Rf2g/zT2ugh/rdf332ak+tMYnD6Y= =ZtFX -----END PGP SIGNATURE----- --Apple-Mail=_9FF643D1-341F-4A3E-BBD3-4634175DAAD0-- From owner-svn-src-head@FreeBSD.ORG Wed May 20 11:59:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB834EBC; Wed, 20 May 2015 11:59:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C95791CDB; Wed, 20 May 2015 11:59:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KBxrAK028505; Wed, 20 May 2015 11:59:53 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KBxr1A028504; Wed, 20 May 2015 11:59:53 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505201159.t4KBxr1A028504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 20 May 2015 11:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283146 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 11:59:54 -0000 Author: ae Date: Wed May 20 11:59:53 2015 New Revision: 283146 URL: https://svnweb.freebsd.org/changeset/base/283146 Log: In the reply to SADB_X_SPDGET message use the same sequence number that was in the request. Some IKE deamons expect it will the same. Linux and NetBSD also follow this behaviour. PR: 137309 MFC after: 2 weeks Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Wed May 20 11:16:17 2015 (r283145) +++ head/sys/netipsec/key.c Wed May 20 11:59:53 2015 (r283146) @@ -2199,7 +2199,7 @@ key_spddelete2(struct socket *so, struct } /* - * SADB_X_GET processing + * SADB_X_SPDGET processing * receive * * from the user(?), @@ -2237,7 +2237,8 @@ key_spdget(struct socket *so, struct mbu return key_senderror(so, m, ENOENT); } - n = key_setdumpsp(sp, SADB_X_SPDGET, 0, mhp->msg->sadb_msg_pid); + n = key_setdumpsp(sp, SADB_X_SPDGET, mhp->msg->sadb_msg_seq, + mhp->msg->sadb_msg_pid); KEY_FREESP(&sp); if (n != NULL) { m_freem(m); From owner-svn-src-head@FreeBSD.ORG Wed May 20 12:26:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2DB4680; Wed, 20 May 2015 12:26:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 903CB1010; Wed, 20 May 2015 12:26:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KCQAGH043014; Wed, 20 May 2015 12:26:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KCQ9Jq043011; Wed, 20 May 2015 12:26:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505201226.t4KCQ9Jq043011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 20 May 2015 12:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283147 - in head/cddl: sbin usr.bin usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 12:26:10 -0000 Author: ngie Date: Wed May 20 12:26:09 2015 New Revision: 283147 URL: https://svnweb.freebsd.org/changeset/base/283147 Log: Build cddl/{sbin,usr.bin,usr.sbin} in parallel as all of the applications are freestanding (they require libraries build via make libraries in buildworld) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/sbin/Makefile head/cddl/usr.bin/Makefile head/cddl/usr.sbin/Makefile Modified: head/cddl/sbin/Makefile ============================================================================== --- head/cddl/sbin/Makefile Wed May 20 11:59:53 2015 (r283146) +++ head/cddl/sbin/Makefile Wed May 20 12:26:09 2015 (r283147) @@ -13,4 +13,6 @@ _zfs= zfs _zpool= zpool .endif +SUBDIR_PARALLEL= + .include Modified: head/cddl/usr.bin/Makefile ============================================================================== --- head/cddl/usr.bin/Makefile Wed May 20 11:59:53 2015 (r283146) +++ head/cddl/usr.bin/Makefile Wed May 20 12:26:09 2015 (r283147) @@ -26,4 +26,6 @@ _zstreamdump = zstreamdump .endif .endif +SUBDIR_PARALLEL= + .include Modified: head/cddl/usr.sbin/Makefile ============================================================================== --- head/cddl/usr.sbin/Makefile Wed May 20 11:59:53 2015 (r283146) +++ head/cddl/usr.sbin/Makefile Wed May 20 12:26:09 2015 (r283147) @@ -46,4 +46,6 @@ _dtruss= dtruss _lockstat= lockstat .endif +SUBDIR_PARALLEL= + .include From owner-svn-src-head@FreeBSD.ORG Wed May 20 12:46:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAC20E64; Wed, 20 May 2015 12:46:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8A4D1289; Wed, 20 May 2015 12:46:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KCkUJ3053142; Wed, 20 May 2015 12:46:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KCkUPV053141; Wed, 20 May 2015 12:46:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505201246.t4KCkUPV053141@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 20 May 2015 12:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283148 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 12:46:31 -0000 Author: ngie Date: Wed May 20 12:46:30 2015 New Revision: 283148 URL: https://svnweb.freebsd.org/changeset/base/283148 Log: Articulate all dependencies for lib/libproc to squash build races after r283139 on !arm64 and !sparc64 Pointyhat to: bapt Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed May 20 12:26:09 2015 (r283147) +++ head/Makefile.inc1 Wed May 20 12:46:30 2015 (r283148) @@ -1746,6 +1746,8 @@ _generic_libs+= ${_DIR} lib/libopie__L lib/libtacplus__L: lib/libmd__L +lib/libproc__L: lib/libelf__L lib/librtld_db__L lib/libutil__L + .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem _cddl_lib_libnvpair= cddl/lib/libnvpair From owner-svn-src-head@FreeBSD.ORG Wed May 20 12:54:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 161A7439; Wed, 20 May 2015 12:54:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03E3813AA; Wed, 20 May 2015 12:54:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KCsMAw057962; Wed, 20 May 2015 12:54:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KCsMfW057961; Wed, 20 May 2015 12:54:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505201254.t4KCsMfW057961@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 20 May 2015 12:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283149 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 12:54:23 -0000 Author: emaste Date: Wed May 20 12:54:22 2015 New Revision: 283149 URL: https://svnweb.freebsd.org/changeset/base/283149 Log: Avoid trying to build cxbge on 32-bit MIPS It lacks required 64-bit atomics. Reviewed by: imp (earlier version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2585 Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed May 20 12:46:30 2015 (r283148) +++ head/sys/modules/Makefile Wed May 20 12:54:22 2015 (r283149) @@ -456,6 +456,7 @@ _txp= txp .endif .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ + ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \ ${MACHINE_ARCH} != "powerpc" _cxgbe= cxgbe .endif From owner-svn-src-head@FreeBSD.ORG Wed May 20 12:56:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FC5187A; Wed, 20 May 2015 12:56:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DE94142F; Wed, 20 May 2015 12:56:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KCuf0f058583; Wed, 20 May 2015 12:56:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KCuf5n058582; Wed, 20 May 2015 12:56:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505201256.t4KCuf5n058582@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 20 May 2015 12:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283150 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 12:56:41 -0000 Author: ngie Date: Wed May 20 12:56:40 2015 New Revision: 283150 URL: https://svnweb.freebsd.org/changeset/base/283150 Log: Add _more_ missing dependencies for lib/libproc to further squash build races Verified via `cd lib/libproc; make -VLIBADD` Pointyhat to: ngie Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed May 20 12:54:22 2015 (r283149) +++ head/Makefile.inc1 Wed May 20 12:56:40 2015 (r283150) @@ -1746,7 +1746,15 @@ _generic_libs+= ${_DIR} lib/libopie__L lib/libtacplus__L: lib/libmd__L -lib/libproc__L: lib/libelf__L lib/librtld_db__L lib/libutil__L +lib/libproc__L: \ + cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L +.if ${MK_CXX} != "no" +.if ${MK_LIBCPLUSPLUS} != "no" +lib/libproc__L: lib/libc++ +.else +lib/libproc__L: gnu/lib/libsupc++__L +.endif +.endif .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem From owner-svn-src-head@FreeBSD.ORG Wed May 20 13:04:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8D21C66; Wed, 20 May 2015 13:04:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B73301588; Wed, 20 May 2015 13:04:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KD41rE063190; Wed, 20 May 2015 13:04:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KD41Bn063189; Wed, 20 May 2015 13:04:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505201304.t4KD41Bn063189@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 20 May 2015 13:04:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283151 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 13:04:01 -0000 Author: ngie Date: Wed May 20 13:04:00 2015 New Revision: 283151 URL: https://svnweb.freebsd.org/changeset/base/283151 Log: cddl/lib/libctf isn't always a requirement for lib/libproc; its use is dependent on MK_CTF != "no". Use the other divined value instead of reinventing the wheel Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed May 20 12:56:40 2015 (r283150) +++ head/Makefile.inc1 Wed May 20 13:04:00 2015 (r283151) @@ -1747,7 +1747,7 @@ _generic_libs+= ${_DIR} lib/libopie__L lib/libtacplus__L: lib/libmd__L lib/libproc__L: \ - cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L + ${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L .if ${MK_CXX} != "no" .if ${MK_LIBCPLUSPLUS} != "no" lib/libproc__L: lib/libc++ From owner-svn-src-head@FreeBSD.ORG Wed May 20 13:05:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B08CDB6; Wed, 20 May 2015 13:05:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 490D21595; Wed, 20 May 2015 13:05:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KD5YbP063465; Wed, 20 May 2015 13:05:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KD5Ybx063464; Wed, 20 May 2015 13:05:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505201305.t4KD5Ybx063464@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 20 May 2015 13:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283152 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 13:05:34 -0000 Author: ngie Date: Wed May 20 13:05:33 2015 New Revision: 283152 URL: https://svnweb.freebsd.org/changeset/base/283152 Log: Unbreak the arm64/sparc64 tinderbox by only compiling lib/libproc and lib/librtld_db on architectures where they're supported Reported by: bz, Jenkins Pointyhat to: bapt Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed May 20 13:04:00 2015 (r283151) +++ head/Makefile.inc1 Wed May 20 13:05:33 2015 (r283152) @@ -1694,8 +1694,6 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libopie lib/libpam ${_lib_libthr} \ ${_lib_libradius} lib/libsbuf lib/libtacplus \ lib/libgeom \ - lib/libproc \ - lib/librtld_db \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libuutil} \ ${_cddl_lib_libavl} \ @@ -1767,6 +1765,13 @@ _cddl_lib= cddl/lib cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L cddl/lib/libzfs__L: lib/libgeom__L cddl/lib/libctf__L: lib/libz__L +# cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built +# on select architectures though (see cddl/lib/Makefile) +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" || \ + ${MACHINE_CPUARCH} == "arm" +_prebuild_libs+= lib/libproc lib/librtld_db +.endif .endif .if ${MK_CRYPT} != "no" From owner-svn-src-head@FreeBSD.ORG Wed May 20 13:19:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D576323; Wed, 20 May 2015 13:19:26 +0000 (UTC) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 404D51729; Wed, 20 May 2015 13:19:26 +0000 (UTC) Received: from marvin.lab.vangyzen.net (c-73-147-253-17.hsd1.va.comcast.net [73.147.253.17]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 37DD656467; Wed, 20 May 2015 08:19:25 -0500 (CDT) Message-ID: <555C89F4.9080607@FreeBSD.org> Date: Wed, 20 May 2015 09:19:48 -0400 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Lawrence Stewart , Hiren Panchasara CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283136 - head/sys/netinet References: <201505200108.t4K181No006311@svn.freebsd.org> <555C09D5.9090709@freebsd.org> <20150520042438.GA95600@strugglingcoder.info> <555C2ABC.60102@freebsd.org> In-Reply-To: <555C2ABC.60102@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 13:19:26 -0000 On 05/20/2015 02:33, Lawrence Stewart wrote: > On 05/20/15 14:24, Hiren Panchasara wrote: >> On 05/20/15 at 02:13P, Lawrence Stewart wrote: >>> Hi Hiren, >>> >>> On 05/20/15 11:08, Hiren Panchasara wrote: >>>> Author: hiren Date: Wed May 20 01:08:01 2015 New Revision: >>>> 283136 URL: https://svnweb.freebsd.org/changeset/base/283136 >>>> >>>> Log: Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to >>>> expire and purge all entries in hostcache immediately. >>>> >>>> In collaboration with: bz, rwatson MFC after: 1 week Relnotes: >>>> yes Sponsored by: Limelight Networks >>> >>> Why introduce a new sysctl and not change the existing behaviour >>> of net.inet.tcp.hostcache.purge? >> >> I thought it'd make more sense to keep the existing behavior as is >> and provide new knob for the new behavior. > > Don't think so - why would deferring a purge to the next purge run be > useful compared to purging immediately? I'd strongly suggest you adapt > this change to the existing purge sysctl. I can't see why anyone would > miss the old functionality. I am generally wary of a question such as "Why would anyone want...", because as soon as the code is released, someone answers it. That being said, I have always wanted Hiren's purgenow behavior, and I've always been annoyed by the lazy-purge behavior. I would suggest implementing Lawrence's suggestion, but NOT MFC'ing it, since that would be a disruptive change. Thanks for your work, Hiren. Eric From owner-svn-src-head@FreeBSD.ORG Wed May 20 15:37:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED498A3C; Wed, 20 May 2015 15:37:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBBE51956; Wed, 20 May 2015 15:37:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KFbFqe037116; Wed, 20 May 2015 15:37:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KFbFRT037115; Wed, 20 May 2015 15:37:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505201537.t4KFbFRT037115@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 May 2015 15:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283153 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 15:37:16 -0000 Author: kib Date: Wed May 20 15:37:15 2015 New Revision: 283153 URL: https://svnweb.freebsd.org/changeset/base/283153 Log: Remove the write-only variable phent. We currently do not check the size of the program header's entries. Reported by: adrian (by using gcc 4.9) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/gen/dlfcn.c Modified: head/lib/libc/gen/dlfcn.c ============================================================================== --- head/lib/libc/gen/dlfcn.c Wed May 20 13:05:33 2015 (r283152) +++ head/lib/libc/gen/dlfcn.c Wed May 20 15:37:15 2015 (r283153) @@ -149,10 +149,8 @@ static void dl_init_phdr_info(void) { Elf_Auxinfo *auxp; - size_t phent; unsigned int i; - phent = 0; for (auxp = __elf_aux_vector; auxp->a_type != AT_NULL; auxp++) { switch (auxp->a_type) { case AT_BASE: @@ -165,9 +163,6 @@ dl_init_phdr_info(void) phdr_info.dlpi_phdr = (const Elf_Phdr *)auxp->a_un.a_ptr; break; - case AT_PHENT: - phent = auxp->a_un.a_val; - break; case AT_PHNUM: phdr_info.dlpi_phnum = (Elf_Half)auxp->a_un.a_val; break; From owner-svn-src-head@FreeBSD.ORG Wed May 20 16:01:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDDF4451; Wed, 20 May 2015 16:01:07 +0000 (UTC) Received: from mail-qg0-x22d.google.com (mail-qg0-x22d.google.com [IPv6:2607:f8b0:400d:c04::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8772C1C6C; Wed, 20 May 2015 16:01:07 +0000 (UTC) Received: by qgez61 with SMTP id z61so21897113qge.1; Wed, 20 May 2015 09:01:06 -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:in-reply-to:references :mime-version:content-type; bh=6P6fBblZujJpep52Lkjj9uiBNag3GR/XCBP4Y3wcVCY=; b=eAqBHe+h0v4R2h3ZmfJID0lqtOZRAu9ul8kUCC4Zo3kuQRmVJvG9ra+jkZGdX7I1KI tqFtJN8p8OubM38jL+0KZjBzGEx5kOEhamzoHDKyrQ67zsFoXrRatL0r3dmR1PVsN/Dz iycMc/4aHpIJa8PC/qnIcuImwiOoSBLv9rNUw8nzc4zJKAMPNx2HHD5c7fYFJQUgBpSj 7RNogWNzhQ9BeoK7h5iwu+TL1nojsxBIkIrKNCEdG8oUdXM0Lc3T9PTVR2A9eFmTmFb1 nZBO5cZuOWvth1h5yfgA1+xRSB0OD0W8c/vSs9TGm8YLmIVhNp9Mw9tolNVZWmQCBbm6 hK/w== X-Received: by 10.140.233.140 with SMTP id e134mr46616379qhc.63.1432137666574; Wed, 20 May 2015 09:01:06 -0700 (PDT) Received: from kan ([2601:6:6780:7e0:226:18ff:fe00:232e]) by mx.google.com with ESMTPSA id o4sm11472719qko.49.2015.05.20.09.01.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 09:01:05 -0700 (PDT) Date: Wed, 20 May 2015 12:00:46 -0400 From: Alexander Kabaev To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282971 - in head/sys: kern sys Message-ID: <20150520120046.268dde86@kan> In-Reply-To: <201505151350.t4FDocQT054144@svn.freebsd.org> References: <201505151350.t4FDocQT054144@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/alw=CGttxZ_+MlnkAqn6sCP"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 16:01:08 -0000 --Sig_/alw=CGttxZ_+MlnkAqn6sCP Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 15 May 2015 13:50:38 +0000 (UTC) John Baldwin wrote: > Author: jhb > Date: Fri May 15 13:50:37 2015 > New Revision: 282971 > URL: https://svnweb.freebsd.org/changeset/base/282971 >=20 > Log: > Previously, cv_waiters was only updated by cv_signal or cv_wait. If > a thread awakened due to a time out, then cv_waiters was not > decremented. If INT_MAX threads timed out on a cv without an > intervening cv_broadcast, then cv_waiters could overflow. To fix > this, have each sleeping thread decrement cv_waiters when it resumes. > =20 > Note that previously cv_waiters was protected by the sleepq chain > lock. However, that lock is not held when threads resume from sleep. > In addition, the interlock is also not always reacquired after > resuming (cv_wait_unlock), nor is it always held by callers of > cv_signal() or cv_broadcast(). Instead, use atomic ops to update > cv_waiters. Since the sleepq chain lock is still held on every > increment, it should still be safe to compare cv_waiters against zero > while holding the lock in the wakeup routines as the only way the > race should be lost would result in extra calls to sleepq_signal() or > sleepq_broadcast().=20 > Differential Revision: https://reviews.freebsd.org/D2427 > Reviewed by: benno > Reported by: benno (wrap of cv_waiters in the field) > MFC after: 2 weeks >=20 > Modified: > head/sys/kern/kern_condvar.c > head/sys/sys/condvar.h >=20 This breaks ZFS range locking code, which expects to be able to wakeup everyone on the condition variable and then free the structure that contains it. Having woken up threads modify cv_waiters results in a race that leads to already freed memory to be accessed. It is debatable just how correct ZFS code in its expectations, but I think this commit should probably be reverted until either ZFS is changed not to expect cv modifiable by waking threads or until alternative solution is found to the cv_waiters overflow issue fixed by this commit. --=20 Alexander Kabaev --Sig_/alw=CGttxZ_+MlnkAqn6sCP Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlVcr68ACgkQQ6z1jMm+XZYUBQCgoDBcawgQ7bMmkMGelCj7UfDm y4QAniQ2Vyyzzhc5s+8uwWeAYyZrDwdm =92dI -----END PGP SIGNATURE----- --Sig_/alw=CGttxZ_+MlnkAqn6sCP-- From owner-svn-src-head@FreeBSD.ORG Wed May 20 16:54:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F3A7193; Wed, 20 May 2015 16:54:48 +0000 (UTC) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [IPv6:2a00:1450:4010:c03::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9911213DA; Wed, 20 May 2015 16:54:47 +0000 (UTC) Received: by lagv1 with SMTP id v1so83455512lag.3; Wed, 20 May 2015 09:54:45 -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:message-id:subject :from:to:cc:content-type; bh=Owpo9W10Xkyfd6JLlWI+VFFJ21SJts9mZ2Pzvb4lLmY=; b=W5KYcGrjsFisO1Y4FcOMCP2t/+7rAcayroBJpOfHT+oJ2iSLRJeDVfxml5zSWop5pE 2oGSk0zFOK4c75ah2TpuRUMRrBfcGaJsZgL91pq8TewSLr87RudvGlhEAB10qHwGcakC fSa1372FsxEZu23WuJ8QyxDnwyEFdt9ihyMeIZyQtwj6xdrlEKml+U8vE9X0caAxAkE0 Eg0GUwanjy7CoiGA7vnXt7hqS5wMM6EHayLHwmgzCGCMXwqyja4D8GDCwk3sZ75u8Aye 5JrU85BMl4ZM29nhK2+/GWy6QnhKspctAPiFVePyBW8asmbKt5k6LNN80sBuk6oxEngr g1Pg== MIME-Version: 1.0 X-Received: by 10.152.87.13 with SMTP id t13mr18911493laz.66.1432140885726; Wed, 20 May 2015 09:54:45 -0700 (PDT) Sender: mahrens@gmail.com Received: by 10.112.188.164 with HTTP; Wed, 20 May 2015 09:54:45 -0700 (PDT) In-Reply-To: <20150520120046.268dde86@kan> References: <201505151350.t4FDocQT054144@svn.freebsd.org> <20150520120046.268dde86@kan> Date: Wed, 20 May 2015 09:54:45 -0700 X-Google-Sender-Auth: ieM0oatELuoy8IdWwcJb--liBUE Message-ID: Subject: Re: svn commit: r282971 - in head/sys: kern sys From: Matthew Ahrens To: Alexander Kabaev Cc: John Baldwin , "src-committers@freebsd.org" , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 16:54:48 -0000 On Wed, May 20, 2015 at 9:00 AM, Alexander Kabaev wrote: > On Fri, 15 May 2015 13:50:38 +0000 (UTC) > John Baldwin wrote: > > > Author: jhb > > Date: Fri May 15 13:50:37 2015 > > New Revision: 282971 > > URL: https://svnweb.freebsd.org/changeset/base/282971 > > > > Log: > > Previously, cv_waiters was only updated by cv_signal or cv_wait. If > > a thread awakened due to a time out, then cv_waiters was not > > decremented. If INT_MAX threads timed out on a cv without an > > intervening cv_broadcast, then cv_waiters could overflow. To fix > > this, have each sleeping thread decrement cv_waiters when it resumes. > > > > Note that previously cv_waiters was protected by the sleepq chain > > lock. However, that lock is not held when threads resume from sleep. > > In addition, the interlock is also not always reacquired after > > resuming (cv_wait_unlock), nor is it always held by callers of > > cv_signal() or cv_broadcast(). Instead, use atomic ops to update > > cv_waiters. Since the sleepq chain lock is still held on every > > increment, it should still be safe to compare cv_waiters against zero > > while holding the lock in the wakeup routines as the only way the > > race should be lost would result in extra calls to sleepq_signal() or > > sleepq_broadcast(). > > Differential Revision: https://reviews.freebsd.org/D2427 > > Reviewed by: benno > > Reported by: benno (wrap of cv_waiters in the field) > > MFC after: 2 weeks > > > > Modified: > > head/sys/kern/kern_condvar.c > > head/sys/sys/condvar.h > > > > This breaks ZFS range locking code, which expects to be able to wakeup > everyone on the condition variable and then free the structure that > contains it. Having woken up threads modify cv_waiters results in a > race that leads to already freed memory to be accessed. > > It is debatable just how correct ZFS code in its expectations, but I > think this commit should probably be reverted until either ZFS is > changed not to expect cv modifiable by waking threads or until > alternative solution is found to the cv_waiters overflow issue fixed by > this commit. > > It isn't clear to me how the zfs_range_unlock() code could know when all the waiters have woken up and updated the CV, and thus it's safe to destroy/free the CV. Would the woken threads ask, "was I the last thread to be woken by this CV" and if so free the struct containing the CV? Obviously such a check would need to ensure that the other threads have completed their updates to the CV. --matt From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:02:29 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A0094B6; Wed, 20 May 2015 17:02:29 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3BF1D1543; Wed, 20 May 2015 17:02:27 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA17921; Wed, 20 May 2015 20:02:20 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Yv7Nr-000DzU-LL; Wed, 20 May 2015 20:02:19 +0300 Message-ID: <555CBDE2.6080401@FreeBSD.org> Date: Wed, 20 May 2015 20:01:22 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Garrett Cooper , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r283151 - head References: <201505201304.t4KD41Bn063189@svn.freebsd.org> In-Reply-To: <201505201304.t4KD41Bn063189@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:02:29 -0000 On 20/05/2015 16:04, Garrett Cooper wrote: > Author: ngie > Date: Wed May 20 13:04:00 2015 > New Revision: 283151 > URL: https://svnweb.freebsd.org/changeset/base/283151 > > Log: > cddl/lib/libctf isn't always a requirement for lib/libproc; its use is dependent > on MK_CTF != "no". Use the other divined value instead of reinventing the wheel > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > ============================================================================== > --- head/Makefile.inc1 Wed May 20 12:56:40 2015 (r283150) > +++ head/Makefile.inc1 Wed May 20 13:04:00 2015 (r283151) > @@ -1747,7 +1747,7 @@ _generic_libs+= ${_DIR} > lib/libopie__L lib/libtacplus__L: lib/libmd__L > > lib/libproc__L: \ > - cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L > + ${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L > .if ${MK_CXX} != "no" > .if ${MK_LIBCPLUSPLUS} != "no" > lib/libproc__L: lib/libc++ > I've just experienced a buildworld failure in lib/libproc. The build complained about missing -lctf. At this moment I am not sure if that was a parallel build issue or something caused by this commit. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:12:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE1E39A9 for ; Wed, 20 May 2015 17:12:12 +0000 (UTC) Received: from mail-qk0-f178.google.com (mail-qk0-f178.google.com [209.85.220.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CCFF16B7 for ; Wed, 20 May 2015 17:12:12 +0000 (UTC) Received: by qkdn188 with SMTP id n188so31283481qkd.2 for ; Wed, 20 May 2015 10:12:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:organization:content-type:mime-version; bh=gt2wFHO6eM3icJddApHh1h1gIiDO61QQYMAIn7VMiLM=; b=FksEFxJHMyHEvmHzI5ZTvOIdpEASNl9MAWRqnnGcLiYwZ2Q3flnZRYFR9Hb7gyoEgd CVrpJPxd7RTKCPt2g5m+mD6MPfR11TZkh62yxo3xf6v3e8M+5Mh8oJA/VIpwy5LUz2gv tN4qxSYH58diYxKRqyeKYAr2+0UpfYjaogWwWtVPWHbcI8NBeHMVpFcHVPEBDwKbYfcb /N/LrA6EEdYYDaKI0cavqWaxIe13xPGxPIM/wSmaUmbkSFSRbvw9ibUItuyHMmR9ptsR /sLMLRJqEA57JKQ85tUydPxdni7N2tG5PzNf4XeO5+shYXe2YnXcrgQ8JuNuTNeU2PB0 qd3w== X-Gm-Message-State: ALoCoQk2vinTX5fMFOYY/Tn30wlxjtsXy27iizW9Wp0z878+4ck+I+MgI0RWjfQH8KgwsLeqE+yc X-Received: by 10.140.92.132 with SMTP id b4mr22047869qge.93.1432141931056; Wed, 20 May 2015 10:12:11 -0700 (PDT) Received: from [192.168.1.103] ([129.6.250.136]) by mx.google.com with ESMTPSA id 69sm11447416qhv.17.2015.05.20.10.12.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 10:12:09 -0700 (PDT) Message-ID: <1432141926.4153.7.camel@hardenedbsd.org> Subject: Re: svn commit: r283151 - head From: Shawn Webb To: Andriy Gapon Cc: Garrett Cooper , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Date: Wed, 20 May 2015 13:12:06 -0400 In-Reply-To: <555CBDE2.6080401@FreeBSD.org> References: <201505201304.t4KD41Bn063189@svn.freebsd.org> <555CBDE2.6080401@FreeBSD.org> Organization: HardenedBSD Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-0N4M+W6zFKzl4WTDMjP8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:12:12 -0000 --=-0N4M+W6zFKzl4WTDMjP8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2015-05-20 at 20:01 +0300, Andriy Gapon wrote: > On 20/05/2015 16:04, Garrett Cooper wrote: > > Author: ngie > > Date: Wed May 20 13:04:00 2015 > > New Revision: 283151 > > URL: https://svnweb.freebsd.org/changeset/base/283151 > >=20 > > Log: > > cddl/lib/libctf isn't always a requirement for lib/libproc; its use i= s dependent > > on MK_CTF !=3D "no". Use the other divined value instead of reinventi= ng the wheel > >=20 > > Modified: > > head/Makefile.inc1 > >=20 > > Modified: head/Makefile.inc1 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/Makefile.inc1 Wed May 20 12:56:40 2015 (r283150) > > +++ head/Makefile.inc1 Wed May 20 13:04:00 2015 (r283151) > > @@ -1747,7 +1747,7 @@ _generic_libs+=3D ${_DIR} > > lib/libopie__L lib/libtacplus__L: lib/libmd__L > > =20 > > lib/libproc__L: \ > > - cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L > > + ${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L > > .if ${MK_CXX} !=3D "no" > > .if ${MK_LIBCPLUSPLUS} !=3D "no" > > lib/libproc__L: lib/libc++ > >=20 >=20 > I've just experienced a buildworld failure in lib/libproc. The build com= plained > about missing -lctf. At this moment I am not sure if that was a parallel= build > issue or something caused by this commit. >=20 Single-job builds work fine. Parallelized builds (-j16 for me) fail. Lots of buildworld errors are hitting the current@ mailing list. Thanks, Shawn --=-0N4M+W6zFKzl4WTDMjP8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJVXMBmAAoJEGqEZY9SRW7umPMP/RqftAqCiN1OBscFAgTz7Ehn 0RruUUEG4kUxvx9XVSGvUXOb74WOacOHZBIMM8Ye+88PjXIpyFhezWt/Cp3x8eLQ tOZNTTW6Q8Xza1ZgVW2pMrTXchqyY45yI7reHLNYbVSAVsx7/0X13oVu8sTRs1wz uxxXHO9Ri/nMQumqNvJtEf3MasnzOA5EO0zkK21DRhud3PZbMv8s20BJQ32GTLkh Cpn3dxU7Pv/QYbM044bLTy3gtciBkP0DqxkZAqbopdJA1as85OlqKEGav3r2FboU 7lWbg/CLNR95fYdoBtOxdep1Vx8Bz6RrYzIlh+SJaX8wWpAUm7tAjMlE4+jh9x5Z Iozb7zsxu3dvjkZp67kfVwZgeipnWqsrGNB04OtUngJ6DQjWF2gnCRfwtNE+g+ST uMJtro2SB5FOT9OxFymsw15pbk00+WvQl3OPsY8aaXyBD8omIn/13NftI6FnjQHE QhrSfd/YAaSl6aPdq7RtYFJ7fQTNpQbeUjePJkoXA/MkQyT0wRcrZnGsnALwiVyB g8DRg9AzO2VqLqZH0KRNf552ysQfvVAmuwG1cznL4OwURESckuOj9jR3Kswvtqxy jk2L5Gx2uOxeD14YzngJ81U6bwZnMwvPMOZD7eCkteMP7GyBgjz+/+/36fbIGDuH rPw5IxVQvVU7DNHPxDU6 =Lls5 -----END PGP SIGNATURE----- --=-0N4M+W6zFKzl4WTDMjP8-- From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:25:59 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D015AE; Wed, 20 May 2015 17:25:59 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id DF8AB183D; Wed, 20 May 2015 17:25:57 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA18233; Wed, 20 May 2015 20:25:55 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Yv7kh-000E0g-FR; Wed, 20 May 2015 20:25:55 +0300 Message-ID: <555CC352.60302@FreeBSD.org> Date: Wed, 20 May 2015 20:24:34 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Garrett Cooper , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r283151 - head References: <201505201304.t4KD41Bn063189@svn.freebsd.org> <555CBDE2.6080401@FreeBSD.org> In-Reply-To: <555CBDE2.6080401@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:25:59 -0000 On 20/05/2015 20:01, Andriy Gapon wrote: > On 20/05/2015 16:04, Garrett Cooper wrote: >> Author: ngie >> Date: Wed May 20 13:04:00 2015 >> New Revision: 283151 >> URL: https://svnweb.freebsd.org/changeset/base/283151 >> >> Log: >> cddl/lib/libctf isn't always a requirement for lib/libproc; its use is dependent >> on MK_CTF != "no". Use the other divined value instead of reinventing the wheel >> >> Modified: >> head/Makefile.inc1 >> >> Modified: head/Makefile.inc1 >> ============================================================================== >> --- head/Makefile.inc1 Wed May 20 12:56:40 2015 (r283150) >> +++ head/Makefile.inc1 Wed May 20 13:04:00 2015 (r283151) >> @@ -1747,7 +1747,7 @@ _generic_libs+= ${_DIR} >> lib/libopie__L lib/libtacplus__L: lib/libmd__L >> >> lib/libproc__L: \ >> - cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L >> + ${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L Should the above perhaps be ${_cddl_lib_libctf}__L? But such that it is empty if _cddl_lib_libctf is unset. Not sure how to express that with the make syntax. In shell it'd be ${_cddl_lib_libctf:+${_cddl_lib_libctf}__L}. >> .if ${MK_CXX} != "no" >> .if ${MK_LIBCPLUSPLUS} != "no" >> lib/libproc__L: lib/libc++ >> > > I've just experienced a buildworld failure in lib/libproc. The build complained > about missing -lctf. At this moment I am not sure if that was a parallel build > issue or something caused by this commit. > -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:28:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D59C2B1; Wed, 20 May 2015 17:28:52 +0000 (UTC) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id E7E131866; Wed, 20 May 2015 17:28:51 +0000 (UTC) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id 137467E820; Thu, 21 May 2015 03:28:41 +1000 (EST) Message-ID: <555CC40C.1070502@freebsd.org> Date: Thu, 21 May 2015 03:27:40 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Eric van Gyzen , Hiren Panchasara CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283136 - head/sys/netinet References: <201505200108.t4K181No006311@svn.freebsd.org> <555C09D5.9090709@freebsd.org> <20150520042438.GA95600@strugglingcoder.info> <555C2ABC.60102@freebsd.org> <555C89F4.9080607@FreeBSD.org> In-Reply-To: <555C89F4.9080607@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.4 required=5.0 tests=DNS_FROM_AHBL_RHSBL, UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:28:52 -0000 On 05/20/15 23:19, Eric van Gyzen wrote: > On 05/20/2015 02:33, Lawrence Stewart wrote: >> On 05/20/15 14:24, Hiren Panchasara wrote: >>> On 05/20/15 at 02:13P, Lawrence Stewart wrote: >>>> Hi Hiren, >>>> >>>> On 05/20/15 11:08, Hiren Panchasara wrote: >>>>> Author: hiren Date: Wed May 20 01:08:01 2015 New Revision: >>>>> 283136 URL: https://svnweb.freebsd.org/changeset/base/283136 >>>>> >>>>> Log: Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to >>>>> expire and purge all entries in hostcache immediately. >>>>> >>>>> In collaboration with: bz, rwatson MFC after: 1 week Relnotes: >>>>> yes Sponsored by: Limelight Networks >>>> >>>> Why introduce a new sysctl and not change the existing behaviour >>>> of net.inet.tcp.hostcache.purge? >>> >>> I thought it'd make more sense to keep the existing behavior as is >>> and provide new knob for the new behavior. >> >> Don't think so - why would deferring a purge to the next purge run be >> useful compared to purging immediately? I'd strongly suggest you adapt >> this change to the existing purge sysctl. I can't see why anyone would >> miss the old functionality. > > I am generally wary of a question such as "Why would anyone want...", because as soon as the code is released, someone answers it. > > That being said, I have always wanted Hiren's purgenow behavior, and I've always been annoyed by the lazy-purge behavior. I would suggest implementing Lawrence's suggestion, but NOT MFC'ing it, since that would be a disruptive change. > > Thanks for your work, Hiren. I see no reason not to MFC it - it's not a POLA violation for a stable branch. When the user requests a purge, it's surely equally as good (and I think anyone of right mind would argue better ;) to purge immediately than some number of seconds "n" in the future, where "n" is between 1 and the value of net.inet.tcp.hostcache.prune. Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:39:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF3E167D; Wed, 20 May 2015 17:39:33 +0000 (UTC) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43E1E1980; Wed, 20 May 2015 17:39:33 +0000 (UTC) Received: by wizk4 with SMTP id k4so163561262wiz.1; Wed, 20 May 2015 10:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=lWKRlk95rSUl3OnO0JpIuOlhAnES5ojqEAn6ckPthhI=; b=L0pHJoCFYLLbNp0m9nl2gNiYH2CgTK7Q+l0FKI37g5C+KU8XW9zlGjMD4UyG6zuC+r fE4HcolomEhArfMvyockb7k0601r8u3c4JxtNqyN66uMMwSgTGnteGM1KktIqwYyaLAO wVJi2Y1ZLJh3cBh1J1vKEtIkcCOkDjIgw7XBCGaBL9uxOWuJCbURea2cvSe8rWReFfqE mfHTdcgpkk+e4GlihfOLUuik6USzFzEnfyZ2vVjsivrwACb+ucapTYimLaeVC1K9X9mx yRM3s0dab8HmcUZMqKc4b8bMRMzbW/JUy0yfj+QwxLKXv/+7fX8Gyt8au0c4D9C36mxg n2Jw== X-Received: by 10.194.2.16 with SMTP id 16mr65620438wjq.46.1432143571305; Wed, 20 May 2015 10:39:31 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id k2sm4567779wif.3.2015.05.20.10.39.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 10:39:30 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 20 May 2015 19:39:28 +0200 From: Baptiste Daroussin To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283152 - head Message-ID: <20150520173927.GK52236@ivaldir.etoilebsd.net> References: <201505201305.t4KD5Ybx063464@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDymnuGqqhW10CwH" Content-Disposition: inline In-Reply-To: <201505201305.t4KD5Ybx063464@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:39:33 -0000 --qDymnuGqqhW10CwH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 20, 2015 at 01:05:34PM +0000, Garrett Cooper wrote: > Author: ngie > Date: Wed May 20 13:05:33 2015 > New Revision: 283152 > URL: https://svnweb.freebsd.org/changeset/base/283152 >=20 > Log: > Unbreak the arm64/sparc64 tinderbox by only compiling lib/libproc and > lib/librtld_db on architectures where they're supported > =20 > Reported by: bz, Jenkins > Pointyhat to: bapt >=20 > Modified: > head/Makefile.inc1 >=20 > Modified: head/Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/Makefile.inc1 Wed May 20 13:04:00 2015 (r283151) > +++ head/Makefile.inc1 Wed May 20 13:05:33 2015 (r283152) > @@ -1694,8 +1694,6 @@ _prebuild_libs=3D ${_kerberos5_lib_libasn1 > lib/libopie lib/libpam ${_lib_libthr} \ > ${_lib_libradius} lib/libsbuf lib/libtacplus \ > lib/libgeom \ > - lib/libproc \ > - lib/librtld_db \ > ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ > ${_cddl_lib_libuutil} \ > ${_cddl_lib_libavl} \ > @@ -1767,6 +1765,13 @@ _cddl_lib=3D cddl/lib > cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L > cddl/lib/libzfs__L: lib/libgeom__L > cddl/lib/libctf__L: lib/libz__L > +# cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only = built > +# on select architectures though (see cddl/lib/Makefile) > +.if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D "i386" || \ > + ${MACHINE_CPUARCH} =3D=3D "mips" || ${MACHINE_CPUARCH} =3D=3D "powerpc"= || \ > + ${MACHINE_CPUARCH} =3D=3D "arm" > +_prebuild_libs+=3D lib/libproc lib/librtld_db > +.endif > .endif Thanks I was about to commit this one just waiting for make universe to fin= ish. Best regards, Bapt --qDymnuGqqhW10CwH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVcxs8ACgkQ8kTtMUmk6EwsJwCgpReXGekE6vweKIOlAVp3uPZ6 60YAn2aE0llp7Np3tSpPdpvGhQEI4fQT =NfYT -----END PGP SIGNATURE----- --qDymnuGqqhW10CwH-- From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:41:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 194B0919; Wed, 20 May 2015 17:41:09 +0000 (UTC) Received: from mail-qk0-x235.google.com (mail-qk0-x235.google.com [IPv6:2607:f8b0:400d:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C580A1A7F; Wed, 20 May 2015 17:41:08 +0000 (UTC) Received: by qkgv12 with SMTP id v12so36727275qkg.0; Wed, 20 May 2015 10:41:08 -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:in-reply-to:references :mime-version:content-type; bh=7x8PBlTRcedBMX96w/9OwrnPTrMR1fWSc1twh9mg/MI=; b=e+rNqoWM8LAbqHr6ohQ8fLOyAGIoQs+OCwex76eVzvaCiKlDDa8HfLfFPif07+t8GJ QGzp85EAJAL1GMElBrNr6FELH0ywGiLjVW3Xan/dKugMXYREuZETVXhSXdMKAcTrriEH hzwdX4nlQZMgmbJvcPSwE81CBA/JMHclHXLE66fRXzEsrmWCd37rim3C2n5BkMZ3S+BN Btdid50OxgmdfXANX8hu7DSrmiXzlr9otdyR/yRHfuT0teYV2px2C9jXSmE7qREhVyqV KgjyJOCpyuy2EpcEiQYD3uaRKgYn46o6AGGN28UVGjoYd1/3twHvRSi8WngNw9T0YaqM b27Q== X-Received: by 10.140.132.80 with SMTP id 77mr8492809qhe.36.1432143667863; Wed, 20 May 2015 10:41:07 -0700 (PDT) Received: from kan ([2601:6:6780:7e0:226:18ff:fe00:232e]) by mx.google.com with ESMTPSA id f4sm11502825qhe.9.2015.05.20.10.41.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 10:41:07 -0700 (PDT) Date: Wed, 20 May 2015 13:41:01 -0400 From: Alexander Kabaev To: Matthew Ahrens Cc: John Baldwin , "src-committers@freebsd.org" , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282971 - in head/sys: kern sys Message-ID: <20150520134101.69e555d7@kan> In-Reply-To: References: <201505151350.t4FDocQT054144@svn.freebsd.org> <20150520120046.268dde86@kan> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/+23WYkdPx=UKcS=kQ7eg9CX"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:41:09 -0000 --Sig_/+23WYkdPx=UKcS=kQ7eg9CX Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 20 May 2015 09:54:45 -0700 Matthew Ahrens wrote: > On Wed, May 20, 2015 at 9:00 AM, Alexander Kabaev > wrote: >=20 > > On Fri, 15 May 2015 13:50:38 +0000 (UTC) > > John Baldwin wrote: > > > > > Author: jhb > > > Date: Fri May 15 13:50:37 2015 > > > New Revision: 282971 > > > URL: https://svnweb.freebsd.org/changeset/base/282971 > > > > > > Log: > > > Previously, cv_waiters was only updated by cv_signal or > > > cv_wait. If a thread awakened due to a time out, then cv_waiters > > > was not decremented. If INT_MAX threads timed out on a cv without > > > an intervening cv_broadcast, then cv_waiters could overflow. To > > > fix this, have each sleeping thread decrement cv_waiters when it > > > resumes. > > > > > > Note that previously cv_waiters was protected by the sleepq > > > chain lock. However, that lock is not held when threads resume > > > from sleep. In addition, the interlock is also not always > > > reacquired after resuming (cv_wait_unlock), nor is it always held > > > by callers of cv_signal() or cv_broadcast(). Instead, use atomic > > > ops to update cv_waiters. Since the sleepq chain lock is still > > > held on every increment, it should still be safe to compare > > > cv_waiters against zero while holding the lock in the wakeup > > > routines as the only way the race should be lost would result in > > > extra calls to sleepq_signal() or sleepq_broadcast(). > > > Differential Revision: https://reviews.freebsd.org/D2427 > > > Reviewed by: benno > > > Reported by: benno (wrap of cv_waiters in the field) > > > MFC after: 2 weeks > > > > > > Modified: > > > head/sys/kern/kern_condvar.c > > > head/sys/sys/condvar.h > > > > > > > This breaks ZFS range locking code, which expects to be able to > > wakeup everyone on the condition variable and then free the > > structure that contains it. Having woken up threads modify > > cv_waiters results in a race that leads to already freed memory to > > be accessed. > > > > It is debatable just how correct ZFS code in its expectations, but I > > think this commit should probably be reverted until either ZFS is > > changed not to expect cv modifiable by waking threads or until > > alternative solution is found to the cv_waiters overflow issue > > fixed by this commit. > > > > > It isn't clear to me how the zfs_range_unlock() code could know when > all the waiters have woken up and updated the CV, and thus it's safe > to destroy/free the CV. Would the woken threads ask, "was I the last > thread to be woken by this CV" and if so free the struct containing > the CV? Obviously such a check would need to ensure that the other > threads have completed their updates to the CV. >=20 > --matt Assuming other threads _need_ to update cv after they have been woken up. Clearly Solaris implementation managed to do without and our code changed that breaking range locks implementation we took directly from OpenSolaris (or illumos). What was previously possible now isn't. As I wrote before, while merits of this expectations are debatable and it is not hard to see where Solaris way is advantageous, that is really besides the point. Are you arguing that we should leave kernel in known broken state until 'proper' fix makes its way through possible upstream detour? Also, we have large code base taken from Solaris and chances are this is not the only place that might be affected. I think we are better off with this commit temporarily reverted until necessary repairs and auditing are complete for it to be safely re-enabled. --=20 Alexander Kabaev --Sig_/+23WYkdPx=UKcS=kQ7eg9CX Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlVcxy4ACgkQQ6z1jMm+XZZqLgCfWR19mzDKRYbPwqdPbMCKQmQu ln4An1GXwwgBfxvL61QgIojAmQvuHuIa =4fN3 -----END PGP SIGNATURE----- --Sig_/+23WYkdPx=UKcS=kQ7eg9CX-- From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:42:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B28BFA79; Wed, 20 May 2015 17:42:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A19681A92; Wed, 20 May 2015 17:42:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KHgfmt001530; Wed, 20 May 2015 17:42:41 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KHgfEG001529; Wed, 20 May 2015 17:42:41 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505201742.t4KHgfEG001529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 20 May 2015 17:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283155 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:42:41 -0000 Author: oshogbo Date: Wed May 20 17:42:40 2015 New Revision: 283155 URL: https://svnweb.freebsd.org/changeset/base/283155 Log: Correct variable name in the interface. Approved by: pjd (mentor) Modified: head/sys/sys/nvpair_impl.h Modified: head/sys/sys/nvpair_impl.h ============================================================================== --- head/sys/sys/nvpair_impl.h Wed May 20 17:02:30 2015 (r283154) +++ head/sys/sys/nvpair_impl.h Wed May 20 17:42:40 2015 (r283155) @@ -85,7 +85,7 @@ const unsigned char *nvpair_unpack_numbe const unsigned char *nvpair_unpack_string(bool isbe, nvpair_t *nvp, const unsigned char *ptr, size_t *leftp); const unsigned char *nvpair_unpack_nvlist(bool isbe, nvpair_t *nvp, - const unsigned char *ptr, size_t *leftp, size_t nvlist, nvlist_t **child); + const unsigned char *ptr, size_t *leftp, size_t nfds, nvlist_t **child); const unsigned char *nvpair_unpack_descriptor(bool isbe, nvpair_t *nvp, const unsigned char *ptr, size_t *leftp, const int *fds, size_t nfds); const unsigned char *nvpair_unpack_binary(bool isbe, nvpair_t *nvp, From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:43:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1CD8BC8; Wed, 20 May 2015 17:43:58 +0000 (UTC) Received: from mail-la0-x22f.google.com (mail-la0-x22f.google.com [IPv6:2a00:1450:4010:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 616101A9D; Wed, 20 May 2015 17:43:58 +0000 (UTC) Received: by laat2 with SMTP id t2so84656056laa.1; Wed, 20 May 2015 10:43:56 -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:message-id:subject :from:to:cc:content-type; bh=USIzKqTvGngGygijMvydwkXVawB+cyYpC7ZsuOLV1rE=; b=wZSAXWn1Ry/JaTjpWQ6ablkGBWTg3k+7TdI2FvOlM/vQpXu195wt8E1r/R+yfkqqMF U9HmcSGvq2AdheXv915/LpfUPihrV3F739lrcRAtgjk8EbetvAJ+aFb/zF9C9PT6yikL HKM9Edyqt6+Jm+X4FfBVbQX1kCW+rHRPjK3R0s0qUcqoLERshMiGfBn13ujXpdzUSV9H KjtHNDfYmQNa6dLCjUevydpucQORwbj9JT3mUuDF8fWChKGfM6FPSOLtIey1gJ+zeHh/ XZP78UwzboLnL2z3u2/YrQS5bkBbf83GuiDeWE3ByiOmvSwd55JpbvdKI2N7eLOCb6M5 s63Q== MIME-Version: 1.0 X-Received: by 10.112.135.131 with SMTP id ps3mr1108752lbb.84.1432143836412; Wed, 20 May 2015 10:43:56 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.164.38 with HTTP; Wed, 20 May 2015 10:43:56 -0700 (PDT) In-Reply-To: <555CC352.60302@FreeBSD.org> References: <201505201304.t4KD41Bn063189@svn.freebsd.org> <555CBDE2.6080401@FreeBSD.org> <555CC352.60302@FreeBSD.org> Date: Wed, 20 May 2015 10:43:56 -0700 X-Google-Sender-Auth: ql2YE4LnOhNp8kTMbfuDPVnEbqk Message-ID: Subject: Re: svn commit: r283151 - head From: Craig Rodrigues To: Andriy Gapon Cc: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:43:59 -0000 On Wed, May 20, 2015 at 10:24 AM, Andriy Gapon wrote: > >> > >> lib/libproc__L: \ > >> - cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L > >> + ${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L > > Should the above perhaps be ${_cddl_lib_libctf}__L? But such that it is > empty > if _cddl_lib_libctf is unset. Not sure how to express that with the make > syntax. In shell it'd be ${_cddl_lib_libctf:+${_cddl_lib_libctf}__L}. > > You can use: ${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} If you look at the make(1) man page and look for the section "Variable modifiers", you can see the documentation for this. -- Craig From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:44:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 346AED1B; Wed, 20 May 2015 17:44:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22B141AA6; Wed, 20 May 2015 17:44:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KHix07001889; Wed, 20 May 2015 17:44:59 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KHiwtc001887; Wed, 20 May 2015 17:44:58 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505201744.t4KHiwtc001887@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 20 May 2015 17:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283156 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:44:59 -0000 Author: oshogbo Date: Wed May 20 17:44:58 2015 New Revision: 283156 URL: https://svnweb.freebsd.org/changeset/base/283156 Log: Always use the nv_free function. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Wed May 20 17:42:40 2015 (r283155) +++ head/sys/kern/subr_nvlist.c Wed May 20 17:44:58 2015 (r283156) @@ -902,8 +902,8 @@ nvlist_send(int sock, const nvlist_t *nv ret = 0; out: ERRNO_SAVE(); - free(fds); - free(data); + nv_free(fds); + nv_free(data); ERRNO_RESTORE(); return (ret); } @@ -958,8 +958,8 @@ nvlist_recv(int sock, int flags) ret = nvl; out: ERRNO_SAVE(); - free(buf); - free(fds); + nv_free(buf); + nv_free(fds); ERRNO_RESTORE(); return (ret); From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:47:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24DE1E78; Wed, 20 May 2015 17:47:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13BD31ABC; Wed, 20 May 2015 17:47:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KHl1hj002254; Wed, 20 May 2015 17:47:01 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KHl1PQ002253; Wed, 20 May 2015 17:47:01 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505201747.t4KHl1PQ002253@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 20 May 2015 17:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283157 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:47:02 -0000 Author: oshogbo Date: Wed May 20 17:47:01 2015 New Revision: 283157 URL: https://svnweb.freebsd.org/changeset/base/283157 Log: Style. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvpair.c Modified: head/sys/kern/subr_nvpair.c ============================================================================== --- head/sys/kern/subr_nvpair.c Wed May 20 17:44:58 2015 (r283156) +++ head/sys/kern/subr_nvpair.c Wed May 20 17:47:01 2015 (r283157) @@ -742,7 +742,7 @@ nvpair_allocv(const char *name, int type } return (nvp); -}; +} nvpair_t * nvpair_create_stringf(const char *name, const char *valuefmt, ...) From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:48:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27AC6FCE; Wed, 20 May 2015 17:48:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 167BE1AE1; Wed, 20 May 2015 17:48:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KHmMp4002501; Wed, 20 May 2015 17:48:22 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KHmMZr002499; Wed, 20 May 2015 17:48:22 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505201748.t4KHmMZr002499@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 20 May 2015 17:48:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283158 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:48:23 -0000 Author: oshogbo Date: Wed May 20 17:48:22 2015 New Revision: 283158 URL: https://svnweb.freebsd.org/changeset/base/283158 Log: Fix memory leak. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Wed May 20 17:47:01 2015 (r283157) +++ head/sys/kern/subr_nvlist.c Wed May 20 17:48:22 2015 (r283158) @@ -838,6 +838,7 @@ nvlist_xunpack(const void *buf, size_t s if (nvl->nvl_parent == NULL) goto failed; nvl = nvpair_nvlist(nvl->nvl_parent); + nvpair_free_structure(nvp); continue; default: PJDLOG_ABORT("Invalid type (%d).", nvpair_type(nvp)); From owner-svn-src-head@FreeBSD.ORG Wed May 20 17:49:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD13E244; Wed, 20 May 2015 17:49:40 +0000 (UTC) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BF1D1AF4; Wed, 20 May 2015 17:49:40 +0000 (UTC) Received: by lbbuc2 with SMTP id uc2so259305lbb.2; Wed, 20 May 2015 10:49:38 -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:message-id:subject :from:to:cc:content-type; bh=qCwIhfNgwnH5zswek0XJzjtOn1kTy0FLys4XPTqGv6Q=; b=iuT0bUAQ6fcFd1bl2qQirYkvl4vDqkKxQE841m0it7doKBibhGpDGbwkkBm7YbjQFt 53IrVdE0GJMibq4nm7k8iidbQldpNyu0pqKSjSM/OEd4gOT+b8HdfNed20gYeOmZ3eo6 udhkX1rz9uTaLaCphkO09sUvVSE2ZcjxraGF00U3UxPUeEU59ppkdz+UHuv8uI67b2va FAa2uPyO5MpLHSPGiBZXy5JBqJ/51NPkGh9fRNMZRF6VUi08HGULc+wItic8X5DhD8oH GW2RYSVbI4rmCVMpQo4Tqlep/6tB/fL9qkQUE9ltHDclWsZQjwNbs55BLvImhSBpYBQ+ 339Q== MIME-Version: 1.0 X-Received: by 10.152.42.211 with SMTP id q19mr27716551lal.78.1432144178266; Wed, 20 May 2015 10:49:38 -0700 (PDT) Sender: mahrens@gmail.com Received: by 10.112.188.164 with HTTP; Wed, 20 May 2015 10:49:38 -0700 (PDT) In-Reply-To: <20150520134101.69e555d7@kan> References: <201505151350.t4FDocQT054144@svn.freebsd.org> <20150520120046.268dde86@kan> <20150520134101.69e555d7@kan> Date: Wed, 20 May 2015 10:49:38 -0700 X-Google-Sender-Auth: dK7iJ3NVKt7HDkR12NsvL3XkNWc Message-ID: Subject: Re: svn commit: r282971 - in head/sys: kern sys From: Matthew Ahrens To: Alexander Kabaev Cc: John Baldwin , "src-committers@freebsd.org" , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:49:41 -0000 On Wed, May 20, 2015 at 10:41 AM, Alexander Kabaev wrote: > On Wed, 20 May 2015 09:54:45 -0700 > Matthew Ahrens wrote: > > > On Wed, May 20, 2015 at 9:00 AM, Alexander Kabaev > > wrote: > > > > > On Fri, 15 May 2015 13:50:38 +0000 (UTC) > > > John Baldwin wrote: > > > > > > > Author: jhb > > > > Date: Fri May 15 13:50:37 2015 > > > > New Revision: 282971 > > > > URL: https://svnweb.freebsd.org/changeset/base/282971 > > > > > > > > Log: > > > > Previously, cv_waiters was only updated by cv_signal or > > > > cv_wait. If a thread awakened due to a time out, then cv_waiters > > > > was not decremented. If INT_MAX threads timed out on a cv without > > > > an intervening cv_broadcast, then cv_waiters could overflow. To > > > > fix this, have each sleeping thread decrement cv_waiters when it > > > > resumes. > > > > > > > > Note that previously cv_waiters was protected by the sleepq > > > > chain lock. However, that lock is not held when threads resume > > > > from sleep. In addition, the interlock is also not always > > > > reacquired after resuming (cv_wait_unlock), nor is it always held > > > > by callers of cv_signal() or cv_broadcast(). Instead, use atomic > > > > ops to update cv_waiters. Since the sleepq chain lock is still > > > > held on every increment, it should still be safe to compare > > > > cv_waiters against zero while holding the lock in the wakeup > > > > routines as the only way the race should be lost would result in > > > > extra calls to sleepq_signal() or sleepq_broadcast(). > > > > Differential Revision: https://reviews.freebsd.org/D2427 > > > > Reviewed by: benno > > > > Reported by: benno (wrap of cv_waiters in the field) > > > > MFC after: 2 weeks > > > > > > > > Modified: > > > > head/sys/kern/kern_condvar.c > > > > head/sys/sys/condvar.h > > > > > > > > > > This breaks ZFS range locking code, which expects to be able to > > > wakeup everyone on the condition variable and then free the > > > structure that contains it. Having woken up threads modify > > > cv_waiters results in a race that leads to already freed memory to > > > be accessed. > > > > > > It is debatable just how correct ZFS code in its expectations, but I > > > think this commit should probably be reverted until either ZFS is > > > changed not to expect cv modifiable by waking threads or until > > > alternative solution is found to the cv_waiters overflow issue > > > fixed by this commit. > > > > > > > > It isn't clear to me how the zfs_range_unlock() code could know when > > all the waiters have woken up and updated the CV, and thus it's safe > > to destroy/free the CV. Would the woken threads ask, "was I the last > > thread to be woken by this CV" and if so free the struct containing > > the CV? Obviously such a check would need to ensure that the other > > threads have completed their updates to the CV. > > > > --matt > > Assuming other threads _need_ to update cv after they have been woken > up. Clearly Solaris implementation managed to do without and our code > changed that breaking range locks implementation we took directly from > OpenSolaris (or illumos). What was previously possible now isn't. As I > wrote before, while merits of this expectations are debatable and it is > not hard to see where Solaris way is advantageous, that is really > besides the point. Are you arguing that we should leave kernel in known > broken state until 'proper' fix makes its way through possible upstream > detour? > Not at all. Breaking ZFS is not OK. I was just trying to understand if it's even possible to fix the breakage within ZFS. If it's not possible/reasonable, then the CV semantics would clearly have to be reverted. > > Also, we have large code base taken from Solaris and chances are this is > not the only place that might be affected. I think we are better off > with this commit temporarily reverted until necessary repairs and > auditing are complete for it to be safely re-enabled. > > Agreed that the risk is large (a huge amount of code is potentially impacted, probably not only Solaris-derived code), and does not seem to have been analyzed before this change was landed. --matt From owner-svn-src-head@FreeBSD.ORG Wed May 20 18:41:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD58CCD6; Wed, 20 May 2015 18:41:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC519152E; Wed, 20 May 2015 18:41:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KIfsCC029991; Wed, 20 May 2015 18:41:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KIfso9029990; Wed, 20 May 2015 18:41:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505201841.t4KIfso9029990@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 20 May 2015 18:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283159 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 18:41:55 -0000 Author: ngie Date: Wed May 20 18:41:54 2015 New Revision: 283159 URL: https://svnweb.freebsd.org/changeset/base/283159 Log: Fix breakage I didn't fully solve in r283151 by depending on the .PHONY target, not the directory when building libctf for libproc Reported by: many, Jenkins Submitted by: rodrigc Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed May 20 17:48:22 2015 (r283158) +++ head/Makefile.inc1 Wed May 20 18:41:54 2015 (r283159) @@ -1745,7 +1745,7 @@ _generic_libs+= ${_DIR} lib/libopie__L lib/libtacplus__L: lib/libmd__L lib/libproc__L: \ - ${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L + ${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} lib/libelf__L lib/librtld_db__L lib/libutil__L .if ${MK_CXX} != "no" .if ${MK_LIBCPLUSPLUS} != "no" lib/libproc__L: lib/libc++ From owner-svn-src-head@FreeBSD.ORG Wed May 20 18:42:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17CFAF0B; Wed, 20 May 2015 18:42:51 +0000 (UTC) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDA69154F; Wed, 20 May 2015 18:42:50 +0000 (UTC) Received: by iepj10 with SMTP id j10so46178953iep.3; Wed, 20 May 2015 11:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=GIQSN3IHAGAfATcxB736etClHu+LZFm6jXOKO8lHDlI=; b=QawhIcLZEIL0Y0v1Aoa4iC23C21iSpqNMHQqJOL/E4147/GOZMDXoBmfMtjvlaeF8m AVAAHQMtWFRs/ai4IPFILYDV9Kuo8gmEKYhd6lk/S5ODa9p/MmX/0gpjtLlV+PTiW9Ja NAm1eVtDRS5XtunU5ZbxssZCvxUmmuOUoJKWRsgVv8Pl8exM7VZUiHX3YcCmoGdKP+Tp qXzyXt5HZcFJzorjwmFxkWYVaZ7TqZUQyDHtbOiBhp5zmD7BZVlWMRbF4BZLlwsAtLr7 q6iHpdSgltDXBj4S1KrewDu2+y7zpz4GQvfn9y00LSiDsT5f7ebmWrUcaZUVZ7kJh3Ii GA4A== X-Received: by 10.50.61.200 with SMTP id s8mr30209191igr.7.1432147369774; Wed, 20 May 2015 11:42:49 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:d5de:dc48:8df9:aa7e? ([2601:8:ab80:7d6:d5de:dc48:8df9:aa7e]) by mx.google.com with ESMTPSA id if2sm2165939igb.15.2015.05.20.11.42.48 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 May 2015 11:42:48 -0700 (PDT) Subject: Re: svn commit: r283151 - head Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E41B7878-0AAA-45BC-9B2F-848F47D00D40"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: Date: Wed, 20 May 2015 11:42:45 -0700 Cc: Andriy Gapon , Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <8F1BC78E-1C33-4E12-84FF-0AA682609907@gmail.com> References: <201505201304.t4KD41Bn063189@svn.freebsd.org> <555CBDE2.6080401@FreeBSD.org> <555CC352.60302@FreeBSD.org> To: Craig Rodrigues X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 18:42:51 -0000 --Apple-Mail=_E41B7878-0AAA-45BC-9B2F-848F47D00D40 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On May 20, 2015, at 10:43, Craig Rodrigues wrote: > On Wed, May 20, 2015 at 10:24 AM, Andriy Gapon = wrote: > >> > >> lib/libproc__L: \ > >> - cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L = lib/libutil__L > >> + ${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L = lib/libutil__L >=20 > Should the above perhaps be ${_cddl_lib_libctf}__L? But such that it = is empty > if _cddl_lib_libctf is unset. Not sure how to express that with the = make > syntax. In shell it'd be ${_cddl_lib_libctf:+${_cddl_lib_libctf}__L}. >=20 >=20 > You can use: >=20 > ${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} >=20 >=20 > If you look at the make(1) man page and look for the section > "Variable modifiers", you can see the documentation for this. Fixed in r283159. Thank you Craig! --Apple-Mail=_E41B7878-0AAA-45BC-9B2F-848F47D00D40 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVXNWmAAoJEMZr5QU6S73eEDEH/3Ia9WtEteT6st0gDY8SE0x/ WFlKsM6J1P5RN8G1ZN/maNe/ksbL/ipivAnBfGMgNZmdSV0bSzZRM2D5urvy6Sh+ 1v8umdNRbRL0ZV+MqiYF4aVFiCVNL4YJm2KB044DOpSghAOhnwLa7+dfeSBoePh4 Pc1nVj1V+DHTIIXv0GMcRxcN+kSlLpgiaFxIFSZViK+UdhOjuqAj+60zKjJgU4/B Hlc6gw+uQ7CmKhvhZKz6b8uZu8sC+Ih5KNQhsPTTjOr5iCXIwuDLdeXOlt8SK0c+ povKaPQrY4Hrb+CltPA1gyuZV7RoV3YAaUj4qWRSWFr86iJ/+3dMnCY1Y/tDy/w= =vhd3 -----END PGP SIGNATURE----- --Apple-Mail=_E41B7878-0AAA-45BC-9B2F-848F47D00D40-- From owner-svn-src-head@FreeBSD.ORG Wed May 20 18:56:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAC79494; Wed, 20 May 2015 18:56:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CDF51699; Wed, 20 May 2015 18:56:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KIuVZT037618; Wed, 20 May 2015 18:56:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KIuUbT037612; Wed, 20 May 2015 18:56:30 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505201856.t4KIuUbT037612@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 20 May 2015 18:56:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283160 - in head: . kerberos5/lib kerberos5/lib/libhdb kerberos5/lib/libheimsqlite X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 18:56:31 -0000 Author: bapt Date: Wed May 20 18:56:29 2015 New Revision: 283160 URL: https://svnweb.freebsd.org/changeset/base/283160 Log: Make kerberos use the same sqlite libraries as other sqlite consumer. This reduces the number of copy of sqlite we have to just one and easier tracking version of sqlite Differential Revision: https://reviews.freebsd.org/D2443 Reviewed by: imp, stas, bjk Deleted: head/kerberos5/lib/libheimsqlite/ Modified: head/Makefile.inc1 head/ObsoleteFiles.inc head/kerberos5/lib/Makefile head/kerberos5/lib/libhdb/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed May 20 18:41:54 2015 (r283159) +++ head/Makefile.inc1 Wed May 20 18:56:29 2015 (r283160) @@ -1679,7 +1679,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_kerberos5_lib_libhdb} \ ${_kerberos5_lib_libheimbase} \ ${_kerberos5_lib_libheimntlm} \ - ${_kerberos5_lib_libheimsqlite} \ + ${_libsqlite3} \ ${_kerberos5_lib_libheimipcc} \ ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \ ${_kerberos5_lib_libroken} \ @@ -1803,7 +1803,7 @@ _secure_lib= secure/lib kerberos5/lib/libasn1__L: lib/libcom_err__L kerberos5/lib/libroken__L kerberos5/lib/libhdb__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ kerberos5/lib/libkrb5__L kerberos5/lib/libroken__L \ - kerberos5/lib/libwind__L kerberos5/lib/libheimsqlite__L + kerberos5/lib/libwind__L lib/libsqlite3__L kerberos5/lib/libheimntlm__L: secure/lib/libcrypto__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libroken__L lib/libcom_err__L kerberos5/lib/libhx509__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ @@ -1816,7 +1816,7 @@ kerberos5/lib/libroken__L: lib/libcrypt_ kerberos5/lib/libwind__L: kerberos5/lib/libroken__L lib/libcom_err__L kerberos5/lib/libheimbase__L: lib/libthr__L kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L kerberos5/lib/libheimbase__L lib/libthr__L -kerberos5/lib/libheimsqlite__L: lib/libthr__L +lib/libsqlite3__L: lib/libthr__L .endif .if ${MK_GSSAPI} != "no" @@ -1832,7 +1832,7 @@ _kerberos5_lib_libkrb5= kerberos5/lib/li _kerberos5_lib_libhx509= kerberos5/lib/libhx509 _kerberos5_lib_libroken= kerberos5/lib/libroken _kerberos5_lib_libheimntlm= kerberos5/lib/libheimntlm -_kerberos5_lib_libheimsqlite= kerberos5/lib/libheimsqlite +_libsqlite3= lib/libsqlite3 _kerberos5_lib_libheimipcc= kerberos5/lib/libheimipcc _kerberos5_lib_libwind= kerberos5/lib/libwind _libcom_err= lib/libcom_err Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed May 20 18:41:54 2015 (r283159) +++ head/ObsoleteFiles.inc Wed May 20 18:56:29 2015 (r283160) @@ -38,6 +38,15 @@ # xargs -n1 | sort | uniq -d; # done +# 20150520 +OLD_FILES+=usr/lib/libheimsqlite.a +OLD_FILES+=usr/lib/libheimsqlite.so +OLD_LIBS+=usr/lib/libheimsqlite.so.11 +OLD_FILES+=usr/lib/libheimsqlite_p.a +OLD_FILES+=usr/lib32/libheimsqlite.a +OLD_FILES+=usr/lib32/libheimsqlite.so +OLD_LIBS+=usr/lib32/libheimsqlite.so.11 +OLD_FILES+=usr/lib32/libheimsqlite_p.a # 20150506 OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz # 20150504 Modified: head/kerberos5/lib/Makefile ============================================================================== --- head/kerberos5/lib/Makefile Wed May 20 18:41:54 2015 (r283159) +++ head/kerberos5/lib/Makefile Wed May 20 18:56:29 2015 (r283160) @@ -3,7 +3,7 @@ SUBDIR= libasn1 libgssapi_krb5 libgssapi_ntlm libgssapi_spnego libhdb \ libheimntlm libhx509 libkadm5clnt libkadm5srv libkrb5 \ - libroken libsl libvers libkdc libwind libheimsqlite libheimbase libheimipcc libheimipcs + libroken libsl libvers libkdc libwind libheimbase libheimipcc libheimipcs SUBDIR+= libkafs5 # requires krb_err.h from libkrb5 Modified: head/kerberos5/lib/libhdb/Makefile ============================================================================== --- head/kerberos5/lib/libhdb/Makefile Wed May 20 18:41:54 2015 (r283159) +++ head/kerberos5/lib/libhdb/Makefile Wed May 20 18:56:29 2015 (r283160) @@ -3,7 +3,7 @@ LIB= hdb LDFLAGS= -Wl,--no-undefined VERSION_MAP= ${KRB5DIR}/lib/hdb/version-script.map -LIBADD= asn1 com_err krb5 roken heimsqlite +LIBADD= asn1 com_err krb5 roken sqlite3 DPADD= ${LDAPDPADD} MAN= HDB.3 hdb_entry_ex.3 @@ -56,7 +56,7 @@ SRCS= common.c \ ${GEN:S/.x$/.c/:S/.hx$/.h/} CFLAGS+=-I${KRB5DIR}/lib/hdb -I${KRB5DIR}/lib/asn1 \ - -I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sqlite \ + -I${KRB5DIR}/lib/roken -I${.CURDIR}/../../../contrib/sqlite3/ \ -I${KRB5DIR}/lib/krb5 \ -I. ${LDAPCFLAGS} CFLAGS+=-DHDB_DB_DIR="\"/var/heimdal\"" From owner-svn-src-head@FreeBSD.ORG Wed May 20 20:15:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 802B04F1 for ; Wed, 20 May 2015 20:15:58 +0000 (UTC) Received: from nm27-vm1.bullet.mail.bf1.yahoo.com (nm27-vm1.bullet.mail.bf1.yahoo.com [98.139.213.148]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EC151107 for ; Wed, 20 May 2015 20:15:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1432152949; bh=1leuwss6aqRJSala4cQHpLDOEbMWrT+kD53TSamMU58=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=oN7ONrQNrc/u52S0114TXmsiuVl6vHWaLD3ftcChkPhfxaPbYmNUo42P2caFAF0AaJ49RSO3R/kfl70GzPtHuH0kCvxWzV48E6BB5b3G/NIIZbJd/MiFp1xeXUJSp5XwPaRHF4fC0MUHoMOJgVbnU7+Vty3D3yCxw96gDTbg5FI75kOe2LWsWQAzrDgF94CF5+FVb0dRRLNSwrglnErnBl+lV6YGXV9bOemAsYjvb4qbFD9yeypnp7h7waDjllNDuqFFv5O8ZFf2a8JR6JmTtDlz/FA7o9POBftvK7di92+ICRlE/r2VcKO29mkrwaE90XPhhkehT5XKeoXt+o8BIg== Received: from [98.139.170.181] by nm27.bullet.mail.bf1.yahoo.com with NNFMP; 20 May 2015 20:15:49 -0000 Received: from [98.139.211.200] by tm24.bullet.mail.bf1.yahoo.com with NNFMP; 20 May 2015 20:15:49 -0000 Received: from [127.0.0.1] by smtp209.mail.bf1.yahoo.com with NNFMP; 20 May 2015 20:15:49 -0000 X-Yahoo-Newman-Id: 885682.30697.bm@smtp209.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: MFtR6poVM1lbbDVHtsNaCXsct.BWX.jdK804nBTrtXc3ajq .lpSNPutdaOnwlB3.xnWQsD8sh01XGRcKwMMnk1L9JobSreg_WdG4w7bhIlZ XVxtFDmGwgQoEkOaEmrRbu_orv8yLvmSuNQ7AvT5YSUXSFUvPRt.uPeMLekH u5R_dZbh8CVCy9UyZZ3IFGPDBCcvGPYnrxb7bMPGaFdfcKCvnkxIh7Zh5OAs nw6dQG20PnIajGEjz7cBRxuT3VeAeCr8mPB_RHYcyuU2UtVT8CrEf0m4uJtx whteuZt37RAINi6ecZcO8vpPipIwE8PGlyc0MR7mdFdZEXEal7GtfuWZliDF 3C5EjYPuyNKfjn5epjKueGUFvOXj3z5.JzG9gwz06ySs_qamTtt6KKVF.U5T hZK90BRgXQSUelpECgobeO.WuWQBdSVfLGWKAx.EthYL8r4dDF0.w.m3_ysc NuySjr8NngEfwj8Hp.xIxzSZaeJ3IH6MfinwHvjeL3EvrGlC5DPDcH_YggBS CmBrsBLS4ihy_CTE2NRVPGdCdOM.qAvnR X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <555CEB79.2090406@FreeBSD.org> Date: Wed, 20 May 2015 15:15:53 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: John Baldwin CC: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283088 - head/sys/ddb References: <201505182227.t4IMRljx078812@svn.freebsd.org> <20150519135341.R2157@besplex.bde.org> <2053555.dpIzi23R03@ralph.baldwin.cx> <555B5DA7.5000207@FreeBSD.org> In-Reply-To: <555B5DA7.5000207@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 20:15:58 -0000 On 05/19/15 10:58, Pedro Giffuni wrote: > > > > On 05/19/15 08:45, John Baldwin wrote: >> ... >> I will disagree with Bruce a bit and put my vote in for replacing >> boolean_t >> with bool where it is used. I do think that logically (if not >> strictly) your >> commit is a type mismatch as TRUE/FALSE is for boolean_t and >> true/false are >> for bool. I agree with Bruce that we probably don't want to use bool >> for >> system calls. However, I think using bool in the kernel itself is ok >> and that >> we should replace boolean_t with bool. >> > I guess it boils down to the dilemma between modernity and common > practice. > > OK, I know the current change can't stay as-is, and even Bruce admits > that boolean_t is a mistake, so I think I will give the bool a try. > FWIW, I have a patch for this[1] but it became rather interesting because on MIPS, bool and int are not interchangeable so I am finding some places where the prototypes and the implementation don't match. It will still take me some time (the tinderbox is really slow) but the result should be cleaner. Pedro. [1] https://people.freebsd.org/~pfg/patches/ddb-bool.diff From owner-svn-src-head@FreeBSD.ORG Wed May 20 21:26:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC7BE6C6; Wed, 20 May 2015 21:26:20 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AC4661914; Wed, 20 May 2015 21:26:20 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id A4BAE1598C; Wed, 20 May 2015 14:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1432157179; x=1432171579; bh=DJA1MHunBRjHFhcHEIdIyJ6ZIDOAYDQExnvTLVOCQbA=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=zFqvUMoKaGBXUr0oyEs5nul/2Wjyr2s8SjNVuj2zPjZlsocMOU8vyX7RqEsxn31Hu GOU5tn7Wm6Y9aNxpgg6Vfn0UAmyT+KzmnnmJR5IgSieT5HUZyn3KkEkx5isvt6lMwl lEZqNoFjIYzZ1WzD/ec3nr0YFiGmdHGHygDdxSJY= Message-ID: <555CFBFA.5040707@delphij.net> Date: Wed, 20 May 2015 14:26:18 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Matthew Ahrens , Alexander Kabaev CC: John Baldwin , "src-committers@freebsd.org" , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282971 - in head/sys: kern sys References: <201505151350.t4FDocQT054144@svn.freebsd.org> <20150520120046.268dde86@kan> <20150520134101.69e555d7@kan> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KsELaggJ0G9mclCCCfmUpUon1To2SRKXW" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 21:26:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KsELaggJ0G9mclCCCfmUpUon1To2SRKXW Content-Type: multipart/mixed; boundary="------------090201000407090304070005" This is a multi-part message in MIME format. --------------090201000407090304070005 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I think we should also assert that no waiter remains when a conditional variable is destroyed (which also suggests that the memory may be freed shortly). Otherwise we would either have modify after free or lost wakeu= ps. Cheers, --=20 Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die --------------090201000407090304070005 Content-Type: text/x-patch; name="kerncv-assert-waiters-on-destroy.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kerncv-assert-waiters-on-destroy.diff" Index: sys/kern/kern_condvar.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 --- sys/kern/kern_condvar.c (revision 283099) +++ sys/kern/kern_condvar.c (working copy) @@ -77,6 +77,7 @@ cv_destroy(struct cv *cvp) #ifdef INVARIANTS struct sleepqueue *sq; =20 + KASSERT(cvp->cv_waiters =3D=3D 0, ("%s: dangling waiters", __func__)); sleepq_lock(cvp); sq =3D sleepq_lookup(cvp); sleepq_release(cvp); --------------090201000407090304070005-- --KsELaggJ0G9mclCCCfmUpUon1To2SRKXW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.2 (FreeBSD) iQIcBAEBCgAGBQJVXPv7AAoJEJW2GBstM+nspgwP/1jnGGkXG4CNS/EJGhbg72Q8 HLurRvwyo/9Sh44BTgjnu5M/VGIZuy8DAWRX0bAp/D8bJV6x5yoHr8BygqZLPfFy 5Irb/DpuTCoQJvgQ+kOHqmv4dV5KTQ3FZCUrqE8EB4e+CtbzYCHu3PUu+vE6R81u xmtmyslWAyHgZSiFy2bOB0f04J/RmRtztHJIhFxeTzPkI/n6M6BJwUPaK+0kweBY qkZmTU2WobnHG7XQaDx8i3S4TIByVPE8m1AxUfoccb7lQMY5BtF0z7+Ms8QOVWKn qySRB6NgfnwQrEzq380Tf4wzbA152NxmBx4a3qP2WXHZAugikm6f/I/z1EMx5Yqx nccqxvQwPjStOKZ/0co/0BZzTNejbyYX3z3hjdLcRHQr+Odf3aigD35sh9n8nbnV t+wbvOfjLE4gkuh7b6t5kLjxe/qeQCtLMbwMx0zfLhfw1ucYVjlb2M0/3itDUCeK ZWdT6DitTM0NWRpJ/WACQu4IMUjZJVORIpUL8JhgsTWXPYngfCcvtZa12rhn1HZD K1LZlZvUIgL3j8ijUTj/XvXcQegmoKKpW/7BC1PFA/Qg+nbKJ/h7s+nrbX0lqgZE ULf63OlAQafEA099q08bWVXeNBYQmggJ4iYUH2ud/5b09I4AfYJh3laP7+UMuQ8I j691VBEIpnrkvs8cOW3j =7UGD -----END PGP SIGNATURE----- --KsELaggJ0G9mclCCCfmUpUon1To2SRKXW-- From owner-svn-src-head@FreeBSD.ORG Wed May 20 23:03:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 218E1263; Wed, 20 May 2015 23:03:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FF721437; Wed, 20 May 2015 23:03:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KN3MrI064715; Wed, 20 May 2015 23:03:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KN3MnD064714; Wed, 20 May 2015 23:03:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505202303.t4KN3MnD064714@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 May 2015 23:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283162 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 23:03:23 -0000 Author: kib Date: Wed May 20 23:03:22 2015 New Revision: 283162 URL: https://svnweb.freebsd.org/changeset/base/283162 Log: Remove the write-only variable phent. We currently do not check the size of the program header's entries. Reported by: adrian (by using gcc 4.9) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed May 20 19:32:57 2015 (r283161) +++ head/sys/vm/vm_page.c Wed May 20 23:03:22 2015 (r283162) @@ -1756,6 +1756,7 @@ vm_page_alloc(vm_object_t object, vm_pin m->wire_count = 0; } m->object = NULL; + m->oflags = VPO_UNMANAGED; vm_page_free(m); return (NULL); } From owner-svn-src-head@FreeBSD.ORG Wed May 20 23:15:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 875007C4; Wed, 20 May 2015 23:15:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75CE1157D; Wed, 20 May 2015 23:15:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KNFvck070014; Wed, 20 May 2015 23:15:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KNFvde070013; Wed, 20 May 2015 23:15:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505202315.t4KNFvde070013@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 May 2015 23:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283163 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 23:15:57 -0000 Author: kib Date: Wed May 20 23:15:56 2015 New Revision: 283163 URL: https://svnweb.freebsd.org/changeset/base/283163 Log: Do grammar fix in the comment to record the right commit message for r283162. Fix a cosmetic issue with vm_page_alloc() calling vm_page_free_toq() with the page not completely satisfying vm_page_free() assertions. The page is not owned by the object, since insertion failed. But besides m->object reset to NULL, we should also set VPO_UNMANAGED flag for consistency. Reported by: pho Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed May 20 23:03:22 2015 (r283162) +++ head/sys/vm/vm_page.c Wed May 20 23:15:56 2015 (r283163) @@ -3154,8 +3154,8 @@ vm_page_zero_invalid(vm_page_t m, boolea VM_OBJECT_ASSERT_WLOCKED(m->object); /* * Scan the valid bits looking for invalid sections that - * must be zerod. Invalid sub-DEV_BSIZE'd areas ( where the - * valid bit may be set ) have already been zerod by + * must be zeroed. Invalid sub-DEV_BSIZE'd areas ( where the + * valid bit may be set ) have already been zeroed by * vm_page_set_validclean(). */ for (b = i = 0; i <= PAGE_SIZE / DEV_BSIZE; ++i) { From owner-svn-src-head@FreeBSD.ORG Wed May 20 23:22:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01FD5AF8; Wed, 20 May 2015 23:22:54 +0000 (UTC) Received: from firebird.onthenet.com.au (firebird.onthenet.com.au [121.50.214.250]) by mx1.freebsd.org (Postfix) with ESMTP id A7357167C; Wed, 20 May 2015 23:22:53 +0000 (UTC) Received: by firebird.onthenet.com.au (Postfix, from userid 0) id 2F717A3997; Thu, 21 May 2015 09:16:59 +1000 (AEST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) by firebird.onthenet.com.au (Postfix) with ESMTP id BC428A3463 for ; Thu, 21 May 2015 03:47:08 +1000 (AEST) Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.freebsd.org (Postfix) with ESMTPS id 878B22F7E for ; Wed, 20 May 2015 17:47:06 +0000 (UTC) Received: by hub.freebsd.org (Postfix) id 80486F29; Wed, 20 May 2015 17:47:06 +0000 (UTC) Delivered-To: grehan@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 60926EDA; Wed, 20 May 2015 17:47:06 +0000 (UTC) Delivered-To: src-committers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24DE1E78; Wed, 20 May 2015 17:47:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13BD31ABC; Wed, 20 May 2015 17:47:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KHl1hj002254; Wed, 20 May 2015 17:47:01 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KHl1PQ002253; Wed, 20 May 2015 17:47:01 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505201747.t4KHl1PQ002253@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 20 May 2015 17:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283157 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-Spam-Flag: not spam (whitelisted), SpamAssassin (not cached, score=-6.5, required 5, autolearn=not spam, BAYES_00 -1.90, KHOP_RCVD_UNTRUST 0.50, RCVD_IN_DNSWL_HI -5.00, RCVD_IN_HOSTKARMA_W -0.10) X-MailScanner-From: root@firebird.onthenet.com.au X-Spam-Status: No X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 23:22:54 -0000 Author: oshogbo Date: Wed May 20 17:47:01 2015 New Revision: 283157 URL: https://svnweb.freebsd.org/changeset/base/283157 Log: Style. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvpair.c Modified: head/sys/kern/subr_nvpair.c ============================================================================== --- head/sys/kern/subr_nvpair.c Wed May 20 17:44:58 2015 (r283156) +++ head/sys/kern/subr_nvpair.c Wed May 20 17:47:01 2015 (r283157) @@ -742,7 +742,7 @@ nvpair_allocv(const char *name, int type } return (nvp); -}; +} nvpair_t * nvpair_create_stringf(const char *name, const char *valuefmt, ...) From owner-svn-src-head@FreeBSD.ORG Wed May 20 23:24:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CE37B5F; Wed, 20 May 2015 23:24:18 +0000 (UTC) Received: from firebird.onthenet.com.au (firebird.onthenet.com.au [121.50.214.250]) by mx1.freebsd.org (Postfix) with ESMTP id 3F4E51685; Wed, 20 May 2015 23:24:18 +0000 (UTC) Received: by firebird.onthenet.com.au (Postfix, from userid 0) id 9C3CBA3959; Thu, 21 May 2015 09:16:39 +1000 (AEST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) by firebird.onthenet.com.au (Postfix) with ESMTP id 8A669A33AE for ; Thu, 21 May 2015 03:39:39 +1000 (AEST) Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.freebsd.org (Postfix) with ESMTPS id A93E724B6 for ; Wed, 20 May 2015 17:39:36 +0000 (UTC) Received: by hub.freebsd.org (Postfix) id 9042E6CB; Wed, 20 May 2015 17:39:35 +0000 (UTC) Delivered-To: grehan@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 77719680; Wed, 20 May 2015 17:39:35 +0000 (UTC) Delivered-To: src-committers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF3E167D; Wed, 20 May 2015 17:39:33 +0000 (UTC) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43E1E1980; Wed, 20 May 2015 17:39:33 +0000 (UTC) Received: by wizk4 with SMTP id k4so163561262wiz.1; Wed, 20 May 2015 10:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=lWKRlk95rSUl3OnO0JpIuOlhAnES5ojqEAn6ckPthhI=; b=L0pHJoCFYLLbNp0m9nl2gNiYH2CgTK7Q+l0FKI37g5C+KU8XW9zlGjMD4UyG6zuC+r fE4HcolomEhArfMvyockb7k0601r8u3c4JxtNqyN66uMMwSgTGnteGM1KktIqwYyaLAO wVJi2Y1ZLJh3cBh1J1vKEtIkcCOkDjIgw7XBCGaBL9uxOWuJCbURea2cvSe8rWReFfqE mfHTdcgpkk+e4GlihfOLUuik6USzFzEnfyZ2vVjsivrwACb+ucapTYimLaeVC1K9X9mx yRM3s0dab8HmcUZMqKc4b8bMRMzbW/JUy0yfj+QwxLKXv/+7fX8Gyt8au0c4D9C36mxg n2Jw== X-Received: by 10.194.2.16 with SMTP id 16mr65620438wjq.46.1432143571305; Wed, 20 May 2015 10:39:31 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id k2sm4567779wif.3.2015.05.20.10.39.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 10:39:30 -0700 (PDT) Date: Wed, 20 May 2015 19:39:28 +0200 From: Baptiste Daroussin To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283152 - head Message-ID: <20150520173927.GK52236@ivaldir.etoilebsd.net> References: <201505201305.t4KD5Ybx063464@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDymnuGqqhW10CwH" Content-Disposition: inline In-Reply-To: <201505201305.t4KD5Ybx063464@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-Spam-Flag: not spam (whitelisted), SpamAssassin (not cached, score=-9.39, required 5, autolearn=not spam, BAYES_00 -1.90, DKIM_SIGNED 0.10, KHOP_PGP_SIGNED -3.00, KHOP_RCVD_UNTRUST 0.50, RCVD_IN_DNSWL_HI -5.00, RCVD_IN_HOSTKARMA_W -0.10, T_DKIM_INVALID 0.01) X-MailScanner-From: root@firebird.onthenet.com.au X-Spam-Status: No X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 23:24:18 -0000 --qDymnuGqqhW10CwH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 20, 2015 at 01:05:34PM +0000, Garrett Cooper wrote: > Author: ngie > Date: Wed May 20 13:05:33 2015 > New Revision: 283152 > URL: https://svnweb.freebsd.org/changeset/base/283152 >=20 > Log: > Unbreak the arm64/sparc64 tinderbox by only compiling lib/libproc and > lib/librtld_db on architectures where they're supported > =20 > Reported by: bz, Jenkins > Pointyhat to: bapt >=20 > Modified: > head/Makefile.inc1 >=20 > Modified: head/Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/Makefile.inc1 Wed May 20 13:04:00 2015 (r283151) > +++ head/Makefile.inc1 Wed May 20 13:05:33 2015 (r283152) > @@ -1694,8 +1694,6 @@ _prebuild_libs=3D ${_kerberos5_lib_libasn1 > lib/libopie lib/libpam ${_lib_libthr} \ > ${_lib_libradius} lib/libsbuf lib/libtacplus \ > lib/libgeom \ > - lib/libproc \ > - lib/librtld_db \ > ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ > ${_cddl_lib_libuutil} \ > ${_cddl_lib_libavl} \ > @@ -1767,6 +1765,13 @@ _cddl_lib=3D cddl/lib > cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L > cddl/lib/libzfs__L: lib/libgeom__L > cddl/lib/libctf__L: lib/libz__L > +# cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only = built > +# on select architectures though (see cddl/lib/Makefile) > +.if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D "i386" || \ > + ${MACHINE_CPUARCH} =3D=3D "mips" || ${MACHINE_CPUARCH} =3D=3D "powerpc"= || \ > + ${MACHINE_CPUARCH} =3D=3D "arm" > +_prebuild_libs+=3D lib/libproc lib/librtld_db > +.endif > .endif Thanks I was about to commit this one just waiting for make universe to fin= ish. Best regards, Bapt --qDymnuGqqhW10CwH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVcxs8ACgkQ8kTtMUmk6EwsJwCgpReXGekE6vweKIOlAVp3uPZ6 60YAn2aE0llp7Np3tSpPdpvGhQEI4fQT =NfYT -----END PGP SIGNATURE----- --qDymnuGqqhW10CwH-- From owner-svn-src-head@FreeBSD.ORG Wed May 20 23:26:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15DF3BCF; Wed, 20 May 2015 23:26:03 +0000 (UTC) Received: from firebird.onthenet.com.au (firebird.onthenet.com.au [121.50.214.250]) by mx1.freebsd.org (Postfix) with ESMTP id AD0F31690; Wed, 20 May 2015 23:26:02 +0000 (UTC) Received: by firebird.onthenet.com.au (Postfix, from userid 0) id 5BA89A3B1F; Thu, 21 May 2015 09:16:44 +1000 (AEST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) by firebird.onthenet.com.au (Postfix) with ESMTP id 94B519FBD5 for ; Thu, 21 May 2015 03:44:01 +1000 (AEST) Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.freebsd.org (Postfix) with ESMTPS id DF1582C0C for ; Wed, 20 May 2015 17:44:00 +0000 (UTC) Received: by hub.freebsd.org (Postfix) id 28826C17; Wed, 20 May 2015 17:44:00 +0000 (UTC) Delivered-To: grehan@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 0BFDEBCC; Wed, 20 May 2015 17:44:00 +0000 (UTC) Delivered-To: src-committers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1CD8BC8; Wed, 20 May 2015 17:43:58 +0000 (UTC) Received: from mail-la0-x22f.google.com (mail-la0-x22f.google.com [IPv6:2a00:1450:4010:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 616101A9D; Wed, 20 May 2015 17:43:58 +0000 (UTC) Received: by laat2 with SMTP id t2so84656056laa.1; Wed, 20 May 2015 10:43:56 -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:message-id:subject :from:to:cc:content-type; bh=USIzKqTvGngGygijMvydwkXVawB+cyYpC7ZsuOLV1rE=; b=wZSAXWn1Ry/JaTjpWQ6ablkGBWTg3k+7TdI2FvOlM/vQpXu195wt8E1r/R+yfkqqMF U9HmcSGvq2AdheXv915/LpfUPihrV3F739lrcRAtgjk8EbetvAJ+aFb/zF9C9PT6yikL HKM9Edyqt6+Jm+X4FfBVbQX1kCW+rHRPjK3R0s0qUcqoLERshMiGfBn13ujXpdzUSV9H KjtHNDfYmQNa6dLCjUevydpucQORwbj9JT3mUuDF8fWChKGfM6FPSOLtIey1gJ+zeHh/ XZP78UwzboLnL2z3u2/YrQS5bkBbf83GuiDeWE3ByiOmvSwd55JpbvdKI2N7eLOCb6M5 s63Q== MIME-Version: 1.0 X-Received: by 10.112.135.131 with SMTP id ps3mr1108752lbb.84.1432143836412; Wed, 20 May 2015 10:43:56 -0700 (PDT) Received: by 10.112.164.38 with HTTP; Wed, 20 May 2015 10:43:56 -0700 (PDT) In-Reply-To: <555CC352.60302@FreeBSD.org> References: <201505201304.t4KD41Bn063189@svn.freebsd.org> <555CBDE2.6080401@FreeBSD.org> <555CC352.60302@FreeBSD.org> Date: Wed, 20 May 2015 10:43:56 -0700 X-Google-Sender-Auth: ql2YE4LnOhNp8kTMbfuDPVnEbqk Message-ID: Subject: Re: svn commit: r283151 - head From: Craig Rodrigues To: Andriy Gapon Cc: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-Spam-Flag: not spam (whitelisted), SpamAssassin (not cached, score=-7.889, required 5, autolearn=not spam, BAYES_00 -1.90, DKIM_SIGNED 0.10, HTML_MESSAGE 0.00, KHOP_RCVD_UNTRUST 0.50, KHOP_THREADED -1.50, RCVD_IN_DNSWL_HI -5.00, RCVD_IN_HOSTKARMA_W -0.10, T_DKIM_INVALID 0.01) X-MailScanner-From: root@firebird.onthenet.com.au X-Spam-Status: No Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 23:26:03 -0000 On Wed, May 20, 2015 at 10:24 AM, Andriy Gapon wrote: > >> > >> lib/libproc__L: \ > >> - cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L > >> + ${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L > > Should the above perhaps be ${_cddl_lib_libctf}__L? But such that it is > empty > if _cddl_lib_libctf is unset. Not sure how to express that with the make > syntax. In shell it'd be ${_cddl_lib_libctf:+${_cddl_lib_libctf}__L}. > > You can use: ${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} If you look at the make(1) man page and look for the section "Variable modifiers", you can see the documentation for this. -- Craig From owner-svn-src-head@FreeBSD.ORG Thu May 21 00:21:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AABCB80; Thu, 21 May 2015 00:21:44 +0000 (UTC) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E5C431D2B; Thu, 21 May 2015 00:21:43 +0000 (UTC) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 04561BC7; Wed, 20 May 2015 17:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1432167703; bh=OuSV1WW3sCe5q9ef0Uhjv/NtTRqCDVrWiSSHOrpcMj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=SnwTQK9yBZ5M3lIy+QPCR1Pdm16Oa2hLRb1agEjh56dP9s3WvCDmZOg2wZT91A9Uc jpClq5vgwYdHU/pIuPzflpmyGu5rG4sbaSbUA5yE2igRC0KMUc5MTfGi9loawEEKvL YM2FzsDyVDI69ccqKXC0FT9dRA+k69i4rnirwG9Q= From: Peter Wemm To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283159 - head Date: Wed, 20 May 2015 17:21:42 -0700 Message-ID: <3019337.F8nLlbHdhv@overcee.wemm.org> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-Reply-To: <201505201841.t4KIfso9029990@svn.freebsd.org> References: <201505201841.t4KIfso9029990@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2483508.EKSXxSSR8b"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 00:21:44 -0000 --nextPart2483508.EKSXxSSR8b Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Wednesday, May 20, 2015 06:41:54 PM Garrett Cooper wrote: > Author: ngie > Date: Wed May 20 18:41:54 2015 > New Revision: 283159 > URL: https://svnweb.freebsd.org/changeset/base/283159 >=20 > Log: > Fix breakage I didn't fully solve in r283151 by depending on the .P= HONY > target, not the directory when building libctf for libproc >=20 > Reported by: many, Jenkins > Submitted by: rodrigc >=20 > Modified: > head/Makefile.inc1 >=20 > Modified: head/Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=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/Makefile.inc1=09Wed May 20 17:48:22 2015=09(r283158) > +++ head/Makefile.inc1=09Wed May 20 18:41:54 2015=09(r283159) > @@ -1745,7 +1745,7 @@ _generic_libs+=3D ${_DIR} > lib/libopie__L lib/libtacplus__L: lib/libmd__L >=20 > lib/libproc__L: \ > - ${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil_= _L > + ${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} lib/libelf__L > lib/librtld_db__L lib/libutil__L .if ${MK_CXX} !=3D "no" > .if ${MK_LIBCPLUSPLUS} !=3D "no" > lib/libproc__L: lib/libc++ Even after this, head is still not buildable for me: =3D=3D=3D> lib/libproc (obj,depend,all,install) make[4]: /usr/obj/usr/src/lib/libproc/.depend, 425: ignoring stale .dep= end for=20 /usr/obj/usr/src/tmp/usr/lib/libctf.a /usr/obj/usr/src/tmp/usr/bin/ld: cannot find -lctf cc: error: linker command failed with exit code 1 (use -v to see invoca= tion) svn rev is 283163. Perhaps a full revert is in order? =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart2483508.EKSXxSSR8b Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJVXSUWAAoJEDXWlwnsgJ4E5gAH/RXr7ixv2uZsCUDwlJEi+xxj 5YGW33InusnvCAoVkS3bS9/bgm0LZSsTFt9xQAT1SQs00C77+qh+egKnxJBJSO3I B2/ZKxVsioNysPtQsnyFN5T/0ULRTu6gTO/p211RZVZ0LsXKyIdUThWmi8jmKfNI C544kiiJYjxQfvGL6W/Ad05vHhA7COGFkTP10D9oRmSAIFLJRtEIokE61lr3OmYR G3ZPHjLV9mppaTjKO49ATXJukIPuOlO7512OnxKVpEAlvby7tCJM0snuOsX4FEvu N0xyioypc9uR8qBFO9Fp1e1nrWy7VAhLIhqeLhOiqbbRS6swQ8vLqBID7Gi6m7M= =y8Yu -----END PGP SIGNATURE----- --nextPart2483508.EKSXxSSR8b-- From owner-svn-src-head@FreeBSD.ORG Thu May 21 03:32:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 733528C9; Thu, 21 May 2015 03:32:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 546011348; Thu, 21 May 2015 03:32:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L3WkRK099796; Thu, 21 May 2015 03:32:46 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L3Wj0M099792; Thu, 21 May 2015 03:32:45 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201505210332.t4L3Wj0M099792@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 21 May 2015 03:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283167 - in head: lib/libprocstat usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 03:32:46 -0000 Author: allanjude (doc committer) Date: Thu May 21 03:32:44 2015 New Revision: 283167 URL: https://svnweb.freebsd.org/changeset/base/283167 Log: Create links to the libprocstat man pages for all of the libprocstat functions so they can be looked up by name Add a cross refrence to libprocstat in the procstat.1 man page Differential Revision: https://reviews.freebsd.org/D2578 Suggested by: jmg Reviewed by: brueffer Approved by: wblock (mentor) MFC after: 1 week Sponsored by: ScaleEngine Inc. Modified: head/lib/libprocstat/Makefile head/lib/libprocstat/libprocstat.3 head/usr.bin/procstat/procstat.1 Modified: head/lib/libprocstat/Makefile ============================================================================== --- head/lib/libprocstat/Makefile Thu May 21 03:26:46 2015 (r283166) +++ head/lib/libprocstat/Makefile Thu May 21 03:32:44 2015 (r283167) @@ -22,6 +22,36 @@ SHLIB_MAJOR= 1 LIBADD= elf kvm util MAN= libprocstat.3 +MLINKS+=libprocstat.3 procstat_close.3 \ + libprocstat.3 procstat_freeargv.3 \ + libprocstat.3 procstat_freeauxv.3 \ + libprocstat.3 procstat_freeenvv.3 \ + libprocstat.3 procstat_freefiles.3 \ + libprocstat.3 procstat_freegroups.3 \ + libprocstat.3 procstat_freekstack.3 \ + libprocstat.3 procstat_freeprocs.3 \ + libprocstat.3 procstat_freevmmap.3 \ + libprocstat.3 procstat_get_pipe_info.3 \ + libprocstat.3 procstat_get_pts_info.3 \ + libprocstat.3 procstat_get_sem_info.3 \ + libprocstat.3 procstat_get_shm_info.3 \ + libprocstat.3 procstat_get_socket_info.3 \ + libprocstat.3 procstat_get_vnode_info.3 \ + libprocstat.3 procstat_getargv.3 \ + libprocstat.3 procstat_getauxv.3 \ + libprocstat.3 procstat_getenvv.3 \ + libprocstat.3 procstat_getfiles.3 \ + libprocstat.3 procstat_getgroups.3 \ + libprocstat.3 procstat_getkstack.3 \ + libprocstat.3 procstat_getosrel.3 \ + libprocstat.3 procstat_getpathname.3 \ + libprocstat.3 procstat_getprocs.3 \ + libprocstat.3 procstat_getrlimit.3 \ + libprocstat.3 procstat_getumask.3 \ + libprocstat.3 procstat_getvmmap.3 \ + libprocstat.3 procstat_open_core.3 \ + libprocstat.3 procstat_open_kvm.3 \ + libprocstat.3 procstat_open_sysctl.3 # XXX This is a hack. .if ${MK_CDDL} != "no" Modified: head/lib/libprocstat/libprocstat.3 ============================================================================== --- head/lib/libprocstat/libprocstat.3 Thu May 21 03:26:46 2015 (r283166) +++ head/lib/libprocstat/libprocstat.3 Thu May 21 03:32:44 2015 (r283167) @@ -24,25 +24,11 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2013 +.Dd May 18, 2015 .Dt LIBPROCSTAT 3 .Os .Sh NAME -.Nm procstat_open_core , -.Nm procstat_open_kvm , -.Nm procstat_open_sysctl , .Nm procstat_close , -.Nm procstat_getargv , -.Nm procstat_getauxv , -.Nm procstat_getenvv , -.Nm procstat_getfiles , -.Nm procstat_getgroups , -.Nm procstat_getkstack , -.Nm procstat_getosrel , -.Nm procstat_getpathname , -.Nm procstat_getprocs , -.Nm procstat_getumask , -.Nm procstat_getvmmap , .Nm procstat_freeargv , .Nm procstat_freeauxv , .Nm procstat_freeenvv , @@ -56,7 +42,22 @@ .Nm procstat_get_sem_info , .Nm procstat_get_shm_info , .Nm procstat_get_socket_info , -.Nm procstat_get_vnode_info +.Nm procstat_get_vnode_info , +.Nm procstat_getargv , +.Nm procstat_getauxv , +.Nm procstat_getenvv , +.Nm procstat_getfiles , +.Nm procstat_getgroups , +.Nm procstat_getkstack , +.Nm procstat_getosrel , +.Nm procstat_getpathname , +.Nm procstat_getprocs , +.Nm procstat_getrlimit , +.Nm procstat_getumask , +.Nm procstat_getvmmap , +.Nm procstat_open_core , +.Nm procstat_open_kvm , +.Nm procstat_open_sysctl .Nd library interface for file and process information retrieval .Sh LIBRARY .Lb libprocstat @@ -175,17 +176,24 @@ .Fa "struct kinfo_proc *kp" .Fa "unsigned int *count" .Fc +.Ft "struct kinfo_kstack *" +.Fo procstat_getkstack +.Fa "struct procstat *procstat" +.Fa "struct kinfo_proc *kp" +.Fa "unsigned int *count" +.Fc .Ft int .Fo procstat_getosrel .Fa "struct procstat *procstat" .Fa "struct kinfo_proc *kp" .Fa "int *osrelp" .Fc -.Ft "struct kinfo_kstack *" -.Fo procstat_getkstack +.Ft "int" +.Fo procstat_getpathname .Fa "struct procstat *procstat" .Fa "struct kinfo_proc *kp" -.Fa "unsigned int *count" +.Fa "char *pathname" +.Fa "size_t maxlen" .Fc .Ft "struct kinfo_proc *" .Fo procstat_getprocs @@ -195,13 +203,6 @@ .Fa "unsigned int *count" .Fc .Ft "int" -.Fo procstat_getpathname -.Fa "struct procstat *procstat" -.Fa "struct kinfo_proc *kp" -.Fa "char *pathname" -.Fa "size_t maxlen" -.Fc -.Ft "int" .Fo procstat_getrlimit .Fa "struct procstat *procstat" .Fa "struct kinfo_proc *kp" Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Thu May 21 03:26:46 2015 (r283166) +++ head/usr.bin/procstat/procstat.1 Thu May 21 03:32:44 2015 (r283167) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2015 +.Dd May 18, 2015 .Dt PROCSTAT 1 .Os .Sh NAME @@ -530,6 +530,7 @@ auxiliary vector value .Xr sockstat 1 , .Xr cap_enter 2 , .Xr cap_rights_limit 2 , +.Xr libprocstat 3 , .Xr ddb 4 , .Xr stack 9 .Sh AUTHORS From owner-svn-src-head@FreeBSD.ORG Thu May 21 04:07:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48AB6751 for ; Thu, 21 May 2015 04:07:28 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17B9816E5 for ; Thu, 21 May 2015 04:07:28 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L47RV0063492 for ; Thu, 21 May 2015 04:07:27 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t4L47Rtu063489 for svn-src-head@freebsd.org; Thu, 21 May 2015 04:07:27 GMT (envelope-from bdrewery) Received: (qmail 14285 invoked from network); 20 May 2015 23:07:26 -0500 Received: from unknown (HELO blah) (freebsd@shatow.net@10.10.1.90) by sweb.xzibition.com with ESMTPA; 20 May 2015 23:07:26 -0500 Message-ID: <555D59FD.10908@FreeBSD.org> Date: Wed, 20 May 2015 23:07:25 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283132 - head/lib/libproc References: <201505192223.t4JMNGDZ025108@svn.freebsd.org> In-Reply-To: <201505192223.t4JMNGDZ025108@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 04:07:28 -0000 On 5/19/15 5:23 PM, Baptiste Daroussin wrote: > Author: bapt > Date: Tue May 19 22:23:15 2015 > New Revision: 283132 > URL: https://svnweb.freebsd.org/changeset/base/283132 > > Log: > Fix underlinking > I recommend always doing a full clean build when adding or removing libraries to libraries when targetting under/over link problems. Often an exp-run may even make sense. Many library consumers have benefited from overlinking for a long time and no one has realized they were missing direct links. I've added build-time tests into our build at work to force all libraries to not be over or under linked by using -Wl,--no-undefined and tools/build/check-links.sh (this gets tricky with WORLDTMP btw). In most cases of fixing an overlink issue I found that consumers were underlinked. It was a cascading issue. As an update to the clang++ -lm link, I modified it at work to use --as-needed -lm and had no fallout. I need to test build it in FreeBSD and get an exp-run for it. That will make check-links.sh happier on many of the PROG_CXX/LIB_CXX FreeBSD has. As for prebuild_libs, it seems that most of the time it is touched in the past year it is done wrong and without good testing. Please seek out reviews and consider dependencies. The libproc one committed currently is still wrong as it is depending on lib/libc++ (rather than lib/libc++__L) and libproc does not even use libc++, it uses libcxxrt. So it should be depending on libcxxrt__L. Not to mention it actually still errors too due to other bugs in it. -- Regards, Bryan Drewery From owner-svn-src-head@FreeBSD.ORG Thu May 21 04:19:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8309E228; Thu, 21 May 2015 04:19:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71A27181B; Thu, 21 May 2015 04:19:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L4JNaO020380; Thu, 21 May 2015 04:19:23 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L4JNNr020379; Thu, 21 May 2015 04:19:23 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201505210419.t4L4JNNr020379@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Thu, 21 May 2015 04:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283168 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 04:19:23 -0000 Author: grehan Date: Thu May 21 04:19:22 2015 New Revision: 283168 URL: https://svnweb.freebsd.org/changeset/base/283168 Log: Temporarily revert r282922 which bumped the max descriptors. While there is no issued with the number of descriptors in a virtio indirect descriptor, it's a guest's choice as to whether indirect descriptors are used. For the case where they aren't, the virtio block ring size is still 64 which is less than the now reported max_segs of 67. This results in an assertion in recent Linux guests even though it was benign since they were using indirect descs. The intertwined relationship between virtio ring size, max seg size and blockif queue size will be addressed in an upcoming commit, at which point the max descriptors will again be bumped up to 67. Modified: head/usr.sbin/bhyve/block_if.h Modified: head/usr.sbin/bhyve/block_if.h ============================================================================== --- head/usr.sbin/bhyve/block_if.h Thu May 21 03:32:44 2015 (r283167) +++ head/usr.sbin/bhyve/block_if.h Thu May 21 04:19:22 2015 (r283168) @@ -39,7 +39,7 @@ #include #include -#define BLOCKIF_IOV_MAX 67 /* not practical to be IOV_MAX */ +#define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */ struct blockif_req { struct iovec br_iov[BLOCKIF_IOV_MAX]; From owner-svn-src-head@FreeBSD.ORG Thu May 21 05:02:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85C2DB6E; Thu, 21 May 2015 05:02:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A9F41D2C; Thu, 21 May 2015 05:02:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L529uJ044079; Thu, 21 May 2015 05:02:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L529X5044078; Thu, 21 May 2015 05:02:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505210502.t4L529X5044078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 21 May 2015 05:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283169 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 05:02:09 -0000 Author: ngie Date: Thu May 21 05:02:08 2015 New Revision: 283169 URL: https://svnweb.freebsd.org/changeset/base/283169 Log: _Really_, _Really_ fix buildworld by moving the conditionals down, fixing some typos, and fixing the dependency when MK_LIBCPLUSPLUS != no - `:D` operator evaluation is immediate, i.e. like .if defined(..). So r283159 was in effect a no-op commit. - Fix dependency in MK_LIBCPLUSPLUS case in two ways: -- lib/libc++ was the wrong dependency. It should have been libcxxrt. -- lib/libc++ was missing __L, so again it was depending on the directory, not the relevant .PHONY target. Tested with: make tinderbox (amd64, arm, sparc64) and JFLAG=-j16 In collaboration with: bdrewery, imp, peter BIG pointyhat to: ngie (for trying to commit things at 6am while staying up all night working on other tasks) Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu May 21 04:19:22 2015 (r283168) +++ head/Makefile.inc1 Thu May 21 05:02:08 2015 (r283169) @@ -1744,16 +1744,6 @@ _generic_libs+= ${_DIR} lib/libopie__L lib/libtacplus__L: lib/libmd__L -lib/libproc__L: \ - ${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} lib/libelf__L lib/librtld_db__L lib/libutil__L -.if ${MK_CXX} != "no" -.if ${MK_LIBCPLUSPLUS} != "no" -lib/libproc__L: lib/libc++ -.else -lib/libproc__L: gnu/lib/libsupc++__L -.endif -.endif - .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem _cddl_lib_libnvpair= cddl/lib/libnvpair @@ -1846,6 +1836,16 @@ _lib_libypclnt= lib/libypclnt lib/libradius__L: lib/libmd__L .endif +lib/libproc__L: \ + ${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} lib/libelf__L lib/librtld_db__L lib/libutil__L +.if ${MK_CXX} != "no" +.if ${MK_LIBCPLUSPLUS} != "no" +lib/libproc__L: lib/libcxxrt__L +.else # This implies MK_GNUCXX != "no"; see lib/libproc +lib/libproc__L: gnu/lib/libsupc++__L +.endif +.endif + gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L .for _lib in ${_prereq_libs} From owner-svn-src-head@FreeBSD.ORG Thu May 21 05:06:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E8D7CFB; Thu, 21 May 2015 05:06:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F17861D52; Thu, 21 May 2015 05:06:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L569i6044638; Thu, 21 May 2015 05:06:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L569gM044636; Thu, 21 May 2015 05:06:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505210506.t4L569gM044636@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 21 May 2015 05:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283170 - head/contrib/atf/atf-sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 05:06:10 -0000 Author: ngie Date: Thu May 21 05:06:08 2015 New Revision: 283170 URL: https://svnweb.freebsd.org/changeset/base/283170 Log: Import proposed fix from upstream for atf-sh/atf_check_test:flush_stdout_on_timeout Many thanks for jmmv for the fix! MFC after: 1 week PR: 197060 Original commit message: From 0e546407567ea858e261e72f75c5ed61e07d0ddf Mon Sep 17 00:00:00 2001 From: Julio Merino Date: Tue, 17 Feb 2015 18:10:11 -0500 Subject: [PATCH] Fix atf-sh/atf_check_test:flush_stdout_on_death The test atf-sh/atf_check_test:flush_stdout_on_timeout was flaky as it was playing solely with time. Fix this by making the test more robust and rename it while we are at it: there is nothing left about "timeouts" in this test, considering that ATF itself does not enforce deadlines any longer. Fixes FreeBSD PR 197060. Modified: head/contrib/atf/atf-sh/atf_check_test.sh head/contrib/atf/atf-sh/misc_helpers.sh Directory Properties: head/contrib/atf/ (props changed) Modified: head/contrib/atf/atf-sh/atf_check_test.sh ============================================================================== --- head/contrib/atf/atf-sh/atf_check_test.sh Thu May 21 05:02:08 2015 (r283169) +++ head/contrib/atf/atf-sh/atf_check_test.sh Thu May 21 05:06:08 2015 (r283170) @@ -164,18 +164,22 @@ equal_body() grep '^failed: \${x} != \${y} (a != b)$' resfile } -atf_test_case flush_stdout_on_timeout -flush_stdout_on_timeout_body() +atf_test_case flush_stdout_on_death +flush_stdout_on_death_body() { - "$(atf_get_srcdir)/misc_helpers" -s "$(atf_get_srcdir)" atf_check_timeout \ - >out 2>err & + CONTROL_FILE="$(pwd)/done" "$(atf_get_srcdir)/misc_helpers" \ + -s "$(atf_get_srcdir)" atf_check_flush_stdout >out 2>err & pid="${!}" - sleep 1 - kill "${pid}" + while [ ! -f ./done ]; do + echo "Still waiting for helper to create control file" + ls + sleep 1 + done + kill -9 "${pid}" grep 'Executing command.*true' out \ || atf_fail 'First command not in output' - grep 'Executing command.*sleep 42' out \ + grep 'Executing command.*false' out \ || atf_fail 'Second command not in output' } @@ -187,7 +191,7 @@ atf_init_test_cases() atf_add_test_case null_stdout atf_add_test_case null_stderr atf_add_test_case equal - atf_add_test_case flush_stdout_on_timeout + atf_add_test_case flush_stdout_on_death } # vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 Modified: head/contrib/atf/atf-sh/misc_helpers.sh ============================================================================== --- head/contrib/atf/atf-sh/misc_helpers.sh Thu May 21 05:02:08 2015 (r283169) +++ head/contrib/atf/atf-sh/misc_helpers.sh Thu May 21 05:06:08 2015 (r283170) @@ -139,16 +139,20 @@ atf_check_equal_eval_fail_body() atf_check_equal '${x}' '${y}' } -atf_test_case atf_check_timeout -atf_check_timeout_head() +atf_test_case atf_check_flush_stdout +atf_check_flush_stdout_head() { atf_set "descr" "Helper test case for the t_atf_check test program" - atf_set "timeout" 1 + atf_set "timeout" "30" } -atf_check_timeout_body() +atf_check_flush_stdout_body() { atf_check true - atf_check sleep 42 + atf_check -s exit:1 false + touch "${CONTROL_FILE:-done}" + while :; do + sleep 1 + done } # ------------------------------------------------------------------------- @@ -281,7 +285,7 @@ atf_init_test_cases() atf_add_test_case atf_check_equal_fail atf_add_test_case atf_check_equal_eval_ok atf_add_test_case atf_check_equal_eval_fail - atf_add_test_case atf_check_timeout + atf_add_test_case atf_check_flush_stdout # Add helper tests for t_config. atf_add_test_case config_get From owner-svn-src-head@FreeBSD.ORG Thu May 21 07:01:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F96D9CE; Thu, 21 May 2015 07:01:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D56C1AA3; Thu, 21 May 2015 07:01:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L71ANU005056; Thu, 21 May 2015 07:01:10 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L719QJ005053; Thu, 21 May 2015 07:01:09 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201505210701.t4L719QJ005053@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Thu, 21 May 2015 07:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283181 - in head/sys: arm/amlogic/aml8726 boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:01:10 -0000 Author: ganbold Date: Thu May 21 07:01:08 2015 New Revision: 283181 URL: https://svnweb.freebsd.org/changeset/base/283181 Log: The RTC initialization values are based on the SoC which can be determined at runtime so there's no need to set the values in each DTS. Tested on YYHD18 (aml8726-m3), VSATV102 (aml8726-m6), and ODROIDC1 (aml8726-m8b). Differential Revision: https://reviews.freebsd.org/D2588 Submitted by: John Wehle Modified: head/sys/arm/amlogic/aml8726/aml8726_rtc.c head/sys/boot/fdt/dts/arm/odroidc1.dts head/sys/boot/fdt/dts/arm/vsatv102-m6.dts Modified: head/sys/arm/amlogic/aml8726/aml8726_rtc.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_rtc.c Thu May 21 06:58:50 2015 (r283180) +++ head/sys/arm/amlogic/aml8726/aml8726_rtc.c Thu May 21 07:01:08 2015 (r283181) @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "clock_if.h" /* @@ -372,44 +374,27 @@ static int aml8726_rtc_attach(device_t dev) { struct aml8726_rtc_softc *sc = device_get_softc(dev); - boolean_t init_always_valid; - char *init_always; - pcell_t prop; - phandle_t node; - ssize_t len; sc->dev = dev; - node = ofw_bus_get_node(dev); - - len = OF_getprop_alloc(node, "init-always", - sizeof(char), (void **)&init_always); - sc->init.always = FALSE; - init_always_valid = FALSE; - if (len > 0) { - if (strncmp(init_always, "true", len) == 0) { - sc->init.always = TRUE; - init_always_valid = TRUE; - } else if (strncmp(init_always, "false", len) == 0) - init_always_valid = TRUE; - free(init_always, M_OFWPROP); - } - if (init_always_valid == FALSE) { - device_printf(dev, "missing init-always attribute in FDT\n"); - return (ENXIO); - } - - if (OF_getencprop(node, "xo-init", &prop, sizeof(prop)) <= 0) { - device_printf(dev, "missing xo-init attribute in FDT\n"); - return (ENXIO); - } - sc->init.xo = prop; - - if (OF_getencprop(node, "gpo-init", &prop, sizeof(prop)) <= 0) { - device_printf(dev, "missing gpo-init attribute in FDT\n"); + switch (aml8726_soc_hw_rev) { + case AML_SOC_HW_REV_M3: + sc->init.always = true; + sc->init.xo = 0x3c0a; + sc->init.gpo = 0x100000; + break; + case AML_SOC_HW_REV_M6: + case AML_SOC_HW_REV_M8: + case AML_SOC_HW_REV_M8B: + sc->init.always = false; + sc->init.xo = 0x180a; + sc->init.gpo = 0x500000; + break; + default: + device_printf(dev, "unsupported SoC\n"); return (ENXIO); + /* NOTREACHED */ } - sc->init.gpo = prop; if (bus_alloc_resources(dev, aml8726_rtc_spec, sc->res)) { device_printf(dev, "can not allocate resources for device\n"); Modified: head/sys/boot/fdt/dts/arm/odroidc1.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/odroidc1.dts Thu May 21 06:58:50 2015 (r283180) +++ head/sys/boot/fdt/dts/arm/odroidc1.dts Thu May 21 07:01:08 2015 (r283181) @@ -194,10 +194,6 @@ compatible = "amlogic,aml8726-rtc"; reg = <0xc8100740 20>; /* aobus 0x1d0 */ interrupts = <0 72 1>; - - init-always = "false"; - xo-init = <0x180a>; - gpo-init = <0x500000>; }; clkmsr: clkmsr@c1108758 { Modified: head/sys/boot/fdt/dts/arm/vsatv102-m6.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/vsatv102-m6.dts Thu May 21 06:58:50 2015 (r283180) +++ head/sys/boot/fdt/dts/arm/vsatv102-m6.dts Thu May 21 07:01:08 2015 (r283181) @@ -153,10 +153,6 @@ compatible = "amlogic,aml8726-rtc"; reg = <0xda004340 20>; /* secbus2 0xd0 */ interrupts = <0 72 1>; /* AM_IRQ2(8) */ - - init-always = "false"; - xo-init = <0x180a>; - gpo-init = <0x500000>; }; clkmsr: clkmsr@c1108758 { From owner-svn-src-head@FreeBSD.ORG Thu May 21 07:09:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE78CAC; Thu, 21 May 2015 07:09:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC4391B27; Thu, 21 May 2015 07:09:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L792IU006441; Thu, 21 May 2015 07:09:02 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L792g2006436; Thu, 21 May 2015 07:09:02 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201505210709.t4L792g2006436@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Thu, 21 May 2015 07:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283183 - head/sys/arm/amlogic/aml8726 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:09:02 -0000 Author: ganbold Date: Thu May 21 07:09:01 2015 New Revision: 283183 URL: https://svnweb.freebsd.org/changeset/base/283183 Log: Remove unnecessary break statements. Submitted by: John Wehle Modified: head/sys/arm/amlogic/aml8726/aml8726_ccm.c head/sys/arm/amlogic/aml8726/aml8726_pinctrl.c head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Modified: head/sys/arm/amlogic/aml8726/aml8726_ccm.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_ccm.c Thu May 21 07:07:28 2015 (r283182) +++ head/sys/arm/amlogic/aml8726/aml8726_ccm.c Thu May 21 07:09:01 2015 (r283183) @@ -185,7 +185,6 @@ aml8726_ccm_attach(device_t dev) device_printf(dev, "unsupported SoC\n"); return (ENXIO); /* NOTREACHED */ - break; } if (bus_alloc_resources(dev, aml8726_ccm_spec, sc->res)) { Modified: head/sys/arm/amlogic/aml8726/aml8726_pinctrl.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_pinctrl.c Thu May 21 07:07:28 2015 (r283182) +++ head/sys/arm/amlogic/aml8726/aml8726_pinctrl.c Thu May 21 07:09:01 2015 (r283183) @@ -146,7 +146,6 @@ aml8726_pinctrl_attach(device_t dev) device_printf(dev, "unsupported SoC\n"); return (ENXIO); /* NOTREACHED */ - break; } if (bus_alloc_resources(dev, aml8726_pinctrl_spec, sc->res)) { Modified: head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Thu May 21 07:07:28 2015 (r283182) +++ head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Thu May 21 07:09:01 2015 (r283183) @@ -758,7 +758,6 @@ aml8726_sdxc_attach(device_t dev) device_printf(dev, "unsupported SoC\n"); return (ENXIO); /* NOTREACHED */ - break; } node = ofw_bus_get_node(dev); From owner-svn-src-head@FreeBSD.ORG Thu May 21 07:23:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDFAD5B8; Thu, 21 May 2015 07:23:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE8041D36; Thu, 21 May 2015 07:23:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L7Npjo015694; Thu, 21 May 2015 07:23:51 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L7NpQ2015692; Thu, 21 May 2015 07:23:51 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201505210723.t4L7NpQ2015692@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Thu, 21 May 2015 07:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283186 - head/sys/arm/amlogic/aml8726 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:23:51 -0000 Author: ganbold Date: Thu May 21 07:23:50 2015 New Revision: 283186 URL: https://svnweb.freebsd.org/changeset/base/283186 Log: Add driver for usbclock generator for earlier amlogic chip. Differential Revision: https://reviews.freebsd.org/D2590 Submitted by: John Wehle Added: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c (contents, props changed) Modified: head/sys/arm/amlogic/aml8726/files.aml8726 Added: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c Thu May 21 07:23:50 2015 (r283186) @@ -0,0 +1,428 @@ +/*- + * Copyright 2014-2015 John Wehle + * 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. + */ + +/* + * Amlogic aml8726-m3 USB physical layer driver. + * + * Both USB physical interfaces share the same configuration register. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include + +#include "gpio_if.h" + +struct aml8726_usb_phy_gpio { + device_t dev; + uint32_t pin; + uint32_t pol; +}; + +struct aml8726_usb_phy_softc { + device_t dev; + struct resource *res[1]; + uint32_t npwr_en; + struct aml8726_usb_phy_gpio *pwr_en; +}; + +static struct resource_spec aml8726_usb_phy_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +#define AML_USB_PHY_CFG_REG 0 +#define AML_USB_PHY_CFG_A_CLK_DETECTED (1U << 31) +#define AML_USB_PHY_CFG_CLK_DIV_MASK (0x7f << 24) +#define AML_USB_PHY_CFG_CLK_DIV_SHIFT 24 +#define AML_USB_PHY_CFG_B_CLK_DETECTED (1 << 22) +#define AML_USB_PHY_CFG_A_PLL_RST (1 << 19) +#define AML_USB_PHY_CFG_A_PHYS_RST (1 << 18) +#define AML_USB_PHY_CFG_A_RST (1 << 17) +#define AML_USB_PHY_CFG_B_PLL_RST (1 << 13) +#define AML_USB_PHY_CFG_B_PHYS_RST (1 << 12) +#define AML_USB_PHY_CFG_B_RST (1 << 11) +#define AML_USB_PHY_CFG_CLK_EN (1 << 8) +#define AML_USB_PHY_CFG_CLK_SEL_MASK (7 << 5) +#define AML_USB_PHY_CFG_CLK_SEL_XTAL (0 << 5) +#define AML_USB_PHY_CFG_CLK_SEL_XTAL_DIV2 (1 << 5) +#define AML_USB_PHY_CFG_B_POR (1 << 1) +#define AML_USB_PHY_CFG_A_POR (1 << 0) + +#define AML_USB_PHY_CFG_CLK_DETECTED \ + (AML_USB_PHY_CFG_A_CLK_DETECTED | AML_USB_PHY_CFG_B_CLK_DETECTED) + +#define AML_USB_PHY_MISC_A_REG 12 +#define AML_USB_PHY_MISC_B_REG 16 +#define AML_USB_PHY_MISC_ID_OVERIDE_EN (1 << 23) +#define AML_USB_PHY_MISC_ID_OVERIDE_DEVICE (1 << 22) +#define AML_USB_PHY_MISC_ID_OVERIDE_HOST (0 << 22) + +#define CSR_WRITE_4(sc, reg, val) bus_write_4((sc)->res[0], reg, (val)) +#define CSR_READ_4(sc, reg) bus_read_4((sc)->res[0], reg) +#define CSR_BARRIER(sc, reg) bus_barrier((sc)->res[0], reg, 4, \ + (BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE)) + +#define PIN_ON_FLAG(pol) ((pol) == 0 ? \ + GPIO_PIN_LOW : GPIO_PIN_HIGH) +#define PIN_OFF_FLAG(pol) ((pol) == 0 ? \ + GPIO_PIN_HIGH : GPIO_PIN_LOW) + +static int +aml8726_usb_phy_mode(const char *dwcotg_path, uint32_t *mode) +{ + char *usb_mode; + phandle_t node; + ssize_t len; + + if ((node = OF_finddevice(dwcotg_path)) == 0) + return (ENXIO); + + if (fdt_is_compatible_strict(node, "synopsys,designware-hs-otg2") == 0) + return (ENXIO); + + *mode = 0; + + len = OF_getprop_alloc(node, "dr_mode", + sizeof(char), (void **)&usb_mode); + + if (len <= 0) + return (0); + + if (strcasecmp(usb_mode, "host") == 0) { + *mode = AML_USB_PHY_MISC_ID_OVERIDE_EN | + AML_USB_PHY_MISC_ID_OVERIDE_HOST; + } else if (strcasecmp(usb_mode, "peripheral") == 0) { + *mode = AML_USB_PHY_MISC_ID_OVERIDE_EN | + AML_USB_PHY_MISC_ID_OVERIDE_DEVICE; + } + + free(usb_mode, M_OFWPROP); + + return (0); +} + +static int +aml8726_usb_phy_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "amlogic,aml8726-m3-usb-phy")) + return (ENXIO); + + device_set_desc(dev, "Amlogic aml8726-m3 USB PHY"); + + return (BUS_PROBE_DEFAULT); +} + +static int +aml8726_usb_phy_attach(device_t dev) +{ + struct aml8726_usb_phy_softc *sc = device_get_softc(dev); + int err; + int npwr_en; + pcell_t *prop; + phandle_t node; + ssize_t len; + uint32_t div; + uint32_t i; + uint32_t mode_a; + uint32_t mode_b; + uint32_t value; + + sc->dev = dev; + + if (aml8726_usb_phy_mode("/soc/usb@c9040000", &mode_a) != 0) { + device_printf(dev, "missing usb@c9040000 node in FDT\n"); + return (ENXIO); + } + + if (aml8726_usb_phy_mode("/soc/usb@c90c0000", &mode_b) != 0) { + device_printf(dev, "missing usb@c90c0000 node in FDT\n"); + return (ENXIO); + } + + if (bus_alloc_resources(dev, aml8726_usb_phy_spec, sc->res)) { + device_printf(dev, "can not allocate resources for device\n"); + return (ENXIO); + } + + node = ofw_bus_get_node(dev); + + err = 0; + + len = OF_getencprop_alloc(node, "usb-pwr-en", + 3 * sizeof(pcell_t), (void **)&prop); + npwr_en = (len > 0) ? len : 0; + + sc->npwr_en = 0; + sc->pwr_en = (struct aml8726_usb_phy_gpio *) + malloc(npwr_en * sizeof (*sc->pwr_en), M_DEVBUF, M_WAITOK); + + for (i = 0; i < npwr_en; i++) { + sc->pwr_en[i].dev = OF_device_from_xref(prop[i * 3]); + sc->pwr_en[i].pin = prop[i * 3 + 1]; + sc->pwr_en[i].pol = prop[i * 3 + 2]; + + if (sc->pwr_en[i].dev == NULL) { + err = 1; + break; + } + } + + free(prop, M_OFWPROP); + + if (err) { + device_printf(dev, "unable to parse gpio\n"); + goto fail; + } + + /* Turn on power by setting pin and then enabling output driver. */ + for (i = 0; i < npwr_en; i++) { + if (GPIO_PIN_SET(sc->pwr_en[i].dev, sc->pwr_en[i].pin, + PIN_ON_FLAG(sc->pwr_en[i].pol)) != 0 || + GPIO_PIN_SETFLAGS(sc->pwr_en[i].dev, sc->pwr_en[i].pin, + GPIO_PIN_OUTPUT) != 0) { + device_printf(dev, + "could not use gpio to control power\n"); + goto fail; + } + + sc->npwr_en++; + } + + /* + * Configure the clock source and divider. + */ + + div = 2; + + value = CSR_READ_4(sc, AML_USB_PHY_CFG_REG); + + value &= ~(AML_USB_PHY_CFG_CLK_DIV_MASK | AML_USB_PHY_CFG_CLK_SEL_MASK); + + value &= ~(AML_USB_PHY_CFG_A_RST | AML_USB_PHY_CFG_B_RST); + value &= ~(AML_USB_PHY_CFG_A_PLL_RST | AML_USB_PHY_CFG_B_PLL_RST); + value &= ~(AML_USB_PHY_CFG_A_PHYS_RST | AML_USB_PHY_CFG_B_PHYS_RST); + value &= ~(AML_USB_PHY_CFG_A_POR | AML_USB_PHY_CFG_B_POR); + + value |= AML_USB_PHY_CFG_CLK_SEL_XTAL; + value |= ((div - 1) << AML_USB_PHY_CFG_CLK_DIV_SHIFT) & + AML_USB_PHY_CFG_CLK_DIV_MASK; + value |= AML_USB_PHY_CFG_CLK_EN; + + CSR_WRITE_4(sc, AML_USB_PHY_CFG_REG, value); + CSR_BARRIER(sc, AML_USB_PHY_CFG_REG); + + /* + * Issue the reset sequence. + */ + + value |= (AML_USB_PHY_CFG_A_RST | AML_USB_PHY_CFG_B_RST); + + CSR_WRITE_4(sc, AML_USB_PHY_CFG_REG, value); + CSR_BARRIER(sc, AML_USB_PHY_CFG_REG); + + DELAY(200); + + value &= ~(AML_USB_PHY_CFG_A_RST | AML_USB_PHY_CFG_B_RST); + + CSR_WRITE_4(sc, AML_USB_PHY_CFG_REG, value); + CSR_BARRIER(sc, AML_USB_PHY_CFG_REG); + + DELAY(200); + + value |= (AML_USB_PHY_CFG_A_PLL_RST | AML_USB_PHY_CFG_B_PLL_RST); + + CSR_WRITE_4(sc, AML_USB_PHY_CFG_REG, value); + CSR_BARRIER(sc, AML_USB_PHY_CFG_REG); + + DELAY(200); + + value &= ~(AML_USB_PHY_CFG_A_PLL_RST | AML_USB_PHY_CFG_B_PLL_RST); + + CSR_WRITE_4(sc, AML_USB_PHY_CFG_REG, value); + CSR_BARRIER(sc, AML_USB_PHY_CFG_REG); + + DELAY(200); + + value |= (AML_USB_PHY_CFG_A_PHYS_RST | AML_USB_PHY_CFG_B_PHYS_RST); + + CSR_WRITE_4(sc, AML_USB_PHY_CFG_REG, value); + CSR_BARRIER(sc, AML_USB_PHY_CFG_REG); + + DELAY(200); + + value &= ~(AML_USB_PHY_CFG_A_PHYS_RST | AML_USB_PHY_CFG_B_PHYS_RST); + + CSR_WRITE_4(sc, AML_USB_PHY_CFG_REG, value); + CSR_BARRIER(sc, AML_USB_PHY_CFG_REG); + + DELAY(200); + + value |= (AML_USB_PHY_CFG_A_POR | AML_USB_PHY_CFG_B_POR); + + CSR_WRITE_4(sc, AML_USB_PHY_CFG_REG, value); + CSR_BARRIER(sc, AML_USB_PHY_CFG_REG); + + DELAY(200); + + /* + * Enable by clearing the power on reset. + */ + + value &= ~(AML_USB_PHY_CFG_A_POR | AML_USB_PHY_CFG_B_POR); + + CSR_WRITE_4(sc, AML_USB_PHY_CFG_REG, value); + + CSR_BARRIER(sc, AML_USB_PHY_CFG_REG); + + DELAY(200); + + /* + * Check if the clock was detected. + */ + value = CSR_READ_4(sc, AML_USB_PHY_CFG_REG); + if ((value & AML_USB_PHY_CFG_CLK_DETECTED) != + AML_USB_PHY_CFG_CLK_DETECTED) + device_printf(dev, "PHY Clock not detected\n"); + + /* + * Configure the mode for each port. + */ + + value = CSR_READ_4(sc, AML_USB_PHY_MISC_A_REG); + + value &= ~(AML_USB_PHY_MISC_ID_OVERIDE_EN | + AML_USB_PHY_MISC_ID_OVERIDE_DEVICE | + AML_USB_PHY_MISC_ID_OVERIDE_HOST); + value |= mode_a; + + CSR_WRITE_4(sc, AML_USB_PHY_MISC_A_REG, value); + + value = CSR_READ_4(sc, AML_USB_PHY_MISC_B_REG); + + value &= ~(AML_USB_PHY_MISC_ID_OVERIDE_EN | + AML_USB_PHY_MISC_ID_OVERIDE_DEVICE | + AML_USB_PHY_MISC_ID_OVERIDE_HOST); + value |= mode_b; + + CSR_WRITE_4(sc, AML_USB_PHY_MISC_B_REG, value); + + CSR_BARRIER(sc, AML_USB_PHY_MISC_B_REG); + + return (0); + +fail: + /* In the event of problems attempt to turn things back off. */ + i = sc->npwr_en; + while (i-- != 0) { + GPIO_PIN_SET(sc->pwr_en[i].dev, sc->pwr_en[i].pin, + PIN_OFF_FLAG(sc->pwr_en[i].pol)); + } + + free (sc->pwr_en, M_DEVBUF); + sc->pwr_en = NULL; + + bus_release_resources(dev, aml8726_usb_phy_spec, sc->res); + + return (ENXIO); +} + +static int +aml8726_usb_phy_detach(device_t dev) +{ + struct aml8726_usb_phy_softc *sc = device_get_softc(dev); + uint32_t i; + uint32_t value; + + /* + * Disable by issuing a power on reset. + */ + + value = CSR_READ_4(sc, AML_USB_PHY_CFG_REG); + + value |= (AML_USB_PHY_CFG_A_POR | AML_USB_PHY_CFG_B_POR); + + CSR_WRITE_4(sc, AML_USB_PHY_CFG_REG, value); + + CSR_BARRIER(sc, AML_USB_PHY_CFG_REG); + + /* Turn off power */ + i = sc->npwr_en; + while (i-- != 0) { + (void)GPIO_PIN_SET(sc->pwr_en[i].dev, sc->pwr_en[i].pin, + PIN_OFF_FLAG(sc->pwr_en[i].pol)); + } + free (sc->pwr_en, M_DEVBUF); + sc->pwr_en = NULL; + + bus_release_resources(dev, aml8726_usb_phy_spec, sc->res); + + return (0); +} + +static device_method_t aml8726_usb_phy_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, aml8726_usb_phy_probe), + DEVMETHOD(device_attach, aml8726_usb_phy_attach), + DEVMETHOD(device_detach, aml8726_usb_phy_detach), + + DEVMETHOD_END +}; + +static driver_t aml8726_usb_phy_driver = { + "usbphy", + aml8726_usb_phy_methods, + sizeof(struct aml8726_usb_phy_softc), +}; + +static devclass_t aml8726_usb_phy_devclass; + +DRIVER_MODULE(aml8726_m3usbphy, simplebus, aml8726_usb_phy_driver, + aml8726_usb_phy_devclass, 0, 0); +MODULE_DEPEND(aml8726_m3usbphy, aml8726_gpio, 1, 1, 1); Modified: head/sys/arm/amlogic/aml8726/files.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/files.aml8726 Thu May 21 07:10:49 2015 (r283185) +++ head/sys/arm/amlogic/aml8726/files.aml8726 Thu May 21 07:23:50 2015 (r283186) @@ -30,6 +30,7 @@ arm/amlogic/aml8726/aml8726_sdxc-m8.c o arm/amlogic/aml8726/aml8726_pinctrl.c optional fdt_pinctrl #arm/amlogic/aml8726/aml8726_rng.c optional random arm/amlogic/aml8726/uart_dev_aml8726.c optional uart +arm/amlogic/aml8726/aml8726_usb_phy-m3.c optional dwcotg usb gpio arm/amlogic/aml8726/aml8726_usb_phy-m6.c optional dwcotg usb gpio dev/dwc/if_dwc.c optional dwc From owner-svn-src-head@FreeBSD.ORG Thu May 21 07:35:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79A4C9A8; Thu, 21 May 2015 07:35:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 673091E64; Thu, 21 May 2015 07:35:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L7ZLS1020967; Thu, 21 May 2015 07:35:21 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L7ZL0P020966; Thu, 21 May 2015 07:35:21 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201505210735.t4L7ZL0P020966@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Thu, 21 May 2015 07:35:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283188 - head/sys/arm/amlogic/aml8726 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:35:21 -0000 Author: ganbold Date: Thu May 21 07:35:20 2015 New Revision: 283188 URL: https://svnweb.freebsd.org/changeset/base/283188 Log: Add missing break statement. Submitted by: John Wehle Modified: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c Modified: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c Thu May 21 07:34:08 2015 (r283187) +++ head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c Thu May 21 07:35:20 2015 (r283188) @@ -181,8 +181,10 @@ aml8726_usb_phy_attach(device_t dev) sc->pwr_en[i].pin = prop[i * 3 + 1]; sc->pwr_en[i].pol = prop[i * 3 + 2]; - if (sc->pwr_en[i].dev == NULL) + if (sc->pwr_en[i].dev == NULL) { err = 1; + break; + } } free(prop, M_OFWPROP); From owner-svn-src-head@FreeBSD.ORG Thu May 21 08:20:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44E6E1B1; Thu, 21 May 2015 08:20:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33251157A; Thu, 21 May 2015 08:20:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L8KheT042863; Thu, 21 May 2015 08:20:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L8Kh0f042862; Thu, 21 May 2015 08:20:43 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505210820.t4L8Kh0f042862@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 21 May 2015 08:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283195 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 08:20:43 -0000 Author: bapt Date: Thu May 21 08:20:42 2015 New Revision: 283195 URL: https://svnweb.freebsd.org/changeset/base/283195 Log: sort headers Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Thu May 21 07:50:56 2015 (r283194) +++ head/usr.bin/soelim/soelim.c Thu May 21 08:20:42 2015 (r283195) @@ -29,15 +29,15 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +#include #define _WITH_GETLINE #include -#include #include -#include #include #include -#include -#include +#include #define C_OPTION 0x1 From owner-svn-src-head@FreeBSD.ORG Thu May 21 08:23:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D883445; Thu, 21 May 2015 08:23:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BD261692; Thu, 21 May 2015 08:23:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L8NkDd046215; Thu, 21 May 2015 08:23:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L8NkxZ046214; Thu, 21 May 2015 08:23:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505210823.t4L8NkxZ046214@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 21 May 2015 08:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283196 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 08:23:46 -0000 Author: bapt Date: Thu May 21 08:23:45 2015 New Revision: 283196 URL: https://svnweb.freebsd.org/changeset/base/283196 Log: Use the POSIX PATH_MAX macro from limits.h instead of non standard MAXPATHLEN Submitted by: schwarze at OpenBSD Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Thu May 21 08:20:42 2015 (r283195) +++ head/usr.bin/soelim/soelim.c Thu May 21 08:23:45 2015 (r283196) @@ -27,10 +27,9 @@ #include __FBSDID("$FreeBSD$"); -#include - #include #include +#include #include #define _WITH_GETLINE #include @@ -56,7 +55,7 @@ static FILE * soelim_fopen(const char *name) { FILE *f; - char path[MAXPATHLEN]; + char path[PATH_MAX]; size_t i; if (strcmp(name, "-") == 0) From owner-svn-src-head@FreeBSD.ORG Thu May 21 08:26:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC8885E0; Thu, 21 May 2015 08:26:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB4D216C9; Thu, 21 May 2015 08:26:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L8QOQ5046616; Thu, 21 May 2015 08:26:24 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L8QOjm046615; Thu, 21 May 2015 08:26:24 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505210826.t4L8QOjm046615@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 21 May 2015 08:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283197 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 08:26:25 -0000 Author: bapt Date: Thu May 21 08:26:24 2015 New Revision: 283197 URL: https://svnweb.freebsd.org/changeset/base/283197 Log: add an include on sys/types.h because we do explicitly use size_t remove unused stdbool.h Suggested by: schwarze at OpenBSD Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Thu May 21 08:23:45 2015 (r283196) +++ head/usr.bin/soelim/soelim.c Thu May 21 08:26:24 2015 (r283197) @@ -27,10 +27,11 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include #include -#include #define _WITH_GETLINE #include #include From owner-svn-src-head@FreeBSD.ORG Thu May 21 08:28:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0E3C980; Thu, 21 May 2015 08:28:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF5FC16FA; Thu, 21 May 2015 08:28:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L8SmPH047029; Thu, 21 May 2015 08:28:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L8SmUv047028; Thu, 21 May 2015 08:28:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505210828.t4L8SmUv047028@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 21 May 2015 08:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283199 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 08:28:49 -0000 Author: bapt Date: Thu May 21 08:28:48 2015 New Revision: 283199 URL: https://svnweb.freebsd.org/changeset/base/283199 Log: * fix roff terminology in .Nd * remove .Xr to self * add AUTHORS section Submitted by: schwarze at OpenBSD Modified: head/usr.bin/soelim/soelim.1 Modified: head/usr.bin/soelim/soelim.1 ============================================================================== --- head/usr.bin/soelim/soelim.1 Thu May 21 08:28:35 2015 (r283198) +++ head/usr.bin/soelim/soelim.1 Thu May 21 08:28:48 2015 (r283199) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm soelim -.Nd interpret .so directive in manpages +.Nd interpret .so requests in manpages .Sh SYNOPSIS .Nm .Op Fl Crtv @@ -78,5 +78,9 @@ The files are always searched first in t A file specified with an absolute path will be opened directly without performing a search. .Sh SEE ALSO -.Xr mandoc 1 , -.Xr soelim 1 +.Xr mandoc 1 +.Sh AUTHORS +This version of the +.Nm +utility was written by +.An Baptiste Daroussin Aq Mt bapt@freebsd.org . From owner-svn-src-head@FreeBSD.ORG Thu May 21 08:38:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A838EFCC; Thu, 21 May 2015 08:38:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C667185F; Thu, 21 May 2015 08:38:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L8cQYe052163; Thu, 21 May 2015 08:38:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L8cQbg052158; Thu, 21 May 2015 08:38:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505210838.t4L8cQbg052158@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 21 May 2015 08:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283201 - in head: include lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 08:38:26 -0000 Author: bapt Date: Thu May 21 08:38:25 2015 New Revision: 283201 URL: https://svnweb.freebsd.org/changeset/base/283201 Log: Remove clause 3 and 4 from the license Obtained from: NetBSD Modified: head/include/stringlist.h head/lib/libc/gen/stringlist.c Modified: head/include/stringlist.h ============================================================================== --- head/include/stringlist.h Thu May 21 08:32:52 2015 (r283200) +++ head/include/stringlist.h Thu May 21 08:38:25 2015 (r283201) @@ -12,11 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christos Zoulas. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED Modified: head/lib/libc/gen/stringlist.c ============================================================================== --- head/lib/libc/gen/stringlist.c Thu May 21 08:32:52 2015 (r283200) +++ head/lib/libc/gen/stringlist.c Thu May 21 08:38:25 2015 (r283201) @@ -10,8 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED From owner-svn-src-head@FreeBSD.ORG Thu May 21 09:55:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F6196ED; Thu, 21 May 2015 09:55:00 +0000 (UTC) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id D8C691256; Thu, 21 May 2015 09:54:59 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id D02251046DDD; Thu, 21 May 2015 19:54:35 +1000 (AEST) Date: Thu, 21 May 2015 19:54:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Baptiste Daroussin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283197 - head/usr.bin/soelim In-Reply-To: <201505210826.t4L8QOjm046615@svn.freebsd.org> Message-ID: <20150521190838.P1128@besplex.bde.org> References: <201505210826.t4L8QOjm046615@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=WW2Sk5bqCcaVpx34-WcA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:55:00 -0000 On Thu, 21 May 2015, Baptiste Daroussin wrote: > Log: > add an include on sys/types.h because we do explicitly use size_t > remove unused stdbool.h sys/types.h may be needed for some other typedef, but not for size_t. size_t is already declared in at least 3 other of the included headers: - and (C90 standard) - (POSIX.1-2001 standard) is a prerequisite for in POSIX.1-1990, and most section 2 man pages still document it as a prerequiste for their syscalls. They place it before the include of but are too fuzzy to document if it is a prerequisite for includes and thus gets size_t and lots of pollution. was cleaned up a bit in 2002, but the ifdefs for things like _SIZE_T_DECLARED in this cleanup are still nonsense, because still includes before these ifdefs and thus gets size_t and lots of pollution, much the same as in FreeBSD-1. Some of the section 2 headers were bogusly changed to say that sys/types.h is a prerequisite for their syscalls _after_ POSIX.1-2001 standardized it not being a prerequisite for for the syscalls declared there. It is needed for portability to pre-POSIX.1-2001 systems that are not polluted like FreeBSD, if any. IIRC, even POSIX.1-1990 permits (or any POSIX header) to declare any typedef ending in _t, so can declare size_t for itself and might even work without its prerequisite. Applications just cannot depend on this. In the previous change, the use of MAXPATHLEN regressed to use of PATH_MAX. MAXPATHLEN was honestly unportable. It defined in all (?) BSD systems. PATH_MAX only defined if {PATH_MAX} is constant. It is better to be honestly unportable than to use PATH_MAX incorrectly. MAXPATHLEN required the include of . That gave and lots of undocumented pollution. Apparently, none of the pollution was needed, not even . Bruce From owner-svn-src-head@FreeBSD.ORG Thu May 21 12:51:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F73CF0F; Thu, 21 May 2015 12:51:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 601941853; Thu, 21 May 2015 12:51:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LCpvsV082161; Thu, 21 May 2015 12:51:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LCpucm082158; Thu, 21 May 2015 12:51:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505211251.t4LCpucm082158@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 21 May 2015 12:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283220 - in head: lib lib/libmandoc share/mk usr.bin/mandoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 12:51:57 -0000 Author: bapt Date: Thu May 21 12:51:56 2015 New Revision: 283220 URL: https://svnweb.freebsd.org/changeset/base/283220 Log: Drop libmandoc and incorporate it into the main mandoc Makefile This simplifies maintainance of mandoc(1). Note that the same direction was taken on OpenBSD Deleted: head/lib/libmandoc/ Modified: head/lib/Makefile head/share/mk/src.libnames.mk head/usr.bin/mandoc/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu May 21 10:40:18 2015 (r283219) +++ head/lib/Makefile Thu May 21 12:51:56 2015 (r283220) @@ -65,7 +65,6 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libldns} \ liblzma \ ${_libmagic} \ - libmandoc \ libmemstat \ libmd \ ${_libmilter} \ Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Thu May 21 10:40:18 2015 (r283219) +++ head/share/mk/src.libnames.mk Thu May 21 12:51:56 2015 (r283220) @@ -32,7 +32,6 @@ _INTERNALLIBS= \ fifolog \ ipf \ lpr \ - mandoc \ netbsd \ ntp \ ntpevent \ @@ -108,7 +107,6 @@ _LIBRARIES= \ lzma \ m \ magic \ - mandoc \ md \ memstat \ mp \ @@ -314,9 +312,6 @@ LIBREADLINE?= ${LIBREADLINEDIR}/libreadl LIBOHASHDIR= ${ROOTOBJDIR}/lib/libohash LIBOHASH?= ${LIBOHASHDIR}/libohash.a -LIBMANDOCDIR= ${ROOTOBJDIR}/lib/libmandoc -LIBMANDOC?= ${LIBMANDOCDIR}/libmandoc.a - LIBSMDIR= ${ROOTOBJDIR}/lib/libsm LIBSM?= ${LIBSMDIR}/libsm.a Modified: head/usr.bin/mandoc/Makefile ============================================================================== --- head/usr.bin/mandoc/Makefile Thu May 21 10:40:18 2015 (r283219) +++ head/usr.bin/mandoc/Makefile Thu May 21 12:51:56 2015 (r283220) @@ -9,6 +9,37 @@ FILESDIR= ${SHAREDIR}/mdocml MAN= mandoc.1 eqn.7 mandoc_char.7 tbl.7 man.7 mdoc.7 # roff.7 MLINKS= mandoc.1 mdocml.1 +LIBMAN_SRCS= man.c \ + man_hash.c \ + man_macro.c \ + man_validate.c + +LIBMDOC_SRCS= att.c \ + lib.c \ + mdoc.c \ + mdoc_argv.c \ + mdoc_hash.c \ + mdoc_macro.c \ + mdoc_validate.c \ + st.c \ + +LIBROFF_SRCS= eqn.c \ + roff.c \ + tbl.c \ + tbl_data.c \ + tbl_layout.c \ + tbl_opts.c \ + +LIB_SRCS= ${LIBMAN_SRCS} \ + ${LIBMDOC_SRCS} \ + ${LIBROFF_SRCS} \ + chars.c \ + mandoc.c \ + mandoc_aux.c \ + msec.c \ + preconv.c \ + read.c + HTML_SRCS= eqn_html.c \ html.c \ man_html.c \ @@ -30,7 +61,8 @@ DB_SRCS= mandocdb.c \ mansearch_const.c \ manpath.c -SRCS= ${HTML_SRCS} \ +SRCS= ${LIB_SRCS} \ + ${HTML_SRCS} \ ${MAN_SRCS} \ ${TERM_SRCS} \ main.c \ @@ -43,6 +75,6 @@ WARNS?= 2 CFLAGS+= -DHAVE_CONFIG_H \ -I${.CURDIR}/../../lib/libohash/ \ -I${.CURDIR}/../../contrib/sqlite3 -LIBADD= mandoc ohash sqlite3 +LIBADD= ohash sqlite3 .include From owner-svn-src-head@FreeBSD.ORG Thu May 21 13:02:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B941392; Thu, 21 May 2015 13:02:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4989C1981; Thu, 21 May 2015 13:02:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LD2ipp087469; Thu, 21 May 2015 13:02:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LD2iAP087468; Thu, 21 May 2015 13:02:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505211302.t4LD2iAP087468@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 21 May 2015 13:02:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283221 - in head/usr.bin: . demandoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:02:44 -0000 Author: bapt Date: Thu May 21 13:02:43 2015 New Revision: 283221 URL: https://svnweb.freebsd.org/changeset/base/283221 Log: Remove demandoc(1) from the build Deleted: head/usr.bin/demandoc/ Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Thu May 21 12:51:56 2015 (r283220) +++ head/usr.bin/Makefile Thu May 21 13:02:43 2015 (r283221) @@ -37,7 +37,6 @@ SUBDIR= ${_addr2line} \ ctlstat \ cut \ ${_cxxfilt} \ - demandoc \ dirname \ dpv \ du \ From owner-svn-src-head@FreeBSD.ORG Thu May 21 13:04:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08333577; Thu, 21 May 2015 13:04:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA77E1998; Thu, 21 May 2015 13:04:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LD4EJO087723; Thu, 21 May 2015 13:04:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LD4EWQ087722; Thu, 21 May 2015 13:04:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505211304.t4LD4EWQ087722@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 21 May 2015 13:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283222 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:04:15 -0000 Author: bapt Date: Thu May 21 13:04:14 2015 New Revision: 283222 URL: https://svnweb.freebsd.org/changeset/base/283222 Log: Removed files not installed anymore with mandoc Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu May 21 13:02:43 2015 (r283221) +++ head/ObsoleteFiles.inc Thu May 21 13:04:14 2015 (r283222) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20150521 +OLD_FILES+=usr/bin/demandoc +OLD_FILES+=usr/share/man/man1/demandoc.1.gz +OLD_FILES+=usr/share/man/man3/mandoc.3.gz +OLD_FILES+=usr/share/man/man3/mandoc_headers.3.gz # 20150520 OLD_FILES+=usr/lib/libheimsqlite.a OLD_FILES+=usr/lib/libheimsqlite.so From owner-svn-src-head@FreeBSD.ORG Thu May 21 14:36:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 996A1879; Thu, 21 May 2015 14:36:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87E7E15B5; Thu, 21 May 2015 14:36:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LEaGGD034170; Thu, 21 May 2015 14:36:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LEaGJX034169; Thu, 21 May 2015 14:36:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505211436.t4LEaGJX034169@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 21 May 2015 14:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283246 - head/usr.sbin/bluetooth/bthidd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 14:36:16 -0000 Author: imp Date: Thu May 21 14:36:15 2015 New Revision: 283246 URL: https://svnweb.freebsd.org/changeset/base/283246 Log: Remove stray DEBUG_FLAGS=-g that snuck in with r137868 Modified: head/usr.sbin/bluetooth/bthidd/Makefile Modified: head/usr.sbin/bluetooth/bthidd/Makefile ============================================================================== --- head/usr.sbin/bluetooth/bthidd/Makefile Thu May 21 14:36:14 2015 (r283245) +++ head/usr.sbin/bluetooth/bthidd/Makefile Thu May 21 14:36:15 2015 (r283246) @@ -8,7 +8,6 @@ SRCS= bthidd.c client.c hid.c kbd.c lex session.c CFLAGS+= -I${.CURDIR} -DEBUG_FLAGS= -g LIBADD+= bluetooth usbhid From owner-svn-src-head@FreeBSD.ORG Thu May 21 14:36:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E729774F; Thu, 21 May 2015 14:36:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D56F215B2; Thu, 21 May 2015 14:36:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LEaBZo034037; Thu, 21 May 2015 14:36:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LEaBBb034036; Thu, 21 May 2015 14:36:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505211436.t4LEaBBb034036@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 21 May 2015 14:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283243 - head/lib/libufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 14:36:12 -0000 Author: imp Date: Thu May 21 14:36:11 2015 New Revision: 283243 URL: https://svnweb.freebsd.org/changeset/base/283243 Log: Remove the stray DEBUG_FLAGS=-g line that snuck in with the soft-updates journaling project merge in r207141. Modified: head/lib/libufs/Makefile Modified: head/lib/libufs/Makefile ============================================================================== --- head/lib/libufs/Makefile Thu May 21 13:42:37 2015 (r283242) +++ head/lib/libufs/Makefile Thu May 21 14:36:11 2015 (r283243) @@ -21,7 +21,6 @@ MLINKS+= ufs_disk_close.3 ufs_disk_write WARNS?= 2 -DEBUG_FLAGS = -g CFLAGS+= -D_LIBUFS .if defined(LIBUFS_DEBUG) CFLAGS+= -D_LIBUFS_DEBUGGING From owner-svn-src-head@FreeBSD.ORG Thu May 21 14:36:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84D9082C; Thu, 21 May 2015 14:36:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65FA115B3; Thu, 21 May 2015 14:36:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LEaD9T034083; Thu, 21 May 2015 14:36:13 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LEaDki034082; Thu, 21 May 2015 14:36:13 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505211436.t4LEaDki034082@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 21 May 2015 14:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283244 - head/cddl/usr.bin/ctfconvert X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 14:36:13 -0000 Author: imp Date: Thu May 21 14:36:12 2015 New Revision: 283244 URL: https://svnweb.freebsd.org/changeset/base/283244 Log: Remove stray DEBUG_FLAGS=-g that's been here since the initial import. Modified: head/cddl/usr.bin/ctfconvert/Makefile Modified: head/cddl/usr.bin/ctfconvert/Makefile ============================================================================== --- head/cddl/usr.bin/ctfconvert/Makefile Thu May 21 14:36:11 2015 (r283243) +++ head/cddl/usr.bin/ctfconvert/Makefile Thu May 21 14:36:12 2015 (r283244) @@ -3,8 +3,6 @@ .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt -DEBUG_FLAGS= -g - PROG= ctfconvert SRCS= alist.c \ ctf.c \ From owner-svn-src-head@FreeBSD.ORG Thu May 21 14:36:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15046874; Thu, 21 May 2015 14:36:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0399315B4; Thu, 21 May 2015 14:36:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LEaEBW034128; Thu, 21 May 2015 14:36:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LEaE57034127; Thu, 21 May 2015 14:36:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505211436.t4LEaE57034127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 21 May 2015 14:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283245 - head/usr.bin/tar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 14:36:15 -0000 Author: imp Date: Thu May 21 14:36:14 2015 New Revision: 283245 URL: https://svnweb.freebsd.org/changeset/base/283245 Log: Remove stray DEBUG_FLAGS=-g that snuck in with r184761. Modified: head/usr.bin/tar/Makefile Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Thu May 21 14:36:12 2015 (r283244) +++ head/usr.bin/tar/Makefile Thu May 21 14:36:14 2015 (r283245) @@ -31,7 +31,6 @@ CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBA CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 -DEBUG_FLAGS=-g .PHONY: check test clean-test check test: $(PROG) bsdtar.1.gz From owner-svn-src-head@FreeBSD.ORG Thu May 21 15:05:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDA474FD; Thu, 21 May 2015 15:05:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB9BB1956; Thu, 21 May 2015 15:05:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LF5knF049112; Thu, 21 May 2015 15:05:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LF5kiB049111; Thu, 21 May 2015 15:05:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505211505.t4LF5kiB049111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 21 May 2015 15:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283247 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 15:05:47 -0000 Author: bapt Date: Thu May 21 15:05:46 2015 New Revision: 283247 URL: https://svnweb.freebsd.org/changeset/base/283247 Log: Mark libgomp.so.1 as an old lib not an old file Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu May 21 14:36:15 2015 (r283246) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu May 21 15:05:46 2015 (r283247) @@ -1751,7 +1751,7 @@ OLD_FILES+=usr/include/omp.h OLD_FILES+=usr/lib/libgcov.a OLD_FILES+=usr/lib/libgomp.a OLD_FILES+=usr/lib/libgomp.so -OLD_FILES+=usr/lib/libgomp.so.1 +OLD_LIBS+=usr/lib/libgomp.so.1 OLD_FILES+=usr/lib/libgomp_p.a OLD_FILES+=usr/libexec/cc1 OLD_FILES+=usr/libexec/cc1plus From owner-svn-src-head@FreeBSD.ORG Thu May 21 15:16:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D512E89A; Thu, 21 May 2015 15:16:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0A081AE8; Thu, 21 May 2015 15:16:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LFGRqw054316; Thu, 21 May 2015 15:16:27 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LFGJrS054255; Thu, 21 May 2015 15:16:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505211516.t4LFGJrS054255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 21 May 2015 15:16:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283248 - in head/sys: amd64/amd64 arm/arm arm64/arm64 ddb i386/i386 kern mips/mips powerpc/powerpc sparc64/sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 15:16:27 -0000 Author: pfg Date: Thu May 21 15:16:18 2015 New Revision: 283248 URL: https://svnweb.freebsd.org/changeset/base/283248 Log: ddb: finish converting boolean values. The replacement started at r283088 was necessarily incomplete without replacing boolean_t with bool. This also involved cleaning some type mismatches and ansifying old C function declarations. Pointed out by: bde Discussed with: bde, ian, jhb Modified: head/sys/amd64/amd64/db_disasm.c head/sys/arm/arm/db_disasm.c head/sys/arm64/arm64/db_disasm.c head/sys/ddb/db_access.c head/sys/ddb/db_access.h head/sys/ddb/db_break.c head/sys/ddb/db_capture.c head/sys/ddb/db_command.c head/sys/ddb/db_examine.c head/sys/ddb/db_expr.c head/sys/ddb/db_main.c head/sys/ddb/db_print.c head/sys/ddb/db_ps.c head/sys/ddb/db_run.c head/sys/ddb/db_script.c head/sys/ddb/db_sym.c head/sys/ddb/db_sym.h head/sys/ddb/db_textdump.c head/sys/ddb/db_thread.c head/sys/ddb/db_variables.c head/sys/ddb/db_watch.c head/sys/ddb/db_write_cmd.c head/sys/ddb/ddb.h head/sys/i386/i386/db_disasm.c head/sys/kern/subr_turnstile.c head/sys/kern/subr_witness.c head/sys/mips/mips/db_disasm.c head/sys/mips/mips/pmap.c head/sys/mips/mips/vm_machdep.c head/sys/powerpc/powerpc/db_disasm.c head/sys/sparc64/sparc64/db_disasm.c Modified: head/sys/amd64/amd64/db_disasm.c ============================================================================== --- head/sys/amd64/amd64/db_disasm.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/amd64/amd64/db_disasm.c Thu May 21 15:16:18 2015 (r283248) @@ -1223,9 +1223,7 @@ db_disasm_esc(loc, inst, rex, short_addr * next instruction. */ db_addr_t -db_disasm(loc, altfmt) - db_addr_t loc; - boolean_t altfmt; +db_disasm(db_addr_t loc, bool altfmt) { int inst; int size; Modified: head/sys/arm/arm/db_disasm.c ============================================================================== --- head/sys/arm/arm/db_disasm.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/arm/arm/db_disasm.c Thu May 21 15:16:18 2015 (r283248) @@ -70,7 +70,7 @@ db_disasm_printaddr(u_int address) } vm_offset_t -db_disasm(vm_offset_t loc, boolean_t altfmt) +db_disasm(vm_offset_t loc, bool altfmt) { return disasm(&db_disasm_interface, loc, altfmt); Modified: head/sys/arm64/arm64/db_disasm.c ============================================================================== --- head/sys/arm64/arm64/db_disasm.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/arm64/arm64/db_disasm.c Thu May 21 15:16:18 2015 (r283248) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include vm_offset_t -db_disasm(vm_offset_t loc, boolean_t altfmt) +db_disasm(vm_offset_t loc, bool altfmt) { return 0; } Modified: head/sys/ddb/db_access.c ============================================================================== --- head/sys/ddb/db_access.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_access.c Thu May 21 15:16:18 2015 (r283248) @@ -54,7 +54,7 @@ static unsigned db_extend[] = { /* table #endif db_expr_t -db_get_value(db_addr_t addr, int size, boolean_t is_signed) +db_get_value(db_addr_t addr, int size, bool is_signed) { char data[sizeof(u_int64_t)]; register db_expr_t value; Modified: head/sys/ddb/db_access.h ============================================================================== --- head/sys/ddb/db_access.h Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_access.h Thu May 21 15:16:18 2015 (r283248) @@ -36,7 +36,7 @@ /* * Data access functions for debugger. */ -db_expr_t db_get_value(db_addr_t addr, int size, boolean_t is_signed); +db_expr_t db_get_value(db_addr_t addr, int size, bool is_signed); void db_put_value(db_addr_t addr, int size, db_expr_t value); #endif /* !_DDB_DB_ACCESS_H_ */ Modified: head/sys/ddb/db_break.c ============================================================================== --- head/sys/ddb/db_break.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_break.c Thu May 21 15:16:18 2015 (r283248) @@ -155,7 +155,7 @@ db_find_breakpoint_here(db_addr_t addr) return db_find_breakpoint(db_map_addr(addr), addr); } -static boolean_t db_breakpoints_inserted = true; +static bool db_breakpoints_inserted = true; #ifndef BKPT_WRITE #define BKPT_WRITE(addr, storage) \ @@ -267,7 +267,7 @@ db_list_breakpoints(void) /* Delete breakpoint */ /*ARGSUSED*/ void -db_delete_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif) +db_delete_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { db_delete_breakpoint(db_map_addr(addr), (db_addr_t)addr); } @@ -275,8 +275,7 @@ db_delete_cmd(db_expr_t addr, boolean_t /* Set breakpoint with skip count */ /*ARGSUSED*/ void -db_breakpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, - char *modif) +db_breakpoint_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { if (count == -1) count = 1; @@ -286,8 +285,7 @@ db_breakpoint_cmd(db_expr_t addr, boolea /* list breakpoints */ void -db_listbreak_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, - char *dummy4) +db_listbreak_cmd(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4) { db_list_breakpoints(); } @@ -298,7 +296,7 @@ db_listbreak_cmd(db_expr_t dummy1, boole * (or both) may be null. */ -boolean_t +bool db_map_equal(vm_map_t map1, vm_map_t map2) { return ((map1 == map2) || @@ -306,7 +304,7 @@ db_map_equal(vm_map_t map1, vm_map_t map ((map1 == kernel_map) && (map2 == NULL))); } -boolean_t +bool db_map_current(vm_map_t map) { #if 0 @@ -317,7 +315,7 @@ db_map_current(vm_map_t map) (((thread = current_thread()) != NULL) && (map == thread->task->map))); #else - return (1); + return (true); #endif } Modified: head/sys/ddb/db_capture.c ============================================================================== --- head/sys/ddb/db_capture.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_capture.c Thu May 21 15:16:18 2015 (r283248) @@ -331,8 +331,7 @@ db_capture_usage(void) } void -db_capture_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, - char *modif) +db_capture_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { int t; Modified: head/sys/ddb/db_command.c ============================================================================== --- head/sys/ddb/db_command.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_command.c Thu May 21 15:16:18 2015 (r283248) @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); /* * Exported global variables */ -boolean_t db_cmd_loop_done; +bool db_cmd_loop_done; db_addr_t db_dot; db_addr_t db_last_addr; db_addr_t db_prev; @@ -151,7 +151,7 @@ static struct command *db_last_command = * and '+' points to next line. * Otherwise: 'dot' points to next item, '..' points to last. */ -static boolean_t db_ed_style = true; +static bool db_ed_style = true; /* * Utility routine - discard tokens through end-of-line. @@ -327,7 +327,7 @@ db_command(struct command **last_cmdp, s int t; char modif[TOK_STRING_SIZE]; db_expr_t addr, count; - boolean_t have_addr = false; + bool have_addr = false; int result; t = db_read_token(); @@ -340,7 +340,7 @@ db_command(struct command **last_cmdp, s modif[0] = '\0'; } else if (t == tEXCL) { - db_fncall((db_expr_t)0, (boolean_t)0, (db_expr_t)0, (char *)0); + db_fncall((db_expr_t)0, (bool)false, (db_expr_t)0, (char *)0); return; } else if (t != tIDENT) { @@ -521,7 +521,7 @@ db_error(const char *s) } static void -db_dump(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3, char *dummy4) +db_dump(db_expr_t dummy, bool dummy2, db_expr_t dummy3, char *dummy4) { int error; @@ -571,7 +571,7 @@ db_fncall_generic(db_expr_t addr, db_exp } static void -db_fncall(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4) +db_fncall(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4) { db_expr_t fn_addr; db_expr_t args[DB_MAXARGS]; @@ -618,14 +618,14 @@ db_fncall(db_expr_t dummy1, boolean_t du } static void -db_halt(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3, char *dummy4) +db_halt(db_expr_t dummy, bool dummy2, db_expr_t dummy3, char *dummy4) { cpu_halt(); } static void -db_kill(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4) +db_kill(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4) { db_expr_t old_radix, pid, sig; struct proc *p; @@ -684,7 +684,7 @@ out: #endif static void -db_reset(db_expr_t addr, boolean_t have_addr, db_expr_t count __unused, +db_reset(db_expr_t addr, bool have_addr, db_expr_t count __unused, char *modif __unused) { int delay, loop; @@ -714,7 +714,7 @@ db_reset(db_expr_t addr, boolean_t have_ } static void -db_watchdog(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4) +db_watchdog(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4) { db_expr_t old_radix, tout; int err, i; @@ -737,7 +737,7 @@ db_watchdog(db_expr_t dummy1, boolean_t } static void -db_gdb(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4) +db_gdb(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4) { if (kdb_dbbe_select("gdb") != 0) { @@ -753,7 +753,7 @@ db_gdb(db_expr_t dummy1, boolean_t dummy } static void -db_stack_trace(db_expr_t tid, boolean_t hastid, db_expr_t count, char *modif) +db_stack_trace(db_expr_t tid, bool hastid, db_expr_t count, char *modif) { struct thread *td; db_expr_t radix; @@ -799,7 +799,7 @@ db_stack_trace(db_expr_t tid, boolean_t } static void -db_stack_trace_all(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3, +db_stack_trace_all(db_expr_t dummy, bool dummy2, db_expr_t dummy3, char *dummy4) { struct proc *p; Modified: head/sys/ddb/db_examine.c ============================================================================== --- head/sys/ddb/db_examine.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_examine.c Thu May 21 15:16:18 2015 (r283248) @@ -52,8 +52,7 @@ static void db_search(db_addr_t, int, db */ /*ARGSUSED*/ void -db_examine_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, - char *modif) +db_examine_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { if (modif[0] != '\0') db_strcpy(db_examine_format, modif); @@ -190,8 +189,7 @@ static char db_print_format = 'x'; /*ARGSUSED*/ void -db_print_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, - char *modif) +db_print_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { db_expr_t value; @@ -244,8 +242,7 @@ db_print_loc_and_inst(db_addr_t loc) * Syntax: search [/bhl] addr value [mask] [,count] */ void -db_search_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, - char *dummy4) +db_search_cmd(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4) { int t; db_addr_t addr; Modified: head/sys/ddb/db_expr.c ============================================================================== --- head/sys/ddb/db_expr.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_expr.c Thu May 21 15:16:18 2015 (r283248) @@ -38,13 +38,13 @@ __FBSDID("$FreeBSD$"); #include #include -static boolean_t db_add_expr(db_expr_t *valuep); -static boolean_t db_mult_expr(db_expr_t *valuep); -static boolean_t db_shift_expr(db_expr_t *valuep); -static boolean_t db_term(db_expr_t *valuep); -static boolean_t db_unary(db_expr_t *valuep); +static bool db_add_expr(db_expr_t *valuep); +static bool db_mult_expr(db_expr_t *valuep); +static bool db_shift_expr(db_expr_t *valuep); +static bool db_term(db_expr_t *valuep); +static bool db_unary(db_expr_t *valuep); -static boolean_t +static bool db_term(db_expr_t *valuep) { int t; @@ -100,7 +100,7 @@ db_term(db_expr_t *valuep) return (false); } -static boolean_t +static bool db_unary(db_expr_t *valuep) { int t; @@ -127,7 +127,7 @@ db_unary(db_expr_t *valuep) return (db_term(valuep)); } -static boolean_t +static bool db_mult_expr(db_expr_t *valuep) { db_expr_t lhs, rhs; @@ -163,7 +163,7 @@ db_mult_expr(db_expr_t *valuep) return (true); } -static boolean_t +static bool db_add_expr(db_expr_t *valuep) { db_expr_t lhs, rhs; @@ -189,7 +189,7 @@ db_add_expr(db_expr_t *valuep) return (true); } -static boolean_t +static bool db_shift_expr(db_expr_t *valuep) { db_expr_t lhs, rhs; Modified: head/sys/ddb/db_main.c ============================================================================== --- head/sys/ddb/db_main.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_main.c Thu May 21 15:16:18 2015 (r283248) @@ -63,7 +63,7 @@ KDB_BACKEND(ddb, db_init, db_trace_self_ */ vm_offset_t ksymtab, kstrtab, ksymtab_size; -boolean_t +bool X_db_line_at_pc(db_symtab_t *symtab, c_db_sym_t sym, char **file, int *line, db_expr_t off) { @@ -145,7 +145,7 @@ X_db_search_symbol(db_symtab_t *symtab, return ((c_db_sym_t)match); } -boolean_t +bool X_db_sym_numargs(db_symtab_t *symtab, c_db_sym_t sym, int *nargp, char **argp) { @@ -216,7 +216,7 @@ db_trap(int type, int code) { jmp_buf jb; void *prev_jb; - boolean_t bkpt, watchpt; + bool bkpt, watchpt; const char *why; /* Modified: head/sys/ddb/db_print.c ============================================================================== --- head/sys/ddb/db_print.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_print.c Thu May 21 15:16:18 2015 (r283248) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include void -db_show_regs(db_expr_t _1, boolean_t _2, db_expr_t _3, char *_4) +db_show_regs(db_expr_t _1, bool _2, db_expr_t _3, char *_4) { struct db_variable *regp; db_expr_t value, offset; Modified: head/sys/ddb/db_ps.c ============================================================================== --- head/sys/ddb/db_ps.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_ps.c Thu May 21 15:16:18 2015 (r283248) @@ -75,7 +75,7 @@ DB_SHOW_ALL_COMMAND(procs, db_procs_cmd) * characters. */ void -db_ps(db_expr_t addr, boolean_t hasaddr, db_expr_t count, char *modif) +db_ps(db_expr_t addr, bool hasaddr, db_expr_t count, char *modif) { volatile struct proc *p, *pp; volatile struct thread *td; @@ -299,7 +299,7 @@ DB_SHOW_COMMAND(thread, db_show_thread) { struct thread *td; struct lock_object *lock; - boolean_t comma; + bool comma; /* Determine which thread to examine. */ if (have_addr) @@ -432,8 +432,8 @@ DB_SHOW_COMMAND(proc, db_show_proc) } void -db_findstack_cmd(db_expr_t addr, boolean_t have_addr, - db_expr_t dummy3 __unused, char *dummy4 __unused) +db_findstack_cmd(db_expr_t addr, bool have_addr, db_expr_t dummy3 __unused, + char *dummy4 __unused) { struct proc *p; struct thread *td; Modified: head/sys/ddb/db_run.c ============================================================================== --- head/sys/ddb/db_run.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_run.c Thu May 21 15:16:18 2015 (r283248) @@ -57,7 +57,7 @@ static int db_run_mode; #define STEP_INVISIBLE 5 #define STEP_COUNT 6 -static boolean_t db_sstep_print; +static bool db_sstep_print; static int db_loop_count; static int db_call_depth; @@ -77,8 +77,8 @@ db_breakpoint_t db_not_taken_bkpt = 0; db_breakpoint_t db_taken_bkpt = 0; #endif -boolean_t -db_stop_at_pc(boolean_t *is_breakpoint) +bool +db_stop_at_pc(bool *is_breakpoint) { register db_addr_t pc; register db_breakpoint_t bkpt; @@ -179,7 +179,7 @@ db_stop_at_pc(boolean_t *is_breakpoint) } void -db_restart_at_pc(boolean_t watchpt) +db_restart_at_pc(bool watchpt) { register db_addr_t pc = PC_REGS(); @@ -234,7 +234,7 @@ db_restart_at_pc(boolean_t watchpt) * Just define the above conditional and provide * the functions/macros defined below. * - * extern boolean_t + * extern bool * inst_branch(), returns true if the instruction might branch * extern unsigned * branch_taken(), return the address the instruction might @@ -299,13 +299,9 @@ extern int db_cmd_loop_done; /* single-step */ /*ARGSUSED*/ void -db_single_step_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_single_step_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { - boolean_t print = false; + bool print = false; if (count == -1) count = 1; @@ -326,10 +322,10 @@ db_single_step_cmd(addr, have_addr, coun /* trace and print until call/return */ /*ARGSUSED*/ void -db_trace_until_call_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, +db_trace_until_call_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { - boolean_t print = false; + bool print = false; if (modif[0] == 'p') print = true; @@ -345,10 +341,10 @@ db_trace_until_call_cmd(db_expr_t addr, /*ARGSUSED*/ void -db_trace_until_matching_cmd(db_expr_t addr, boolean_t have_addr, - db_expr_t count, char *modif) +db_trace_until_matching_cmd(db_expr_t addr, bool have_addr, db_expr_t count, + char *modif) { - boolean_t print = false; + bool print = false; if (modif[0] == 'p') print = true; @@ -366,8 +362,7 @@ db_trace_until_matching_cmd(db_expr_t ad /* continue */ /*ARGSUSED*/ void -db_continue_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, - char *modif) +db_continue_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { if (modif[0] == 'c') db_run_mode = STEP_COUNT; Modified: head/sys/ddb/db_script.c ============================================================================== --- head/sys/ddb/db_script.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_script.c Thu May 21 15:16:18 2015 (r283248) @@ -339,7 +339,7 @@ db_script_kdbenter(const char *eventname * List scripts and their contents. */ void -db_scripts_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, +db_scripts_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { int i; @@ -357,7 +357,7 @@ db_scripts_cmd(db_expr_t addr, boolean_t * Execute a script. */ void -db_run_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif) +db_run_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { int t; @@ -381,7 +381,7 @@ db_run_cmd(db_expr_t addr, boolean_t hav * we do not wish to use db_lex's token processing. */ void -db_script_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, +db_script_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { char *buf, scriptname[DB_MAXSCRIPTNAME]; @@ -427,7 +427,7 @@ db_script_cmd(db_expr_t addr, boolean_t * Remove a named script. */ void -db_unscript_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, +db_unscript_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { int error, t; Modified: head/sys/ddb/db_sym.c ============================================================================== --- head/sys/ddb/db_sym.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_sym.c Thu May 21 15:16:18 2015 (r283248) @@ -58,8 +58,8 @@ static db_symtab_t *db_last_symtab; /* w static c_db_sym_t db_lookup( const char *symstr); static char *db_qualify(c_db_sym_t sym, char *symtabname); -static boolean_t db_symbol_is_ambiguous(c_db_sym_t sym); -static boolean_t db_line_at_pc(c_db_sym_t, char **, int *, db_expr_t); +static bool db_symbol_is_ambiguous(c_db_sym_t sym); +static bool db_line_at_pc(c_db_sym_t, char **, int *, db_expr_t); static int db_cpu = -1; @@ -202,7 +202,7 @@ db_qualify(c_db_sym_t sym, char *symtabn } -boolean_t +bool db_eqname(const char *src, const char *dst, int c) { if (!strcmp(src, dst)) @@ -212,7 +212,7 @@ db_eqname(const char *src, const char *d return (false); } -boolean_t +bool db_value_of_name(const char *name, db_expr_t *valuep) { c_db_sym_t sym; @@ -224,7 +224,7 @@ db_value_of_name(const char *name, db_ex return (true); } -boolean_t +bool db_value_of_name_pcpu(const char *name, db_expr_t *valuep) { static char tmp[256]; @@ -247,7 +247,7 @@ db_value_of_name_pcpu(const char *name, return (true); } -boolean_t +bool db_value_of_name_vnet(const char *name, db_expr_t *valuep) { #ifdef VIMAGE @@ -331,19 +331,18 @@ db_lookup(const char *symstr) * If true, check across symbol tables for multiple occurrences * of a name. Might slow things down quite a bit. */ -static volatile boolean_t db_qualify_ambiguous_names = false; +static volatile bool db_qualify_ambiguous_names = false; /* * Does this symbol name appear in more than one symbol table? * Used by db_symbol_values to decide whether to qualify a symbol. */ -static boolean_t +static bool db_symbol_is_ambiguous(c_db_sym_t sym) { const char *sym_name; register int i; - register - boolean_t found_once = false; + register bool found_once = false; if (!db_qualify_ambiguous_names) return (false); @@ -352,7 +351,7 @@ db_symbol_is_ambiguous(c_db_sym_t sym) for (i = 0; i < db_nsymtab; i++) { if (X_db_lookup(&db_symtabs[i], sym_name)) { if (found_once) - return true; + return (true); found_once = true; } } @@ -460,14 +459,14 @@ db_printsym(db_expr_t off, db_strategy_t } } -static boolean_t +static bool db_line_at_pc(c_db_sym_t sym, char **filename, int *linenum, db_expr_t pc) { - return X_db_line_at_pc( db_last_symtab, sym, filename, linenum, pc); + return (X_db_line_at_pc(db_last_symtab, sym, filename, linenum, pc)); } -int +bool db_sym_numargs(c_db_sym_t sym, int *nargp, char **argnames) { - return X_db_sym_numargs(db_last_symtab, sym, nargp, argnames); + return (X_db_sym_numargs(db_last_symtab, sym, nargp, argnames)); } Modified: head/sys/ddb/db_sym.h ============================================================================== --- head/sys/ddb/db_sym.h Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_sym.h Thu May 21 15:16:18 2015 (r283248) @@ -86,20 +86,20 @@ void db_symbol_values(c_db_sym_t, const db_symbol_values(db_search_symbol(val,DB_STGY_XTRN,offp),namep,0) /* ditto, but no locals */ -int db_eqname(const char *, const char *, int); +bool db_eqname(const char *, const char *, int); /* strcmp, modulo leading char */ void db_printsym(db_expr_t, db_strategy_t); /* print closest symbol to a value */ -int db_sym_numargs(c_db_sym_t, int *, char **); +bool db_sym_numargs(c_db_sym_t, int *, char **); -boolean_t X_db_line_at_pc(db_symtab_t *symtab, c_db_sym_t cursym, +bool X_db_line_at_pc(db_symtab_t *symtab, c_db_sym_t cursym, char **filename, int *linenum, db_expr_t off); c_db_sym_t X_db_lookup(db_symtab_t *stab, const char *symstr); c_db_sym_t X_db_search_symbol(db_symtab_t *symtab, db_addr_t off, db_strategy_t strategy, db_expr_t *diffp); -int X_db_sym_numargs(db_symtab_t *, c_db_sym_t, int *, char **); +bool X_db_sym_numargs(db_symtab_t *, c_db_sym_t, int *, char **); void X_db_symbol_values(db_symtab_t *symtab, c_db_sym_t sym, const char **namep, db_expr_t *valuep); Modified: head/sys/ddb/db_textdump.c ============================================================================== --- head/sys/ddb/db_textdump.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_textdump.c Thu May 21 15:16:18 2015 (r283248) @@ -516,8 +516,7 @@ db_textdump_usage(void) } void -db_textdump_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, - char *modif) +db_textdump_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { int t; Modified: head/sys/ddb/db_thread.c ============================================================================== --- head/sys/ddb/db_thread.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_thread.c Thu May 21 15:16:18 2015 (r283248) @@ -50,7 +50,7 @@ db_print_thread(void) } void -db_set_thread(db_expr_t tid, boolean_t hastid, db_expr_t cnt, char *mod) +db_set_thread(db_expr_t tid, bool hastid, db_expr_t cnt, char *mod) { struct thread *thr; db_expr_t radix; @@ -86,7 +86,7 @@ db_set_thread(db_expr_t tid, boolean_t h } void -db_show_threads(db_expr_t addr, boolean_t hasaddr, db_expr_t cnt, char *mod) +db_show_threads(db_expr_t addr, bool hasaddr, db_expr_t cnt, char *mod) { jmp_buf jb; void *prev_jb; @@ -115,7 +115,7 @@ db_show_threads(db_expr_t addr, boolean_ * process. Otherwise, we treat the addr as a pointer to a thread. */ struct thread * -db_lookup_thread(db_expr_t addr, boolean_t check_pid) +db_lookup_thread(db_expr_t addr, bool check_pid) { struct thread *td; db_expr_t decaddr; Modified: head/sys/ddb/db_variables.c ============================================================================== --- head/sys/ddb/db_variables.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_variables.c Thu May 21 15:16:18 2015 (r283248) @@ -128,7 +128,7 @@ db_write_variable(struct db_variable *vp } void -db_set_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4) +db_set_cmd(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4) { struct db_variable *vp; db_expr_t value; Modified: head/sys/ddb/db_watch.c ============================================================================== --- head/sys/ddb/db_watch.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_watch.c Thu May 21 15:16:18 2015 (r283248) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); * Watchpoints. */ -static boolean_t db_watchpoints_inserted = true; +static bool db_watchpoints_inserted = true; #define NWATCHPOINTS 100 static struct db_watchpoint db_watch_table[NWATCHPOINTS]; @@ -59,7 +59,7 @@ static db_watchpoint_t db_watchpoint_all static void db_watchpoint_free(db_watchpoint_t watch); static void db_delete_watchpoint(vm_map_t map, db_addr_t addr); #ifdef notused -static boolean_t db_find_watchpoint(vm_map_t map, db_addr_t addr, +static bool db_find_watchpoint(vm_map_t map, db_addr_t addr, db_regs_t *regs); #endif static void db_list_watchpoints(void); @@ -183,7 +183,7 @@ db_list_watchpoints(void) /* Delete watchpoint */ /*ARGSUSED*/ void -db_deletewatch_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, +db_deletewatch_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { db_delete_watchpoint(db_map_addr(addr), addr); @@ -192,7 +192,7 @@ db_deletewatch_cmd(db_expr_t addr, boole /* Set watchpoint */ /*ARGSUSED*/ void -db_watchpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, +db_watchpoint_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { vm_size_t size; @@ -242,7 +242,7 @@ db_clear_watchpoints(void) } #ifdef notused -static boolean_t +static bool db_find_watchpoint(vm_map_t map, db_addr_t addr, db_regs_t regs) { register db_watchpoint_t watch; @@ -280,7 +280,7 @@ db_find_watchpoint(vm_map_t map, db_addr /* Delete hardware watchpoint */ /*ARGSUSED*/ void -db_deletehwatch_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, +db_deletehwatch_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { int rc; @@ -296,7 +296,7 @@ db_deletehwatch_cmd(db_expr_t addr, bool /* Set hardware watchpoint */ /*ARGSUSED*/ void -db_hwatchpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, +db_hwatchpoint_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { int rc; Modified: head/sys/ddb/db_write_cmd.c ============================================================================== --- head/sys/ddb/db_write_cmd.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/db_write_cmd.c Thu May 21 15:16:18 2015 (r283248) @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); */ /*ARGSUSED*/ void -db_write_cmd(db_expr_t address, boolean_t have_addr, db_expr_t count, +db_write_cmd(db_expr_t address, bool have_addr, db_expr_t count, char * modif) { register @@ -52,7 +52,7 @@ db_write_cmd(db_expr_t address, boolean_ db_expr_t old_value; db_expr_t new_value; register int size; - boolean_t wrote_one = false; + bool wrote_one = false; addr = (db_addr_t) address; Modified: head/sys/ddb/ddb.h ============================================================================== --- head/sys/ddb/ddb.h Thu May 21 15:05:46 2015 (r283247) +++ head/sys/ddb/ddb.h Thu May 21 15:16:18 2015 (r283248) @@ -101,7 +101,7 @@ extern struct command_table db_show_all_ /* * Type signature for a function implementing a ddb command. */ -typedef void db_cmdfcn_t(db_expr_t addr, boolean_t have_addr, db_expr_t count, +typedef void db_cmdfcn_t(db_expr_t addr, bool have_addr, db_expr_t count, char *modif); /* @@ -156,7 +156,7 @@ SYSUNINIT(__CONCAT(_name,_suffix), SI_SU static db_cmdfcn_t _func; \ _DB_SET(_suffix, _name, _func, list, _flag, _more); \ static void \ -_func(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif) +_func(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) /* common idom provided for backwards compatibility */ #define DB_FUNC(_name, _func, list, _flag, _more) \ @@ -191,17 +191,17 @@ struct vm_map; void db_check_interrupt(void); void db_clear_watchpoints(void); -db_addr_t db_disasm(db_addr_t loc, boolean_t altfmt); +db_addr_t db_disasm(db_addr_t loc, bool altfmt); /* instruction disassembler */ void db_error(const char *s); int db_expression(db_expr_t *valuep); int db_get_variable(db_expr_t *valuep); void db_iprintf(const char *,...) __printflike(1, 2); struct proc *db_lookup_proc(db_expr_t addr); -struct thread *db_lookup_thread(db_expr_t addr, boolean_t check_pid); +struct thread *db_lookup_thread(db_expr_t addr, bool check_pid); struct vm_map *db_map_addr(vm_offset_t); -boolean_t db_map_current(struct vm_map *); -boolean_t db_map_equal(struct vm_map *, struct vm_map *); +bool db_map_current(struct vm_map *); +bool db_map_equal(struct vm_map *, struct vm_map *); int db_md_set_watchpoint(db_expr_t addr, db_expr_t size); int db_md_clr_watchpoint(db_expr_t addr, db_expr_t size); void db_md_list_watchpoints(void); @@ -211,17 +211,17 @@ int db_printf(const char *fmt, ...) __p int db_read_bytes(vm_offset_t addr, size_t size, char *data); /* machine-dependent */ int db_readline(char *lstart, int lsize); -void db_restart_at_pc(boolean_t watchpt); +void db_restart_at_pc(bool watchpt); int db_set_variable(db_expr_t value); void db_set_watchpoints(void); void db_skip_to_eol(void); -boolean_t db_stop_at_pc(boolean_t *is_breakpoint); +bool db_stop_at_pc(bool *is_breakpoint); #define db_strcpy strcpy void db_trace_self(void); int db_trace_thread(struct thread *, int); -int db_value_of_name(const char *name, db_expr_t *valuep); -int db_value_of_name_pcpu(const char *name, db_expr_t *valuep); -int db_value_of_name_vnet(const char *name, db_expr_t *valuep); +bool db_value_of_name(const char *name, db_expr_t *valuep); +bool db_value_of_name_pcpu(const char *name, db_expr_t *valuep); +bool db_value_of_name_vnet(const char *name, db_expr_t *valuep); int db_write_bytes(vm_offset_t addr, size_t size, char *data); void db_command_register(struct command_table *, struct command *); void db_command_unregister(struct command_table *, struct command *); Modified: head/sys/i386/i386/db_disasm.c ============================================================================== --- head/sys/i386/i386/db_disasm.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/i386/i386/db_disasm.c Thu May 21 15:16:18 2015 (r283248) @@ -1148,9 +1148,7 @@ db_disasm_esc(loc, inst, short_addr, siz * next instruction. */ db_addr_t -db_disasm(loc, altfmt) - db_addr_t loc; - boolean_t altfmt; +db_disasm(db_addr_t loc, bool altfmt) { int inst; int size; Modified: head/sys/kern/subr_turnstile.c ============================================================================== --- head/sys/kern/subr_turnstile.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/kern/subr_turnstile.c Thu May 21 15:16:18 2015 (r283248) @@ -1151,7 +1151,7 @@ DB_SHOW_COMMAND(lockchain, db_show_lockc /* Figure out which thread to start with. */ if (have_addr) - td = db_lookup_thread(addr, TRUE); + td = db_lookup_thread(addr, true); else td = kdb_thread; @@ -1236,7 +1236,7 @@ DB_SHOW_COMMAND(sleepchain, db_show_slee /* Figure out which thread to start with. */ if (have_addr) - td = db_lookup_thread(addr, TRUE); + td = db_lookup_thread(addr, true); else td = kdb_thread; Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/kern/subr_witness.c Thu May 21 15:16:18 2015 (r283248) @@ -2440,7 +2440,7 @@ DB_SHOW_COMMAND(locks, db_witness_list) struct thread *td; if (have_addr) - td = db_lookup_thread(addr, TRUE); + td = db_lookup_thread(addr, true); else td = kdb_thread; witness_ddb_list(td); Modified: head/sys/mips/mips/db_disasm.c ============================================================================== --- head/sys/mips/mips/db_disasm.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/mips/mips/db_disasm.c Thu May 21 15:16:18 2015 (r283248) @@ -130,7 +130,7 @@ static char *c0_reg[32] = { static int md_printins(int ins, int mdbdot); db_addr_t -db_disasm(db_addr_t loc, boolean_t altfmt) +db_disasm(db_addr_t loc, bool altfmt) { int ins; Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/mips/mips/pmap.c Thu May 21 15:16:18 2015 (r283248) @@ -3243,7 +3243,7 @@ DB_SHOW_COMMAND(ptable, ddb_pid_dump) vm_offset_t va; if (have_addr) { - td = db_lookup_thread(addr, TRUE); + td = db_lookup_thread(addr, true); if (td == NULL) { db_printf("Invalid pid or tid"); return; Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/mips/mips/vm_machdep.c Thu May 21 15:16:18 2015 (r283248) @@ -571,7 +571,7 @@ DB_SHOW_COMMAND(pcb, ddb_dump_pcb) /* Determine which thread to examine. */ if (have_addr) - td = db_lookup_thread(addr, TRUE); + td = db_lookup_thread(addr, true); else td = curthread; Modified: head/sys/powerpc/powerpc/db_disasm.c ============================================================================== --- head/sys/powerpc/powerpc/db_disasm.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/powerpc/powerpc/db_disasm.c Thu May 21 15:16:18 2015 (r283248) @@ -936,7 +936,7 @@ dis_ppc(const struct opcode *opcodeset, } db_addr_t -db_disasm(db_addr_t loc, boolean_t extended) +db_disasm(db_addr_t loc, bool extended) { int class; instr_t opcode; Modified: head/sys/sparc64/sparc64/db_disasm.c ============================================================================== --- head/sys/sparc64/sparc64/db_disasm.c Thu May 21 15:05:46 2015 (r283247) +++ head/sys/sparc64/sparc64/db_disasm.c Thu May 21 15:16:18 2015 (r283248) @@ -803,7 +803,7 @@ static const struct sparc_insn sparc_i[] }; db_addr_t -db_disasm(db_addr_t loc, boolean_t altfmt) +db_disasm(db_addr_t loc, bool altfmt) { const struct sparc_insn* i_ptr = (struct sparc_insn *)&sparc_i; unsigned int insn, you_lose, bitmask; From owner-svn-src-head@FreeBSD.ORG Thu May 21 15:38:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CBCE138; Thu, 21 May 2015 15:38:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AE301D83; Thu, 21 May 2015 15:38:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LFchgP064688; Thu, 21 May 2015 15:38:43 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LFchbJ064686; Thu, 21 May 2015 15:38:43 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201505211538.t4LFchbJ064686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Thu, 21 May 2015 15:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283249 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 15:38:44 -0000 Author: jmg Date: Thu May 21 15:38:43 2015 New Revision: 283249 URL: https://svnweb.freebsd.org/changeset/base/283249 Log: remove stray ; that came in r272673... Modified: head/sys/sys/systm.h Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Thu May 21 15:16:18 2015 (r283248) +++ head/sys/sys/systm.h Thu May 21 15:38:43 2015 (r283249) @@ -237,7 +237,7 @@ void hexdump(const void *ptr, int length #define ovbcopy(f, t, l) bcopy((f), (t), (l)) void bcopy(const void *from, void *to, size_t len) __nonnull(1) __nonnull(2); void bzero(void *buf, size_t len) __nonnull(1); -void explicit_bzero(void *, size_t) __nonnull(1);; +void explicit_bzero(void *, size_t) __nonnull(1); void *memcpy(void *to, const void *from, size_t len) __nonnull(1) __nonnull(2); void *memmove(void *dest, const void *src, size_t n) __nonnull(1) __nonnull(2); From owner-svn-src-head@FreeBSD.ORG Thu May 21 16:43:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC7CC7E4; Thu, 21 May 2015 16:43:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAD4A1671; Thu, 21 May 2015 16:43:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LGhRCh001250; Thu, 21 May 2015 16:43:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LGhRAY001248; Thu, 21 May 2015 16:43:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505211643.t4LGhRAY001248@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 21 May 2015 16:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283250 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 16:43:28 -0000 Author: jhb Date: Thu May 21 16:43:26 2015 New Revision: 283250 URL: https://svnweb.freebsd.org/changeset/base/283250 Log: Revert r282971. It depends on condvar consumers not destroying condvars until all threads sleeping on a condvar have resumed execution after being awakened. However, there are cases where that guarantee is very hard to provide. Modified: head/sys/kern/kern_condvar.c head/sys/sys/condvar.h Modified: head/sys/kern/kern_condvar.c ============================================================================== --- head/sys/kern/kern_condvar.c Thu May 21 15:38:43 2015 (r283249) +++ head/sys/kern/kern_condvar.c Thu May 21 16:43:26 2015 (r283250) @@ -122,7 +122,7 @@ _cv_wait(struct cv *cvp, struct lock_obj sleepq_lock(cvp); - atomic_add_int(&cvp->cv_waiters, 1); + cvp->cv_waiters++; if (lock == &Giant.lock_object) mtx_assert(&Giant, MA_OWNED); DROP_GIANT(); @@ -137,7 +137,6 @@ _cv_wait(struct cv *cvp, struct lock_obj sleepq_lock(cvp); } sleepq_wait(cvp, 0); - atomic_subtract_int(&cvp->cv_waiters, 1); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -185,7 +184,7 @@ _cv_wait_unlock(struct cv *cvp, struct l sleepq_lock(cvp); - atomic_add_int(&cvp->cv_waiters, 1); + cvp->cv_waiters++; DROP_GIANT(); sleepq_add(cvp, lock, cvp->cv_description, SLEEPQ_CONDVAR, 0); @@ -195,7 +194,6 @@ _cv_wait_unlock(struct cv *cvp, struct l if (class->lc_flags & LC_SLEEPABLE) sleepq_lock(cvp); sleepq_wait(cvp, 0); - atomic_subtract_int(&cvp->cv_waiters, 1); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -242,7 +240,7 @@ _cv_wait_sig(struct cv *cvp, struct lock sleepq_lock(cvp); - atomic_add_int(&cvp->cv_waiters, 1); + cvp->cv_waiters++; if (lock == &Giant.lock_object) mtx_assert(&Giant, MA_OWNED); DROP_GIANT(); @@ -258,7 +256,6 @@ _cv_wait_sig(struct cv *cvp, struct lock sleepq_lock(cvp); } rval = sleepq_wait_sig(cvp, 0); - atomic_subtract_int(&cvp->cv_waiters, 1); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -310,7 +307,7 @@ _cv_timedwait_sbt(struct cv *cvp, struct sleepq_lock(cvp); - atomic_add_int(&cvp->cv_waiters, 1); + cvp->cv_waiters++; if (lock == &Giant.lock_object) mtx_assert(&Giant, MA_OWNED); DROP_GIANT(); @@ -326,7 +323,6 @@ _cv_timedwait_sbt(struct cv *cvp, struct sleepq_lock(cvp); } rval = sleepq_timedwait(cvp, 0); - atomic_subtract_int(&cvp->cv_waiters, 1); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -380,7 +376,7 @@ _cv_timedwait_sig_sbt(struct cv *cvp, st sleepq_lock(cvp); - atomic_add_int(&cvp->cv_waiters, 1); + cvp->cv_waiters++; if (lock == &Giant.lock_object) mtx_assert(&Giant, MA_OWNED); DROP_GIANT(); @@ -397,7 +393,6 @@ _cv_timedwait_sig_sbt(struct cv *cvp, st sleepq_lock(cvp); } rval = sleepq_timedwait_sig(cvp, 0); - atomic_subtract_int(&cvp->cv_waiters, 1); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -426,8 +421,10 @@ cv_signal(struct cv *cvp) wakeup_swapper = 0; sleepq_lock(cvp); - if (cvp->cv_waiters > 0) + if (cvp->cv_waiters > 0) { + cvp->cv_waiters--; wakeup_swapper = sleepq_signal(cvp, SLEEPQ_CONDVAR, 0, 0); + } sleepq_release(cvp); if (wakeup_swapper) kick_proc0(); @@ -450,8 +447,10 @@ cv_broadcastpri(struct cv *cvp, int pri) if (pri == -1) pri = 0; sleepq_lock(cvp); - if (cvp->cv_waiters > 0) + if (cvp->cv_waiters > 0) { + cvp->cv_waiters = 0; wakeup_swapper = sleepq_broadcast(cvp, SLEEPQ_CONDVAR, pri, 0); + } sleepq_release(cvp); if (wakeup_swapper) kick_proc0(); Modified: head/sys/sys/condvar.h ============================================================================== --- head/sys/sys/condvar.h Thu May 21 15:38:43 2015 (r283249) +++ head/sys/sys/condvar.h Thu May 21 16:43:26 2015 (r283250) @@ -45,7 +45,7 @@ TAILQ_HEAD(cv_waitq, thread); */ struct cv { const char *cv_description; - volatile int cv_waiters; + int cv_waiters; }; #ifdef _KERNEL From owner-svn-src-head@FreeBSD.ORG Thu May 21 16:45:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BA70AC0; Thu, 21 May 2015 16:45:25 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25C75169B; Thu, 21 May 2015 16:45:25 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EE50DB962; Thu, 21 May 2015 12:45:23 -0400 (EDT) From: John Baldwin To: d@delphij.net Cc: Matthew Ahrens , Alexander Kabaev , "src-committers@freebsd.org" , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282971 - in head/sys: kern sys Date: Thu, 21 May 2015 11:34:23 -0400 Message-ID: <3628414.bIFniENAoC@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <555CFBFA.5040707@delphij.net> References: <201505151350.t4FDocQT054144@svn.freebsd.org> <555CFBFA.5040707@delphij.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 21 May 2015 12:45:24 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 16:45:25 -0000 On Wednesday, May 20, 2015 02:26:18 PM Xin Li wrote: > I think we should also assert that no waiter remains when a conditional > variable is destroyed (which also suggests that the memory may be freed > shortly). Otherwise we would either have modify after free or lost wakeups. We already assert for this. That is what the call to sleepq_lookup() is checking for. If there are any sleepers then there will be a sleepq allocated for this cvp. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu May 21 16:45:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC4F4AC3; Thu, 21 May 2015 16:45:25 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5B62169D; Thu, 21 May 2015 16:45:25 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A296EB953; Thu, 21 May 2015 12:45:24 -0400 (EDT) From: John Baldwin To: Alexander Kabaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282971 - in head/sys: kern sys Date: Thu, 21 May 2015 11:33:02 -0400 Message-ID: <2114957.Lbz1KNQfZU@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <20150520120046.268dde86@kan> References: <201505151350.t4FDocQT054144@svn.freebsd.org> <20150520120046.268dde86@kan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 21 May 2015 12:45:24 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 16:45:26 -0000 On Wednesday, May 20, 2015 12:00:46 PM Alexander Kabaev wrote: > On Fri, 15 May 2015 13:50:38 +0000 (UTC) > John Baldwin wrote: > > > Author: jhb > > Date: Fri May 15 13:50:37 2015 > > New Revision: 282971 > > URL: https://svnweb.freebsd.org/changeset/base/282971 > > > > Log: > > Previously, cv_waiters was only updated by cv_signal or cv_wait. If > > a thread awakened due to a time out, then cv_waiters was not > > decremented. If INT_MAX threads timed out on a cv without an > > intervening cv_broadcast, then cv_waiters could overflow. To fix > > this, have each sleeping thread decrement cv_waiters when it resumes. > > > > Note that previously cv_waiters was protected by the sleepq chain > > lock. However, that lock is not held when threads resume from sleep. > > In addition, the interlock is also not always reacquired after > > resuming (cv_wait_unlock), nor is it always held by callers of > > cv_signal() or cv_broadcast(). Instead, use atomic ops to update > > cv_waiters. Since the sleepq chain lock is still held on every > > increment, it should still be safe to compare cv_waiters against zero > > while holding the lock in the wakeup routines as the only way the > > race should be lost would result in extra calls to sleepq_signal() or > > sleepq_broadcast(). > > Differential Revision: https://reviews.freebsd.org/D2427 > > Reviewed by: benno > > Reported by: benno (wrap of cv_waiters in the field) > > MFC after: 2 weeks > > > > Modified: > > head/sys/kern/kern_condvar.c > > head/sys/sys/condvar.h > > > > This breaks ZFS range locking code, which expects to be able to wakeup > everyone on the condition variable and then free the structure that > contains it. Having woken up threads modify cv_waiters results in a > race that leads to already freed memory to be accessed. > > It is debatable just how correct ZFS code in its expectations, but I > think this commit should probably be reverted until either ZFS is > changed not to expect cv modifiable by waking threads or until > alternative solution is found to the cv_waiters overflow issue fixed by > this commit. Yes, this is fine to revert for now. I'll have to think about which way to fix the bug in question. The simplest route is probably to remove cv_waiters entirely, though hacking up sleepq_timeout to recognize cv's and decrement the count is another option (but hackier). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu May 21 16:58:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F9B311A; Thu, 21 May 2015 16:58:32 +0000 (UTC) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA82217FE; Thu, 21 May 2015 16:58:31 +0000 (UTC) Received: by wgfl8 with SMTP id l8so91942814wgf.2; Thu, 21 May 2015 09:58:30 -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=YToJd8WRXP9/+wJQ2w6V8+PU57bo50K8PFiB+uywsYY=; b=xFxySaFoSXWxGyhnESrQEuTNHwtUp75Aw8DJoFUf/I/ivNikk6T4EH/ZSte1LJXqnG AlKQm35++fCf+dFJ3cg5kkeWyTl9KCxG75zhKr7aNUHCyCv8iAm3FAQE7eJ8VMn8UwhP EClYw2/6VaUgshiovfIG/DrQ16QJTIuxB9VEw/dpAjLj5HrNBlC3sYxY0wlmUJbpcvQM /llkfE5ZFGbrQ26W8noEa1RzTyERdnB6VTcSF4dBJk3yeamUODHgIoJ2m2mSjj/9i11d dBPlNcTq8gWeBxWH7ufYJXvl/rJOrD+OG/kJHAs4/IaZbmVGeCCWuXg5CjpUfPlPIBnd 6Otw== X-Received: by 10.194.2.47 with SMTP id 15mr7011414wjr.101.1432227510257; Thu, 21 May 2015 09:58:30 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id g14sm33002409wjs.47.2015.05.21.09.58.29 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 21 May 2015 09:58:29 -0700 (PDT) Date: Thu, 21 May 2015 18:58:27 +0200 From: Mateusz Guzik To: John Baldwin Cc: Alexander Kabaev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282971 - in head/sys: kern sys Message-ID: <20150521165826.GA17403@dft-labs.eu> References: <201505151350.t4FDocQT054144@svn.freebsd.org> <20150520120046.268dde86@kan> <2114957.Lbz1KNQfZU@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2114957.Lbz1KNQfZU@ralph.baldwin.cx> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 16:58:32 -0000 On Thu, May 21, 2015 at 11:33:02AM -0400, John Baldwin wrote: > On Wednesday, May 20, 2015 12:00:46 PM Alexander Kabaev wrote: > > On Fri, 15 May 2015 13:50:38 +0000 (UTC) > > John Baldwin wrote: > > > > > Author: jhb > > > Date: Fri May 15 13:50:37 2015 > > > New Revision: 282971 > > > URL: https://svnweb.freebsd.org/changeset/base/282971 > > > > > > Log: > > > Previously, cv_waiters was only updated by cv_signal or cv_wait. If > > > a thread awakened due to a time out, then cv_waiters was not > > > decremented. If INT_MAX threads timed out on a cv without an > > > intervening cv_broadcast, then cv_waiters could overflow. To fix > > > this, have each sleeping thread decrement cv_waiters when it resumes. > > > > > > Note that previously cv_waiters was protected by the sleepq chain > > > lock. However, that lock is not held when threads resume from sleep. > > > In addition, the interlock is also not always reacquired after > > > resuming (cv_wait_unlock), nor is it always held by callers of > > > cv_signal() or cv_broadcast(). Instead, use atomic ops to update > > > cv_waiters. Since the sleepq chain lock is still held on every > > > increment, it should still be safe to compare cv_waiters against zero > > > while holding the lock in the wakeup routines as the only way the > > > race should be lost would result in extra calls to sleepq_signal() or > > > sleepq_broadcast(). > > > Differential Revision: https://reviews.freebsd.org/D2427 > > > Reviewed by: benno > > > Reported by: benno (wrap of cv_waiters in the field) > > > MFC after: 2 weeks > > > > > > Modified: > > > head/sys/kern/kern_condvar.c > > > head/sys/sys/condvar.h > > > > > > > This breaks ZFS range locking code, which expects to be able to wakeup > > everyone on the condition variable and then free the structure that > > contains it. Having woken up threads modify cv_waiters results in a > > race that leads to already freed memory to be accessed. > > > > It is debatable just how correct ZFS code in its expectations, but I > > think this commit should probably be reverted until either ZFS is > > changed not to expect cv modifiable by waking threads or until > > alternative solution is found to the cv_waiters overflow issue fixed by > > this commit. > > Yes, this is fine to revert for now. I'll have to think about which way > to fix the bug in question. The simplest route is probably to remove > cv_waiters entirely, though hacking up sleepq_timeout to recognize cv's > and decrement the count is another option (but hackier). > The code was buggy even prior to this. _cv_wait does: #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) ktrcsw(0, 0, cv_wmesg(cvp)); #endif So with ktrace enabled cvp is possibly accessed after it gets freed. I checked "solaris compatiblity layer" from "zfs on linux" project and it looks like they are screwed by this as well. In other words, I would argue modifying native privmitives to accomodate for zfs use may not be the best course of action. Hacking up zfs or cv_ primitives seems better and opens up posibilities for minor optimisations. I'm not up to it though. -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Thu May 21 17:39:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F85CB30; Thu, 21 May 2015 17:39:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F310D1D69; Thu, 21 May 2015 17:39:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LHdgQX027603; Thu, 21 May 2015 17:39:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LHdgrZ027602; Thu, 21 May 2015 17:39:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505211739.t4LHdgrZ027602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 May 2015 17:39:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283252 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 17:39:43 -0000 Author: gjb Date: Thu May 21 17:39:42 2015 New Revision: 283252 URL: https://svnweb.freebsd.org/changeset/base/283252 Log: Include the TARGET in the EC2 AMI name. Without this, AWS rejects subsequent image uploads of a different architecture because the name conflicts. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.ec2 Modified: head/release/Makefile.ec2 ============================================================================== --- head/release/Makefile.ec2 Thu May 21 16:44:31 2015 (r283251) +++ head/release/Makefile.ec2 Thu May 21 17:39:42 2015 (r283252) @@ -53,7 +53,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} .endif /usr/local/bin/bsdec2-image-upload ${PUBLISH} \ ${.OBJDIR}/ec2.raw \ - "${TYPE} ${REVISION}-${BRANCH}${AMINAMESUFFIX}" \ - "${TYPE} ${REVISION}-${BRANCH}" \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} @touch ${.TARGET} From owner-svn-src-head@FreeBSD.ORG Thu May 21 17:39:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48C12B31; Thu, 21 May 2015 17:39:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 368321D6A; Thu, 21 May 2015 17:39:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LHdicJ027620; Thu, 21 May 2015 17:39:44 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LHdhPo027612; Thu, 21 May 2015 17:39:43 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505211739.t4LHdhPo027612@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 21 May 2015 17:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283253 - in head/sys: arm/allwinner arm/conf boot/fdt/dts/arm dev/mmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 17:39:44 -0000 Author: loos Date: Thu May 21 17:39:42 2015 New Revision: 283253 URL: https://svnweb.freebsd.org/changeset/base/283253 Log: Add the MMC/SD driver for Allwinner SoCs. This is based on the patch sent by Alexander Fedorov with the following fixes/improvements: - Better error handling; - Clock is derived from PLL6 (obtained from netbsd); - No more unnecessary busy loops on interrupt handler; - style(9) fixes and code cleanup. I also want to thanks Martin Galvan who has sent an alternative implementation with some interesting fixes. Tested on CubieBoard2, Banana-Pi (thanks to netgate!) and Cubieboard1 (Pratik Singhal). This is intended to pave the way for the upcoming GSoC work (and make easier the build of images for the supported boards). PR: 196081 Submitted by: Alexander Fedorov Added: head/sys/arm/allwinner/a10_mmc.c (contents, props changed) head/sys/arm/allwinner/a10_mmc.h (contents, props changed) Modified: head/sys/arm/allwinner/a10_clk.c head/sys/arm/allwinner/a10_clk.h head/sys/arm/allwinner/files.allwinner head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/CUBIEBOARD2 head/sys/boot/fdt/dts/arm/cubieboard.dts head/sys/boot/fdt/dts/arm/cubieboard2.dts head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi head/sys/dev/mmc/mmc.c Modified: head/sys/arm/allwinner/a10_clk.c ============================================================================== --- head/sys/arm/allwinner/a10_clk.c Thu May 21 17:39:42 2015 (r283252) +++ head/sys/arm/allwinner/a10_clk.c Thu May 21 17:39:42 2015 (r283253) @@ -174,7 +174,8 @@ a10_clk_usb_deactivate(void) } int -a10_clk_emac_activate(void) { +a10_clk_emac_activate(void) +{ struct a10_ccm_softc *sc = a10_ccm_sc; uint32_t reg_value; @@ -189,3 +190,110 @@ a10_clk_emac_activate(void) { return (0); } +static void +a10_clk_pll6_enable(void) +{ + struct a10_ccm_softc *sc; + uint32_t reg_value; + + /* + * SATA needs PLL6 to be a 100MHz clock. + * The SATA output frequency is 24MHz * n * k / m / 6. + * To get to 100MHz, k & m must be equal and n must be 25. + * For other uses the output frequency is 24MHz * n * k / 2. + */ + sc = a10_ccm_sc; + reg_value = ccm_read_4(sc, CCM_PLL6_CFG); + reg_value &= ~CCM_PLL_CFG_BYPASS; + reg_value &= ~(CCM_PLL_CFG_FACTOR_K | CCM_PLL_CFG_FACTOR_M | + CCM_PLL_CFG_FACTOR_N); + reg_value |= (25 << CCM_PLL_CFG_FACTOR_N_SHIFT); + reg_value |= CCM_PLL6_CFG_SATA_CLKEN; + reg_value |= CCM_PLL_CFG_ENABLE; + ccm_write_4(sc, CCM_PLL6_CFG, reg_value); +} + +static unsigned int +a10_clk_pll6_get_rate(void) +{ + struct a10_ccm_softc *sc; + uint32_t k, n, reg_value; + + sc = a10_ccm_sc; + reg_value = ccm_read_4(sc, CCM_PLL6_CFG); + n = ((reg_value & CCM_PLL_CFG_FACTOR_N) >> CCM_PLL_CFG_FACTOR_N_SHIFT); + k = ((reg_value & CCM_PLL_CFG_FACTOR_K) >> CCM_PLL_CFG_FACTOR_K_SHIFT) + + 1; + + return ((CCM_CLK_REF_FREQ * n * k) / 2); +} + +int +a10_clk_mmc_activate(int devid) +{ + struct a10_ccm_softc *sc; + uint32_t reg_value; + + sc = a10_ccm_sc; + if (sc == NULL) + return (ENXIO); + + a10_clk_pll6_enable(); + + /* Gating AHB clock for SD/MMC */ + reg_value = ccm_read_4(sc, CCM_AHB_GATING0); + reg_value |= CCM_AHB_GATING_SDMMC0 << devid; + ccm_write_4(sc, CCM_AHB_GATING0, reg_value); + + return (0); +} + +int +a10_clk_mmc_cfg(int devid, int freq) +{ + struct a10_ccm_softc *sc; + uint32_t clksrc, m, n, ophase, phase, reg_value; + unsigned int pll_freq; + + sc = a10_ccm_sc; + if (sc == NULL) + return (ENXIO); + + freq /= 1000; + if (freq <= 400) { + pll_freq = CCM_CLK_REF_FREQ / 1000; + clksrc = CCM_SD_CLK_SRC_SEL_OSC24M; + ophase = 0; + phase = 0; + n = 2; + } else if (freq <= 25000) { + pll_freq = a10_clk_pll6_get_rate() / 1000; + clksrc = CCM_SD_CLK_SRC_SEL_PLL6; + ophase = 0; + phase = 5; + n = 2; + } else if (freq <= 50000) { + pll_freq = a10_clk_pll6_get_rate() / 1000; + clksrc = CCM_SD_CLK_SRC_SEL_PLL6; + ophase = 3; + phase = 5; + n = 0; + } else + return (EINVAL); + m = ((pll_freq / (1 << n)) / (freq)) - 1; + reg_value = ccm_read_4(sc, CCM_MMC0_SCLK_CFG + (devid * 4)); + reg_value &= ~CCM_SD_CLK_SRC_SEL; + reg_value |= (clksrc << CCM_SD_CLK_SRC_SEL_SHIFT); + reg_value &= ~CCM_SD_CLK_PHASE_CTR; + reg_value |= (phase << CCM_SD_CLK_PHASE_CTR_SHIFT); + reg_value &= ~CCM_SD_CLK_DIV_RATIO_N; + reg_value |= (n << CCM_SD_CLK_DIV_RATIO_N_SHIFT); + reg_value &= ~CCM_SD_CLK_OPHASE_CTR; + reg_value |= (ophase << CCM_SD_CLK_OPHASE_CTR_SHIFT); + reg_value &= ~CCM_SD_CLK_DIV_RATIO_M; + reg_value |= m; + reg_value |= CCM_PLL_CFG_ENABLE; + ccm_write_4(sc, CCM_MMC0_SCLK_CFG + (devid * 4), reg_value); + + return (0); +} Modified: head/sys/arm/allwinner/a10_clk.h ============================================================================== --- head/sys/arm/allwinner/a10_clk.h Thu May 21 17:39:42 2015 (r283252) +++ head/sys/arm/allwinner/a10_clk.h Thu May 21 17:39:42 2015 (r283253) @@ -103,6 +103,7 @@ #define CCM_AHB_GATING_USB0 (1 << 0) #define CCM_AHB_GATING_EHCI0 (1 << 1) #define CCM_AHB_GATING_EHCI1 (1 << 3) +#define CCM_AHB_GATING_SDMMC0 (1 << 8) #define CCM_AHB_GATING_EMAC (1 << 17) #define CCM_USB_PHY (1 << 8) @@ -110,8 +111,36 @@ #define CCM_USB1_RESET (1 << 1) #define CCM_USB2_RESET (1 << 2) +#define CCM_PLL_CFG_ENABLE (1U << 31) +#define CCM_PLL_CFG_BYPASS (1U << 30) +#define CCM_PLL_CFG_PLL5 (1U << 25) +#define CCM_PLL_CFG_PLL6 (1U << 24) +#define CCM_PLL_CFG_FACTOR_N 0x1f00 +#define CCM_PLL_CFG_FACTOR_N_SHIFT 8 +#define CCM_PLL_CFG_FACTOR_K 0x30 +#define CCM_PLL_CFG_FACTOR_K_SHIFT 4 +#define CCM_PLL_CFG_FACTOR_M 0x3 + +#define CCM_PLL6_CFG_SATA_CLKEN (1U << 14) + +#define CCM_SD_CLK_SRC_SEL 0x3000000 +#define CCM_SD_CLK_SRC_SEL_SHIFT 24 +#define CCM_SD_CLK_SRC_SEL_OSC24M 0 +#define CCM_SD_CLK_SRC_SEL_PLL6 1 +#define CCM_SD_CLK_PHASE_CTR 0x700000 +#define CCM_SD_CLK_PHASE_CTR_SHIFT 20 +#define CCM_SD_CLK_DIV_RATIO_N 0x30000 +#define CCM_SD_CLK_DIV_RATIO_N_SHIFT 16 +#define CCM_SD_CLK_OPHASE_CTR 0x700 +#define CCM_SD_CLK_OPHASE_CTR_SHIFT 8 +#define CCM_SD_CLK_DIV_RATIO_M 0xf + +#define CCM_CLK_REF_FREQ 24000000U + int a10_clk_usb_activate(void); int a10_clk_usb_deactivate(void); int a10_clk_emac_activate(void); +int a10_clk_mmc_activate(int); +int a10_clk_mmc_cfg(int, int); #endif /* _A10_CLK_H_ */ Added: head/sys/arm/allwinner/a10_mmc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a10_mmc.c Thu May 21 17:39:42 2015 (r283253) @@ -0,0 +1,689 @@ +/*- + * Copyright (c) 2013 Alexander Fedorov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#define A10_MMC_MEMRES 0 +#define A10_MMC_IRQRES 1 +#define A10_MMC_RESSZ 2 + +struct a10_mmc_softc { + bus_space_handle_t a10_bsh; + bus_space_tag_t a10_bst; + device_t a10_dev; + int a10_bus_busy; + int a10_id; + int a10_resid; + int a10_timeout; + struct callout a10_timeoutc; + struct mmc_host a10_host; + struct mmc_request * a10_req; + struct mtx a10_mtx; + struct resource * a10_res[A10_MMC_RESSZ]; + uint32_t a10_intr; + uint32_t a10_intr_wait; + void * a10_intrhand; +}; + +static struct resource_spec a10_mmc_res_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0, 0 } +}; + +static int a10_mmc_probe(device_t); +static int a10_mmc_attach(device_t); +static int a10_mmc_detach(device_t); +static int a10_mmc_reset(struct a10_mmc_softc *); +static void a10_mmc_intr(void *); +static int a10_mmc_update_clock(struct a10_mmc_softc *); + +static int a10_mmc_update_ios(device_t, device_t); +static int a10_mmc_request(device_t, device_t, struct mmc_request *); +static int a10_mmc_get_ro(device_t, device_t); +static int a10_mmc_acquire_host(device_t, device_t); +static int a10_mmc_release_host(device_t, device_t); + +#define A10_MMC_LOCK(_sc) mtx_lock(&(_sc)->a10_mtx) +#define A10_MMC_UNLOCK(_sc) mtx_unlock(&(_sc)->a10_mtx) +#define A10_MMC_READ_4(_sc, _reg) \ + bus_space_read_4((_sc)->a10_bst, (_sc)->a10_bsh, _reg) +#define A10_MMC_WRITE_4(_sc, _reg, _value) \ + bus_space_write_4((_sc)->a10_bst, (_sc)->a10_bsh, _reg, _value) + +static int +a10_mmc_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-mmc")) + return (ENXIO); + device_set_desc(dev, "Allwinner Integrated MMC/SD controller"); + + return (BUS_PROBE_DEFAULT); +} + +static int +a10_mmc_attach(device_t dev) +{ + device_t child; + struct a10_mmc_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *tree; + + sc = device_get_softc(dev); + sc->a10_dev = dev; + sc->a10_req = NULL; + sc->a10_id = device_get_unit(dev); + if (sc->a10_id > 3) { + device_printf(dev, "only 4 hosts are supported (0-3)\n"); + return (ENXIO); + } + if (bus_alloc_resources(dev, a10_mmc_res_spec, sc->a10_res) != 0) { + device_printf(dev, "cannot allocate device resources\n"); + return (ENXIO); + } + sc->a10_bst = rman_get_bustag(sc->a10_res[A10_MMC_MEMRES]); + sc->a10_bsh = rman_get_bushandle(sc->a10_res[A10_MMC_MEMRES]); + if (bus_setup_intr(dev, sc->a10_res[A10_MMC_IRQRES], + INTR_TYPE_MISC | INTR_MPSAFE, NULL, a10_mmc_intr, sc, + &sc->a10_intrhand)) { + bus_release_resources(dev, a10_mmc_res_spec, sc->a10_res); + device_printf(dev, "cannot setup interrupt handler\n"); + return (ENXIO); + } + + /* Activate the module clock. */ + if (a10_clk_mmc_activate(sc->a10_id) != 0) { + bus_teardown_intr(dev, sc->a10_res[A10_MMC_IRQRES], + sc->a10_intrhand); + bus_release_resources(dev, a10_mmc_res_spec, sc->a10_res); + device_printf(dev, "cannot activate mmc clock\n"); + return (ENXIO); + } + + sc->a10_timeout = 10; + ctx = device_get_sysctl_ctx(dev); + tree = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "req_timeout", CTLFLAG_RW, + &sc->a10_timeout, 0, "Request timeout in seconds"); + mtx_init(&sc->a10_mtx, device_get_nameunit(sc->a10_dev), "a10_mmc", + MTX_DEF); + callout_init_mtx(&sc->a10_timeoutc, &sc->a10_mtx, 0); + + /* Reset controller. */ + if (a10_mmc_reset(sc) != 0) { + device_printf(dev, "cannot reset the controller\n"); + goto fail; + } + + sc->a10_host.f_min = 400000; + sc->a10_host.f_max = 52000000; + sc->a10_host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; + sc->a10_host.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_HSPEED; + sc->a10_host.mode = mode_sd; + + child = device_add_child(dev, "mmc", -1); + if (child == NULL) { + device_printf(dev, "attaching MMC bus failed!\n"); + goto fail; + } + if (device_probe_and_attach(child) != 0) { + device_printf(dev, "attaching MMC child failed!\n"); + device_delete_child(dev, child); + goto fail; + } + + return (0); + +fail: + callout_drain(&sc->a10_timeoutc); + mtx_destroy(&sc->a10_mtx); + bus_teardown_intr(dev, sc->a10_res[A10_MMC_IRQRES], sc->a10_intrhand); + bus_release_resources(dev, a10_mmc_res_spec, sc->a10_res); + + return (ENXIO); +} + +static int +a10_mmc_detach(device_t dev) +{ + + return (EBUSY); +} + +static int +a10_mmc_reset(struct a10_mmc_softc *sc) +{ + int timeout; + + A10_MMC_WRITE_4(sc, A10_MMC_GCTRL, + A10_MMC_READ_4(sc, A10_MMC_GCTRL) | A10_MMC_RESET); + timeout = 1000; + while (--timeout > 0) { + if ((A10_MMC_READ_4(sc, A10_MMC_GCTRL) & A10_MMC_RESET) == 0) + break; + DELAY(100); + } + if (timeout == 0) + return (ETIMEDOUT); + + /* Set the timeout. */ + A10_MMC_WRITE_4(sc, A10_MMC_TIMEOUT, 0xffffffff); + + /* Clear pending interrupts. */ + A10_MMC_WRITE_4(sc, A10_MMC_RINTR, 0xffffffff); + /* Unmask interrupts. */ + A10_MMC_WRITE_4(sc, A10_MMC_IMASK, + A10_MMC_CMD_DONE | A10_MMC_INT_ERR_BIT | + A10_MMC_DATA_OVER | A10_MMC_AUTOCMD_DONE | + A10_MMC_RX_DATA_REQ | A10_MMC_TX_DATA_REQ); + /* Enable interrupts and AHB access. */ + A10_MMC_WRITE_4(sc, A10_MMC_GCTRL, + A10_MMC_READ_4(sc, A10_MMC_GCTRL) | + A10_MMC_INT_ENABLE | A10_MMC_ACCESS_BY_AHB); + + return (0); +} + +static void +a10_mmc_req_done(struct a10_mmc_softc *sc) +{ + struct mmc_command *cmd; + struct mmc_request *req; + + cmd = sc->a10_req->cmd; + if (cmd->error != MMC_ERR_NONE) { + /* Reset the controller. */ + a10_mmc_reset(sc); + a10_mmc_update_clock(sc); + } + /* Reset the FIFO. */ + A10_MMC_WRITE_4(sc, A10_MMC_GCTRL, + A10_MMC_READ_4(sc, A10_MMC_GCTRL) | A10_MMC_FIFO_RESET); + + req = sc->a10_req; + callout_stop(&sc->a10_timeoutc); + sc->a10_req = NULL; + sc->a10_intr = 0; + sc->a10_resid = 0; + sc->a10_intr_wait = 0; + req->done(req); +} + +static void +a10_mmc_req_ok(struct a10_mmc_softc *sc) +{ + int timeout; + struct mmc_command *cmd; + uint32_t status; + + timeout = 1000; + while (--timeout > 0) { + status = A10_MMC_READ_4(sc, A10_MMC_STAS); + if ((status & A10_MMC_CARD_DATA_BUSY) == 0) + break; + DELAY(1000); + } + cmd = sc->a10_req->cmd; + if (timeout == 0) { + cmd->error = MMC_ERR_FAILED; + a10_mmc_req_done(sc); + return; + } + if (cmd->flags & MMC_RSP_PRESENT) { + if (cmd->flags & MMC_RSP_136) { + cmd->resp[0] = A10_MMC_READ_4(sc, A10_MMC_RESP3); + cmd->resp[1] = A10_MMC_READ_4(sc, A10_MMC_RESP2); + cmd->resp[2] = A10_MMC_READ_4(sc, A10_MMC_RESP1); + cmd->resp[3] = A10_MMC_READ_4(sc, A10_MMC_RESP0); + } else + cmd->resp[0] = A10_MMC_READ_4(sc, A10_MMC_RESP0); + } + /* All data has been transferred ? */ + if (cmd->data != NULL && (sc->a10_resid << 2) < cmd->data->len) + cmd->error = MMC_ERR_FAILED; + a10_mmc_req_done(sc); +} + +static void +a10_mmc_timeout(void *arg) +{ + struct a10_mmc_softc *sc; + + sc = (struct a10_mmc_softc *)arg; + if (sc->a10_req != NULL) { + device_printf(sc->a10_dev, "controller timeout\n"); + sc->a10_req->cmd->error = MMC_ERR_TIMEOUT; + a10_mmc_req_done(sc); + } else + device_printf(sc->a10_dev, + "Spurious timeout - no active request\n"); +} + +static int +a10_mmc_pio_transfer(struct a10_mmc_softc *sc, struct mmc_data *data) +{ + int i, write; + uint32_t bit, *buf; + + buf = (uint32_t *)data->data; + write = (data->flags & MMC_DATA_WRITE) ? 1 : 0; + bit = write ? A10_MMC_FIFO_FULL : A10_MMC_FIFO_EMPTY; + for (i = sc->a10_resid; i < (data->len >> 2); i++) { + if ((A10_MMC_READ_4(sc, A10_MMC_STAS) & bit)) + return (1); + if (write) + A10_MMC_WRITE_4(sc, A10_MMC_FIFO, buf[i]); + else + buf[i] = A10_MMC_READ_4(sc, A10_MMC_FIFO); + sc->a10_resid = i + 1; + } + + return (0); +} + +static void +a10_mmc_intr(void *arg) +{ + struct a10_mmc_softc *sc; + struct mmc_data *data; + uint32_t imask, rint; + + sc = (struct a10_mmc_softc *)arg; + A10_MMC_LOCK(sc); + rint = A10_MMC_READ_4(sc, A10_MMC_RINTR); + imask = A10_MMC_READ_4(sc, A10_MMC_IMASK); + if (imask == 0 && rint == 0) { + A10_MMC_UNLOCK(sc); + return; + } +#ifdef DEBUG + device_printf(sc->a10_dev, "imask: %#x, rint: %#x\n", imask, rint); +#endif + if (sc->a10_req == NULL) { + device_printf(sc->a10_dev, + "Spurious interrupt - no active request, rint: 0x%08X\n", + rint); + A10_MMC_WRITE_4(sc, A10_MMC_RINTR, rint); + A10_MMC_UNLOCK(sc); + return; + } + if (rint & A10_MMC_INT_ERR_BIT) { + device_printf(sc->a10_dev, "error rint: 0x%08X\n", rint); + if (rint & A10_MMC_RESP_TIMEOUT) + sc->a10_req->cmd->error = MMC_ERR_TIMEOUT; + else + sc->a10_req->cmd->error = MMC_ERR_FAILED; + A10_MMC_WRITE_4(sc, A10_MMC_RINTR, rint); + a10_mmc_req_done(sc); + A10_MMC_UNLOCK(sc); + return; + } + + sc->a10_intr |= rint; + data = sc->a10_req->cmd->data; + if (data != NULL && (rint & (A10_MMC_DATA_OVER | + A10_MMC_RX_DATA_REQ | A10_MMC_TX_DATA_REQ)) != 0) + a10_mmc_pio_transfer(sc, data); + if ((sc->a10_intr & sc->a10_intr_wait) == sc->a10_intr_wait) + a10_mmc_req_ok(sc); + + A10_MMC_WRITE_4(sc, A10_MMC_RINTR, rint); + A10_MMC_UNLOCK(sc); +} + +static int +a10_mmc_request(device_t bus, device_t child, struct mmc_request *req) +{ + int blksz; + struct a10_mmc_softc *sc; + struct mmc_command *cmd; + uint32_t cmdreg; + + sc = device_get_softc(bus); + A10_MMC_LOCK(sc); + if (sc->a10_req) { + A10_MMC_UNLOCK(sc); + return (EBUSY); + } + sc->a10_req = req; + cmd = req->cmd; + cmdreg = A10_MMC_START; + if (cmd->opcode == MMC_GO_IDLE_STATE) + cmdreg |= A10_MMC_SEND_INIT_SEQ; + if (cmd->flags & MMC_RSP_PRESENT) + cmdreg |= A10_MMC_RESP_EXP; + if (cmd->flags & MMC_RSP_136) + cmdreg |= A10_MMC_LONG_RESP; + if (cmd->flags & MMC_RSP_CRC) + cmdreg |= A10_MMC_CHECK_RESP_CRC; + + sc->a10_intr = 0; + sc->a10_resid = 0; + sc->a10_intr_wait = A10_MMC_CMD_DONE; + cmd->error = MMC_ERR_NONE; + if (cmd->data != NULL) { + sc->a10_intr_wait |= A10_MMC_DATA_OVER; + cmdreg |= A10_MMC_DATA_EXP | A10_MMC_WAIT_PREOVER; + if (cmd->data->flags & MMC_DATA_MULTI) { + cmdreg |= A10_MMC_SEND_AUTOSTOP; + sc->a10_intr_wait |= A10_MMC_AUTOCMD_DONE; + } + if (cmd->data->flags & MMC_DATA_WRITE) + cmdreg |= A10_MMC_WRITE; + blksz = min(cmd->data->len, MMC_SECTOR_SIZE); + A10_MMC_WRITE_4(sc, A10_MMC_BLKSZ, blksz); + A10_MMC_WRITE_4(sc, A10_MMC_BCNTR, cmd->data->len); + } + + A10_MMC_WRITE_4(sc, A10_MMC_CARG, cmd->arg); + A10_MMC_WRITE_4(sc, A10_MMC_CMDR, cmdreg | cmd->opcode); + callout_reset(&sc->a10_timeoutc, sc->a10_timeout * hz, + a10_mmc_timeout, sc); + A10_MMC_UNLOCK(sc); + + return (0); +} + +static int +a10_mmc_read_ivar(device_t bus, device_t child, int which, + uintptr_t *result) +{ + struct a10_mmc_softc *sc; + + sc = device_get_softc(bus); + switch (which) { + default: + return (EINVAL); + case MMCBR_IVAR_BUS_MODE: + *(int *)result = sc->a10_host.ios.bus_mode; + break; + case MMCBR_IVAR_BUS_WIDTH: + *(int *)result = sc->a10_host.ios.bus_width; + break; + case MMCBR_IVAR_CHIP_SELECT: + *(int *)result = sc->a10_host.ios.chip_select; + break; + case MMCBR_IVAR_CLOCK: + *(int *)result = sc->a10_host.ios.clock; + break; + case MMCBR_IVAR_F_MIN: + *(int *)result = sc->a10_host.f_min; + break; + case MMCBR_IVAR_F_MAX: + *(int *)result = sc->a10_host.f_max; + break; + case MMCBR_IVAR_HOST_OCR: + *(int *)result = sc->a10_host.host_ocr; + break; + case MMCBR_IVAR_MODE: + *(int *)result = sc->a10_host.mode; + break; + case MMCBR_IVAR_OCR: + *(int *)result = sc->a10_host.ocr; + break; + case MMCBR_IVAR_POWER_MODE: + *(int *)result = sc->a10_host.ios.power_mode; + break; + case MMCBR_IVAR_VDD: + *(int *)result = sc->a10_host.ios.vdd; + break; + case MMCBR_IVAR_CAPS: + *(int *)result = sc->a10_host.caps; + break; + case MMCBR_IVAR_MAX_DATA: + *(int *)result = 65535; + break; + } + + return (0); +} + +static int +a10_mmc_write_ivar(device_t bus, device_t child, int which, + uintptr_t value) +{ + struct a10_mmc_softc *sc; + + sc = device_get_softc(bus); + switch (which) { + default: + return (EINVAL); + case MMCBR_IVAR_BUS_MODE: + sc->a10_host.ios.bus_mode = value; + break; + case MMCBR_IVAR_BUS_WIDTH: + sc->a10_host.ios.bus_width = value; + break; + case MMCBR_IVAR_CHIP_SELECT: + sc->a10_host.ios.chip_select = value; + break; + case MMCBR_IVAR_CLOCK: + sc->a10_host.ios.clock = value; + break; + case MMCBR_IVAR_MODE: + sc->a10_host.mode = value; + break; + case MMCBR_IVAR_OCR: + sc->a10_host.ocr = value; + break; + case MMCBR_IVAR_POWER_MODE: + sc->a10_host.ios.power_mode = value; + break; + case MMCBR_IVAR_VDD: + sc->a10_host.ios.vdd = value; + break; + /* These are read-only */ + case MMCBR_IVAR_CAPS: + case MMCBR_IVAR_HOST_OCR: + case MMCBR_IVAR_F_MIN: + case MMCBR_IVAR_F_MAX: + case MMCBR_IVAR_MAX_DATA: + return (EINVAL); + } + + return (0); +} + +static int +a10_mmc_update_clock(struct a10_mmc_softc *sc) +{ + uint32_t cmdreg; + int retry; + + cmdreg = A10_MMC_START | A10_MMC_UPCLK_ONLY | + A10_MMC_WAIT_PREOVER; + A10_MMC_WRITE_4(sc, A10_MMC_CMDR, cmdreg); + retry = 0xfffff; + while (--retry > 0) { + if ((A10_MMC_READ_4(sc, A10_MMC_CMDR) & A10_MMC_START) == 0) { + A10_MMC_WRITE_4(sc, A10_MMC_RINTR, 0xffffffff); + return (0); + } + DELAY(10); + } + A10_MMC_WRITE_4(sc, A10_MMC_RINTR, 0xffffffff); + device_printf(sc->a10_dev, "timeout updating clock\n"); + + return (ETIMEDOUT); +} + +static int +a10_mmc_update_ios(device_t bus, device_t child) +{ + int error; + struct a10_mmc_softc *sc; + struct mmc_ios *ios; + uint32_t clkcr; + + sc = device_get_softc(bus); + clkcr = A10_MMC_READ_4(sc, A10_MMC_CLKCR); + if (clkcr & A10_MMC_CARD_CLK_ON) { + /* Disable clock. */ + clkcr &= ~A10_MMC_CARD_CLK_ON; + A10_MMC_WRITE_4(sc, A10_MMC_CLKCR, clkcr); + error = a10_mmc_update_clock(sc); + if (error != 0) + return (error); + } + + ios = &sc->a10_host.ios; + if (ios->clock) { + /* Reset the divider. */ + clkcr &= ~A10_MMC_CLKCR_DIV; + A10_MMC_WRITE_4(sc, A10_MMC_CLKCR, clkcr); + error = a10_mmc_update_clock(sc); + if (error != 0) + return (error); + + /* Set the MMC clock. */ + error = a10_clk_mmc_cfg(sc->a10_id, ios->clock); + if (error != 0) + return (error); + + /* Enable clock. */ + clkcr |= A10_MMC_CARD_CLK_ON; + A10_MMC_WRITE_4(sc, A10_MMC_CLKCR, clkcr); + error = a10_mmc_update_clock(sc); + if (error != 0) + return (error); + } + + /* Set the bus width. */ + switch (ios->bus_width) { + case bus_width_1: + A10_MMC_WRITE_4(sc, A10_MMC_WIDTH, A10_MMC_WIDTH1); + break; + case bus_width_4: + A10_MMC_WRITE_4(sc, A10_MMC_WIDTH, A10_MMC_WIDTH4); + break; + case bus_width_8: + A10_MMC_WRITE_4(sc, A10_MMC_WIDTH, A10_MMC_WIDTH8); + break; + } + + return (0); +} + +static int +a10_mmc_get_ro(device_t bus, device_t child) +{ + + return (0); +} + +static int +a10_mmc_acquire_host(device_t bus, device_t child) +{ + struct a10_mmc_softc *sc; + int error; + + sc = device_get_softc(bus); + A10_MMC_LOCK(sc); + while (sc->a10_bus_busy) { + error = msleep(sc, &sc->a10_mtx, PCATCH, "mmchw", 0); + if (error != 0) { + A10_MMC_UNLOCK(sc); + return (error); + } + } + sc->a10_bus_busy++; + A10_MMC_UNLOCK(sc); + + return (0); +} + +static int +a10_mmc_release_host(device_t bus, device_t child) +{ + struct a10_mmc_softc *sc; + + sc = device_get_softc(bus); + A10_MMC_LOCK(sc); + sc->a10_bus_busy--; + wakeup(sc); + A10_MMC_UNLOCK(sc); + + return (0); +} + +static device_method_t a10_mmc_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, a10_mmc_probe), + DEVMETHOD(device_attach, a10_mmc_attach), + DEVMETHOD(device_detach, a10_mmc_detach), + + /* Bus interface */ + DEVMETHOD(bus_read_ivar, a10_mmc_read_ivar), + DEVMETHOD(bus_write_ivar, a10_mmc_write_ivar), + DEVMETHOD(bus_print_child, bus_generic_print_child), + + /* MMC bridge interface */ + DEVMETHOD(mmcbr_update_ios, a10_mmc_update_ios), + DEVMETHOD(mmcbr_request, a10_mmc_request), + DEVMETHOD(mmcbr_get_ro, a10_mmc_get_ro), + DEVMETHOD(mmcbr_acquire_host, a10_mmc_acquire_host), + DEVMETHOD(mmcbr_release_host, a10_mmc_release_host), + + DEVMETHOD_END +}; + +static devclass_t a10_mmc_devclass; + +static driver_t a10_mmc_driver = { + "a10_mmc", + a10_mmc_methods, + sizeof(struct a10_mmc_softc), +}; + +DRIVER_MODULE(a10_mmc, simplebus, a10_mmc_driver, a10_mmc_devclass, 0, 0); Added: head/sys/arm/allwinner/a10_mmc.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a10_mmc.h Thu May 21 17:39:42 2015 (r283253) @@ -0,0 +1,179 @@ +/*- + * Copyright (c) 2013 Alexander Fedorov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _A10_MMC_H_ +#define _A10_MMC_H_ + +#define A10_MMC_GCTRL 0x00 /* Global Control Register */ +#define A10_MMC_CLKCR 0x04 /* Clock Control Register */ +#define A10_MMC_TIMEOUT 0x08 /* Timeout Register */ +#define A10_MMC_WIDTH 0x0C /* Bus Width Register */ +#define A10_MMC_BLKSZ 0x10 /* Block Size Register */ +#define A10_MMC_BCNTR 0x14 /* Byte Count Register */ +#define A10_MMC_CMDR 0x18 /* Command Register */ +#define A10_MMC_CARG 0x1C /* Argument Register */ +#define A10_MMC_RESP0 0x20 /* Response Register 0 */ +#define A10_MMC_RESP1 0x24 /* Response Register 1 */ +#define A10_MMC_RESP2 0x28 /* Response Register 2 */ +#define A10_MMC_RESP3 0x2C /* Response Register 3 */ +#define A10_MMC_IMASK 0x30 /* Interrupt Mask Register */ +#define A10_MMC_MISTA 0x34 /* Masked Interrupt Status Register */ +#define A10_MMC_RINTR 0x38 /* Raw Interrupt Status Register */ +#define A10_MMC_STAS 0x3C /* Status Register */ +#define A10_MMC_FTRGL 0x40 /* FIFO Threshold Watermark Register */ +#define A10_MMC_FUNS 0x44 /* Function Select Register */ +#define A10_MMC_CBCR 0x48 /* CIU Byte Count Register */ +#define A10_MMC_BBCR 0x4C /* BIU Byte Count Register */ +#define A10_MMC_DBGC 0x50 /* Debug Enable Register */ +#define A10_MMC_DMAC 0x80 /* IDMAC Control Register */ +#define A10_MMC_DLBA 0x84 /* IDMAC Desc List Base Address Reg */ +#define A10_MMC_IDST 0x88 /* IDMAC Status Register */ +#define A10_MMC_IDIE 0x8C /* IDMAC Interrupt Enable Register */ +#define A10_MMC_CHDA 0x90 +#define A10_MMC_CBDA 0x94 +#define A10_MMC_FIFO 0x100 /* FIFO Access Address */ + +/* A10_MMC_GCTRL */ +#define A10_MMC_SOFT_RESET (1U << 0) +#define A10_MMC_FIFO_RESET (1U << 1) +#define A10_MMC_DMA_RESET (1U << 2) +#define A10_MMC_INT_ENABLE (1U << 4) +#define A10_MMC_DMA_ENABLE (1U << 5) +#define A10_MMC_DEBOUNCE_ENABLE (1U << 8) +#define A10_MMC_DDR_MODE (1U << 10) +#define A10_MMC_ACCESS_BY_DMA (1U << 30) +#define A10_MMC_ACCESS_BY_AHB (1U << 31) +#define A10_MMC_RESET \ + (A10_MMC_SOFT_RESET | A10_MMC_FIFO_RESET | A10_MMC_DMA_RESET) + +/* A10_MMC_CLKCR */ +#define A10_MMC_CARD_CLK_ON (1U << 16) +#define A10_MMC_LOW_POWER_ON (1U << 17) +#define A10_MMC_CLKCR_DIV 0xff + +/* A10_MMC_WIDTH */ +#define A10_MMC_WIDTH1 0 +#define A10_MMC_WIDTH4 1 +#define A10_MMC_WIDTH8 2 + +/* A10_MMC_CMDR */ +#define A10_MMC_RESP_EXP (1U << 6) +#define A10_MMC_LONG_RESP (1U << 7) +#define A10_MMC_CHECK_RESP_CRC (1U << 8) +#define A10_MMC_DATA_EXP (1U << 9) +#define A10_MMC_WRITE (1U << 10) +#define A10_MMC_SEQ_MODE (1U << 11) +#define A10_MMC_SEND_AUTOSTOP (1U << 12) +#define A10_MMC_WAIT_PREOVER (1U << 13) +#define A10_MMC_STOP_ABORT_CMD (1U << 14) +#define A10_MMC_SEND_INIT_SEQ (1U << 15) +#define A10_MMC_UPCLK_ONLY (1U << 21) +#define A10_MMC_RDCEATADEV (1U << 22) +#define A10_MMC_CCS_EXP (1U << 23) +#define A10_MMC_ENB_BOOT (1U << 24) +#define A10_MMC_ALT_BOOT_OPT (1U << 25) +#define A10_MMC_BOOT_ACK_EXP (1U << 26) +#define A10_MMC_DISABLE_BOOT (1U << 27) +#define A10_MMC_VOL_SWITCH (1U << 28) +#define A10_MMC_START (1U << 31) + +/* A10_MMC_IMASK and A10_MMC_RINTR */ +#define A10_MMC_RESP_ERR (1U << 1) +#define A10_MMC_CMD_DONE (1U << 2) +#define A10_MMC_DATA_OVER (1U << 3) +#define A10_MMC_TX_DATA_REQ (1U << 4) +#define A10_MMC_RX_DATA_REQ (1U << 5) +#define A10_MMC_RESP_CRC_ERR (1U << 6) +#define A10_MMC_DATA_CRC_ERR (1U << 7) +#define A10_MMC_RESP_TIMEOUT (1U << 8) +#define A10_MMC_ACK_RECV (1U << 8) +#define A10_MMC_DATA_TIMEOUT (1U << 9) +#define A10_MMC_BOOT_START (1U << 9) +#define A10_MMC_DATA_STARVE (1U << 10) +#define A10_MMC_VOL_CHG_DONE (1U << 10) +#define A10_MMC_FIFO_RUN_ERR (1U << 11) +#define A10_MMC_HARDW_LOCKED (1U << 12) +#define A10_MMC_START_BIT_ERR (1U << 13) +#define A10_MMC_AUTOCMD_DONE (1U << 14) +#define A10_MMC_END_BIT_ERR (1U << 15) +#define A10_MMC_SDIO_INT (1U << 16) +#define A10_MMC_CARD_INSERT (1U << 30) +#define A10_MMC_CARD_REMOVE (1U << 31) +#define A10_MMC_INT_ERR_BIT \ + (A10_MMC_RESP_ERR | A10_MMC_RESP_CRC_ERR | \ + A10_MMC_DATA_CRC_ERR | A10_MMC_RESP_TIMEOUT | \ + A10_MMC_FIFO_RUN_ERR | A10_MMC_HARDW_LOCKED | \ + A10_MMC_START_BIT_ERR | A10_MMC_END_BIT_ERR) + +/* A10_MMC_STAS */ +#define A10_MMC_RX_WLFLAG (1U << 0) +#define A10_MMC_TX_WLFLAG (1U << 1) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu May 21 17:40:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFA31DE6; Thu, 21 May 2015 17:40:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F2CB1D8B; Thu, 21 May 2015 17:40:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LHesLt030311; Thu, 21 May 2015 17:40:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LHesSg030310; Thu, 21 May 2015 17:40:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505211740.t4LHesSg030310@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 21 May 2015 17:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283254 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 17:40:54 -0000 Author: dim Date: Thu May 21 17:40:53 2015 New Revision: 283254 URL: https://svnweb.freebsd.org/changeset/base/283254 Log: Ensure that the static structs emitted by the MODULE_DEPEND() and MODULE_VERSION() macros don't end up as .comm symbols, when all the version fields are zero. Normally, such symbols will end up in .bss, but for kernel module version objects, this can lead to "garbage" version numbers. Fix this by instructing the compiler to always put these structs in the .data segment instead. Reported by: delphij, ae MFC after: 1 week Modified: head/sys/sys/module.h Modified: head/sys/sys/module.h ============================================================================== --- head/sys/sys/module.h Thu May 21 17:39:42 2015 (r283253) +++ head/sys/sys/module.h Thu May 21 17:40:53 2015 (r283254) @@ -107,7 +107,8 @@ struct mod_metadata { DATA_SET(modmetadata_set, _mod_metadata##uniquifier) #define MODULE_DEPEND(module, mdepend, vmin, vpref, vmax) \ - static struct mod_depend _##module##_depend_on_##mdepend = { \ + static struct mod_depend _##module##_depend_on_##mdepend \ + __section(".data") = { \ vmin, \ vpref, \ vmax \ @@ -147,7 +148,8 @@ struct mod_metadata { DECLARE_MODULE_WITH_MAXVER(name, data, sub, order, __FreeBSD_version) #define MODULE_VERSION(module, version) \ - static struct mod_version _##module##_version = { \ + static struct mod_version _##module##_version \ + __section(".data") = { \ version \ }; \ MODULE_METADATA(_##module##_version, MDT_VERSION, \ From owner-svn-src-head@FreeBSD.ORG Thu May 21 18:23:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 047EE988; Thu, 21 May 2015 18:23:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE4181399; Thu, 21 May 2015 18:23:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LINbNi052038; Thu, 21 May 2015 18:23:37 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LINbT2052037; Thu, 21 May 2015 18:23:37 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201505211823.t4LINbT2052037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 21 May 2015 18:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283255 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 18:23:38 -0000 Author: neel Date: Thu May 21 18:23:37 2015 New Revision: 283255 URL: https://svnweb.freebsd.org/changeset/base/283255 Log: Emulate the "CMP r/m, reg" instruction (opcode 39H). Reported and tested by: Leon Dang (ldang@nahannisys.com) MFC after: 1 week Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Thu May 21 17:40:53 2015 (r283254) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Thu May 21 18:23:37 2015 (r283255) @@ -113,6 +113,10 @@ static const struct vie_op one_byte_opco .op_byte = 0x2B, .op_type = VIE_OP_TYPE_SUB, }, + [0x39] = { + .op_byte = 0x39, + .op_type = VIE_OP_TYPE_CMP, + }, [0x3B] = { .op_byte = 0x3B, .op_type = VIE_OP_TYPE_CMP, @@ -1050,34 +1054,46 @@ emulate_cmp(void *vm, int vcpuid, uint64 mem_region_read_t memread, mem_region_write_t memwrite, void *arg) { int error, size; - uint64_t op1, op2, rflags, rflags2; + uint64_t regop, memop, op1, op2, rflags, rflags2; enum vm_reg_name reg; size = vie->opsize; switch (vie->op.op_byte) { + case 0x39: case 0x3B: /* + * 39/r CMP r/m16, r16 + * 39/r CMP r/m32, r32 + * REX.W 39/r CMP r/m64, r64 + * * 3B/r CMP r16, r/m16 * 3B/r CMP r32, r/m32 * REX.W + 3B/r CMP r64, r/m64 * - * Compare first operand (reg) with second operand (r/m) and + * Compare the first operand with the second operand and * set status flags in EFLAGS register. The comparison is * performed by subtracting the second operand from the first * operand and then setting the status flags. */ - /* Get the first operand */ + /* Get the register operand */ reg = gpr_map[vie->reg]; - error = vie_read_register(vm, vcpuid, reg, &op1); + error = vie_read_register(vm, vcpuid, reg, ®op); if (error) return (error); - /* Get the second operand */ - error = memread(vm, vcpuid, gpa, &op2, size, arg); + /* Get the memory operand */ + error = memread(vm, vcpuid, gpa, &memop, size, arg); if (error) return (error); + if (vie->op.op_byte == 0x3B) { + op1 = regop; + op2 = memop; + } else { + op1 = memop; + op2 = regop; + } rflags2 = getcc(size, op1, op2); break; case 0x80: From owner-svn-src-head@FreeBSD.ORG Thu May 21 18:29:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6690FCD4; Thu, 21 May 2015 18:29:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 561321448; Thu, 21 May 2015 18:29:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LITCTF052944; Thu, 21 May 2015 18:29:12 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LITCM3052943; Thu, 21 May 2015 18:29:12 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201505211829.t4LITCM3052943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 21 May 2015 18:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283256 - head/usr.sbin/bhyvectl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 18:29:12 -0000 Author: neel Date: Thu May 21 18:29:11 2015 New Revision: 283256 URL: https://svnweb.freebsd.org/changeset/base/283256 Log: Add an option "--get-vmcs-exit-inst-length" to display the instruction length of the instruction that caused the VM-exit. MFC after: 1 week Modified: head/usr.sbin/bhyvectl/bhyvectl.c Modified: head/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- head/usr.sbin/bhyvectl/bhyvectl.c Thu May 21 18:23:37 2015 (r283255) +++ head/usr.sbin/bhyvectl/bhyvectl.c Thu May 21 18:29:11 2015 (r283256) @@ -293,6 +293,7 @@ static int get_guest_pat, get_host_pat; static int get_guest_sysenter, get_vmcs_link; static int get_exit_reason, get_vmcs_exit_qualification; static int get_vmcs_exit_interruption_info, get_vmcs_exit_interruption_error; +static int get_vmcs_exit_inst_length; static uint64_t desc_base; static uint32_t desc_limit, desc_access; @@ -1145,7 +1146,15 @@ get_misc_vmcs(struct vmctx *ctx, int vcp vcpu, u64); } } - + + if (!error && (get_vmcs_exit_inst_length || get_all)) { + error = vm_get_vmcs_field(ctx, vcpu, + VMCS_EXIT_INSTRUCTION_LENGTH, &u64); + if (error == 0) + printf("vmcs_exit_inst_length[%d]\t0x%08x\n", vcpu, + (uint32_t)u64); + } + if (!error && (get_vmcs_exit_qualification || get_all)) { error = vm_get_vmcs_field(ctx, vcpu, VMCS_EXIT_QUALIFICATION, &u64); @@ -1405,6 +1414,8 @@ setup_options(bool cpu_intel) REQ_ARG, 0, SET_VMCS_ENTRY_INTERRUPTION_INFO }, { "get-vmcs-exit-qualification", NO_ARG, &get_vmcs_exit_qualification, 1 }, + { "get-vmcs-exit-inst-length", + NO_ARG, &get_vmcs_exit_inst_length, 1 }, { "get-vmcs-interruptibility", NO_ARG, &get_vmcs_interruptibility, 1 }, { "get-vmcs-exit-interruption-error", From owner-svn-src-head@FreeBSD.ORG Thu May 21 18:29:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66641E22; Thu, 21 May 2015 18:29:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 483B41450; Thu, 21 May 2015 18:29:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LITe1W053067; Thu, 21 May 2015 18:29:40 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LITan4053052; Thu, 21 May 2015 18:29:36 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505211829.t4LITan4053052@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 21 May 2015 18:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283257 - head/bin/pax X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 18:29:40 -0000 Author: delphij Date: Thu May 21 18:29:36 2015 New Revision: 283257 URL: https://svnweb.freebsd.org/changeset/base/283257 Log: Eliminate unneeded includes. MFC after: 2 weeks Modified: head/bin/pax/ar_subs.c head/bin/pax/buf_subs.c head/bin/pax/cache.c head/bin/pax/cpio.c head/bin/pax/file_subs.c head/bin/pax/gen_subs.c head/bin/pax/getoldopt.c head/bin/pax/pat_rep.c head/bin/pax/pax.c head/bin/pax/sel_subs.c head/bin/pax/tar.c head/bin/pax/tty_subs.c Modified: head/bin/pax/ar_subs.c ============================================================================== --- head/bin/pax/ar_subs.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/ar_subs.c Thu May 21 18:29:36 2015 (r283257) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "pax.h" #include "extern.h" Modified: head/bin/pax/buf_subs.c ============================================================================== --- head/bin/pax/buf_subs.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/buf_subs.c Thu May 21 18:29:36 2015 (r283257) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "extern.h" Modified: head/bin/pax/cache.c ============================================================================== --- head/bin/pax/cache.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/cache.c Thu May 21 18:29:36 2015 (r283257) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "cache.h" Modified: head/bin/pax/cpio.c ============================================================================== --- head/bin/pax/cpio.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/cpio.c Thu May 21 18:29:36 2015 (r283257) @@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include "pax.h" #include "cpio.h" #include "extern.h" Modified: head/bin/pax/file_subs.c ============================================================================== --- head/bin/pax/file_subs.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/file_subs.c Thu May 21 18:29:36 2015 (r283257) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "pax.h" #include "options.h" #include "extern.h" Modified: head/bin/pax/gen_subs.c ============================================================================== --- head/bin/pax/gen_subs.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/gen_subs.c Thu May 21 18:29:36 2015 (r283257) @@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include "pax.h" #include "extern.h" Modified: head/bin/pax/getoldopt.c ============================================================================== --- head/bin/pax/getoldopt.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/getoldopt.c Thu May 21 18:29:36 2015 (r283257) @@ -19,8 +19,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pax.h" -#include "extern.h" +int getoldopt(int, char **, const char *); int getoldopt(int argc, char **argv, const char *optstring) Modified: head/bin/pax/pat_rep.c ============================================================================== --- head/bin/pax/pat_rep.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/pat_rep.c Thu May 21 18:29:36 2015 (r283257) @@ -43,9 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #ifdef NET2_REGEX #include #else Modified: head/bin/pax/pax.c ============================================================================== --- head/bin/pax/pax.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/pax.c Thu May 21 18:29:36 2015 (r283257) @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "pax.h" #include "extern.h" static int gen_init(void); Modified: head/bin/pax/sel_subs.c ============================================================================== --- head/bin/pax/sel_subs.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/sel_subs.c Thu May 21 18:29:36 2015 (r283257) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "sel_subs.h" Modified: head/bin/pax/tar.c ============================================================================== --- head/bin/pax/tar.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/tar.c Thu May 21 18:29:36 2015 (r283257) @@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include "pax.h" #include "extern.h" #include "tar.h" Modified: head/bin/pax/tty_subs.c ============================================================================== --- head/bin/pax/tty_subs.c Thu May 21 18:29:11 2015 (r283256) +++ head/bin/pax/tty_subs.c Thu May 21 18:29:36 2015 (r283257) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "extern.h" From owner-svn-src-head@FreeBSD.ORG Thu May 21 19:31:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3F69122; Thu, 21 May 2015 19:31:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D66DF1CA0; Thu, 21 May 2015 19:31:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LJVBRm086270; Thu, 21 May 2015 19:31:11 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LJVBSO086268; Thu, 21 May 2015 19:31:11 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201505211931.t4LJVBSO086268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 21 May 2015 19:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283261 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 19:31:12 -0000 Author: jkim Date: Thu May 21 19:31:10 2015 New Revision: 283261 URL: https://svnweb.freebsd.org/changeset/base/283261 Log: Do not probe Intel PIIX4 south bridge quirks on amd64. These quirky south bridges only supported Intel Pentium and Pentium II era processors and there is no reason for hardware virtualizations to emulate these quirks. MFC after: 1 week Modified: head/sys/dev/acpica/acpi_cpu.c head/sys/dev/acpica/acpi_throttle.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Thu May 21 19:16:28 2015 (r283260) +++ head/sys/dev/acpica/acpi_cpu.c Thu May 21 19:31:10 2015 (r283261) @@ -185,7 +185,8 @@ static void acpi_cpu_startup_cx(struct a static void acpi_cpu_cx_list(struct acpi_cpu_softc *sc); static void acpi_cpu_idle(sbintime_t sbt); static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context); -static int acpi_cpu_quirks(void); +static void acpi_cpu_quirks(void); +static void acpi_cpu_quirks_piix4(void); static int acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_usage_counters_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc); @@ -1239,12 +1240,9 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 no acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify); } -static int +static void acpi_cpu_quirks(void) { - device_t acpi_dev; - uint32_t val; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); /* @@ -1278,6 +1276,16 @@ acpi_cpu_quirks(void) } /* Look for various quirks of the PIIX4 part. */ + acpi_cpu_quirks_piix4(); +} + +static void +acpi_cpu_quirks_piix4(void) +{ +#ifdef __i386__ + device_t acpi_dev; + uint32_t val; + acpi_dev = pci_find_device(PCI_VENDOR_INTEL, PCI_DEVICE_82371AB_3); if (acpi_dev != NULL) { switch (pci_get_revid(acpi_dev)) { @@ -1326,8 +1334,7 @@ acpi_cpu_quirks(void) break; } } - - return (0); +#endif } static int Modified: head/sys/dev/acpica/acpi_throttle.c ============================================================================== --- head/sys/dev/acpica/acpi_throttle.c Thu May 21 19:16:28 2015 (r283260) +++ head/sys/dev/acpica/acpi_throttle.c Thu May 21 19:31:10 2015 (r283261) @@ -96,7 +96,7 @@ static void acpi_throttle_identify(drive static int acpi_throttle_probe(device_t dev); static int acpi_throttle_attach(device_t dev); static int acpi_throttle_evaluate(struct acpi_throttle_softc *sc); -static int acpi_throttle_quirks(struct acpi_throttle_softc *sc); +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc); static int acpi_thr_settings(device_t dev, struct cf_setting *sets, int *count); static int acpi_thr_set(device_t dev, const struct cf_setting *set); @@ -314,9 +314,10 @@ acpi_throttle_evaluate(struct acpi_throt return (0); } -static int +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc) { +#ifdef __i386__ device_t acpi_dev; /* Look for various quirks of the PIIX4 part. */ @@ -339,8 +340,7 @@ acpi_throttle_quirks(struct acpi_throttl break; } } - - return (0); +#endif } static int From owner-svn-src-head@FreeBSD.ORG Thu May 21 20:03:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E49808B4; Thu, 21 May 2015 20:03:36 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4CF31054; Thu, 21 May 2015 20:03:36 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id EE30311127A; Thu, 21 May 2015 13:03:35 -0700 (PDT) Date: Thu, 21 May 2015 13:03:35 -0700 From: Hiren Panchasara To: Lawrence Stewart Cc: Eric van Gyzen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283136 - head/sys/netinet Message-ID: <20150521200335.GG95600@strugglingcoder.info> References: <201505200108.t4K181No006311@svn.freebsd.org> <555C09D5.9090709@freebsd.org> <20150520042438.GA95600@strugglingcoder.info> <555C2ABC.60102@freebsd.org> <555C89F4.9080607@FreeBSD.org> <555CC40C.1070502@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Qf1oXS95uex85X0R" Content-Disposition: inline In-Reply-To: <555CC40C.1070502@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 20:03:37 -0000 --Qf1oXS95uex85X0R Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 05/21/15 at 03:27P, Lawrence Stewart wrote: > On 05/20/15 23:19, Eric van Gyzen wrote: > > On 05/20/2015 02:33, Lawrence Stewart wrote: > >> On 05/20/15 14:24, Hiren Panchasara wrote: > >>> On 05/20/15 at 02:13P, Lawrence Stewart wrote: > >>>> Hi Hiren, > >>>> > >>>> On 05/20/15 11:08, Hiren Panchasara wrote: > >>>>> Author: hiren Date: Wed May 20 01:08:01 2015 New Revision: > >>>>> 283136 URL: https://svnweb.freebsd.org/changeset/base/283136 > >>>>> > >>>>> Log: Add a new sysctl net.inet.tcp.hostcache.purgenow=3D1 to > >>>>> expire and purge all entries in hostcache immediately. > >>>>> > >>>>> In collaboration with: bz, rwatson MFC after: 1 week Relnotes: > >>>>> yes Sponsored by: Limelight Networks > >>>> > >>>> Why introduce a new sysctl and not change the existing behaviour > >>>> of net.inet.tcp.hostcache.purge? > >>> > >>> I thought it'd make more sense to keep the existing behavior as is > >>> and provide new knob for the new behavior. > >> > >> Don't think so - why would deferring a purge to the next purge run be > >> useful compared to purging immediately? I'd strongly suggest you adapt > >> this change to the existing purge sysctl. I can't see why anyone would > >> miss the old functionality. > >=20 > > I am generally wary of a question such as "Why would anyone want...", b= ecause as soon as the code is released, someone answers it. > >=20 > > That being said, I have always wanted Hiren's purgenow behavior, and I'= ve always been annoyed by the lazy-purge behavior. I would suggest impleme= nting Lawrence's suggestion, but NOT MFC'ing it, since that would be a disr= uptive change. > >=20 > > Thanks for your work, Hiren. >=20 > I see no reason not to MFC it - it's not a POLA violation for a stable > branch. When the user requests a purge, it's surely equally as good (and > I think anyone of right mind would argue better ;) to purge immediately > than some number of seconds "n" in the future, where "n" is between 1 > and the value of net.inet.tcp.hostcache.prune. I *do* want to MFC the change. And if there are no major objections, I'll go ahead with what Lawrence is suggesting: changing current purge behavior in = -head and 10. cheers, Hiren --Qf1oXS95uex85X0R Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVXjoWXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/l7gYH/1ayiXe7gEQ1izVPB5xvwKCb ESr8lv/KUeN2AktCi7Q3tjdvb9pPlygZRlXSrlgrw20fzpOYg79xRxuBIk0wEqg9 g90TdbCE0m3oTCREDGzNFgL5h4Mc0hRATHV4qplEFwIgpdKNQCtK5BEbNOtqGRAV jPwj7AmpCm8etkBTmr0dBXaIA4mRGG005whHOh4SUFs5upwiW34IRP6na+bcmwOb DOwxJkp92lA7bWPEmKXJdpb6UZi93WIOtdUVntPZsxj41YVejw+BGxJkxchnv3eT BKEUm+mpH4xJ8o7bOfpABBRSU+wNgwnkPD4B3H14dvv3/XQgy+rh1N2v63ST9pE= =HR4I -----END PGP SIGNATURE----- --Qf1oXS95uex85X0R-- From owner-svn-src-head@FreeBSD.ORG Thu May 21 20:09:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9A8FAB7; Thu, 21 May 2015 20:09:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E84410C6; Thu, 21 May 2015 20:09:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LK9bQf005492; Thu, 21 May 2015 20:09:37 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LK9bfA005490; Thu, 21 May 2015 20:09:37 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505212009.t4LK9bfA005490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 21 May 2015 20:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283263 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 20:09:37 -0000 Author: loos Date: Thu May 21 20:09:36 2015 New Revision: 283263 URL: https://svnweb.freebsd.org/changeset/base/283263 Log: Raise the SDHCI timeout to 10 seconds and add a sysctl to allow changing this value at runtime. The SD card specification says that a block write or a block erase can take up to 250ms to complete and thus, under some circumstances, the existent 2 seconds timeout was triggering with normal usage. This change fixes the sporadic controller timeout that happens on RPi and RPi 2. Discussed with: ian (some time ago) Modified: head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Thu May 21 19:40:31 2015 (r283262) +++ head/sys/dev/sdhci/sdhci.c Thu May 21 20:09:36 2015 (r283263) @@ -615,10 +615,16 @@ sdhci_init_slot(device_t dev, struct sdh (slot->opt & SDHCI_HAVE_DMA) ? "DMA" : "PIO"); sdhci_dumpregs(slot); } - + + slot->timeout = 10; + SYSCTL_ADD_INT(device_get_sysctl_ctx(slot->bus), + SYSCTL_CHILDREN(device_get_sysctl_tree(slot->bus)), OID_AUTO, + "timeout", CTLFLAG_RW, &slot->timeout, 0, + "Maximum timeout for SDHCI transfers (in secs)"); TASK_INIT(&slot->card_task, 0, sdhci_card_task, slot); callout_init(&slot->card_callout, 1); callout_init_mtx(&slot->timeout_callout, &slot->mtx, 0); + return (0); } @@ -872,7 +878,8 @@ sdhci_start_command(struct sdhci_slot *s /* Start command. */ WR2(slot, SDHCI_COMMAND_FLAGS, (cmd->opcode << 8) | (flags & 0xff)); /* Start timeout callout. */ - callout_reset(&slot->timeout_callout, 2*hz, sdhci_timeout, slot); + callout_reset(&slot->timeout_callout, slot->timeout * hz, + sdhci_timeout, slot); } static void Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Thu May 21 19:40:31 2015 (r283262) +++ head/sys/dev/sdhci/sdhci.h Thu May 21 20:09:36 2015 (r283263) @@ -271,6 +271,7 @@ struct sdhci_slot { #define SDHCI_HAVE_DMA 1 #define SDHCI_PLATFORM_TRANSFER 2 u_char version; + int timeout; /* Transfer timeout */ uint32_t max_clk; /* Max possible freq */ uint32_t timeout_clk; /* Timeout freq */ bus_dma_tag_t dmatag; From owner-svn-src-head@FreeBSD.ORG Thu May 21 20:11:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C63BEC2C; Thu, 21 May 2015 20:11:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4F941180; Thu, 21 May 2015 20:11:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LKBrej009502; Thu, 21 May 2015 20:11:53 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LKBrvp009501; Thu, 21 May 2015 20:11:53 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201505212011.t4LKBrvp009501@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Thu, 21 May 2015 20:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283264 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 20:11:53 -0000 Author: tychon Date: Thu May 21 20:11:52 2015 New Revision: 283264 URL: https://svnweb.freebsd.org/changeset/base/283264 Log: The 'hostbridge' device exists to allow guests to infer msi/msix capablity by advertising pcie capability. Since the 'hostbridge' device isn't a true pci-to-pci bridge, and doesn't actaully use the bridge configuration space layout, change the header-type from type 1 to type 0 to avoid confusion. Reviewed by: neel Modified: head/usr.sbin/bhyve/pci_hostbridge.c Modified: head/usr.sbin/bhyve/pci_hostbridge.c ============================================================================== --- head/usr.sbin/bhyve/pci_hostbridge.c Thu May 21 20:09:36 2015 (r283263) +++ head/usr.sbin/bhyve/pci_hostbridge.c Thu May 21 20:11:52 2015 (r283264) @@ -38,7 +38,7 @@ pci_hostbridge_init(struct vmctx *ctx, s /* config space */ pci_set_cfgdata16(pi, PCIR_VENDOR, 0x1275); /* NetApp */ pci_set_cfgdata16(pi, PCIR_DEVICE, 0x1275); /* NetApp */ - pci_set_cfgdata8(pi, PCIR_HDRTYPE, PCIM_HDRTYPE_BRIDGE); + pci_set_cfgdata8(pi, PCIR_HDRTYPE, PCIM_HDRTYPE_NORMAL); pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_BRIDGE); pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_BRIDGE_HOST); From owner-svn-src-head@FreeBSD.ORG Thu May 21 20:15:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B4D9D8E; Thu, 21 May 2015 20:15:32 +0000 (UTC) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 132BC1193; Thu, 21 May 2015 20:15:32 +0000 (UTC) Received: by igcau1 with SMTP id au1so17716806igc.1; Thu, 21 May 2015 13:15:31 -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:from:date:message-id :subject:to:cc:content-type; bh=hFCBoBcHF+cUtLkRMfBmpQtceZ4uVMQVqZQ5RJaYlrY=; b=iOlGHNgDiHHaMG7J/+BbZYMQunJt84XEmy4afYLOxKExzJk6JY48Q3A3wLvVTay7/t NmSzDAtB82vTfqumOF81Y8cYIWNAOYMtkondMobzGpKRrUeru0zbBsFk2upEH53jZjRT QNhHtRuPNwWgbZhpxKWW9D6lpeCwhJtOEAiX/mBducd1nQqCxb3lKxgt6T0aRW53w4G/ lCBV0kXQjujtOfjRTWyWUmjzp/NW7vxo3VOtL3m+iqEdl9C+c2/A+QBGPzzBrxIj1mIK +vaoHIigC4zxDpXu1UX4/FHUE3JKEgJEMiexlwKehE3iARxZUc3zFCd9lp+EdQFdroeG 3e3Q== X-Received: by 10.42.176.8 with SMTP id bc8mr5312902icb.22.1432239331431; Thu, 21 May 2015 13:15:31 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.48.3 with HTTP; Thu, 21 May 2015 13:15:10 -0700 (PDT) In-Reply-To: <20150521200335.GG95600@strugglingcoder.info> References: <201505200108.t4K181No006311@svn.freebsd.org> <555C09D5.9090709@freebsd.org> <20150520042438.GA95600@strugglingcoder.info> <555C2ABC.60102@freebsd.org> <555C89F4.9080607@FreeBSD.org> <555CC40C.1070502@freebsd.org> <20150521200335.GG95600@strugglingcoder.info> From: Ed Maste Date: Thu, 21 May 2015 16:15:10 -0400 X-Google-Sender-Auth: ZIakxSy7mwOeqazq4j7C81QggOc Message-ID: Subject: Re: svn commit: r283136 - head/sys/netinet To: Hiren Panchasara Cc: Lawrence Stewart , Eric van Gyzen , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 20:15:32 -0000 On 21 May 2015 at 16:03, Hiren Panchasara wrote: > > I *do* want to MFC the change. And if there are no major objections, I'll go > ahead with what Lawrence is suggesting: changing current purge behavior in -head > and 10. For the record, that sounds reasonable to me. From owner-svn-src-head@FreeBSD.ORG Thu May 21 20:18:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B71BEF1F; Thu, 21 May 2015 20:18:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9864B11BD; Thu, 21 May 2015 20:18:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LKIEgR010428; Thu, 21 May 2015 20:18:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LKIEFh010427; Thu, 21 May 2015 20:18:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505212018.t4LKIEFh010427@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 May 2015 20:18:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283265 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 20:18:14 -0000 Author: gjb Date: Thu May 21 20:18:13 2015 New Revision: 283265 URL: https://svnweb.freebsd.org/changeset/base/283265 Log: cd(1) to .CURDIR before calling stat(1) to fix the path to sh(1). Include xz(1)-compressed images when renaming snapshot builds. Use OSRELEASE in place of REVISION-BRANCH for checksum filenames. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Thu May 21 20:11:52 2015 (r283264) +++ head/release/Makefile.mirrors Thu May 21 20:18:13 2015 (r283265) @@ -22,7 +22,7 @@ STAGE_TARGETS?= iso-images-stage .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" SNAPSHOT= 1 TLD?= ${FTPDIR}/snapshots -BUILDDATE!= date -j -f '%s' $$(stat -f "%c" ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d +BUILDDATE!= cd ${.CURDIR} && date -j -f '%s' $$(stat -f "%c" ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d . if ${TARGET} == "arm" && ${TARGET_ARCH} == "armv6" . if !defined(BOARDNAME) || empty(BOARDNAME) BOARDNAME= ${KERNCONF} @@ -70,10 +70,8 @@ iso-images-stage: . for IMAGE in ${IMAGES} cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE} \ ${ISO_DIR}/${OSRELEASE}-${IMAGE} -. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz) cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz \ ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz -. endif . if exists(${RELEASEDIR}/CHECKSUM.${CHECKSUM}) cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM} \ ${ISO_DIR}/CHECKSUM.${CHECKSUM} @@ -85,25 +83,30 @@ iso-images-stage: . for IMAGE in ${IMAGES} cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE} \ ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} + cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE}.xz \ + ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} + cd ${TLD}/ISO-IMAGES/${REVISION} && \ + ln -s \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz . endfor . for CHECKSUM in ${CHECKSUM_FILES} . if exists(${ISO_DIR}/CHECKSUM.${CHECKSUM}) rm -f ${ISO_DIR}/CHECKSUM.${CHECKSUM} . endif cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ - CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} + CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} . endfor .else # !snapshot cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} . cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ - CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} + CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} .endif .if exists(${RELEASEDIR}/ftp) mkdir -p ${FTP_DIR} From owner-svn-src-head@FreeBSD.ORG Thu May 21 20:22:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F49A15F; Thu, 21 May 2015 20:22:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DFED1284; Thu, 21 May 2015 20:22:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LKMuPa014657; Thu, 21 May 2015 20:22:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LKMuMa014656; Thu, 21 May 2015 20:22:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505212022.t4LKMuMa014656@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 May 2015 20:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283266 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 20:22:56 -0000 Author: gjb Date: Thu May 21 20:22:55 2015 New Revision: 283266 URL: https://svnweb.freebsd.org/changeset/base/283266 Log: Include xz(1)-compressed images when not a snapshot build. Do not suffix non-snapshot checksum files with SNAP_SUFFIX. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Thu May 21 20:18:13 2015 (r283265) +++ head/release/Makefile.mirrors Thu May 21 20:22:55 2015 (r283266) @@ -104,9 +104,11 @@ iso-images-stage: . endfor .else # !snapshot cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} . + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} + cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE}.xz cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ - CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} + CHECKSUM.${CHECKSUM}-${OSRELEASE} .endif .if exists(${RELEASEDIR}/ftp) mkdir -p ${FTP_DIR} From owner-svn-src-head@FreeBSD.ORG Thu May 21 20:43:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E88B3950; Thu, 21 May 2015 20:43:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6A96153B; Thu, 21 May 2015 20:43:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LKh2cJ024733; Thu, 21 May 2015 20:43:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LKh2oY024732; Thu, 21 May 2015 20:43:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505212043.t4LKh2oY024732@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 May 2015 20:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283268 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 20:43:03 -0000 Author: gjb Date: Thu May 21 20:43:02 2015 New Revision: 283268 URL: https://svnweb.freebsd.org/changeset/base/283268 Log: Remove the arm/armv6 bits from Makefile.mirrors, which needs some re-thinking. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Thu May 21 20:39:39 2015 (r283267) +++ head/release/Makefile.mirrors Thu May 21 20:43:02 2015 (r283268) @@ -23,14 +23,7 @@ STAGE_TARGETS?= iso-images-stage SNAPSHOT= 1 TLD?= ${FTPDIR}/snapshots BUILDDATE!= cd ${.CURDIR} && date -j -f '%s' $$(stat -f "%c" ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d -. if ${TARGET} == "arm" && ${TARGET_ARCH} == "armv6" -. if !defined(BOARDNAME) || empty(BOARDNAME) -BOARDNAME= ${KERNCONF} -. endif -_SNAP_SUFFIX:= -${BOARDNAME}-${BUILDDATE} -. else # not arm/armv6 _SNAP_SUFFIX:= -${BUILDDATE} -. endif . for _D in /usr/bin /usr/local/bin . for _S in svnversion svnliteversion . if exists(${_D}/${_S}) From owner-svn-src-head@FreeBSD.ORG Thu May 21 20:47:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FA2FB38; Thu, 21 May 2015 20:47:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D12E157C; Thu, 21 May 2015 20:47:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LKlKbe025375; Thu, 21 May 2015 20:47:20 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LKlKFl025374; Thu, 21 May 2015 20:47:20 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201505212047.t4LKlKFl025374@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 21 May 2015 20:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283269 - head/sys/dev/bxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 20:47:20 -0000 Author: davidcs Date: Thu May 21 20:47:19 2015 New Revision: 283269 URL: https://svnweb.freebsd.org/changeset/base/283269 Log: Limit the size of the posted receive buffers in Rx Rings to MJUMPAGESIZE. Previously for jumbo MTUs, the rx ring buffers were MTU + any required pad. Now when this size greater than MJUMPAGESIZE, the packet is spanned across multiple buffers and the mbufs are stiched together. Submitted by:gary.zambrano@qlogic.com Approved by:davidcs@freebsd.org Modified: head/sys/dev/bxe/bxe.c Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Thu May 21 20:43:02 2015 (r283268) +++ head/sys/dev/bxe/bxe.c Thu May 21 20:47:19 2015 (r283269) @@ -3100,7 +3100,7 @@ static inline void bxe_update_sge_prod(struct bxe_softc *sc, struct bxe_fastpath *fp, uint16_t sge_len, - struct eth_end_agg_rx_cqe *cqe) + union eth_sgl_or_raw_data *cqe) { uint16_t last_max, last_elem, first_elem; uint16_t delta = 0; @@ -3113,17 +3113,17 @@ bxe_update_sge_prod(struct bxe_softc /* first mark all used pages */ for (i = 0; i < sge_len; i++) { BIT_VEC64_CLEAR_BIT(fp->sge_mask, - RX_SGE(le16toh(cqe->sgl_or_raw_data.sgl[i]))); + RX_SGE(le16toh(cqe->sgl[i]))); } BLOGD(sc, DBG_LRO, "fp[%02d] fp_cqe->sgl[%d] = %d\n", fp->index, sge_len - 1, - le16toh(cqe->sgl_or_raw_data.sgl[sge_len - 1])); + le16toh(cqe->sgl[sge_len - 1])); /* assume that the last SGE index is the biggest */ bxe_update_last_max_sge(fp, - le16toh(cqe->sgl_or_raw_data.sgl[sge_len - 1])); + le16toh(cqe->sgl[sge_len - 1])); last_max = RX_SGE(fp->last_max_sge); last_elem = last_max >> BIT_VEC64_ELEM_SHIFT; @@ -3239,6 +3239,53 @@ bxe_tpa_stop_exit: } static uint8_t +bxe_service_rxsgl( + struct bxe_fastpath *fp, + uint16_t len, + uint16_t lenonbd, + struct mbuf *m, + struct eth_fast_path_rx_cqe *cqe_fp) +{ + struct mbuf *m_frag; + uint16_t frags, frag_len; + uint16_t sge_idx = 0; + uint16_t j; + uint8_t i, rc = 0; + uint32_t frag_size; + + /* adjust the mbuf */ + m->m_len = lenonbd; + + frag_size = len - lenonbd; + frags = SGE_PAGE_ALIGN(frag_size) >> SGE_PAGE_SHIFT; + + for (i = 0, j = 0; i < frags; i += PAGES_PER_SGE, j++) { + sge_idx = RX_SGE(le16toh(cqe_fp->sgl_or_raw_data.sgl[j])); + + m_frag = fp->rx_sge_mbuf_chain[sge_idx].m; + frag_len = min(frag_size, (uint32_t)(SGE_PAGE_SIZE)); + m_frag->m_len = frag_len; + + /* allocate a new mbuf for the SGE */ + rc = bxe_alloc_rx_sge_mbuf(fp, sge_idx); + if (rc) { + /* Leave all remaining SGEs in the ring! */ + return (rc); + } + fp->eth_q_stats.mbuf_alloc_sge--; + + /* concatenate the fragment to the head mbuf */ + m_cat(m, m_frag); + + frag_size -= frag_len; + } + + bxe_update_sge_prod(fp->sc, fp, frags, &cqe_fp->sgl_or_raw_data); + + return rc; +} + +static uint8_t bxe_rxeof(struct bxe_softc *sc, struct bxe_fastpath *fp) { @@ -3278,7 +3325,7 @@ bxe_rxeof(struct bxe_softc *sc, struct eth_fast_path_rx_cqe *cqe_fp; uint8_t cqe_fp_flags; enum eth_rx_cqe_type cqe_fp_type; - uint16_t len, pad; + uint16_t len, lenonbd, pad; struct mbuf *m = NULL; comp_ring_cons = RCQ(sw_cq_cons); @@ -3293,7 +3340,7 @@ bxe_rxeof(struct bxe_softc *sc, BLOGD(sc, DBG_RX, "fp[%02d] Rx hw_cq_cons=%d hw_sw_cons=%d " "BD prod=%d cons=%d CQE type=0x%x err=0x%x " - "status=0x%x rss_hash=0x%x vlan=0x%x len=%u\n", + "status=0x%x rss_hash=0x%x vlan=0x%x len=%u lenonbd=%u\n", fp->index, hw_cq_cons, sw_cq_cons, @@ -3304,7 +3351,8 @@ bxe_rxeof(struct bxe_softc *sc, cqe_fp->status_flags, le32toh(cqe_fp->rss_hash_result), le16toh(cqe_fp->vlan_tag), - le16toh(cqe_fp->pkt_len_or_gro_seg_len)); + le16toh(cqe_fp->pkt_len_or_gro_seg_len), + le16toh(cqe_fp->len_on_bd)); /* is this a slowpath msg? */ if (__predict_false(CQE_TYPE_SLOW(cqe_fp_type))) { @@ -3351,7 +3399,7 @@ bxe_rxeof(struct bxe_softc *sc, bxe_tpa_stop(sc, fp, tpa_info, queue, pages, &cqe->end_agg_cqe, comp_ring_cons); - bxe_update_sge_prod(sc, fp, pages, &cqe->end_agg_cqe); + bxe_update_sge_prod(sc, fp, pages, &cqe->end_agg_cqe.sgl_or_raw_data); goto next_cqe; } @@ -3367,6 +3415,7 @@ bxe_rxeof(struct bxe_softc *sc, } len = le16toh(cqe_fp->pkt_len_or_gro_seg_len); + lenonbd = le16toh(cqe_fp->len_on_bd); pad = cqe_fp->placement_offset; m = rx_buf->m; @@ -3413,6 +3462,12 @@ bxe_rxeof(struct bxe_softc *sc, m_adj(m, pad); m->m_pkthdr.len = m->m_len = len; + if (len != lenonbd){ + rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp); + if (rc) + break; + } + /* assign packet to this interface interface */ if_setrcvif(m, ifp); @@ -6210,30 +6265,27 @@ static void bxe_set_fp_rx_buf_size(struct bxe_softc *sc) { int i; + uint32_t rx_buf_size; - BLOGD(sc, DBG_LOAD, "mtu = %d\n", sc->mtu); + rx_buf_size = (IP_HEADER_ALIGNMENT_PADDING + ETH_OVERHEAD + sc->mtu); for (i = 0; i < sc->num_queues; i++) { - /* get the Rx buffer size for RX frames */ - sc->fp[i].rx_buf_size = - (IP_HEADER_ALIGNMENT_PADDING + - ETH_OVERHEAD + - sc->mtu); - - BLOGD(sc, DBG_LOAD, "rx_buf_size for fp[%02d] = %d\n", - i, sc->fp[i].rx_buf_size); - - /* get the mbuf allocation size for RX frames */ - if (sc->fp[i].rx_buf_size <= MCLBYTES) { + if(rx_buf_size <= MCLBYTES){ + sc->fp[i].rx_buf_size = rx_buf_size; + sc->fp[i].mbuf_alloc_size = MCLBYTES; + }else if (rx_buf_size <= MJUMPAGESIZE){ + sc->fp[i].rx_buf_size = rx_buf_size; + sc->fp[i].mbuf_alloc_size = MJUMPAGESIZE; + }else if (rx_buf_size <= (MJUMPAGESIZE + MCLBYTES)){ + sc->fp[i].rx_buf_size = MCLBYTES; + sc->fp[i].mbuf_alloc_size = MCLBYTES; + }else if (rx_buf_size <= (2 * MJUMPAGESIZE)){ + sc->fp[i].rx_buf_size = MJUMPAGESIZE; + sc->fp[i].mbuf_alloc_size = MJUMPAGESIZE; + }else { + sc->fp[i].rx_buf_size = MCLBYTES; sc->fp[i].mbuf_alloc_size = MCLBYTES; - } else if (sc->fp[i].rx_buf_size <= BCM_PAGE_SIZE) { - sc->fp[i].mbuf_alloc_size = PAGE_SIZE; - } else { - sc->fp[i].mbuf_alloc_size = MJUM9BYTES; } - - BLOGD(sc, DBG_LOAD, "mbuf_alloc_size for fp[%02d] = %d\n", - i, sc->fp[i].mbuf_alloc_size); } } From owner-svn-src-head@FreeBSD.ORG Thu May 21 21:20:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FA0D255; Thu, 21 May 2015 21:20:55 +0000 (UTC) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id 297C61971; Thu, 21 May 2015 21:20:54 +0000 (UTC) Received: from marvin.lab.vangyzen.net (c-73-147-253-17.hsd1.va.comcast.net [73.147.253.17]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 2481956467; Thu, 21 May 2015 16:20:48 -0500 (CDT) Message-ID: <555E4C3B.1060502@FreeBSD.org> Date: Thu, 21 May 2015 17:20:59 -0400 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Hiren Panchasara , Lawrence Stewart CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283136 - head/sys/netinet References: <201505200108.t4K181No006311@svn.freebsd.org> <555C09D5.9090709@freebsd.org> <20150520042438.GA95600@strugglingcoder.info> <555C2ABC.60102@freebsd.org> <555C89F4.9080607@FreeBSD.org> <555CC40C.1070502@freebsd.org> <20150521200335.GG95600@strugglingcoder.info> In-Reply-To: <20150521200335.GG95600@strugglingcoder.info> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hMmHjDqTwv9kI4CWcf5LPkPLMbHf3A7Du" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 21:20:55 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hMmHjDqTwv9kI4CWcf5LPkPLMbHf3A7Du Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 05/21/2015 16:03, Hiren Panchasara wrote: > On 05/21/15 at 03:27P, Lawrence Stewart wrote: >> On 05/20/15 23:19, Eric van Gyzen wrote: >>> On 05/20/2015 02:33, Lawrence Stewart wrote: >>>> On 05/20/15 14:24, Hiren Panchasara wrote: >>>>> On 05/20/15 at 02:13P, Lawrence Stewart wrote: >>>>>> Hi Hiren, >>>>>> >>>>>> On 05/20/15 11:08, Hiren Panchasara wrote: >>>>>>> Author: hiren Date: Wed May 20 01:08:01 2015 New Revision: >>>>>>> 283136 URL: https://svnweb.freebsd.org/changeset/base/283136 >>>>>>> >>>>>>> Log: Add a new sysctl net.inet.tcp.hostcache.purgenow=3D1 to >>>>>>> expire and purge all entries in hostcache immediately. >>>>>>> >>>>>>> In collaboration with: bz, rwatson MFC after: 1 week Relnotes: >>>>>>> yes Sponsored by: Limelight Networks >>>>>> >>>>>> Why introduce a new sysctl and not change the existing behaviour >>>>>> of net.inet.tcp.hostcache.purge? >>>>> >>>>> I thought it'd make more sense to keep the existing behavior as is >>>>> and provide new knob for the new behavior. >>>> >>>> Don't think so - why would deferring a purge to the next purge run b= e >>>> useful compared to purging immediately? I'd strongly suggest you ada= pt >>>> this change to the existing purge sysctl. I can't see why anyone wou= ld >>>> miss the old functionality. >>> >>> I am generally wary of a question such as "Why would anyone want...",= because as soon as the code is released, someone answers it. >>> >>> That being said, I have always wanted Hiren's purgenow behavior, and = I've always been annoyed by the lazy-purge behavior. I would suggest imp= lementing Lawrence's suggestion, but NOT MFC'ing it, since that would be = a disruptive change. >>> >>> Thanks for your work, Hiren. >> >> I see no reason not to MFC it - it's not a POLA violation for a stable= >> branch. When the user requests a purge, it's surely equally as good (a= nd >> I think anyone of right mind would argue better ;) to purge immediatel= y >> than some number of seconds "n" in the future, where "n" is between 1 >> and the value of net.inet.tcp.hostcache.prune. >=20 > I *do* want to MFC the change. And if there are no major objections, I'= ll go > ahead with what Lawrence is suggesting: changing current purge behavior= in -head > and 10. I don't strongly object. I like the new behavior, and I expect most peop= le would, as long as it's clearly stated in the Release Notes (as it will= be, since you tagged it thus). Thanks for your work, Eric --hMmHjDqTwv9kI4CWcf5LPkPLMbHf3A7Du Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVXkxDXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzRTcwNEY0QTBEMTM0MUU4QkNFNEQ3M0RB RkMxMkExM0VDMjBEQUI4AAoJEK/BKhPsINq43XAH/2zrwJ7OxYdqoZTTM5AC8tIz rNnMjzdNJVr7EsD70bEn94m7DbxhK0Qyt8NM2fMkF+OKi36MuRVx8eh5XjU7LCIE IfxrK0bLMua9vfvC4LvAPpNze5lf/GeX9tAaoRc6twsNfTo8Ei+zUrLuCudgX/kv 3TmPsfKjGIX+IXC9laqb7iT7DhRVzhoT07jZ+qdRQvRolxzVX16Kb2zcZOoIxL2/ mYpK6nv3lYQEbnO+9jbRdgjcu9gaXKnSFh2NbD81w042PDKpAd9mfIWM8aA2BHqg zslNjHK5sC6x4skOEkEFw6aC7UGdr7U90BjawHsOCt9UMj3izFj5DD3WIJG1wnY= =r6f5 -----END PGP SIGNATURE----- --hMmHjDqTwv9kI4CWcf5LPkPLMbHf3A7Du-- From owner-svn-src-head@FreeBSD.ORG Thu May 21 22:11:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EEC71BF; Thu, 21 May 2015 22:11:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70C5A1F73; Thu, 21 May 2015 22:11:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LMBwxf072734; Thu, 21 May 2015 22:11:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LMBw5I072733; Thu, 21 May 2015 22:11:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505212211.t4LMBw5I072733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 May 2015 22:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283271 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 22:11:58 -0000 Author: gjb Date: Thu May 21 22:11:57 2015 New Revision: 283271 URL: https://svnweb.freebsd.org/changeset/base/283271 Log: If TARGET or EMBEDDED_TARGET == arm, set EMBEDDED variable, which helps control some of the arm-specific bits a bit more cleanly (but not really 'clean'). If BOARDNAME is defined (as is in the WANDBOARD configuration RE uses), do some magic to work with the KERNCONF and BOARDNAME to rename the file, making it a bit more intuitive for the consumer to determine which they need. Yes, it is ugly, that is why there is a big warning at the top. It is, however, still much cleaner than the now 474-line shell script, and this Makefile produces the hierarchy needed without much evil. MFC after: 1 week X-MFC-Note: needs all previous Makefile.mirror commits Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Thu May 21 21:45:37 2015 (r283270) +++ head/release/Makefile.mirrors Thu May 21 22:11:57 2015 (r283271) @@ -18,12 +18,14 @@ RELEASEDIR?= /R FTPDIR?= ${RELEASEDIR}/ftp-stage STAGE_TARGETS?= iso-images-stage +.if ${TARGET} == "arm" || ${EMBEDDED_TARGET} == "arm" +EMBEDDED= 1 +.endif + # snapshot .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" SNAPSHOT= 1 TLD?= ${FTPDIR}/snapshots -BUILDDATE!= cd ${.CURDIR} && date -j -f '%s' $$(stat -f "%c" ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d -_SNAP_SUFFIX:= -${BUILDDATE} . for _D in /usr/bin /usr/local/bin . for _S in svnversion svnliteversion . if exists(${_D}/${_S}) @@ -31,9 +33,16 @@ SVNVERSION?= ${_D}/${_S} . endif . endfor . endfor +. if exists(${.CURDIR}/${.OBJDIR}/dist/base/bin/sh) +BUILDDATE!= cd ${.CURDIR} && date -j -f '%s' $$(stat -f "%c" ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d +. else +BUILDDATE!= date +%Y%m%d +. endif . if exists(${SVNVERSION}) && !empty(SVNVERSION) SVNREVISION!= ${SVNVERSION} ${WORLDDIR}/Makefile -_SNAP_SUFFIX:= ${_SNAP_SUFFIX}-r${SVNREVISION} +_SNAP_SUFFIX:= -r${SVNREVISION}-${BUILDDATE} +. else +_SNAP_SUFFIX:= -${BUILDDATE} . endif .else # release @@ -41,6 +50,20 @@ SNAPSHOT= TLD?= ${FTPDIR}/releases .endif +.if defined(EMBEDDED) && !empty(EMBEDDED) +. if ${TARGET} == "arm" && ${TARGET_ARCH} == "armv6" +. if !defined(BOARDNAME) && empty(BOARDNAME) +BOARDNAME:= ${KERNCONF} +. else +OLDNAME:= ${KERNCONF} +. endif +. if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" +SNAPSHOT= 1 +. endif +IMAGES:= ${BOARDNAME}.img +. endif # arm/armv6 +.endif # embedded + .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) STAGE_TARGETS+= vm-images-stage VM_DIR= ${TLD}/VM-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} @@ -61,10 +84,19 @@ iso-images-stage: .if exists(${RELEASEDIR}) @# Assume we have images to copy. . for IMAGE in ${IMAGES} + @# arm/armv6 IMX6 -> WANDBOARD, for example. +. if defined(OLDNAME) && !empty(OLDNAME) + cd ${RELEASEDIR} && mv ${OSRELEASE}-${IMAGE:S,${BOARDNAME},${OLDNAME},}.xz \ + ${OSRELEASE}-${IMAGE}.xz +. endif +. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}) cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE} \ ${ISO_DIR}/${OSRELEASE}-${IMAGE} +. endif +. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz) cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz \ ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz +. endif . if exists(${RELEASEDIR}/CHECKSUM.${CHECKSUM}) cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM} \ ${ISO_DIR}/CHECKSUM.${CHECKSUM} @@ -75,31 +107,40 @@ iso-images-stage: .if defined(SNAPSHOT) && !empty(SNAPSHOT) . for IMAGE in ${IMAGES} cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE} \ - ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} + ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} || true cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE}.xz \ - ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz + ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz || true cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} || true cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz || true + cd ${TLD} && find -L . -type l | xargs rm . endfor . for CHECKSUM in ${CHECKSUM_FILES} . if exists(${ISO_DIR}/CHECKSUM.${CHECKSUM}) rm -f ${ISO_DIR}/CHECKSUM.${CHECKSUM} . endif +. if defined(EMBEDDED) && !empty(EMBEDDED) + cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ + CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX} + cd ${TLD}/ISO-IMAGES/${REVISION} && \ + ln -s \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX} +. else cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} +. endif . endfor .else # !snapshot cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} || true cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE}.xz + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE}.xz || true cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ CHECKSUM.${CHECKSUM}-${OSRELEASE} .endif From owner-svn-src-head@FreeBSD.ORG Thu May 21 22:50:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D062F824; Thu, 21 May 2015 22:50:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF167130F; Thu, 21 May 2015 22:50:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LMoeXK091064; Thu, 21 May 2015 22:50:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LMoeGP091063; Thu, 21 May 2015 22:50:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505212250.t4LMoeGP091063@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 May 2015 22:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283272 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 22:50:40 -0000 Author: gjb Date: Thu May 21 22:50:39 2015 New Revision: 283272 URL: https://svnweb.freebsd.org/changeset/base/283272 Log: Fix make(1) syntax error for non-embedded targets. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Thu May 21 22:11:57 2015 (r283271) +++ head/release/Makefile.mirrors Thu May 21 22:50:39 2015 (r283272) @@ -18,8 +18,10 @@ RELEASEDIR?= /R FTPDIR?= ${RELEASEDIR}/ftp-stage STAGE_TARGETS?= iso-images-stage -.if ${TARGET} == "arm" || ${EMBEDDED_TARGET} == "arm" +.if defined(EMBEDDED_TARGET) && !empty(EMBEDDED_TARGET) +. if ${TARGET} == "arm" || ${EMBEDDED_TARGET} == "arm" EMBEDDED= 1 +. endif .endif # snapshot From owner-svn-src-head@FreeBSD.ORG Thu May 21 23:14:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23697B10; Thu, 21 May 2015 23:14:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 118C21641; Thu, 21 May 2015 23:14:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LNEIE2002651; Thu, 21 May 2015 23:14:18 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LNEIvO002650; Thu, 21 May 2015 23:14:18 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201505212314.t4LNEIvO002650@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 21 May 2015 23:14:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283273 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 23:14:19 -0000 Author: rmacklem Date: Thu May 21 23:14:18 2015 New Revision: 283273 URL: https://svnweb.freebsd.org/changeset/base/283273 Log: The NFS client wasn't handling getdirentries(2) requests for sizes that are not an exact multiple of DIRBLKSIZ correctly. Fortunately readdir(3) always uses an exact multiple of DIRBLKSIZ, so few applications were affected. This patch fixes this problem by reducing the size of the directory read to an exact multiple of DIRBLKSIZ. Tested by: trasz Reported by: trasz Reviewed by: trasz MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Thu May 21 22:50:39 2015 (r283272) +++ head/sys/fs/nfsclient/nfs_clvnops.c Thu May 21 23:14:18 2015 (r283273) @@ -2210,7 +2210,7 @@ nfs_readdir(struct vop_readdir_args *ap) struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); struct uio *uio = ap->a_uio; - ssize_t tresid; + ssize_t tresid, left; int error = 0; struct vattr vattr; @@ -2239,6 +2239,17 @@ nfs_readdir(struct vop_readdir_args *ap) } /* + * NFS always guarantees that directory entries don't straddle + * DIRBLKSIZ boundaries. As such, we need to limit the size + * to an exact multiple of DIRBLKSIZ, to avoid copying a partial + * directory entry. + */ + left = uio->uio_resid % DIRBLKSIZ; + if (left == uio->uio_resid) + return (EINVAL); + uio->uio_resid -= left; + + /* * Call ncl_bioread() to do the real work. */ tresid = uio->uio_resid; @@ -2249,6 +2260,9 @@ nfs_readdir(struct vop_readdir_args *ap) if (ap->a_eofflag != NULL) *ap->a_eofflag = 1; } + + /* Add the partial DIRBLKSIZ (left) back in. */ + uio->uio_resid += left; return (error); } From owner-svn-src-head@FreeBSD.ORG Fri May 22 01:44:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AECA2CBF; Fri, 22 May 2015 01:44:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EE8815BB; Fri, 22 May 2015 01:44:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4M1i8S0076662; Fri, 22 May 2015 01:44:08 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4M1i7LI076658; Fri, 22 May 2015 01:44:07 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201505220144.t4M1i7LI076658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Fri, 22 May 2015 01:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283274 - head/sys/dev/bxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 01:44:08 -0000 Author: davidcs Date: Fri May 22 01:44:07 2015 New Revision: 283274 URL: https://svnweb.freebsd.org/changeset/base/283274 Log: Add stat counters for Jumbo Frames using SGE ring. Also remove the checks for IFCAP_LRO in bxe_alloc_fp_buffers() and bxe_pf_rx_q_prep() since both TPA and Jumbo can use SGE ring. Submitted by:gary.zambrano@qlogic.com Approved by:davidcs@freebsd.org MFC after:5 days Modified: head/sys/dev/bxe/bxe.c head/sys/dev/bxe/bxe_stats.c head/sys/dev/bxe/bxe_stats.h Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Thu May 21 23:14:18 2015 (r283273) +++ head/sys/dev/bxe/bxe.c Fri May 22 01:44:07 2015 (r283274) @@ -27,7 +27,7 @@ #include __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.78" +#define BXE_DRIVER_VERSION "1.78.79" #include "bxe.h" #include "ecore_sp.h" @@ -472,6 +472,8 @@ static const struct { 4, STATS_FLAGS_FUNC, "rx_pkts"}, { STATS_OFFSET32(rx_tpa_pkts), 4, STATS_FLAGS_FUNC, "rx_tpa_pkts"}, + { STATS_OFFSET32(rx_jumbo_sge_pkts), + 4, STATS_FLAGS_FUNC, "rx_jumbo_sge_pkts"}, { STATS_OFFSET32(rx_soft_errors), 4, STATS_FLAGS_FUNC, "rx_soft_errors"}, { STATS_OFFSET32(rx_hw_csum_errors), @@ -583,6 +585,8 @@ static const struct { 4, "rx_pkts"}, { Q_STATS_OFFSET32(rx_tpa_pkts), 4, "rx_tpa_pkts"}, + { Q_STATS_OFFSET32(rx_jumbo_sge_pkts), + 4, "rx_jumbo_sge_pkts"}, { Q_STATS_OFFSET32(rx_soft_errors), 4, "rx_soft_errors"}, { Q_STATS_OFFSET32(rx_hw_csum_errors), @@ -3466,6 +3470,7 @@ bxe_rxeof(struct bxe_softc *sc, rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp); if (rc) break; + fp->eth_q_stats.rx_jumbo_sge_pkts++; } /* assign packet to this interface interface */ @@ -6844,42 +6849,40 @@ bxe_alloc_fp_buffers(struct bxe_softc *s fp->rx_cq_prod = cqe_ring_prod; fp->eth_q_stats.rx_calls = fp->eth_q_stats.rx_pkts = 0; - if (if_getcapenable(sc->ifp) & IFCAP_LRO) { - max_agg_queues = MAX_AGG_QS(sc); + max_agg_queues = MAX_AGG_QS(sc); - fp->tpa_enable = TRUE; + fp->tpa_enable = TRUE; - /* fill the TPA pool */ - for (j = 0; j < max_agg_queues; j++) { - rc = bxe_alloc_rx_tpa_mbuf(fp, j); - if (rc != 0) { - BLOGE(sc, "mbuf alloc fail for fp[%02d] TPA queue %d\n", + /* fill the TPA pool */ + for (j = 0; j < max_agg_queues; j++) { + rc = bxe_alloc_rx_tpa_mbuf(fp, j); + if (rc != 0) { + BLOGE(sc, "mbuf alloc fail for fp[%02d] TPA queue %d\n", i, j); - fp->tpa_enable = FALSE; - goto bxe_alloc_fp_buffers_error; - } - - fp->rx_tpa_info[j].state = BXE_TPA_STATE_STOP; + fp->tpa_enable = FALSE; + goto bxe_alloc_fp_buffers_error; } - if (fp->tpa_enable) { - /* fill the RX SGE chain */ - ring_prod = 0; - for (j = 0; j < RX_SGE_USABLE; j++) { - rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod); - if (rc != 0) { - BLOGE(sc, "mbuf alloc fail for fp[%02d] SGE %d\n", - i, ring_prod); - fp->tpa_enable = FALSE; - ring_prod = 0; - goto bxe_alloc_fp_buffers_error; - } + fp->rx_tpa_info[j].state = BXE_TPA_STATE_STOP; + } - ring_prod = RX_SGE_NEXT(ring_prod); + if (fp->tpa_enable) { + /* fill the RX SGE chain */ + ring_prod = 0; + for (j = 0; j < RX_SGE_USABLE; j++) { + rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod); + if (rc != 0) { + BLOGE(sc, "mbuf alloc fail for fp[%02d] SGE %d\n", + i, ring_prod); + fp->tpa_enable = FALSE; + ring_prod = 0; + goto bxe_alloc_fp_buffers_error; } - fp->rx_sge_prod = ring_prod; + ring_prod = RX_SGE_NEXT(ring_prod); } + + fp->rx_sge_prod = ring_prod; } } @@ -11763,28 +11766,26 @@ bxe_pf_rx_q_prep(struct bxe_softc uint16_t sge_sz = 0; uint16_t tpa_agg_size = 0; - if (if_getcapenable(sc->ifp) & IFCAP_LRO) { - pause->sge_th_lo = SGE_TH_LO(sc); - pause->sge_th_hi = SGE_TH_HI(sc); + pause->sge_th_lo = SGE_TH_LO(sc); + pause->sge_th_hi = SGE_TH_HI(sc); - /* validate SGE ring has enough to cross high threshold */ - if (sc->dropless_fc && + /* validate SGE ring has enough to cross high threshold */ + if (sc->dropless_fc && (pause->sge_th_hi + FW_PREFETCH_CNT) > (RX_SGE_USABLE_PER_PAGE * RX_SGE_NUM_PAGES)) { - BLOGW(sc, "sge ring threshold limit\n"); - } + BLOGW(sc, "sge ring threshold limit\n"); + } - /* minimum max_aggregation_size is 2*MTU (two full buffers) */ - tpa_agg_size = (2 * sc->mtu); - if (tpa_agg_size < sc->max_aggregation_size) { - tpa_agg_size = sc->max_aggregation_size; - } + /* minimum max_aggregation_size is 2*MTU (two full buffers) */ + tpa_agg_size = (2 * sc->mtu); + if (tpa_agg_size < sc->max_aggregation_size) { + tpa_agg_size = sc->max_aggregation_size; + } - max_sge = SGE_PAGE_ALIGN(sc->mtu) >> SGE_PAGE_SHIFT; - max_sge = ((max_sge + PAGES_PER_SGE - 1) & + max_sge = SGE_PAGE_ALIGN(sc->mtu) >> SGE_PAGE_SHIFT; + max_sge = ((max_sge + PAGES_PER_SGE - 1) & (~(PAGES_PER_SGE - 1))) >> PAGES_PER_SGE_SHIFT; - sge_sz = (uint16_t)min(SGE_PAGES, 0xffff); - } + sge_sz = (uint16_t)min(SGE_PAGES, 0xffff); /* pause - not for e1 */ if (!CHIP_IS_E1(sc)) { Modified: head/sys/dev/bxe/bxe_stats.c ============================================================================== --- head/sys/dev/bxe/bxe_stats.c Thu May 21 23:14:18 2015 (r283273) +++ head/sys/dev/bxe/bxe_stats.c Fri May 22 01:44:07 2015 (r283274) @@ -1227,6 +1227,7 @@ bxe_drv_stats_update(struct bxe_softc *s UPDATE_ESTAT_QSTAT(rx_calls); UPDATE_ESTAT_QSTAT(rx_pkts); UPDATE_ESTAT_QSTAT(rx_tpa_pkts); + UPDATE_ESTAT_QSTAT(rx_jumbo_sge_pkts); UPDATE_ESTAT_QSTAT(rx_soft_errors); UPDATE_ESTAT_QSTAT(rx_hw_csum_errors); UPDATE_ESTAT_QSTAT(rx_ofld_frames_csum_ip); Modified: head/sys/dev/bxe/bxe_stats.h ============================================================================== --- head/sys/dev/bxe/bxe_stats.h Thu May 21 23:14:18 2015 (r283273) +++ head/sys/dev/bxe/bxe_stats.h Fri May 22 01:44:07 2015 (r283274) @@ -218,6 +218,7 @@ struct bxe_eth_stats { uint32_t rx_calls; uint32_t rx_pkts; uint32_t rx_tpa_pkts; + uint32_t rx_jumbo_sge_pkts; uint32_t rx_soft_errors; uint32_t rx_hw_csum_errors; uint32_t rx_ofld_frames_csum_ip; @@ -318,6 +319,7 @@ struct bxe_eth_q_stats { uint32_t rx_calls; uint32_t rx_pkts; uint32_t rx_tpa_pkts; + uint32_t rx_jumbo_sge_pkts; uint32_t rx_soft_errors; uint32_t rx_hw_csum_errors; uint32_t rx_ofld_frames_csum_ip; @@ -411,6 +413,7 @@ struct bxe_eth_q_stats_old { uint32_t rx_calls_old; uint32_t rx_pkts_old; uint32_t rx_tpa_pkts_old; + uint32_t rx_jumbo_sge_pkts_old; uint32_t rx_soft_errors_old; uint32_t rx_hw_csum_errors_old; uint32_t rx_ofld_frames_csum_ip_old; From owner-svn-src-head@FreeBSD.ORG Fri May 22 02:00:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11008271; Fri, 22 May 2015 02:00:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA94216D5; Fri, 22 May 2015 02:00:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4M20jDt082986; Fri, 22 May 2015 02:00:45 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4M20jfi082771; Fri, 22 May 2015 02:00:45 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201505220200.t4M20jfi082771@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 22 May 2015 02:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283275 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 02:00:46 -0000 Author: gonzo Date: Fri May 22 02:00:44 2015 New Revision: 283275 URL: https://svnweb.freebsd.org/changeset/base/283275 Log: Add helper method fdt_find_child to make access to child nodes easier. Some FDT nodes have complex properties organized as a child sub-nodes (e.g. timing for LCD panel) we need easy way to obtain handles for these sub-nodes Modified: head/sys/dev/fdt/fdt_common.c head/sys/dev/fdt/fdt_common.h Modified: head/sys/dev/fdt/fdt_common.c ============================================================================== --- head/sys/dev/fdt/fdt_common.c Fri May 22 01:44:07 2015 (r283274) +++ head/sys/dev/fdt/fdt_common.c Fri May 22 02:00:44 2015 (r283275) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #define FDT_COMPAT_LEN 255 #define FDT_TYPE_LEN 64 +#define FDT_NAME_LEN 32 #define FDT_REG_CELLS 4 @@ -310,6 +311,22 @@ fdt_find_compatible(phandle_t start, con } phandle_t +fdt_find_child(phandle_t start, const char *child_name) +{ + char name[FDT_NAME_LEN]; + phandle_t child; + + for (child = OF_child(start); child != 0; child = OF_peer(child)) { + if (OF_getprop(child, "name", name, sizeof(name)) <= 0) + continue; + if (strcmp(name, child_name) == 0) + return (child); + } + + return (0); +} + +phandle_t fdt_depth_search_compatible(phandle_t start, const char *compat, int strict) { phandle_t child, node; Modified: head/sys/dev/fdt/fdt_common.h ============================================================================== --- head/sys/dev/fdt/fdt_common.h Fri May 22 01:44:07 2015 (r283274) +++ head/sys/dev/fdt/fdt_common.h Fri May 22 02:00:44 2015 (r283275) @@ -81,6 +81,7 @@ u_long fdt_data_get(void *, int); int fdt_data_to_res(pcell_t *, int, int, u_long *, u_long *); phandle_t fdt_find_compatible(phandle_t, const char *, int); phandle_t fdt_depth_search_compatible(phandle_t, const char *, int); +phandle_t fdt_find_child(phandle_t, const char *); int fdt_get_mem_regions(struct mem_region *, int *, uint32_t *); int fdt_get_reserved_regions(struct mem_region *, int *); int fdt_get_phyaddr(phandle_t, device_t, int *, void **); From owner-svn-src-head@FreeBSD.ORG Fri May 22 03:16:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F5C49E0; Fri, 22 May 2015 03:16:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AC6C1F37; Fri, 22 May 2015 03:16:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4M3GLBI021703; Fri, 22 May 2015 03:16:21 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4M3GJT9021693; Fri, 22 May 2015 03:16:19 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201505220316.t4M3GJT9021693@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 22 May 2015 03:16:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283276 - in head: . sys/arm/conf sys/arm/ti sys/arm/ti/am335x sys/arm/ti/cpsw sys/arm/ti/omap4 sys/arm/ti/usb sys/boot/fdt/dts/arm sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 03:16:21 -0000 Author: gonzo Date: Fri May 22 03:16:18 2015 New Revision: 283276 URL: https://svnweb.freebsd.org/changeset/base/283276 Log: Switch TI platform support code from using FreeBSD's custom-baked DTS files to vendor-provided ones. It should make easier to adopt platform code to new revisions of hardware and to use DTS overlays for various Beaglebone extensions (shields/capes). Original dts filenames were not changed, they're now wrappers over dts files provided by TI. So make sure you update .dtb files on your devices as part of kernel update GPIO addressing was changed: instead of one global /dev/gpioc0 there are per-bank instances of /dev/gpiocX. Each bank has 32 pins so for instance pin 121 on /dev/gpioc0 in old addressing scheme is now pin 25 on /dev/gpioc3 On Pandaboard serial console devices was changed from /dev/ttyu0 to /dev/ttyu2 so you'll have to update /etc/ttys to get login prompt on serial port in multiuser mode. Single user mode serial console should work as-is Differential Revision: https://reviews.freebsd.org/D2146 Reviewed by: rpaulo, ian, Michal Meloun, Svatopluk Kraus Added: head/sys/arm/ti/am335x/am335x_ecap.c (contents, props changed) head/sys/arm/ti/am335x/am335x_ehrpwm.c (contents, props changed) head/sys/arm/ti/am335x/am335x_musb.c (contents, props changed) head/sys/arm/ti/am335x/am335x_pwmss.c (contents, props changed) head/sys/arm/ti/ti_hwmods.c (contents, props changed) head/sys/arm/ti/ti_hwmods.h (contents, props changed) head/sys/arm/ti/ti_pinmux.c (contents, props changed) head/sys/arm/ti/ti_pinmux.h (contents, props changed) head/sys/arm/ti/usb/omap_host.c (contents, props changed) head/sys/arm/ti/usb/omap_tll.c (contents, props changed) head/sys/boot/fdt/dts/arm/beaglebone-common.dtsi (contents, props changed) head/sys/boot/fdt/dts/arm/pandaboard-common.dtsi (contents, props changed) head/sys/boot/fdt/dts/arm/pandaboard-es.dts (contents, props changed) Deleted: head/sys/arm/ti/am335x/am335x_pwm.c head/sys/boot/fdt/dts/arm/am335x.dtsi Modified: head/UPDATING head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/PANDABOARD head/sys/arm/ti/aintc.c head/sys/arm/ti/am335x/am335x_dmtimer.c head/sys/arm/ti/am335x/am335x_gpio.c head/sys/arm/ti/am335x/am335x_lcd.c head/sys/arm/ti/am335x/am335x_lcd.h head/sys/arm/ti/am335x/am335x_pmic.c head/sys/arm/ti/am335x/am335x_prcm.c head/sys/arm/ti/am335x/am335x_pwm.h head/sys/arm/ti/am335x/am335x_scm_padconf.c head/sys/arm/ti/am335x/am335x_usbss.c head/sys/arm/ti/am335x/files.am335x head/sys/arm/ti/cpsw/if_cpsw.c head/sys/arm/ti/cpsw/if_cpswreg.h head/sys/arm/ti/cpsw/if_cpswvar.h head/sys/arm/ti/files.ti head/sys/arm/ti/omap4/files.omap4 head/sys/arm/ti/omap4/omap4_gpio.c head/sys/arm/ti/omap4/omap4_prcm_clks.c head/sys/arm/ti/omap4/omap4_scm_padconf.c head/sys/arm/ti/ti_adc.c head/sys/arm/ti/ti_common.c head/sys/arm/ti/ti_edma3.c head/sys/arm/ti/ti_gpio.c head/sys/arm/ti/ti_gpio.h head/sys/arm/ti/ti_i2c.c head/sys/arm/ti/ti_mbox.c head/sys/arm/ti/ti_prcm.h head/sys/arm/ti/ti_scm.c head/sys/arm/ti/ti_scm.h head/sys/arm/ti/ti_sdhci.c head/sys/arm/ti/ti_sdma.c head/sys/arm/ti/usb/omap_ehci.c head/sys/arm/ti/usb/omap_usb.h head/sys/boot/fdt/dts/arm/am335x-evm.dts head/sys/boot/fdt/dts/arm/beaglebone-black.dts head/sys/boot/fdt/dts/arm/beaglebone.dts head/sys/boot/fdt/dts/arm/pandaboard.dts head/sys/dev/uart/uart_dev_ti8250.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri May 22 02:00:44 2015 (r283275) +++ head/UPDATING Fri May 22 03:16:18 2015 (r283276) @@ -31,6 +31,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150521: + TI platform code switched to using vendor DTS files and this update + may break existing systems running on Beaglebone, Beaglebone Black, + and Pandaboard: + + - dtb files should be regenerated/reinstalled. Filenames are the + same but content is different now + - GPIO addressing was changed, now each GPIO bank (32 pins per bank) + has its own /dev/gpiocX device, e.g. pin 121 on /dev/gpioc0 in old + addressing scheme is now pin 25 on /dev/gpioc3. + - Pandaboard: /etc/ttys should be updated, serial console device is + now /dev/ttyu2, not /dev/ttyu0 + 20150501: soelim(1) from gnu/usr.bin/groff has been replaced by usr.bin/soelim. If you need the GNU extension from groff soelim(1), install groff Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Fri May 22 02:00:44 2015 (r283275) +++ head/sys/arm/conf/BEAGLEBONE Fri May 22 03:16:18 2015 (r283276) @@ -133,5 +133,8 @@ device axe # ASIX Electronics USB Eth device usb_template # Control of the gadget device usfs +# Pinmux +device fdt_pinctrl + # Flattened Device Tree options FDT # Configure using FDT/DTB data Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Fri May 22 02:00:44 2015 (r283275) +++ head/sys/arm/conf/PANDABOARD Fri May 22 03:16:18 2015 (r283276) @@ -57,6 +57,7 @@ options DDB # Enable the kernel debug #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ue0 +device fdt_pinctrl # Interrupt controller device gic @@ -81,6 +82,7 @@ device pl310 # PL310 L2 cache control # GPIO device gpio +device gpioled # The following enables MFS as root, this seems similar to an initramfs or initrd # as used in Linux. Modified: head/sys/arm/ti/aintc.c ============================================================================== --- head/sys/arm/ti/aintc.c Fri May 22 02:00:44 2015 (r283275) +++ head/sys/arm/ti/aintc.c Fri May 22 03:16:18 2015 (r283276) @@ -69,7 +69,6 @@ static struct resource_spec ti_aintc_spe { -1, 0 } }; - static struct ti_aintc_softc *ti_aintc_sc = NULL; #define aintc_read_4(_sc, reg) \ @@ -77,6 +76,12 @@ static struct ti_aintc_softc *ti_aintc_s #define aintc_write_4(_sc, reg, val) \ bus_space_write_4((_sc)->aintc_bst, (_sc)->aintc_bsh, (reg), (val)) +/* List of compatible strings for FDT tree */ +static struct ofw_compat_data compat_data[] = { + {"ti,am33xx-intc", 1}, + {"ti,omap2-intc", 1}, + {NULL, 0}, +}; static void aintc_post_filter(void *arg) @@ -92,9 +97,9 @@ ti_aintc_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - - if (!ofw_bus_is_compatible(dev, "ti,aintc")) + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); + device_set_desc(dev, "TI AINTC Interrupt Controller"); return (BUS_PROBE_DEFAULT); } Modified: head/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_dmtimer.c Fri May 22 02:00:44 2015 (r283275) +++ head/sys/arm/ti/am335x/am335x_dmtimer.c Fri May 22 03:16:18 2015 (r283276) @@ -54,7 +54,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include +#include #define AM335X_NUM_TIMERS 8 @@ -109,78 +110,38 @@ __FBSDID("$FreeBSD$"); #define DEFAULT_ET_TIMER 2 #define DEFAULT_TC_TIMER 3 +#define DMTIMER_READ4(sc, reg) (bus_read_4((sc)->tmr_mem_res, (reg))) +#define DMTIMER_WRITE4(sc, reg, val) (bus_write_4((sc)->tmr_mem_res, (reg), (val))) + struct am335x_dmtimer_softc { - struct resource * tmr_mem_res[AM335X_NUM_TIMERS]; - struct resource * tmr_irq_res[AM335X_NUM_TIMERS]; + device_t dev; + int tmr_mem_rid; + struct resource * tmr_mem_res; + int tmr_irq_rid; + struct resource * tmr_irq_res; + void *tmr_irq_handler; uint32_t sysclk_freq; - uint32_t tc_num; /* Which timer number is tc. */ - uint32_t tc_tclr; /* Cached tc TCLR register. */ - struct resource * tc_memres; /* Resources for tc timer. */ - uint32_t et_num; /* Which timer number is et. */ - uint32_t et_tclr; /* Cached et TCLR register. */ - struct resource * et_memres; /* Resources for et timer. */ + uint32_t tclr; /* Cached TCLR register. */ int pps_curmode; /* Edge mode now set in hw. */ struct task pps_task; /* For pps_event handling. */ struct cdev * pps_cdev; struct pps_state pps; - struct timecounter tc; - struct eventtimer et; -}; -static struct am335x_dmtimer_softc *am335x_dmtimer_sc; - -static struct resource_spec am335x_dmtimer_mem_spec[] = { - { SYS_RES_MEMORY, 0, RF_ACTIVE }, - { SYS_RES_MEMORY, 1, RF_ACTIVE }, - { SYS_RES_MEMORY, 2, RF_ACTIVE }, - { SYS_RES_MEMORY, 3, RF_ACTIVE }, - { SYS_RES_MEMORY, 4, RF_ACTIVE }, - { SYS_RES_MEMORY, 5, RF_ACTIVE }, - { SYS_RES_MEMORY, 6, RF_ACTIVE }, - { SYS_RES_MEMORY, 7, RF_ACTIVE }, - { -1, 0, 0 } -}; -static struct resource_spec am335x_dmtimer_irq_spec[] = { - { SYS_RES_IRQ, 0, RF_ACTIVE }, - { SYS_RES_IRQ, 1, RF_ACTIVE }, - { SYS_RES_IRQ, 2, RF_ACTIVE }, - { SYS_RES_IRQ, 3, RF_ACTIVE }, - { SYS_RES_IRQ, 4, RF_ACTIVE }, - { SYS_RES_IRQ, 5, RF_ACTIVE }, - { SYS_RES_IRQ, 6, RF_ACTIVE }, - { SYS_RES_IRQ, 7, RF_ACTIVE }, - { -1, 0, 0 } + union { + struct timecounter tc; + struct eventtimer et; + } func; }; -static inline uint32_t -am335x_dmtimer_tc_read_4(struct am335x_dmtimer_softc *sc, uint32_t reg) -{ - - return (bus_read_4(sc->tc_memres, reg)); -} - -static inline void -am335x_dmtimer_tc_write_4(struct am335x_dmtimer_softc *sc, uint32_t reg, - uint32_t val) -{ - - bus_write_4(sc->tc_memres, reg, val); -} - -static inline uint32_t -am335x_dmtimer_et_read_4(struct am335x_dmtimer_softc *sc, uint32_t reg) -{ - - return (bus_read_4(sc->et_memres, reg)); -} +static struct am335x_dmtimer_softc *am335x_dmtimer_et_sc = NULL; +static struct am335x_dmtimer_softc *am335x_dmtimer_tc_sc = NULL; -static inline void -am335x_dmtimer_et_write_4(struct am335x_dmtimer_softc *sc, uint32_t reg, - uint32_t val) -{ - bus_write_4(sc->et_memres, reg, val); -} +#ifdef PPS_SYNC +/* -1 - not detected, 0 - not found, > 0 - timerX module */ +static int am335x_dmtimer_pps_module = -1; +static const char *am335x_dmtimer_pps_hwmod = NULL; +#endif /* * PPS driver routines, included when the kernel is built with option PPS_SYNC. @@ -215,19 +176,19 @@ am335x_dmtimer_set_capture_mode(struct a return; sc->pps_curmode = newmode; - sc->tc_tclr &= ~DMT_TCLR_CAPTRAN_MASK; + sc->tclr &= ~DMT_TCLR_CAPTRAN_MASK; switch (newmode) { case PPS_CAPTUREASSERT: - sc->tc_tclr |= DMT_TCLR_CAPTRAN_LOHI; + sc->tclr |= DMT_TCLR_CAPTRAN_LOHI; break; case PPS_CAPTURECLEAR: - sc->tc_tclr |= DMT_TCLR_CAPTRAN_HILO; + sc->tclr |= DMT_TCLR_CAPTRAN_HILO; break; default: /* It can't be BOTH, so it's disabled. */ break; } - am335x_dmtimer_tc_write_4(sc, DMT_TCLR, sc->tc_tclr); + DMTIMER_WRITE4(sc, DMT_TCLR, sc->tclr); } static void @@ -244,10 +205,10 @@ am335x_dmtimer_tc_poll_pps(struct timeco * TCAR status to re-arm the capture for the next second, we have to * write to the IRQ status register, not the RAW register. Quirky. */ - if (am335x_dmtimer_tc_read_4(sc, DMT_IRQSTATUS_RAW) & DMT_IRQ_TCAR) { + if (DMTIMER_READ4(sc, DMT_IRQSTATUS_RAW) & DMT_IRQ_TCAR) { pps_capture(&sc->pps); - sc->pps.capcount = am335x_dmtimer_tc_read_4(sc, DMT_TCAR1); - am335x_dmtimer_tc_write_4(sc, DMT_IRQSTATUS, DMT_IRQ_TCAR); + sc->pps.capcount = DMTIMER_READ4(sc, DMT_TCAR1); + DMTIMER_WRITE4(sc, DMT_IRQSTATUS, DMT_IRQ_TCAR); taskqueue_enqueue_fast(taskqueue_fast, &sc->pps_task); } } @@ -339,21 +300,15 @@ static struct cdevsw am335x_dmtimer_pps_ .d_name = PPS_CDEV_NAME, }; -/* - * Set up the PPS cdev and the the kernel timepps stuff. - * - * Note that this routine cannot touch the hardware, because bus space resources - * are not fully set up yet when this is called. - */ -static int -am335x_dmtimer_pps_init(device_t dev, struct am335x_dmtimer_softc *sc) +static void +am335x_dmtimer_pps_find() { - int i, timer_num, unit; + int i; unsigned int padstate; const char * padmux; struct padinfo { char * ballname; - char * muxname; + const char * muxname; int timer_num; } padinfo[] = { {"GPMC_ADVn_ALE", "timer4", 4}, @@ -370,21 +325,47 @@ am335x_dmtimer_pps_init(device_t dev, st * is configured for input. The right symbolic values aren't exported * yet from ti_scm.h. */ - timer_num = 0; - for (i = 0; i < nitems(padinfo) && timer_num == 0; ++i) { - if (ti_scm_padconf_get(padinfo[i].ballname, &padmux, + am335x_dmtimer_pps_module = 0; + for (i = 0; i < nitems(padinfo) && am335x_dmtimer_pps_module == 0; ++i) { + if (ti_pinmux_padconf_get(padinfo[i].ballname, &padmux, &padstate) == 0) { if (strcasecmp(padinfo[i].muxname, padmux) == 0 && - (padstate & (0x01 << 5))) - timer_num = padinfo[i].timer_num; + (padstate & (0x01 << 5))) { + am335x_dmtimer_pps_module = padinfo[i].timer_num; + am335x_dmtimer_pps_hwmod = padinfo[i].muxname; + } } } - if (timer_num == 0) { - device_printf(dev, "No DMTimer found with capture pin " + + if (am335x_dmtimer_pps_module == 0) { + printf("am335x_dmtimer: No DMTimer found with capture pin " "configured as input; PPS driver disabled.\n"); - return (DEFAULT_TC_TIMER); } +} + +/* + * Set up the PPS cdev and the the kernel timepps stuff. + * + * Note that this routine cannot touch the hardware, because bus space resources + * are not fully set up yet when this is called. + */ +static void +am335x_dmtimer_pps_init(device_t dev, struct am335x_dmtimer_softc *sc) +{ + int unit; + + if (am335x_dmtimer_pps_module == -1) + am335x_dmtimer_pps_find(); + + /* No PPS input */ + if (am335x_dmtimer_pps_module == 0) + return; + + /* Not PPS-enabled input */ + if ((am335x_dmtimer_pps_module > 0) && + (!ti_hwmods_contains(dev, am335x_dmtimer_pps_hwmod))) + return; /* * Indicate our capabilities (pretty much just capture of either edge). @@ -398,35 +379,21 @@ am335x_dmtimer_pps_init(device_t dev, st * Set up to capture the PPS via timecounter polling, and init the task * that does deferred pps_event() processing after capture. */ - sc->tc.tc_poll_pps = am335x_dmtimer_tc_poll_pps; + sc->func.tc.tc_poll_pps = am335x_dmtimer_tc_poll_pps; TASK_INIT(&sc->pps_task, 0, am335x_dmtimer_process_pps_event, sc); /* Create the PPS cdev. */ - unit = device_get_unit(dev); sc->pps_cdev = make_dev(&am335x_dmtimer_pps_cdevsw, unit, - UID_ROOT, GID_WHEEL, 0600, PPS_CDEV_NAME "%d", unit); + UID_ROOT, GID_WHEEL, 0600, PPS_CDEV_NAME); sc->pps_cdev->si_drv1 = sc; + unit = device_get_unit(sc->pps_cdev); device_printf(dev, "Using DMTimer%d for PPS device /dev/%s%d\n", - timer_num, PPS_CDEV_NAME, unit); - - return (timer_num); + am335x_dmtimer_pps_module, PPS_CDEV_NAME, unit); } -#else /* PPS_SYNC */ - -static int -am335x_dmtimer_pps_init(device_t dev, struct am335x_dmtimer_softc *sc) -{ - - /* - * When PPS support is not compiled in, there's no need to use a timer - * that has an associated capture-input pin, so use the default. - */ - return (DEFAULT_TC_TIMER); -} +#endif -#endif /* PPS_SYNC */ /* * End of PPS driver code. */ @@ -438,7 +405,7 @@ am335x_dmtimer_tc_get_timecount(struct t sc = tc->tc_priv; - return (am335x_dmtimer_tc_read_4(sc, DMT_TCRR)); + return (DMTIMER_READ4(sc, DMT_TCRR)); } static int @@ -462,13 +429,13 @@ am335x_dmtimer_start(struct eventtimer * * from the et_event_cb() routine dispatched from our own handler, but * it's not clear to me that that's the only case possible. */ - sc->et_tclr &= ~(DMT_TCLR_START | DMT_TCLR_AUTOLOAD); - am335x_dmtimer_et_write_4(sc, DMT_TCLR, sc->et_tclr); - am335x_dmtimer_et_write_4(sc, DMT_IRQSTATUS, DMT_IRQ_OVF); + sc->tclr &= ~(DMT_TCLR_START | DMT_TCLR_AUTOLOAD); + DMTIMER_WRITE4(sc, DMT_TCLR, sc->tclr); + DMTIMER_WRITE4(sc, DMT_IRQSTATUS, DMT_IRQ_OVF); if (period != 0) { reload_count = ((uint32_t)et->et_frequency * period) >> 32; - sc->et_tclr |= DMT_TCLR_AUTOLOAD; + sc->tclr |= DMT_TCLR_AUTOLOAD; } else { reload_count = 0; } @@ -482,13 +449,13 @@ am335x_dmtimer_start(struct eventtimer * * Set auto-reload and current-count values. This timer hardware counts * up from the initial/reload value and interrupts on the zero rollover. */ - am335x_dmtimer_et_write_4(sc, DMT_TLDR, 0xFFFFFFFF - reload_count); - am335x_dmtimer_et_write_4(sc, DMT_TCRR, 0xFFFFFFFF - initial_count); + DMTIMER_WRITE4(sc, DMT_TLDR, 0xFFFFFFFF - reload_count); + DMTIMER_WRITE4(sc, DMT_TCRR, 0xFFFFFFFF - initial_count); /* Enable overflow interrupt, and start the timer. */ - am335x_dmtimer_et_write_4(sc, DMT_IRQENABLE_SET, DMT_IRQ_OVF); - sc->et_tclr |= DMT_TCLR_START; - am335x_dmtimer_et_write_4(sc, DMT_TCLR, sc->et_tclr); + DMTIMER_WRITE4(sc, DMT_IRQENABLE_SET, DMT_IRQ_OVF); + sc->tclr |= DMT_TCLR_START; + DMTIMER_WRITE4(sc, DMT_TCLR, sc->tclr); return (0); } @@ -501,10 +468,10 @@ am335x_dmtimer_stop(struct eventtimer *e sc = et->et_priv; /* Stop timer, disable and clear interrupt. */ - sc->et_tclr &= ~(DMT_TCLR_START | DMT_TCLR_AUTOLOAD); - am335x_dmtimer_et_write_4(sc, DMT_TCLR, sc->et_tclr); - am335x_dmtimer_et_write_4(sc, DMT_IRQENABLE_CLR, DMT_IRQ_OVF); - am335x_dmtimer_et_write_4(sc, DMT_IRQSTATUS, DMT_IRQ_OVF); + sc->tclr &= ~(DMT_TCLR_START | DMT_TCLR_AUTOLOAD); + DMTIMER_WRITE4(sc, DMT_TCLR, sc->tclr); + DMTIMER_WRITE4(sc, DMT_IRQENABLE_CLR, DMT_IRQ_OVF); + DMTIMER_WRITE4(sc, DMT_IRQSTATUS, DMT_IRQ_OVF); return (0); } @@ -516,13 +483,96 @@ am335x_dmtimer_intr(void *arg) sc = arg; /* Ack the interrupt, and invoke the callback if it's still enabled. */ - am335x_dmtimer_et_write_4(sc, DMT_IRQSTATUS, DMT_IRQ_OVF); - if (sc->et.et_active) - sc->et.et_event_cb(&sc->et, sc->et.et_arg); + DMTIMER_WRITE4(sc, DMT_IRQSTATUS, DMT_IRQ_OVF); + if (sc->func.et.et_active) + sc->func.et.et_event_cb(&sc->func.et, sc->func.et.et_arg); return (FILTER_HANDLED); } +/* + * Checks if timer is suitable to be system timer + */ +static int +am335x_dmtimer_system_compatible(device_t dev) +{ + phandle_t node; + + node = ofw_bus_get_node(dev); + if (OF_hasprop(node, "ti,timer-alwon")) + return (0); + + return (1); +} + +static int +am335x_dmtimer_init_et(struct am335x_dmtimer_softc *sc) +{ + if (am335x_dmtimer_et_sc != NULL) + return (EEXIST); + +#ifdef PPS_SYNC + if ((am335x_dmtimer_pps_module > 0) && + (!ti_hwmods_contains(sc->dev, am335x_dmtimer_pps_hwmod))) { + device_printf(sc->dev, "not PPS enabled\n"); + return (ENXIO); + } +#endif + + /* Setup eventtimer interrupt handler. */ + if (bus_setup_intr(sc->dev, sc->tmr_irq_res, INTR_TYPE_CLK, + am335x_dmtimer_intr, NULL, sc, &sc->tmr_irq_handler) != 0) { + device_printf(sc->dev, "Unable to setup the clock irq handler.\n"); + return (ENXIO); + } + + sc->func.et.et_name = "AM335x Eventtimer"; + sc->func.et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT; + sc->func.et.et_quality = 1000; + sc->func.et.et_frequency = sc->sysclk_freq; + sc->func.et.et_min_period = + ((0x00000005LLU << 32) / sc->func.et.et_frequency); + sc->func.et.et_max_period = + (0xfffffffeLLU << 32) / sc->func.et.et_frequency; + sc->func.et.et_start = am335x_dmtimer_start; + sc->func.et.et_stop = am335x_dmtimer_stop; + sc->func.et.et_priv = sc; + et_register(&sc->func.et); + + am335x_dmtimer_et_sc = sc; + + return (0); +} + +static int +am335x_dmtimer_init_tc(struct am335x_dmtimer_softc *sc) +{ + if (am335x_dmtimer_tc_sc != NULL) + return (EEXIST); + + /* Set up timecounter, start it, register it. */ + DMTIMER_WRITE4(sc, DMT_TSICR, DMT_TSICR_RESET); + while (DMTIMER_READ4(sc, DMT_TIOCP_CFG) & DMT_TIOCP_RESET) + continue; + + sc->tclr |= DMT_TCLR_START | DMT_TCLR_AUTOLOAD; + DMTIMER_WRITE4(sc, DMT_TLDR, 0); + DMTIMER_WRITE4(sc, DMT_TCRR, 0); + DMTIMER_WRITE4(sc, DMT_TCLR, sc->tclr); + + sc->func.tc.tc_name = "AM335x Timecounter"; + sc->func.tc.tc_get_timecount = am335x_dmtimer_tc_get_timecount; + sc->func.tc.tc_counter_mask = ~0u; + sc->func.tc.tc_frequency = sc->sysclk_freq; + sc->func.tc.tc_quality = 1000; + sc->func.tc.tc_priv = sc; + tc_init(&sc->func.tc); + + am335x_dmtimer_tc_sc = sc; + + return (0); +} + static int am335x_dmtimer_probe(device_t dev) { @@ -530,7 +580,8 @@ am335x_dmtimer_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "ti,am335x-dmtimer")) { + if (ofw_bus_is_compatible(dev, "ti,am335x-timer-1ms") || + ofw_bus_is_compatible(dev, "ti,am335x-timer")) { device_set_desc(dev, "AM335x DMTimer"); return(BUS_PROBE_DEFAULT); } @@ -542,8 +593,9 @@ static int am335x_dmtimer_attach(device_t dev) { struct am335x_dmtimer_softc *sc; - void *ihl; int err; + clk_ident_t timer_id; + int enable; /* * Note that if this routine returns an error status rather than running @@ -552,9 +604,7 @@ am335x_dmtimer_attach(device_t dev) */ sc = device_get_softc(dev); - - if (am335x_dmtimer_sc != NULL) - return (EINVAL); + sc->dev = dev; /* Get the base clock frequency. */ err = ti_prcm_clk_get_source_freq(SYS_CLK, &sc->sysclk_freq); @@ -564,82 +614,61 @@ am335x_dmtimer_attach(device_t dev) } /* Request the memory resources. */ - err = bus_alloc_resources(dev, am335x_dmtimer_mem_spec, - sc->tmr_mem_res); - if (err) { + sc->tmr_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->tmr_mem_rid, RF_ACTIVE); + if (sc->tmr_mem_res == NULL) { device_printf(dev, "Error: could not allocate mem resources\n"); return (ENXIO); } /* Request the IRQ resources. */ - err = bus_alloc_resources(dev, am335x_dmtimer_irq_spec, - sc->tmr_irq_res); + sc->tmr_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &sc->tmr_irq_rid, RF_ACTIVE); if (err) { + bus_release_resource(dev, SYS_RES_MEMORY, sc->tmr_mem_rid, + sc->tmr_mem_res); device_printf(dev, "Error: could not allocate irq resources\n"); return (ENXIO); } - /* - * Use the default eventtimer. Let the PPS init routine decide which - * timer to use for the timecounter. - */ - sc->et_num = DEFAULT_ET_TIMER; - sc->tc_num = am335x_dmtimer_pps_init(dev, sc); +#ifdef PPS_SYNC + am335x_dmtimer_pps_init(dev, sc); +#endif - sc->et_memres = sc->tmr_mem_res[sc->et_num]; - sc->tc_memres = sc->tmr_mem_res[sc->tc_num]; + enable = 0; + /* Try to use as a timecounter or event timer */ + if (am335x_dmtimer_system_compatible(dev)) { + if (am335x_dmtimer_init_tc(sc) == 0) + enable = 1; + else if (am335x_dmtimer_init_et(sc) == 0) + enable = 1; + } + + if (enable) { + /* Enable clocks and power on the chosen devices. */ + timer_id = ti_hwmods_get_clock(dev); + if (timer_id == INVALID_CLK_IDENT) { + bus_release_resource(dev, SYS_RES_MEMORY, sc->tmr_mem_rid, + sc->tmr_mem_res); + bus_release_resource(dev, SYS_RES_IRQ, sc->tmr_irq_rid, + sc->tmr_irq_res); + device_printf(dev, "failed to get device id using ti,hwmods\n"); + return (ENXIO); + } - /* Enable clocks and power on the chosen devices. */ - err = ti_prcm_clk_set_source(DMTIMER0_CLK + sc->et_num, SYSCLK_CLK); - err |= ti_prcm_clk_enable(DMTIMER0_CLK + sc->et_num); - err |= ti_prcm_clk_set_source(DMTIMER0_CLK + sc->tc_num, SYSCLK_CLK); - err |= ti_prcm_clk_enable(DMTIMER0_CLK + sc->tc_num); - if (err) { - device_printf(dev, "Error: could not enable timer clock\n"); - return (ENXIO); - } + err = ti_prcm_clk_set_source(timer_id, SYSCLK_CLK); + err |= ti_prcm_clk_enable(timer_id); - /* Setup eventtimer interrupt handler. */ - if (bus_setup_intr(dev, sc->tmr_irq_res[sc->et_num], INTR_TYPE_CLK, - am335x_dmtimer_intr, NULL, sc, &ihl) != 0) { - device_printf(dev, "Unable to setup the clock irq handler.\n"); - return (ENXIO); + if (err) { + bus_release_resource(dev, SYS_RES_MEMORY, sc->tmr_mem_rid, + sc->tmr_mem_res); + bus_release_resource(dev, SYS_RES_IRQ, sc->tmr_irq_rid, + sc->tmr_irq_res); + device_printf(dev, "Error: could not enable timer clock\n"); + return (ENXIO); + } } - /* Set up timecounter, start it, register it. */ - am335x_dmtimer_tc_write_4(sc, DMT_TSICR, DMT_TSICR_RESET); - while (am335x_dmtimer_tc_read_4(sc, DMT_TIOCP_CFG) & DMT_TIOCP_RESET) - continue; - - sc->tc_tclr |= DMT_TCLR_START | DMT_TCLR_AUTOLOAD; - am335x_dmtimer_tc_write_4(sc, DMT_TLDR, 0); - am335x_dmtimer_tc_write_4(sc, DMT_TCRR, 0); - am335x_dmtimer_tc_write_4(sc, DMT_TCLR, sc->tc_tclr); - - sc->tc.tc_name = "AM335x Timecounter"; - sc->tc.tc_get_timecount = am335x_dmtimer_tc_get_timecount; - sc->tc.tc_counter_mask = ~0u; - sc->tc.tc_frequency = sc->sysclk_freq; - sc->tc.tc_quality = 1000; - sc->tc.tc_priv = sc; - tc_init(&sc->tc); - - sc->et.et_name = "AM335x Eventtimer"; - sc->et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT; - sc->et.et_quality = 1000; - sc->et.et_frequency = sc->sysclk_freq; - sc->et.et_min_period = - ((0x00000005LLU << 32) / sc->et.et_frequency); - sc->et.et_max_period = - (0xfffffffeLLU << 32) / sc->et.et_frequency; - sc->et.et_start = am335x_dmtimer_start; - sc->et.et_stop = am335x_dmtimer_stop; - sc->et.et_priv = sc; - et_register(&sc->et); - - /* Store a pointer to the softc for use in DELAY(). */ - am335x_dmtimer_sc = sc; - return (0); } @@ -667,7 +696,7 @@ DELAY(int usec) int32_t counts; uint32_t first, last; - sc = am335x_dmtimer_sc; + sc = am335x_dmtimer_tc_sc; if (sc == NULL) { for (; usec > 0; usec--) @@ -680,10 +709,10 @@ DELAY(int usec) /* Get the number of times to count */ counts = (usec + 1) * (sc->sysclk_freq / 1000000); - first = am335x_dmtimer_tc_read_4(sc, DMT_TCRR); + first = DMTIMER_READ4(sc, DMT_TCRR); while (counts > 0) { - last = am335x_dmtimer_tc_read_4(sc, DMT_TCRR); + last = DMTIMER_READ4(sc, DMT_TCRR); if (last > first) { counts -= (int32_t)(last - first); } else { Added: head/sys/arm/ti/am335x/am335x_ecap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/am335x/am335x_ecap.c Fri May 22 03:16:18 2015 (r283276) @@ -0,0 +1,201 @@ +/*- + * Copyright (c) 2013 Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "am335x_pwm.h" + +#define ECAP_TSCTR 0x00 +#define ECAP_CAP1 0x08 +#define ECAP_CAP2 0x0C +#define ECAP_CAP3 0x10 +#define ECAP_CAP4 0x14 +#define ECAP_ECCTL2 0x2A +#define ECCTL2_MODE_APWM (1 << 9) +#define ECCTL2_SYNCO_SEL (3 << 6) +#define ECCTL2_TSCTRSTOP_FREERUN (1 << 4) + +#define ECAP_READ2(_sc, reg) bus_read_2((_sc)->sc_mem_res, reg); +#define ECAP_WRITE2(_sc, reg, value) \ + bus_write_2((_sc)->sc_mem_res, reg, value); +#define ECAP_READ4(_sc, reg) bus_read_4((_sc)->sc_mem_res, reg); +#define ECAP_WRITE4(_sc, reg, value) \ + bus_write_4((_sc)->sc_mem_res, reg, value); + +#define PWM_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define PWM_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define PWM_LOCK_INIT(_sc) mtx_init(&(_sc)->sc_mtx, \ + device_get_nameunit(_sc->sc_dev), "am335x_ecap softc", MTX_DEF) +#define PWM_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) + +static device_probe_t am335x_ecap_probe; +static device_attach_t am335x_ecap_attach; +static device_detach_t am335x_ecap_detach; + +struct am335x_ecap_softc { + device_t sc_dev; + struct mtx sc_mtx; + struct resource *sc_mem_res; + int sc_mem_rid; +}; + +static device_method_t am335x_ecap_methods[] = { + DEVMETHOD(device_probe, am335x_ecap_probe), + DEVMETHOD(device_attach, am335x_ecap_attach), + DEVMETHOD(device_detach, am335x_ecap_detach), + + DEVMETHOD_END +}; + +static driver_t am335x_ecap_driver = { + "am335x_ecap", + am335x_ecap_methods, + sizeof(struct am335x_ecap_softc), +}; + +static devclass_t am335x_ecap_devclass; + +/* + * API function to set period/duty cycles for ECAPx + */ +int +am335x_pwm_config_ecap(int unit, int period, int duty) +{ + device_t dev; + struct am335x_ecap_softc *sc; + uint16_t reg; + + dev = devclass_get_device(am335x_ecap_devclass, unit); + if (dev == NULL) + return (ENXIO); + + if (duty > period) + return (EINVAL); + + if (period == 0) + return (EINVAL); + + sc = device_get_softc(dev); + PWM_LOCK(sc); + + reg = ECAP_READ2(sc, ECAP_ECCTL2); + reg |= ECCTL2_MODE_APWM | ECCTL2_TSCTRSTOP_FREERUN | ECCTL2_SYNCO_SEL; + ECAP_WRITE2(sc, ECAP_ECCTL2, reg); + + /* CAP3 in APWM mode is APRD shadow register */ + ECAP_WRITE4(sc, ECAP_CAP3, period - 1); + + /* CAP4 in APWM mode is ACMP shadow register */ + ECAP_WRITE4(sc, ECAP_CAP4, duty); + /* Restart counter */ + ECAP_WRITE4(sc, ECAP_TSCTR, 0); + + PWM_UNLOCK(sc); + + return (0); +} + +static int +am335x_ecap_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "ti,am33xx-ecap")) + return (ENXIO); + + device_set_desc(dev, "AM335x eCAP"); + + return (BUS_PROBE_DEFAULT); +} + +static int +am335x_ecap_attach(device_t dev) +{ + struct am335x_ecap_softc *sc; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + PWM_LOCK_INIT(sc); + + sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->sc_mem_rid, RF_ACTIVE); + if (sc->sc_mem_res == NULL) { + device_printf(dev, "cannot allocate memory resources\n"); + goto fail; + } + + return (0); + +fail: + PWM_LOCK_DESTROY(sc); + return (ENXIO); +} + +static int +am335x_ecap_detach(device_t dev) +{ + struct am335x_ecap_softc *sc; + + sc = device_get_softc(dev); + + PWM_LOCK(sc); + if (sc->sc_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, + sc->sc_mem_rid, sc->sc_mem_res); + PWM_UNLOCK(sc); + + PWM_LOCK_DESTROY(sc); + + + return (0); +} + +DRIVER_MODULE(am335x_ecap, am335x_pwmss, am335x_ecap_driver, am335x_ecap_devclass, 0, 0); +MODULE_VERSION(am335x_ecap, 1); +MODULE_DEPEND(am335x_ecap, am335x_pwmss, 1, 1, 1); Added: head/sys/arm/ti/am335x/am335x_ehrpwm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/am335x/am335x_ehrpwm.c Fri May 22 03:16:18 2015 (r283276) @@ -0,0 +1,448 @@ +/*- + * Copyright (c) 2013 Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "am335x_pwm.h" + +/* In ticks */ +#define DEFAULT_PWM_PERIOD 1000 +#define PWM_CLOCK 100000000UL + +#define PWM_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define PWM_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define PWM_LOCK_INIT(_sc) mtx_init(&(_sc)->sc_mtx, \ + device_get_nameunit(_sc->sc_dev), "am335x_ehrpwm softc", MTX_DEF) +#define PWM_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) + +#define EPWM_READ2(_sc, reg) bus_read_2((_sc)->sc_mem_res, reg); +#define EPWM_WRITE2(_sc, reg, value) \ + bus_write_2((_sc)->sc_mem_res, reg, value); + +#define EPWM_TBCTL 0x00 +#define TBCTL_FREERUN (2 << 14) +#define TBCTL_PHDIR_UP (1 << 13) +#define TBCTL_PHDIR_DOWN (0 << 13) +#define TBCTL_CLKDIV(x) ((x) << 10) +#define TBCTL_CLKDIV_MASK (3 << 10) +#define TBCTL_HSPCLKDIV(x) ((x) << 7) +#define TBCTL_HSPCLKDIV_MASK (3 << 7) +#define TBCTL_SYNCOSEL_DISABLED (3 << 4) +#define TBCTL_PRDLD_SHADOW (0 << 3) +#define TBCTL_PRDLD_IMMEDIATE (0 << 3) +#define TBCTL_PHSEN_ENABLED (1 << 2) +#define TBCTL_PHSEN_DISABLED (0 << 2) +#define TBCTL_CTRMODE_MASK (3) +#define TBCTL_CTRMODE_UP (0 << 0) +#define TBCTL_CTRMODE_DOWN (1 << 0) +#define TBCTL_CTRMODE_UPDOWN (2 << 0) +#define TBCTL_CTRMODE_FREEZE (3 << 0) + +#define EPWM_TBSTS 0x02 +#define EPWM_TBPHSHR 0x04 +#define EPWM_TBPHS 0x06 +#define EPWM_TBCNT 0x08 +#define EPWM_TBPRD 0x0a +/* Counter-compare */ +#define EPWM_CMPCTL 0x0e +#define CMPCTL_SHDWBMODE_SHADOW (1 << 6) +#define CMPCTL_SHDWBMODE_IMMEDIATE (0 << 6) +#define CMPCTL_SHDWAMODE_SHADOW (1 << 4) +#define CMPCTL_SHDWAMODE_IMMEDIATE (0 << 4) +#define CMPCTL_LOADBMODE_ZERO (0 << 2) +#define CMPCTL_LOADBMODE_PRD (1 << 2) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri May 22 05:02:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97C06A6F; Fri, 22 May 2015 05:02:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86CB7198C; Fri, 22 May 2015 05:02:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4M52s2O074938; Fri, 22 May 2015 05:02:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4M52sCA074937; Fri, 22 May 2015 05:02:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505220502.t4M52sCA074937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 22 May 2015 05:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283277 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 05:02:54 -0000 Author: imp Date: Fri May 22 05:02:53 2015 New Revision: 283277 URL: https://svnweb.freebsd.org/changeset/base/283277 Log: Need to handle the !FDT case still too... I thought in r270025 we wouldn't need it, but it appears that we still do for the moment... Modified: head/sys/arm/at91/at91_pio.c Modified: head/sys/arm/at91/at91_pio.c ============================================================================== --- head/sys/arm/at91/at91_pio.c Fri May 22 03:16:18 2015 (r283276) +++ head/sys/arm/at91/at91_pio.c Fri May 22 05:02:53 2015 (r283277) @@ -646,5 +646,9 @@ static driver_t at91_pio_driver = { sizeof(struct at91_pio_softc), }; +#ifdef FDT EARLY_DRIVER_MODULE(at91_pio, at91_pinctrl, at91_pio_driver, at91_pio_devclass, NULL, NULL, BUS_PASS_INTERRUPT); +#else +DRIVER_MODULE(at91_pio, atmelarm, at91_pio_driver, at91_pio_devclass, NULL, NULL); +#endif From owner-svn-src-head@FreeBSD.ORG Fri May 22 06:46:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26754FE9; Fri, 22 May 2015 06:46:26 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0DADD1465; Fri, 22 May 2015 06:46:26 +0000 (UTC) Received: from Xins-MBP.home.us.delphij.net (unknown [IPv6:2601:9:7280:1a80:a8a0:d4d4:c68d:5e24]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id B115E1411F; Thu, 21 May 2015 23:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1432277185; x=1432291585; bh=fngUBeiD7m2pGdhOou6kcgTbTfj/ICConZHt6NufKfA=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=duMzHzfGjsFrbJ6cL+h/HhDwrKMx2rianu8SZDm4E24DScksUZbcBispAn/57JMys 5m+kwxLfg6xMNCmHN0VowJlkBCtlmQLtu6q6jgD3bkjk31gIVnB7oZZuemztuPDuTc tRzFPesZUl8NfnzyTtnbH/gnw3psC5qDeiEGbeJE= Message-ID: <555ED0BE.2080602@delphij.net> Date: Thu, 21 May 2015 23:46:22 -0700 From: Xin Li User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Mateusz Guzik , John Baldwin CC: Alexander Kabaev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282971 - in head/sys: kern sys References: <201505151350.t4FDocQT054144@svn.freebsd.org> <20150520120046.268dde86@kan> <2114957.Lbz1KNQfZU@ralph.baldwin.cx> <20150521165826.GA17403@dft-labs.eu> In-Reply-To: <20150521165826.GA17403@dft-labs.eu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 06:46:26 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 5/21/15 09:58, Mateusz Guzik wrote: > In other words, I would argue modifying native privmitives to > accomodate for zfs use may not be the best course of action. Well, POSIX says this about pthread_cond_destroy(), quote: "A condition variable can be destroyed immediately after all the threads that are blocked on it are awakened." This is also supported by our userland thread library (libthr), by the way, and I don't see this as an unreasonable expectation, as there is no programmer accessible API to drain a conditional variable. BTW. what ZFS code does is that it released the mutex (z_range_lock in the zfs_rlock.c case), then did a broadcast, at which point the code shall reasonably expect that all threads that are blocked on it are awaken, and destroying the condition variable *must* be safe at the time . Cheers, -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJVXtC8AAoJEJW2GBstM+nsvBwP/3lx99PDC+LDYXnZ4wE3bOxh h7I/Sn7fSMO8UzsY6H9Wgaw9SvPzLbeCtAuild8prcmtkIBfX2AJ2Z3MhrmaZjR3 zaZJhOL3gHOip9YWy6nSUaKeFjKgpoA4VrvyOhVczBZ45FYElEseYbnnr+QYA4AZ U9PsSDf23z72/iCebbxwCNZt07sAPj3UtmWQAP0iGPIlUkW8kyJMzHn9jwLfENnH GgBb8C9o9ayBODNh/JfeMnyFylRLnK2GllP5p4zi2boKprKBrFgEVUVo72bhXjD0 zhk3+shXi3U99SuudR7+tRSHHJNeaAOnfPOyNF3EvRFPsIsU/sxZL+FHy4AePURp 7qFJeozEX4mphj5m4WOlX8NMZoEm3SwInVjmlnb0yaOVuLtFM+IUkguYHO2Ckb4X byljvYGXHXKoFZQx4LN+YOdTAOF2xvNhmwB9scfBYI+tEAzIoakcPE1eeciLHmR5 jjLjW4MX8fgMtvBlVlh9XOre9J81Cgj5mxmBK3Z4KnuZD26yrjpn4ZauCI6/7vRN c16mgsdC5lzmgheWhDAethg5oXO0r5xmapLOMMW3ZE4LZ7+L6bCvMsmAjcmVwOzQ ftyO20wx5JTicaK0oPz9i31Szdm8c4z6B/GZdHbZJT+tdypo2WcO9/OLeqDjo3Jj 6prgPNxd72hHS4okdTSA =KCdi -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri May 22 07:39:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2798653F; Fri, 22 May 2015 07:39:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15C5F1AA9; Fri, 22 May 2015 07:39:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4M7dLt3049758; Fri, 22 May 2015 07:39:21 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4M7dLLQ049757; Fri, 22 May 2015 07:39:21 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505220739.t4M7dLLQ049757@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 22 May 2015 07:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283278 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 07:39:22 -0000 Author: arybchik Date: Fri May 22 07:39:21 2015 New Revision: 283278 URL: https://svnweb.freebsd.org/changeset/base/283278 Log: sfxge: relax assertion to allow RST flag in TSO packets Kernel under stress load, mixed MC reboot and sfupdate really generates TSO packet with RST flag. It will generate many TCP packets with RST flag set. May be RST flag should be set in the last segment only, but it could be dropped. So, it is safer to keep the flag in all packets to be sure that connection is reset. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2609 Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Fri May 22 05:02:53 2015 (r283277) +++ head/sys/dev/sfxge/sfxge_tx.c Fri May 22 07:39:21 2015 (r283278) @@ -865,8 +865,14 @@ static void tso_start(struct sfxge_tso_s tso->seqnum = ntohl(th->th_seq); /* These flags must not be duplicated */ - KASSERT(!(th->th_flags & (TH_URG | TH_SYN | TH_RST)), - ("incompatible TCP flag on TSO packet")); + /* + * RST should not be duplicated as well, but FreeBSD kernel + * generates TSO packets with RST flag. So, do not assert + * its absence. + */ + KASSERT(!(th->th_flags & (TH_URG | TH_SYN)), + ("incompatible TCP flag 0x%x on TSO packet", + th->th_flags & (TH_URG | TH_SYN))); tso->out_len = mbuf->m_pkthdr.len - tso->header_len; } From owner-svn-src-head@FreeBSD.ORG Fri May 22 10:43:44 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B419CEA; Fri, 22 May 2015 10:43:44 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4A98811CA; Fri, 22 May 2015 10:43:42 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA19140; Fri, 22 May 2015 13:43:34 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1YvkQQ-000Fhz-7a; Fri, 22 May 2015 13:43:34 +0300 Message-ID: <555F082F.9080903@FreeBSD.org> Date: Fri, 22 May 2015 13:42:55 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ryan Stone , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r279437 - head/sys/cddl/compat/opensolaris/sys References: <201503010022.t210MkXI083827@svn.freebsd.org> In-Reply-To: <201503010022.t210MkXI083827@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 10:43:44 -0000 On 01/03/2015 02:22, Ryan Stone wrote: > Author: rstone > Date: Sun Mar 1 00:22:45 2015 > New Revision: 279437 > URL: https://svnweb.freebsd.org/changeset/base/279437 > > Log: > Allow Illumos code to co-exist with nv(9) > > Differential Revision: https://reviews.freebsd.org/D1881 I left some comments in this review. I wonder if the watchers got notified given that the review is closed. I can reproduce the comments in email if needed. > Reviewed by: jfv, will > Suggested by: pjd > MFC after: 1 month > Sponsored by: Sandvine Inc -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Fri May 22 10:44:32 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CCA5E4B; Fri, 22 May 2015 10:44:32 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id BD1EF11D9; Fri, 22 May 2015 10:44:30 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA19156; Fri, 22 May 2015 13:44:29 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1YvkRI-000Fi2-UA; Fri, 22 May 2015 13:44:28 +0300 Message-ID: <555F0855.4030805@FreeBSD.org> Date: Fri, 22 May 2015 13:43:33 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r283109 - head/sys/x86/x86 References: <201505191421.t4JEL1vd075036@svn.freebsd.org> In-Reply-To: <201505191421.t4JEL1vd075036@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 10:44:32 -0000 On 19/05/2015 17:21, Konstantin Belousov wrote: > Author: kib > Date: Tue May 19 14:21:00 2015 > New Revision: 283109 > URL: https://svnweb.freebsd.org/changeset/base/283109 > > Log: > When sleeping in Sx state using MWAIT instruction, accept fast wakeup > requests from writes to the monitored line. > > Submitted by: avg Thanks! > Modified: > head/sys/x86/x86/cpu_machdep.c > > Modified: head/sys/x86/x86/cpu_machdep.c > ============================================================================== > --- head/sys/x86/x86/cpu_machdep.c Tue May 19 14:05:15 2015 (r283108) > +++ head/sys/x86/x86/cpu_machdep.c Tue May 19 14:21:00 2015 (r283109) > @@ -101,6 +101,10 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#define STATE_RUNNING 0x0 > +#define STATE_MWAIT 0x1 > +#define STATE_SLEEPING 0x2 > + > /* > * Machine dependent boot() routine > * > @@ -134,13 +138,24 @@ acpi_cpu_idle_mwait(uint32_t mwait_hint) > { > int *state; > > - state = (int *)PCPU_PTR(monitorbuf); > /* > * XXXKIB. Software coordination mode should be supported, > * but all Intel CPUs provide hardware coordination. > */ > + > + state = (int *)PCPU_PTR(monitorbuf); > + KASSERT(*state == STATE_SLEEPING, > + ("cpu_mwait_cx: wrong monitorbuf state")); > + *state = STATE_MWAIT; > cpu_monitor(state, 0, 0); > - cpu_mwait(MWAIT_INTRBREAK, mwait_hint); > + if (*state == STATE_MWAIT) > + cpu_mwait(MWAIT_INTRBREAK, mwait_hint); > + > + /* > + * We should exit on any event that interrupts mwait, because > + * that event might be a wanted interrupt. > + */ > + *state = STATE_RUNNING; > } > > /* Get current clock frequency for the given cpu id. */ > @@ -231,10 +246,6 @@ static int idle_mwait = 1; /* Use MONIT > SYSCTL_INT(_machdep, OID_AUTO, idle_mwait, CTLFLAG_RWTUN, &idle_mwait, > 0, "Use MONITOR/MWAIT for short idle"); > > -#define STATE_RUNNING 0x0 > -#define STATE_MWAIT 0x1 > -#define STATE_SLEEPING 0x2 > - > #ifndef PC98 > static void > cpu_idle_acpi(sbintime_t sbt) > -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Fri May 22 10:53:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04F33284; Fri, 22 May 2015 10:53:17 +0000 (UTC) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id C36DC12DA; Fri, 22 May 2015 10:53:16 +0000 (UTC) Received: from bender (bender.sec.cl.cam.ac.uk [IPv6:2001:630:212:2a8:4e72:b9ff:fe93:61bf]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 6BE3AD7A6F; Fri, 22 May 2015 10:53:15 +0000 (UTC) Date: Fri, 22 May 2015 11:53:15 +0100 From: Andrew Turner To: Oleksandr Tymoshenko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283275 - head/sys/dev/fdt Message-ID: <20150522115315.5e2ba6fa@bender> In-Reply-To: <201505220200.t4M20jfi082771@svn.freebsd.org> References: <201505220200.t4M20jfi082771@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 10:53:17 -0000 On Fri, 22 May 2015 02:00:45 +0000 (UTC) Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Fri May 22 02:00:44 2015 > New Revision: 283275 > URL: https://svnweb.freebsd.org/changeset/base/283275 > > Log: > Add helper method fdt_find_child to make access to child nodes > easier. > Some FDT nodes have complex properties organized as a child > sub-nodes (e.g. timing for LCD panel) we need easy way to obtain > handles for these sub-nodes Why is this named fdt_find_child? It's not fdt specific so should be named something like ofw_bus_find_child and live in sys/dev/ofw/ofw_bus_subr.c. In general we are trying to move away from the fdt_ functions unless absolutely needed. Andrew From owner-svn-src-head@FreeBSD.ORG Fri May 22 11:03:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD5F04CF; Fri, 22 May 2015 11:03:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB7E31410; Fri, 22 May 2015 11:03:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MB3qak054780; Fri, 22 May 2015 11:03:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MB3qR4054779; Fri, 22 May 2015 11:03:52 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505221103.t4MB3qR4054779@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 22 May 2015 11:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283281 - head/sys/fs/procfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 11:03:52 -0000 Author: jhb Date: Fri May 22 11:03:51 2015 New Revision: 283281 URL: https://svnweb.freebsd.org/changeset/base/283281 Log: Always set p_oppid when attaching to an existing process via procfs tracing. This matches the behavior of ptrace(PT_ATTACH). Also, the procfs detach request assumes p_oppid is always set. Reviewed by: kib MFC after: 2 weeks Modified: head/sys/fs/procfs/procfs_ctl.c Modified: head/sys/fs/procfs/procfs_ctl.c ============================================================================== --- head/sys/fs/procfs/procfs_ctl.c Fri May 22 09:03:55 2015 (r283280) +++ head/sys/fs/procfs/procfs_ctl.c Fri May 22 11:03:51 2015 (r283281) @@ -143,8 +143,8 @@ procfs_control(struct thread *td, struct p->p_flag |= P_TRACED; faultin(p); p->p_xstat = 0; /* XXX ? */ + p->p_oppid = p->p_pptr->p_pid; if (p->p_pptr != td->td_proc) { - p->p_oppid = p->p_pptr->p_pid; proc_reparent(p, td->td_proc); } kern_psignal(p, SIGSTOP); From owner-svn-src-head@FreeBSD.ORG Fri May 22 11:04:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84E46619; Fri, 22 May 2015 11:04:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72D501431; Fri, 22 May 2015 11:04:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MB4tTj054980; Fri, 22 May 2015 11:04:55 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MB4stc054974; Fri, 22 May 2015 11:04:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505221104.t4MB4stc054974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 22 May 2015 11:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283282 - in head: sys/kern tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 11:04:55 -0000 Author: jhb Date: Fri May 22 11:04:54 2015 New Revision: 283282 URL: https://svnweb.freebsd.org/changeset/base/283282 Log: Only reparent a traced process to its old parent if the tracing process is not the old parent. Otherwise, proc_reap() will leave the zombie in place resulting in the process' status being returned twice to its parent. Add test cases for PT_TRACE_ME and PT_ATTACH which are fixed by this change. Differential Revision: https://reviews.freebsd.org/D2594 Reviewed by: kib MFC after: 2 weeks Added: head/tests/sys/kern/ptrace_test.c (contents, props changed) Modified: head/sys/kern/kern_exit.c head/tests/sys/kern/Makefile Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Fri May 22 11:03:51 2015 (r283281) +++ head/sys/kern/kern_exit.c Fri May 22 11:04:54 2015 (r283282) @@ -847,13 +847,13 @@ proc_reap(struct thread *td, struct proc PROC_LOCK(q); sigqueue_take(p->p_ksi); PROC_UNLOCK(q); - PROC_UNLOCK(p); /* * If we got the child via a ptrace 'attach', we need to give it back * to the old parent. */ - if (p->p_oppid != 0) { + if (p->p_oppid != 0 && p->p_oppid != p->p_pptr->p_pid) { + PROC_UNLOCK(p); t = proc_realparent(p); PROC_LOCK(t); PROC_LOCK(p); @@ -867,6 +867,8 @@ proc_reap(struct thread *td, struct proc sx_xunlock(&proctree_lock); return; } + p->p_oppid = 0; + PROC_UNLOCK(p); /* * Remove other references to this process to ensure we have an Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Fri May 22 11:03:51 2015 (r283281) +++ head/tests/sys/kern/Makefile Fri May 22 11:04:54 2015 (r283282) @@ -3,6 +3,7 @@ TESTSDIR= ${TESTSBASE}/sys/kern ATF_TESTS_C+= kern_descrip_test +ATF_TESTS_C+= ptrace_test ATF_TESTS_C+= unix_seqpacket_test TEST_METADATA.unix_seqpacket_test+= timeout="15" Added: head/tests/sys/kern/ptrace_test.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/ptrace_test.c Fri May 22 11:04:54 2015 (r283282) @@ -0,0 +1,143 @@ +/*- + * Copyright (c) 2015 John Baldwin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Verify that a parent debugger process "sees" the exit of a debugged + * process exactly once when attached via PT_TRACE_ME. + */ +ATF_TC_WITHOUT_HEAD(ptrace__parent_wait_after_trace_me); +ATF_TC_BODY(ptrace__parent_wait_after_trace_me, tc) +{ + pid_t child, wpid; + int status; + + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + /* Child process. */ + ATF_REQUIRE(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + /* Trigger a stop. */ + raise(SIGSTOP); + + exit(1); + } + + /* Parent process. */ + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(child, &status, 0); + ATF_REQUIRE(wpid == child); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); + + /* The second wait() should report the exit status. */ + wpid = waitpid(child, &status, 0); + ATF_REQUIRE(wpid == child); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 1); + + /* The child should no longer exist. */ + wpid = waitpid(child, &status, 0); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +/* + * Verify that a parent debugger process "sees" the exit of a debugged + * process exactly once when attached via PT_ATTACH. + */ +ATF_TC_WITHOUT_HEAD(ptrace__parent_wait_after_attach); +ATF_TC_BODY(ptrace__parent_wait_after_attach, tc) +{ + pid_t child, wpid; + int cpipe[2], status; + char c; + + ATF_REQUIRE(pipe(cpipe) == 0); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + /* Child process. */ + close(cpipe[0]); + + /* Wait for the parent to attach. */ + ATF_REQUIRE(read(cpipe[1], &c, sizeof(c)) == 0); + + exit(1); + } + close(cpipe[1]); + + /* Parent process. */ + + /* Attach to the child process. */ + ATF_REQUIRE(ptrace(PT_ATTACH, child, NULL, 0) == 0); + + /* The first wait() should report the SIGSTOP from PT_ATTACH. */ + wpid = waitpid(child, &status, 0); + ATF_REQUIRE(wpid == child); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); + + /* Signal the child to exit. */ + close(cpipe[0]); + + /* The second wait() should report the exit status. */ + wpid = waitpid(child, &status, 0); + ATF_REQUIRE(wpid == child); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 1); + + /* The child should no longer exist. */ + wpid = waitpid(child, &status, 0); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, ptrace__parent_wait_after_trace_me); + ATF_TP_ADD_TC(tp, ptrace__parent_wait_after_attach); + + return (atf_no_error()); +} From owner-svn-src-head@FreeBSD.ORG Fri May 22 11:09:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C580AA63; Fri, 22 May 2015 11:09:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B33901497; Fri, 22 May 2015 11:09:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MB9gHH055771; Fri, 22 May 2015 11:09:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MB9gNx055769; Fri, 22 May 2015 11:09:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505221109.t4MB9gNx055769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 22 May 2015 11:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283283 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 11:09:42 -0000 Author: jhb Date: Fri May 22 11:09:41 2015 New Revision: 283283 URL: https://svnweb.freebsd.org/changeset/base/283283 Log: Expand ktr_mask to be a 64-bit unsigned integer. The mask does not really need to be updated with atomic operations and the downside of losing races during transitions is not great (it is not marked volatile, so those races are pretty wide open as it is). Differential Revision: https://reviews.freebsd.org/D2595 Reviewed by: emaste, neel, rpaulo MFC after: 2 weeks Modified: head/sys/kern/kern_ktr.c head/sys/sys/ktr.h Modified: head/sys/kern/kern_ktr.c ============================================================================== --- head/sys/kern/kern_ktr.c Fri May 22 11:04:54 2015 (r283282) +++ head/sys/kern/kern_ktr.c Fri May 22 11:09:41 2015 (r283283) @@ -96,8 +96,8 @@ static MALLOC_DEFINE(M_KTR, "KTR", "KTR" FEATURE(ktr, "Kernel support for KTR kernel tracing facility"); volatile int ktr_idx = 0; -int ktr_mask = KTR_MASK; -int ktr_compile = KTR_COMPILE; +uint64_t ktr_mask = KTR_MASK; +uint64_t ktr_compile = KTR_COMPILE; int ktr_entries = KTR_BOOT_ENTRIES; int ktr_version = KTR_VERSION; struct ktr_entry ktr_buf_init[KTR_BOOT_ENTRIES]; @@ -109,7 +109,7 @@ static SYSCTL_NODE(_debug, OID_AUTO, ktr SYSCTL_INT(_debug_ktr, OID_AUTO, version, CTLFLAG_RD, &ktr_version, 0, "Version of the KTR interface"); -SYSCTL_UINT(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD, +SYSCTL_UQUAD(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD, &ktr_compile, 0, "Bitmask of KTR event classes compiled into the kernel"); static int @@ -162,18 +162,19 @@ SYSCTL_PROC(_debug_ktr, OID_AUTO, clear, static int sysctl_debug_ktr_mask(SYSCTL_HANDLER_ARGS) { - int mask, error; + uint64_t mask; + int error; mask = ktr_mask; - error = sysctl_handle_int(oidp, &mask, 0, req); + error = sysctl_handle_64(oidp, &mask, 0, req); if (error || !req->newptr) return (error); ktr_mask = mask; return (error); } -SYSCTL_PROC(_debug_ktr, OID_AUTO, mask, CTLTYPE_UINT|CTLFLAG_RWTUN, 0, 0, - sysctl_debug_ktr_mask, "IU", +SYSCTL_PROC(_debug_ktr, OID_AUTO, mask, CTLTYPE_U64 | CTLFLAG_RWTUN, 0, 0, + sysctl_debug_ktr_mask, "QU", "Bitmask of KTR event classes for which logging is enabled"); #if KTR_ENTRIES > KTR_BOOT_ENTRIES @@ -184,7 +185,7 @@ SYSCTL_PROC(_debug_ktr, OID_AUTO, mask, static void ktr_entries_initializer(void *dummy __unused) { - int mask; + uint64_t mask; /* Temporarily disable ktr in case malloc() is being traced. */ mask = ktr_mask; @@ -208,7 +209,8 @@ SYSINIT(ktr_entries_initializer, SI_SUB_ static int sysctl_debug_ktr_entries(SYSCTL_HANDLER_ARGS) { - int entries, error, mask; + uint64_t mask; + int entries, error; struct ktr_entry *buf, *oldbuf; entries = ktr_entries; @@ -219,7 +221,7 @@ sysctl_debug_ktr_entries(SYSCTL_HANDLER_ return (ERANGE); /* Disable ktr temporarily. */ mask = ktr_mask; - atomic_store_rel_int(&ktr_mask, 0); + ktr_mask = 0; /* Wait for threads to go idle. */ if ((error = quiesce_all_cpus("ktrent", PCATCH)) != 0) { ktr_mask = mask; @@ -235,7 +237,7 @@ sysctl_debug_ktr_entries(SYSCTL_HANDLER_ ktr_buf = buf; ktr_entries = entries; ktr_idx = 0; - atomic_store_rel_int(&ktr_mask, mask); + ktr_mask = mask; if (oldbuf != NULL) free(oldbuf, M_KTR); @@ -310,7 +312,7 @@ SYSCTL_PROC(_debug_ktr, OID_AUTO, alq_en #endif void -ktr_tracepoint(u_int mask, const char *file, int line, const char *format, +ktr_tracepoint(uint64_t mask, const char *file, int line, const char *format, u_long arg1, u_long arg2, u_long arg3, u_long arg4, u_long arg5, u_long arg6) { Modified: head/sys/sys/ktr.h ============================================================================== --- head/sys/sys/ktr.h Fri May 22 11:04:54 2015 (r283282) +++ head/sys/sys/ktr.h Fri May 22 11:09:41 2015 (r283283) @@ -62,7 +62,7 @@ struct ktr_entry { }; extern cpuset_t ktr_cpumask; -extern int ktr_mask; +extern uint64_t ktr_mask; extern int ktr_entries; extern int ktr_verbose; @@ -71,7 +71,7 @@ extern struct ktr_entry *ktr_buf; #ifdef KTR -void ktr_tracepoint(u_int mask, const char *file, int line, +void ktr_tracepoint(uint64_t mask, const char *file, int line, const char *format, u_long arg1, u_long arg2, u_long arg3, u_long arg4, u_long arg5, u_long arg6); From owner-svn-src-head@FreeBSD.ORG Fri May 22 11:59:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63CFF9A9; Fri, 22 May 2015 11:59:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 372171AF3; Fri, 22 May 2015 11:59:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MBxdPr080034; Fri, 22 May 2015 11:59:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MBxcPN080021; Fri, 22 May 2015 11:59:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505221159.t4MBxcPN080021@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 22 May 2015 11:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283285 - in head: usr.bin/ctlstat usr.sbin/ctladm usr.sbin/ctld usr.sbin/iostat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 11:59:39 -0000 Author: trasz Date: Fri May 22 11:59:37 2015 New Revision: 283285 URL: https://svnweb.freebsd.org/changeset/base/283285 Log: Advertise ctlstat(8) a little better. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/ctlstat/ctlstat.8 head/usr.sbin/ctladm/ctladm.8 head/usr.sbin/ctld/ctld.8 head/usr.sbin/iostat/iostat.8 Modified: head/usr.bin/ctlstat/ctlstat.8 ============================================================================== --- head/usr.bin/ctlstat/ctlstat.8 Fri May 22 11:20:59 2015 (r283284) +++ head/usr.bin/ctlstat/ctlstat.8 Fri May 22 11:59:37 2015 (r283285) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.bin/ctlstat/ctlstat.8#2 $ .\" $FreeBSD$ .\" -.Dd March 8, 2015 +.Dd May 22, 2015 .Dt CTLSTAT 8 .Os .Sh NAME @@ -117,6 +117,7 @@ every 10 seconds. .Xr xpt 4 , .Xr camcontrol 8 , .Xr ctladm 8 , +.Xr ctld 8 , .Xr iostat 8 .Sh AUTHORS .An Ken Merry Aq Mt ken@FreeBSD.org Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Fri May 22 11:20:59 2015 (r283284) +++ head/usr.sbin/ctladm/ctladm.8 Fri May 22 11:59:37 2015 (r283285) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd February 1, 2015 +.Dd May 22, 2015 .Dt CTLADM 8 .Os .Sh NAME @@ -1160,7 +1160,8 @@ This will result in a sense key of NOT R .Xr ctl 4 , .Xr xpt 4 , .Xr camcontrol 8 , -.Xr ctld 8 +.Xr ctld 8 , +.Xr ctlstat 8 .Sh HISTORY The .Nm Modified: head/usr.sbin/ctld/ctld.8 ============================================================================== --- head/usr.sbin/ctld/ctld.8 Fri May 22 11:20:59 2015 (r283284) +++ head/usr.sbin/ctld/ctld.8 Fri May 22 11:59:37 2015 (r283285) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2014 +.Dd May 22, 2015 .Dt CTLD 8 .Os .Sh NAME @@ -104,7 +104,8 @@ utility exits 0 on success, and >0 if an .Sh SEE ALSO .Xr ctl 4 , .Xr ctl.conf 5 , -.Xr ctladm 8 +.Xr ctladm 8 , +.Xr ctlstat 8 .Sh HISTORY The .Nm Modified: head/usr.sbin/iostat/iostat.8 ============================================================================== --- head/usr.sbin/iostat/iostat.8 Fri May 22 11:20:59 2015 (r283284) +++ head/usr.sbin/iostat/iostat.8 Fri May 22 11:59:37 2015 (r283285) @@ -56,7 +56,7 @@ .\" .\" @(#)iostat.8 8.1 (Berkeley) 6/6/93 .\" -.Dd December 15, 2012 +.Dd May 22, 2015 .Dt IOSTAT 8 .Os .Sh NAME @@ -494,6 +494,7 @@ flags are given, the TTY and CPU display .Xr ps 1 , .Xr systat 1 , .Xr devstat 3 , +.Xr ctlstat 8 , .Xr gstat 8 , .Xr pstat 8 , .Xr vmstat 8 From owner-svn-src-head@FreeBSD.ORG Fri May 22 12:01:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A981D04; Fri, 22 May 2015 12:01:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 192DB1BED; Fri, 22 May 2015 12:01:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MC1TYO084079; Fri, 22 May 2015 12:01:29 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MC1Tdd084077; Fri, 22 May 2015 12:01:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505221201.t4MC1Tdd084077@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 22 May 2015 12:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283286 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 12:01:30 -0000 Author: trasz Date: Fri May 22 12:01:29 2015 New Revision: 283286 URL: https://svnweb.freebsd.org/changeset/base/283286 Log: Start documenting ctl(4) sysctls. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/ctl.4 Modified: head/share/man/man4/ctl.4 ============================================================================== --- head/share/man/man4/ctl.4 Fri May 22 11:59:37 2015 (r283285) +++ head/share/man/man4/ctl.4 Fri May 22 12:01:29 2015 (r283286) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd April 8, 2015 +.Dd May 22, 2015 .Dt CTL 4 .Os .Sh NAME @@ -84,6 +84,22 @@ All I/O handled in-kernel, no userland c .El .Pp It also serves as a kernel component of the native iSCSI target. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va kern.cam.ctl.iscsi.maxcmdsn_delta +The number of outstanding commands to advertise to the initiator. +Technically, it's the difference between ExpCmdSN and MaxCmdSN fields +in the iSCSI PDU. +.It Va kern.cam.ctl.iscsi.ping_timeout +The number of seconds to wait for the initiator to respond to a NOP-In +PDU. +In the event that there is no response within that time the session gets +forcibly terminated. .Sh SEE ALSO .Xr ctladm 8 , .Xr ctld 8 , From owner-svn-src-head@FreeBSD.ORG Fri May 22 14:25:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 959F0A48; Fri, 22 May 2015 14:25:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 849131C4F; Fri, 22 May 2015 14:25:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MEPOFe056919; Fri, 22 May 2015 14:25:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MEPOme056918; Fri, 22 May 2015 14:25:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505221425.t4MEPOme056918@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 22 May 2015 14:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283287 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 14:25:24 -0000 Author: andrew Date: Fri May 22 14:25:23 2015 New Revision: 283287 URL: https://svnweb.freebsd.org/changeset/base/283287 Log: Add a miibus_statchg and use it to enable Gigabit mode when appropriate. MFC after: 1 week Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Fri May 22 12:01:29 2015 (r283286) +++ head/sys/arm/ti/cpsw/if_cpsw.c Fri May 22 14:25:23 2015 (r283287) @@ -113,6 +113,7 @@ static int cpsw_ioctl(struct ifnet *, u_ static int cpsw_miibus_readreg(device_t, int phy, int reg); static int cpsw_miibus_writereg(device_t, int phy, int reg, int value); +static void cpsw_miibus_statchg(device_t); /* Send/Receive packets. */ static void cpsw_intr_rx(void *arg); @@ -179,6 +180,7 @@ static device_method_t cpsw_methods[] = /* MII interface */ DEVMETHOD(miibus_readreg, cpsw_miibus_readreg), DEVMETHOD(miibus_writereg, cpsw_miibus_writereg), + DEVMETHOD(miibus_statchg, cpsw_miibus_statchg), { 0, 0 } }; @@ -1265,6 +1267,36 @@ cpsw_miibus_writereg(device_t dev, int p return 0; } +static void +cpsw_miibus_statchg(device_t dev) +{ + struct cpsw_softc *sc = device_get_softc(dev); + uint32_t mac_control; + int i; + + CPSW_DEBUGF(("")); + + for (i = 0; i < 2; i++) { + mac_control = cpsw_read_4(sc, CPSW_SL_MACCONTROL(i)); + mac_control &= ~(1 << 15 | 1 << 7); + + switch(IFM_SUBTYPE(sc->mii->mii_media_active)) { + case IFM_1000_SX: + case IFM_1000_LX: + case IFM_1000_CX: + case IFM_1000_T: + mac_control |= 1 << 7; + break; + + default: + mac_control |= 1 << 15; + break; + } + + cpsw_write_4(sc, CPSW_SL_MACCONTROL(i), mac_control); + } +} + /* * * Transmit/Receive Packets. From owner-svn-src-head@FreeBSD.ORG Fri May 22 15:57:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B050A1D9; Fri, 22 May 2015 15:57:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EFDF17AC; Fri, 22 May 2015 15:57:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MFvhMk002368; Fri, 22 May 2015 15:57:43 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MFvhI4002367; Fri, 22 May 2015 15:57:43 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201505221557.t4MFvhI4002367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 22 May 2015 15:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283288 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 15:57:43 -0000 Author: allanjude (doc committer) Date: Fri May 22 15:57:42 2015 New Revision: 283288 URL: https://svnweb.freebsd.org/changeset/base/283288 Log: Fix a syntax error in bsdinstall/zfsboot Differential Revision: https://reviews.freebsd.org/D2571 Submitted by: Michael Dexter Approved by: dteske MFC after: 1 week X-MFC-With: r283023, r282443 Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Fri May 22 14:25:23 2015 (r283287) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Fri May 22 15:57:42 2015 (r283288) @@ -974,7 +974,7 @@ zfs_create_diskpart() /dev/$disk${swappart}.eli none swap sw 0 0 \ $BSDINSTALL_TMPETC/fstab || return $FAILURE - elif [ ${swapsize:-0} -eq 0 ] + elif [ ${swapsize:-0} -eq 0 ]; then # If swap is 0 sized, don't add it to fstab else f_eval_catch $funcname printf "$PRINTF_FSTAB" \ From owner-svn-src-head@FreeBSD.ORG Fri May 22 16:48:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43DB996; Fri, 22 May 2015 16:48:02 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA2AB1D85; Fri, 22 May 2015 16:48:01 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Yvq72-0000Ws-Tu; Fri, 22 May 2015 19:47:56 +0300 Date: Fri, 22 May 2015 19:47:56 +0300 From: Slawa Olhovchenkov To: Benjamin Kaduk Cc: Benjamin Kaduk , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r279603 - in head: bin/rcp usr.bin/rlogin usr.bin/rsh Message-ID: <20150522164756.GL1394@zxy.spb.ru> References: <48981079-C9B7-411D-87A3-5A8F04924314@FreeBSD.org> <20150305141334.GX48476@zxy.spb.ru> <63BD8258-D2C9-4C94-8A54-63AA104871D9@FreeBSD.org> <20150305144056.GY48476@zxy.spb.ru> <20150305151732.GA48476@zxy.spb.ru> <20150308133821.GF48476@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 16:48:02 -0000 On Wed, Mar 11, 2015 at 12:27:15AM -0400, Benjamin Kaduk wrote: > > > should never type my password at something which is not a trusted local > > > binary. > > > > As I know, you can't use kerberos outside controled perimeter (with > > working NTP sync, revers DNS and etc). I.e. from random [network] > > place you can't run kinit on local machine [notebook] and use kerberos > > to ssh login. > > > > For may case this is requirement. > > I use kinit on my local machine and use kerberos to ssh login from all > sorts of weird environments. The use of reverse DNS can be disabled; > libkrb5 can store a time offset to correct for some classes of clock > errors. > > Maybe your KDC is firewalled off? I know that trying to reason with > sysadmins can frequently be a lost cause, but the kerberos protocol is > explicitly designed to run over an untrusted network. Ok, now I re-establish kerberoised setup -- antecedent will be lost -- and re-check assertion. Currently I don't see reverse DNS dependency. I see dependency on forward DNS -- kerberos library (?) can't handly IPv4 address correctly -- interpretation as "domain's" and stripping first octet. As result -- can't find krbtgt/. This is problem, but this is different and minor problem. Can you advise some way for refreshing tickets? Or best way -- use initilay long expiration time? For use with kerberoised NFSv4, too. > > > is going off and getting a ticket, sure (and hopefully validating it > > > against the host keytab to avoid the Zanarotti attack!), but it is > > > starting with your password. That is completely at odds with how Kerberos > > > is intended to be used. > > > > Sorry, I don't understand you. Can explain? > > The basic idea of the attack is that if I know the password that sshd is > trying to validate, I can fake a response from the KDC which is encrypted > in the (key derived from that password) and make that response look like a > valid TGT. In order to tell that the TGT it receives is actually from the > KDC, and not the attacker, sshd has to use that TGT to get a service > ticket it can validate (i.e., a service ticket for itself) And what is wrong? As I read requirement is validating KDC response with service identity host/@ from /etc/krb5.keytab. PAM don't do this? Or I something missing? From owner-svn-src-head@FreeBSD.ORG Fri May 22 17:01:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9DB6571; Fri, 22 May 2015 17:01:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A64DC1EC6; Fri, 22 May 2015 17:01:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MH1ivW037107; Fri, 22 May 2015 17:01:44 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MH1itG037106; Fri, 22 May 2015 17:01:44 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201505221701.t4MH1itG037106@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 22 May 2015 17:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283290 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 17:01:44 -0000 Author: sbruno Date: Fri May 22 17:01:43 2015 New Revision: 283290 URL: https://svnweb.freebsd.org/changeset/base/283290 Log: Bump rx_overruns when indicated by the ICR mask. PR: 199716 MFC after: 3 days Sponsored by: Limelight Networks Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Fri May 22 16:38:55 2015 (r283289) +++ head/sys/dev/e1000/if_em.c Fri May 22 17:01:43 2015 (r283290) @@ -1609,6 +1609,9 @@ em_msix_link(void *arg) ++adapter->link_irq; reg_icr = E1000_READ_REG(&adapter->hw, E1000_ICR); + if (reg_icr & E1000_ICR_RXO) + adapter->rx_overruns++; + if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) { adapter->hw.mac.get_link_status = 1; em_handle_link(adapter, 0); From owner-svn-src-head@FreeBSD.ORG Fri May 22 17:05:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F03087E; Fri, 22 May 2015 17:05:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19C031FC7; Fri, 22 May 2015 17:05:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MH5g3a037907; Fri, 22 May 2015 17:05:42 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MH5Lp1037689; Fri, 22 May 2015 17:05:21 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201505221705.t4MH5Lp1037689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 22 May 2015 17:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283291 - in head/sys: amd64/amd64 amd64/vmm/io arm/amlogic/aml8726 arm/freescale/imx cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs cddl/dev/prof... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 17:05:43 -0000 Author: jkim Date: Fri May 22 17:05:21 2015 New Revision: 283291 URL: https://svnweb.freebsd.org/changeset/base/283291 Log: CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent. Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/amd64/amd64/mp_watchdog.c head/sys/amd64/vmm/io/vatpit.c head/sys/arm/amlogic/aml8726/aml8726_rng.c head/sys/arm/freescale/imx/imx_sdhci.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/dev/profile/profile.c head/sys/compat/ndis/subr_ntoskrnl.c head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c head/sys/contrib/vchiq/interface/compat/vchi_bsd.c head/sys/dev/acpica/acpi.c head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c head/sys/dev/ath/if_ath.c head/sys/dev/ce/if_ce.c head/sys/dev/cp/if_cp.c head/sys/dev/ctau/if_ct.c head/sys/dev/cx/if_cx.c head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c head/sys/dev/cxgbe/t4_main.c head/sys/dev/dcons/dcons_os.c head/sys/dev/drm2/drm_irq.c head/sys/dev/drm2/i915/intel_display.c head/sys/dev/glxsb/glxsb.c head/sys/dev/gxemul/cons/gxemul_cons.c head/sys/dev/hifn/hifn7751.c head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c head/sys/dev/if_ndis/if_ndis.c head/sys/dev/isci/isci_io_request.c head/sys/dev/mfi/mfi.c head/sys/dev/mwl/if_mwl.c head/sys/dev/nand/nandsim_chip.c head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/nxge/if_nxge.c head/sys/dev/oce/oce_if.c head/sys/dev/patm/if_patm_attach.c head/sys/dev/qlxgb/qla_os.c head/sys/dev/qlxgbe/ql_os.c head/sys/dev/qlxge/qls_os.c head/sys/dev/rndtest/rndtest.c head/sys/dev/safe/safe.c head/sys/dev/sfxge/sfxge_rx.c head/sys/dev/sound/midi/mpu401.c head/sys/dev/sound/pci/atiixp.c head/sys/dev/sound/pci/es137x.c head/sys/dev/sound/pci/hda/hdaa.c head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/sound/pci/via8233.c head/sys/dev/twa/tw_osl_freebsd.c head/sys/dev/tws/tws.c head/sys/dev/ubsec/ubsec.c head/sys/dev/virtio/random/virtio_random.c head/sys/dev/watchdog/watchdog.c head/sys/dev/xen/netfront/netfront.c head/sys/fs/nfs/nfs_commonport.c head/sys/gdb/gdb_cons.c head/sys/geom/gate/g_gate.c head/sys/geom/journal/g_journal.c head/sys/geom/mirror/g_mirror.c head/sys/geom/raid3/g_raid3.c head/sys/geom/sched/gs_rr.c head/sys/i386/i386/mp_watchdog.c head/sys/kern/init_main.c head/sys/kern/kern_cons.c head/sys/kern/kern_event.c head/sys/kern/kern_synch.c head/sys/kern/kern_thread.c head/sys/kern/subr_vmem.c head/sys/kern/uipc_domain.c head/sys/mips/cavium/octe/ethernet.c head/sys/mips/cavium/octeon_rnd.c head/sys/mips/nlm/dev/net/xlpge.c head/sys/mips/rmi/dev/xlr/rge.c head/sys/net/if_spppsubr.c head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_hwmp.c head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_proto.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/netgraph.h head/sys/netinet/in_pcb.c head/sys/netinet/ip_mroute.c head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_subr.c head/sys/netinet6/in6_rmx.c head/sys/netipsec/key.c head/sys/netpfil/ipfw/ip_dummynet.c head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/pf/if_pfsync.c head/sys/ofed/include/linux/timer.h head/sys/ofed/include/linux/workqueue.h head/sys/powerpc/mambo/mambo_console.c head/sys/powerpc/pseries/phyp_console.c head/sys/sys/callout.h head/sys/vm/uma_core.c head/sys/x86/x86/mca.c Modified: head/sys/amd64/amd64/mp_watchdog.c ============================================================================== --- head/sys/amd64/amd64/mp_watchdog.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/amd64/amd64/mp_watchdog.c Fri May 22 17:05:21 2015 (r283291) @@ -85,7 +85,7 @@ static void watchdog_init(void *arg) { - callout_init(&watchdog_callout, CALLOUT_MPSAFE); + callout_init(&watchdog_callout, 1); if (watchdog_cpu != -1) watchdog_change(watchdog_cpu); } Modified: head/sys/amd64/vmm/io/vatpit.c ============================================================================== --- head/sys/amd64/vmm/io/vatpit.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/amd64/vmm/io/vatpit.c Fri May 22 17:05:21 2015 (r283291) @@ -436,7 +436,7 @@ vatpit_init(struct vm *vm) vatpit->freq_sbt = bttosbt(bt); for (i = 0; i < 3; i++) { - callout_init(&vatpit->channel[i].callout, true); + callout_init(&vatpit->channel[i].callout, 1); arg = &vatpit->channel[i].callout_arg; arg->vatpit = vatpit; arg->channel_num = i; Modified: head/sys/arm/amlogic/aml8726/aml8726_rng.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_rng.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/arm/amlogic/aml8726/aml8726_rng.c Fri May 22 17:05:21 2015 (r283291) @@ -115,7 +115,7 @@ aml8726_rng_attach(device_t dev) else sc->ticks = 1; - callout_init(&sc->co, CALLOUT_MPSAFE); + callout_init(&sc->co, 1); callout_reset(&sc->co, sc->ticks, aml8726_rng_harvest, sc); return (0); Modified: head/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- head/sys/arm/freescale/imx/imx_sdhci.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/arm/freescale/imx/imx_sdhci.c Fri May 22 17:05:21 2015 (r283291) @@ -745,7 +745,7 @@ imx_sdhci_attach(device_t dev) sc->force_card_present = true; } - callout_init(&sc->r1bfix_callout, true); + callout_init(&sc->r1bfix_callout, 1); sdhci_init_slot(dev, &sc->slot, 0); bus_generic_probe(dev); Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri May 22 17:05:21 2015 (r283291) @@ -14225,8 +14225,8 @@ dtrace_state_create(struct cdev *dev) state->dts_cleaner = CYCLIC_NONE; state->dts_deadman = CYCLIC_NONE; #else - callout_init(&state->dts_cleaner, CALLOUT_MPSAFE); - callout_init(&state->dts_deadman, CALLOUT_MPSAFE); + callout_init(&state->dts_cleaner, 1); + callout_init(&state->dts_deadman, 1); #endif state->dts_vstate.dtvs_state = state; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri May 22 17:05:21 2015 (r283291) @@ -671,7 +671,7 @@ spa_add(const char *name, nvlist_t *conf mutex_exit(&cpu_lock); #else /* !illumos */ #ifdef _KERNEL - callout_init(&spa->spa_deadman_cycid, CALLOUT_MPSAFE); + callout_init(&spa->spa_deadman_cycid, 1); #endif #endif refcount_create(&spa->spa_refcount); Modified: head/sys/cddl/dev/profile/profile.c ============================================================================== --- head/sys/cddl/dev/profile/profile.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/cddl/dev/profile/profile.c Fri May 22 17:05:21 2015 (r283291) @@ -342,7 +342,7 @@ profile_create(hrtime_t interval, char * prof->prof_cyclic = CYCLIC_NONE; #else prof->prof_interval = nsec_to_sbt(interval); - callout_init(&prof->prof_cyclic, CALLOUT_MPSAFE); + callout_init(&prof->prof_cyclic, 1); #endif prof->prof_kind = kind; prof->prof_id = dtrace_probe_create(profile_id, @@ -590,7 +590,7 @@ profile_enable_omni(profile_probe_t *pro pcpu->profc_probe = prof; pcpu->profc_expected = sbinuptime() + prof->prof_interval; pcpu->profc_interval = prof->prof_interval; - callout_init(&pcpu->profc_cyclic, CALLOUT_MPSAFE); + callout_init(&pcpu->profc_cyclic, 1); callout_reset_sbt_on(&pcpu->profc_cyclic, pcpu->profc_expected, 0, profile_fire, pcpu, cpu, C_DIRECT_EXEC | C_ABSOLUTE); Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/compat/ndis/subr_ntoskrnl.c Fri May 22 17:05:21 2015 (r283291) @@ -3749,7 +3749,7 @@ ntoskrnl_insert_timer(timer, ticks) timer->k_callout = c; - callout_init(c, CALLOUT_MPSAFE); + callout_init(c, 1); callout_reset(c, ticks, ntoskrnl_timercall, timer); } Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Fri May 22 17:05:21 2015 (r283291) @@ -189,7 +189,7 @@ ipf_timer_func(arg) #if 0 softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); #endif - callout_init(&softc->ipf_slow_ch, CALLOUT_MPSAFE); + callout_init(&softc->ipf_slow_ch, 1); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); @@ -235,7 +235,7 @@ ipfattach(softc) softc->ipf_slow_ch = timeout(ipf_timer_func, softc, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); #endif - callout_init(&softc->ipf_slow_ch, CALLOUT_MPSAFE); + callout_init(&softc->ipf_slow_ch, 1); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); return 0; Modified: head/sys/contrib/vchiq/interface/compat/vchi_bsd.c ============================================================================== --- head/sys/contrib/vchiq/interface/compat/vchi_bsd.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/contrib/vchiq/interface/compat/vchi_bsd.c Fri May 22 17:05:21 2015 (r283291) @@ -80,7 +80,7 @@ void init_timer(struct timer_list *t) { mtx_init(&t->mtx, "dahdi timer lock", NULL, MTX_SPIN); - callout_init(&t->callout, CALLOUT_MPSAFE); + callout_init(&t->callout, 1); t->expires = 0; /* * function and data are not initialized intentionally: Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/acpica/acpi.c Fri May 22 17:05:21 2015 (r283291) @@ -447,7 +447,7 @@ acpi_attach(device_t dev) sc = device_get_softc(dev); sc->acpi_dev = dev; - callout_init(&sc->susp_force_to, TRUE); + callout_init(&sc->susp_force_to, 1); error = ENXIO; Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c ============================================================================== --- head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c Fri May 22 17:05:21 2015 (r283291) @@ -454,11 +454,11 @@ altera_jtag_uart_attach(struct altera_jt aju_intr_readable_enable(sc); AJU_UNLOCK(sc); } else { - callout_init(&sc->ajus_io_callout, CALLOUT_MPSAFE); + callout_init(&sc->ajus_io_callout, 1); callout_reset(&sc->ajus_io_callout, AJU_IO_POLLINTERVAL, aju_io_callout, sc); } - callout_init(&sc->ajus_ac_callout, CALLOUT_MPSAFE); + callout_init(&sc->ajus_ac_callout, 1); callout_reset(&sc->ajus_ac_callout, AJU_AC_POLLINTERVAL, aju_ac_callout, sc); return (0); Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/ath/if_ath.c Fri May 22 17:05:21 2015 (r283291) @@ -847,7 +847,7 @@ ath_attach(u_int16_t devid, struct ath_s sc->sc_ledstate = 1; sc->sc_ledon = 0; /* low true */ sc->sc_ledidle = (2700*hz)/1000; /* 2.7sec */ - callout_init(&sc->sc_ledtimer, CALLOUT_MPSAFE); + callout_init(&sc->sc_ledtimer, 1); /* * Don't setup hardware-based blinking. Modified: head/sys/dev/ce/if_ce.c ============================================================================== --- head/sys/dev/ce/if_ce.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/ce/if_ce.c Fri May 22 17:05:21 2015 (r283291) @@ -104,10 +104,6 @@ __FBSDID("$FreeBSD$"); #define CE_DEBUG2(d,s) ({if (d->chan->debug>1) {\ printf ("%s: ", d->name); printf s;}}) -#ifndef CALLOUT_MPSAFE -#define CALLOUT_MPSAFE 0 -#endif - #ifndef IF_DRAIN #define IF_DRAIN(ifq) do { \ struct mbuf *m; \ @@ -609,7 +605,7 @@ static int ce_attach (device_t dev) return (ENXIO); } #if __FreeBSD_version >= 500000 - callout_init (&led_timo[unit], CALLOUT_MPSAFE); + callout_init (&led_timo[unit], 1); #else callout_init (&led_timo[unit]); #endif @@ -661,7 +657,7 @@ static int ce_attach (device_t dev) continue; d = c->sys; - callout_init (&d->timeout_handle, CALLOUT_MPSAFE); + callout_init (&d->timeout_handle, 1); #ifdef NETGRAPH if (ng_make_node_common (&typestruct, &d->node) != 0) { printf ("%s: cannot make common node\n", d->name); @@ -2558,7 +2554,7 @@ static int ce_modevent (module_t mod, in cdevsw_add (&ce_cdevsw); #endif #if __FreeBSD_version >= 500000 - callout_init (&timeout_handle, CALLOUT_MPSAFE); + callout_init (&timeout_handle, 1); #else callout_init (&timeout_handle); #endif Modified: head/sys/dev/cp/if_cp.c ============================================================================== --- head/sys/dev/cp/if_cp.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/cp/if_cp.c Fri May 22 17:05:21 2015 (r283291) @@ -445,7 +445,7 @@ static int cp_attach (device_t dev) splx (s); return (ENXIO); } - callout_init (&led_timo[unit], CALLOUT_MPSAFE); + callout_init (&led_timo[unit], 1); error = bus_setup_intr (dev, bd->cp_irq, INTR_TYPE_NET|INTR_MPSAFE, NULL, cp_intr, bd, &bd->cp_intrhand); @@ -474,7 +474,7 @@ static int cp_attach (device_t dev) d->board = b; d->chan = c; c->sys = d; - callout_init (&d->timeout_handle, CALLOUT_MPSAFE); + callout_init (&d->timeout_handle, 1); #ifdef NETGRAPH if (ng_make_node_common (&typestruct, &d->node) != 0) { printf ("%s: cannot make common node\n", d->name); @@ -2223,7 +2223,7 @@ static int cp_modevent (module_t mod, in printf ("Failed to register ng_cp\n"); #endif ++load_count; - callout_init (&timeout_handle, CALLOUT_MPSAFE); + callout_init (&timeout_handle, 1); callout_reset (&timeout_handle, hz*5, cp_timeout, 0); break; case MOD_UNLOAD: Modified: head/sys/dev/ctau/if_ct.c ============================================================================== --- head/sys/dev/ctau/if_ct.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/ctau/if_ct.c Fri May 22 17:05:21 2015 (r283291) @@ -646,7 +646,7 @@ static int ct_attach (device_t dev) return ENXIO; } - callout_init (&led_timo[unit], CALLOUT_MPSAFE); + callout_init (&led_timo[unit], 1); s = splimp (); if (bus_setup_intr (dev, bd->irq_res, INTR_TYPE_NET|INTR_MPSAFE, @@ -685,7 +685,7 @@ static int ct_attach (device_t dev) c->sys = d; channel [b->num*NCHAN + c->num] = d; sprintf (d->name, "ct%d.%d", b->num, c->num); - callout_init (&d->timeout_handle, CALLOUT_MPSAFE); + callout_init (&d->timeout_handle, 1); #ifdef NETGRAPH if (ng_make_node_common (&typestruct, &d->node) != 0) { @@ -2162,7 +2162,7 @@ static int ct_modevent (module_t mod, in printf ("Failed to register ng_ct\n"); #endif ++load_count; - callout_init (&timeout_handle, CALLOUT_MPSAFE); + callout_init (&timeout_handle, 1); callout_reset (&timeout_handle, hz*5, ct_timeout, 0); break; case MOD_UNLOAD: Modified: head/sys/dev/cx/if_cx.c ============================================================================== --- head/sys/dev/cx/if_cx.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/cx/if_cx.c Fri May 22 17:05:21 2015 (r283291) @@ -746,7 +746,7 @@ static int cx_attach (device_t dev) return ENXIO; } b->sys = bd; - callout_init (&led_timo[b->num], CALLOUT_MPSAFE); + callout_init (&led_timo[b->num], 1); s = splhigh (); if (bus_setup_intr (dev, bd->irq_res, INTR_TYPE_NET|INTR_MPSAFE, @@ -796,7 +796,7 @@ static int cx_attach (device_t dev) case T_UNIV_RS232: case T_UNIV_RS449: case T_UNIV_V35: - callout_init (&d->timeout_handle, CALLOUT_MPSAFE); + callout_init (&d->timeout_handle, 1); #ifdef NETGRAPH if (ng_make_node_common (&typestruct, &d->node) != 0) { printf ("%s: cannot make common node\n", d->name); @@ -867,7 +867,7 @@ static int cx_attach (device_t dev) ttycreate(d->tty, TS_CALLOUT, "x%r%r", b->num, c->num); d->devt = make_dev (&cx_cdevsw, b->num*NCHAN + c->num + 64, UID_ROOT, GID_WHEEL, 0600, "cx%d", b->num*NCHAN + c->num); d->devt->si_drv1 = d; - callout_init (&d->dcd_timeout_handle, CALLOUT_MPSAFE); + callout_init (&d->dcd_timeout_handle, 1); } splx (s); @@ -2497,7 +2497,7 @@ static int cx_modevent (module_t mod, in #endif ++load_count; - callout_init (&timeout_handle, CALLOUT_MPSAFE); + callout_init (&timeout_handle, 1); callout_reset (&timeout_handle, hz*5, cx_timeout, 0); /* Software interrupt. */ swi_add(&tty_intr_event, "cx", cx_softintr, NULL, SWI_TTY, Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/cxgb/cxgb_main.c Fri May 22 17:05:21 2015 (r283291) @@ -592,7 +592,7 @@ cxgb_controller_attach(device_t dev) /* Create a periodic callout for checking adapter status */ - callout_init(&sc->cxgb_tick_ch, TRUE); + callout_init(&sc->cxgb_tick_ch, 1); if (t3_check_fw_version(sc) < 0 || force_fw_update) { /* @@ -1006,7 +1006,7 @@ cxgb_port_attach(device_t dev) device_get_unit(device_get_parent(dev)), p->port_id); PORT_LOCK_INIT(p, p->lockbuf); - callout_init(&p->link_check_ch, CALLOUT_MPSAFE); + callout_init(&p->link_check_ch, 1); TASK_INIT(&p->link_check_task, 0, check_link_status, p); /* Allocate an ifnet object and set it up */ Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/cxgb/cxgb_sge.c Fri May 22 17:05:21 2015 (r283291) @@ -1008,7 +1008,7 @@ sge_timer_cb(void *arg) int t3_sge_init_adapter(adapter_t *sc) { - callout_init(&sc->sge_timer_ch, CALLOUT_MPSAFE); + callout_init(&sc->sge_timer_ch, 1); callout_reset(&sc->sge_timer_ch, TX_RECLAIM_PERIOD, sge_timer_cb, sc); TASK_INIT(&sc->slow_intr_task, 0, sge_slow_intr_handler, sc); return (0); Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Fri May 22 17:05:21 2015 (r283291) @@ -163,7 +163,7 @@ start_ep_timer(struct iwch_ep *ep) * XXX this looks racy */ get_ep(&ep->com); - callout_init(&ep->timer, TRUE); + callout_init(&ep->timer, 1); } callout_reset(&ep->timer, ep_timeout_secs * hz, ep_timeout, ep); } @@ -1307,7 +1307,7 @@ iwch_connect(struct iw_cm_id *cm_id, str err = (-ENOMEM); goto out; } - callout_init(&ep->timer, TRUE); + callout_init(&ep->timer, 1); ep->plen = conn_param->private_data_len; if (ep->plen) memcpy(ep->mpa_pkt + sizeof(struct mpa_message), @@ -1598,7 +1598,7 @@ process_newconn(struct iwch_ep *parent_e free(remote, M_SONAME); get_ep(&parent_ep->com); child_ep->parent_ep = parent_ep; - callout_init(&child_ep->timer, TRUE); + callout_init(&child_ep->timer, 1); state_set(&child_ep->com, MPA_REQ_WAIT); start_ep_timer(child_ep); Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Fri May 22 17:05:21 2015 (r283291) @@ -906,7 +906,7 @@ static struct ib_qp *iwch_create_qp(stru insert_mmap(ucontext, mm2); } qhp->ibqp.qp_num = qhp->wq.qpid; - callout_init(&(qhp->timer), TRUE); + callout_init(&(qhp->timer), 1); CTR6(KTR_IW_CXGB, "sq_num_entries %d, rq_num_entries %d " "qpid 0x%0x qhp %p dma_addr 0x%llx size %d", qhp->attr.sq_num_entries, qhp->attr.rq_num_entries, Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/cxgbe/t4_main.c Fri May 22 17:05:21 2015 (r283291) @@ -613,7 +613,7 @@ t4_attach(device_t dev) mtx_init(&sc->sfl_lock, "starving freelists", 0, MTX_DEF); TAILQ_INIT(&sc->sfl); - callout_init(&sc->sfl_callout, CALLOUT_MPSAFE); + callout_init(&sc->sfl_callout, 1); mtx_init(&sc->regwin_lock, "register and memory window", 0, MTX_DEF); @@ -1082,7 +1082,7 @@ cxgbe_attach(device_t dev) pi->ifp = ifp; ifp->if_softc = pi; - callout_init(&pi->tick, CALLOUT_MPSAFE); + callout_init(&pi->tick, 1); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; Modified: head/sys/dev/dcons/dcons_os.c ============================================================================== --- head/sys/dev/dcons/dcons_os.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/dcons/dcons_os.c Fri May 22 17:05:21 2015 (r283291) @@ -374,7 +374,7 @@ dcons_attach(void) dcons_attach_port(DCONS_CON, "dcons", 0); dcons_attach_port(DCONS_GDB, "dgdb", DC_GDB); - callout_init(&dcons_callout, CALLOUT_MPSAFE); + callout_init(&dcons_callout, 1); polltime = hz / poll_hz; callout_reset(&dcons_callout, polltime, dcons_timeout, NULL); return(0); Modified: head/sys/dev/drm2/drm_irq.c ============================================================================== --- head/sys/dev/drm2/drm_irq.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/drm2/drm_irq.c Fri May 22 17:05:21 2015 (r283291) @@ -210,7 +210,7 @@ int drm_vblank_init(struct drm_device *d { int i, ret = -ENOMEM; - callout_init(&dev->vblank_disable_callout, CALLOUT_MPSAFE); + callout_init(&dev->vblank_disable_callout, 1); mtx_init(&dev->vbl_lock, "drmvbl", NULL, MTX_DEF); mtx_init(&dev->vblank_time_lock, "drmvtl", NULL, MTX_DEF); Modified: head/sys/dev/drm2/i915/intel_display.c ============================================================================== --- head/sys/dev/drm2/i915/intel_display.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/drm2/i915/intel_display.c Fri May 22 17:05:21 2015 (r283291) @@ -6449,7 +6449,7 @@ static void intel_crtc_init(struct drm_d intel_crtc->busy = false; - callout_init(&intel_crtc->idle_callout, CALLOUT_MPSAFE); + callout_init(&intel_crtc->idle_callout, 1); } int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data, @@ -7038,7 +7038,7 @@ void intel_modeset_init(struct drm_devic intel_setup_outputs(dev); TASK_INIT(&dev_priv->idle_task, 0, intel_idle_update, dev_priv); - callout_init(&dev_priv->idle_callout, CALLOUT_MPSAFE); + callout_init(&dev_priv->idle_callout, 1); } void intel_modeset_gem_init(struct drm_device *dev) Modified: head/sys/dev/glxsb/glxsb.c ============================================================================== --- head/sys/dev/glxsb/glxsb.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/glxsb/glxsb.c Fri May 22 17:05:21 2015 (r283291) @@ -331,7 +331,7 @@ glxsb_attach(device_t dev) sc->sc_rnghz = hz / 100; else sc->sc_rnghz = 1; - callout_init(&sc->sc_rngco, CALLOUT_MPSAFE); + callout_init(&sc->sc_rngco, 1); glxsb_rnd(sc); return (0); Modified: head/sys/dev/gxemul/cons/gxemul_cons.c ============================================================================== --- head/sys/dev/gxemul/cons/gxemul_cons.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/gxemul/cons/gxemul_cons.c Fri May 22 17:05:21 2015 (r283291) @@ -279,7 +279,7 @@ gxemul_cons_ttyinit(void *unused) tp = tty_alloc(&gxemul_cons_ttydevsw, NULL); tty_init_console(tp, 0); tty_makedev(tp, NULL, "%s", "ttyu0"); - callout_init(&gxemul_cons_callout, CALLOUT_MPSAFE); + callout_init(&gxemul_cons_callout, 1); callout_reset(&gxemul_cons_callout, gxemul_cons_polltime, gxemul_cons_timeout, tp); Modified: head/sys/dev/hifn/hifn7751.c ============================================================================== --- head/sys/dev/hifn/hifn7751.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/hifn/hifn7751.c Fri May 22 17:05:21 2015 (r283291) @@ -589,7 +589,7 @@ hifn_attach(device_t dev) if (sc->sc_flags & (HIFN_HAS_PUBLIC | HIFN_HAS_RNG)) hifn_init_pubrng(sc); - callout_init(&sc->sc_tickto, CALLOUT_MPSAFE); + callout_init(&sc->sc_tickto, 1); callout_reset(&sc->sc_tickto, hz, hifn_tick, sc); return (0); @@ -765,7 +765,7 @@ hifn_init_pubrng(struct hifn_softc *sc) sc->sc_rnghz = hz / 100; else sc->sc_rnghz = 1; - callout_init(&sc->sc_rngto, CALLOUT_MPSAFE); + callout_init(&sc->sc_rngto, 1); callout_reset(&sc->sc_rngto, sc->sc_rnghz, hifn_rng, sc); } Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri May 22 17:05:21 2015 (r283291) @@ -1473,7 +1473,7 @@ storvsc_action(struct cam_sim *sim, unio } if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { - callout_init(&reqp->callout, CALLOUT_MPSAFE); + callout_init(&reqp->callout, 1); callout_reset_sbt(&reqp->callout, SBT_1MS * ccb->ccb_h.timeout, 0, storvsc_timeout, reqp, 0); Modified: head/sys/dev/if_ndis/if_ndis.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/if_ndis/if_ndis.c Fri May 22 17:05:21 2015 (r283291) @@ -558,7 +558,7 @@ ndis_attach(dev) InitializeListHead(&sc->ndis_shlist); InitializeListHead(&sc->ndisusb_tasklist); InitializeListHead(&sc->ndisusb_xferdonelist); - callout_init(&sc->ndis_stat_callout, CALLOUT_MPSAFE); + callout_init(&sc->ndis_stat_callout, 1); if (sc->ndis_iftype == PCMCIABus) { error = ndis_alloc_amem(sc); @@ -734,7 +734,7 @@ ndis_attach(dev) uint32_t arg; int r; - callout_init(&sc->ndis_scan_callout, CALLOUT_MPSAFE); + callout_init(&sc->ndis_scan_callout, 1); ifp->if_ioctl = ndis_ioctl_80211; ic->ic_ifp = ifp; Modified: head/sys/dev/isci/isci_io_request.c ============================================================================== --- head/sys/dev/isci/isci_io_request.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/isci/isci_io_request.c Fri May 22 17:05:21 2015 (r283291) @@ -680,7 +680,7 @@ isci_request_construct(struct ISCI_REQUE request->dma_tag = io_buffer_dma_tag; request->physical_address = physical_address; bus_dmamap_create(request->dma_tag, 0, &request->dma_map); - callout_init(&request->timer, CALLOUT_MPSAFE); + callout_init(&request->timer, 1); } static void Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/mfi/mfi.c Fri May 22 17:05:21 2015 (r283291) @@ -780,7 +780,7 @@ mfi_attach(struct mfi_softc *sc) bus_generic_attach(sc->mfi_dev); /* Start the timeout watchdog */ - callout_init(&sc->mfi_watchdog_callout, CALLOUT_MPSAFE); + callout_init(&sc->mfi_watchdog_callout, 1); callout_reset(&sc->mfi_watchdog_callout, mfi_cmd_timeout * hz, mfi_timeout, sc); Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/mwl/if_mwl.c Fri May 22 17:05:21 2015 (r283291) @@ -363,7 +363,7 @@ mwl_attach(uint16_t devid, struct mwl_so if (error != 0) /* NB: mwl_setupdma prints msg */ goto bad1; - callout_init(&sc->sc_timer, CALLOUT_MPSAFE); + callout_init(&sc->sc_timer, 1); callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); sc->sc_tq = taskqueue_create("mwl_taskq", M_NOWAIT, Modified: head/sys/dev/nand/nandsim_chip.c ============================================================================== --- head/sys/dev/nand/nandsim_chip.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/nand/nandsim_chip.c Fri May 22 17:05:21 2015 (r283291) @@ -94,7 +94,7 @@ nandsim_chip_init(struct nandsim_softc* return (NULL); mtx_init(&chip->ns_lock, "nandsim lock", NULL, MTX_DEF); - callout_init(&chip->ns_callout, CALLOUT_MPSAFE); + callout_init(&chip->ns_callout, 1); STAILQ_INIT(&chip->nandsim_events); chip->chip_num = chip_num; Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Fri May 22 17:05:21 2015 (r283291) @@ -555,8 +555,8 @@ ntb_transport_init_queue(struct ntb_netd qp->tx_index = 0; callout_init(&qp->link_work, 0); - callout_init(&qp->queue_full, CALLOUT_MPSAFE); - callout_init(&qp->rx_full, CALLOUT_MPSAFE); + callout_init(&qp->queue_full, 1); + callout_init(&qp->rx_full, 1); mtx_init(&qp->ntb_rx_pend_q_lock, "ntb rx pend q", NULL, MTX_SPIN); mtx_init(&qp->ntb_rx_free_q_lock, "ntb rx free q", NULL, MTX_SPIN); Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Fri May 22 17:05:21 2015 (r283291) @@ -266,8 +266,8 @@ ntb_attach(device_t device) ntb->features = p->features; /* Heartbeat timer for NTB_SOC since there is no link interrupt */ - callout_init(&ntb->heartbeat_timer, CALLOUT_MPSAFE); - callout_init(&ntb->lr_timer, CALLOUT_MPSAFE); + callout_init(&ntb->heartbeat_timer, 1); + callout_init(&ntb->lr_timer, 1); DETACH_ON_ERROR(ntb_map_pci_bars(ntb)); DETACH_ON_ERROR(ntb_initialize_hw(ntb)); Modified: head/sys/dev/nxge/if_nxge.c ============================================================================== --- head/sys/dev/nxge/if_nxge.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/nxge/if_nxge.c Fri May 22 17:05:21 2015 (r283291) @@ -1744,7 +1744,7 @@ xge_device_init(xge_lldev_t *lldev, xge_ return; /* Initializing timer */ - callout_init(&lldev->timer, CALLOUT_MPSAFE); + callout_init(&lldev->timer, 1); xge_trace(XGE_TRACE, "Set MTU size"); status = xge_hal_device_mtu_set(hldev, ifnetp->if_mtu); Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/oce/oce_if.c Fri May 22 17:05:21 2015 (r283291) @@ -341,7 +341,7 @@ oce_attach(device_t dev) oce_add_sysctls(sc); - callout_init(&sc->timer, CALLOUT_MPSAFE); + callout_init(&sc->timer, 1); rc = callout_reset(&sc->timer, 2 * hz, oce_local_timer, sc); if (rc) goto stats_free; Modified: head/sys/dev/patm/if_patm_attach.c ============================================================================== --- head/sys/dev/patm/if_patm_attach.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/patm/if_patm_attach.c Fri May 22 17:05:21 2015 (r283291) @@ -208,7 +208,7 @@ patm_attach(device_t dev) mtx_init(&sc->tst_lock, "tst lock", NULL, MTX_DEF); cv_init(&sc->vcc_cv, "vcc_close"); - callout_init(&sc->tst_callout, CALLOUT_MPSAFE); + callout_init(&sc->tst_callout, 1); sysctl_ctx_init(&sc->sysctl_ctx); Modified: head/sys/dev/qlxgb/qla_os.c ============================================================================== --- head/sys/dev/qlxgb/qla_os.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/qlxgb/qla_os.c Fri May 22 17:05:21 2015 (r283291) @@ -378,7 +378,7 @@ qla_pci_attach(device_t dev) ha->flags.qla_watchdog_active = 1; ha->flags.qla_watchdog_pause = 1; - callout_init(&ha->tx_callout, TRUE); + callout_init(&ha->tx_callout, 1); /* create ioctl device interface */ if (qla_make_cdev(ha)) { Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/qlxgbe/ql_os.c Fri May 22 17:05:21 2015 (r283291) @@ -419,7 +419,7 @@ qla_pci_attach(device_t dev) taskqueue_start_threads(&ha->tx_tq, 1, PI_NET, "%s txq", device_get_nameunit(ha->pci_dev)); - callout_init(&ha->tx_callout, TRUE); + callout_init(&ha->tx_callout, 1); ha->flags.qla_callout_init = 1; /* create ioctl device interface */ Modified: head/sys/dev/qlxge/qls_os.c ============================================================================== --- head/sys/dev/qlxge/qls_os.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/qlxge/qls_os.c Fri May 22 17:05:21 2015 (r283291) @@ -453,7 +453,7 @@ qls_pci_attach(device_t dev) taskqueue_start_threads(&ha->tx_tq, 1, PI_NET, "%s txq", device_get_nameunit(ha->pci_dev)); - callout_init(&ha->tx_callout, TRUE); + callout_init(&ha->tx_callout, 1); ha->flags.qla_callout_init = 1; /* create ioctl device interface */ Modified: head/sys/dev/rndtest/rndtest.c ============================================================================== --- head/sys/dev/rndtest/rndtest.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/rndtest/rndtest.c Fri May 22 17:05:21 2015 (r283291) @@ -98,7 +98,7 @@ rndtest_attach(device_t dev) #if __FreeBSD_version < 500000 callout_init(&rsp->rs_to); #else - callout_init(&rsp->rs_to, CALLOUT_MPSAFE); + callout_init(&rsp->rs_to, 1); #endif } else device_printf(dev, "rndtest_init: no memory for state block\n"); Modified: head/sys/dev/safe/safe.c ============================================================================== --- head/sys/dev/safe/safe.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/safe/safe.c Fri May 22 17:05:21 2015 (r283291) @@ -425,7 +425,7 @@ safe_attach(device_t dev) #endif safe_rng_init(sc); - callout_init(&sc->sc_rngto, CALLOUT_MPSAFE); + callout_init(&sc->sc_rngto, 1); callout_reset(&sc->sc_rngto, hz*safe_rnginterval, safe_rng, sc); } #endif /* SAFE_NO_RNG */ Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/sfxge/sfxge_rx.c Fri May 22 17:05:21 2015 (r283291) @@ -1217,7 +1217,7 @@ sfxge_rx_qinit(struct sfxge_softc *sc, u M_SFXGE, M_WAITOK | M_ZERO); sfxge_lro_init(rxq); - callout_init(&rxq->refill_callout, B_TRUE); + callout_init(&rxq->refill_callout, 1); rxq->init_state = SFXGE_RXQ_INITIALIZED; Modified: head/sys/dev/sound/midi/mpu401.c ============================================================================== --- head/sys/dev/sound/midi/mpu401.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/sound/midi/mpu401.c Fri May 22 17:05:21 2015 (r283291) @@ -185,7 +185,7 @@ mpu401_init(kobj_class_t cls, void *cook kobj_init((kobj_t)m, cls); - callout_init(&m->timer, CALLOUT_MPSAFE); + callout_init(&m->timer, 1); m->si = softintr; m->cookie = cookie; Modified: head/sys/dev/sound/pci/atiixp.c ============================================================================== --- head/sys/dev/sound/pci/atiixp.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/sound/pci/atiixp.c Fri May 22 17:05:21 2015 (r283291) @@ -1194,7 +1194,7 @@ atiixp_pci_attach(device_t dev) sc->lock = snd_mtxcreate(device_get_nameunit(dev), "snd_atiixp softc"); sc->dev = dev; - callout_init(&sc->poll_timer, CALLOUT_MPSAFE); + callout_init(&sc->poll_timer, 1); sc->poll_ticks = 1; if (resource_int_value(device_get_name(sc->dev), Modified: head/sys/dev/sound/pci/es137x.c ============================================================================== --- head/sys/dev/sound/pci/es137x.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/sound/pci/es137x.c Fri May 22 17:05:21 2015 (r283291) @@ -1741,7 +1741,7 @@ es_pci_attach(device_t dev) es->st = rman_get_bustag(es->reg); es->sh = rman_get_bushandle(es->reg); - callout_init(&es->poll_timer, CALLOUT_MPSAFE); + callout_init(&es->poll_timer, 1); es->poll_ticks = 1; if (resource_int_value(device_get_name(dev), Modified: head/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/sound/pci/hda/hdaa.c Fri May 22 17:05:21 2015 (r283291) @@ -6592,7 +6592,7 @@ hdaa_attach(device_t dev) devinfo->newquirks = -1; devinfo->newgpio = -1; devinfo->newgpo = -1; - callout_init(&devinfo->poll_jack, CALLOUT_MPSAFE); + callout_init(&devinfo->poll_jack, 1); devinfo->poll_ival = hz; hdaa_lock(devinfo); Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/sound/pci/hda/hdac.c Fri May 22 17:05:21 2015 (r283291) @@ -1110,7 +1110,7 @@ hdac_attach(device_t dev) sc->lock = snd_mtxcreate(device_get_nameunit(dev), "HDA driver mutex"); sc->dev = dev; TASK_INIT(&sc->unsolq_task, 0, hdac_unsolq_task, sc); - callout_init(&sc->poll_callout, CALLOUT_MPSAFE); + callout_init(&sc->poll_callout, 1); for (i = 0; i < HDAC_CODEC_MAX; i++) sc->codecs[i].dev = NULL; if (devid >= 0) { Modified: head/sys/dev/sound/pci/via8233.c ============================================================================== --- head/sys/dev/sound/pci/via8233.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/sound/pci/via8233.c Fri May 22 17:05:21 2015 (r283291) @@ -1175,7 +1175,7 @@ via_attach(device_t dev) "snd_via8233 softc"); via->dev = dev; - callout_init(&via->poll_timer, CALLOUT_MPSAFE); + callout_init(&via->poll_timer, 1); via->poll_ticks = 1; if (resource_int_value(device_get_name(dev), Modified: head/sys/dev/twa/tw_osl_freebsd.c ============================================================================== --- head/sys/dev/twa/tw_osl_freebsd.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/twa/tw_osl_freebsd.c Fri May 22 17:05:21 2015 (r283291) @@ -423,8 +423,8 @@ twa_attach(device_t dev) } sc->watchdog_index = 0; - callout_init(&(sc->watchdog_callout[0]), CALLOUT_MPSAFE); - callout_init(&(sc->watchdog_callout[1]), CALLOUT_MPSAFE); + callout_init(&(sc->watchdog_callout[0]), 1); + callout_init(&(sc->watchdog_callout[1]), 1); callout_reset(&(sc->watchdog_callout[0]), 5*hz, twa_watchdog, &sc->ctlr_handle); return(0); Modified: head/sys/dev/tws/tws.c ============================================================================== --- head/sys/dev/tws/tws.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/tws/tws.c Fri May 22 17:05:21 2015 (r283291) @@ -198,7 +198,7 @@ tws_attach(device_t dev) mtx_init( &sc->sim_lock, "tws_sim_lock", NULL, MTX_DEF); mtx_init( &sc->gen_lock, "tws_gen_lock", NULL, MTX_DEF); mtx_init( &sc->io_lock, "tws_io_lock", NULL, MTX_DEF | MTX_RECURSE); - callout_init(&sc->stats_timer, CALLOUT_MPSAFE); + callout_init(&sc->stats_timer, 1); if ( tws_init_trace_q(sc) == FAILURE ) printf("trace init failure\n"); @@ -719,7 +719,7 @@ tws_init_reqs(struct tws_softc *sc, u_in sc->reqs[i].cmd_pkt->hdr.header_desc.size_header = 128; - callout_init(&sc->reqs[i].timeout, CALLOUT_MPSAFE); + callout_init(&sc->reqs[i].timeout, 1); sc->reqs[i].state = TWS_REQ_STATE_FREE; if ( i >= TWS_RESERVED_REQS ) tws_q_insert_tail(sc, &sc->reqs[i], TWS_FREE_Q); Modified: head/sys/dev/ubsec/ubsec.c ============================================================================== --- head/sys/dev/ubsec/ubsec.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/ubsec/ubsec.c Fri May 22 17:05:21 2015 (r283291) @@ -456,7 +456,7 @@ ubsec_attach(device_t dev) sc->sc_rnghz = hz / 100; else sc->sc_rnghz = 1; - callout_init(&sc->sc_rngto, CALLOUT_MPSAFE); + callout_init(&sc->sc_rngto, 1); callout_reset(&sc->sc_rngto, sc->sc_rnghz, ubsec_rng, sc); skip_rng: ; Modified: head/sys/dev/virtio/random/virtio_random.c ============================================================================== --- head/sys/dev/virtio/random/virtio_random.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/virtio/random/virtio_random.c Fri May 22 17:05:21 2015 (r283291) @@ -129,7 +129,7 @@ vtrnd_attach(device_t dev) sc = device_get_softc(dev); sc->vtrnd_dev = dev; - callout_init(&sc->vtrnd_callout, CALLOUT_MPSAFE); + callout_init(&sc->vtrnd_callout, 1); virtio_set_feature_desc(dev, vtrnd_feature_desc); vtrnd_negotiate_features(sc); Modified: head/sys/dev/watchdog/watchdog.c ============================================================================== --- head/sys/dev/watchdog/watchdog.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/watchdog/watchdog.c Fri May 22 17:05:21 2015 (r283291) @@ -389,8 +389,8 @@ watchdog_modevent(module_t mod __unused, { switch(type) { case MOD_LOAD: - callout_init(&wd_pretimeo_handle, true); - callout_init(&wd_softtimeo_handle, true); + callout_init(&wd_pretimeo_handle, 1); + callout_init(&wd_softtimeo_handle, 1); wd_dev = make_dev(&wd_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, _PATH_WATCHDOG); return 0; Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/dev/xen/netfront/netfront.c Fri May 22 17:05:21 2015 (r283291) @@ -2092,7 +2092,7 @@ create_netdev(device_t dev) ifp->if_hw_tsomaxsegsize = PAGE_SIZE; ether_ifattach(ifp, np->mac); - callout_init(&np->xn_stat_ch, CALLOUT_MPSAFE); + callout_init(&np->xn_stat_ch, 1); netfront_carrier_off(np); return (0); Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/fs/nfs/nfs_commonport.c Fri May 22 17:05:21 2015 (r283291) @@ -589,7 +589,7 @@ nfscommon_modevent(module_t mod, int typ mtx_init(&nfs_req_mutex, "nfs_req_mutex", NULL, MTX_DEF); mtx_init(&nfsrv_nfsuserdsock.nr_mtx, "nfsuserd", NULL, MTX_DEF); - callout_init(&newnfsd_callout, CALLOUT_MPSAFE); + callout_init(&newnfsd_callout, 1); newnfs_init(); nfsd_call_nfscommon = nfssvc_nfscommon; loaded = 1; Modified: head/sys/gdb/gdb_cons.c ============================================================================== --- head/sys/gdb/gdb_cons.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/gdb/gdb_cons.c Fri May 22 17:05:21 2015 (r283291) @@ -76,7 +76,7 @@ gdb_cninit(struct consdev *cp) /* setup tx buffer and callout */ if (c->npending == -1) { c->npending = 0; - callout_init(&c->flush, CALLOUT_MPSAFE); + callout_init(&c->flush, 1); cp->cn_arg = c; } } Modified: head/sys/geom/gate/g_gate.c ============================================================================== --- head/sys/geom/gate/g_gate.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/geom/gate/g_gate.c Fri May 22 17:05:21 2015 (r283291) @@ -486,7 +486,7 @@ g_gate_create(struct g_gate_ctl_create * if (sc->sc_queue_size > G_GATE_MAX_QUEUE_SIZE) sc->sc_queue_size = G_GATE_MAX_QUEUE_SIZE; sc->sc_timeout = ggio->gctl_timeout; - callout_init(&sc->sc_callout, CALLOUT_MPSAFE); + callout_init(&sc->sc_callout, 1); mtx_lock(&g_gate_units_lock); sc->sc_unit = g_gate_getunit(ggio->gctl_unit, &error); Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/geom/journal/g_journal.c Fri May 22 17:05:21 2015 (r283291) @@ -2314,7 +2314,7 @@ g_journal_create(struct g_class *mp, str sc->sc_rootmount = root_mount_hold("GJOURNAL"); GJ_DEBUG(1, "root_mount_hold %p", sc->sc_rootmount); - callout_init(&sc->sc_callout, CALLOUT_MPSAFE); + callout_init(&sc->sc_callout, 1); if (md->md_type != GJ_TYPE_COMPLETE) { /* * Journal and data are on separate providers. Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/geom/mirror/g_mirror.c Fri May 22 17:05:21 2015 (r283291) @@ -2935,7 +2935,7 @@ g_mirror_create(struct g_class *mp, cons LIST_INIT(&sc->sc_disks); TAILQ_INIT(&sc->sc_events); mtx_init(&sc->sc_events_mtx, "gmirror:events", NULL, MTX_DEF); - callout_init(&sc->sc_callout, CALLOUT_MPSAFE); + callout_init(&sc->sc_callout, 1); mtx_init(&sc->sc_done_mtx, "gmirror:done", NULL, MTX_DEF); sc->sc_state = G_MIRROR_DEVICE_STATE_STARTING; gp->softc = sc; Modified: head/sys/geom/raid3/g_raid3.c ============================================================================== --- head/sys/geom/raid3/g_raid3.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/geom/raid3/g_raid3.c Fri May 22 17:05:21 2015 (r283291) @@ -3156,7 +3156,7 @@ g_raid3_create(struct g_class *mp, const bioq_init(&sc->sc_sync_delayed); TAILQ_INIT(&sc->sc_events); mtx_init(&sc->sc_events_mtx, "graid3:events", NULL, MTX_DEF); - callout_init(&sc->sc_callout, CALLOUT_MPSAFE); + callout_init(&sc->sc_callout, 1); sc->sc_state = G_RAID3_DEVICE_STATE_STARTING; gp->softc = sc; sc->sc_geom = gp; Modified: head/sys/geom/sched/gs_rr.c ============================================================================== --- head/sys/geom/sched/gs_rr.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/geom/sched/gs_rr.c Fri May 22 17:05:21 2015 (r283291) @@ -602,7 +602,7 @@ g_rr_init(struct g_geom *geom) sc = malloc(sizeof *sc, M_GEOM_SCHED, M_NOWAIT | M_ZERO); sc->sc_geom = geom; TAILQ_INIT(&sc->sc_rr_tailq); - callout_init(&sc->sc_wait, CALLOUT_MPSAFE); + callout_init(&sc->sc_wait, 1); LIST_INSERT_HEAD(&me.sc_head, sc, sc_next); me.units++; Modified: head/sys/i386/i386/mp_watchdog.c ============================================================================== --- head/sys/i386/i386/mp_watchdog.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/i386/i386/mp_watchdog.c Fri May 22 17:05:21 2015 (r283291) @@ -85,7 +85,7 @@ static void watchdog_init(void *arg) { - callout_init(&watchdog_callout, CALLOUT_MPSAFE); + callout_init(&watchdog_callout, 1); if (watchdog_cpu != -1) watchdog_change(watchdog_cpu); } Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/kern/init_main.c Fri May 22 17:05:21 2015 (r283291) @@ -506,7 +506,7 @@ proc0_init(void *dummy __unused) callout_init_mtx(&p->p_itcallout, &p->p_mtx, 0); callout_init_mtx(&p->p_limco, &p->p_mtx, 0); - callout_init(&td->td_slpcallout, CALLOUT_MPSAFE); + callout_init(&td->td_slpcallout, 1); /* Create credentials. */ newcred = crget(); Modified: head/sys/kern/kern_cons.c ============================================================================== --- head/sys/kern/kern_cons.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/kern/kern_cons.c Fri May 22 17:05:21 2015 (r283291) @@ -654,7 +654,7 @@ static void sysbeep_init(void *unused) { - callout_init(&beeping_timer, CALLOUT_MPSAFE); + callout_init(&beeping_timer, 1); } SYSINIT(sysbeep, SI_SUB_SOFTINTR, SI_ORDER_ANY, sysbeep_init, NULL); #else Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/kern/kern_event.c Fri May 22 17:05:21 2015 (r283291) @@ -615,7 +615,7 @@ filt_timerattach(struct knote *kn) kn->kn_status &= ~KN_DETACHED; /* knlist_add clears it */ kn->kn_ptr.p_nexttime = malloc(sizeof(sbintime_t), M_KQUEUE, M_WAITOK); calloutp = malloc(sizeof(*calloutp), M_KQUEUE, M_WAITOK); - callout_init(calloutp, CALLOUT_MPSAFE); + callout_init(calloutp, 1); kn->kn_hook = calloutp; *kn->kn_ptr.p_nexttime = to + sbinuptime(); callout_reset_sbt_on(calloutp, *kn->kn_ptr.p_nexttime, 0, Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/kern/kern_synch.c Fri May 22 17:05:21 2015 (r283291) @@ -556,7 +556,7 @@ loadav(void *arg) static void synch_setup(void *dummy) { - callout_init(&loadav_callout, CALLOUT_MPSAFE); + callout_init(&loadav_callout, 1); /* Kick off timeout driven events by calling first time. */ loadav(NULL); Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/kern/kern_thread.c Fri May 22 17:05:21 2015 (r283291) @@ -546,7 +546,7 @@ thread_link(struct thread *td, struct pr LIST_INIT(&td->td_lprof[0]); LIST_INIT(&td->td_lprof[1]); sigqueue_init(&td->td_sigqueue, p); - callout_init(&td->td_slpcallout, CALLOUT_MPSAFE); + callout_init(&td->td_slpcallout, 1); TAILQ_INSERT_TAIL(&p->p_threads, td, td_plist); p->p_numthreads++; } Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/kern/subr_vmem.c Fri May 22 17:05:21 2015 (r283291) @@ -766,7 +766,7 @@ vmem_start_callout(void *unused) TASK_INIT(&vmem_periodic_wk, 0, vmem_periodic, NULL); vmem_periodic_interval = hz * 10; - callout_init(&vmem_periodic_ch, CALLOUT_MPSAFE); + callout_init(&vmem_periodic_ch, 1); callout_reset(&vmem_periodic_ch, vmem_periodic_interval, vmem_periodic_kick, NULL); } Modified: head/sys/kern/uipc_domain.c ============================================================================== --- head/sys/kern/uipc_domain.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/kern/uipc_domain.c Fri May 22 17:05:21 2015 (r283291) @@ -248,8 +248,8 @@ domaininit(void *dummy) if (max_linkhdr < 16) /* XXX */ max_linkhdr = 16; - callout_init(&pffast_callout, CALLOUT_MPSAFE); - callout_init(&pfslow_callout, CALLOUT_MPSAFE); + callout_init(&pffast_callout, 1); + callout_init(&pfslow_callout, 1); mtx_lock(&dom_mtx); KASSERT(domain_init_status == 0, ("domaininit called too late!")); Modified: head/sys/mips/cavium/octe/ethernet.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet.c Fri May 22 17:01:43 2015 (r283290) +++ head/sys/mips/cavium/octe/ethernet.c Fri May 22 17:05:21 2015 (r283291) @@ -455,7 +455,7 @@ int cvm_oct_init_module(device_t bus) cvmx_write_csr(CVMX_POW_WQ_INT_THRX(pow_receive_group), 0x1001); } - callout_init(&cvm_oct_poll_timer, CALLOUT_MPSAFE); + callout_init(&cvm_oct_poll_timer, 1); callout_reset(&cvm_oct_poll_timer, hz, cvm_do_timer, NULL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri May 22 17:34:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C0D3289; Fri, 22 May 2015 17:34:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0F11137B; Fri, 22 May 2015 17:34:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MHYNBK053650; Fri, 22 May 2015 17:34:23 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MHYNam053647; Fri, 22 May 2015 17:34:23 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201505221734.t4MHYNam053647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Fri, 22 May 2015 17:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283293 - in head/sys/amd64/vmm: . intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 17:34:24 -0000 Author: neel Date: Fri May 22 17:34:22 2015 New Revision: 283293 URL: https://svnweb.freebsd.org/changeset/base/283293 Log: Don't rely on the 'VM-exit instruction length' field in the VMCS to always have an accurate length on an EPT violation. This is not needed by the instruction decoding code because it also has to work with AMD/SVM that does not provide a valid instruction length on a Nested Page Fault. In collaboration with: Leon Dang (ldang@nahannisys.com) Discussed with: grehan MFC after: 1 week Modified: head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Fri May 22 17:06:33 2015 (r283292) +++ head/sys/amd64/vmm/intel/vmx.c Fri May 22 17:34:22 2015 (r283293) @@ -1780,6 +1780,7 @@ vmexit_inst_emul(struct vm_exit *vmexit, paging = &vmexit->u.inst_emul.paging; vmexit->exitcode = VM_EXITCODE_INST_EMUL; + vmexit->inst_length = 0; vmexit->u.inst_emul.gpa = gpa; vmexit->u.inst_emul.gla = gla; vmx_paging_info(paging); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Fri May 22 17:06:33 2015 (r283292) +++ head/sys/amd64/vmm/vmm.c Fri May 22 17:34:22 2015 (r283293) @@ -1256,11 +1256,14 @@ vm_handle_inst_emul(struct vm *vm, int v mem_region_read_t mread; mem_region_write_t mwrite; enum vm_cpu_mode cpu_mode; - int cs_d, error, fault, length; + int cs_d, error, fault; vcpu = &vm->vcpu[vcpuid]; vme = &vcpu->exitinfo; + KASSERT(vme->inst_length == 0, ("%s: invalid inst_length %d", + __func__, vme->inst_length)); + gla = vme->u.inst_emul.gla; gpa = vme->u.inst_emul.gpa; cs_base = vme->u.inst_emul.cs_base; @@ -1273,13 +1276,8 @@ vm_handle_inst_emul(struct vm *vm, int v /* Fetch, decode and emulate the faulting instruction */ if (vie->num_valid == 0) { - /* - * If the instruction length is not known then assume a - * maximum size instruction. - */ - length = vme->inst_length ? vme->inst_length : VIE_INST_SIZE; error = vmm_fetch_instruction(vm, vcpuid, paging, vme->rip + - cs_base, length, vie, &fault); + cs_base, VIE_INST_SIZE, vie, &fault); } else { /* * The instruction bytes have already been copied into 'vie' @@ -1297,13 +1295,12 @@ vm_handle_inst_emul(struct vm *vm, int v } /* - * If the instruction length was not specified then update it now - * along with 'nextrip'. + * Update 'nextrip' based on the length of the emulated instruction. */ - if (vme->inst_length == 0) { - vme->inst_length = vie->num_processed; - vcpu->nextrip += vie->num_processed; - } + vme->inst_length = vie->num_processed; + vcpu->nextrip += vie->num_processed; + VCPU_CTR1(vm, vcpuid, "nextrip updated to %#lx after instruction " + "decoding", vcpu->nextrip); /* return to userland unless this is an in-kernel emulated device */ if (gpa >= DEFAULT_APIC_BASE && gpa < DEFAULT_APIC_BASE + PAGE_SIZE) { From owner-svn-src-head@FreeBSD.ORG Fri May 22 18:31:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16862BE9; Fri, 22 May 2015 18:31:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 048DA1A7F; Fri, 22 May 2015 18:31:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MIVQl8085655; Fri, 22 May 2015 18:31:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MIVQGC085654; Fri, 22 May 2015 18:31:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505221831.t4MIVQGC085654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 22 May 2015 18:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283295 - head/contrib/ipfilter/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 18:31:27 -0000 Author: emaste Date: Fri May 22 18:31:26 2015 New Revision: 283295 URL: https://svnweb.freebsd.org/changeset/base/283295 Log: ipf(1): Use strchr(3) instead of deprecated index(3) Reviewed by: cy MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2607 Modified: head/contrib/ipfilter/tools/ipf.c Modified: head/contrib/ipfilter/tools/ipf.c ============================================================================== --- head/contrib/ipfilter/tools/ipf.c Fri May 22 18:23:21 2015 (r283294) +++ head/contrib/ipfilter/tools/ipf.c Fri May 22 18:31:26 2015 (r283295) @@ -296,7 +296,7 @@ static void packetlogon(opt) printf("set log flag: nomatch\n"); change = 1; } - if (strstr(opt, "block") || index(opt, 'd')) { + if (strstr(opt, "block") || strchr(opt, 'd')) { flag |= FF_LOGBLOCK; if (opts & OPT_VERBOSE) printf("set log flag: block\n"); From owner-svn-src-head@FreeBSD.ORG Fri May 22 18:47:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3610F105; Fri, 22 May 2015 18:47:51 +0000 (UTC) Received: from id.bluezbox.com (id.bluezbox.com [88.198.91.248]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D78971CC1; Fri, 22 May 2015 18:47:49 +0000 (UTC) Received: from [208.184.220.60] (helo=macbook-air-2.dolby.net) by id.bluezbox.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Yvryx-0005Fc-Tn; Fri, 22 May 2015 11:47:46 -0700 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r283275 - head/sys/dev/fdt From: Oleksandr Tymoshenko In-Reply-To: <20150522115315.5e2ba6fa@bender> Date: Fri, 22 May 2015 11:47:12 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <9A12B406-AD79-4DBE-B91E-0C9CB3596E40@freebsd.org> References: <201505220200.t4M20jfi082771@svn.freebsd.org> <20150522115315.5e2ba6fa@bender> To: Andrew Turner X-Mailer: Apple Mail (2.2098) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.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 May 22, 2015, at 3:53 AM, Andrew Turner wrote: > > On Fri, 22 May 2015 02:00:45 +0000 (UTC) > Oleksandr Tymoshenko wrote: > >> Author: gonzo >> Date: Fri May 22 02:00:44 2015 >> New Revision: 283275 >> URL: https://svnweb.freebsd.org/changeset/base/283275 >> >> Log: >> Add helper method fdt_find_child to make access to child nodes >> easier. >> Some FDT nodes have complex properties organized as a child >> sub-nodes (e.g. timing for LCD panel) we need easy way to obtain >> handles for these sub-nodes > > Why is this named fdt_find_child? It's not fdt specific so should be > named something like ofw_bus_find_child and live in > sys/dev/ofw/ofw_bus_subr.c. > > In general we are trying to move away from the fdt_ functions unless > absolutely needed. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0003] 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: fubar.geek.nz] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 18:47:51 -0000 > On May 22, 2015, at 3:53 AM, Andrew Turner wrote: > > On Fri, 22 May 2015 02:00:45 +0000 (UTC) > Oleksandr Tymoshenko wrote: > >> Author: gonzo >> Date: Fri May 22 02:00:44 2015 >> New Revision: 283275 >> URL: https://svnweb.freebsd.org/changeset/base/283275 >> >> Log: >> Add helper method fdt_find_child to make access to child nodes >> easier. >> Some FDT nodes have complex properties organized as a child >> sub-nodes (e.g. timing for LCD panel) we need easy way to obtain >> handles for these sub-nodes > > Why is this named fdt_find_child? It's not fdt specific so should be > named something like ofw_bus_find_child and live in > sys/dev/ofw/ofw_bus_subr.c. > > In general we are trying to move away from the fdt_ functions unless > absolutely needed. I wasn't aware of this. Thanks for pointing out, will change name later today or tomorrow. From owner-svn-src-head@FreeBSD.ORG Fri May 22 19:04:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA04C75F; Fri, 22 May 2015 19:04:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A8E91EB7; Fri, 22 May 2015 19:04:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MJ47Em001253; Fri, 22 May 2015 19:04:07 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MJ47lE001252; Fri, 22 May 2015 19:04:07 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505221904.t4MJ47lE001252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 22 May 2015 19:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283296 - head/sys/ddb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 19:04:07 -0000 Author: pfg Date: Fri May 22 19:04:06 2015 New Revision: 283296 URL: https://svnweb.freebsd.org/changeset/base/283296 Log: ddb: Use NULL for pointers Hinted by: DragonflyBSD Modified: head/sys/ddb/db_command.c Modified: head/sys/ddb/db_command.c ============================================================================== --- head/sys/ddb/db_command.c Fri May 22 18:31:26 2015 (r283295) +++ head/sys/ddb/db_command.c Fri May 22 19:04:06 2015 (r283296) @@ -80,67 +80,67 @@ static db_cmdfcn_t db_watchdog; */ static struct command db_show_all_cmds[] = { - { "trace", db_stack_trace_all, 0, 0 }, + { "trace", db_stack_trace_all, 0, NULL }, }; struct command_table db_show_all_table = LIST_HEAD_INITIALIZER(db_show_all_table); static struct command db_show_cmds[] = { { "all", 0, 0, &db_show_all_table }, - { "registers", db_show_regs, 0, 0 }, - { "breaks", db_listbreak_cmd, 0, 0 }, - { "threads", db_show_threads, 0, 0 }, + { "registers", db_show_regs, 0, NULL }, + { "breaks", db_listbreak_cmd, 0, NULL }, + { "threads", db_show_threads, 0, NULL }, }; struct command_table db_show_table = LIST_HEAD_INITIALIZER(db_show_table); static struct command db_cmds[] = { - { "print", db_print_cmd, 0, 0 }, - { "p", db_print_cmd, 0, 0 }, - { "examine", db_examine_cmd, CS_SET_DOT, 0 }, - { "x", db_examine_cmd, CS_SET_DOT, 0 }, - { "search", db_search_cmd, CS_OWN|CS_SET_DOT, 0 }, - { "set", db_set_cmd, CS_OWN, 0 }, - { "write", db_write_cmd, CS_MORE|CS_SET_DOT, 0 }, - { "w", db_write_cmd, CS_MORE|CS_SET_DOT, 0 }, - { "delete", db_delete_cmd, 0, 0 }, - { "d", db_delete_cmd, 0, 0 }, - { "dump", db_dump, 0, 0 }, - { "break", db_breakpoint_cmd, 0, 0 }, - { "b", db_breakpoint_cmd, 0, 0 }, - { "dwatch", db_deletewatch_cmd, 0, 0 }, - { "watch", db_watchpoint_cmd, CS_MORE,0 }, - { "dhwatch", db_deletehwatch_cmd, 0, 0 }, - { "hwatch", db_hwatchpoint_cmd, 0, 0 }, - { "step", db_single_step_cmd, 0, 0 }, - { "s", db_single_step_cmd, 0, 0 }, - { "continue", db_continue_cmd, 0, 0 }, - { "c", db_continue_cmd, 0, 0 }, - { "until", db_trace_until_call_cmd,0, 0 }, - { "next", db_trace_until_matching_cmd,0, 0 }, - { "match", db_trace_until_matching_cmd,0, 0 }, - { "trace", db_stack_trace, CS_OWN, 0 }, - { "t", db_stack_trace, CS_OWN, 0 }, + { "print", db_print_cmd, 0, NULL }, + { "p", db_print_cmd, 0, NULL }, + { "examine", db_examine_cmd, CS_SET_DOT, NULL }, + { "x", db_examine_cmd, CS_SET_DOT, NULL }, + { "search", db_search_cmd, CS_OWN|CS_SET_DOT, NULL }, + { "set", db_set_cmd, CS_OWN, NULL }, + { "write", db_write_cmd, CS_MORE|CS_SET_DOT, NULL }, + { "w", db_write_cmd, CS_MORE|CS_SET_DOT, NULL }, + { "delete", db_delete_cmd, 0, NULL }, + { "d", db_delete_cmd, 0, NULL }, + { "dump", db_dump, 0, NULL }, + { "break", db_breakpoint_cmd, 0, NULL }, + { "b", db_breakpoint_cmd, 0, NULL }, + { "dwatch", db_deletewatch_cmd, 0, NULL }, + { "watch", db_watchpoint_cmd, CS_MORE,NULL }, + { "dhwatch", db_deletehwatch_cmd, 0, NULL }, + { "hwatch", db_hwatchpoint_cmd, 0, NULL }, + { "step", db_single_step_cmd, 0, NULL }, + { "s", db_single_step_cmd, 0, NULL }, + { "continue", db_continue_cmd, 0, NULL }, + { "c", db_continue_cmd, 0, NULL }, + { "until", db_trace_until_call_cmd,0, NULL }, + { "next", db_trace_until_matching_cmd,0, NULL }, + { "match", db_trace_until_matching_cmd,0, NULL }, + { "trace", db_stack_trace, CS_OWN, NULL }, + { "t", db_stack_trace, CS_OWN, NULL }, /* XXX alias for all trace */ - { "alltrace", db_stack_trace_all, 0, 0 }, - { "where", db_stack_trace, CS_OWN, 0 }, - { "bt", db_stack_trace, CS_OWN, 0 }, - { "call", db_fncall, CS_OWN, 0 }, + { "alltrace", db_stack_trace_all, 0, NULL }, + { "where", db_stack_trace, CS_OWN, NULL }, + { "bt", db_stack_trace, CS_OWN, NULL }, + { "call", db_fncall, CS_OWN, NULL }, { "show", 0, 0, &db_show_table }, - { "ps", db_ps, 0, 0 }, - { "gdb", db_gdb, 0, 0 }, - { "halt", db_halt, 0, 0 }, - { "reboot", db_reset, 0, 0 }, - { "reset", db_reset, 0, 0 }, - { "kill", db_kill, CS_OWN, 0 }, - { "watchdog", db_watchdog, CS_OWN, 0 }, - { "thread", db_set_thread, CS_OWN, 0 }, - { "run", db_run_cmd, CS_OWN, 0 }, - { "script", db_script_cmd, CS_OWN, 0 }, - { "scripts", db_scripts_cmd, 0, 0 }, - { "unscript", db_unscript_cmd, CS_OWN, 0 }, - { "capture", db_capture_cmd, CS_OWN, 0 }, - { "textdump", db_textdump_cmd, CS_OWN, 0 }, - { "findstack", db_findstack_cmd, 0, 0 }, + { "ps", db_ps, 0, NULL }, + { "gdb", db_gdb, 0, NULL }, + { "halt", db_halt, 0, NULL }, + { "reboot", db_reset, 0, NULL }, + { "reset", db_reset, 0, NULL }, + { "kill", db_kill, CS_OWN, NULL }, + { "watchdog", db_watchdog, CS_OWN, NULL }, + { "thread", db_set_thread, CS_OWN, NULL }, + { "run", db_run_cmd, CS_OWN, NULL }, + { "script", db_script_cmd, CS_OWN, NULL }, + { "scripts", db_scripts_cmd, 0, NULL }, + { "unscript", db_unscript_cmd, CS_OWN, NULL }, + { "capture", db_capture_cmd, CS_OWN, NULL }, + { "textdump", db_textdump_cmd, CS_OWN, NULL }, + { "findstack", db_findstack_cmd, 0, NULL }, }; struct command_table db_cmd_table = LIST_HEAD_INITIALIZER(db_cmd_table); From owner-svn-src-head@FreeBSD.ORG Fri May 22 19:57:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF8384A7; Fri, 22 May 2015 19:57:34 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A724A14B2; Fri, 22 May 2015 19:57:34 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t4MJvXCE080695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 May 2015 12:57:33 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t4MJvWOl080694; Fri, 22 May 2015 12:57:32 -0700 (PDT) (envelope-from jmg) Date: Fri, 22 May 2015 12:57:32 -0700 From: John-Mark Gurney To: Cy Schubert Cc: Andrew Turner , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282415 - head/usr.sbin/ntp Message-ID: <20150522195732.GQ37063@funkthat.com> References: <20150517190810.4006b7bb@bender.Home> <201505180053.t4I0rqv4020640@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201505180053.t4I0rqv4020640@slippy.cwsent.com> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Fri, 22 May 2015 12:57:33 -0700 (PDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 19:57:35 -0000 Cy Schubert wrote this message on Sun, May 17, 2015 at 17:53 -0700: > In message <20150517190810.4006b7bb@bender.Home>, Andrew Turner writes: > > On Mon, 4 May 2015 12:42:53 +0000 (UTC) > > Cy Schubert wrote: > > > > > Author: cy > > > Date: Mon May 4 12:42:52 2015 > > > New Revision: 282415 > > > URL: https://svnweb.freebsd.org/changeset/base/282415 > > > > > > Log: > > > Restore CPU dependent compile time conditionals. > > > > > > MFC after: 1 month (with r281143 and r282408) > > > > Do you have any plans on fixing this before you MFC it? Specifically: > > * sizeof(char *) == 8 on arm64, powerpc64, and mips64 > > * sizeof(long) == 8 on arm64, powerpc64, and mips64 > > * sizeof(time_t) == 8 on arm, arm64, powerpc64, mips, and mips64 > > * STR_SYSTEM is incorrect on arm, arm64, powerpc64, mips, and mips64, > > however this is now less broken as it was previously also broken on > > i386, and sparc64. > > > > This change is only correct for amd64, i386, and sparc64. > > That is correct. > > > > > I suspect all of the above will also be relevant on ia64. We still have > > support in 10-STABLE for this so should be fixed before an MFC. > > We should support ia64 at least until it's no longer supported in -stable. > > > > > I have heard reports that NTP is broken on some of the above platforms > > so they don't keep very accurate time. Can you fix this, or revert this > > change until a fix can be written. > > Unfortunately -stable is currently as broken as it is in -current. The > quick fix is to add all supported platforms. The other unfortunate fact is > that, scanning the tree for other examples there's more code as broken as > this is. I propose: > > 1. Fix NTP -- I will do this. I have some free time coming up this week to > focus on this. > 2. Identify other parts of the tree needing a little love and either putting > it up on the wiki or in phabricator. > 3. Fix #2 (either me or others as we see fit). > > Alternatively, a common solution for all parts of the tree, if possible. > This is probably a long term solution though. (The purist in me prefers > this but I am practical too.) Why can't we use sizeof for these? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Fri May 22 20:05:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E906F79E for ; Fri, 22 May 2015 20:05:21 +0000 (UTC) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) by mx1.freebsd.org (Postfix) with SMTP id AB14615F6 for ; Fri, 22 May 2015 20:05:21 +0000 (UTC) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Fri, 22 May 2015 20:05:26 +0000 (UTC) Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t4MK59a1004225; Fri, 22 May 2015 14:05:09 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1432325109.1252.15.camel@freebsd.org> Subject: Re: svn commit: r282415 - head/usr.sbin/ntp From: Ian Lepore To: John-Mark Gurney Cc: Cy Schubert , Andrew Turner , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 22 May 2015 14:05:09 -0600 In-Reply-To: <20150522195732.GQ37063@funkthat.com> References: <20150517190810.4006b7bb@bender.Home> <201505180053.t4I0rqv4020640@slippy.cwsent.com> <20150522195732.GQ37063@funkthat.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 20:05:22 -0000 On Fri, 2015-05-22 at 12:57 -0700, John-Mark Gurney wrote: > Cy Schubert wrote this message on Sun, May 17, 2015 at 17:53 -0700: > > In message <20150517190810.4006b7bb@bender.Home>, Andrew Turner writes: > > > On Mon, 4 May 2015 12:42:53 +0000 (UTC) > > > Cy Schubert wrote: > > > > > > > Author: cy > > > > Date: Mon May 4 12:42:52 2015 > > > > New Revision: 282415 > > > > URL: https://svnweb.freebsd.org/changeset/base/282415 > > > > > > > > Log: > > > > Restore CPU dependent compile time conditionals. > > > > > > > > MFC after: 1 month (with r281143 and r282408) > > > > > > Do you have any plans on fixing this before you MFC it? Specifically: > > > * sizeof(char *) == 8 on arm64, powerpc64, and mips64 > > > * sizeof(long) == 8 on arm64, powerpc64, and mips64 > > > * sizeof(time_t) == 8 on arm, arm64, powerpc64, mips, and mips64 > > > * STR_SYSTEM is incorrect on arm, arm64, powerpc64, mips, and mips64, > > > however this is now less broken as it was previously also broken on > > > i386, and sparc64. > > > > > > This change is only correct for amd64, i386, and sparc64. > > > > That is correct. > > > > > > > > I suspect all of the above will also be relevant on ia64. We still have > > > support in 10-STABLE for this so should be fixed before an MFC. > > > > We should support ia64 at least until it's no longer supported in -stable. > > > > > > > > I have heard reports that NTP is broken on some of the above platforms > > > so they don't keep very accurate time. Can you fix this, or revert this > > > change until a fix can be written. > > > > Unfortunately -stable is currently as broken as it is in -current. The > > quick fix is to add all supported platforms. The other unfortunate fact is > > that, scanning the tree for other examples there's more code as broken as > > this is. I propose: > > > > 1. Fix NTP -- I will do this. I have some free time coming up this week to > > focus on this. > > 2. Identify other parts of the tree needing a little love and either putting > > it up on the wiki or in phabricator. > > 3. Fix #2 (either me or others as we see fit). > > > > Alternatively, a common solution for all parts of the tree, if possible. > > This is probably a long term solution though. (The purist in me prefers > > this but I am practical too.) > > Why can't we use sizeof for these? > They are used in a preprocessor context. I'm not sure I understand the comments about various kinds of brokeness. ntpd works just fine on arm and other platforms and has done so for about 10 years on all branches, until a new version was imported a couple weeks ago. Leaving the non-x86 platforms without functioning ntp for weeks is mind-boggling (but I haven't had time to find and fix the problem myself). -- Ian From owner-svn-src-head@FreeBSD.ORG Fri May 22 20:50:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B774D648; Fri, 22 May 2015 20:50:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98A691B03; Fri, 22 May 2015 20:50:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MKoafL059780; Fri, 22 May 2015 20:50:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MKoZIm059776; Fri, 22 May 2015 20:50:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505222050.t4MKoZIm059776@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 22 May 2015 20:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283297 - in head/sys: arm/include kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 20:50:36 -0000 Author: imp Date: Fri May 22 20:50:35 2015 New Revision: 283297 URL: https://svnweb.freebsd.org/changeset/base/283297 Log: Export the eflags field from the elf header. This allows better discrimination between different subarch binaries, at least for mips and arm. Arm is implemented, mips is still tbd, so not currently exported. aarch64 does not export this because aarch64 binaries use different tags and flags than arm. Differential Revision: https://reviews.freebsd.org/D2611 Modified: head/sys/arm/include/elf.h head/sys/kern/imgact_elf.c head/sys/sys/imgact_elf.h Modified: head/sys/arm/include/elf.h ============================================================================== --- head/sys/arm/include/elf.h Fri May 22 19:04:06 2015 (r283296) +++ head/sys/arm/include/elf.h Fri May 22 20:50:35 2015 (r283297) @@ -63,21 +63,21 @@ __ElfType(Auxinfo); */ /* Values for a_type. */ -#define AT_NULL 0 /* Terminates the vector. */ -#define AT_IGNORE 1 /* Ignored entry. */ -#define AT_EXECFD 2 /* File descriptor of program to load. */ -#define AT_PHDR 3 /* Program header of program already loaded. */ -#define AT_PHENT 4 /* Size of each program header entry. */ -#define AT_PHNUM 5 /* Number of program header entries. */ -#define AT_PAGESZ 6 /* Page size in bytes. */ -#define AT_BASE 7 /* Interpreter's base address. */ -#define AT_FLAGS 8 /* Flags (unused). */ -#define AT_ENTRY 9 /* Where interpreter should transfer control. */ -#define AT_NOTELF 10 /* Program is not ELF ?? */ -#define AT_UID 11 /* Real uid. */ -#define AT_EUID 12 /* Effective uid. */ -#define AT_GID 13 /* Real gid. */ -#define AT_EGID 14 /* Effective gid. */ +#define AT_NULL 0 /* Terminates the vector. */ +#define AT_IGNORE 1 /* Ignored entry. */ +#define AT_EXECFD 2 /* File descriptor of program to load. */ +#define AT_PHDR 3 /* Program header of program already loaded. */ +#define AT_PHENT 4 /* Size of each program header entry. */ +#define AT_PHNUM 5 /* Number of program header entries. */ +#define AT_PAGESZ 6 /* Page size in bytes. */ +#define AT_BASE 7 /* Interpreter's base address. */ +#define AT_FLAGS 8 /* Flags (unused). */ +#define AT_ENTRY 9 /* Where interpreter should transfer control. */ +#define AT_NOTELF 10 /* Program is not ELF ?? */ +#define AT_UID 11 /* Real uid. */ +#define AT_EUID 12 /* Effective uid. */ +#define AT_GID 13 /* Real gid. */ +#define AT_EGID 14 /* Effective gid. */ #define AT_EXECPATH 15 /* Path to the executable. */ #define AT_CANARY 16 /* Canary for SSP */ #define AT_CANARYLEN 17 /* Length of the canary. */ @@ -87,10 +87,11 @@ __ElfType(Auxinfo); #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 25 /* Count of defined aux entry types. */ -#define R_ARM_COUNT 33 /* Count of defined relocation types. */ +#define R_ARM_COUNT 33 /* Count of defined relocation types. */ /* Define "machine" characteristics */ @@ -104,16 +105,16 @@ __ElfType(Auxinfo); #define ELF_TARG_VER 1 /* Defines specific for arm headers */ -#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) -#define EF_ARM_EABI_VERSION_UNKNOWN 0 -#define EF_ARM_EABI_FREEBSD_MIN 4 +#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) +#define EF_ARM_EABI_VERSION_UNKNOWN 0 +#define EF_ARM_EABI_FREEBSD_MIN 4 /* * Magic number for the elf trampoline, chosen wisely to be an immediate * value. */ -#define MAGIC_TRAMP_NUMBER 0x5c000003 +#define MAGIC_TRAMP_NUMBER 0x5c000003 -#define ET_DYN_LOAD_ADDR 0x12000 +#define ET_DYN_LOAD_ADDR 0x12000 #endif /* !_MACHINE_ELF_H_ */ Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Fri May 22 19:04:06 2015 (r283296) +++ head/sys/kern/imgact_elf.c Fri May 22 20:50:35 2015 (r283297) @@ -972,6 +972,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i elf_auxargs->base = addr; elf_auxargs->flags = 0; elf_auxargs->entry = entry; + elf_auxargs->hdr_eflags = hdr->e_flags; imgp->auxargs = elf_auxargs; imgp->interpreted = 0; @@ -1002,6 +1003,9 @@ __elfN(freebsd_fixup)(register_t **stack AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); AUXARGS_ENTRY(pos, AT_BASE, args->base); +#ifdef AT_EHDREFLAGS + AUXARGS_ENTRY(pos, AT_EHDRFLAGS, args->hdr_eflags); +#endif if (imgp->execpathp != 0) AUXARGS_ENTRY(pos, AT_EXECPATH, imgp->execpathp); AUXARGS_ENTRY(pos, AT_OSRELDATE, Modified: head/sys/sys/imgact_elf.h ============================================================================== --- head/sys/sys/imgact_elf.h Fri May 22 19:04:06 2015 (r283296) +++ head/sys/sys/imgact_elf.h Fri May 22 20:50:35 2015 (r283297) @@ -52,6 +52,7 @@ typedef struct { Elf_Size base; Elf_Size flags; Elf_Size entry; + Elf_Word hdr_eflags; /* e_flags field from ehdr */ } __ElfN(Auxargs); typedef struct { From owner-svn-src-head@FreeBSD.ORG Fri May 22 21:04:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74296A03; Fri, 22 May 2015 21:04:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54DA21D0B; Fri, 22 May 2015 21:04:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ML4hM3069231; Fri, 22 May 2015 21:04:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ML4haC069230; Fri, 22 May 2015 21:04:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505222104.t4ML4haC069230@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 May 2015 21:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283298 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 21:04:43 -0000 Author: gjb Date: Fri May 22 21:04:42 2015 New Revision: 283298 URL: https://svnweb.freebsd.org/changeset/base/283298 Log: Fix a number of logic and/or naming problems in Makefile.mirrors. Reduce a number of duplicated logic. As of this commit, this file does exactly what it is needed to do. MFC after: 3 days X-MFC-Note: needs all previous changes Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Fri May 22 20:50:35 2015 (r283297) +++ head/release/Makefile.mirrors Fri May 22 21:04:42 2015 (r283298) @@ -18,7 +18,7 @@ RELEASEDIR?= /R FTPDIR?= ${RELEASEDIR}/ftp-stage STAGE_TARGETS?= iso-images-stage -.if defined(EMBEDDED_TARGET) && !empty(EMBEDDED_TARGET) +.if (defined(EMBEDDED_TARGET) && !empty(EMBEDDED_TARGET)) || (defined(EMBEDDEDBUILD) && !empty(EMBEDDEDBUILD)) . if ${TARGET} == "arm" || ${EMBEDDED_TARGET} == "arm" EMBEDDED= 1 . endif @@ -62,7 +62,7 @@ OLDNAME:= ${KERNCONF} . if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" SNAPSHOT= 1 . endif -IMAGES:= ${BOARDNAME}.img +IMAGES:= img . endif # arm/armv6 .endif # embedded @@ -85,74 +85,126 @@ iso-images-stage: mkdir -p ${TLD}/ISO-IMAGES/${REVISION} .if exists(${RELEASEDIR}) @# Assume we have images to copy. -. for IMAGE in ${IMAGES} +. if defined(SNAPSHOT) && !empty(SNAPSHOT) + cd ${RELEASEDIR} && rm -f CHECKSUM.* +. for IMAGE in ${IMAGES} +. if defined(EMBEDDED) && !empty(EMBEDDED) +. if defined(OLDNAME) && !empty(OLDNAME) @# arm/armv6 IMX6 -> WANDBOARD, for example. -. if defined(OLDNAME) && !empty(OLDNAME) - cd ${RELEASEDIR} && mv ${OSRELEASE}-${IMAGE:S,${BOARDNAME},${OLDNAME},}.xz \ - ${OSRELEASE}-${IMAGE}.xz -. endif -. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}) - cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE} \ - ${ISO_DIR}/${OSRELEASE}-${IMAGE} -. endif -. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz) - cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz \ - ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz -. endif -. if exists(${RELEASEDIR}/CHECKSUM.${CHECKSUM}) - cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM} \ - ${ISO_DIR}/CHECKSUM.${CHECKSUM} -. endif -. endfor -.endif - -.if defined(SNAPSHOT) && !empty(SNAPSHOT) -. for IMAGE in ${IMAGES} - cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE} \ + cd ${RELEASEDIR} && \ + mv ${OSRELEASE}-${OLDNAME}.${IMAGE}.xz \ + ${OSRELEASE}-${BOARDNAME}.${IMAGE}.xz +. endif + cd ${RELEASEDIR} && \ + mv ${OSRELEASE}-${BOARDNAME}.${IMAGE}.xz \ + ${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX}.${IMAGE}.xz + cp -p ${RELEASEDIR}/${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX}.${IMAGE}.xz \ + ${ISO_DIR}/${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX}.${IMAGE}.xz + cd ${TLD}/ISO-IMAGES/${REVISION} && \ + ln -s \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX}.${IMAGE}.xz +. endif # not embedded +. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}) + cd ${RELEASEDIR} && \ + mv ${OSRELEASE}-${IMAGE} \ ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} || true - cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE}.xz \ - ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz || true + cp -p ${RELEASEDIR}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} \ + ${ISO_DIR}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} || true + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} +. endif +. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz) + cd ${RELEASEDIR} && \ + mv ${OSRELEASE}-${IMAGE}.xz \ + ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz || true + cp -p ${RELEASEDIR}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz \ + ${ISO_DIR}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz || true - cd ${TLD} && find -L . -type l | xargs rm -. endfor -. for CHECKSUM in ${CHECKSUM_FILES} -. if exists(${ISO_DIR}/CHECKSUM.${CHECKSUM}) - rm -f ${ISO_DIR}/CHECKSUM.${CHECKSUM} -. endif -. if defined(EMBEDDED) && !empty(EMBEDDED) - cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz +. endif +. endfor # images loop + cd ${RELEASEDIR} && rm -f CHECKSUM.* +. for CHECKSUM in ${CHECKSUM_FILES} +. if defined(EMBEDDED) && !empty(EMBEDDED) + cd ${RELEASEDIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX} \ + ${ISO_DIR}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX} cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX} -. else - cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ +. else # not embedded + cd ${RELEASEDIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} \ + ${ISO_DIR}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} -. endif -. endfor -.else # !snapshot - cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} || true - cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE}.xz || true - cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ +. endif # +. endfor # checksum files +. else # not snapshot +. for IMAGE in ${IMAGES} +. if defined(EMBEDDED) && !empty(EMBEDDED) +. if defined(OLDNAME) && !empty(OLDNAME) + @# arm/armv6 IMX6 -> WANDBOARD, for example. + cd ${RELEASEDIR} && \ + mv ${OSRELEASE}-${OLDNAME}.${IMAGE}.xz \ + ${OSRELEASE}-${BOARDNAME}.${IMAGE}.xz +. endif + cp -p ${RELEASEDIR}/${OSRELEASE}-${BOARDNAME}.${IMAGE}.xz \ + ${ISO_DIR}/${OSRELEASE}-${BOARDNAME}.${IMAGE}.xz + cd ${TLD}/ISO-IMAGES/${REVISION} && \ + ln -s \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${BOARDNAME}.${IMAGE}.xz +. endif # not embedded +. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}) + cd ${RELEASEDIR} && \ + cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE} \ + ${ISO_DIR}/${OSRELEASE}-${IMAGE} + cd ${TLD}/ISO-IMAGES/${REVISION} && \ + ln -s \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} +. endif +. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz) + cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz \ + ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz + cd ${TLD}/ISO-IMAGES/${REVISION} && \ + ln -s \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE}.xz +. endif +. endfor # images loop + cd ${RELEASEDIR} && rm -f CHECKSUM.* +. for CHECKSUM in ${CHECKSUM_FILES} +. if defined(EMBEDDED) && !empty(EMBEDDED) + cd ${RELEASEDIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ + CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME} + cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME} \ + ${ISO_DIR}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME} + cd ${TLD}/ISO-IMAGES/${REVISION} && \ + ln -s \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME} +. else # not embedded + cd ${RELEASEDIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ CHECKSUM.${CHECKSUM}-${OSRELEASE} -.endif -.if exists(${RELEASEDIR}/ftp) + cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM}-${OSRELEASE} \ + ${ISO_DIR}/CHECKSUM.${CHECKSUM}-${OSRELEASE} + cd ${TLD}/ISO-IMAGES/${REVISION} && \ + ln -s \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${OSRELEASE} +. endif +. endfor # checksum files +. endif # release +. if exists(${RELEASEDIR}/ftp) mkdir -p ${FTP_DIR} - cp ${RELEASEDIR}/ftp/*.txz ${RELEASEDIR}/ftp/MANIFEST ${FTP_DIR} + cp -p ${RELEASEDIR}/ftp/*.txz ${RELEASEDIR}/ftp/MANIFEST ${FTP_DIR} cd ${TLD}/${TARGET} && \ ln -s ${TARGET_ARCH}/${REVISION}-${BRANCH} \ ${REVISION}-${BRANCH} -.endif +. endif +.endif # no RELEASEDIR vm-images-stage: @true From owner-svn-src-head@FreeBSD.ORG Fri May 22 21:09:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1545BFD; Fri, 22 May 2015 21:09:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFC1D1D40; Fri, 22 May 2015 21:09:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ML9Bm4070140; Fri, 22 May 2015 21:09:11 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ML9BxM070139; Fri, 22 May 2015 21:09:11 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201505222109.t4ML9BxM070139@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Fri, 22 May 2015 21:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283299 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 21:09:11 -0000 Author: neel Date: Fri May 22 21:09:11 2015 New Revision: 283299 URL: https://svnweb.freebsd.org/changeset/base/283299 Log: Remove the verification of instruction length after instruction decode. The check has been bogus since r273375. MFC after: 1 week Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Fri May 22 21:04:42 2015 (r283298) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Fri May 22 21:09:11 2015 (r283299) @@ -2315,19 +2315,6 @@ decode_moffset(struct vie *vie) } /* - * Verify that all the bytes in the instruction buffer were consumed. - */ -static int -verify_inst_length(struct vie *vie) -{ - - if (vie->num_processed) - return (0); - else - return (-1); -} - -/* * Verify that the 'guest linear address' provided as collateral of the nested * page table fault matches with our instruction decoding. */ @@ -2408,9 +2395,6 @@ vmm_decode_instruction(struct vm *vm, in if (decode_moffset(vie)) return (-1); - if (verify_inst_length(vie)) - return (-1); - if ((vie->op.op_flags & VIE_OP_F_NO_GLA_VERIFICATION) == 0) { if (verify_gla(vm, cpuid, gla, vie)) return (-1); From owner-svn-src-head@FreeBSD.ORG Fri May 22 21:10:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F245CD4E; Fri, 22 May 2015 21:10:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0BA21D4D; Fri, 22 May 2015 21:10:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MLAEWq070960; Fri, 22 May 2015 21:10:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MLAEhm070959; Fri, 22 May 2015 21:10:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505222110.t4MLAEhm070959@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 22 May 2015 21:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283300 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 21:10:15 -0000 Author: imp Date: Fri May 22 21:10:14 2015 New Revision: 283300 URL: https://svnweb.freebsd.org/changeset/base/283300 Log: Fix typo in symbol name. It helps to hit save in all your buffers before committing. Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Fri May 22 21:09:11 2015 (r283299) +++ head/sys/kern/imgact_elf.c Fri May 22 21:10:14 2015 (r283300) @@ -1003,7 +1003,7 @@ __elfN(freebsd_fixup)(register_t **stack AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); AUXARGS_ENTRY(pos, AT_BASE, args->base); -#ifdef AT_EHDREFLAGS +#ifdef AT_EHDRFLAGS AUXARGS_ENTRY(pos, AT_EHDRFLAGS, args->hdr_eflags); #endif if (imgp->execpathp != 0) From owner-svn-src-head@FreeBSD.ORG Fri May 22 21:33:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6051A1F8; Fri, 22 May 2015 21:33:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FE0910B6; Fri, 22 May 2015 21:33:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MLXE4w084347; Fri, 22 May 2015 21:33:14 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MLXE8H084346; Fri, 22 May 2015 21:33:14 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201505222133.t4MLXE8H084346@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Fri, 22 May 2015 21:33:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283301 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 21:33:14 -0000 Author: peter Date: Fri May 22 21:33:13 2015 New Revision: 283301 URL: https://svnweb.freebsd.org/changeset/base/283301 Log: Adjust default argument construction for -c to be getopt compliant for consistency, even though unbound understood it. Modified: head/etc/rc.d/local_unbound Modified: head/etc/rc.d/local_unbound ============================================================================== --- head/etc/rc.d/local_unbound Fri May 22 21:10:14 2015 (r283300) +++ head/etc/rc.d/local_unbound Fri May 22 21:33:13 2015 (r283301) @@ -25,7 +25,7 @@ pidfile="/var/run/${name}.pid" : ${local_unbound_workdir:=/var/unbound} : ${local_unbound_config:=${local_unbound_workdir}/unbound.conf} -: ${local_unbound_flags:=-c${local_unbound_config}} +: ${local_unbound_flags:="-c ${local_unbound_config}"} : ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf} : ${local_unbound_controlconf:=${local_unbound_workdir}/control.conf} : ${local_unbound_anchor:=${local_unbound_workdir}/root.key} From owner-svn-src-head@FreeBSD.ORG Fri May 22 21:38:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF76D3BC; Fri, 22 May 2015 21:38:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0C5510EE; Fri, 22 May 2015 21:38:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MLcBui085021; Fri, 22 May 2015 21:38:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MLcBRg085020; Fri, 22 May 2015 21:38:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505222138.t4MLcBRg085020@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 May 2015 21:38:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283302 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 21:38:12 -0000 Author: gjb Date: Fri May 22 21:38:11 2015 New Revision: 283302 URL: https://svnweb.freebsd.org/changeset/base/283302 Log: Fix staging virtual machine images for ftp propagation. MFC after: 3 days X-MFC-Note: needs all previous changes Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Fri May 22 21:33:13 2015 (r283301) +++ head/release/Makefile.mirrors Fri May 22 21:38:11 2015 (r283302) @@ -207,36 +207,47 @@ iso-images-stage: .endif # no RELEASEDIR vm-images-stage: - @true -# mkdir -p ${VM_DIR} -#.if defined(SNAPSHOT) && !empty(SNAPSHOT) -# mkdir -p ${VM_DIR}/${BUILDDATE} -#. if exists(${VM_DIR}/Latest) -# unlink ${VM_DIR}/Latest -# cd ${VM_DIR} && ln -s ${BUILDDATE} Latest -#. endif -#. for VMIMAGE in ${VMIMAGES} -# cd /R/vmimages && cp -p ${VMIMAGE}.xz \ -# ${VM_DIR}/${BUILDDATE}/${OSRELEASE}-${SNAP_SUFFIX}-${VMIMAGE}.xz -# cd ${VM_DIR}/Latest && ln -s \ -# ../${BUILDDATE}/${OSRELEASE}-${SNAP_SUFFIX}-${VMIMAGE}.xz \ -# ${OSRELEASE}-${VMIMAGE}.xz -#. endfor -#. for CHECKSUM in ${CHECKSUM_FILES} -#. if exists(${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}) -# rm -f ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM} -#. endif -# cd ${VM_DIR}/${BUILDDATE} && ${CHECKSUM:tl} ${OSRELEASE}* > \ -# CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} -# cd ${VM_DIR}/Latest && ln -s \ -# ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ -# CHECKSUM.${CHECKSUM} -#. endfor -#.else # !snapshot -#. for CHECKSUM in ${CHECKSUM_FILES} -# cd /R/vmimages && cp -p CHECKSUM.${CHECKSUM}* \ -# ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} -#.endif + mkdir -p ${VM_DIR} +.if defined(SNAPSHOT) && !empty(SNAPSHOT) +. if exists(${VM_DIR}/Latest) + rm -rf ${VM_DIR}/Latest +. endif + mkdir -p ${VM_DIR}/Latest + mkdir -p ${VM_DIR}/${BUILDDATE} +. for VMFORMAT in ${VMFORMATS} + cd ${RELEASEDIR}/vmimages && \ + mv ${OSRELEASE}.${VMFORMAT}.xz \ + ${OSRELEASE}-${SNAP_SUFFIX}.${VMFORMAT}.xz + cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${SNAP_SUFFIX}.${VMFORMAT}.xz \ + ${VM_DIR}/${BUILDDATE}/${OSRELEASE}-${SNAP_SUFFIX}.${VMFORMAT}.xz + cd ${VM_DIR}/Latest && \ + ln -s ../${BUILDDATE}/${OSRELEASE}-${SNAP_SUFFIX}.${VMFORMAT}.xz \ + ${OSRELEASE}.${VMFORMAT}.xz +. endfor + cd ${RELEASEDIR}/vmimages && rm -f CHECKSUM.* +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/vmimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/vmimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cd ${VM_DIR}/Latest && \ + ln -s ../${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + CHECKSUM.${CHECKSUM} +. endfor +.else # not snapshot +. if exists(${VM_DIR}/Latest) + rm -rf ${VM_DIR}/Latest +. endif + mkdir -p ${VM_DIR}/Latest +. for VMFORMAT in ${VMFORMATS} + cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}.${VMFORMAT}.xz \ + ${VM_DIR}/Latest/${OSRELEASE}.${VMFORMAT}.xz +. endfor +. for CHECKSUM in ${CHECKSUM_FILES} + cp -p ${RELEASEDIR}/vmimages/CHECKSUM.${CHECKSUM} \ + ${VM_DIR}/Latest/CHECKSUM.${CHECKSUM} +. endfor +.endif ftp-stage: remove-old-bits ${STAGE_TARGETS} From owner-svn-src-head@FreeBSD.ORG Fri May 22 23:07:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71F2D8AA; Fri, 22 May 2015 23:07:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EBFF1B12; Fri, 22 May 2015 23:07:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MN7vYe030338; Fri, 22 May 2015 23:07:57 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MN7tDa030331; Fri, 22 May 2015 23:07:55 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201505222307.t4MN7tDa030331@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Fri, 22 May 2015 23:07:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283304 - head/bin/ps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 23:07:57 -0000 Author: marcel Date: Fri May 22 23:07:55 2015 New Revision: 283304 URL: https://svnweb.freebsd.org/changeset/base/283304 Log: Convert to use libxo. Document use of libxo as well. Obtained from: Phil Shafer Sponsored by: Juniper Networks, Inc. Modified: head/bin/ps/Makefile head/bin/ps/keyword.c head/bin/ps/print.c head/bin/ps/ps.1 head/bin/ps/ps.c head/bin/ps/ps.h Modified: head/bin/ps/Makefile ============================================================================== --- head/bin/ps/Makefile Fri May 22 21:51:36 2015 (r283303) +++ head/bin/ps/Makefile Fri May 22 23:07:55 2015 (r283304) @@ -11,6 +11,6 @@ SRCS= fmt.c keyword.c nlist.c print.c ps # on large systems. # CFLAGS+=-DLAZY_PS -LIBADD= m kvm jail +LIBADD= m kvm jail xo .include Modified: head/bin/ps/keyword.c ============================================================================== --- head/bin/ps/keyword.c Fri May 22 21:51:36 2015 (r283303) +++ head/bin/ps/keyword.c Fri May 22 23:07:55 2015 (r283304) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "ps.h" @@ -64,116 +65,170 @@ static int vcmp(const void *, const voi /* PLEASE KEEP THE TABLE BELOW SORTED ALPHABETICALLY!!! */ static VAR var[] = { - {"%cpu", "%CPU", NULL, 0, pcpu, 0, CHAR, NULL, 0}, - {"%mem", "%MEM", NULL, 0, pmem, 0, CHAR, NULL, 0}, - {"acflag", "ACFLG", NULL, 0, kvar, KOFF(ki_acflag), USHORT, "x", 0}, - {"acflg", "", "acflag", 0, NULL, 0, CHAR, NULL, 0}, - {"args", "COMMAND", NULL, COMM|LJUST|USER, arguments, 0, - CHAR, NULL, 0}, - {"blocked", "", "sigmask", 0, NULL, 0, CHAR, NULL, 0}, - {"caught", "", "sigcatch", 0, NULL, 0, CHAR, NULL, 0}, - {"class", "CLASS", NULL, LJUST, loginclass, 0, CHAR, NULL, 0}, - {"comm", "COMMAND", NULL, LJUST, ucomm, 0, CHAR, NULL, 0}, - {"command", "COMMAND", NULL, COMM|LJUST|USER, command, 0, - CHAR, NULL, 0}, - {"cow", "COW", NULL, 0, kvar, KOFF(ki_cow), UINT, "u", 0}, - {"cpu", "CPU", NULL, 0, kvar, KOFF(ki_estcpu), UINT, "d", 0}, - {"cputime", "", "time", 0, NULL, 0, CHAR, NULL, 0}, - {"dsiz", "DSIZ", NULL, 0, kvar, KOFF(ki_dsize), PGTOK, "ld", 0}, - {"egid", "", "gid", 0, NULL, 0, CHAR, NULL, 0}, - {"egroup", "", "group", 0, NULL, 0, CHAR, NULL, 0}, - {"emul", "EMUL", NULL, LJUST, emulname, 0, CHAR, NULL, 0}, - {"etime", "ELAPSED", NULL, USER, elapsed, 0, CHAR, NULL, 0}, - {"etimes", "ELAPSED", NULL, USER, elapseds, 0, CHAR, NULL, 0}, - {"euid", "", "uid", 0, NULL, 0, CHAR, NULL, 0}, - {"f", "F", NULL, 0, kvar, KOFF(ki_flag), INT, "x", 0}, - {"f2", "F2", NULL, 0, kvar, KOFF(ki_flag2), INT, "08x", 0}, - {"fib", "FIB", NULL, 0, kvar, KOFF(ki_fibnum), INT, "d", 0}, - {"flags", "", "f", 0, NULL, 0, CHAR, NULL, 0}, - {"flags2", "", "f2", 0, NULL, 0, CHAR, NULL, 0}, - {"gid", "GID", NULL, 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0}, - {"group", "GROUP", NULL, LJUST, egroupname, 0, CHAR, NULL, 0}, - {"ignored", "", "sigignore", 0, NULL, 0, CHAR, NULL, 0}, - {"inblk", "INBLK", NULL, USER, rvar, ROFF(ru_inblock), LONG, "ld", 0}, - {"inblock", "", "inblk", 0, NULL, 0, CHAR, NULL, 0}, - {"jid", "JID", NULL, 0, kvar, KOFF(ki_jid), INT, "d", 0}, - {"jobc", "JOBC", NULL, 0, kvar, KOFF(ki_jobc), SHORT, "d", 0}, - {"ktrace", "KTRACE", NULL, 0, kvar, KOFF(ki_traceflag), INT, "x", 0}, - {"label", "LABEL", NULL, LJUST, label, 0, CHAR, NULL, 0}, - {"lim", "LIM", NULL, 0, maxrss, 0, CHAR, NULL, 0}, - {"lockname", "LOCK", NULL, LJUST, lockname, 0, CHAR, NULL, 0}, - {"login", "LOGIN", NULL, LJUST, logname, 0, CHAR, NULL, 0}, - {"logname", "", "login", 0, NULL, 0, CHAR, NULL, 0}, - {"lstart", "STARTED", NULL, LJUST|USER, lstarted, 0, CHAR, NULL, 0}, - {"lwp", "LWP", NULL, 0, kvar, KOFF(ki_tid), UINT, LWPFMT, 0}, - {"majflt", "MAJFLT", NULL, USER, rvar, ROFF(ru_majflt), LONG, "ld", 0}, - {"minflt", "MINFLT", NULL, USER, rvar, ROFF(ru_minflt), LONG, "ld", 0}, - {"msgrcv", "MSGRCV", NULL, USER, rvar, ROFF(ru_msgrcv), LONG, "ld", 0}, - {"msgsnd", "MSGSND", NULL, USER, rvar, ROFF(ru_msgsnd), LONG, "ld", 0}, - {"mwchan", "MWCHAN", NULL, LJUST, mwchan, 0, CHAR, NULL, 0}, - {"ni", "", "nice", 0, NULL, 0, CHAR, NULL, 0}, - {"nice", "NI", NULL, 0, kvar, KOFF(ki_nice), CHAR, "d", 0}, - {"nivcsw", "NIVCSW", NULL, USER, rvar, ROFF(ru_nivcsw), LONG, "ld", 0}, - {"nlwp", "NLWP", NULL, 0, kvar, KOFF(ki_numthreads), UINT, NLWPFMT, 0}, - {"nsignals", "", "nsigs", 0, NULL, 0, CHAR, NULL, 0}, - {"nsigs", "NSIGS", NULL, USER, rvar, ROFF(ru_nsignals), LONG, "ld", 0}, - {"nswap", "NSWAP", NULL, USER, rvar, ROFF(ru_nswap), LONG, "ld", 0}, - {"nvcsw", "NVCSW", NULL, USER, rvar, ROFF(ru_nvcsw), LONG, "ld", 0}, - {"nwchan", "NWCHAN", NULL, LJUST, nwchan, 0, CHAR, NULL, 0}, - {"oublk", "OUBLK", NULL, USER, rvar, ROFF(ru_oublock), LONG, "ld", 0}, - {"oublock", "", "oublk", 0, NULL, 0, CHAR, NULL, 0}, - {"paddr", "PADDR", NULL, 0, kvar, KOFF(ki_paddr), KPTR, "lx", 0}, - {"pagein", "PAGEIN", NULL, USER, pagein, 0, CHAR, NULL, 0}, - {"pcpu", "", "%cpu", 0, NULL, 0, CHAR, NULL, 0}, - {"pending", "", "sig", 0, NULL, 0, CHAR, NULL, 0}, - {"pgid", "PGID", NULL, 0, kvar, KOFF(ki_pgid), UINT, PIDFMT, 0}, - {"pid", "PID", NULL, 0, kvar, KOFF(ki_pid), UINT, PIDFMT, 0}, - {"pmem", "", "%mem", 0, NULL, 0, CHAR, NULL, 0}, - {"ppid", "PPID", NULL, 0, kvar, KOFF(ki_ppid), UINT, PIDFMT, 0}, - {"pri", "PRI", NULL, 0, pri, 0, CHAR, NULL, 0}, - {"re", "RE", NULL, INF127, kvar, KOFF(ki_swtime), UINT, "d", 0}, - {"rgid", "RGID", NULL, 0, kvar, KOFF(ki_rgid), UINT, UIDFMT, 0}, - {"rgroup", "RGROUP", NULL, LJUST, rgroupname, 0, CHAR, NULL, 0}, - {"rss", "RSS", NULL, 0, kvar, KOFF(ki_rssize), PGTOK, "ld", 0}, - {"rtprio", "RTPRIO", NULL, 0, priorityr, KOFF(ki_pri), CHAR, NULL, 0}, - {"ruid", "RUID", NULL, 0, kvar, KOFF(ki_ruid), UINT, UIDFMT, 0}, - {"ruser", "RUSER", NULL, LJUST, runame, 0, CHAR, NULL, 0}, - {"sid", "SID", NULL, 0, kvar, KOFF(ki_sid), UINT, PIDFMT, 0}, - {"sig", "PENDING", NULL, 0, kvar, KOFF(ki_siglist), INT, "x", 0}, - {"sigcatch", "CAUGHT", NULL, 0, kvar, KOFF(ki_sigcatch), UINT, "x", 0}, - {"sigignore", "IGNORED", NULL, 0, kvar, KOFF(ki_sigignore), - UINT, "x", 0}, - {"sigmask", "BLOCKED", NULL, 0, kvar, KOFF(ki_sigmask), UINT, "x", 0}, - {"sl", "SL", NULL, INF127, kvar, KOFF(ki_slptime), UINT, "d", 0}, - {"ssiz", "SSIZ", NULL, 0, kvar, KOFF(ki_ssize), PGTOK, "ld", 0}, - {"start", "STARTED", NULL, LJUST|USER, started, 0, CHAR, NULL, 0}, - {"stat", "", "state", 0, NULL, 0, CHAR, NULL, 0}, - {"state", "STAT", NULL, LJUST, state, 0, CHAR, NULL, 0}, - {"svgid", "SVGID", NULL, 0, kvar, KOFF(ki_svgid), UINT, UIDFMT, 0}, - {"svuid", "SVUID", NULL, 0, kvar, KOFF(ki_svuid), UINT, UIDFMT, 0}, - {"systime", "SYSTIME", NULL, USER, systime, 0, CHAR, NULL, 0}, - {"tdaddr", "TDADDR", NULL, 0, kvar, KOFF(ki_tdaddr), KPTR, "lx", 0}, - {"tdev", "TDEV", NULL, 0, tdev, 0, CHAR, NULL, 0}, - {"tdnam", "TDNAM", NULL, LJUST, tdnam, 0, CHAR, NULL, 0}, - {"time", "TIME", NULL, USER, cputime, 0, CHAR, NULL, 0}, - {"tpgid", "TPGID", NULL, 0, kvar, KOFF(ki_tpgid), UINT, PIDFMT, 0}, - {"tracer", "TRACER", NULL, 0, kvar, KOFF(ki_tracer), UINT, PIDFMT, 0}, - {"tsid", "TSID", NULL, 0, kvar, KOFF(ki_tsid), UINT, PIDFMT, 0}, - {"tsiz", "TSIZ", NULL, 0, kvar, KOFF(ki_tsize), PGTOK, "ld", 0}, - {"tt", "TT ", NULL, 0, tname, 0, CHAR, NULL, 0}, - {"tty", "TTY", NULL, LJUST, longtname, 0, CHAR, NULL, 0}, - {"ucomm", "UCOMM", NULL, LJUST, ucomm, 0, CHAR, NULL, 0}, - {"uid", "UID", NULL, 0, kvar, KOFF(ki_uid), UINT, UIDFMT, 0}, - {"upr", "UPR", NULL, 0, upr, 0, CHAR, NULL, 0}, - {"uprocp", "UPROCP", NULL, 0, kvar, KOFF(ki_paddr), KPTR, "lx", 0}, - {"user", "USER", NULL, LJUST, uname, 0, CHAR, NULL, 0}, - {"usertime", "USERTIME", NULL, USER, usertime, 0, CHAR, NULL, 0}, - {"usrpri", "", "upr", 0, NULL, 0, CHAR, NULL, 0}, - {"vsize", "", "vsz", 0, NULL, 0, CHAR, NULL, 0}, - {"vsz", "VSZ", NULL, 0, vsize, 0, CHAR, NULL, 0}, - {"wchan", "WCHAN", NULL, LJUST, wchan, 0, CHAR, NULL, 0}, - {"xstat", "XSTAT", NULL, 0, kvar, KOFF(ki_xstat), USHORT, "x", 0}, - {"", NULL, NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"%cpu", "%CPU", NULL, "percent-cpu", 0, pcpu, 0, CHAR, NULL, 0}, + {"%mem", "%MEM", NULL, "percent-memory", 0, pmem, 0, CHAR, NULL, 0}, + {"acflag", "ACFLG", NULL, "accounting-flag", 0, kvar, KOFF(ki_acflag), + USHORT, "x", 0}, + {"acflg", "", "acflag", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"args", "COMMAND", NULL, "arguments", COMM|LJUST|USER, arguments, 0, + CHAR, NULL, 0}, + {"blocked", "", "sigmask", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"caught", "", "sigcatch", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"class", "CLASS", NULL, "login-class", LJUST, loginclass, 0, CHAR, + NULL, 0}, + {"comm", "COMMAND", NULL, "command", LJUST, ucomm, 0, CHAR, NULL, 0}, + {"command", "COMMAND", NULL, "command", COMM|LJUST|USER, command, 0, + CHAR, NULL, 0}, + {"cow", "COW", NULL, "copy-on-write-faults", 0, kvar, KOFF(ki_cow), + UINT, "u", 0}, + {"cpu", "CPU", NULL, "cpu-usage", 0, kvar, KOFF(ki_estcpu), UINT, "d", + 0}, + {"cputime", "", "time", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"dsiz", "DSIZ", NULL, "data-size", 0, kvar, KOFF(ki_dsize), PGTOK, + "ld", 0}, + {"egid", "", "gid", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"egroup", "", "group", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"emul", "EMUL", NULL, "emulation-envirnment", LJUST, emulname, 0, + CHAR, NULL, 0}, + {"etime", "ELAPSED", NULL, "elapsed-time", USER, elapsed, 0, CHAR, + NULL, 0}, + {"etimes", "ELAPSED", NULL, "elapsed-times", USER, elapseds, 0, CHAR, + NULL, 0}, + {"euid", "", "uid", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"f", "F", NULL, "flags", 0, kvar, KOFF(ki_flag), INT, "x", 0}, + {"f2", "F2", NULL, "flags2", 0, kvar, KOFF(ki_flag2), INT, "08x", 0}, + {"fib", "FIB", NULL, "fib", 0, kvar, KOFF(ki_fibnum), INT, "d", 0}, + {"flags", "", "f", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"flags2", "", "f2", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"gid", "GID", NULL, "gid", 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0}, + {"group", "GROUP", NULL, "group", LJUST, egroupname, 0, CHAR, NULL, 0}, + {"ignored", "", "sigignore", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"inblk", "INBLK", NULL, "read-blocks", USER, rvar, ROFF(ru_inblock), + LONG, "ld", 0}, + {"inblock", "", "inblk", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"jid", "JID", NULL, "jail-id", 0, kvar, KOFF(ki_jid), INT, "d", 0}, + {"jobc", "JOBC", NULL, "job-control-count", 0, kvar, KOFF(ki_jobc), + SHORT, "d", 0}, + {"ktrace", "KTRACE", NULL, "ktrace", 0, kvar, KOFF(ki_traceflag), INT, + "x", 0}, + {"label", "LABEL", NULL, "label", LJUST, label, 0, CHAR, NULL, 0}, + {"lim", "LIM", NULL, "memory-limit", 0, maxrss, 0, CHAR, NULL, 0}, + {"lockname", "LOCK", NULL, "lock-name", LJUST, lockname, 0, CHAR, NULL, + 0}, + {"login", "LOGIN", NULL, "login-name", LJUST, logname, 0, CHAR, NULL, + 0}, + {"logname", "", "login", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"lstart", "STARTED", NULL, "start-time", LJUST|USER, lstarted, 0, + CHAR, NULL, 0}, + {"lwp", "LWP", NULL, "process-thread-id", 0, kvar, KOFF(ki_tid), UINT, + LWPFMT, 0}, + {"majflt", "MAJFLT", NULL, "major-faults", USER, rvar, ROFF(ru_majflt), + LONG, "ld", 0}, + {"minflt", "MINFLT", NULL, "minor-faults", USER, rvar, ROFF(ru_minflt), + LONG, "ld", 0}, + {"msgrcv", "MSGRCV", NULL, "received-messages", USER, rvar, + ROFF(ru_msgrcv), LONG, "ld", 0}, + {"msgsnd", "MSGSND", NULL, "sent-messages", USER, rvar, + ROFF(ru_msgsnd), LONG, "ld", 0}, + {"mwchan", "MWCHAN", NULL, "wait-channel", LJUST, mwchan, 0, CHAR, + NULL, 0}, + {"ni", "", "nice", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"nice", "NI", NULL, "nice", 0, kvar, KOFF(ki_nice), CHAR, "d", 0}, + {"nivcsw", "NIVCSW", NULL, "involuntary-context-switches", USER, rvar, + ROFF(ru_nivcsw), LONG, "ld", 0}, + {"nlwp", "NLWP", NULL, "threads", 0, kvar, KOFF(ki_numthreads), UINT, + NLWPFMT, 0}, + {"nsignals", "", "nsigs", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"nsigs", "NSIGS", NULL, "signals-taken", USER, rvar, + ROFF(ru_nsignals), LONG, "ld", 0}, + {"nswap", "NSWAP", NULL, "swaps", USER, rvar, ROFF(ru_nswap), LONG, + "ld", 0}, + {"nvcsw", "NVCSW", NULL, "voluntary-context-switches", USER, rvar, + ROFF(ru_nvcsw), LONG, "ld", 0}, + {"nwchan", "NWCHAN", NULL, "wait-channel-address", LJUST, nwchan, 0, + CHAR, NULL, 0}, + {"oublk", "OUBLK", NULL, "written-blocks", USER, rvar, + ROFF(ru_oublock), LONG, "ld", 0}, + {"oublock", "", "oublk", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"paddr", "PADDR", NULL, "process-address", 0, kvar, KOFF(ki_paddr), + KPTR, "lx", 0}, + {"pagein", "PAGEIN", NULL, "pageins", USER, pagein, 0, CHAR, NULL, 0}, + {"pcpu", "", "%cpu", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"pending", "", "sig", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"pgid", "PGID", NULL, "process-group", 0, kvar, KOFF(ki_pgid), UINT, + PIDFMT, 0}, + {"pid", "PID", NULL, "pid", 0, kvar, KOFF(ki_pid), UINT, PIDFMT, 0}, + {"pmem", "", "%mem", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"ppid", "PPID", NULL, "ppid", 0, kvar, KOFF(ki_ppid), UINT, PIDFMT, 0}, + {"pri", "PRI", NULL, "priority", 0, pri, 0, CHAR, NULL, 0}, + {"re", "RE", NULL, "residency-time", INF127, kvar, KOFF(ki_swtime), + UINT, "d", 0}, + {"rgid", "RGID", NULL, "real-gid", 0, kvar, KOFF(ki_rgid), UINT, + UIDFMT, 0}, + {"rgroup", "RGROUP", NULL, "real-group", LJUST, rgroupname, 0, CHAR, + NULL, 0}, + {"rss", "RSS", NULL, "rss", 0, kvar, KOFF(ki_rssize), PGTOK, "ld", 0}, + {"rtprio", "RTPRIO", NULL, "realtime-priority", 0, priorityr, + KOFF(ki_pri), CHAR, NULL, 0}, + {"ruid", "RUID", NULL, "real-uid", 0, kvar, KOFF(ki_ruid), UINT, + UIDFMT, 0}, + {"ruser", "RUSER", NULL, "real-user", LJUST, runame, 0, CHAR, NULL, 0}, + {"sid", "SID", NULL, "sid", 0, kvar, KOFF(ki_sid), UINT, PIDFMT, 0}, + {"sig", "PENDING", NULL, "signals-pending", 0, kvar, KOFF(ki_siglist), + INT, "x", 0}, + {"sigcatch", "CAUGHT", NULL, "signals-caught", 0, kvar, + KOFF(ki_sigcatch), UINT, "x", 0}, + {"sigignore", "IGNORED", NULL, "signals-ignored", 0, kvar, + KOFF(ki_sigignore), UINT, "x", 0}, + {"sigmask", "BLOCKED", NULL, "signal-mask", 0, kvar, KOFF(ki_sigmask), + UINT, "x", 0}, + {"sl", "SL", NULL, "sleep-time", INF127, kvar, KOFF(ki_slptime), UINT, + "d", 0}, + {"ssiz", "SSIZ", NULL, "stack-size", 0, kvar, KOFF(ki_ssize), PGTOK, + "ld", 0}, + {"start", "STARTED", NULL, "start-time", LJUST|USER, started, 0, CHAR, + NULL, 0}, + {"stat", "", "state", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"state", "STAT", NULL, "state", LJUST, state, 0, CHAR, NULL, 0}, + {"svgid", "SVGID", NULL, "saved-gid", 0, kvar, KOFF(ki_svgid), UINT, + UIDFMT, 0}, + {"svuid", "SVUID", NULL, "saved-uid", 0, kvar, KOFF(ki_svuid), UINT, + UIDFMT, 0}, + {"systime", "SYSTIME", NULL, "system-time", USER, systime, 0, CHAR, + NULL, 0}, + {"tdaddr", "TDADDR", NULL, "thread-address", 0, kvar, KOFF(ki_tdaddr), + KPTR, "lx", 0}, + {"tdev", "TDEV", NULL, "terminal-device", 0, tdev, 0, CHAR, NULL, 0}, + {"tdnam", "TDNAM", NULL, "terminal-device-name", LJUST, tdnam, 0, CHAR, + NULL, 0}, + {"time", "TIME", NULL, "cpu-time", USER, cputime, 0, CHAR, NULL, 0}, + {"tpgid", "TPGID", NULL, "terminal-process-gid", 0, kvar, + KOFF(ki_tpgid), UINT, PIDFMT, 0}, + {"tracer", "TRACER", NULL, "tracer", 0, kvar, KOFF(ki_tracer), UINT, + PIDFMT, 0}, + {"tsid", "TSID", NULL, "terminal-sid", 0, kvar, KOFF(ki_tsid), UINT, + PIDFMT, 0}, + {"tsiz", "TSIZ", NULL, "text-size", 0, kvar, KOFF(ki_tsize), PGTOK, + "ld", 0}, + {"tt", "TT ", NULL, "terminal-name", 0, tname, 0, CHAR, NULL, 0}, + {"tty", "TTY", NULL, "tty", LJUST, longtname, 0, CHAR, NULL, 0}, + {"ucomm", "UCOMM", NULL, "accounting-name", LJUST, ucomm, 0, CHAR, + NULL, 0}, + {"uid", "UID", NULL, "uid", 0, kvar, KOFF(ki_uid), UINT, UIDFMT, 0}, + {"upr", "UPR", NULL, "user-priority", 0, upr, 0, CHAR, NULL, 0}, + {"uprocp", "UPROCP", NULL, "process-address", 0, kvar, KOFF(ki_paddr), + KPTR, "lx", 0}, + {"user", "USER", NULL, "user", LJUST, uname, 0, CHAR, NULL, 0}, + {"usertime", "USERTIME", NULL, "user-time", USER, usertime, 0, CHAR, + NULL, 0}, + {"usrpri", "", "upr", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"vsize", "", "vsz", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"vsz", "VSZ", NULL, "virtual-size", 0, vsize, 0, CHAR, NULL, 0}, + {"wchan", "WCHAN", NULL, "wait-channel", LJUST, wchan, 0, CHAR, NULL, + 0}, + {"xstat", "XSTAT", NULL, "exit-status", 0, kvar, KOFF(ki_xstat), + USHORT, "x", 0}, + {"", NULL, NULL, NULL, 0, NULL, 0, CHAR, NULL, 0}, }; void @@ -185,16 +240,19 @@ showkey(void) i = 0; sep = ""; + xo_open_list("key"); for (v = var; *(p = v->name); ++v) { int len = strlen(p); if (termwidth && (i += len + 1) > termwidth) { i = len; sep = "\n"; } - (void) printf("%s%s", sep, p); + xo_emit("{P:/%s}{l:key/%s}", sep, p); sep = " "; } - (void) printf("\n"); + xo_emit("\n"); + xo_close_list("key"); + xo_finish(); } void Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Fri May 22 21:51:36 2015 (r283303) +++ head/bin/ps/print.c Fri May 22 23:07:55 2015 (r283304) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "ps.h" @@ -85,15 +86,15 @@ printheader(void) v = vent->var; if (v->flag & LJUST) { if (STAILQ_NEXT(vent, next_ve) == NULL) /* last one */ - (void)printf("%s", vent->header); + xo_emit("{T:/%s}", vent->header); else - (void)printf("%-*s", v->width, vent->header); + xo_emit("{T:/%-*s}", v->width, vent->header); } else - (void)printf("%*s", v->width, vent->header); + xo_emit("{T:/%*s}", v->width, vent->header); if (STAILQ_NEXT(vent, next_ve) != NULL) - (void)putchar(' '); + xo_emit("{P: }"); } - (void)putchar('\n'); + xo_emit("\n"); } char * @@ -102,7 +103,7 @@ arguments(KINFO *k, VARENT *ve) char *vis_args; if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH); if (STAILQ_NEXT(ve, next_ve) != NULL && strlen(vis_args) > ARGUMENTS_WIDTH) @@ -130,7 +131,7 @@ command(KINFO *k, VARENT *ve) return (str); } if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH); if (STAILQ_NEXT(ve, next_ve) == NULL) { @@ -139,7 +140,7 @@ command(KINFO *k, VARENT *ve) if (k->ki_env) { if ((vis_env = malloc(strlen(k->ki_env) * 4 + 1)) == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); strvis(vis_env, k->ki_env, VIS_TAB | VIS_NL | VIS_NOSLASH); } else @@ -215,7 +216,7 @@ state(KINFO *k, VARENT *ve __unused) buf = malloc(16); if (buf == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); flag = k->ki_p->ki_flag; tdflags = k->ki_p->ki_tdflags; /* XXXKSE */ @@ -391,7 +392,7 @@ started(KINFO *k, VARENT *ve __unused) buf = malloc(buflen); if (buf == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); then = k->ki_p->ki_start.tv_sec; tp = localtime(&then); @@ -416,7 +417,7 @@ lstarted(KINFO *k, VARENT *ve __unused) buf = malloc(buflen); if (buf == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); then = k->ki_p->ki_start.tv_sec; (void)strftime(buf, buflen, "%c", localtime(&then)); @@ -762,7 +763,7 @@ printval(void *bp, VAR *v) (void)asprintf(&str, ofmt, ps_pgtok(*(u_long *)bp)); break; default: - errx(1, "unknown type %d", v->type); + xo_errx(1, "unknown type %d", v->type); } return (str); @@ -804,7 +805,7 @@ label(KINFO *k, VARENT *ve __unused) string = NULL; if (mac_prepare_process_label(&proclabel) == -1) { - warn("mac_prepare_process_label"); + xo_warn("mac_prepare_process_label"); goto out; } error = mac_get_pid(k->ki_p->ki_pid, proclabel); Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Fri May 22 21:51:36 2015 (r283303) +++ head/bin/ps/ps.1 Fri May 22 23:07:55 2015 (r283304) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd December 9, 2014 +.Dd May 22, 2015 .Dt PS 1 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nd process status .Sh SYNOPSIS .Nm +.Op Fl -libxo .Op Fl aCcdefHhjlmrSTuvwXxZ .Op Fl O Ar fmt | Fl o Ar fmt .Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ... @@ -47,6 +48,7 @@ .Op Fl t Ar tty Ns Op , Ns Ar tty Ns Ar ... .Op Fl U Ar user Ns Op , Ns Ar user Ns Ar ... .Nm +.Op Fl -libxo .Op Fl L .Sh DESCRIPTION The @@ -733,7 +735,9 @@ Display information on all system proces .Xr procstat 1 , .Xr w 1 , .Xr kvm 3 , +.Xr libxo 3 .Xr strftime 3 , +.Xr xo_parse_args 3 .Xr mac 4 , .Xr procfs 5 , .Xr pstat 8 , Modified: head/bin/ps/ps.c ============================================================================== --- head/bin/ps/ps.c Fri May 22 21:51:36 2015 (r283303) +++ head/bin/ps/ps.c Fri May 22 23:07:55 2015 (r283304) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "ps.h" @@ -184,7 +185,9 @@ main(int argc, char *argv[]) int all, ch, elem, flag, _fmt, i, lineno, linelen, left; int descendancy, nentries, nkept, nselectors; int prtheader, wflag, what, xkeep, xkeep_implied; + int fwidthmin, fwidthmax; char errbuf[_POSIX2_LINE_MAX]; + char fmtbuf[_POSIX2_LINE_MAX]; (void) setlocale(LC_ALL, ""); time(&now); /* Used by routines in print.c. */ @@ -221,6 +224,11 @@ main(int argc, char *argv[]) init_list(&uidlist, addelem_uid, sizeof(uid_t), "user"); memf = _PATH_DEVNULL; nlistf = NULL; + + argc = xo_parse_args(argc, argv); + if (argc < 0) + exit(1); + while ((ch = getopt(argc, argv, PS_ARGS)) != -1) switch (ch) { case 'A': @@ -363,7 +371,7 @@ main(int argc, char *argv[]) #endif case 'T': if ((optarg = ttyname(STDIN_FILENO)) == NULL) - errx(1, "stdin: not a terminal"); + xo_errx(1, "stdin: not a terminal"); /* FALLTHROUGH */ case 't': add_list(&ttylist, optarg); @@ -434,8 +442,7 @@ main(int argc, char *argv[]) argv++; } if (*argv) { - fprintf(stderr, "%s: illegal argument: %s\n", - getprogname(), *argv); + xo_warnx("illegal argument: %s\n", *argv); usage(); } if (optfatal) @@ -445,7 +452,7 @@ main(int argc, char *argv[]) kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf); if (kd == 0) - errx(1, "%s", errbuf); + xo_errx(1, "%s", errbuf); if (!_fmt) parsefmt(dfmt, 0); @@ -453,7 +460,7 @@ main(int argc, char *argv[]) if (nselectors == 0) { uidlist.l.ptr = malloc(sizeof(uid_t)); if (uidlist.l.ptr == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); nselectors = 1; uidlist.count = uidlist.maxcount = 1; *uidlist.l.uids = getuid(); @@ -515,11 +522,11 @@ main(int argc, char *argv[]) nentries = -1; kp = kvm_getprocs(kd, what, flag, &nentries); if ((kp == NULL && nentries > 0) || (kp != NULL && nentries < 0)) - errx(1, "%s", kvm_geterr(kd)); + xo_errx(1, "%s", kvm_geterr(kd)); nkept = 0; if (nentries > 0) { if ((kinfo = malloc(nentries * sizeof(*kinfo))) == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); for (i = nentries; --i >= 0; ++kp) { /* * If the user specified multiple selection-criteria, @@ -629,13 +636,18 @@ main(int argc, char *argv[]) /* * Print header. */ + xo_open_container("process-information"); printheader(); + if (xo_get_style(NULL) != XO_STYLE_TEXT) + termwidth = UNLIMITED; /* * Output formatted lines. */ + xo_open_list("process"); for (i = lineno = 0; i < nkept; i++) { linelen = 0; + xo_open_instance("process"); STAILQ_FOREACH(vent, &varlist, next_ve) { if (vent->var->flag & LJUST) fmtstr = "%-*s"; @@ -645,21 +657,27 @@ main(int argc, char *argv[]) ks = STAILQ_FIRST(&kinfo[i].ki_ks); STAILQ_REMOVE_HEAD(&kinfo[i].ki_ks, ks_next); /* Truncate rightmost column if necessary. */ + fwidthmax = _POSIX2_LINE_MAX; if (STAILQ_NEXT(vent, next_ve) == NULL && termwidth != UNLIMITED && ks->ks_str != NULL) { left = termwidth - linelen; if (left > 0 && left < (int)strlen(ks->ks_str)) - ks->ks_str[left] = '\0'; + fwidthmax = left; } + str = ks->ks_str; if (str == NULL) str = "-"; /* No padding for the last column, if it's LJUST. */ - if (STAILQ_NEXT(vent, next_ve) == NULL && - vent->var->flag & LJUST) - linelen += printf(fmtstr, 0, str); - else - linelen += printf(fmtstr, vent->var->width, str); + fwidthmin = (xo_get_style(NULL) != XO_STYLE_TEXT || + (STAILQ_NEXT(vent, next_ve) == NULL && + (vent->var->flag & LJUST))) ? 0 : vent->var->width; + snprintf(fmtbuf, sizeof(fmtbuf), "{:%s/%%%s%d..%ds}", + vent->var->field ?: vent->var->name, + (vent->var->flag & LJUST) ? "-" : "", + fwidthmin, fwidthmax); + xo_emit(fmtbuf, str); + linelen += fwidthmin; if (ks->ks_str != NULL) { free(ks->ks_str); @@ -669,17 +687,22 @@ main(int argc, char *argv[]) ks = NULL; if (STAILQ_NEXT(vent, next_ve) != NULL) { - (void)putchar(' '); + xo_emit("{P: }"); linelen++; } } - (void)putchar('\n'); + xo_emit("\n"); + xo_close_instance("process"); if (prtheader && lineno++ == prtheader - 4) { - (void)putchar('\n'); + xo_emit("\n"); printheader(); lineno = 0; } } + xo_close_list("process"); + xo_close_container("process-information"); + xo_finish(); + free_list(&gidlist); free_list(&jidlist); free_list(&pidlist); @@ -705,9 +728,9 @@ addelem_gid(struct listinfo *inf, const if (*elem == '\0' || strlen(elem) >= MAXLOGNAME) { if (*elem == '\0') - warnx("Invalid (zero-length) %s name", inf->lname); + xo_warnx("Invalid (zero-length) %s name", inf->lname); else - warnx("%s name too long: %s", inf->lname, elem); + xo_warnx("%s name too long: %s", inf->lname, elem); optfatal = 1; return (0); /* Do not add this value. */ } @@ -732,7 +755,7 @@ addelem_gid(struct listinfo *inf, const if (grp == NULL) grp = getgrnam(elem); if (grp == NULL) { - warnx("No %s %s '%s'", inf->lname, nameorID, elem); + xo_warnx("No %s %s '%s'", inf->lname, nameorID, elem); optfatal = 1; return (0); } @@ -773,7 +796,7 @@ addelem_pid(struct listinfo *inf, const long tempid; if (*elem == '\0') { - warnx("Invalid (zero-length) process id"); + xo_warnx("Invalid (zero-length) process id"); optfatal = 1; return (0); /* Do not add this value. */ } @@ -781,10 +804,10 @@ addelem_pid(struct listinfo *inf, const errno = 0; tempid = strtol(elem, &endp, 10); if (*endp != '\0' || tempid < 0 || elem == endp) { - warnx("Invalid %s: %s", inf->lname, elem); + xo_warnx("Invalid %s: %s", inf->lname, elem); errno = ERANGE; } else if (errno != 0 || tempid > pid_max) { - warnx("%s too large: %s", inf->lname, elem); + xo_warnx("%s too large: %s", inf->lname, elem); errno = ERANGE; } if (errno == ERANGE) { @@ -855,19 +878,19 @@ addelem_tty(struct listinfo *inf, const if (ttypath) { if (stat(ttypath, &sb) == -1) { if (pathbuf3[0] != '\0') - warn("%s, %s, and %s", pathbuf3, pathbuf2, + xo_warn("%s, %s, and %s", pathbuf3, pathbuf2, ttypath); else - warn("%s", ttypath); + xo_warn("%s", ttypath); optfatal = 1; return (0); } if (!S_ISCHR(sb.st_mode)) { if (pathbuf3[0] != '\0') - warnx("%s, %s, and %s: Not a terminal", + xo_warnx("%s, %s, and %s: Not a terminal", pathbuf3, pathbuf2, ttypath); else - warnx("%s: Not a terminal", ttypath); + xo_warnx("%s: Not a terminal", ttypath); optfatal = 1; return (0); } @@ -887,9 +910,9 @@ addelem_uid(struct listinfo *inf, const if (*elem == '\0' || strlen(elem) >= MAXLOGNAME) { if (*elem == '\0') - warnx("Invalid (zero-length) %s name", inf->lname); + xo_warnx("Invalid (zero-length) %s name", inf->lname); else - warnx("%s name too long: %s", inf->lname, elem); + xo_warnx("%s name too long: %s", inf->lname, elem); optfatal = 1; return (0); /* Do not add this value. */ } @@ -899,12 +922,12 @@ addelem_uid(struct listinfo *inf, const errno = 0; bigtemp = strtoul(elem, &endp, 10); if (errno != 0 || *endp != '\0' || bigtemp > UID_MAX) - warnx("No %s named '%s'", inf->lname, elem); + xo_warnx("No %s named '%s'", inf->lname, elem); else { /* The string is all digits, so it might be a userID. */ pwd = getpwuid((uid_t)bigtemp); if (pwd == NULL) - warnx("No %s name or ID matches '%s'", + xo_warnx("No %s name or ID matches '%s'", inf->lname, elem); } } @@ -961,7 +984,7 @@ add_list(struct listinfo *inf, const cha while (*argp != '\0' && strchr(W_SEP T_SEP, *argp) == NULL) argp++; - warnx("Value too long: %.*s", (int)(argp - savep), + xo_warnx("Value too long: %.*s", (int)(argp - savep), savep); optfatal = 1; } @@ -1062,7 +1085,7 @@ descendant_sort(KINFO *ki, int items) continue; } if ((ki[src].ki_d.prefix = malloc(lvl * 2 + 1)) == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); for (n = 0; n < lvl - 2; n++) { ki[src].ki_d.prefix[n * 2] = path[n / 8] & 1 << (n % 8) ? '|' : ' '; @@ -1100,7 +1123,7 @@ expand_list(struct listinfo *inf) newlist = realloc(inf->l.ptr, newmax * inf->elemsize); if (newlist == NULL) { free(inf->l.ptr); - errx(1, "realloc to %d %ss failed", newmax, inf->lname); + xo_errx(1, "realloc to %d %ss failed", newmax, inf->lname); } inf->maxcount = newmax; inf->l.ptr = newlist; @@ -1174,7 +1197,7 @@ format_output(KINFO *ki) str = (v->oproc)(ki, vent); ks = malloc(sizeof(*ks)); if (ks == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); ks->ks_str = str; STAILQ_INSERT_TAIL(&ki->ki_ks, ks, ks_next); if (str != NULL) { @@ -1240,7 +1263,7 @@ saveuser(KINFO *ki) else asprintf(&ki->ki_args, "(%s)", ki->ki_p->ki_comm); if (ki->ki_args == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); } else { ki->ki_args = NULL; } @@ -1251,7 +1274,7 @@ saveuser(KINFO *ki) else ki->ki_env = strdup("()"); if (ki->ki_env == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); } else { ki->ki_env = NULL; } @@ -1372,7 +1395,7 @@ kludge_oldps_options(const char *optlist * original value. */ if ((newopts = ns = malloc(len + 3)) == NULL) - errx(1, "malloc failed"); + xo_errx(1, "malloc failed"); if (*origval != '-') *ns++ = '-'; /* add option flag */ @@ -1401,7 +1424,7 @@ pidmax_init(void) intsize = sizeof(pid_max); if (sysctlbyname("kern.pid_max", &pid_max, &intsize, NULL, 0) < 0) { - warn("unable to read kern.pid_max"); + xo_warn("unable to read kern.pid_max"); pid_max = 99999; } } @@ -1411,7 +1434,7 @@ usage(void) { #define SINGLE_OPTS "[-aCcde" OPT_LAZY_f "HhjlmrSTuvwXxZ]" - (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", + (void)xo_error("%s\n%s\n%s\n%s\n", "usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]", " [-J jid[,jid...]] [-M core] [-N system]", " [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]", Modified: head/bin/ps/ps.h ============================================================================== --- head/bin/ps/ps.h Fri May 22 21:51:36 2015 (r283303) +++ head/bin/ps/ps.h Fri May 22 23:07:55 2015 (r283304) @@ -65,6 +65,7 @@ typedef struct var { const char *name; /* name(s) of variable */ const char *header; /* default header */ const char *alias; /* aliases */ + const char *field; /* xo field name */ #define COMM 0x01 /* needs exec arguments and environment (XXX) */ #define LJUST 0x02 /* left adjust on output (trailing blanks) */ #define USER 0x04 /* needs user structure */ From owner-svn-src-head@FreeBSD.ORG Fri May 22 23:58:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9BC055F for ; Fri, 22 May 2015 23:58:37 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 769091FF8 for ; Fri, 22 May 2015 23:58:37 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MNwbR7084632 for ; Fri, 22 May 2015 23:58:37 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t4MNwbJV084628 for svn-src-head@freebsd.org; Fri, 22 May 2015 23:58:37 GMT (envelope-from bdrewery) Received: (qmail 36590 invoked from network); 22 May 2015 18:58:35 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 22 May 2015 18:58:35 -0500 Message-ID: <555FC2B1.3020609@FreeBSD.org> Date: Fri, 22 May 2015 18:58:41 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283304 - head/bin/ps References: <201505222307.t4MN7tDa030331@svn.freebsd.org> In-Reply-To: <201505222307.t4MN7tDa030331@svn.freebsd.org> OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aFQBHc494bxMs16AQUblGRpPa2ai3bMN6" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 23:58:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aFQBHc494bxMs16AQUblGRpPa2ai3bMN6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 5/22/2015 6:07 PM, Marcel Moolenaar wrote: > +.Op Fl -libxo This [--libxo] is really lacking in documentation. ~ # man w|grep xo w [--libxo] [-dhin] [-M core] [-N system] [user ...] finger(1), ps(1), uptime(1), who(1), libxo(3), xo_parse_args(3) ~ # w --libxo w: missing libxo option Can you please document how this flag actually works for the utilities it has been added to? The linked references are libraries yet I just want to get a tool to spit something out with xo. I have no idea what to do based on the manpages. --=20 Regards, Bryan Drewery --aFQBHc494bxMs16AQUblGRpPa2ai3bMN6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVX8KxAAoJEDXXcbtuRpfPg2EH/j1NcPSBg5cAXmayenTwMEoA BgqKfur1LAQIfMTuXth5BOU/tmjrZr/ofrR0JAEu3dlwCtSKc5lGV4IuriYt3Kit PCbss6EIDWsNpe+FXaqTKJ6Z0BIPBjbtyaUN9v8rOqE7XyHkGBK5or0IBBhXnDOD KRtU1QNxFHrk4QMlLCfQq2v5As/NBwh+EiBYp3F0MI6du9hiYTxATHzCmwqJ+529 FwMdXlpqnPXFBIBlcvnqjjBcXn7n8buVC4FgQr1Up9iF4TDAoUQgqyfs1jXqbcHQ X3XCoj5z0vzIWYnRALxzxKACXpRHE3cDJt1ZfXks7/NftMz40mH43dclGhD32yk= =X2xu -----END PGP SIGNATURE----- --aFQBHc494bxMs16AQUblGRpPa2ai3bMN6-- From owner-svn-src-head@FreeBSD.ORG Sat May 23 00:32:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FFA0907; Sat, 23 May 2015 00:32:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EA3C1397; Sat, 23 May 2015 00:32:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4N0WxS5075602; Sat, 23 May 2015 00:32:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4N0WxoG075601; Sat, 23 May 2015 00:32:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505230032.t4N0WxoG075601@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 23 May 2015 00:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283307 - head/release/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 00:32:59 -0000 Author: gjb Date: Sat May 23 00:32:58 2015 New Revision: 283307 URL: https://svnweb.freebsd.org/changeset/base/283307 Log: Use mkimg(1) to create the i386 memstick images, similar to how is done for amd64. The exception here is there is no EFI partition for i386. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/i386/make-memstick.sh Modified: head/release/i386/make-memstick.sh ============================================================================== --- head/release/i386/make-memstick.sh Fri May 22 23:55:59 2015 (r283306) +++ head/release/i386/make-memstick.sh Sat May 23 00:32:58 2015 (r283307) @@ -29,20 +29,13 @@ if [ -e ${2} ]; then fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab -makefs -B little -o label=FreeBSD_Install ${2} ${1} +makefs -B little -o label=FreeBSD_Install ${2}.part ${1} if [ $? -ne 0 ]; then echo "makefs failed" exit 1 fi rm ${1}/etc/fstab -unit=$(mdconfig -a -t vnode -f ${2}) -if [ $? -ne 0 ]; then - echo "mdconfig failed" - exit 1 -fi -gpart create -s BSD ${unit} -gpart bootcode -b ${1}/boot/boot ${unit} -gpart add -t freebsd-ufs ${unit} -mdconfig -d -u ${unit} +mkimg -s gpt -b ${1}/boot/pmbr -p freebsd-boot:=${1}/boot/gptboot -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} +rm ${2}.part From owner-svn-src-head@FreeBSD.ORG Sat May 23 01:17:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D8FF142; Sat, 23 May 2015 01:17:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BD4D17CB; Sat, 23 May 2015 01:17:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4N1HpwK095762; Sat, 23 May 2015 01:17:51 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4N1HpIU095761; Sat, 23 May 2015 01:17:51 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201505230117.t4N1HpIU095761@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sat, 23 May 2015 01:17:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283308 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 01:17:51 -0000 Author: neel Date: Sat May 23 01:17:50 2015 New Revision: 283308 URL: https://svnweb.freebsd.org/changeset/base/283308 Log: Exceptions don't deliver an error code in real mode. MFC after: 1 week Modified: head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Sat May 23 00:32:58 2015 (r283307) +++ head/sys/amd64/vmm/vmm.c Sat May 23 01:17:50 2015 (r283308) @@ -1785,6 +1785,7 @@ vm_inject_exception(struct vm *vm, int v uint32_t errcode, int restart_instruction) { struct vcpu *vcpu; + uint64_t regval; int error; if (vcpuid < 0 || vcpuid >= VM_MAXCPU) @@ -1809,6 +1810,16 @@ vm_inject_exception(struct vm *vm, int v return (EBUSY); } + if (errcode_valid) { + /* + * Exceptions don't deliver an error code in real mode. + */ + error = vm_get_register(vm, vcpuid, VM_REG_GUEST_CR0, ®val); + KASSERT(!error, ("%s: error %d getting CR0", __func__, error)); + if (!(regval & CR0_PE)) + errcode_valid = 0; + } + /* * From section 26.6.1 "Interruptibility State" in Intel SDM: * From owner-svn-src-head@FreeBSD.ORG Sat May 23 08:02:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFFA99B1; Sat, 23 May 2015 08:02:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDDB51FF2; Sat, 23 May 2015 08:02:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4N82sEh097529; Sat, 23 May 2015 08:02:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4N82sLA097528; Sat, 23 May 2015 08:02:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505230802.t4N82sLA097528@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 23 May 2015 08:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283309 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 08:02:55 -0000 Author: adrian Date: Sat May 23 08:02:54 2015 New Revision: 283309 URL: https://svnweb.freebsd.org/changeset/base/283309 Log: Add support for the tuning cap for Hornet/AR9331 boards. This dramatically improves RX sensitivity and behaviour on the AR9331 hardware I have, including the Carambola 2. Tested: * AR9331, Carambola 2 board Submitted by: Zilvinas Valinskas Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Sat May 23 01:17:50 2015 (r283308) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Sat May 23 08:02:54 2015 (r283309) @@ -4476,8 +4476,16 @@ HAL_BOOL ar9300_tuning_caps_apply(struct if ((eep->base_eep_header.feature_enable & 0x40) >> 6) { tuning_caps_params &= 0x7f; - if (AR_SREV_HORNET(ah) || AR_SREV_POSEIDON(ah) || AR_SREV_WASP(ah)) { + /* XXX TODO: ath9k skips it for Wasp and Honeybee/AR9531, not Poseidon */ + if (AR_SREV_POSEIDON(ah) || AR_SREV_WASP(ah)) { return AH_TRUE; + } else if (AR_SREV_HORNET(ah)) { + OS_REG_RMW_FIELD(ah, + AR_HORNET_CH0_XTAL, AR_OSPREY_CHO_XTAL_CAPINDAC, + tuning_caps_params); + OS_REG_RMW_FIELD(ah, + AR_HORNET_CH0_XTAL, AR_OSPREY_CHO_XTAL_CAPOUTDAC, + tuning_caps_params); } else if (AR_SREV_SCORPION(ah)) { OS_REG_RMW_FIELD(ah, AR_SCORPION_CH0_XTAL, AR_OSPREY_CHO_XTAL_CAPINDAC, From owner-svn-src-head@FreeBSD.ORG Sat May 23 09:49:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57E09D06; Sat, 23 May 2015 09:49:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45CB71A4F; Sat, 23 May 2015 09:49:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4N9nfDI048293; Sat, 23 May 2015 09:49:41 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4N9neDw048291; Sat, 23 May 2015 09:49:40 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505230949.t4N9neDw048291@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 23 May 2015 09:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283313 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 09:49:41 -0000 Author: ae Date: Sat May 23 09:49:40 2015 New Revision: 283313 URL: https://svnweb.freebsd.org/changeset/base/283313 Log: Properly update TX statistics for wlan(4). ieee80211_pwrsave() can fail due to queue overflow, check its return code and increment oerrors counter when it fails. Also handle more error cases and update oerrors counter when we don't send mbuf due to some errors. Return ENETDOWN when parent interface isn't ready. Update obytes and omcasts counters in corresponding places. PR: 184626 Differential Revision: https://reviews.freebsd.org/D2621 Reviewed by: adrian MFC after: 1 week Modified: head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_wds.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sat May 23 09:48:59 2015 (r283312) +++ head/sys/net80211/ieee80211_output.c Sat May 23 09:49:40 2015 (r283313) @@ -132,7 +132,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 { struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = vap->iv_ifp; - int error; + int error, len, mcast; if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && (m->m_flags & M_PWR_SAV) == 0) { @@ -142,7 +142,8 @@ ieee80211_vap_pkt_send_dest(struct ieee8 * the frame back when the time is right. * XXX lose WDS vap linkage? */ - (void) ieee80211_pwrsave(ni, m); + if (ieee80211_pwrsave(ni, m) != 0) + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); ieee80211_free_node(ni); /* @@ -171,6 +172,8 @@ ieee80211_vap_pkt_send_dest(struct ieee8 * interface it (might have been) received on. */ m->m_pkthdr.rcvif = (void *)ni; + mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1: 0; + len = m->m_pkthdr.len; BPF_MTAP(ifp, m); /* 802.3 tx */ @@ -236,7 +239,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 /* NB: stat+msg handled in ieee80211_encap */ IEEE80211_TX_UNLOCK(ic); ieee80211_free_node(ni); - /* XXX better status? */ + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (ENOBUFS); } } @@ -250,8 +253,11 @@ ieee80211_vap_pkt_send_dest(struct ieee8 if (error != 0) { /* NB: IFQ_HANDOFF reclaims mbuf */ ieee80211_free_node(ni); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } else { if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_OMCASTS, mcast); + if_inc_counter(ifp, IFCOUNTER_OBYTES, len); } ic->ic_lastdata = ticks; @@ -315,6 +321,7 @@ ieee80211_start_pkt(struct ieee80211vap eh->ether_dhost, "mcast", "%s", "on DWDS"); vap->iv_stats.is_dwds_mcast++; m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); /* XXX better status? */ return (ENOBUFS); } @@ -397,7 +404,8 @@ ieee80211_start_pkt(struct ieee80211vap * for transmit. */ ic->ic_lastdata = ticks; - (void) ieee80211_pwrsave(ni, m); + if (ieee80211_pwrsave(ni, m) != 0) + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); ieee80211_free_node(ni); ieee80211_new_state(vap, IEEE80211_S_RUN, 0); return (0); @@ -429,9 +437,9 @@ ieee80211_vap_transmit(struct ifnet *ifp IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT, "%s: ignore queue, parent %s not up+running\n", __func__, parent->if_xname); - /* XXX stat */ m_freem(m); - return (EINVAL); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ENETDOWN); } /* @@ -453,7 +461,8 @@ ieee80211_vap_transmit(struct ifnet *ifp IEEE80211_UNLOCK(ic); ifp->if_drv_flags |= IFF_DRV_OACTIVE; m_freem(m); - return (EINVAL); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ENETDOWN); } IEEE80211_UNLOCK(ic); } Modified: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Sat May 23 09:48:59 2015 (r283312) +++ head/sys/net80211/ieee80211_wds.c Sat May 23 09:49:40 2015 (r283313) @@ -301,8 +301,12 @@ ieee80211_dwds_mcast(struct ieee80211vap /* NB: IFQ_HANDOFF reclaims mbuf */ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); ieee80211_free_node(ni); - } else + } else { if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); + if_inc_counter(ifp, IFCOUNTER_OBYTES, + m->m_pkthdr.len); + } } } From owner-svn-src-head@FreeBSD.ORG Sat May 23 14:48:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28A6DA59; Sat, 23 May 2015 14:48:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 176A11717; Sat, 23 May 2015 14:48:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4NEm30R096962; Sat, 23 May 2015 14:48:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NEm3K0096961; Sat, 23 May 2015 14:48:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505231448.t4NEm3K0096961@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 23 May 2015 14:48:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283314 - in head/sys/arm/ti/omap4: . pandaboard X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 14:48:04 -0000 Author: andrew Date: Sat May 23 14:48:03 2015 New Revision: 283314 URL: https://svnweb.freebsd.org/changeset/base/283314 Log: Remove an unused header. Deleted: head/sys/arm/ti/omap4/omap4var.h Modified: head/sys/arm/ti/omap4/pandaboard/pandaboard.c Modified: head/sys/arm/ti/omap4/pandaboard/pandaboard.c ============================================================================== --- head/sys/arm/ti/omap4/pandaboard/pandaboard.c Sat May 23 09:49:40 2015 (r283313) +++ head/sys/arm/ti/omap4/pandaboard/pandaboard.c Sat May 23 14:48:03 2015 (r283314) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include /* Registers in the SCRM that control the AUX clocks */ From owner-svn-src-head@FreeBSD.ORG Sat May 23 14:59:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00F06D89; Sat, 23 May 2015 14:59:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D690F182B; Sat, 23 May 2015 14:59:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4NExT08002224; Sat, 23 May 2015 14:59:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NExS8v002215; Sat, 23 May 2015 14:59:28 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505231459.t4NExS8v002215@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 23 May 2015 14:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283315 - head/sys/ddb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 14:59:30 -0000 Author: pfg Date: Sat May 23 14:59:27 2015 New Revision: 283315 URL: https://svnweb.freebsd.org/changeset/base/283315 Log: ddb: de-register Modified: head/sys/ddb/db_command.c head/sys/ddb/db_input.c head/sys/ddb/db_run.c head/sys/ddb/db_watch.c head/sys/ddb/db_write_cmd.c Modified: head/sys/ddb/db_command.c ============================================================================== --- head/sys/ddb/db_command.c Sat May 23 14:48:03 2015 (r283314) +++ head/sys/ddb/db_command.c Sat May 23 14:59:27 2015 (r283315) @@ -311,7 +311,7 @@ db_cmd_search(char *name, struct command static void db_cmd_list(struct command_table *table) { - register struct command *cmd; + struct command *cmd; LIST_FOREACH(cmd, table, next) { db_printf("%-16s", cmd->name); Modified: head/sys/ddb/db_input.c ============================================================================== --- head/sys/ddb/db_input.c Sat May 23 14:48:03 2015 (r283314) +++ head/sys/ddb/db_input.c Sat May 23 14:59:27 2015 (r283315) @@ -97,7 +97,7 @@ db_delete(n, bwd) int n; int bwd; { - register char *p; + char *p; if (bwd) { db_lc -= n; @@ -276,7 +276,7 @@ db_inputchar(c) cnputc('\007'); } else if (c >= ' ' && c <= '~') { - register char *p; + char *p; for (p = db_le; p > db_lc; p--) *p = *(p-1); @@ -348,7 +348,7 @@ db_readline(lstart, lsize) void db_check_interrupt(void) { - register int c; + int c; c = cnmaygetc(); switch (c) { Modified: head/sys/ddb/db_run.c ============================================================================== --- head/sys/ddb/db_run.c Sat May 23 14:48:03 2015 (r283314) +++ head/sys/ddb/db_run.c Sat May 23 14:59:27 2015 (r283315) @@ -80,8 +80,8 @@ db_breakpoint_t db_taken_bkpt = 0; bool db_stop_at_pc(bool *is_breakpoint) { - register db_addr_t pc; - register db_breakpoint_t bkpt; + db_addr_t pc; + db_breakpoint_t bkpt; pc = PC_REGS(); #ifdef SOFTWARE_SSTEP @@ -149,7 +149,7 @@ db_stop_at_pc(bool *is_breakpoint) (!inst_return(ins) || --db_call_depth != 0)) { if (db_sstep_print) { if (inst_call(ins) || inst_return(ins)) { - register int i; + int i; db_printf("[after %6d] ", db_inst_count); for (i = db_call_depth; --i > 0; ) @@ -181,7 +181,7 @@ db_stop_at_pc(bool *is_breakpoint) void db_restart_at_pc(bool watchpt) { - register db_addr_t pc = PC_REGS(); + db_addr_t pc = PC_REGS(); if ((db_run_mode == STEP_COUNT) || (db_run_mode == STEP_RETURN) || Modified: head/sys/ddb/db_watch.c ============================================================================== --- head/sys/ddb/db_watch.c Sat May 23 14:48:03 2015 (r283314) +++ head/sys/ddb/db_watch.c Sat May 23 14:59:27 2015 (r283315) @@ -69,7 +69,7 @@ static void db_set_watchpoint(vm_map_t static db_watchpoint_t db_watchpoint_alloc(void) { - register db_watchpoint_t watch; + db_watchpoint_t watch; if ((watch = db_free_watchpoints) != 0) { db_free_watchpoints = watch->link; @@ -95,7 +95,7 @@ db_watchpoint_free(db_watchpoint_t watch static void db_set_watchpoint(vm_map_t map, db_addr_t addr, vm_size_t size) { - register db_watchpoint_t watch; + db_watchpoint_t watch; if (map == NULL) { db_printf("No map.\n"); @@ -135,8 +135,8 @@ db_set_watchpoint(vm_map_t map, db_addr_ static void db_delete_watchpoint(vm_map_t map, db_addr_t addr) { - register db_watchpoint_t watch; - register db_watchpoint_t *prev; + db_watchpoint_t watch; + db_watchpoint_t *prev; for (prev = &db_watchpoint_list; (watch = *prev) != 0; @@ -155,7 +155,7 @@ db_delete_watchpoint(vm_map_t map, db_ad static void db_list_watchpoints(void) { - register db_watchpoint_t watch; + db_watchpoint_t watch; if (db_watchpoint_list == 0) { db_printf("No watchpoints set\n"); @@ -220,7 +220,7 @@ DB_SHOW_COMMAND(watches, db_listwatch_cm void db_set_watchpoints(void) { - register db_watchpoint_t watch; + db_watchpoint_t watch; if (!db_watchpoints_inserted) { for (watch = db_watchpoint_list; @@ -245,7 +245,7 @@ db_clear_watchpoints(void) static bool db_find_watchpoint(vm_map_t map, db_addr_t addr, db_regs_t regs) { - register db_watchpoint_t watch; + db_watchpoint_t watch; db_watchpoint_t found = 0; for (watch = db_watchpoint_list; Modified: head/sys/ddb/db_write_cmd.c ============================================================================== --- head/sys/ddb/db_write_cmd.c Sat May 23 14:48:03 2015 (r283314) +++ head/sys/ddb/db_write_cmd.c Sat May 23 14:59:27 2015 (r283315) @@ -46,12 +46,10 @@ void db_write_cmd(db_expr_t address, bool have_addr, db_expr_t count, char * modif) { - register db_addr_t addr; - register db_expr_t old_value; db_expr_t new_value; - register int size; + int size; bool wrote_one = false; addr = (db_addr_t) address; From owner-svn-src-head@FreeBSD.ORG Sat May 23 16:54:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7A948B3; Sat, 23 May 2015 16:54:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6BF91519; Sat, 23 May 2015 16:54:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4NGsl41066288; Sat, 23 May 2015 16:54:47 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NGslJ0066287; Sat, 23 May 2015 16:54:47 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201505231654.t4NGslJ0066287@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 23 May 2015 16:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283316 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 16:54:47 -0000 Author: alc Date: Sat May 23 16:54:46 2015 New Revision: 283316 URL: https://svnweb.freebsd.org/changeset/base/283316 Log: Simplify the allocation of page table pages for mips64. Specifically, when allocation fails, it suffices to perform VM_WAIT. The direct map covers the entirely of physical memory, so unlike 32-bit mips any physical page can be used as a page table page. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat May 23 14:59:27 2015 (r283315) +++ head/sys/mips/mips/pmap.c Sat May 23 16:54:46 2015 (r283316) @@ -1036,7 +1036,7 @@ pmap_grow_direct_page_cache() { #ifdef __mips_n64 - vm_pageout_grow_cache(3, 0, MIPS_XKPHYS_LARGEST_PHYS); + VM_WAIT; #else vm_pageout_grow_cache(3, 0, MIPS_KSEG0_LARGEST_PHYS); #endif From owner-svn-src-head@FreeBSD.ORG Sat May 23 19:09:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4C6AC8D; Sat, 23 May 2015 19:09:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2ED911F5; Sat, 23 May 2015 19:09:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4NJ948m032003; Sat, 23 May 2015 19:09:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NJ94ct032002; Sat, 23 May 2015 19:09:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505231909.t4NJ94ct032002@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 23 May 2015 19:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283320 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 19:09:04 -0000 Author: kib Date: Sat May 23 19:09:04 2015 New Revision: 283320 URL: https://svnweb.freebsd.org/changeset/base/283320 Log: If thread requested to not stop on non-boundary, then not only stopping signals should obey, but also all forms of single-threading. Otherwise, thread might sleep interruptible while owning some resources, and single-threading thread could try to access them. An example is owning vnode lock while dumping core. Submitted by: Conrad Meyer Review: https://reviews.freebsd.org/D2612 Tested by: pho MFC after: 1 week Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Sat May 23 17:48:09 2015 (r283319) +++ head/sys/kern/kern_thread.c Sat May 23 19:09:04 2015 (r283320) @@ -868,12 +868,9 @@ thread_suspend_check(int return_instead) return (ERESTART); /* - * Ignore suspend requests for stop signals if they - * are deferred. + * Ignore suspend requests if they are deferred. */ - if ((P_SHOULDSTOP(p) == P_STOPPED_SIG || - (p->p_flag & P_TOTAL_STOP) != 0) && - (td->td_flags & TDF_SBDRY) != 0) { + if ((td->td_flags & TDF_SBDRY) != 0) { KASSERT(return_instead, ("TDF_SBDRY set for unsafe thread_suspend_check")); return (0); From owner-svn-src-head@FreeBSD.ORG Sat May 23 21:04:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 171E9240; Sat, 23 May 2015 21:04:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05DE91D85; Sat, 23 May 2015 21:04:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4NL4FvU091629; Sat, 23 May 2015 21:04:15 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NL4Fki091628; Sat, 23 May 2015 21:04:15 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201505232104.t4NL4Fki091628@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Sat, 23 May 2015 21:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283328 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 21:04:16 -0000 Author: pluknet Date: Sat May 23 21:04:15 2015 New Revision: 283328 URL: https://svnweb.freebsd.org/changeset/base/283328 Log: Update P_TOTAL_STOP commentary. Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat May 23 20:54:25 2015 (r283327) +++ head/sys/sys/proc.h Sat May 23 21:04:15 2015 (r283328) @@ -660,7 +660,7 @@ struct proc { #define P_SINGLE_BOUNDARY 0x400000 /* Threads should suspend at user boundary. */ #define P_HWPMC 0x800000 /* Process is using HWPMCs */ #define P_JAILED 0x1000000 /* Process is in jail. */ -#define P_TOTAL_STOP 0x2000000 /* Stopped in proc_stop_total. */ +#define P_TOTAL_STOP 0x2000000 /* Stopped in stop_all_proc. */ #define P_INEXEC 0x4000000 /* Process is in execve(). */ #define P_STATCHILD 0x8000000 /* Child process stopped or exited. */ #define P_INMEM 0x10000000 /* Loaded into memory. */ From owner-svn-src-head@FreeBSD.ORG Sat May 23 21:58:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DA08CA4; Sat, 23 May 2015 21:58:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51B85128C; Sat, 23 May 2015 21:58:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4NLwgw1017151; Sat, 23 May 2015 21:58:42 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NLwgjM017150; Sat, 23 May 2015 21:58:42 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201505232158.t4NLwgjM017150@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 23 May 2015 21:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283330 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 21:58:42 -0000 Author: rmacklem Date: Sat May 23 21:58:41 2015 New Revision: 283330 URL: https://svnweb.freebsd.org/changeset/base/283330 Log: The NFS client generated directory block(s) with d_fileno == 0 so that it would not return less data than requested. Since returning less directory data than requested is not a problem for FreeBSD and even UFS no longer returns directory structures with d_fileno == 0, this patch stops the client from doing this. Although entries with d_fileno == 0 should not be a problem, the man pages no longer document that these entries should be ignored, so there was a concern that these entries might be an issue in the future. Suggested by: trasz Tested by: trasz MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sat May 23 21:12:51 2015 (r283329) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sat May 23 21:58:41 2015 (r283330) @@ -3072,25 +3072,6 @@ nfsrpc_readdir(vnode_t vp, struct uio *u *eofp = eof; } - /* - * Add extra empty records to any remaining DIRBLKSIZ chunks. - */ - while (uio_uio_resid(uiop) > 0 && ((size_t)(uio_uio_resid(uiop))) != tresid) { - dp = (struct dirent *) CAST_DOWN(caddr_t, uio_iov_base(uiop)); - dp->d_type = DT_UNKNOWN; - dp->d_fileno = 0; - dp->d_namlen = 0; - dp->d_name[0] = '\0'; - tl = (u_int32_t *)&dp->d_name[4]; - *tl++ = cookie.lval[0]; - *tl = cookie.lval[1]; - dp->d_reclen = DIRBLKSIZ; - uio_iov_base_add(uiop, DIRBLKSIZ); - uio_iov_len_add(uiop, -(DIRBLKSIZ)); - uio_uio_resid_add(uiop, -(DIRBLKSIZ)); - uiop->uio_offset += DIRBLKSIZ; - } - nfsmout: if (nd->nd_mrep != NULL) mbuf_freem(nd->nd_mrep); @@ -3565,25 +3546,6 @@ nfsrpc_readdirplus(vnode_t vp, struct ui *eofp = eof; } - /* - * Add extra empty records to any remaining DIRBLKSIZ chunks. - */ - while (uio_uio_resid(uiop) > 0 && uio_uio_resid(uiop) != tresid) { - dp = (struct dirent *)uio_iov_base(uiop); - dp->d_type = DT_UNKNOWN; - dp->d_fileno = 0; - dp->d_namlen = 0; - dp->d_name[0] = '\0'; - tl = (u_int32_t *)&dp->d_name[4]; - *tl++ = cookie.lval[0]; - *tl = cookie.lval[1]; - dp->d_reclen = DIRBLKSIZ; - uio_iov_base_add(uiop, DIRBLKSIZ); - uio_iov_len_add(uiop, -(DIRBLKSIZ)); - uio_uio_resid_add(uiop, -(DIRBLKSIZ)); - uiop->uio_offset += DIRBLKSIZ; - } - nfsmout: if (nd->nd_mrep != NULL) mbuf_freem(nd->nd_mrep); From owner-svn-src-head@FreeBSD.ORG Sat May 23 21:59:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFE31E11; Sat, 23 May 2015 21:59:28 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BA0F1294; Sat, 23 May 2015 21:59:28 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 2CDD1D0ED8; Sat, 23 May 2015 14:59:27 -0700 (PDT) Date: Sat, 23 May 2015 14:59:27 -0700 From: hiren panchasara To: "George V. Neville-Neil" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282240 - in head: cddl/lib/libdtrace sys/netinet Message-ID: <20150523215927.GM95600@strugglingcoder.info> References: <201504291719.t3THJtIM020724@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iUV/lbBrmPtUT9dM" Content-Disposition: inline In-Reply-To: <201504291719.t3THJtIM020724@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 21:59:28 -0000 --iUV/lbBrmPtUT9dM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 04/29/15 at 05:19P, George V. Neville-Neil wrote: > Author: gnn > Date: Wed Apr 29 17:19:55 2015 > New Revision: 282240 > URL: https://svnweb.freebsd.org/changeset/base/282240 >=20 > Log: > Brief demo script showing the various values that can be read via > the new SIFTR statically defined tracepoint (SDT). > =20 > Differential Revision: https://reviews.freebsd.org/D2387 > Reviewed by: bz, markj >=20 > Modified: > head/cddl/lib/libdtrace/tcp.d > head/sys/netinet/in_kdtrace.c > head/sys/netinet/in_kdtrace.h > head/sys/netinet/siftr.c George, This seems useful. Can this be MFC'd to 10? Cheers, Hiren --iUV/lbBrmPtUT9dM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVYPg+XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/l4J0H/0OvwJxgd/ccUdgvjUWNAIuY 3BmLOFZZ3R54iRqR5Ss512tyf3dLhy+0ux7TiLf8nzPVpoKl9IICPswzbKQej89E c5qvSQvNj+qUKQ233+fZj9voXepNHMBDN3Z4BLqmeAOVzsRvS0kaO5suv6cLxB0i L8BqsZRMp8iuesTKRU7o8NzoCp9B/mZZhyvjNWXi1Vlr65YQotdv93xJFwFKQbt1 D7t6A7EZsUK90+E67tkO6AsbrPUI6EzB+Ic2aJNSXIjUcd/n6v/+NySYdcBrpIpv q2+TgXOWSsuXSNZF3RwyVF4p+2tl7lSikjBMc1VYEaNZFBkpc7nr2mYEVHrktXo= =dfD2 -----END PGP SIGNATURE----- --iUV/lbBrmPtUT9dM-- From owner-svn-src-head@FreeBSD.ORG Sat May 23 22:28:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC776416; Sat, 23 May 2015 22:28:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBA6215E7; Sat, 23 May 2015 22:28:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4NMSxQ3032366; Sat, 23 May 2015 22:28:59 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NMSxs2032365; Sat, 23 May 2015 22:28:59 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505232228.t4NMSxs2032365@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 23 May 2015 22:28:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283331 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 22:29:00 -0000 Author: andrew Date: Sat May 23 22:28:59 2015 New Revision: 283331 URL: https://svnweb.freebsd.org/changeset/base/283331 Log: Use the wait-for-event instruction to put the core we have just enabled to sleep while it waits to start scheduling. The boot core can then use the send-event instruction to wake the cores when they should enter the scheduler. MFC after: 1 week Modified: head/sys/arm/arm/mp_machdep.c Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Sat May 23 21:58:41 2015 (r283330) +++ head/sys/arm/arm/mp_machdep.c Sat May 23 22:28:59 2015 (r283331) @@ -185,8 +185,11 @@ init_secondary(int cpu) atomic_add_rel_32(&mp_naps, 1); /* Spin until the BSP releases the APs */ - while (!aps_ready) - ; + while (!atomic_load_acq_int(&aps_ready)) { +#if __ARM_ARCH >= 7 + __asm __volatile("wfe"); +#endif + } /* Initialize curthread */ KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); @@ -353,6 +356,10 @@ release_aps(void *dummy __unused) arm_unmask_irq(i); } atomic_store_rel_int(&aps_ready, 1); + /* Wake the other threads up */ +#if __ARM_ARCH >= 7 + armv7_sev(); +#endif printf("Release APs\n"); From owner-svn-src-head@FreeBSD.ORG Sat May 23 23:08:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F27FF96; Sat, 23 May 2015 23:08:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DCC6197C; Sat, 23 May 2015 23:08:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4NN8Hu5052465; Sat, 23 May 2015 23:08:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NN8H66052464; Sat, 23 May 2015 23:08:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505232308.t4NN8H66052464@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 23 May 2015 23:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283337 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 23:08:17 -0000 Author: andrew Date: Sat May 23 23:08:16 2015 New Revision: 283337 URL: https://svnweb.freebsd.org/changeset/base/283337 Log: Fix a lock up where we enter swapper() with interrupts disabled. In smp_rendezvous_cpus we expect to wait for all cpus to enter smp_rendezvous_action. If we call this holding a proc lock swapper may attempt to also lock it, however as interrupts are disabled the cpu never handles the ipi. Because smp_rendezvous_action waits for all signaled cpus before contining it may get caught waiting for the cpu running swapper as the proc mutex will be unlocked after smp_rendezvous_cpus finishes. The fix is to enable interrupts in the configure stage as we should be doing. MFC after: 1 week Modified: head/sys/arm/arm/autoconf.c Modified: head/sys/arm/arm/autoconf.c ============================================================================== --- head/sys/arm/arm/autoconf.c Sat May 23 23:05:31 2015 (r283336) +++ head/sys/arm/arm/autoconf.c Sat May 23 23:08:16 2015 (r283337) @@ -94,6 +94,7 @@ static void configure_final(void *dummy) { + enable_interrupts(PSR_I | PSR_F); cninit_finish(); cold = 0; }