From owner-svn-src-all@FreeBSD.ORG Sun May 17 00:55:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 01:45:57 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 03:50:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 03:59:09 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 04:04:11 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 04:09:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 04:17:09 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 15:12:56 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 15:32:57 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 15:46:25 2015 Return-Path: Delivered-To: svn-src-all@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 5D8A2A6 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 376CA1D83 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 15:49:41 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 16:27:08 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 17:03:38 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 18:08:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 18:35:58 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 19:13:21 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 19:49:12 2015 Return-Path: Delivered-To: svn-src-all@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 2F841595; Sun, 17 May 2015 19:49:12 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E91211646; Sun, 17 May 2015 19:49:11 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 22872358C5C; Sun, 17 May 2015 21:49:09 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id EE82B28494; Sun, 17 May 2015 21:49:08 +0200 (CEST) Date: Sun, 17 May 2015 21:49:08 +0200 From: Jilles Tjoelker To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r282917 - stable/9/bin/cp Message-ID: <20150517194908.GB42869@stack.nl> References: <201505141932.t4EJWDIn007978@svn.freebsd.org> <20150515062810.GA76007@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150515062810.GA76007@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 19:49:12 -0000 On Fri, May 15, 2015 at 06:28:10AM +0000, Alexey Dokuchaev wrote: > On Thu, May 14, 2015 at 07:32:13PM +0000, Jilles Tjoelker wrote: > > Author: jilles > > Date: Thu May 14 19:32:13 2015 > > New Revision: 282917 > > URL: https://svnweb.freebsd.org/changeset/base/282917 > > Log: > > MFC r282482: cp: Remove fts sorting. > > [...] > Could (if should) it be MFCed to stable/8 as well? It could be; I haven't touched stable/8 for a long time though. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Sun May 17 19:59:07 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 20:38:03 2015 Return-Path: Delivered-To: svn-src-all@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 3507AD29; Sun, 17 May 2015 20:38: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 15CC61B04; Sun, 17 May 2015 20:38: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 t4HKc2QK096805; Sun, 17 May 2015 20:38:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4HKc2pp096801; Sun, 17 May 2015 20:38:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505172038.t4HKc2pp096801@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 May 2015 20:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283036 - in stable/10/contrib/llvm: patches tools/clang/lib/Sema X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 20:38:03 -0000 Author: dim Date: Sun May 17 20:38:01 2015 New Revision: 283036 URL: https://svnweb.freebsd.org/changeset/base/283036 Log: For clang 3.4.1, when using -fformat-extensions, and warning about the FreeBSD-specific %D and %b printf format specifiers, avoid possible argument overruns. Also reduce the differences with the version added in r280031 (which has been sent upstream). Direct commit to stable/10, since head already has clang 3.6.0. Modified: stable/10/contrib/llvm/patches/patch-r208987-format-extensions.diff stable/10/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Modified: stable/10/contrib/llvm/patches/patch-r208987-format-extensions.diff ============================================================================== --- stable/10/contrib/llvm/patches/patch-r208987-format-extensions.diff Sun May 17 19:59:05 2015 (r283035) +++ stable/10/contrib/llvm/patches/patch-r208987-format-extensions.diff Sun May 17 20:38:01 2015 (r283036) @@ -118,22 +118,25 @@ Index: tools/clang/lib/Sema/SemaChecking =================================================================== --- tools/clang/lib/Sema/SemaChecking.cpp +++ tools/clang/lib/Sema/SemaChecking.cpp -@@ -2980,6 +2980,40 @@ CheckPrintfHandler::HandlePrintfSpecifier(const an +@@ -2980,6 +2980,42 @@ CheckPrintfHandler::HandlePrintfSpecifier(const an CoveredArgs.set(argIndex); } -+ // FreeBSD extensions ++ // FreeBSD kernel extensions. + if (CS.getKind() == ConversionSpecifier::FreeBSDbArg || + CS.getKind() == ConversionSpecifier::FreeBSDDArg) { -+ // claim the second argument ++ // We need at least two arguments. ++ if (!CheckNumArgs(FS, CS, startSpecifier, specifierLen, argIndex + 1)) ++ return false; ++ ++ // Claim the second argument. + CoveredArgs.set(argIndex + 1); + -+ // Now type check the data expression that matches the -+ // format specifier. ++ // Type check the first argument (int for %b, pointer for %D) + const Expr *Ex = getDataArg(argIndex); -+ const analyze_printf::ArgType &AT = ++ const analyze_printf::ArgType &AT = + (CS.getKind() == ConversionSpecifier::FreeBSDbArg) ? -+ ArgType(S.Context.IntTy) : ArgType::CStrTy; ++ ArgType(S.Context.IntTy) : ArgType::CPointerTy; + if (AT.isValid() && !AT.matchesType(S.Context, Ex->getType())) + S.Diag(getLocationOfByte(CS.getStart()), + diag::warn_printf_conversion_argument_type_mismatch) @@ -141,8 +144,7 @@ Index: tools/clang/lib/Sema/SemaChecking + << getSpecifierRange(startSpecifier, specifierLen) + << Ex->getSourceRange(); + -+ // Now type check the data expression that matches the -+ // format specifier. ++ // Type check the second argument (char * for both %b and %D) + Ex = getDataArg(argIndex + 1); + const analyze_printf::ArgType &AT2 = ArgType::CStrTy; + if (AT2.isValid() && !AT2.matchesType(S.Context, Ex->getType())) @@ -163,7 +165,7 @@ Index: tools/clang/lib/Driver/Tools.cpp =================================================================== --- tools/clang/lib/Driver/Tools.cpp +++ tools/clang/lib/Driver/Tools.cpp -@@ -2991,6 +2991,7 @@ void Clang::ConstructJob(Compilation &C, const Job +@@ -2984,6 +2984,7 @@ void Clang::ConstructJob(Compilation &C, const Job // Forward -f (flag) options which we can pass directly. Args.AddLastArg(CmdArgs, options::OPT_femit_all_decls); Modified: stable/10/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Sun May 17 19:59:05 2015 (r283035) +++ stable/10/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Sun May 17 20:38:01 2015 (r283036) @@ -2980,18 +2980,21 @@ CheckPrintfHandler::HandlePrintfSpecifie CoveredArgs.set(argIndex); } - // FreeBSD extensions + // FreeBSD kernel extensions. if (CS.getKind() == ConversionSpecifier::FreeBSDbArg || CS.getKind() == ConversionSpecifier::FreeBSDDArg) { - // claim the second argument + // We need at least two arguments. + if (!CheckNumArgs(FS, CS, startSpecifier, specifierLen, argIndex + 1)) + return false; + + // Claim the second argument. CoveredArgs.set(argIndex + 1); - // Now type check the data expression that matches the - // format specifier. + // Type check the first argument (int for %b, pointer for %D) const Expr *Ex = getDataArg(argIndex); - const analyze_printf::ArgType &AT = + const analyze_printf::ArgType &AT = (CS.getKind() == ConversionSpecifier::FreeBSDbArg) ? - ArgType(S.Context.IntTy) : ArgType::CStrTy; + ArgType(S.Context.IntTy) : ArgType::CPointerTy; if (AT.isValid() && !AT.matchesType(S.Context, Ex->getType())) S.Diag(getLocationOfByte(CS.getStart()), diag::warn_printf_conversion_argument_type_mismatch) @@ -2999,8 +3002,7 @@ CheckPrintfHandler::HandlePrintfSpecifie << getSpecifierRange(startSpecifier, specifierLen) << Ex->getSourceRange(); - // Now type check the data expression that matches the - // format specifier. + // Type check the second argument (char * for both %b and %D) Ex = getDataArg(argIndex + 1); const analyze_printf::ArgType &AT2 = ArgType::CStrTy; if (AT2.isValid() && !AT2.matchesType(S.Context, Ex->getType())) From owner-svn-src-all@FreeBSD.ORG Sun May 17 20:39:30 2015 Return-Path: Delivered-To: svn-src-all@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 81E28E63; Sun, 17 May 2015 20:39: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 623D41B0C; Sun, 17 May 2015 20:39: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 t4HKdUDR097065; Sun, 17 May 2015 20:39:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4HKdTmt097063; Sun, 17 May 2015 20:39:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505172039.t4HKdTmt097063@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 May 2015 20:39:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283037 - in stable/9/contrib/llvm: patches tools/clang/lib/Sema X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 20:39:30 -0000 Author: dim Date: Sun May 17 20:39:29 2015 New Revision: 283037 URL: https://svnweb.freebsd.org/changeset/base/283037 Log: Merge r283036 from stable/10: For clang 3.4.1, when using -fformat-extensions, and warning about the FreeBSD-specific %D and %b printf format specifiers, avoid possible argument overruns. Also reduce the differences with the version added in r280031 (which has been sent upstream). Modified: stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff Sun May 17 20:38:01 2015 (r283036) +++ stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff Sun May 17 20:39:29 2015 (r283037) @@ -118,22 +118,25 @@ Index: tools/clang/lib/Sema/SemaChecking =================================================================== --- tools/clang/lib/Sema/SemaChecking.cpp +++ tools/clang/lib/Sema/SemaChecking.cpp -@@ -2980,6 +2980,40 @@ CheckPrintfHandler::HandlePrintfSpecifier(const an +@@ -2980,6 +2980,42 @@ CheckPrintfHandler::HandlePrintfSpecifier(const an CoveredArgs.set(argIndex); } -+ // FreeBSD extensions ++ // FreeBSD kernel extensions. + if (CS.getKind() == ConversionSpecifier::FreeBSDbArg || + CS.getKind() == ConversionSpecifier::FreeBSDDArg) { -+ // claim the second argument ++ // We need at least two arguments. ++ if (!CheckNumArgs(FS, CS, startSpecifier, specifierLen, argIndex + 1)) ++ return false; ++ ++ // Claim the second argument. + CoveredArgs.set(argIndex + 1); + -+ // Now type check the data expression that matches the -+ // format specifier. ++ // Type check the first argument (int for %b, pointer for %D) + const Expr *Ex = getDataArg(argIndex); -+ const analyze_printf::ArgType &AT = ++ const analyze_printf::ArgType &AT = + (CS.getKind() == ConversionSpecifier::FreeBSDbArg) ? -+ ArgType(S.Context.IntTy) : ArgType::CStrTy; ++ ArgType(S.Context.IntTy) : ArgType::CPointerTy; + if (AT.isValid() && !AT.matchesType(S.Context, Ex->getType())) + S.Diag(getLocationOfByte(CS.getStart()), + diag::warn_printf_conversion_argument_type_mismatch) @@ -141,8 +144,7 @@ Index: tools/clang/lib/Sema/SemaChecking + << getSpecifierRange(startSpecifier, specifierLen) + << Ex->getSourceRange(); + -+ // Now type check the data expression that matches the -+ // format specifier. ++ // Type check the second argument (char * for both %b and %D) + Ex = getDataArg(argIndex + 1); + const analyze_printf::ArgType &AT2 = ArgType::CStrTy; + if (AT2.isValid() && !AT2.matchesType(S.Context, Ex->getType())) @@ -163,7 +165,7 @@ Index: tools/clang/lib/Driver/Tools.cpp =================================================================== --- tools/clang/lib/Driver/Tools.cpp +++ tools/clang/lib/Driver/Tools.cpp -@@ -2991,6 +2991,7 @@ void Clang::ConstructJob(Compilation &C, const Job +@@ -2984,6 +2984,7 @@ void Clang::ConstructJob(Compilation &C, const Job // Forward -f (flag) options which we can pass directly. Args.AddLastArg(CmdArgs, options::OPT_femit_all_decls); Modified: stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Sun May 17 20:38:01 2015 (r283036) +++ stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Sun May 17 20:39:29 2015 (r283037) @@ -2980,18 +2980,21 @@ CheckPrintfHandler::HandlePrintfSpecifie CoveredArgs.set(argIndex); } - // FreeBSD extensions + // FreeBSD kernel extensions. if (CS.getKind() == ConversionSpecifier::FreeBSDbArg || CS.getKind() == ConversionSpecifier::FreeBSDDArg) { - // claim the second argument + // We need at least two arguments. + if (!CheckNumArgs(FS, CS, startSpecifier, specifierLen, argIndex + 1)) + return false; + + // Claim the second argument. CoveredArgs.set(argIndex + 1); - // Now type check the data expression that matches the - // format specifier. + // Type check the first argument (int for %b, pointer for %D) const Expr *Ex = getDataArg(argIndex); - const analyze_printf::ArgType &AT = + const analyze_printf::ArgType &AT = (CS.getKind() == ConversionSpecifier::FreeBSDbArg) ? - ArgType(S.Context.IntTy) : ArgType::CStrTy; + ArgType(S.Context.IntTy) : ArgType::CPointerTy; if (AT.isValid() && !AT.matchesType(S.Context, Ex->getType())) S.Diag(getLocationOfByte(CS.getStart()), diag::warn_printf_conversion_argument_type_mismatch) @@ -2999,8 +3002,7 @@ CheckPrintfHandler::HandlePrintfSpecifie << getSpecifierRange(startSpecifier, specifierLen) << Ex->getSourceRange(); - // Now type check the data expression that matches the - // format specifier. + // Type check the second argument (char * for both %b and %D) Ex = getDataArg(argIndex + 1); const analyze_printf::ArgType &AT2 = ArgType::CStrTy; if (AT2.isValid() && !AT2.matchesType(S.Context, Ex->getType())) From owner-svn-src-all@FreeBSD.ORG Sun May 17 23:08:03 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Sun May 17 23:09:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@FreeBSD.ORG Mon May 18 00:54:06 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 01:57:33 2015 Return-Path: Delivered-To: svn-src-all@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 D3225F2B; Mon, 18 May 2015 01:57: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 C02071A5C; Mon, 18 May 2015 01:57: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 t4I1vXc1055636; Mon, 18 May 2015 01:57:33 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I1vWcS055626; Mon, 18 May 2015 01:57:32 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505180157.t4I1vWcS055626@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:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283040 - vendor/tzdata/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 01:57:33 -0000 Author: edwin Date: Mon May 18 01:57:31 2015 New Revision: 283040 URL: https://svnweb.freebsd.org/changeset/base/283040 Log: Vendor import of tzdata2015c: 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.) Obtained from: ftp://ftp.iana.org/tz/releases/ Modified: vendor/tzdata/dist/africa vendor/tzdata/dist/antarctica vendor/tzdata/dist/backward vendor/tzdata/dist/europe vendor/tzdata/dist/northamerica vendor/tzdata/dist/southamerica Modified: vendor/tzdata/dist/africa ============================================================================== --- vendor/tzdata/dist/africa Sun May 17 23:09:58 2015 (r283039) +++ vendor/tzdata/dist/africa Mon May 18 01:57:31 2015 (r283040) @@ -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: vendor/tzdata/dist/antarctica ============================================================================== --- vendor/tzdata/dist/antarctica Sun May 17 23:09:58 2015 (r283039) +++ vendor/tzdata/dist/antarctica Mon May 18 01:57:31 2015 (r283040) @@ -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: vendor/tzdata/dist/backward ============================================================================== --- vendor/tzdata/dist/backward Sun May 17 23:09:58 2015 (r283039) +++ vendor/tzdata/dist/backward Mon May 18 01:57:31 2015 (r283040) @@ -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: vendor/tzdata/dist/europe ============================================================================== --- vendor/tzdata/dist/europe Sun May 17 23:09:58 2015 (r283039) +++ vendor/tzdata/dist/europe Mon May 18 01:57:31 2015 (r283040) @@ -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: vendor/tzdata/dist/northamerica ============================================================================== --- vendor/tzdata/dist/northamerica Sun May 17 23:09:58 2015 (r283039) +++ vendor/tzdata/dist/northamerica Mon May 18 01:57:31 2015 (r283040) @@ -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: vendor/tzdata/dist/southamerica ============================================================================== --- vendor/tzdata/dist/southamerica Sun May 17 23:09:58 2015 (r283039) +++ vendor/tzdata/dist/southamerica Mon May 18 01:57:31 2015 (r283040) @@ -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-all@FreeBSD.ORG Mon May 18 01:57:52 2015 Return-Path: Delivered-To: svn-src-all@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 DCC88DB; Mon, 18 May 2015 01:57: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 B17271A61; Mon, 18 May 2015 01:57: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 t4I1vqBZ055731; Mon, 18 May 2015 01:57:52 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I1vqxi055730; Mon, 18 May 2015 01:57:52 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505180157.t4I1vqxi055730@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:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283041 - vendor/tzdata/tzdata2015c X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 01:57:53 -0000 Author: edwin Date: Mon May 18 01:57:52 2015 New Revision: 283041 URL: https://svnweb.freebsd.org/changeset/base/283041 Log: Tag of tzdata 2015c Added: - copied from r283040, vendor/tzdata/dist/ Directory Properties: vendor/tzdata/tzdata2015c/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon May 18 01:59:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 02:05:58 2015 Return-Path: Delivered-To: svn-src-all@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 D09A5485; Mon, 18 May 2015 02:05: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 BE10C1B41; Mon, 18 May 2015 02:05: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 t4I25wNp060834; Mon, 18 May 2015 02:05:58 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I25vZc060825; Mon, 18 May 2015 02:05:57 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505180205.t4I25vZc060825@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 02:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283043 - stable/10/contrib/tzdata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 02:05:58 -0000 Author: edwin Date: Mon May 18 02:05:56 2015 New Revision: 283043 URL: https://svnweb.freebsd.org/changeset/base/283043 Log: MFC of 283042,tzdata10: 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: stable/10/contrib/tzdata/africa stable/10/contrib/tzdata/antarctica stable/10/contrib/tzdata/backward stable/10/contrib/tzdata/europe stable/10/contrib/tzdata/northamerica stable/10/contrib/tzdata/southamerica Modified: stable/10/contrib/tzdata/africa ============================================================================== --- stable/10/contrib/tzdata/africa Mon May 18 01:59:02 2015 (r283042) +++ stable/10/contrib/tzdata/africa Mon May 18 02:05:56 2015 (r283043) @@ -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: stable/10/contrib/tzdata/antarctica ============================================================================== --- stable/10/contrib/tzdata/antarctica Mon May 18 01:59:02 2015 (r283042) +++ stable/10/contrib/tzdata/antarctica Mon May 18 02:05:56 2015 (r283043) @@ -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: stable/10/contrib/tzdata/backward ============================================================================== --- stable/10/contrib/tzdata/backward Mon May 18 01:59:02 2015 (r283042) +++ stable/10/contrib/tzdata/backward Mon May 18 02:05:56 2015 (r283043) @@ -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: stable/10/contrib/tzdata/europe ============================================================================== --- stable/10/contrib/tzdata/europe Mon May 18 01:59:02 2015 (r283042) +++ stable/10/contrib/tzdata/europe Mon May 18 02:05:56 2015 (r283043) @@ -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: stable/10/contrib/tzdata/northamerica ============================================================================== --- stable/10/contrib/tzdata/northamerica Mon May 18 01:59:02 2015 (r283042) +++ stable/10/contrib/tzdata/northamerica Mon May 18 02:05:56 2015 (r283043) @@ -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: stable/10/contrib/tzdata/southamerica ============================================================================== --- stable/10/contrib/tzdata/southamerica Mon May 18 01:59:02 2015 (r283042) +++ stable/10/contrib/tzdata/southamerica Mon May 18 02:05:56 2015 (r283043) @@ -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-all@FreeBSD.ORG Mon May 18 02:09:40 2015 Return-Path: Delivered-To: svn-src-all@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 084AB871; Mon, 18 May 2015 02:09: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 E94CF1B7A; Mon, 18 May 2015 02:09: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 t4I29dPn061689; Mon, 18 May 2015 02:09:39 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I29cv8061683; Mon, 18 May 2015 02:09:38 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505180209.t4I29cv8061683@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 02:09:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283044 - stable/9/contrib/tzdata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 02:09:40 -0000 Author: edwin Date: Mon May 18 02:09:37 2015 New Revision: 283044 URL: https://svnweb.freebsd.org/changeset/base/283044 Log: MFC of 283042,tzdata9: 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: stable/9/contrib/tzdata/africa stable/9/contrib/tzdata/antarctica stable/9/contrib/tzdata/backward stable/9/contrib/tzdata/europe stable/9/contrib/tzdata/northamerica stable/9/contrib/tzdata/southamerica Directory Properties: stable/9/contrib/tzdata/ (props changed) Modified: stable/9/contrib/tzdata/africa ============================================================================== --- stable/9/contrib/tzdata/africa Mon May 18 02:05:56 2015 (r283043) +++ stable/9/contrib/tzdata/africa Mon May 18 02:09:37 2015 (r283044) @@ -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: stable/9/contrib/tzdata/antarctica ============================================================================== --- stable/9/contrib/tzdata/antarctica Mon May 18 02:05:56 2015 (r283043) +++ stable/9/contrib/tzdata/antarctica Mon May 18 02:09:37 2015 (r283044) @@ -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: stable/9/contrib/tzdata/backward ============================================================================== --- stable/9/contrib/tzdata/backward Mon May 18 02:05:56 2015 (r283043) +++ stable/9/contrib/tzdata/backward Mon May 18 02:09:37 2015 (r283044) @@ -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: stable/9/contrib/tzdata/europe ============================================================================== --- stable/9/contrib/tzdata/europe Mon May 18 02:05:56 2015 (r283043) +++ stable/9/contrib/tzdata/europe Mon May 18 02:09:37 2015 (r283044) @@ -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: stable/9/contrib/tzdata/northamerica ============================================================================== --- stable/9/contrib/tzdata/northamerica Mon May 18 02:05:56 2015 (r283043) +++ stable/9/contrib/tzdata/northamerica Mon May 18 02:09:37 2015 (r283044) @@ -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: stable/9/contrib/tzdata/southamerica ============================================================================== --- stable/9/contrib/tzdata/southamerica Mon May 18 02:05:56 2015 (r283043) +++ stable/9/contrib/tzdata/southamerica Mon May 18 02:09:37 2015 (r283044) @@ -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-all@FreeBSD.ORG Mon May 18 02:10:21 2015 Return-Path: Delivered-To: svn-src-all@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 5A0649A3; Mon, 18 May 2015 02:10: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 46DAF1B7E; Mon, 18 May 2015 02:10: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 t4I2ALd1062001; Mon, 18 May 2015 02:10:21 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I2AJ03061991; Mon, 18 May 2015 02:10:19 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505180210.t4I2AJ03061991@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 02:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r283045 - stable/8/share/zoneinfo X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 02:10:21 -0000 Author: edwin Date: Mon May 18 02:10:19 2015 New Revision: 283045 URL: https://svnweb.freebsd.org/changeset/base/283045 Log: MFC of 283042,tzdata8: 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: stable/8/share/zoneinfo/africa stable/8/share/zoneinfo/antarctica stable/8/share/zoneinfo/backward stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/northamerica stable/8/share/zoneinfo/southamerica Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/africa ============================================================================== --- stable/8/share/zoneinfo/africa Mon May 18 02:09:37 2015 (r283044) +++ stable/8/share/zoneinfo/africa Mon May 18 02:10:19 2015 (r283045) @@ -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: stable/8/share/zoneinfo/antarctica ============================================================================== --- stable/8/share/zoneinfo/antarctica Mon May 18 02:09:37 2015 (r283044) +++ stable/8/share/zoneinfo/antarctica Mon May 18 02:10:19 2015 (r283045) @@ -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: stable/8/share/zoneinfo/backward ============================================================================== --- stable/8/share/zoneinfo/backward Mon May 18 02:09:37 2015 (r283044) +++ stable/8/share/zoneinfo/backward Mon May 18 02:10:19 2015 (r283045) @@ -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: stable/8/share/zoneinfo/europe ============================================================================== --- stable/8/share/zoneinfo/europe Mon May 18 02:09:37 2015 (r283044) +++ stable/8/share/zoneinfo/europe Mon May 18 02:10:19 2015 (r283045) @@ -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: stable/8/share/zoneinfo/northamerica ============================================================================== --- stable/8/share/zoneinfo/northamerica Mon May 18 02:09:37 2015 (r283044) +++ stable/8/share/zoneinfo/northamerica Mon May 18 02:10:19 2015 (r283045) @@ -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: stable/8/share/zoneinfo/southamerica ============================================================================== --- stable/8/share/zoneinfo/southamerica Mon May 18 02:09:37 2015 (r283044) +++ stable/8/share/zoneinfo/southamerica Mon May 18 02:10:19 2015 (r283045) @@ -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-all@FreeBSD.ORG Mon May 18 02:10:47 2015 Return-Path: Delivered-To: svn-src-all@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 CEEB9BB2; Mon, 18 May 2015 02:10: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 BBD261B89; Mon, 18 May 2015 02:10: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 t4I2AlA6062238; Mon, 18 May 2015 02:10:47 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I2AkJE062226; Mon, 18 May 2015 02:10:46 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505180210.t4I2AkJE062226@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 02:10:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r283046 - stable/7/share/zoneinfo X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 02:10:47 -0000 Author: edwin Date: Mon May 18 02:10:45 2015 New Revision: 283046 URL: https://svnweb.freebsd.org/changeset/base/283046 Log: MFC of 283042,tzdata7: 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: stable/7/share/zoneinfo/africa stable/7/share/zoneinfo/antarctica stable/7/share/zoneinfo/backward stable/7/share/zoneinfo/europe stable/7/share/zoneinfo/northamerica stable/7/share/zoneinfo/southamerica Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/africa ============================================================================== --- stable/7/share/zoneinfo/africa Mon May 18 02:10:19 2015 (r283045) +++ stable/7/share/zoneinfo/africa Mon May 18 02:10:45 2015 (r283046) @@ -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: stable/7/share/zoneinfo/antarctica ============================================================================== --- stable/7/share/zoneinfo/antarctica Mon May 18 02:10:19 2015 (r283045) +++ stable/7/share/zoneinfo/antarctica Mon May 18 02:10:45 2015 (r283046) @@ -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: stable/7/share/zoneinfo/backward ============================================================================== --- stable/7/share/zoneinfo/backward Mon May 18 02:10:19 2015 (r283045) +++ stable/7/share/zoneinfo/backward Mon May 18 02:10:45 2015 (r283046) @@ -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: stable/7/share/zoneinfo/europe ============================================================================== --- stable/7/share/zoneinfo/europe Mon May 18 02:10:19 2015 (r283045) +++ stable/7/share/zoneinfo/europe Mon May 18 02:10:45 2015 (r283046) @@ -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: stable/7/share/zoneinfo/northamerica ============================================================================== --- stable/7/share/zoneinfo/northamerica Mon May 18 02:10:19 2015 (r283045) +++ stable/7/share/zoneinfo/northamerica Mon May 18 02:10:45 2015 (r283046) @@ -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: stable/7/share/zoneinfo/southamerica ============================================================================== --- stable/7/share/zoneinfo/southamerica Mon May 18 02:10:19 2015 (r283045) +++ stable/7/share/zoneinfo/southamerica Mon May 18 02:10:45 2015 (r283046) @@ -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-all@FreeBSD.ORG Mon May 18 02:11:12 2015 Return-Path: Delivered-To: svn-src-all@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 101BDDC4; Mon, 18 May 2015 02:11: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 F0A9F1B9E; Mon, 18 May 2015 02:11: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 t4I2BBCw064429; Mon, 18 May 2015 02:11:11 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4I2BAfD064419; Mon, 18 May 2015 02:11:10 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505180211.t4I2BAfD064419@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 02:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r283047 - stable/6/share/zoneinfo X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 02:11:12 -0000 Author: edwin Date: Mon May 18 02:11:09 2015 New Revision: 283047 URL: https://svnweb.freebsd.org/changeset/base/283047 Log: MFC of 283042,tzdata6: 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: stable/6/share/zoneinfo/africa stable/6/share/zoneinfo/antarctica stable/6/share/zoneinfo/backward stable/6/share/zoneinfo/europe stable/6/share/zoneinfo/northamerica stable/6/share/zoneinfo/southamerica Directory Properties: stable/6/share/zoneinfo/ (props changed) Modified: stable/6/share/zoneinfo/africa ============================================================================== --- stable/6/share/zoneinfo/africa Mon May 18 02:10:45 2015 (r283046) +++ stable/6/share/zoneinfo/africa Mon May 18 02:11:09 2015 (r283047) @@ -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: stable/6/share/zoneinfo/antarctica ============================================================================== --- stable/6/share/zoneinfo/antarctica Mon May 18 02:10:45 2015 (r283046) +++ stable/6/share/zoneinfo/antarctica Mon May 18 02:11:09 2015 (r283047) @@ -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: stable/6/share/zoneinfo/backward ============================================================================== --- stable/6/share/zoneinfo/backward Mon May 18 02:10:45 2015 (r283046) +++ stable/6/share/zoneinfo/backward Mon May 18 02:11:09 2015 (r283047) @@ -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: stable/6/share/zoneinfo/europe ============================================================================== --- stable/6/share/zoneinfo/europe Mon May 18 02:10:45 2015 (r283046) +++ stable/6/share/zoneinfo/europe Mon May 18 02:11:09 2015 (r283047) @@ -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: stable/6/share/zoneinfo/northamerica ============================================================================== --- stable/6/share/zoneinfo/northamerica Mon May 18 02:10:45 2015 (r283046) +++ stable/6/share/zoneinfo/northamerica Mon May 18 02:11:09 2015 (r283047) @@ -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: stable/6/share/zoneinfo/southamerica ============================================================================== --- stable/6/share/zoneinfo/southamerica Mon May 18 02:10:45 2015 (r283046) +++ stable/6/share/zoneinfo/southamerica Mon May 18 02:11:09 2015 (r283047) @@ -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-all@FreeBSD.ORG Mon May 18 06:02:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 06:03:22 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 06:04:21 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 06:07:03 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 07:22:15 2015 Return-Path: Delivered-To: svn-src-all@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 E9CB2213 for ; Mon, 18 May 2015 07:22:15 +0000 (UTC) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::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 7B9181B35 for ; Mon, 18 May 2015 07:22:15 +0000 (UTC) Received: by wicmc15 with SMTP id mc15so82038690wic.1 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=NSc4ScNCGmpGBLdvBaJX3lplhe9nt+nSZqP4iLx/ivUJ02kT2RpmQEASMn4d0xgNtX lz0qNluXpMKte6lC2dk/gqW4tEtJzQXofrb+pXjQ/L2gRvuA32QXcWve3tfWuKcqgJ3p SjjLPYgwdw6jG0RRXVEQf1fLWMEhYvw/bdXr5UnhmN5m0C2VybNRllwHDyiVtrJFDpIa 387jZ/KZzwUzPUrvCZ7XoNnCvND510E1NlTFzMUxOX8/sDG9/waaubK2Ipigd3pbIWCy ZUmsxqZ26C+iq6xVra17qv2EuI2KoIsKKfyK4RuAhPI6+KnnIqFEafOmhGCP6RVhF/Tc SMrw== X-Gm-Message-State: ALoCoQmVNaKz37TrKY+srZ3luz6ED/eBnSz0S7rok1VbuDItlWGyE5jEvyOGpWwP7lr3vrhYZ9lF 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 08:12:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 08:14:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 10:15:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 10:31:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 10:45:19 2015 Return-Path: Delivered-To: svn-src-all@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 2DC148D1; Mon, 18 May 2015 10:45: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 1C0C512DF; Mon, 18 May 2015 10:45: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 t4IAjIlY018596; Mon, 18 May 2015 10:45:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IAjIZg018594; Mon, 18 May 2015 10:45:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505181045.t4IAjIZg018594@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 10:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283054 - stable/10/lib/libmd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 10:45:19 -0000 Author: ngie Date: Mon May 18 10:45:18 2015 New Revision: 283054 URL: https://svnweb.freebsd.org/changeset/base/283054 Log: MFC r281928: Avoid an infinite loop by ensuring that the amount of bytes read is greater than 0 in MDXFileChunk when calculating the checksum This edgecase can be triggered if the file is truncated while the checksum is being calculated (i.e. the EOF is reached) Differential Revision: https://reviews.freebsd.org/D2351 (patch by darius) PR: 196694 Reviewed by: delphij, ngie Submitted by: Daniel O'Connor Sponsored by: EMC / Isilon Storage Division Modified: stable/10/lib/libmd/mdXhl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmd/mdXhl.c ============================================================================== --- stable/10/lib/libmd/mdXhl.c Mon May 18 10:31:23 2015 (r283053) +++ stable/10/lib/libmd/mdXhl.c Mon May 18 10:45:18 2015 (r283054) @@ -74,7 +74,7 @@ MDXFileChunk(const char *filename, char i = read(f, buffer, sizeof(buffer)); else i = read(f, buffer, n); - if (i < 0) + if (i <= 0) break; MDXUpdate(&ctx, buffer, i); n -= i; From owner-svn-src-all@FreeBSD.ORG Mon May 18 10:46:52 2015 Return-Path: Delivered-To: svn-src-all@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 3F10CA4D; Mon, 18 May 2015 10:46: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 2D44A1309; Mon, 18 May 2015 10:46: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 t4IAkqof018886; Mon, 18 May 2015 10:46:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IAkqBo018885; Mon, 18 May 2015 10:46:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505181046.t4IAkqBo018885@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 10:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283055 - stable/9/lib/libmd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 10:46:52 -0000 Author: ngie Date: Mon May 18 10:46:51 2015 New Revision: 283055 URL: https://svnweb.freebsd.org/changeset/base/283055 Log: MFstable/10 r283054: MFC r281928: Avoid an infinite loop by ensuring that the amount of bytes read is greater than 0 in MDXFileChunk when calculating the checksum This edgecase can be triggered if the file is truncated while the checksum is being calculated (i.e. the EOF is reached) Differential Revision: https://reviews.freebsd.org/D2351 (patch by darius) PR: 196694 Reviewed by: delphij, ngie Submitted by: Daniel O'Connor Sponsored by: EMC / Isilon Storage Division Modified: stable/9/lib/libmd/mdXhl.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) Modified: stable/9/lib/libmd/mdXhl.c ============================================================================== --- stable/9/lib/libmd/mdXhl.c Mon May 18 10:45:18 2015 (r283054) +++ stable/9/lib/libmd/mdXhl.c Mon May 18 10:46:51 2015 (r283055) @@ -74,7 +74,7 @@ MDXFileChunk(const char *filename, char i = read(f, buffer, sizeof(buffer)); else i = read(f, buffer, n); - if (i < 0) + if (i <= 0) break; MDXUpdate(&ctx, buffer, i); n -= i; From owner-svn-src-all@FreeBSD.ORG Mon May 18 11:02:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 11:04:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 11:30:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 11:41:55 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 13:43:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 14:04:29 2015 Return-Path: Delivered-To: svn-src-all@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 7ACBFB29 for ; Mon, 18 May 2015 14:04:29 +0000 (UTC) Received: from outbound3.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) by mx1.freebsd.org (Postfix) with SMTP id 4CCC21CE9 for ; Mon, 18 May 2015 14:04:29 +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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 14:04:29 -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-all@FreeBSD.ORG Mon May 18 14:11:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 14:27:05 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 14:52:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 15:02:36 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 15:05:13 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 15:41:58 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 15:46:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 15:51:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 16:02:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 16:05:42 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 16:12:42 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 16:18:05 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 16:28:14 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 16:41:09 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 16:43:21 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 16:51:06 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 18:03:48 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 18:17:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 18:25:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 19:18:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 19:37:56 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 19:45:47 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 19:48:42 2015 Return-Path: Delivered-To: svn-src-all@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 B16EA9AA; Mon, 18 May 2015 19:48: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 9F2B41B7A; Mon, 18 May 2015 19:48: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 t4IJmgI6093224; Mon, 18 May 2015 19:48:42 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IJmgBJ093222; Mon, 18 May 2015 19:48:42 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201505181948.t4IJmgBJ093222@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Mon, 18 May 2015 19:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283076 - in stable/10/sys: amd64/conf i386/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 19:48:42 -0000 Author: jimharris Date: Mon May 18 19:48:41 2015 New Revision: 283076 URL: https://svnweb.freebsd.org/changeset/base/283076 Log: MFC r282921: Add nvme and nvd drivers to GENERIC for amd64 and i386. Sponsored by: Intel Modified: stable/10/sys/amd64/conf/GENERIC stable/10/sys/i386/conf/GENERIC Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Mon May 18 19:45:46 2015 (r283075) +++ stable/10/sys/amd64/conf/GENERIC Mon May 18 19:48:41 2015 (r283076) @@ -161,6 +161,10 @@ device mrsas # LSI/Avago MegaRAID SAS #device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID +# NVM Express (NVMe) support +device nvme # base NVMe driver +device nvd # expose NVMe namespaces as disks, depends on nvme + # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard Modified: stable/10/sys/i386/conf/GENERIC ============================================================================== --- stable/10/sys/i386/conf/GENERIC Mon May 18 19:45:46 2015 (r283075) +++ stable/10/sys/i386/conf/GENERIC Mon May 18 19:48:41 2015 (r283076) @@ -166,6 +166,10 @@ device mrsas # LSI/Avago MegaRAID SAS device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID +# NVM Express (NVMe) support +device nvme # base NVMe driver +device nvd # expose NVMe namespace as disks, depends on nvme + # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard From owner-svn-src-all@FreeBSD.ORG Mon May 18 21:02:34 2015 Return-Path: Delivered-To: svn-src-all@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 ABEC49E; Mon, 18 May 2015 21:02: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 99B9F1531; Mon, 18 May 2015 21:02: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 t4IL2Y7u035932; Mon, 18 May 2015 21:02:34 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IL2YPf035930; Mon, 18 May 2015 21:02:34 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505182102.t4IL2YPf035930@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:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283077 - vendor/tzdata/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 21:02:34 -0000 Author: edwin Date: Mon May 18 21:02:33 2015 New Revision: 283077 URL: https://svnweb.freebsd.org/changeset/base/283077 Log: Vendor import of 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. Obtained from: ftp://ftp.iana.org/tz/releases/ Modified: vendor/tzdata/dist/africa vendor/tzdata/dist/northamerica Modified: vendor/tzdata/dist/africa ============================================================================== --- vendor/tzdata/dist/africa Mon May 18 19:48:41 2015 (r283076) +++ vendor/tzdata/dist/africa Mon May 18 21:02:33 2015 (r283077) @@ -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: vendor/tzdata/dist/northamerica ============================================================================== --- vendor/tzdata/dist/northamerica Mon May 18 19:48:41 2015 (r283076) +++ vendor/tzdata/dist/northamerica Mon May 18 21:02:33 2015 (r283077) @@ -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-all@FreeBSD.ORG Mon May 18 21:03:25 2015 Return-Path: Delivered-To: svn-src-all@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 C67D31DB; Mon, 18 May 2015 21:03:25 +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 9D23A1542; Mon, 18 May 2015 21:03:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IL3PZi036155; Mon, 18 May 2015 21:03:25 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IL3P65036153; Mon, 18 May 2015 21:03:25 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505182103.t4IL3P65036153@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:03:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283078 - vendor/tzdata/tzdata2015d X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 21:03:25 -0000 Author: edwin Date: Mon May 18 21:03:25 2015 New Revision: 283078 URL: https://svnweb.freebsd.org/changeset/base/283078 Log: Tag of tzdata 2015d Added: - copied from r283077, vendor/tzdata/dist/ Directory Properties: vendor/tzdata/tzdata2015d/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon May 18 21:05:12 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 21:07:45 2015 Return-Path: Delivered-To: svn-src-all@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 E13874CD; Mon, 18 May 2015 21:07: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 CE9301596; Mon, 18 May 2015 21:07: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 t4IL7jXp036914; Mon, 18 May 2015 21:07:45 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IL7j2Q036912; Mon, 18 May 2015 21:07:45 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505182107.t4IL7j2Q036912@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:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283080 - stable/10/contrib/tzdata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 21:07:46 -0000 Author: edwin Date: Mon May 18 21:07:44 2015 New Revision: 283080 URL: https://svnweb.freebsd.org/changeset/base/283080 Log: MFC of 283079,tzdata10: 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: stable/10/contrib/tzdata/africa stable/10/contrib/tzdata/northamerica Modified: stable/10/contrib/tzdata/africa ============================================================================== --- stable/10/contrib/tzdata/africa Mon May 18 21:05:11 2015 (r283079) +++ stable/10/contrib/tzdata/africa Mon May 18 21:07:44 2015 (r283080) @@ -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: stable/10/contrib/tzdata/northamerica ============================================================================== --- stable/10/contrib/tzdata/northamerica Mon May 18 21:05:11 2015 (r283079) +++ stable/10/contrib/tzdata/northamerica Mon May 18 21:07:44 2015 (r283080) @@ -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-all@FreeBSD.ORG Mon May 18 21:17:20 2015 Return-Path: Delivered-To: svn-src-all@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 B86266E9; Mon, 18 May 2015 21:17: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 A5F97169D; Mon, 18 May 2015 21:17: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 t4ILHKa9041872; Mon, 18 May 2015 21:17:20 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ILHKxm041867; Mon, 18 May 2015 21:17:20 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505182117.t4ILHKxm041867@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:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283081 - stable/9/contrib/tzdata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 21:17:20 -0000 Author: edwin Date: Mon May 18 21:17:19 2015 New Revision: 283081 URL: https://svnweb.freebsd.org/changeset/base/283081 Log: MFC of 283079,tzdata9: 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: stable/9/contrib/tzdata/africa stable/9/contrib/tzdata/northamerica Directory Properties: stable/9/contrib/tzdata/ (props changed) Modified: stable/9/contrib/tzdata/africa ============================================================================== --- stable/9/contrib/tzdata/africa Mon May 18 21:07:44 2015 (r283080) +++ stable/9/contrib/tzdata/africa Mon May 18 21:17:19 2015 (r283081) @@ -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: stable/9/contrib/tzdata/northamerica ============================================================================== --- stable/9/contrib/tzdata/northamerica Mon May 18 21:07:44 2015 (r283080) +++ stable/9/contrib/tzdata/northamerica Mon May 18 21:17:19 2015 (r283081) @@ -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-all@FreeBSD.ORG Mon May 18 21:18:45 2015 Return-Path: Delivered-To: svn-src-all@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 5D3A082F; Mon, 18 May 2015 21:18: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 4A91916A6; Mon, 18 May 2015 21:18: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 t4ILIjas042165; Mon, 18 May 2015 21:18:45 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ILIiVv042163; Mon, 18 May 2015 21:18:44 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505182118.t4ILIiVv042163@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:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r283082 - stable/8/share/zoneinfo X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 21:18:45 -0000 Author: edwin Date: Mon May 18 21:18:44 2015 New Revision: 283082 URL: https://svnweb.freebsd.org/changeset/base/283082 Log: MFC of 283079,tzdata8: 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: stable/8/share/zoneinfo/africa stable/8/share/zoneinfo/northamerica Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/africa ============================================================================== --- stable/8/share/zoneinfo/africa Mon May 18 21:17:19 2015 (r283081) +++ stable/8/share/zoneinfo/africa Mon May 18 21:18:44 2015 (r283082) @@ -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: stable/8/share/zoneinfo/northamerica ============================================================================== --- stable/8/share/zoneinfo/northamerica Mon May 18 21:17:19 2015 (r283081) +++ stable/8/share/zoneinfo/northamerica Mon May 18 21:18:44 2015 (r283082) @@ -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-all@FreeBSD.ORG Mon May 18 21:27:47 2015 Return-Path: Delivered-To: svn-src-all@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 AC1A4BC6; Mon, 18 May 2015 21:27: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 8DDCC17B4; Mon, 18 May 2015 21:27: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 t4ILRlNc047743; Mon, 18 May 2015 21:27:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ILRlmI047742; Mon, 18 May 2015 21:27:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505182127.t4ILRlmI047742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 18 May 2015 21:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283083 - stable/10/usr.bin/whois X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 21:27:47 -0000 Author: delphij Date: Mon May 18 21:27:46 2015 New Revision: 283083 URL: https://svnweb.freebsd.org/changeset/base/283083 Log: MFC r281959,282885 (fanf, partial),282888 (fanf): Try alternate addresses more agressively. PR: 158125 Submitted by: Mark Andrews (with changes from me) whois: code cleanup Use pedantically correct types. whois: do not clobber command-line flags when tweaking O_NONBLOCK This can make whois fail to follow referrals when it should. The bug was introduced in r281959. Modified: stable/10/usr.bin/whois/whois.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/whois/whois.c ============================================================================== --- stable/10/usr.bin/whois/whois.c Mon May 18 21:18:44 2015 (r283082) +++ stable/10/usr.bin/whois/whois.c Mon May 18 21:27:46 2015 (r283083) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. * @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -55,6 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #define ABUSEHOST "whois.abuse.net" #define NICHOST "whois.crsnic.net" @@ -280,21 +283,137 @@ whois(const char *query, const char *hos FILE *sfi, *sfo; struct addrinfo *hostres, *res; char *buf, *host, *nhost, *p; - int i, s; - size_t c, len; + int s = -1, f; + nfds_t i, j; + size_t c, len, count; + struct pollfd *fds; + int timeout = 180; - s = -1; hostres = gethostinfo(hostname, 1); - for (res = hostres; res; res = res->ai_next) { - s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); + for (res = hostres, count = 0; res; res = res->ai_next) + count++; + + fds = calloc(count, sizeof(*fds)); + if (fds == NULL) + err(EX_OSERR, "calloc()"); + + /* + * Traverse the result list elements and make non-block + * connection attempts. + */ + count = i = 0; + for (res = hostres; res != NULL; res = res->ai_next) { + s = socket(res->ai_family, res->ai_socktype | SOCK_NONBLOCK, + res->ai_protocol); if (s < 0) continue; - if (connect(s, res->ai_addr, res->ai_addrlen) == 0) - break; - close(s); + if (connect(s, res->ai_addr, res->ai_addrlen) < 0) { + if (errno == EINPROGRESS) { + /* Add the socket to poll list */ + fds[i].fd = s; + fds[i].events = POLLERR | POLLHUP | + POLLIN | POLLOUT; + count++; + i++; + } else { + close(s); + s = -1; + + /* + * Poll only if we have something to poll, + * otherwise just go ahead and try next + * address + */ + if (count == 0) + continue; + } + } else + goto done; + + /* + * If we are at the last address, poll until a connection is + * established or we failed all connection attempts. + */ + if (res->ai_next == NULL) + timeout = INFTIM; + + /* + * Poll the watched descriptors for successful connections: + * if we still have more untried resolved addresses, poll only + * once; otherwise, poll until all descriptors have errors, + * which will be considered as ETIMEDOUT later. + */ + do { + int n; + + n = poll(fds, i, timeout); + if (n == 0) { + /* + * No event reported in time. Try with a + * smaller timeout (but cap at 2-3ms) + * after a new host have been added. + */ + if (timeout >= 3) + timeout <<= 1; + + break; + } else if (n < 0) { + /* + * errno here can only be EINTR which we would want + * to clean up and bail out. + */ + s = -1; + goto done; + } + + /* + * Check for the event(s) we have seen. + */ + for (j = 0; j < i; j++) { + if (fds[j].fd == -1 || fds[j].events == 0 || + fds[j].revents == 0) + continue; + if (fds[j].revents & ~(POLLIN | POLLOUT)) { + close(s); + fds[j].fd = -1; + fds[j].events = 0; + count--; + continue; + } else if (fds[j].revents & (POLLIN | POLLOUT)) { + /* Connect succeeded. */ + s = fds[j].fd; + + goto done; + } + + } + } while (timeout == INFTIM && count != 0); } + + /* All attempts were failed */ + s = -1; + if (count == 0) + errno = ETIMEDOUT; + +done: + /* Close all watched fds except the succeeded one */ + for (j = 0; j < i; j++) + if (fds[j].fd != s && fds[j].fd != -1) + close(fds[j].fd); + + if (s != -1) { + /* Restore default blocking behavior. */ + if ((f = fcntl(s, F_GETFL)) != -1) { + f &= ~O_NONBLOCK; + if (fcntl(s, F_SETFL, f) == -1) + err(EX_OSERR, "fcntl()"); + } else + err(EX_OSERR, "fcntl()"); + } + + free(fds); freeaddrinfo(hostres); - if (res == NULL) + if (s == -1) err(EX_OSERR, "connect()"); sfi = fdopen(s, "r"); From owner-svn-src-all@FreeBSD.ORG Mon May 18 22:03:08 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 22:10:16 2015 Return-Path: Delivered-To: svn-src-all@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 4AB245BB; Mon, 18 May 2015 22:10: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 39B8F1C60; Mon, 18 May 2015 22:10: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 t4IMAG0k069523; Mon, 18 May 2015 22:10:16 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IMAGD4069522; Mon, 18 May 2015 22:10:16 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505182210.t4IMAGD4069522@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 22:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r283085 - stable/7/share/zoneinfo X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 22:10:16 -0000 Author: edwin Date: Mon May 18 22:10:15 2015 New Revision: 283085 URL: https://svnweb.freebsd.org/changeset/base/283085 Log: MFC of 283084,tzdata7: 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: Directory Properties: stable/7/share/zoneinfo/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon May 18 22:12:51 2015 Return-Path: Delivered-To: svn-src-all@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 28BF2749; Mon, 18 May 2015 22:12: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 15EC71D21; Mon, 18 May 2015 22:12: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 t4IMCojR073046; Mon, 18 May 2015 22:12:50 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IMCoYN073044; Mon, 18 May 2015 22:12:50 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505182212.t4IMCoYN073044@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 22:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r283086 - stable/7/share/zoneinfo X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 22:12:51 -0000 Author: edwin Date: Mon May 18 22:12:50 2015 New Revision: 283086 URL: https://svnweb.freebsd.org/changeset/base/283086 Log: MFC of 283079,tzdata7: 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: stable/7/share/zoneinfo/africa stable/7/share/zoneinfo/northamerica Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/africa ============================================================================== --- stable/7/share/zoneinfo/africa Mon May 18 22:10:15 2015 (r283085) +++ stable/7/share/zoneinfo/africa Mon May 18 22:12:50 2015 (r283086) @@ -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: stable/7/share/zoneinfo/northamerica ============================================================================== --- stable/7/share/zoneinfo/northamerica Mon May 18 22:10:15 2015 (r283085) +++ stable/7/share/zoneinfo/northamerica Mon May 18 22:12:50 2015 (r283086) @@ -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-all@FreeBSD.ORG Mon May 18 22:14:07 2015 Return-Path: Delivered-To: svn-src-all@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 42533893; Mon, 18 May 2015 22:14: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 2F87C1D2B; Mon, 18 May 2015 22:14: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 t4IME7xt073288; Mon, 18 May 2015 22:14:07 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IME6cd073286; Mon, 18 May 2015 22:14:06 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201505182214.t4IME6cd073286@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 22:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r283087 - stable/6/share/zoneinfo X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 22:14:07 -0000 Author: edwin Date: Mon May 18 22:14:06 2015 New Revision: 283087 URL: https://svnweb.freebsd.org/changeset/base/283087 Log: MFC of 283079,tzdata6: 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: stable/6/share/zoneinfo/africa stable/6/share/zoneinfo/northamerica Directory Properties: stable/6/share/zoneinfo/ (props changed) Modified: stable/6/share/zoneinfo/africa ============================================================================== --- stable/6/share/zoneinfo/africa Mon May 18 22:12:50 2015 (r283086) +++ stable/6/share/zoneinfo/africa Mon May 18 22:14:06 2015 (r283087) @@ -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: stable/6/share/zoneinfo/northamerica ============================================================================== --- stable/6/share/zoneinfo/northamerica Mon May 18 22:12:50 2015 (r283086) +++ stable/6/share/zoneinfo/northamerica Mon May 18 22:14:06 2015 (r283087) @@ -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-all@FreeBSD.ORG Mon May 18 22:27:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 22:40:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Mon May 18 23:17:09 2015 Return-Path: Delivered-To: svn-src-all@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 ECEA23BD; Mon, 18 May 2015 23: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 D80821365; Mon, 18 May 2015 23: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 t4INH95M003926; Mon, 18 May 2015 23:17:09 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4INH6ej003884; Mon, 18 May 2015 23:17:06 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201505182317.t4INH6ej003884@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:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283090 - in vendor-sys/acpica/dist: . generate/unix generate/unix/acpidump generate/unix/acpihelp generate/unix/iasl source/common source/compiler source/components/debugger source/com... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 23:17:10 -0000 Author: jkim Date: Mon May 18 23:17:05 2015 New Revision: 283090 URL: https://svnweb.freebsd.org/changeset/base/283090 Log: Import ACPICA 20150515. Added: vendor-sys/acpica/dist/source/common/ahtable.c (contents, props changed) vendor-sys/acpica/dist/source/include/acuuid.h (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/Makefile.config vendor-sys/acpica/dist/generate/unix/acpidump/Makefile vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/compiler/aslascii.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslprepkg.c vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dtsubtable.c vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttemplate.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/compiler/preprocess.h vendor-sys/acpica/dist/source/compiler/prscan.c vendor-sys/acpica/dist/source/compiler/prutils.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/hardware/hwpci.c vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c vendor-sys/acpica/dist/source/components/namespace/nsrepair.c vendor-sys/acpica/dist/source/components/parser/psopinfo.c vendor-sys/acpica/dist/source/components/utilities/utfileio.c vendor-sys/acpica/dist/source/components/utilities/uthex.c vendor-sys/acpica/dist/source/components/utilities/utxferror.c vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acparser.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actbl3.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/platform/acenv.h vendor-sys/acpica/dist/source/include/platform/acenvex.h vendor-sys/acpica/dist/source/os_specific/service_layers/osbsdtbl.c vendor-sys/acpica/dist/source/tools/acpihelp/acpihelp.h vendor-sys/acpica/dist/source/tools/acpihelp/ahaslkey.c vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpihelp/ahmain.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Mon May 18 22:40:12 2015 (r283089) +++ vendor-sys/acpica/dist/changes.txt Mon May 18 23:17:05 2015 (r283090) @@ -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: vendor-sys/acpica/dist/generate/unix/Makefile.config ============================================================================== --- vendor-sys/acpica/dist/generate/unix/Makefile.config Mon May 18 22:40:12 2015 (r283089) +++ vendor-sys/acpica/dist/generate/unix/Makefile.config Mon May 18 23:17:05 2015 (r283090) @@ -55,6 +55,10 @@ ifeq ($(UNAME_S), Darwin) # Mac OS X HOST = _APPLE endif +ifeq ($(UNAME_S), DragonFly) +HOST = _DragonFly +endif + ifeq ($(UNAME_S), FreeBSD) HOST = _FreeBSD endif Modified: vendor-sys/acpica/dist/generate/unix/acpidump/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Mon May 18 22:40:12 2015 (r283089) +++ vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Mon May 18 23:17:05 2015 (r283090) @@ -51,6 +51,10 @@ OBJECTS = \ # # Per-host interfaces # +ifeq ($(HOST), _DragonFly) +HOST_FAMILY = BSD +endif + ifeq ($(HOST), _FreeBSD) HOST_FAMILY = BSD endif Modified: vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile Mon May 18 22:40:12 2015 (r283089) +++ vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile Mon May 18 23:17:05 2015 (r283090) @@ -35,6 +35,7 @@ OBJECTS = \ $(OBJDIR)/ahids.o\ $(OBJDIR)/ahpredef.o\ $(OBJDIR)/ahmain.o\ + $(OBJDIR)/ahtable.o\ $(OBJDIR)/ahuuids.o\ $(OBJDIR)/getopt.o\ $(OBJDIR)/oslibcfs.o\ Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Mon May 18 22:40:12 2015 (r283089) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Mon May 18 23:17:05 2015 (r283090) @@ -48,6 +48,7 @@ OBJECTS = \ $(OBJDIR)/adwalk.o\ $(OBJDIR)/ahids.o\ $(OBJDIR)/ahpredef.o\ + $(OBJDIR)/ahtable.o\ $(OBJDIR)/ahuuids.o\ $(OBJDIR)/aslanalyze.o\ $(OBJDIR)/aslascii.o\ Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Mon May 18 22:40:12 2015 (r283089) +++ vendor-sys/acpica/dist/source/common/adisasm.c Mon May 18 23:17:05 2015 (r283090) @@ -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: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Mon May 18 22:40:12 2015 (r283089) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Mon May 18 23:17:05 2015 (r283090) @@ -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"), Added: vendor-sys/acpica/dist/source/common/ahtable.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/source/common/ahtable.c Mon May 18 23:17:05 2015 (r283090) @@ -0,0 +1,150 @@ +/****************************************************************************** + * + * Module Name: ahtable - Table of known ACPI tables with descriptions + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2015, Intel Corp. + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + +#include "acpi.h" +#include "accommon.h" + + +/* Local prototypes */ + +const AH_TABLE * +AcpiAhGetTableInfo ( + char *Signature); + +extern const AH_TABLE AcpiSupportedTables[]; + + +/******************************************************************************* + * + * FUNCTION: AcpiAhGetTableInfo + * + * PARAMETERS: Signature - ACPI signature (4 chars) to match + * + * RETURN: Pointer to a valid AH_TABLE. Null if no match found. + * + * DESCRIPTION: Find a match in the "help" table of supported ACPI tables + * + ******************************************************************************/ + +const AH_TABLE * +AcpiAhGetTableInfo ( + char *Signature) +{ + const AH_TABLE *Info; + + + for (Info = AcpiSupportedTables; Info->Signature; Info++) + { + if (ACPI_COMPARE_NAME (Signature, Info->Signature)) + { + return (Info); + } + } + + return (NULL); +} + + +/* + * Note: Any tables added here should be duplicated within AcpiDmTableData + * in the file common/dmtable.c + */ +const AH_TABLE AcpiSupportedTables[] = +{ + {ACPI_SIG_ASF, "Alert Standard Format table"}, + {ACPI_SIG_BERT, "Boot Error Record Table"}, + {ACPI_SIG_BGRT, "Boot Graphics Resource Table"}, + {ACPI_SIG_BOOT, "Simple Boot Flag Table"}, + {ACPI_SIG_CPEP, "Corrected Platform Error Polling table"}, + {ACPI_SIG_CSRT, "Core System Resource Table"}, + {ACPI_SIG_DBG2, "Debug Port table type 2"}, + {ACPI_SIG_DBGP, "Debug Port table"}, + {ACPI_SIG_DMAR, "DMA Remapping table"}, + {ACPI_SIG_DRTM, "Dynamic Root of Trust for Measurement table"}, + {ACPI_SIG_DSDT, "Differentiated System Description Table (AML table)"}, + {ACPI_SIG_ECDT, "Embedded Controller Boot Resources Table"}, + {ACPI_SIG_EINJ, "Error Injection table"}, + {ACPI_SIG_ERST, "Error Record Serialization Table"}, + {ACPI_SIG_FACS, "Firmware ACPI Control Structure"}, + {ACPI_SIG_FADT, "Fixed ACPI Description Table (FADT)"}, + {ACPI_SIG_FPDT, "Firmware Performance Data Table"}, + {ACPI_SIG_GTDT, "Generic Timer Description Table"}, + {ACPI_SIG_HEST, "Hardware Error Source Table"}, + {ACPI_SIG_HPET, "High Precision Event Timer table"}, + {ACPI_SIG_IORT, "IO Remapping Table"}, + {ACPI_SIG_IVRS, "I/O Virtualization Reporting Structure"}, + {ACPI_SIG_LPIT, "Low Power Idle Table"}, + {ACPI_SIG_MADT, "Multiple APIC Description Table (MADT)"}, + {ACPI_SIG_MCFG, "Memory Mapped Configuration table"}, + {ACPI_SIG_MCHI, "Management Controller Host Interface table"}, + {ACPI_SIG_MPST, "Memory Power State Table"}, + {ACPI_SIG_MSCT, "Maximum System Characteristics Table"}, + {ACPI_SIG_MSDM, "Microsoft Data Management table"}, + {ACPI_SIG_MTMR, "MID Timer Table"}, + {ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"}, + {ACPI_SIG_PCCT, "Platform Communications Channel Table"}, + {ACPI_SIG_PMTT, "Platform Memory Topology Table"}, + {ACPI_RSDP_NAME,"Root System Description Pointer"}, + {ACPI_SIG_RSDT, "Root System Description Table"}, + {ACPI_SIG_S3PT, "S3 Performance Table"}, + {ACPI_SIG_SBST, "Smart Battery Specification Table"}, + {ACPI_SIG_SLIC, "Software Licensing Description Table"}, + {ACPI_SIG_SLIT, "System Locality Information Table"}, + {ACPI_SIG_SPCR, "Serial Port Console Redirection table"}, + {ACPI_SIG_SPMI, "Server Platform Management Interface table"}, + {ACPI_SIG_SRAT, "System Resource Affinity Table"}, + {ACPI_SIG_SSDT, "Secondary System Description Table (AML table)"}, + {ACPI_SIG_STAO, "Status Override table"}, + {ACPI_SIG_TCPA, "Trusted Computing Platform Alliance table"}, + {ACPI_SIG_TPM2, "Trusted Platform Module hardware interface table"}, + {ACPI_SIG_UEFI, "UEFI Boot Optimization Table"}, + {ACPI_SIG_VRTC, "Virtual Real-Time Clock Table"}, + {ACPI_SIG_WAET, "Windows ACPI Emulated Devices Table"}, + {ACPI_SIG_WDAT, "Watchdog Action Table"}, + {ACPI_SIG_WDDT, "Watchdog Description Table"}, + {ACPI_SIG_WDRT, "Watchdog Resource Table"}, + {ACPI_SIG_WPBT, "Windows Platform Binary Table"}, + {ACPI_SIG_XENV, "Xen Environment table"}, + {ACPI_SIG_XSDT, "Extended System Description Table"}, + {NULL, NULL} +}; Modified: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Mon May 18 22:40:12 2015 (r283089) +++ vendor-sys/acpica/dist/source/common/dmextern.c Mon May 18 23:17:05 2015 (r283090) @@ -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: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Mon May 18 22:40:12 2015 (r283089) +++ vendor-sys/acpica/dist/source/common/dmtable.c Mon May 18 23:17:05 2015 (r283090) @@ -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: vendor-sys/acpica/dist/source/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbdump.c Mon May 18 22:40:12 2015 (r283089) +++ vendor-sys/acpica/dist/source/common/dmtbdump.c Mon May 18 23:17:05 2015 (r283090) @@ -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); } + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 18 23:17:35 2015 Return-Path: Delivered-To: svn-src-all@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 2741F4F2; Mon, 18 May 2015 23:17: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 F0740136F; Mon, 18 May 2015 23:17: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 t4INHYLH004038; Mon, 18 May 2015 23:17:34 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4INHY2R004037; Mon, 18 May 2015 23:17:34 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201505182317.t4INHY2R004037@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:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283091 - vendor-sys/acpica/20150515 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 23:17:35 -0000 Author: jkim Date: Mon May 18 23:17:34 2015 New Revision: 283091 URL: https://svnweb.freebsd.org/changeset/base/283091 Log: Tag ACPICA 20150515. Added: vendor-sys/acpica/20150515/ - copied from r283090, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Mon May 18 23:46:14 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@FreeBSD.ORG Tue May 19 01:10:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 02:12:18 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 02:24:55 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 03:02:53 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 03:50:08 2015 Return-Path: Delivered-To: svn-src-all@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 2945D61B 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 C40BE1123 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 04:34:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 05:06:19 2015 Return-Path: Delivered-To: svn-src-all@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 D2502E07 for ; Tue, 19 May 2015 05:06:19 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::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 4DC41198A for ; Tue, 19 May 2015 05:06:19 +0000 (UTC) Received: by wgjc11 with SMTP id c11so3914581wgj.0 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=ZgH2hB9iUKUtlBJq2vUQl8tCBU/ln2vEv3Cjfext2rwwlWjCW2nBS8LHcqCP+m069t vjEKUUlr2xs/R+d3CPNzPDTcEwf6dEm5CvT0cwDF4yOgGY8+krpE10bzT/5QsCVcpKSk 0vbyQErIgYkYafSSGnHeJ7J6BwJMEDTyYIUIAMDSadi3N3G16ENUiVnt6ZcomL8D7dhf zLJe3nQXWGXKQzYlRo5RkkIw4oeP+77Yhysv6/s1sOET0YzkhO8P618cicWniFrAE9K0 CbWNp2aU6URyiSjAPNYdWHtCysSOblAEm0og4qvE44ybI/NJmmeVI1Eg00KJqh6L7S6N XpHA== X-Gm-Message-State: ALoCoQm8RXzYc8+xUtIXJ673jac5o5UQZjU335rFXJE3GbRyPZKeuyOki5RTT8GSQJi1eTLz2FRU 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 05:31:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 05:33:08 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 05:34:47 2015 Return-Path: Delivered-To: svn-src-all@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 6495C8D1 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 1D0521CC1 for ; Tue, 19 May 2015 05:34:46 +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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 05:41:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 05:57:03 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 06:45:07 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 06:45:57 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 08:00:40 2015 Return-Path: Delivered-To: svn-src-all@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 8A1AC405; Tue, 19 May 2015 08:00: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 77AA81CF2; Tue, 19 May 2015 08:00: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 t4J80eSi083922; Tue, 19 May 2015 08:00:40 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4J80eXe083921; Tue, 19 May 2015 08:00:40 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505190800.t4J80eXe083921@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 19 May 2015 08:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283100 - stable/10/sys/dev/hyperv/netvsc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 08:00:40 -0000 Author: delphij Date: Tue May 19 08:00:39 2015 New Revision: 283100 URL: https://svnweb.freebsd.org/changeset/base/283100 Log: MFC r279819: Fix CARP when in use in a HyperV environment: - Bump link state when stopping or starting the interface; - Don't handle SIOCGIFADDR specially, similar to r277103. This change is based on a previous revision from Andy Zhang (Microsoft) who did the diagnostic work and many thanks to them for their help in supporting the HyperV work. PR: kern/187203 Modified: stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue May 19 06:45:56 2015 (r283099) +++ stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue May 19 08:00:39 2015 (r283100) @@ -738,7 +738,14 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, switch(cmd) { case SIOCSIFADDR: - case SIOCGIFADDR: +#ifdef INET + if (ifa->ifa_addr->sa_family == AF_INET) { + ifp->if_flags |= IFF_UP; + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) + hn_ifinit(sc); + arp_ifinit(ifp, ifa); + } else +#endif error = ether_ioctl(ifp, cmd, data); break; case SIOCSIFMTU: @@ -902,6 +909,7 @@ hn_stop(hn_softc_t *sc) printf(" Closing Device ...\n"); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + if_link_state_change(ifp, LINK_STATE_DOWN); sc->hn_initdone = 0; ret = hv_rf_on_close(device_ctx); @@ -951,6 +959,7 @@ hn_ifinit_locked(hn_softc_t *sc) } ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + if_link_state_change(ifp, LINK_STATE_UP); } /* From owner-svn-src-all@FreeBSD.ORG Tue May 19 08:30:05 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 08:37:03 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 09:11:22 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 09:22:07 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 09:28:53 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 11:33:05 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 12:34:16 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 14:02:41 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 14:03:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 14:03:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 14:04:22 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 14:05:16 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 14:11:33 2015 Return-Path: Delivered-To: svn-src-all@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 4167AFD8 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 04C191044 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 14:21:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 14:23:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 14:49:32 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 15:25:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 15:29:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 15:43:21 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 15:48:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 15:58:30 2015 Return-Path: Delivered-To: svn-src-all@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 66CED50E 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 242671FC6 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 16:23:47 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 16:51:31 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 17:14:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 17:36:35 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 17:53:07 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 17:57:00 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 18:29:14 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 18:35:19 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 18:48:18 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 18:48:18 -0000 Sweet, just checking. Thanks for finding this! -a From owner-svn-src-all@FreeBSD.ORG Tue May 19 18:58:20 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 19:01:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 19:01:53 2015 Return-Path: Delivered-To: svn-src-all@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 CCA5A99D; Tue, 19 May 2015 19:01: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 BA59B174C; Tue, 19 May 2015 19:01: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 t4JJ1rdr020936; Tue, 19 May 2015 19:01:53 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JJ1rf2020935; Tue, 19 May 2015 19:01:53 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201505191901.t4JJ1rf2020935@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 19 May 2015 19:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283122 - stable/10/contrib/tcpdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 19:01:53 -0000 Author: brooks Date: Tue May 19 19:01:52 2015 New Revision: 283122 URL: https://svnweb.freebsd.org/changeset/base/283122 Log: MFC r282436 (the portion that makes sense): Remove "capability mode sandbox enabled" messages. These messages serve little purpose and break some consumers. PR: 199855 Differential Revision: https://reviews.freebsd.org/D2440 Reviewed by: rwatson Approved by: pjd Sponsored by: DARPA, AFRL Modified: stable/10/contrib/tcpdump/tcpdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tcpdump/tcpdump.c ============================================================================== --- stable/10/contrib/tcpdump/tcpdump.c Tue May 19 19:01:22 2015 (r283121) +++ stable/10/contrib/tcpdump/tcpdump.c Tue May 19 19:01:52 2015 (r283122) @@ -1618,8 +1618,6 @@ main(int argc, char **argv) cansandbox = (nflag && VFileName == NULL && zflag == NULL); if (cansandbox && cap_enter() < 0 && errno != ENOSYS) error("unable to enter the capability mode"); - if (cap_sandboxed()) - fprintf(stderr, "capability mode sandbox enabled\n"); #endif /* __FreeBSD__ */ do { From owner-svn-src-all@FreeBSD.ORG Tue May 19 19:11:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 19:11:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 19:11:27 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 19:15:20 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 19:17:21 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 21:00:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 21:16:38 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 21:16:52 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 21:16:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 21:57:12 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 21:59:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 22:22:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 22:23:16 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 22:24:20 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 22:29:12 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@FreeBSD.ORG Tue May 19 23:53:27 2015 Return-Path: Delivered-To: svn-src-all@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 1AC37D20; Tue, 19 May 2015 23:53: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 05E7D1843; Tue, 19 May 2015 23:53: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 t4JNrQQx069614; Tue, 19 May 2015 23:53:26 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4JNrQAI069609; Tue, 19 May 2015 23:53:26 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505192353.t4JNrQAI069609@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 19 May 2015 23:53:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r283135 - in stable/8: contrib/file contrib/file/Magdir contrib/file/doc contrib/file/m4 contrib/file/magic contrib/file/python contrib/file/src contrib/file/tests lib/libmagic usr.bin/... X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 23:53:27 -0000 Author: delphij Date: Tue May 19 23:53:25 2015 New Revision: 283135 URL: https://svnweb.freebsd.org/changeset/base/283135 Log: MFC: file 5.22. Added: stable/8/contrib/file/config.guess - copied unchanged from r283134, head/contrib/file/config.guess stable/8/contrib/file/config.sub - copied unchanged from r283134, head/contrib/file/config.sub stable/8/contrib/file/depcomp - copied unchanged from r283134, head/contrib/file/depcomp stable/8/contrib/file/doc/ - copied from r283134, head/contrib/file/doc/ stable/8/contrib/file/ltmain.sh - copied unchanged from r283134, head/contrib/file/ltmain.sh stable/8/contrib/file/m4/ - copied from r283134, head/contrib/file/m4/ stable/8/contrib/file/magic/ - copied from r283134, head/contrib/file/magic/ stable/8/contrib/file/missing - copied unchanged from r283134, head/contrib/file/missing stable/8/contrib/file/python/ - copied from r283134, head/contrib/file/python/ stable/8/contrib/file/src/ - copied from r283134, head/contrib/file/src/ stable/8/contrib/file/tests/escapevel.result - copied unchanged from r283134, head/contrib/file/tests/escapevel.result stable/8/contrib/file/tests/escapevel.testfile - copied unchanged from r283134, head/contrib/file/tests/escapevel.testfile stable/8/contrib/file/tests/issue311docx.result - copied unchanged from r283134, head/contrib/file/tests/issue311docx.result stable/8/contrib/file/tests/issue311docx.testfile - copied unchanged from r283134, head/contrib/file/tests/issue311docx.testfile Deleted: stable/8/contrib/file/Header stable/8/contrib/file/Localstuff stable/8/contrib/file/Magdir/ stable/8/contrib/file/Makefile.am-src stable/8/contrib/file/apprentice.c stable/8/contrib/file/apptype.c stable/8/contrib/file/ascmagic.c stable/8/contrib/file/asprintf.c stable/8/contrib/file/cdf.c stable/8/contrib/file/cdf.h stable/8/contrib/file/cdf_time.c stable/8/contrib/file/compress.c stable/8/contrib/file/elfclass.h stable/8/contrib/file/encoding.c stable/8/contrib/file/file.c stable/8/contrib/file/file.h stable/8/contrib/file/file.man stable/8/contrib/file/file_opts.h stable/8/contrib/file/fsmagic.c stable/8/contrib/file/funcs.c stable/8/contrib/file/getopt_long.c stable/8/contrib/file/is_tar.c stable/8/contrib/file/libmagic.man stable/8/contrib/file/magic.c stable/8/contrib/file/magic.h stable/8/contrib/file/magic.man stable/8/contrib/file/magic2mime stable/8/contrib/file/mygetopt.h stable/8/contrib/file/names.h stable/8/contrib/file/patchlevel.h stable/8/contrib/file/print.c stable/8/contrib/file/readcdf.c stable/8/contrib/file/readelf.c stable/8/contrib/file/readelf.h stable/8/contrib/file/softmagic.c stable/8/contrib/file/strlcat.c stable/8/contrib/file/strlcpy.c stable/8/contrib/file/tar.h stable/8/contrib/file/tests/gedcom.magic stable/8/contrib/file/vasprintf.c Modified: stable/8/contrib/file/ChangeLog stable/8/contrib/file/INSTALL stable/8/contrib/file/Makefile.am stable/8/contrib/file/Makefile.in stable/8/contrib/file/README stable/8/contrib/file/TODO stable/8/contrib/file/acinclude.m4 stable/8/contrib/file/aclocal.m4 stable/8/contrib/file/compile stable/8/contrib/file/config.h.in stable/8/contrib/file/configure stable/8/contrib/file/configure.ac stable/8/contrib/file/install-sh stable/8/contrib/file/tests/Makefile.am stable/8/contrib/file/tests/Makefile.in stable/8/contrib/file/tests/README stable/8/contrib/file/tests/gedcom.result stable/8/lib/libmagic/Makefile stable/8/lib/libmagic/config.h stable/8/usr.bin/file/Makefile Directory Properties: stable/8/contrib/file/ (props changed) stable/8/lib/libmagic/ (props changed) stable/8/usr.bin/file/ (props changed) Modified: stable/8/contrib/file/ChangeLog ============================================================================== --- stable/8/contrib/file/ChangeLog Tue May 19 22:29:11 2015 (r283134) +++ stable/8/contrib/file/ChangeLog Tue May 19 23:53:25 2015 (r283135) @@ -1,3 +1,645 @@ +2015-01-02 15:15 Christos Zoulas + + * release 5.22 + +2015-01-01 12:01 Christos Zoulas + + * add indirect relative for TIFF/Exif + +2014-12-16 18:10 Christos Zoulas + + * restructure elf note printing to avoid repeated messages + * add note limit, suggested by Alexander Cherepanov + +2014-12-16 16:53 Christos Zoulas + + * Bail out on partial pread()'s (Alexander Cherepanov) + * Fix incorrect bounds check in file_printable (Alexander Cherepanov) + +2014-12-11 20:01 Christos Zoulas + + * PR/405: ignore SIGPIPE from uncompress programs + * change printable -> file_printable and use it in + more places for safety + * in ELF, instead of "(uses dynamic libraries)" when PT_INTERP + is present print the interpreter name. + +2014-12-10 20:01 Christos Zoulas + + * release 5.21 + +2014-11-27 18:40 Christos Zoulas + + * Allow setting more parameters from the command line. + * Split name/use and indirect magic recursion limits. + +2014-11-27 11:12 Christos Zoulas + + * Adjust ELF parameters and the default recursion + level. + * Allow setting the recursion level dynamically. + +2014-11-24 8:55 Christos Zoulas + + * The following fixes resulted from Thomas Jarosch's fuzzing + tests that revealed severe performance issues on pathological + input: + - limit number of elf program and sections processing + - abort elf note processing quickly + - reduce the number of recursion levels from 20 to 10 + - preserve error messages in indirect magic handling + + This is tracked as CVE-2014-8116 and CVE-2014-8117 + +2014-11-12 10:30 Christos Zoulas + + * fix bogus free in the user buffer case. + +2014-11-11 12:35 Christos Zoulas + + * fix out of bounds read for pascal strings + * fix memory leak (not freeing the head of each mlist) + +2014-11-07 10:25 Christos Zoulas + + * When printing strings from a file, convert them to printable + on a byte by byte basis, so that we don't get issues with + locale's trying to interpret random byte streams as UTF-8 and + having printf error out with EILSEQ. + +2014-10-17 11:48 Christos Zoulas + + * fix bounds in note reading (Francisco Alonso / Red Hat) + +2014-10-11 15:02 Christos Zoulas + + * fix autoconf glue for setlocale and locale_t; some OS's + have locale_t in xlocale.h + +2014-10-10 15:01 Christos Zoulas + + * release 5.20 + +2014-08-17 10:01 Christos Zoulas + + * recognize encrypted CDF documents + +2014-08-04 9:18 Christos Zoulas + + * add magic_load_buffers from Brooks Davis + +2014-07-24 16:40 Christos Zoulas + + * add thumbs.db support + +2014-06-12 12:28 Christos Zoulas + + * release 5.19 + +2014-06-09 9:04 Christos Zoulas + + * Misc buffer overruns and missing buffer size tests in cdf parsing + (Francisco Alonso, Jan Kaluza) + +2014-06-02 14:50 Christos Zoulas + + * Enforce limit of 8K on regex searches that have no limits + * Allow the l modifier for regex to mean line count. Default + to byte count. If line count is specified, assume a max + of 80 characters per line to limit the byte count. + * Don't allow conversions to be used for dates, allowing + the mask field to be used as an offset. + +2014-05-30 12:51 Christos Zoulas + + * Make the range operator limit the length of the + regex search. + +2014-05-14 19:23 Christos Zoulas + + * PR/347: Windows fixes + * PR/352: Hangul word processor recognition + * PR/354: Encoding irregularities in text files + +2014-05-06 6:12 Christos Zoulas + + * Fix uninitialized title in CDF files (Jan Kaluza) + +2014-05-04 14:55 Christos Zoulas + + * PR/351: Fix compilation of empty files + +2014-04-30 17:39 Christos Zoulas + + * Fix integer formats: We don't specify 'l' or + 'h' and 'hh' specifiers anymore, only 'll' for + quads and nothing for the rest. This is so that + magic writing is simpler. + +2014-04-01 15:25 Christos Zoulas + + * PR/341: Jan Kaluza, fix memory leak + * PR/342: Jan Kaluza, fix out of bounds read + +2014-03-28 15:25 Christos Zoulas + + * Fix issue with long formats not matching fmtcheck + +2014-03-26 11:25 Christos Zoulas + + * release 5.18 + +2014-03-15 17:45 Christos Zoulas + + * add fmtcheck(3) for those who don't have it + +2014-03-14 15:12 Christos Zoulas + + * prevent mime entries from being attached to magic + entries with no descriptions + + * adjust magic strength for regex type + + * remove superfluous ascmagic with encoding test + +2014-03-06 12:01 Christos Zoulas + + * fix regression fix echo -ne "\012\013\014" | file -i - + which printed "binary" instead of "application/octet-stream" + + * add size_t overflow check for magic file size + +2014-02-27 16:01 Christos Zoulas + + * experimental support for matching with CFD CLSID + +2014-02-18 13:04 Kimmo Suominen (kimmo@suominen.com) + + * Cache old LC_CTYPE locale before setting it to "C", so + we can use it to restore LC_CTYPE instead of asking + setlocale() to scan the environment variables. + +2014-02-12 18:21 Christos Zoulas + + * Count recursion levels through indirect magic + +2014-02-11 10:40 Christos Zoulas + + * Prevent infinite recursion on files with indirect offsets of 0 + +2014-01-30 21:00 Christos Zoulas + + * Add -E flag that makes file print filesystem errors to stderr + and exit. + +2014-01-08 17:20 Christos Zoulas + + * mime printing could print results from multiple magic entries + if there were multiple matches. + * in some cases overflow was not detected when computing offsets + in softmagic. + +2013-12-05 12:00 Christos Zoulas + + * use strcasestr() to for cdf strings + * reset to the "C" locale while doing regex operations, or case + insensitive comparisons; this is provisional + +2013-11-19 20:10 Christos Zoulas + + * always leave magic file loaded, don't unload for magic_check, etc. + * fix default encoding to binary instead of unknown which broke recently + * handle empty and one byte files, less specially so that + --mime-encoding does not break completely. + ` +2013-11-06 14:40 Christos Zoulas + + * fix erroneous non-zero exit code from non-existant file and message + +2013-10-29 14:25 Christos Zoulas + + * add CDF MSI file detection (Guy Helmer) + +2013-09-03 11:56 Christos Zoulas + + * Don't mix errors and regular output if there was an error + * in magic_descriptor() don't close the file and try to restore + its position + +2013-05-30 17:25 Christos Zoulas + + * Don't treat magic as an error if offset was past EOF (Christoph Biedl) + +2013-05-28 17:25 Christos Zoulas + + * Fix spacing issues in softmagic and elf (Jan Kaluza) + +2013-05-02 18:00 Christos Zoulas + + * Fix segmentation fault with multiple magic_load commands. + +2013-04-22 11:20 Christos Zoulas + + * The way "default" was implemented was not very useful + because the "if something was printed at that level" + was not easily controlled by the user, and the format + was bound to a string which is too restrictive. Add + a "clear" for that level keyword and make "default" + void. This way one can do: + + >>13 clear x + >>13 lelong 1 foo + >>13 lelong 2 bar + >>13 default x + >>>13 lelong x unknown %x + +2013-03-25 13:20 Christos Zoulas + + * disallow strength setting in "name" entries + +2013-03-06 21:24 Christos Zoulas + + * fix recursive magic separator printing + +2013-02-26 19:28 Christos Zoulas + + * limit recursion level for mget + * fix pread() related breakage in cdf + * handle offsets properly in recursive "use" + +2013-02-18 10:39 Christos Zoulas + + * add elf reading of debug info to determine if file is stripped + (Jan Kaluza) + * use pread() + +2013-01-25 18:05 Christos Zoulas + + * change mime description size from 64 to 80 to accommodate OOXML. + +2013-01-11 14:50 Christos Zoulas + + * Warn about inconsistent continuation levels. + * Change fsmagic to add a space after it prints. + +2013-01-10 21:00 Christos Zoulas + + * Make getline public so that file can link against it. + Perhaps it is better to rename it, or hide it differently. + Fixes builds on platforms that do not provide it. + +2013-01-07 16:30 Christos Zoulas + + * Add SuS d{,1,2,4,8}, u{,1,2,4,8} and document + what long, int, short, etc is (Guy Harris) + +2013-01-06 11:20 Christos Zoulas + + * add magic_version function and constant + * Redo memory allocation and de-allocation. + (prevents double frees on non mmap platforms) + * Fix bug with name/use having to do with passing + found state from the parent to the child and back. + +2012-12-19 8:47 Christos Zoulas + + * Only print elf capabilities for archs we know (Jan Kaluza) + +2012-10-30 19:14 Christos Zoulas + + * Add "name" and "use" file types in order to look + inside mach-o files. + +2012-09-06 10:40 Christos Zoulas + + * make --version exit 0 (Matthew Schultz) + * add string/T (Jan Kaluza) + +2012-08-09 2:15 Christos Zoulas + + * add z and t modifiers for our own vasprintf + * search for $HOME/.magic.mgc if it is there first + * fix reads from a pipe, and preserve errno + +2012-05-15 13:12 Christos Zoulas + + * use ctime_r, asctime_r + +2012-04-06 17:18 Christos Zoulas + + * Fixes for indirect offsets to handle apple disk formats + +2012-04-03 18:26 Christos Zoulas + + * Add windows date field types + * More info for windows shortcuts (incomplete) + +2012-02-20 17:33 Christos Zoulas + + * Fix CDF parsing issues found by CERT's fuzzing tool (Will Dormann) + +2011-12-15 12:17 Chris Metcalf + + * Support Tilera architectures (tile64, tilepro, tilegx). + +2011-12-16 16:33 Reuben Thomas + + * Add magic for /usr/bin/env Perl scripts + * Weaken generic script magic to avoid clashing with + language-specific magic. + +2011-12-08 13:37 Reuben Thomas + + * Simplify if (p) free(p) to free(p). + +2011-12-08 13:07 Reuben Thomas + + * Remove hardwired token finding (names.h), turning it into soft + magic. Patterns are either anchored regexs or search/8192. English + language detection and PL/1 detection have been removed as they + were too fragile. -e tokens is still accepted for backwards + compatibility. + * Move 3ds patterns (which are commented out anyway) into autodesk + (they were, oddly, in c-lang). + +2011-12-06 00:16 Reuben Thomas + + * Tweak strength of generic hash-bang detectors to be less than + specific ones. + * Make an inconsistent description of Python scripts consistent. + +2011-12-05 23:58 Reuben Thomas + + * Fix minor error in file(1). + +2011-11-05 00:00 Reuben Thomas + + * Fix issue #150 (I hope). + +2011-09-22 12:57 Christos Zoulas + + * Python3 binding fixes from Kelly Anderson + +2011-09-20 11:32 Christos Zoulas + + * If a string type magic entry is marked as text or binary + only match text files against text entries and binary + files against binary entries. + +2011-09-01 12:12 Christos Zoulas + + * Don't wait for any subprocess, just the one we forked. + +2011-08-26 16:40 Christos Zoulas + + * If the application name is not set in a cdf file, try to see + if it has a directory with the application name on it. + +2011-08-17 14:32 Christos Zoulas + + * Fix ELF lseek(2) madness. Inspired by PR/134 by Jan Kaluza + +2011-08-14 09:03 Christos Zoulas + + * Don't use variable string formats. + +2011-07-12 12:32 Reuben Thomas + + * Fix detection of Zip files (Mantis #128). + * Make some minor improvements to file(1). + * Rename MIME types for filesystem objects for consistency with + xdg-utils. Typically this means that application/x-foo becomes + inode/foo, but some names also change slightly, e.g. + application/x-character-device becomes inode/chardevice. + +2011-05-10 20:57 Christos Zoulas + + * fix mingw compilation (Abradoks) + +2011-05-10 20:57 Christos Zoulas + + * remove patchlevel.h + * Fix read past allocated memory caused by double-incrementing + a pointer in a loop (reported by Roberto Maar) + +2011-03-30 15:45 Christos Zoulas + + * Fix cdf string buffer setting (Sven Anders) + +2011-03-20 16:35 Christos Zoulas + + * Eliminate MAXPATHLEN and use dynamic allocation for + path and file buffers. + +2011-03-15 18:15 Christos Zoulas + + * binary tests on magic entries with masks could spuriously + get converted to ascii. + +2011-03-12 18:06 Reuben Thomas + + * Improve file.man (remove BUGS, present email addresses consistently). + +2011-03-07 19:38 Christos Zoulas + + * add lrzip support (from Ville Skytta) + +2011-02-10 16:36 Christos Zoulas + + * fix CDF bounds checking (Guy Helmer) + +2011-02-10 12:03 Christos Zoulas + + * add cdf_ctime() that prints a meaningful error when time cannot + be converted. + +2011-02-02 20:40 Christos Zoulas + + * help and version output to stdout. + + * When matching softmagic for ascii files, don't just print + the softmagic classification, keep going and print the + text classification too. This fixes broken troff files when + we moved them from keyword recognition to softmagic + (they stopped printing "with CRLF" etc.) + Reported by Doug McIlroy. + +2011-01-16 19:31 Reuben Thomas + + * Fix two potential buffer overruns in apprentice_list. + +2011-01-14 22:33 Reuben Thomas + + * New Python binding in pure Python. + * Update libmagic(3). + +2011-01-06 21:40 Reuben Thomas + + * Fix Python bindings (including recent Python 3 compatibility + update). + +2011-01-04 18:43 Reuben Thomas + + * magic/Makefile.am: make it easier to recover from magic build failures. + * Fix pstring length specifier parsing to avoid generating invalid + magic files. + * Add pstring length "J" (for "JPEG") to specify that the length + include itself. + * Fix JPEG comment parsing at last using pstring/HJ! + * Ignore section 5 man pages in doc/.cvsignore. + +2010-12-22 13:12 Christos Zoulas + + * Add pstring/BHhLl to specify the type of the length of pascal + strings. + +2010-11-26 18:39 Reuben Thomas + + * Fix "-e soft": it was ignored when softmagic was called + during asciimagic. + * Improve comments and use "unsigned char" in tar.h/is_tar.c. + +2010-11-05 17:26 Reuben Thomas + + * Make bug reporting addresses more visible. + +2010-11-01 18:35 Reuben Thomas + + * Add tcl magic from Gustaf Neumann + +2010-10-24 10:42 Christos Zoulas + + * Fix the whitespace comparing code (Christopher Chittleborough) + +2010-10-06 21:05 Christos Zoulas + + * allow string/t to work (Jan Kaluza) + +2010-09-20 22:11 Reuben Thomas + + * Apply some patches from Ubuntu and Fedora. + +2010-09-20 21:16 Reuben Thomas + + * Apply all patches from Debian package 5.04-6 which have not + already been applied and are not Debian-specific. + +2010-09-20 15:24 Reuben Thomas + + * Minor security fix to softmagic.c (don't use untrusted + string as printf format). + +2010-07-21 12:20 Christos Zoulas + + * MINGW32 portability from LRN + + * Don't warn about escaping magic regex chars when we are in a regex. + +2010-07-19 10:55 Christos Zoulas + + * Only try to print prpsinfo for core files. (Jan Kaluza) + +2010-04-22 12:55 Christos Zoulas + + * Try more elf offsets for Debian core files. (Arnaud Giersch) + +2010-02-20 15:18 Reuben Thomas + + * Clarify which sort of CDF we mean. + +2010-02-14 22:58 Reuben Thomas + + * Re-jig Zip file type magic so that unsupported special + Zip types (those with "mimetype" at offset 30) can be + recognized. + +2010-02-02 21:50 Reuben Thomas + + * Add support for OCF (EPUB) files (application/epub+zip) + +2010-01-28 18:25 Christos Zoulas + + * Fix core-dump from unbound loop: + https://bugzilla.redhat.com/show_bug.cgi?id=533245 + +2010-01-22 15:45 Christos Zoulas + + * print proper mime for crystal reports file + + * print the last summary information of a cdf document, not the + first so that nested documents print the right info + +2010-01-16 18:42 Charles Longeau + + * bring back some fixes from OpenBSD: + - make gcc2 builds file + - fix typos in a magic file comment + +2009-11-17 18:35 Christos Zoulas + + * ctime/asctime can return NULL on some OS's although + they should not (Toshit Antani) + +2009-09-14 13:49 Christos Zoulas + + * Centralize magic path handling routines and remove the + special-casing from file.c so that the python module for + example comes up with the same magic path (Fixes ~/.magic + handling) (from Gab) + +2009-09-11 23:38 Reuben Thomas + + * When magic argument is a directory, read the files in + strcmp-sorted order (fixes Debian bug #488562 and our own FIXME). + +2009-09-11 13:11 Reuben Thomas + + * Combine overlapping epoc and psion magic files into one (epoc). + + * Add some more EPOC MIME types. + +2009-08-19 15:55 Christos Zoulas + + * Fix 3 bugs (From Ian Darwin): + - file_showstr could move one past the end of the array + - parse_apple did not nul terminate the string in the overflow case + - parse_mime truncated the wrong string in the overflow case + +2009-08-12 12:28 Robert Byrnes + + * Include Localstuff when compiling magic. + +2009-07-15 10:05 Christos Zoulas + + * Fix logic for including mygetopts.h + + * Make cdf.c compile again with debugging + + * Add the necessary field handling for crystal reports files to work + +2009-06-23 01:34 Reuben Thomas + + * Stop "(if" identifying Lisp files, that's plain dumb! + +2009-06-09 22:13 Reuben Thomas + + * Add a couple of missing MP3 MIME types. + +2009-05-27 23:00 Reuben Thomas + + * Add full range of hash-bang tests for Python and Ruby. + + * Add MIME types for Python and Ruby scripts. + +2009-05-13 10:44 Christos Zoulas + + * off by one in parsing hw capabilities in elf + (Cheng Renquan) + +2009-05-08 13:40 Christos Zoulas + + * lint fixes and more from NetBSD + 2009-05-06 10:25 Christos Zoulas * Avoid null dereference in cdf code (Drew Yao) @@ -545,7 +1187,7 @@ * Identify gnu tar vs. posix tar - * When keep going, don't print spurious newlines (Radek Vokál) + * When keep going, don't print spurious newlines (Radek Vokal) 2006-04-01 12:02 Christos Zoulas @@ -569,7 +1211,7 @@ 2005-10-31 8:54 Christos Zoulas * Fix regression where the core info was not completely processed - (Radek Vokál) + (Radek Vokal) 2005-10-20 11:15 Christos Zoulas @@ -586,7 +1228,7 @@ 2005-09-20 13:33 Christos Zoulas * Don't print SVR4 Style in core files multiple times - (Radek Vokál) + (Radek Vokal) 2005-08-27 04:09 Christos Zoulas Modified: stable/8/contrib/file/INSTALL ============================================================================== --- stable/8/contrib/file/INSTALL Tue May 19 22:29:11 2015 (r283134) +++ stable/8/contrib/file/INSTALL Tue May 19 23:53:25 2015 (r283135) @@ -2,18 +2,24 @@ Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. +2006, 2007, 2008, 2009 Free Software Foundation, Inc. -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation ================== -Briefly, the shell commands `./configure; make; make install' should + Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for -instructions specific to this package. +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -42,7 +48,7 @@ may remove or edit it. you want to change it or regenerate `configure' using a newer version of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. @@ -53,12 +59,22 @@ The simplest way to compile this package 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. - 5. You can remove the program binaries and object files from the + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,12 +83,22 @@ The simplest way to compile this package all sorts of other programs in order to regenerate files that came with the distribution. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + Compilers and Options ===================== -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here @@ -85,25 +111,41 @@ is an example: Compiling For Multiple Architectures ==================================== -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + Installation Names ================== -By default, `make install' installs the package's commands under + By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you @@ -114,16 +156,47 @@ Documentation and other data files still In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -135,14 +208,53 @@ find the X include and library files aut you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + Specifying the System Type ========================== -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -150,7 +262,8 @@ type, such as `sun4', or a canonical nam where SYSTEM can have one of these forms: - OS KERNEL-OS + OS + KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't @@ -168,9 +281,9 @@ eventually be run) with `--host=TYPE'. Sharing Defaults ================ -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. @@ -179,7 +292,7 @@ A warning: not all `configure' scripts l Defining Variables ================== -Variables not defined in a site shell script can be set in the + Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set @@ -198,11 +311,19 @@ an Autoconf bug. Until the bug is fixed `configure' Invocation ====================== -`configure' recognizes the following options to control how it operates. + `configure' recognizes the following options to control how it +operates. `--help' `-h' - Print a summary of the options to `configure', and exit. + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. `--version' `-V' @@ -229,6 +350,16 @@ an Autoconf bug. Until the bug is fixed Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. Modified: stable/8/contrib/file/Makefile.am ============================================================================== --- stable/8/contrib/file/Makefile.am Tue May 19 22:29:11 2015 (r283134) +++ stable/8/contrib/file/Makefile.am Tue May 19 23:53:25 2015 (r283135) @@ -1,238 +1,5 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed May 20 01:08:02 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 04:14:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 04:24:46 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 05:49:53 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 06:23:02 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 06:34:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 09:23:38 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 09:36:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 09:40:35 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 09:42:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 10:06:31 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 10:56:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 11:03:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 11:16:17 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 11:57:05 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 11:59:53 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 12:26:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 12:46:30 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 12:54:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 12:56:41 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 13:04:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 13:05:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 13:19:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 15:37:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 16:01:07 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 16:54:48 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:02:29 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:02:31 2015 Return-Path: Delivered-To: svn-src-all@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 B08A3593; Wed, 20 May 2015 17:02: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 871E4154A; Wed, 20 May 2015 17:02: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 t4KH2VEM081266; Wed, 20 May 2015 17:02:31 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KH2Vxb081265; Wed, 20 May 2015 17:02:31 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505201702.t4KH2Vxb081265@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 20 May 2015 17:02:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283154 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 17:02:31 -0000 Author: gjb Date: Wed May 20 17:02:30 2015 New Revision: 283154 URL: https://svnweb.freebsd.org/changeset/base/283154 Log: Record mergeinfo for r282772, missed in r282877. Sponsored by: The FreeBSD Foundation Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@FreeBSD.ORG Wed May 20 17:12:12 2015 Return-Path: Delivered-To: svn-src-all@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 BEC599AA 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 7CD6216B8 for ; Wed, 20 May 2015 17:12:12 +0000 (UTC) Received: by qkgv12 with SMTP id v12so36155350qkg.0 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=ZXjxbxxzs6G/u9eLalb8NWyM71bsay+YymzTIdYsylTssKcj4+pUbnG2gAnbwPT5/p 8SPivuYzuPCGaMnYCMUhrnI7ZeUKvszmeR8WHkbQm3IEhnO29fuczYk8lb96cmyBaS2N tPML12ikksO5F6GqGnMfzSGv7kHlSTMXN9831gjFc+nZP1PpucR4B0hMKhGxEWDqQ96S yw2USQRZ1fjkFwEWHoP/b04LfNNk1CzSFglavknk8yxIpZGQEl97qqWx1Mcc72e7rnly 17Gm9BLBMLgFbtqmEpP+pwqsPL8bTqYX+du2jXsMs2tgxWrhfw6d5uiwBbtB9cGAfo81 WKQA== X-Gm-Message-State: ALoCoQn7ProH3TbQDyrvWFCtjmIsAsr0hSOgeoIKJ0PC1EbACDp1Pmfy1zEqVjUgtFSRymVob3n1 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:25:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:28:52 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:39:33 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:41:09 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:42:41 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:43:58 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:44:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:47:02 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:48:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 17:49:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 18:41:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 18:42:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 18:56:31 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 19:33:00 2015 Return-Path: Delivered-To: svn-src-all@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 BC95C72A; Wed, 20 May 2015 19:33:00 +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 A910D1BED; Wed, 20 May 2015 19:33:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4KJX0CR058358; Wed, 20 May 2015 19:33:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4KJWwB9058320; Wed, 20 May 2015 19:32:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505201932.t4KJWwB9058320@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 20 May 2015 19:32:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283161 - in stable/10: etc/etc.arm release release/arm release/tools release/tools/arm sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 19:33:01 -0000 Author: gjb Date: Wed May 20 19:32:57 2015 New Revision: 283161 URL: https://svnweb.freebsd.org/changeset/base/283161 Log: MFC r282500, r282693: r282500: Add initial support for building RPI2 images. In release.sh, allow overriding buildenv_setup() before the handoff to arm/release.sh. Copy arm/RPI-B.conf -> arm/RPI2.conf, set UBOOT_PORT and the correct KERNEL, and add the buildenv_setup() override to install the sysutils/u-boot-rpi2 port/package. Copy tools/arm/crochet-RPI-B.conf -> tools/arm/crochet-RPI2.conf, and set the correct entries for the RaspberryPi2 board. r282693: Merge ^/projects/release-arm-redux into ^/head. Of note: - This commit adds native FreeBSD/arm release build support without requiring out-of-tree utilities. - Part of this merge removes the WANDBOARD-{SOLO,DUAL,QUAD} kernel configuration files, for which the IMX6 kernel configuration file should be used instead. - The resulting images have a 'freebsd' user (password 'freebsd'), to allow ssh(1) access when console access is not available (VGA or serial). The default 'root' user password is set to 'root'. - The /etc/ttys file for arm images now enable both ttyv0 and ttyu0 by default. Note: The RPI2 kernel configuration does not yet exist in stable/10, however the merge conflicts needed to be properly resolved. Additionally, SRCBRANCH has been set to base/stable/10 in the updated arm configuration files as part of this commit. Sponsored by: The FreeBSD Foundation Added: stable/10/release/arm/RPI2.conf - copied, changed from r282500, head/release/arm/RPI2.conf stable/10/release/arm/WANDBOARD.conf - copied, changed from r282693, head/release/arm/WANDBOARD.conf stable/10/release/tools/arm.subr - copied unchanged from r282693, head/release/tools/arm.subr Deleted: stable/10/release/arm/WANDBOARD-QUAD.conf stable/10/release/arm/ZEDBOARD.conf stable/10/release/arm/release.sh stable/10/release/tools/arm/ stable/10/sys/arm/conf/WANDBOARD-DUAL stable/10/sys/arm/conf/WANDBOARD-QUAD stable/10/sys/arm/conf/WANDBOARD-SOLO Modified: stable/10/etc/etc.arm/ttys stable/10/release/arm/BEAGLEBONE.conf stable/10/release/arm/PANDABOARD.conf stable/10/release/arm/RPI-B.conf stable/10/release/release.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/etc.arm/ttys ============================================================================== --- stable/10/etc/etc.arm/ttys Wed May 20 18:56:29 2015 (r283160) +++ stable/10/etc/etc.arm/ttys Wed May 20 19:32:57 2015 (r283161) @@ -29,7 +29,7 @@ # when going to single-user mode. console none unknown off secure # -ttyv0 "/usr/libexec/getty Pc" xterm off secure +ttyv0 "/usr/libexec/getty Pc" xterm onifconsole secure # Virtual terminals ttyv1 "/usr/libexec/getty Pc" xterm off secure ttyv2 "/usr/libexec/getty Pc" xterm off secure @@ -41,7 +41,7 @@ ttyv7 "/usr/libexec/getty Pc" xterm off #ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" vt100 on secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure ttyu1 "/usr/libexec/getty std.9600" dialup off secure ttyu2 "/usr/libexec/getty std.9600" dialup off secure ttyu3 "/usr/libexec/getty std.9600" dialup off secure Modified: stable/10/release/arm/BEAGLEBONE.conf ============================================================================== --- stable/10/release/arm/BEAGLEBONE.conf Wed May 20 18:56:29 2015 (r283160) +++ stable/10/release/arm/BEAGLEBONE.conf Wed May 20 19:32:57 2015 (r283161) @@ -2,29 +2,36 @@ # $FreeBSD$ # -# Build chroot configuration -TARGET="amd64" -TARGET_ARCH="amd64" -SVNROOT="svn://svn.FreeBSD.org/" SRCBRANCH="base/stable/10@rHEAD" -DOCBRANCH="doc/head@rHEAD" -PORTBRANCH="ports/head@rHEAD" -NODOC=yes - -# Build target configuration -# Since this file is sourced by a script that runs another -# script, these must be exported. -set -a -WORLD_FLAGS="-j $(sysctl -n hw.ncpu)" -KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))" -CHROOTDIR="/scratch" EMBEDDEDBUILD=1 -EMBEDDEDPORTS="lang/python textproc/gsed" -XDEV="arm" -XDEV_ARCH="armv6" -XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" +EMBEDDED_TARGET="arm" +EMBEDDED_TARGET_ARCH="armv6" +EMBEDDEDPORTS="sysutils/u-boot-beaglebone" KERNEL="BEAGLEBONE" -CROCHETSRC="https://github.com/freebsd/crochet" -CROCHETBRANCH="trunk@rHEAD" -set +a +WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" +IMAGE_SIZE="1G" +PART_SCHEME="MBR" +FAT_SIZE="2m" +FAT_TYPE="12" +MD_ARGS="-x 63 -y 255" +NODOC=1 +arm_install_uboot() { + UBOOT_DIR="/usr/local/share/u-boot/u-boot-beaglebone" + FATMOUNT="${DESTDIR%${KERNEL}}/fat" + UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} + chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/MLO ${FATMOUNT}/MLO + chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/u-boot.img ${FATMOUNT}/u-boot.img + chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr + chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot + sync + umount_loop ${CHROOTDIR}/${FATMOUNT} + umount_loop ${CHROOTDIR}/${UFSMOUNT} + chroot ${CHROOTDIR} rmdir ${FATMOUNT} + chroot ${CHROOTDIR} rmdir ${UFSMOUNT} + + return 0 +} Modified: stable/10/release/arm/PANDABOARD.conf ============================================================================== --- stable/10/release/arm/PANDABOARD.conf Wed May 20 18:56:29 2015 (r283160) +++ stable/10/release/arm/PANDABOARD.conf Wed May 20 19:32:57 2015 (r283161) @@ -2,29 +2,36 @@ # $FreeBSD$ # -# Build chroot configuration -TARGET="amd64" -TARGET_ARCH="amd64" -SVNROOT="svn://svn.FreeBSD.org/" SRCBRANCH="base/stable/10@rHEAD" -DOCBRANCH="doc/head@rHEAD" -PORTBRANCH="ports/head@rHEAD" -NODOC=yes - -# Build target configuration -# Since this file is sourced by a script that runs another -# script, these must be exported. -set -a -WORLD_FLAGS="-j $(sysctl -n hw.ncpu)" -KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))" -CHROOTDIR="/scratch" EMBEDDEDBUILD=1 -EMBEDDEDPORTS="lang/python textproc/gsed" -XDEV="arm" -XDEV_ARCH="armv6" -XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" +EMBEDDED_TARGET="arm" +EMBEDDED_TARGET_ARCH="armv6" +EMBEDDEDPORTS="sysutils/u-boot-pandaboard" KERNEL="PANDABOARD" -CROCHETSRC="https://github.com/freebsd/crochet" -CROCHETBRANCH="trunk@rHEAD" -set +a +NODOC=1 +WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" +IMAGE_SIZE="1G" +PART_SCHEME="MBR" +FAT_SIZE="2m" +FAT_TYPE="12" +MD_ARGS="-x 63 -y 255" +arm_install_uboot() { + UBOOT_DIR="/usr/local/share/u-boot/u-boot-pandaboard" + FATMOUNT="${DESTDIR%${KERNEL}}/fat" + UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} + chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/MLO ${FATMOUNT}/MLO + chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/u-boot.img ${FATMOUNT}/u-boot.img + chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr + chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot + sync + umount_loop ${CHROOTDIR}/${FATMOUNT} + umount_loop ${CHROOTDIR}/${UFSMOUNT} + chroot ${CHROOTDIR} rmdir ${FATMOUNT} + chroot ${CHROOTDIR} rmdir ${UFSMOUNT} + + return 0 +} Modified: stable/10/release/arm/RPI-B.conf ============================================================================== --- stable/10/release/arm/RPI-B.conf Wed May 20 18:56:29 2015 (r283160) +++ stable/10/release/arm/RPI-B.conf Wed May 20 19:32:57 2015 (r283161) @@ -2,31 +2,42 @@ # $FreeBSD$ # -# Build chroot configuration -TARGET="amd64" -TARGET_ARCH="amd64" -SVNROOT="svn://svn.FreeBSD.org/" SRCBRANCH="base/stable/10@rHEAD" -DOCBRANCH="doc/head@rHEAD" -PORTBRANCH="ports/head@rHEAD" -NODOC=yes - -# Build target configuration -# Since this file is sourced by a script that runs another -# script, these must be exported. -set -a -WORLD_FLAGS="-j $(sysctl -n hw.ncpu)" -KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))" -CHROOTDIR="/scratch" EMBEDDEDBUILD=1 -EMBEDDEDPORTS="lang/python textproc/gsed" -XDEV="arm" -XDEV_ARCH="armv6" -XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" +EMBEDDED_TARGET="arm" +EMBEDDED_TARGET_ARCH="armv6" +EMBEDDEDPORTS="sysutils/u-boot-rpi" KERNEL="RPI-B" -CROCHETSRC="https://github.com/freebsd/crochet" -CROCHETBRANCH="trunk@rHEAD" -UBOOTSRC="https://github.com/gonzoua/u-boot-pi" -UBOOTBRANCH="trunk" -UBOOTDIR="/tmp/crochet/u-boot-rpi" -set +a +WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x2000000" +IMAGE_SIZE="1G" +PART_SCHEME="MBR" +FAT_SIZE="17m" +FAT_TYPE="16" +MD_ARGS="-x 63 -y 255" +NODOC=1 + +arm_install_uboot() { + UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi" + UBOOT_FILES="bootcode.bin config.txt fixup.dat fixup_cd.dat \ + start.elf start_cd.elf u-boot.img" + FATMOUNT="${DESTDIR%${KERNEL}}/fat" + UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} + for _UF in ${UBOOT_FILES}; do + chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ + ${FATMOUNT}/${_UF} + done + chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr + chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/dtb/rpi.dtb \ + ${FATMOUNT}/rpi.dtb + chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot + sync + umount_loop ${CHROOTDIR}/${FATMOUNT} + umount_loop ${CHROOTDIR}/${UFSMOUNT} + chroot ${CHROOTDIR} rmdir ${FATMOUNT} + chroot ${CHROOTDIR} rmdir ${UFSMOUNT} + + return 0 +} Copied and modified: stable/10/release/arm/RPI2.conf (from r282500, head/release/arm/RPI2.conf) ============================================================================== --- head/release/arm/RPI2.conf Tue May 5 16:28:04 2015 (r282500, copy source) +++ stable/10/release/arm/RPI2.conf Wed May 20 19:32:57 2015 (r283161) @@ -3,51 +3,42 @@ # $FreeBSD$ # -# Global variables. -export SVNROOT="svn://svn.FreeBSD.org/" -export SRCBRANCH="base/head@rHEAD" -export DOCBRANCH="doc/head@rHEAD" -export PORTBRANCH="ports/head@rHEAD" -export NODOC=yes -export WORLD_FLAGS="-j $(sysctl -n hw.ncpu)" -export KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))" -export CHROOTDIR="/scratch" -export EMBEDDEDBUILD=1 -export UBOOT_PORT="sysutils/u-boot-rpi2" +SRCBRANCH="base/stable/10@rHEAD" +EMBEDDEDBUILD=1 +EMBEDDED_TARGET="arm" +EMBEDDED_TARGET_ARCH="armv6" +EMBEDDEDPORTS="sysutils/u-boot-rpi2" +KERNEL="RPI2" +NODOC=1 +WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x2000000" +IMAGE_SIZE="1G" +PART_SCHEME="MBR" +FAT_SIZE="50m" +FAT_TYPE="16" +MD_ARGS="-x 63 -y 255" -# Build chroot configuration -load_chroot_env() { - # Avoid collision with TARGET and XDEV. - unset XDEV XDEV_ARCH KERNEL - export TARGET="amd64" - export TARGET_ARCH="amd64" -} - -# Build target configuration -load_target_env() { - # Avoid collision with TARGET and XDEV. - unset TARGET TARGET_ARCH - export XDEV="arm" - export XDEV_ARCH="armv6" - export XDEV_FLAGS="WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1" - export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" - export KERNEL="RPI2" - export CROCHETSRC="https://github.com/freebsd/crochet" - export CROCHETBRANCH="trunk@rHEAD" -} - -# Build environment setup -buildenv_setup() { - if [ ! -d ${CHROOTDIR}/usr/ports/${UBOOT_PORT} ]; then - chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg bootstrap -y - chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg install -y ${UBOOT_PORT} - else - chroot ${CHROOTDIR} env BATCH=1 \ - make -C /usr/ports/${UBOOT_PORT} \ - all install clean - fi +arm_install_uboot() { + UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2" + UBOOT_FILES="bootcode.bin config.txt fixup.dat fixup_cd.dat \ + fixup_x.dat start.elf start_cd.elf start_x.elf u-boot.bin" + FATMOUNT="${DESTDIR%${KERNEL}}/fat" + UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} + for _UF in ${UBOOT_FILES}; do + chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ + ${FATMOUNT}/${_UF} + done + chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr + chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/dtb/rpi2.dtb \ + ${FATMOUNT}/rpi2.dtb + chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot + sync + umount_loop ${CHROOTDIR}/${FATMOUNT} + umount_loop ${CHROOTDIR}/${UFSMOUNT} + chroot ${CHROOTDIR} rmdir ${FATMOUNT} + chroot ${CHROOTDIR} rmdir ${UFSMOUNT} + return 0 } - Copied and modified: stable/10/release/arm/WANDBOARD.conf (from r282693, head/release/arm/WANDBOARD.conf) ============================================================================== --- head/release/arm/WANDBOARD.conf Sat May 9 21:08:12 2015 (r282693, copy source) +++ stable/10/release/arm/WANDBOARD.conf Wed May 20 19:32:57 2015 (r283161) @@ -3,6 +3,7 @@ # $FreeBSD$ # +SRCBRANCH="base/stable/10@rHEAD" EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Wed May 20 18:56:29 2015 (r283160) +++ stable/10/release/release.sh Wed May 20 19:32:57 2015 (r283161) @@ -36,250 +36,359 @@ # $FreeBSD$ # -PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" -export PATH +export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" -# The directory within which the release will be built. -CHROOTDIR="/scratch" -RELENGDIR="$(realpath $(dirname $(basename ${0})))" - -# The default version control system command to obtain the sources. -VCSCMD="svn checkout" - -# The default svn checkout server, and svn branches for src/, doc/, -# and ports/. -SVNROOT="svn://svn.FreeBSD.org/" -SRCBRANCH="base/head@rHEAD" -DOCBRANCH="doc/head@rHEAD" -PORTBRANCH="ports/head@rHEAD" - -# Set for embedded device builds. -EMBEDDEDBUILD= - -# Sometimes one needs to checkout src with --force svn option. -# If custom kernel configs copied to src tree before checkout, e.g. -SRC_FORCE_CHECKOUT= - -# The default make.conf and src.conf to use. Set to /dev/null -# by default to avoid polluting the chroot(8) environment with -# non-default settings. -MAKE_CONF="/dev/null" -SRC_CONF="/dev/null" - -# The number of make(1) jobs, defaults to the number of CPUs available for -# buildworld, and half of number of CPUs available for buildkernel. -WORLD_FLAGS="-j$(sysctl -n hw.ncpu)" -KERNEL_FLAGS="-j$(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2))" - -MAKE_FLAGS="-s" - -# The name of the kernel to build, defaults to GENERIC. -KERNEL="GENERIC" - -# Set to non-empty value to disable checkout of doc/ and/or ports/. Disabling -# ports/ checkout also forces NODOC to be set. -NODOC= -NOPORTS= - -# Set to non-empty value to build dvd1.iso as part of the release. -WITH_DVD= -WITH_COMPRESSED_IMAGES= - -# Set to non-empty value to build virtual machine images as part of -# the release. -WITH_VMIMAGES= -WITH_COMPRESSED_VMIMAGES= - -# Set to non-empty value to build virtual machine images for various -# cloud providers as part of the release. -WITH_CLOUDWARE= +VERSION=2 + +# Prototypes that can be redefined per-chroot or per-target. +load_chroot_env() { } +load_target_env() { } +buildenv_setup() { } usage() { echo "Usage: $0 [-c release.conf]" exit 1 } -while getopts c: opt; do - case ${opt} in - c) - RELEASECONF="${OPTARG}" - if [ ! -e "${RELEASECONF}" ]; then - echo "ERROR: Configuration file ${RELEASECONF} does not exist." - exit 1 - fi - # Source the specified configuration file for overrides - . ${RELEASECONF} - ;; - \?) - usage - ;; - esac -done -shift $(($OPTIND - 1)) +# env_setup(): Set up the default build environment variables, such as the +# CHROOTDIR, VCSCMD, SVNROOT, etc. This is called before the release.conf +# file is sourced, if '-c ' is specified. +env_setup() { + # The directory within which the release will be built. + CHROOTDIR="/scratch" + RELENGDIR="$(dirname $(realpath ${0}))" + + # The default version control system command to obtain the sources. + for _dir in /usr/bin /usr/local/bin; do + for _svn in svn svnlite; do + [ -x "${_dir}/${_svn}" ] && VCSCMD="${_dir}/${_svn}" + [ ! -z "${VCSCMD}" ] && break 2 + done + done + VCSCMD="${VCSCMD} checkout" + + # The default svn checkout server, and svn branches for src/, doc/, + # and ports/. + SVNROOT="svn://svn.FreeBSD.org/" + SRCBRANCH="base/head@rHEAD" + DOCBRANCH="doc/head@rHEAD" + PORTBRANCH="ports/head@rHEAD" + + # Set for embedded device builds. + EMBEDDEDBUILD= + + # Sometimes one needs to checkout src with --force svn option. + # If custom kernel configs copied to src tree before checkout, e.g. + SRC_FORCE_CHECKOUT= + + # The default make.conf and src.conf to use. Set to /dev/null + # by default to avoid polluting the chroot(8) environment with + # non-default settings. + MAKE_CONF="/dev/null" + SRC_CONF="/dev/null" + + # The number of make(1) jobs, defaults to the number of CPUs available + # for buildworld, and half of number of CPUs available for buildkernel. + WORLD_FLAGS="-j$(sysctl -n hw.ncpu)" + KERNEL_FLAGS="-j$(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2))" + + MAKE_FLAGS="-s" + + # The name of the kernel to build, defaults to GENERIC. + KERNEL="GENERIC" + + # Set to non-empty value to disable checkout of doc/ and/or ports/. + # Disabling ports/ checkout also forces NODOC to be set. + NODOC= + NOPORTS= -# Fix for backwards-compatibility with release.conf that does not have the -# trailing '/'. -case ${SVNROOT} in - *svn*) - SVNROOT="${SVNROOT}/" - ;; - *) - ;; -esac - -# Prefix the branches with the SVNROOT for the full checkout URL. -SRCBRANCH="${SVNROOT}${SRCBRANCH}" -DOCBRANCH="${SVNROOT}${DOCBRANCH}" -PORTBRANCH="${SVNROOT}${PORTBRANCH}" - -if [ -n "${EMBEDDEDBUILD}" ]; then - if [ -z "${XDEV}" ] || [ -z "${XDEV_ARCH}" ]; then - echo "ERROR: XDEV and XDEV_ARCH must be set in ${RELEASECONF}." - exit 1 - fi + # Set to non-empty value to build dvd1.iso as part of the release. WITH_DVD= WITH_COMPRESSED_IMAGES= - NODOC=yes -fi -# If PORTS is set and NODOC is unset, force NODOC=yes because the ports tree -# is required to build the documentation set. -if [ -n "${NOPORTS}" ] && [ -z "${NODOC}" ]; then - echo "*** NOTICE: Setting NODOC=1 since ports tree is required" - echo " and NOPORTS is set." - NODOC=yes -fi - -# If NOPORTS and/or NODOC are unset, they must not pass to make as variables. -# The release makefile verifies definedness of NOPORTS/NODOC variables -# instead of their values. -DOCPORTS= -if [ -n "${NOPORTS}" ]; then - DOCPORTS="NOPORTS=yes " -fi -if [ -n "${NODOC}" ]; then - DOCPORTS="${DOCPORTS}NODOC=yes" -fi - -# The aggregated build-time flags based upon variables defined within -# this file, unless overridden by release.conf. In most cases, these -# will not need to be changed. -CONF_FILES="__MAKE_CONF=${MAKE_CONF} SRCCONF=${SRC_CONF}" -if [ -n "${TARGET}" ] && [ -n "${TARGET_ARCH}" ]; then - ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" -else - ARCH_FLAGS= -fi -CHROOT_MAKEENV="${CHROOT_MAKEENV} MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" -CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}" -CHROOT_IMAKEFLAGS="${CONF_FILES}" -CHROOT_DMAKEFLAGS="${CONF_FILES}" -RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}" -RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" -RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \ - ${DOCPORTS} WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES} \ - WITH_CLOUDWARE=${WITH_CLOUDWARE}" - -# Force src checkout if configured -FORCE_SRC_KEY= -if [ -n "${SRC_FORCE_CHECKOUT}" ]; then - FORCE_SRC_KEY="--force" -fi + # Set to non-empty value to build virtual machine images as part of + # the release. + WITH_VMIMAGES= + WITH_COMPRESSED_VMIMAGES= + XZ_THREADS=0 + + # Set to non-empty value to build virtual machine images for various + # cloud providers as part of the release. + WITH_CLOUDWARE= + + return 0 +} # env_setup() + +# env_check(): Perform sanity tests on the build environment, such as ensuring +# files/directories exist, as well as adding backwards-compatibility hacks if +# necessary. This is called unconditionally, and overrides the defaults set +# in env_setup() if '-c ' is specified. +env_check() { + chroot_build_release_cmd="chroot_build_release" + # Fix for backwards-compatibility with release.conf that does not have + # the trailing '/'. + case ${SVNROOT} in + *svn*) + SVNROOT="${SVNROOT}/" + ;; + *) + ;; + esac -if [ -z "${CHROOTDIR}" ]; then - echo "Please set CHROOTDIR." - exit 1 -fi + # Prefix the branches with the SVNROOT for the full checkout URL. + SRCBRANCH="${SVNROOT}${SRCBRANCH}" + DOCBRANCH="${SVNROOT}${DOCBRANCH}" + PORTBRANCH="${SVNROOT}${PORTBRANCH}" + + if [ -n "${EMBEDDEDBUILD}" ]; then + WITH_DVD= + WITH_COMPRESSED_IMAGES= + NODOC=yes + case ${EMBEDDED_TARGET}:${EMBEDDED_TARGET_ARCH} in + arm:armv6) + chroot_build_release_cmd="chroot_arm_armv6_build_release" + ;; + *) + esac + fi -if [ $(id -u) -ne 0 ]; then - echo "Needs to be run as root." - exit 1 -fi + # If PORTS is set and NODOC is unset, force NODOC=yes because the ports + # tree is required to build the documentation set. + if [ -n "${NOPORTS}" ] && [ -z "${NODOC}" ]; then + echo "*** NOTICE: Setting NODOC=1 since ports tree is required" + echo " and NOPORTS is set." + NODOC=yes + fi -set -e # Everything must succeed + # If NOPORTS and/or NODOC are unset, they must not pass to make as + # variables. The release makefile verifies definedness of the + # NOPORTS/NODOC variables instead of their values. + DOCPORTS= + if [ -n "${NOPORTS}" ]; then + DOCPORTS="NOPORTS=yes " + fi + if [ -n "${NODOC}" ]; then + DOCPORTS="${DOCPORTS}NODOC=yes" + fi -mkdir -p ${CHROOTDIR}/usr + # The aggregated build-time flags based upon variables defined within + # this file, unless overridden by release.conf. In most cases, these + # will not need to be changed. + CONF_FILES="__MAKE_CONF=${MAKE_CONF} SRCCONF=${SRC_CONF}" + if [ -n "${TARGET}" ] && [ -n "${TARGET_ARCH}" ]; then + ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" + else + ARCH_FLAGS= + fi + # Force src checkout if configured + FORCE_SRC_KEY= + if [ -n "${SRC_FORCE_CHECKOUT}" ]; then + FORCE_SRC_KEY="--force" + fi -if [ -z "${SRC_UPDATE_SKIP}" ]; then - ${VCSCMD} ${FORCE_SRC_KEY} ${SRCBRANCH} ${CHROOTDIR}/usr/src -fi -if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then - ${VCSCMD} ${DOCBRANCH} ${CHROOTDIR}/usr/doc -fi -if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then - ${VCSCMD} ${PORTBRANCH} ${CHROOTDIR}/usr/ports -fi - -if [ -z "${CHROOTBUILD_SKIP}" ]; then - cd ${CHROOTDIR}/usr/src - env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld - env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \ - DESTDIR=${CHROOTDIR} - env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \ - DESTDIR=${CHROOTDIR} -fi -mount -t devfs devfs ${CHROOTDIR}/dev -cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf -trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit - -# If MAKE_CONF and/or SRC_CONF are set and not character devices (/dev/null), -# copy them to the chroot. -if [ -e ${MAKE_CONF} ] && [ ! -c ${MAKE_CONF} ]; then - mkdir -p ${CHROOTDIR}/$(dirname ${MAKE_CONF}) - cp ${MAKE_CONF} ${CHROOTDIR}/${MAKE_CONF} -fi -if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CONF} ]; then - mkdir -p ${CHROOTDIR}/$(dirname ${SRC_CONF}) - cp ${SRC_CONF} ${CHROOTDIR}/${SRC_CONF} -fi - -# Embedded builds do not use the 'make release' target. -if [ -n "${EMBEDDEDBUILD}" ]; then - # If a crochet configuration file exists in *this* checkout of - # release/, copy it to the /tmp/external directory within the chroot. - # This allows building embedded releases without relying on updated - # scripts and/or configurations to exist in the branch being built. - if [ -e ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf ] && \ - [ -e ${RELENGDIR}/${XDEV}/release.sh ]; then - mkdir -p ${CHROOTDIR}/tmp/external/${XDEV}/ - cp ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf \ - ${CHROOTDIR}/tmp/external/${XDEV}/crochet-${KERNEL}.conf - /bin/sh ${RELENGDIR}/${XDEV}/release.sh - fi - # If the script does not exist for this architecture, exit. - # This probably should be checked earlier, but allowing the rest - # of the build process to get this far will at least set up the - # chroot environment for testing. - exit 0 -else - # Not embedded. - continue -fi + if [ -z "${CHROOTDIR}" ]; then + echo "Please set CHROOTDIR." + exit 1 + fi -if [ -d ${CHROOTDIR}/usr/ports ]; then + if [ $(id -u) -ne 0 ]; then + echo "Needs to be run as root." + exit 1 + fi + + CHROOT_MAKEENV="${CHROOT_MAKEENV} \ + MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" + CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}" + CHROOT_IMAKEFLAGS="${CONF_FILES}" + CHROOT_DMAKEFLAGS="${CONF_FILES}" + RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} \ + ${CONF_FILES}" + RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} \ + KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" + RELEASE_RMAKEFLAGS="${ARCH_FLAGS} \ + KERNCONF=\"${KERNEL}\" ${CONF_FILES} ${DOCPORTS} \ + WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES} \ + WITH_CLOUDWARE=${WITH_CLOUDWARE} XZ_THREADS=${XZ_THREADS}" + + return 0 +} # env_check() + +# chroot_setup(): Prepare the build chroot environment for the release build. +chroot_setup() { + load_chroot_env + mkdir -p ${CHROOTDIR}/usr + + if [ -z "${SRC_UPDATE_SKIP}" ]; then + ${VCSCMD} ${FORCE_SRC_KEY} ${SRCBRANCH} ${CHROOTDIR}/usr/src + fi + if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then + ${VCSCMD} ${DOCBRANCH} ${CHROOTDIR}/usr/doc + fi + if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then + ${VCSCMD} ${PORTBRANCH} ${CHROOTDIR}/usr/ports + fi + + if [ -z "${CHROOTBUILD_SKIP}" ]; then + cd ${CHROOTDIR}/usr/src + env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld + env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \ + DESTDIR=${CHROOTDIR} + env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \ + DESTDIR=${CHROOTDIR} + fi + + return 0 +} # chroot_setup() + +# extra_chroot_setup(): Prepare anything additional within the build +# necessary for the release build. +extra_chroot_setup() { + mkdir -p ${CHROOTDIR}/dev + mount -t devfs devfs ${CHROOTDIR}/dev + [ -e /etc/resolv.conf ] && cp /etc/resolv.conf \ + ${CHROOTDIR}/etc/resolv.conf # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints # is created. This is needed by ports-mgmt/pkg. - chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart + eval chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart + + # If MAKE_CONF and/or SRC_CONF are set and not character devices + # (/dev/null), copy them to the chroot. + if [ -e ${MAKE_CONF} ] && [ ! -c ${MAKE_CONF} ]; then + mkdir -p ${CHROOTDIR}/$(dirname ${MAKE_CONF}) + cp ${MAKE_CONF} ${CHROOTDIR}/${MAKE_CONF} + fi + if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CONF} ]; then + mkdir -p ${CHROOTDIR}/$(dirname ${SRC_CONF}) + cp ${SRC_CONF} ${CHROOTDIR}/${SRC_CONF} + fi + + if [ -d ${CHROOTDIR}/usr/ports ]; then + # Trick the ports 'run-autotools-fixup' target to do the right + # thing. + _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) + REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) + BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + UNAME_r=${REVISION}-${BRANCH} + if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then + PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" + PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" + PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" + chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ + ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" \ + install clean distclean + fi + fi + + if [ ! -z "${EMBEDDEDPORTS}" ]; then + for _PORT in ${EMBEDDEDPORTS}; do + eval chroot ${CHROOTDIR} make -C /usr/ports/${_PORT} \ + BATCH=1 FORCE_PKG_REGISTER=1 install clean distclean + done + fi + + buildenv_setup + + return 0 +} # extra_chroot_setup() + +# chroot_build_target(): Build the userland and kernel for the build target. +chroot_build_target() { + load_target_env + if [ ! -z "${EMBEDDEDBUILD}" ]; then + RELEASE_WMAKEFLAGS="${RELEASE_WMAKEFLAGS} \ + TARGET=${EMBEDDED_TARGET} \ + TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" + RELEASE_KMAKEFLAGS="${RELEASE_KMAKEFLAGS} \ + TARGET=${EMBEDDED_TARGET} \ + TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" + fi + eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld + eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel + + return 0 +} # chroot_build_target + +# chroot_build_release(): Invoke the 'make release' target. +chroot_build_release() { + load_target_env + eval chroot ${CHROOTDIR} make -C /usr/src/release \ + ${RELEASE_RMAKEFLAGS} release + eval chroot ${CHROOTDIR} make -C /usr/src/release \ + ${RELEASE_RMAKEFLAGS} install DESTDIR=/R \ + WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} \ + WITH_COMPRESSED_VMIMAGES=${WITH_COMPRESSED_VMIMAGES} + + return 0 +} # chroot_build_release() + +# chroot_arm_armv6_build_release(): Create arm/armv6 SD card image. +chroot_arm_armv6_build_release() { + load_target_env + eval chroot ${CHROOTDIR} make -C /usr/src/release obj + if [ -e "${RELENGDIR}/tools/${EMBEDDED_TARGET}.subr" ]; then + . "${RELENGDIR}/tools/${EMBEDDED_TARGET}.subr" + fi + [ ! -z "${RELEASECONF}" ] && . "${RELEASECONF}" + WORLDDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V WORLDDIR)" + OBJDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V .OBJDIR)" + DESTDIR="${OBJDIR}/${KERNEL}" + IMGBASE="${CHROOTDIR}/${OBJDIR}/${KERNEL}.img" + OSRELEASE="$(eval chroot ${CHROOTDIR} make -C /usr/src/release \ + TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ + -V OSRELEASE)" + chroot ${CHROOTDIR} mkdir -p ${DESTDIR} + chroot ${CHROOTDIR} truncate -s ${IMAGE_SIZE} ${IMGBASE##${CHROOTDIR}} + export mddev=$(chroot ${CHROOTDIR} \ + mdconfig -f ${IMGBASE##${CHROOTDIR}} ${MD_ARGS}) + arm_create_disk + arm_install_base + arm_install_uboot + mdconfig -d -u ${mddev} + chroot ${CHROOTDIR} rmdir ${DESTDIR} + mv ${IMGBASE} ${CHROOTDIR}/${OBJDIR}/${OSRELEASE}-${KERNEL}.img + chroot ${CHROOTDIR} mkdir -p /R + chroot ${CHROOTDIR} cp -p ${OBJDIR}/${OSRELEASE}-${KERNEL}.img \ + /R/${OSRELEASE}-${KERNEL}.img + chroot ${CHROOTDIR} xz -T ${XZ_THREADS} /R/${OSRELEASE}-${KERNEL}.img + cd ${CHROOTDIR}/R && sha256 ${OSRELEASE}* \ + > CHECKSUM.SHA256 + cd ${CHROOTDIR}/R && md5 ${OSRELEASE}* \ + > CHECKSUM.MD5 + + return 0 +} # chroot_arm_armv6_build_release() + +# main(): Start here. +main() { + set -e # Everything must succeed + env_setup + while getopts c: opt; do + case ${opt} in + c) + RELEASECONF="${OPTARG}" + ;; + \?) + usage + ;; + esac + done + shift $(($OPTIND - 1)) + if [ ! -z "${RELEASECONF}" ]; then + if [ -e "${RELEASECONF}" ]; then + . ${RELEASECONF} + else + echo "Nonexistent configuration file: ${RELEASECONF}" + echo "Using default build environment." + fi + fi + env_check + trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit + chroot_setup + extra_chroot_setup + chroot_build_target + ${chroot_build_release_cmd} + + return 0 +} # main() - ## Trick the ports 'run-autotools-fixup' target to do the right thing. - _OSVERSION=$(sysctl -n kern.osreldate) - REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) - BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) - UNAME_r=${REVISION}-${BRANCH} - if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then - PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" - PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" - PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" - chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ - ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" \ - install clean distclean - fi -fi - -eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld -eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel -eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - release -eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} \ - WITH_COMPRESSED_VMIMAGES=${WITH_COMPRESSED_VMIMAGES} +main "${@}" Copied: stable/10/release/tools/arm.subr (from r282693, head/release/tools/arm.subr) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/release/tools/arm.subr Wed May 20 19:32:57 2015 (r283161, copy of r282693, head/release/tools/arm.subr) @@ -0,0 +1,137 @@ +#!/bin/sh +#- +# Copyright (c) 2015 The FreeBSD Foundation +# All rights reserved. +# +# Portions of this software were developed by Glen Barber +# under sponsorship from the FreeBSD Foundation. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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. +# +# Common subroutines used to build arm/armv6 images. +# +# $FreeBSD$ +# + +cleanup() { + if [ -c "${DESTDIR}/dev/null" ]; then + umount_loop ${DESTDIR}/dev 2>/dev/null + fi + umount_loop ${DESTDIR} + if [ ! -z "${mddev}" ]; then + mdconfig -d -u ${mddev} + fi + + return 0 +} + +umount_loop() { + DIR=$1 + i=0 + sync + while ! umount ${DIR}; do + i=$(( $i + 1 )) + if [ $i -ge 10 ]; then + # This should never happen. But, it has happened. + echo "Cannot umount(8) ${DIR}" + echo "Something has gone horribly wrong." + return 1 + fi + sleep 1 + done + + return 0 +} + +arm_create_disk() { + # Create the target raw file and temporary work directory. + chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev} + chroot ${CHROOTDIR} gpart add -t '!12' -a 63 -s ${FAT_SIZE} ${mddev} + chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} + chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 + chroot ${CHROOTDIR} gpart add -t freebsd ${mddev} + chroot ${CHROOTDIR} gpart create -s bsd ${mddev}s2 + chroot ${CHROOTDIR} gpart add -t freebsd-ufs -a 64k /dev/${mddev}s2 + chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}s2a + chroot ${CHROOTDIR} tunefs -j enable -N enable /dev/${mddev}s2a + + return 0 +} + +arm_create_user() { + # Create a default user account 'freebsd' with the password 'freebsd', + # and set the default password for the 'root' user to 'root'. + chroot ${CHROOTDIR} /usr/sbin/pw groupadd freebsd -g 1001 + chroot ${CHROOTDIR} /usr/sbin/pw useradd freebsd \ + -m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \ + -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' + chroot ${CHROOTDIR} /usr/sbin/pw usermod root -w yes + + return 0 +} + +arm_install_base() { + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} + eval chroot ${CHROOTDIR} make -C ${WORLDDIR} \ + TARGET=${EMBEDDED_TARGET} \ + TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed May 20 20:15:58 2015 Return-Path: Delivered-To: svn-src-all@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 343204F0 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 D5BC61106 for ; Wed, 20 May 2015 20:15:57 +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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 21:26:20 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 23:03:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 23:15:57 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 23:22:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 23:24:18 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Wed May 20 23:26:03 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@FreeBSD.ORG Thu May 21 00:21:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 01:47:13 2015 Return-Path: Delivered-To: svn-src-all@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 64717C7D; Thu, 21 May 2015 01:47: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 52088165D; Thu, 21 May 2015 01:47: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 t4L1lDVP045220; Thu, 21 May 2015 01:47:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L1lCwZ045217; Thu, 21 May 2015 01:47:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505210147.t4L1lCwZ045217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 May 2015 01:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283164 - in stable/10/share: syscons/keymaps vt/keymaps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 01:47:13 -0000 Author: emaste Date: Thu May 21 01:47:12 2015 New Revision: 283164 URL: https://svnweb.freebsd.org/changeset/base/283164 Log: MFC INDEX.keymaps fixes r282898: Correct UTF-8 encoding in Británico One á was ISO 8859-1 0xE1 instead of UTF-8 0xC3 0xA1. r282902: Correct language code -- "Danish" is English The menu entry "Danish ISO-8859-1 (macbook)" was first added to the syscons(4) INDEX.keymaps in r241851 with no language code, and then in r256367 incorrectly tagged with "da". It is a Danish keyboard map, but the description is in English and therefore must be "en". This error subsequently propagated into the vt(4) INDEX.keymaps. r282905: Restore 'he' language code for Hebrew kbdmap(1) menu title r282914: kbdmap(1): Correct menu title: keyboards have a layout, not a language PR: 146793, 193656 Modified: stable/10/share/syscons/keymaps/INDEX.keymaps stable/10/share/vt/keymaps/INDEX.keymaps Directory Properties: stable/10/ (props changed) Modified: stable/10/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- stable/10/share/syscons/keymaps/INDEX.keymaps Wed May 20 23:15:56 2015 (r283163) +++ stable/10/share/syscons/keymaps/INDEX.keymaps Thu May 21 01:47:12 2015 (r283164) @@ -123,7 +123,7 @@ danish.cp865.kbd:fr:Danois Code page 865 danish.cp865.kbd:pt:Dinamarquês Codepage 865 danish.cp865.kbd:es:Danés Codepage 865 -danish.iso.macbook.kbd:da:Danish ISO-8859-1 (macbook) +danish.iso.macbook.kbd:en:Danish ISO-8859-1 (macbook) danish.iso.macbook.kbd:da:Dansk ISO-8859-1 (macbook) danish.iso.macbook.kbd:de:Dänisch ISO-8859-1 (Macbook) danish.iso.macbook.kbd:fr:Danois ISO-8859-1 (macbook) Modified: stable/10/share/vt/keymaps/INDEX.keymaps ============================================================================== --- stable/10/share/vt/keymaps/INDEX.keymaps Wed May 20 23:15:56 2015 (r283163) +++ stable/10/share/vt/keymaps/INDEX.keymaps Thu May 21 01:47:12 2015 (r283164) @@ -20,15 +20,15 @@ # # Language support: MENU, FONT # -MENU:en:Choose your keyboard language +MENU:en:Choose your keyboard layout MENU:da,no,sv:Vælg dit keyboard layout MENU:de:Wählen Sie Ihre Tastaturbelegung -MENU:fr:Choisissez la nationalité de votre clavier +MENU:fr:Choisissez la disposition de votre clavier MENU:pl:Wybierz ukÅ‚ad klawiatury MENU:pt:Escolha o layout do teclado -MENU:es:Seleccione el idioma de su teclado -MENU::ךלש תדלקמה תפש ×ª× ×¨×—×‘ -MENU:uk:Bиберіть розкладку клавіатури +MENU:es:Seleccione la disposición de su teclado +MENU:he:ךלש תדלקמה תפש ×ª× ×¨×—×‘ +MENU:uk:ОберiÑ‚ÑŒ розкладку клавіатури MENU:el:Επιλέξτε το πληκτÏολόγιο της κονσόλας MENU:hy:Ô¸Õ¶Õ¿Ö€Õ¥Ö„ Õ½Õ¿Õ¥Õ²Õ¶Õ¡Õ·Õ¡Ö€Õ« Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ @@ -121,7 +121,7 @@ dk.kbd.from-cp865:fr:Danois dk.kbd.from-cp865:pt:Dinamarquês dk.kbd.from-cp865:es:Danés -dk.macbook.kbd:da:Danish (macbook) +dk.macbook.kbd:en:Danish (macbook) dk.macbook.kbd:da:Dansk (macbook) dk.macbook.kbd:de:Dänisch (Macbook) dk.macbook.kbd:fr:Danois (macbook) @@ -517,7 +517,7 @@ uk.capsctrl.kbd:en:United Kingdom (Caps uk.capsctrl.kbd:de:Vereinigtes Königreich (Caps Lock als linke Strg) #uk.iso-ctrl.kbd:fr:Royaume Uni (caps lock acts as Left Ctrl) #uk.iso-ctrl.kbd:pt:Reino Unido (caps lock acts as Left Ctrl) -#uk.iso-ctrl.kbd:es:Británico (caps lock acts as Left Ctrl) +#uk.iso-ctrl.kbd:es:Británico (caps lock acts as Left Ctrl) uk.dvorak.kbd:en:United Kingdom Dvorak uk.dvorak.kbd:de:Vereinigtes Königreich Dvorak From owner-svn-src-all@FreeBSD.ORG Thu May 21 01:50:07 2015 Return-Path: Delivered-To: svn-src-all@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 9934CEAD; Thu, 21 May 2015 01:50: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 873671689; Thu, 21 May 2015 01:50: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 t4L1o7Q0045736; Thu, 21 May 2015 01:50:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L1o7fr045735; Thu, 21 May 2015 01:50:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505210150.t4L1o7fr045735@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 May 2015 01:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283165 - stable/10/usr.sbin/kbdmap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 01:50:07 -0000 Author: emaste Date: Thu May 21 01:50:06 2015 New Revision: 283165 URL: https://svnweb.freebsd.org/changeset/base/283165 Log: MFC r282904: kbdmap(1): increase description size to 256 bytes After conversion to UTF-8 some INDEX.keymaps descriptions are longer than the previous limit of 64 bytes. PR: 193656 Modified: stable/10/usr.sbin/kbdmap/kbdmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/kbdmap/kbdmap.c ============================================================================== --- stable/10/usr.sbin/kbdmap/kbdmap.c Thu May 21 01:47:12 2015 (r283164) +++ stable/10/usr.sbin/kbdmap/kbdmap.c Thu May 21 01:50:06 2015 (r283165) @@ -571,7 +571,7 @@ menu_read(void) char *p; int mark, num_keymaps, items, i; char buffer[256], filename[PATH_MAX]; - char keym[64], lng[64], desc[64]; + char keym[64], lng[64], desc[256]; char dialect[64], lang_abk[64]; struct keymap *km; struct keymap **km_sorted; @@ -616,7 +616,7 @@ menu_read(void) continue; /* Parse input, removing newline */ - matches = sscanf(p, "%64[^:]:%64[^:]:%64[^:\n]", + matches = sscanf(p, "%64[^:]:%64[^:]:%256[^:\n]", keym, lng, desc); if (matches == 3) { if (strcmp(keym, "FONT") From owner-svn-src-all@FreeBSD.ORG Thu May 21 03:26:47 2015 Return-Path: Delivered-To: svn-src-all@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 4639C68D; Thu, 21 May 2015 03:26: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 34D5F126B; Thu, 21 May 2015 03:26: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 t4L3Ql7b095328; Thu, 21 May 2015 03:26:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L3Qkb2095326; Thu, 21 May 2015 03:26:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505210326.t4L3Qkb2095326@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 03:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283166 - vendor/atf/dist/atf-sh X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 03:26:47 -0000 Author: ngie Date: Thu May 21 03:26:46 2015 New Revision: 283166 URL: https://svnweb.freebsd.org/changeset/base/283166 Log: Import proposed fix from https://github.com/jmmv/atf/commit/0e546407567ea858e261e72f75c5ed61e07d0ddf.patch 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: vendor/atf/dist/atf-sh/atf_check_test.sh vendor/atf/dist/atf-sh/misc_helpers.sh Modified: vendor/atf/dist/atf-sh/atf_check_test.sh ============================================================================== --- vendor/atf/dist/atf-sh/atf_check_test.sh Thu May 21 01:50:06 2015 (r283165) +++ vendor/atf/dist/atf-sh/atf_check_test.sh Thu May 21 03:26:46 2015 (r283166) @@ -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: vendor/atf/dist/atf-sh/misc_helpers.sh ============================================================================== --- vendor/atf/dist/atf-sh/misc_helpers.sh Thu May 21 01:50:06 2015 (r283165) +++ vendor/atf/dist/atf-sh/misc_helpers.sh Thu May 21 03:26:46 2015 (r283166) @@ -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-all@FreeBSD.ORG Thu May 21 03:32:46 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 04:07:30 2015 Return-Path: Delivered-To: svn-src-all@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 C206084C for ; Thu, 21 May 2015 04:07:30 +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 9314116E7 for ; Thu, 21 May 2015 04:07:30 +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 t4L47U63063502 for ; Thu, 21 May 2015 04:07:30 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t4L47UA2063501 for svn-src-all@freebsd.org; Thu, 21 May 2015 04:07:30 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 04:07:30 -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-all@FreeBSD.ORG Thu May 21 04:09:06 2015 Return-Path: Delivered-To: svn-src-all@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 8C2918AD; Thu, 21 May 2015 04:09:06 +0000 (UTC) Received: from mail-la0-x229.google.com (mail-la0-x229.google.com [IPv6:2a00:1450:4010:c03::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 1796D16F5; Thu, 21 May 2015 04:09:06 +0000 (UTC) Received: by labbd9 with SMTP id bd9so94336685lab.2; Wed, 20 May 2015 21:09:04 -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=c/fL1SP3cM1wVKYPZuSKB4lbJ8lci7e6OShjV7/YRmc=; b=T+6rsaH42J4ha0b3K35WcWbuPdc0ZRVG9bFxIDpMrWL8uxy2/K75BDnm4VTdk6hsh9 Yo9UFr6Pvam3x/FdD+B/JDhU4P1tm6+2e1vcViCedwtOaOnKRK+hlGMtyArpUNxBw/Gd c3dfxPNIOIlJ00/4j7ubZCgNy46GVV+/UnDFVC7vYjgwUY3LG0UWFBkyMEDQV/SMbpKM eRKBl5SmVM7wWLTpdwps0AKCIqLTue/0/GSBiBbNnbAdT703rodcLihXkA2VnL9Lx+GC 5yyl5wyU4Y5/JVG7+IHPUqJGebkQMNEknymU2UsSBh5Lg9A/w1PxfRKIe9pkxrB16xpa 6BIg== MIME-Version: 1.0 X-Received: by 10.152.181.34 with SMTP id dt2mr539079lac.84.1432181344121; Wed, 20 May 2015 21:09:04 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.164.38 with HTTP; Wed, 20 May 2015 21:09:04 -0700 (PDT) In-Reply-To: <201505210326.t4L3Qkb2095326@svn.freebsd.org> References: <201505210326.t4L3Qkb2095326@svn.freebsd.org> Date: Wed, 20 May 2015 21:09:04 -0700 X-Google-Sender-Auth: OzUa93uOZEkGoERAr0gYYL6bgNk Message-ID: Subject: Re: svn commit: r283166 - vendor/atf/dist/atf-sh From: Craig Rodrigues To: Garrett Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-vendor@freebsd.org, "freebsd-testing@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 04:09:06 -0000 Garrett, Thanks for doing the analysis of the test failure, and jumping on fixing it! I appreciate all the work that you do in monitoring the tests and fixing them. In order for FreeBSD testing to work, we need more people like you to keep an eye on things and help fix things. This stuff doesn't get done by itself. You have been pushing ATF and testing in FreeBSD for a number of years now. Definitely much longer than I have been involved with this stuff. Often, it seems like monitoring tests, analyzing the cause of test failures, and fixing the problems are thankless tasks. Let me make it less "thankless" by saying Thank You!! :) -- Craig On Wed, May 20, 2015 at 8:26 PM, Garrett Cooper wrote: > Author: ngie > Date: Thu May 21 03:26:46 2015 > New Revision: 283166 > URL: https://svnweb.freebsd.org/changeset/base/283166 > > Log: > Import proposed fix from > > https://github.com/jmmv/atf/commit/0e546407567ea858e261e72f75c5ed61e07d0ddf.patch > > 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: > vendor/atf/dist/atf-sh/atf_check_test.sh > vendor/atf/dist/atf-sh/misc_helpers.sh > > Modified: vendor/atf/dist/atf-sh/atf_check_test.sh > > ============================================================================== > --- vendor/atf/dist/atf-sh/atf_check_test.sh Thu May 21 01:50:06 2015 > (r283165) > +++ vendor/atf/dist/atf-sh/atf_check_test.sh Thu May 21 03:26:46 2015 > (r283166) > @@ -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: vendor/atf/dist/atf-sh/misc_helpers.sh > > ============================================================================== > --- vendor/atf/dist/atf-sh/misc_helpers.sh Thu May 21 01:50:06 2015 > (r283165) > +++ vendor/atf/dist/atf-sh/misc_helpers.sh Thu May 21 03:26:46 2015 > (r283166) > @@ -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-all@FreeBSD.ORG Thu May 21 04:19:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 05:02:09 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 05:06:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 05:11:40 2015 Return-Path: Delivered-To: svn-src-all@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 8CC69363; Thu, 21 May 2015 05:11:40 +0000 (UTC) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e: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 564CD1E28; Thu, 21 May 2015 05:11:40 +0000 (UTC) Received: by pacwv17 with SMTP id wv17so92541081pac.2; Wed, 20 May 2015 22:11:40 -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=JibmGeKriEfgZdOp8BahkFZrHBXLIcsrL2Cxf504rmA=; b=O/2y8jkNJEIS+vPLH0p9b9Lj+nOGURDL5npOWsFL97sNEWo6GBdl4B59b69cNe6BLO eicnnOOdmcWhM1dJHy0+Jyes6XqRQ6xV1rwUhFDDWEQyB3BoA7/l2yPeyqCw0xrXbwC6 G2PJMQlfvt+76qdAr1m7qbn6n9w4kosIVaoUb9oqMqwhq5MyY5bAAWwV4PeFeMZtKCii vYcK0XNC8FJ3+r0mDswZwmFvAWr6GHppv2vyTPxjxWkcnrQBtk/JGZBm6Dw3Eor6ZwvL RxvZTW6zu4CdoBFy29CrrRf9y7UBL1dyUX+j3LbPxGKrZD2bA/joOhHVABxPGacRxDtD g5oQ== X-Received: by 10.68.136.42 with SMTP id px10mr1983520pbb.19.1432185099867; Wed, 20 May 2015 22:11:39 -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 ja1sm13941585pbc.51.2015.05.20.22.11.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 May 2015 22:11:38 -0700 (PDT) Subject: Re: svn commit: r283166 - vendor/atf/dist/atf-sh Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D79848D1-C035-4E13-9B4A-CC635FAEF0EC"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: Date: Wed, 20 May 2015 22:11:37 -0700 Cc: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-vendor@freebsd.org, "freebsd-testing@freebsd.org" Message-Id: References: <201505210326.t4L3Qkb2095326@svn.freebsd.org> To: Craig Rodrigues X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 05:11:40 -0000 --Apple-Mail=_D79848D1-C035-4E13-9B4A-CC635FAEF0EC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On May 20, 2015, at 21:09, Craig Rodrigues wrote: > Garrett, >=20 > Thanks for doing the analysis of the test failure, and jumping on = fixing it! >=20 > I appreciate all the work that you do in monitoring the tests and = fixing them. > In order for FreeBSD testing to work, we need more people like you to = keep > an eye on things and help fix things. This stuff doesn't get done by = itself. >=20 > You have been pushing ATF and testing in FreeBSD for a number of years = now. > Definitely much longer than I have been involved with this stuff. >=20 > Often, it seems like monitoring tests, analyzing the cause of test = failures, > and fixing the problems are thankless tasks. Let me make it less = "thankless" > by saying Thank You!! :) Craig, et al, Thank you. I=92m sorry it took me so long to get to this =97 = especially because it . I=92ll try to do better next time. Now all that remains is fixing the port (which is where the bulk = majority of the errors come from in the first place, not the test in the = base system :(..!!!). Thanks, -NGie --Apple-Mail=_D79848D1-C035-4E13-9B4A-CC635FAEF0EC 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 iQEcBAEBCgAGBQJVXWkJAAoJEMZr5QU6S73eNGkH/2olFRpo39x/EKM9E0oaJAYy 1Dif4Axp6QY5mVKqBOqnQznlyxA8skUWvrIAx75Wo8I+1WPTV5IgdC+WWF3g5AZm hFgzSdjZvfZCc979ALRYpNjNXra4PY41hlmstYjfMf9ayGtM8L3PKOz/fVETCUeF Tt8HZ8mgKM6mxEASRM+aqhaWw+wNT6lWyKc6gvwjptJ/yqruPbq4HNT9QjUE1V4a CIdKn6jjvRLxnK7XXNXIAROAPtSj9Yf5Ye1i5y4SRtnPpS/9itFqdIfjixWC28Ao 9/j8Xo1uR0Kz0rOhekSIPyJKm9BE971W+1HurblEjFf3hr+QtZF4M31b1ZqE6Rs= =VQBH -----END PGP SIGNATURE----- --Apple-Mail=_D79848D1-C035-4E13-9B4A-CC635FAEF0EC-- From owner-svn-src-all@FreeBSD.ORG Thu May 21 06:30:45 2015 Return-Path: Delivered-To: svn-src-all@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 D885DFDE; Thu, 21 May 2015 06:30: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 C66911607; Thu, 21 May 2015 06:30: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 t4L6UiZa086827; Thu, 21 May 2015 06:30:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L6UiF9086826; Thu, 21 May 2015 06:30:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210630.t4L6UiF9086826@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 06:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283171 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:30:45 -0000 Author: hselasky Date: Thu May 21 06:30:44 2015 New Revision: 283171 URL: https://svnweb.freebsd.org/changeset/base/283171 Log: MFC r280495: Implement a simple OID number garbage collector. Given the increasing number of dynamically created and destroyed SYSCTLs during runtime it is very likely that the current new OID number limit of 0x7fffffff can be reached. Especially if dynamic OID creation and destruction results from automatic tests. Additional changes: - Optimize the typical use case by decrementing the next automatic OID sequence number instead of incrementing it. This saves searching time when inserting new OIDs into a fresh parent OID node. - Add simple check for duplicate non-automatic OID numbers. Modified: stable/10/sys/kern/kern_sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sysctl.c ============================================================================== --- stable/10/sys/kern/kern_sysctl.c Thu May 21 05:06:08 2015 (r283170) +++ stable/10/sys/kern/kern_sysctl.c Thu May 21 06:30:44 2015 (r283171) @@ -142,6 +142,8 @@ sysctl_register_oid(struct sysctl_oid *o struct sysctl_oid_list *parent = oidp->oid_parent; struct sysctl_oid *p; struct sysctl_oid *q; + int oid_number; + int timeout = 2; /* * First check if another oid with the same name already @@ -158,37 +160,66 @@ sysctl_register_oid(struct sysctl_oid *o return; } } + /* get current OID number */ + oid_number = oidp->oid_number; + +#if (OID_AUTO >= 0) +#error "OID_AUTO is expected to be a negative value" +#endif /* - * If this oid has a number OID_AUTO, give it a number which - * is greater than any current oid. + * Any negative OID number qualifies as OID_AUTO. Valid OID + * numbers should always be positive. + * * NOTE: DO NOT change the starting value here, change it in * , and make sure it is at least 256 to * accomodate e.g. net.inet.raw as a static sysctl node. */ - if (oidp->oid_number == OID_AUTO) { - static int newoid = CTL_AUTO_START; + if (oid_number < 0) { + static int newoid; + + /* + * By decrementing the next OID number we spend less + * time inserting the OIDs into a sorted list. + */ + if (--newoid < CTL_AUTO_START) + newoid = 0x7fffffff; - oidp->oid_number = newoid++; - if (newoid == 0x7fffffff) - panic("out of oids"); - } -#if 0 - else if (oidp->oid_number >= CTL_AUTO_START) { - /* do not panic; this happens when unregistering sysctl sets */ - printf("static sysctl oid too high: %d", oidp->oid_number); + oid_number = newoid; } -#endif /* - * Insert the oid into the parent's list in order. + * Insert the OID into the parent's list sorted by OID number. */ +retry: q = NULL; SLIST_FOREACH(p, parent, oid_link) { - if (oidp->oid_number < p->oid_number) + /* check if the current OID number is in use */ + if (oid_number == p->oid_number) { + /* get the next valid OID number */ + if (oid_number < CTL_AUTO_START || + oid_number == 0x7fffffff) { + /* wraparound - restart */ + oid_number = CTL_AUTO_START; + /* don't loop forever */ + if (!timeout--) + panic("sysctl: Out of OID numbers\n"); + goto retry; + } else { + oid_number++; + } + } else if (oid_number < p->oid_number) break; q = p; } - if (q) + /* check for non-auto OID number collision */ + if (oidp->oid_number >= 0 && oidp->oid_number < CTL_AUTO_START && + oid_number >= CTL_AUTO_START) { + printf("sysctl: OID number(%d) is already in use for '%s'\n", + oidp->oid_number, oidp->oid_name); + } + /* update the OID number, if any */ + oidp->oid_number = oid_number; + if (q != NULL) SLIST_INSERT_AFTER(q, oidp, oid_link); else SLIST_INSERT_HEAD(parent, oidp, oid_link); From owner-svn-src-all@FreeBSD.ORG Thu May 21 06:34:07 2015 Return-Path: Delivered-To: svn-src-all@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 4F0D621B; Thu, 21 May 2015 06:34: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 3CA6616CC; Thu, 21 May 2015 06:34: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 t4L6Y7KL088502; Thu, 21 May 2015 06:34:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L6Y7Yq088501; Thu, 21 May 2015 06:34:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210634.t4L6Y7Yq088501@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 06:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283172 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:34:07 -0000 Author: hselasky Date: Thu May 21 06:34:06 2015 New Revision: 283172 URL: https://svnweb.freebsd.org/changeset/base/283172 Log: MFC r280495: Implement a simple OID number garbage collector. Given the increasing number of dynamically created and destroyed SYSCTLs during runtime it is very likely that the current new OID number limit of 0x7fffffff can be reached. Especially if dynamic OID creation and destruction results from automatic tests. Additional changes: - Optimize the typical use case by decrementing the next automatic OID sequence number instead of incrementing it. This saves searching time when inserting new OIDs into a fresh parent OID node. - Add simple check for duplicate non-automatic OID numbers. Modified: stable/9/sys/kern/kern_sysctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_sysctl.c ============================================================================== --- stable/9/sys/kern/kern_sysctl.c Thu May 21 06:30:44 2015 (r283171) +++ stable/9/sys/kern/kern_sysctl.c Thu May 21 06:34:06 2015 (r283172) @@ -142,6 +142,8 @@ sysctl_register_oid(struct sysctl_oid *o struct sysctl_oid_list *parent = oidp->oid_parent; struct sysctl_oid *p; struct sysctl_oid *q; + int oid_number; + int timeout = 2; /* * First check if another oid with the same name already @@ -158,37 +160,66 @@ sysctl_register_oid(struct sysctl_oid *o return; } } + /* get current OID number */ + oid_number = oidp->oid_number; + +#if (OID_AUTO >= 0) +#error "OID_AUTO is expected to be a negative value" +#endif /* - * If this oid has a number OID_AUTO, give it a number which - * is greater than any current oid. + * Any negative OID number qualifies as OID_AUTO. Valid OID + * numbers should always be positive. + * * NOTE: DO NOT change the starting value here, change it in * , and make sure it is at least 256 to * accomodate e.g. net.inet.raw as a static sysctl node. */ - if (oidp->oid_number == OID_AUTO) { - static int newoid = CTL_AUTO_START; + if (oid_number < 0) { + static int newoid; + + /* + * By decrementing the next OID number we spend less + * time inserting the OIDs into a sorted list. + */ + if (--newoid < CTL_AUTO_START) + newoid = 0x7fffffff; - oidp->oid_number = newoid++; - if (newoid == 0x7fffffff) - panic("out of oids"); - } -#if 0 - else if (oidp->oid_number >= CTL_AUTO_START) { - /* do not panic; this happens when unregistering sysctl sets */ - printf("static sysctl oid too high: %d", oidp->oid_number); + oid_number = newoid; } -#endif /* - * Insert the oid into the parent's list in order. + * Insert the OID into the parent's list sorted by OID number. */ +retry: q = NULL; SLIST_FOREACH(p, parent, oid_link) { - if (oidp->oid_number < p->oid_number) + /* check if the current OID number is in use */ + if (oid_number == p->oid_number) { + /* get the next valid OID number */ + if (oid_number < CTL_AUTO_START || + oid_number == 0x7fffffff) { + /* wraparound - restart */ + oid_number = CTL_AUTO_START; + /* don't loop forever */ + if (!timeout--) + panic("sysctl: Out of OID numbers\n"); + goto retry; + } else { + oid_number++; + } + } else if (oid_number < p->oid_number) break; q = p; } - if (q) + /* check for non-auto OID number collision */ + if (oidp->oid_number >= 0 && oidp->oid_number < CTL_AUTO_START && + oid_number >= CTL_AUTO_START) { + printf("sysctl: OID number(%d) is already in use for '%s'\n", + oidp->oid_number, oidp->oid_name); + } + /* update the OID number, if any */ + oidp->oid_number = oid_number; + if (q != NULL) SLIST_INSERT_AFTER(q, oidp, oid_link); else SLIST_INSERT_HEAD(parent, oidp, oid_link); From owner-svn-src-all@FreeBSD.ORG Thu May 21 06:40:50 2015 Return-Path: Delivered-To: svn-src-all@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 87B1340F; Thu, 21 May 2015 06:40:50 +0000 (UTC) Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com [IPv6:2a00:1450:4010:c04::236]) (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 012D51701; Thu, 21 May 2015 06:40:50 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2so10852995lbb.3; Wed, 20 May 2015 23:40:47 -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=CQ8WWNDELCpjb+GRC/DTXt2h5FFmznoSJK1yaC3dn/w=; b=oBb3nOK3dAaTj4CS7i4NLo+WfRdiR+V/+081afj8VYOcTPMwPgMpeJylTcjeTwvV5g Ra3o+SuisGFyrmCbNm9DTJ90Cj9RWLyWMUC57MDfq/kLP+2i74RrQQUVYJZeKvH8gZjN BeJdHmabz9yYmGhJxRuyzsVlNJBkmgPqM17qofM7wqXRWYocj7pnfzxbfl43Kg4SZ6+c 3VtN0MEVjMJUF5p7lhBNF0FPQ/nudIaXkT+d2CpZ9xEtCB+a2tWRFUBuUOXQVhW2yBYj bp1M2kCMd3L99DxAgjLMttmvqLo6zt/zvoDT84WuIHhdMYiQA1Ic+TetrtT/72Ffd1yd OSIw== MIME-Version: 1.0 X-Received: by 10.113.10.134 with SMTP id ea6mr904664lbd.29.1432190447851; Wed, 20 May 2015 23:40:47 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.164.38 with HTTP; Wed, 20 May 2015 23:40:47 -0700 (PDT) In-Reply-To: References: <201505210326.t4L3Qkb2095326@svn.freebsd.org> Date: Wed, 20 May 2015 23:40:47 -0700 X-Google-Sender-Auth: pTFPy4p0SU-q_21C9qjpsvXCgSc Message-ID: Subject: Re: svn commit: r283166 - vendor/atf/dist/atf-sh From: Craig Rodrigues To: Garrett Cooper Cc: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-vendor@freebsd.org, "freebsd-testing@freebsd.org" 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:40:50 -0000 On Wed, May 20, 2015 at 10:11 PM, Garrett Cooper wrote: > Craig, et al, > Thank you. I=E2=80=99m sorry it took me so long to get to this = =E2=80=94 > especially because it . I=E2=80=99ll try to do better next time. > Now all that remains is fixing the port (which is where the bulk > majority of the errors come from in the first place, not the test in the > base system :(..!!!). > Thanks, > -NGie > Thanks, unfortunately since you have been the main person in terms of importing more ATF tests into the FreeBSD tree from various sources like NetBSD and getting them to work, we depend on you. Have you managed to get any of your colleagues at your current job, or any other open source developers interested in ATF and FreeBSD tests, so that we can pull in more people and distribute the load? In the place that I am currently working in, I completely failed in my attempts to be a proponent for ATF and kyua and attract new developers. :( The documentation and examples for ATF/kyua were not as good as for other frameworks like CUnit and pytest, so that was the main blocker for me. Also, every person who talked to me couldn't figure out how to pronounce "kyua". So I had to give up and move on. :( -- Craig From owner-svn-src-all@FreeBSD.ORG Thu May 21 06:47:22 2015 Return-Path: Delivered-To: svn-src-all@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 E7BC75E3; Thu, 21 May 2015 06:47: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 D386E17F6; Thu, 21 May 2015 06:47: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 t4L6lMji094091; Thu, 21 May 2015 06:47:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L6lKKR094082; Thu, 21 May 2015 06:47:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210647.t4L6lKKR094082@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 06:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283173 - in stable/10: share/man/man4 sys/dev/usb sys/dev/usb/quirk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:47:23 -0000 Author: hselasky Date: Thu May 21 06:47:20 2015 New Revision: 283173 URL: https://svnweb.freebsd.org/changeset/base/283173 Log: MFC r282577: Add support for DYMO LabelWriter PnP. Modified: stable/10/share/man/man4/usb_quirk.4 stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/quirk/usb_quirk.h stable/10/sys/dev/usb/usb_device.c stable/10/sys/dev/usb/usb_msctest.c stable/10/sys/dev/usb/usb_msctest.h stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/usb_quirk.4 ============================================================================== --- stable/10/share/man/man4/usb_quirk.4 Thu May 21 06:34:06 2015 (r283172) +++ stable/10/share/man/man4/usb_quirk.4 Thu May 21 06:47:20 2015 (r283173) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 21, 2013 +.Dd May 7, 2015 .Dt USB_QUIRK 4 .Os .Sh NAME @@ -170,6 +170,9 @@ ejects after Huawei SCSI command .It UQ_MSC_EJECT_TCT ejects after TCT SCSI command .Dv 0x06f504025270 +.It UQ_MSC_DYMO_EJECT +ejects after HID command +.Dv 0x1b5a01 .El .Pp See Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Thu May 21 06:34:06 2015 (r283172) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Thu May 21 06:47:20 2015 (r283173) @@ -523,6 +523,9 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(FEIYA, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(REALTEK, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(INITIO, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), + + /* DYMO LabelManager Pnp */ + USB_QUIRK(DYMO, LABELMANAGERPNP, 0x0000, 0xffff, UQ_MSC_DYMO_EJECT), }; #undef USB_QUIRK_VP #undef USB_QUIRK @@ -592,6 +595,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_BAD_MIDI] = "UQ_BAD_MIDI", [UQ_AU_VENDOR_CLASS] = "UQ_AU_VENDOR_CLASS", [UQ_SINGLE_CMD_MIDI] = "UQ_SINGLE_CMD_MIDI", + [UQ_MSC_DYMO_EJECT] = "UQ_MSC_DYMO_EJECT", }; /*------------------------------------------------------------------------* Modified: stable/10/sys/dev/usb/quirk/usb_quirk.h ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.h Thu May 21 06:34:06 2015 (r283172) +++ stable/10/sys/dev/usb/quirk/usb_quirk.h Thu May 21 06:47:20 2015 (r283173) @@ -108,6 +108,7 @@ enum { UQ_BAD_MIDI, /* device claims MIDI class, but isn't */ UQ_AU_VENDOR_CLASS, /* audio device uses vendor and not audio class */ UQ_SINGLE_CMD_MIDI, /* at most one command per USB packet */ + UQ_MSC_DYMO_EJECT, /* ejects Dymo MSC device */ USB_QUIRK_MAX }; Modified: stable/10/sys/dev/usb/usb_device.c ============================================================================== --- stable/10/sys/dev/usb/usb_device.c Thu May 21 06:34:06 2015 (r283172) +++ stable/10/sys/dev/usb/usb_device.c Thu May 21 06:47:20 2015 (r283173) @@ -1346,6 +1346,12 @@ usb_probe_and_attach(struct usb_device * */ if (iface_index == USB_IFACE_INDEX_ANY) { + if (usb_test_quirk(&uaa, UQ_MSC_DYMO_EJECT) != 0 && + usb_dymo_eject(udev, 0) == 0) { + /* success, mark the udev as disappearing */ + uaa.dev_state = UAA_DEV_EJECTING; + } + EVENTHANDLER_INVOKE(usb_dev_configured, udev, &uaa); if (uaa.dev_state != UAA_DEV_READY) { Modified: stable/10/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/10/sys/dev/usb/usb_msctest.c Thu May 21 06:34:06 2015 (r283172) +++ stable/10/sys/dev/usb/usb_msctest.c Thu May 21 06:47:20 2015 (r283173) @@ -177,6 +177,7 @@ static usb_callback_t bbb_data_rd_cs_cal static usb_callback_t bbb_data_write_callback; static usb_callback_t bbb_data_wr_cs_callback; static usb_callback_t bbb_status_callback; +static usb_callback_t bbb_raw_write_callback; static void bbb_done(struct bbb_transfer *, int); static void bbb_transfer_start(struct bbb_transfer *, uint8_t); @@ -184,7 +185,7 @@ static void bbb_data_clear_stall_callbac uint8_t); static int bbb_command_start(struct bbb_transfer *, uint8_t, uint8_t, void *, size_t, void *, size_t, usb_timeout_t); -static struct bbb_transfer *bbb_attach(struct usb_device *, uint8_t); +static struct bbb_transfer *bbb_attach(struct usb_device *, uint8_t, uint8_t); static void bbb_detach(struct bbb_transfer *); static const struct usb_config bbb_config[ST_MAX] = { @@ -247,6 +248,19 @@ static const struct usb_config bbb_confi }, }; +static const struct usb_config bbb_raw_config[1] = { + + [0] = { + .type = UE_BULK_INTR, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = SCSI_MAX_LEN, + .flags = {.ext_buffer = 1,.proxy_buffer = 1,}, + .callback = &bbb_raw_write_callback, + .timeout = 1 * USB_MS_HZ, /* 1 second */ + }, +}; + static void bbb_done(struct bbb_transfer *sc, int error) { @@ -467,6 +481,47 @@ bbb_status_callback(struct usb_xfer *xfe } } +static void +bbb_raw_write_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct bbb_transfer *sc = usbd_xfer_softc(xfer); + usb_frlength_t max_bulk = usbd_xfer_max_len(xfer); + int actlen, sumlen; + + usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + sc->data_rem -= actlen; + sc->data_ptr += actlen; + sc->actlen += actlen; + + if (actlen < sumlen) { + /* short transfer */ + sc->data_rem = 0; + } + case USB_ST_SETUP: + DPRINTF("max_bulk=%d, data_rem=%d\n", + max_bulk, sc->data_rem); + + if (sc->data_rem == 0) { + bbb_done(sc, 0); + break; + } + if (max_bulk > sc->data_rem) { + max_bulk = sc->data_rem; + } + usbd_xfer_set_timeout(xfer, sc->data_timeout); + usbd_xfer_set_frame_data(xfer, 0, sc->data_ptr, max_bulk); + usbd_transfer_submit(xfer); + break; + + default: /* Error */ + bbb_done(sc, error); + break; + } +} + /*------------------------------------------------------------------------* * bbb_command_start - execute a SCSI command synchronously * @@ -502,13 +557,45 @@ bbb_command_start(struct bbb_transfer *s return (sc->error); } +/*------------------------------------------------------------------------* + * bbb_raw_write - write a raw BULK message synchronously + * + * Return values + * 0: Success + * Else: Failure + *------------------------------------------------------------------------*/ +static int +bbb_raw_write(struct bbb_transfer *sc, const void *data_ptr, size_t data_len, + usb_timeout_t data_timeout) +{ + sc->data_ptr = __DECONST(void *, data_ptr); + sc->data_len = data_len; + sc->data_rem = data_len; + sc->data_timeout = (data_timeout + USB_MS_HZ); + sc->actlen = 0; + sc->error = 0; + + DPRINTFN(1, "BULK DATA = %*D\n", (int)data_len, + (const char *)data_ptr, ":"); + + mtx_lock(&sc->mtx); + usbd_transfer_start(sc->xfer[0]); + while (usbd_transfer_pending(sc->xfer[0])) + cv_wait(&sc->cv, &sc->mtx); + mtx_unlock(&sc->mtx); + return (sc->error); +} + static struct bbb_transfer * -bbb_attach(struct usb_device *udev, uint8_t iface_index) +bbb_attach(struct usb_device *udev, uint8_t iface_index, + uint8_t bInterfaceClass) { struct usb_interface *iface; struct usb_interface_descriptor *id; + const struct usb_config *pconfig; struct bbb_transfer *sc; usb_error_t err; + int nconfig; uint8_t do_unlock; /* Prevent re-enumeration */ @@ -528,22 +615,39 @@ bbb_attach(struct usb_device *udev, uint return (NULL); id = iface->idesc; - if (id == NULL || id->bInterfaceClass != UICLASS_MASS) + if (id == NULL || id->bInterfaceClass != bInterfaceClass) return (NULL); - switch (id->bInterfaceSubClass) { - case UISUBCLASS_SCSI: - case UISUBCLASS_UFI: - case UISUBCLASS_SFF8020I: - case UISUBCLASS_SFF8070I: + switch (id->bInterfaceClass) { + case UICLASS_MASS: + switch (id->bInterfaceSubClass) { + case UISUBCLASS_SCSI: + case UISUBCLASS_UFI: + case UISUBCLASS_SFF8020I: + case UISUBCLASS_SFF8070I: + break; + default: + return (NULL); + } + switch (id->bInterfaceProtocol) { + case UIPROTO_MASS_BBB_OLD: + case UIPROTO_MASS_BBB: + break; + default: + return (NULL); + } + pconfig = bbb_config; + nconfig = ST_MAX; break; - default: - return (NULL); - } - - switch (id->bInterfaceProtocol) { - case UIPROTO_MASS_BBB_OLD: - case UIPROTO_MASS_BBB: + case UICLASS_HID: + switch (id->bInterfaceSubClass) { + case 0: + break; + default: + return (NULL); + } + pconfig = bbb_raw_config; + nconfig = 1; break; default: return (NULL); @@ -553,22 +657,27 @@ bbb_attach(struct usb_device *udev, uint mtx_init(&sc->mtx, "USB autoinstall", NULL, MTX_DEF); cv_init(&sc->cv, "WBBB"); - err = usbd_transfer_setup(udev, &iface_index, sc->xfer, bbb_config, - ST_MAX, sc, &sc->mtx); + err = usbd_transfer_setup(udev, &iface_index, sc->xfer, pconfig, + nconfig, sc, &sc->mtx); if (err) { bbb_detach(sc); return (NULL); } - /* store pointer to DMA buffers */ - sc->buffer = usbd_xfer_get_frame_buffer( - sc->xfer[ST_DATA_RD], 0); - sc->buffer_size = - usbd_xfer_max_len(sc->xfer[ST_DATA_RD]); - sc->cbw = usbd_xfer_get_frame_buffer( - sc->xfer[ST_COMMAND], 0); - sc->csw = usbd_xfer_get_frame_buffer( - sc->xfer[ST_STATUS], 0); - + switch (id->bInterfaceClass) { + case UICLASS_MASS: + /* store pointer to DMA buffers */ + sc->buffer = usbd_xfer_get_frame_buffer( + sc->xfer[ST_DATA_RD], 0); + sc->buffer_size = + usbd_xfer_max_len(sc->xfer[ST_DATA_RD]); + sc->cbw = usbd_xfer_get_frame_buffer( + sc->xfer[ST_COMMAND], 0); + sc->csw = usbd_xfer_get_frame_buffer( + sc->xfer[ST_STATUS], 0); + break; + default: + break; + } return (sc); } @@ -597,7 +706,7 @@ usb_iface_is_cdrom(struct usb_device *ud uint8_t sid_type; int err; - sc = bbb_attach(udev, iface_index); + sc = bbb_attach(udev, iface_index, UICLASS_MASS); if (sc == NULL) return (0); @@ -653,7 +762,7 @@ usb_msc_auto_quirk(struct usb_device *ud uint8_t sid_type; int err; - sc = bbb_attach(udev, iface_index); + sc = bbb_attach(udev, iface_index, UICLASS_MASS); if (sc == NULL) return (0); @@ -822,7 +931,7 @@ usb_msc_eject(struct usb_device *udev, u struct bbb_transfer *sc; usb_error_t err; - sc = bbb_attach(udev, iface_index); + sc = bbb_attach(udev, iface_index, UICLASS_MASS); if (sc == NULL) return (USB_ERR_INVAL); @@ -881,3 +990,19 @@ usb_msc_eject(struct usb_device *udev, u bbb_detach(sc); return (0); } + +usb_error_t +usb_dymo_eject(struct usb_device *udev, uint8_t iface_index) +{ + static const uint8_t data[3] = { 0x1b, 0x5a, 0x01 }; + struct bbb_transfer *sc; + usb_error_t err; + + sc = bbb_attach(udev, iface_index, UICLASS_HID); + if (sc == NULL) + return (USB_ERR_INVAL); + err = bbb_raw_write(sc, data, sizeof(data), USB_MS_HZ); + bbb_detach(sc); + return (err); +} + Modified: stable/10/sys/dev/usb/usb_msctest.h ============================================================================== --- stable/10/sys/dev/usb/usb_msctest.h Thu May 21 06:34:06 2015 (r283172) +++ stable/10/sys/dev/usb/usb_msctest.h Thu May 21 06:47:20 2015 (r283173) @@ -43,5 +43,7 @@ usb_error_t usb_msc_eject(struct usb_dev uint8_t iface_index, int method); usb_error_t usb_msc_auto_quirk(struct usb_device *udev, uint8_t iface_index); +usb_error_t usb_dymo_eject(struct usb_device *udev, + uint8_t iface_index); #endif /* _USB_MSCTEST_H_ */ Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Thu May 21 06:34:06 2015 (r283172) +++ stable/10/sys/dev/usb/usbdevs Thu May 21 06:47:20 2015 (r283173) @@ -452,6 +452,7 @@ vendor GLOBESPAN 0x0915 Globespan vendor CONCORDCAMERA 0x0919 Concord Camera vendor GARMIN 0x091e Garmin International vendor GOHUBS 0x0921 GoHubs +vendor DYMO 0x0922 DYMO vendor XEROX 0x0924 Xerox vendor BIOMETRIC 0x0929 American Biometric Company vendor TOSHIBA 0x0930 Toshiba @@ -1670,6 +1671,9 @@ product DRESDENELEKTRONIK WIRELESSHANDHE product DRESDENELEKTRONIK DE_RFNODE 0x001c deRFnode product DRESDENELEKTRONIK LEVELSHIFTERSTICKLOWCOST 0x0022 Levelshifter Stick Low Cost +/* DYMO */ +product DYMO LABELMANAGERPNP 0x1001 DYMO LabelManager PnP + /* Dynastream Innovations */ product DYNASTREAM ANTDEVBOARD 0x1003 ANT dev board product DYNASTREAM ANT2USB 0x1004 ANT2USB From owner-svn-src-all@FreeBSD.ORG Thu May 21 06:53:57 2015 Return-Path: Delivered-To: svn-src-all@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 BA9FBE5F; Thu, 21 May 2015 06:53: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 A6EB11941; Thu, 21 May 2015 06:53: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 t4L6rv6q099130; Thu, 21 May 2015 06:53:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L6rts6099119; Thu, 21 May 2015 06:53:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210653.t4L6rts6099119@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 06:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283174 - in stable/9: share/man/man4 sys/dev/usb sys/dev/usb/quirk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:53:57 -0000 Author: hselasky Date: Thu May 21 06:53:55 2015 New Revision: 283174 URL: https://svnweb.freebsd.org/changeset/base/283174 Log: MFC r282577: Add support for DYMO LabelWriter PnP. Modified: stable/9/share/man/man4/usb_quirk.4 stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/quirk/usb_quirk.h stable/9/sys/dev/usb/usb_device.c stable/9/sys/dev/usb/usb_msctest.c stable/9/sys/dev/usb/usb_msctest.h stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/usb_quirk.4 ============================================================================== --- stable/9/share/man/man4/usb_quirk.4 Thu May 21 06:47:20 2015 (r283173) +++ stable/9/share/man/man4/usb_quirk.4 Thu May 21 06:53:55 2015 (r283174) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd May 7, 2015 .Dt USB_QUIRK 4 .Os .Sh NAME @@ -170,6 +170,9 @@ ejects after Huawei SCSI command .It UQ_MSC_EJECT_TCT ejects after TCT SCSI command .Dv 0x06f504025270 +.It UQ_MSC_DYMO_EJECT +ejects after HID command +.Dv 0x1b5a01 .El .Pp See Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Thu May 21 06:47:20 2015 (r283173) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Thu May 21 06:53:55 2015 (r283174) @@ -522,6 +522,9 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(FEIYA, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(REALTEK, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(INITIO, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), + + /* DYMO LabelManager Pnp */ + USB_QUIRK(DYMO, LABELMANAGERPNP, 0x0000, 0xffff, UQ_MSC_DYMO_EJECT), }; #undef USB_QUIRK_VP #undef USB_QUIRK @@ -592,6 +595,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_BAD_MIDI] = "UQ_BAD_MIDI", [UQ_AU_VENDOR_CLASS] = "UQ_AU_VENDOR_CLASS", [UQ_SINGLE_CMD_MIDI] = "UQ_SINGLE_CMD_MIDI", + [UQ_MSC_DYMO_EJECT] = "UQ_MSC_DYMO_EJECT", }; /*------------------------------------------------------------------------* Modified: stable/9/sys/dev/usb/quirk/usb_quirk.h ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.h Thu May 21 06:47:20 2015 (r283173) +++ stable/9/sys/dev/usb/quirk/usb_quirk.h Thu May 21 06:53:55 2015 (r283174) @@ -109,6 +109,7 @@ enum { UQ_BAD_MIDI, /* device claims MIDI class, but isn't */ UQ_AU_VENDOR_CLASS, /* audio device uses vendor and not audio class */ UQ_SINGLE_CMD_MIDI, /* at most one command per USB packet */ + UQ_MSC_DYMO_EJECT, /* ejects Dymo MSC device */ USB_QUIRK_MAX }; Modified: stable/9/sys/dev/usb/usb_device.c ============================================================================== --- stable/9/sys/dev/usb/usb_device.c Thu May 21 06:47:20 2015 (r283173) +++ stable/9/sys/dev/usb/usb_device.c Thu May 21 06:53:55 2015 (r283174) @@ -1313,6 +1313,12 @@ usb_probe_and_attach(struct usb_device * */ if (iface_index == USB_IFACE_INDEX_ANY) { + if (usb_test_quirk(&uaa, UQ_MSC_DYMO_EJECT) != 0 && + usb_dymo_eject(udev, 0) == 0) { + /* success, mark the udev as disappearing */ + uaa.dev_state = UAA_DEV_EJECTING; + } + EVENTHANDLER_INVOKE(usb_dev_configured, udev, &uaa); if (uaa.dev_state != UAA_DEV_READY) { Modified: stable/9/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/9/sys/dev/usb/usb_msctest.c Thu May 21 06:47:20 2015 (r283173) +++ stable/9/sys/dev/usb/usb_msctest.c Thu May 21 06:53:55 2015 (r283174) @@ -173,6 +173,7 @@ static usb_callback_t bbb_data_rd_cs_cal static usb_callback_t bbb_data_write_callback; static usb_callback_t bbb_data_wr_cs_callback; static usb_callback_t bbb_status_callback; +static usb_callback_t bbb_raw_write_callback; static void bbb_done(struct bbb_transfer *, int); static void bbb_transfer_start(struct bbb_transfer *, uint8_t); @@ -180,7 +181,7 @@ static void bbb_data_clear_stall_callbac uint8_t); static int bbb_command_start(struct bbb_transfer *, uint8_t, uint8_t, void *, size_t, void *, size_t, usb_timeout_t); -static struct bbb_transfer *bbb_attach(struct usb_device *, uint8_t); +static struct bbb_transfer *bbb_attach(struct usb_device *, uint8_t, uint8_t); static void bbb_detach(struct bbb_transfer *); static const struct usb_config bbb_config[ST_MAX] = { @@ -243,6 +244,19 @@ static const struct usb_config bbb_confi }, }; +static const struct usb_config bbb_raw_config[1] = { + + [0] = { + .type = UE_BULK_INTR, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = SCSI_MAX_LEN, + .flags = {.ext_buffer = 1,.proxy_buffer = 1,}, + .callback = &bbb_raw_write_callback, + .timeout = 1 * USB_MS_HZ, /* 1 second */ + }, +}; + static void bbb_done(struct bbb_transfer *sc, int error) { @@ -463,6 +477,47 @@ bbb_status_callback(struct usb_xfer *xfe } } +static void +bbb_raw_write_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct bbb_transfer *sc = usbd_xfer_softc(xfer); + usb_frlength_t max_bulk = usbd_xfer_max_len(xfer); + int actlen, sumlen; + + usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + sc->data_rem -= actlen; + sc->data_ptr += actlen; + sc->actlen += actlen; + + if (actlen < sumlen) { + /* short transfer */ + sc->data_rem = 0; + } + case USB_ST_SETUP: + DPRINTF("max_bulk=%d, data_rem=%d\n", + max_bulk, sc->data_rem); + + if (sc->data_rem == 0) { + bbb_done(sc, 0); + break; + } + if (max_bulk > sc->data_rem) { + max_bulk = sc->data_rem; + } + usbd_xfer_set_timeout(xfer, sc->data_timeout); + usbd_xfer_set_frame_data(xfer, 0, sc->data_ptr, max_bulk); + usbd_transfer_submit(xfer); + break; + + default: /* Error */ + bbb_done(sc, error); + break; + } +} + /*------------------------------------------------------------------------* * bbb_command_start - execute a SCSI command synchronously * @@ -498,13 +553,45 @@ bbb_command_start(struct bbb_transfer *s return (sc->error); } +/*------------------------------------------------------------------------* + * bbb_raw_write - write a raw BULK message synchronously + * + * Return values + * 0: Success + * Else: Failure + *------------------------------------------------------------------------*/ +static int +bbb_raw_write(struct bbb_transfer *sc, const void *data_ptr, size_t data_len, + usb_timeout_t data_timeout) +{ + sc->data_ptr = __DECONST(void *, data_ptr); + sc->data_len = data_len; + sc->data_rem = data_len; + sc->data_timeout = (data_timeout + USB_MS_HZ); + sc->actlen = 0; + sc->error = 0; + + DPRINTFN(1, "BULK DATA = %*D\n", (int)data_len, + (const char *)data_ptr, ":"); + + mtx_lock(&sc->mtx); + usbd_transfer_start(sc->xfer[0]); + while (usbd_transfer_pending(sc->xfer[0])) + cv_wait(&sc->cv, &sc->mtx); + mtx_unlock(&sc->mtx); + return (sc->error); +} + static struct bbb_transfer * -bbb_attach(struct usb_device *udev, uint8_t iface_index) +bbb_attach(struct usb_device *udev, uint8_t iface_index, + uint8_t bInterfaceClass) { struct usb_interface *iface; struct usb_interface_descriptor *id; + const struct usb_config *pconfig; struct bbb_transfer *sc; usb_error_t err; + int nconfig; uint8_t do_unlock; /* Prevent re-enumeration */ @@ -524,22 +611,39 @@ bbb_attach(struct usb_device *udev, uint return (NULL); id = iface->idesc; - if (id == NULL || id->bInterfaceClass != UICLASS_MASS) + if (id == NULL || id->bInterfaceClass != bInterfaceClass) return (NULL); - switch (id->bInterfaceSubClass) { - case UISUBCLASS_SCSI: - case UISUBCLASS_UFI: - case UISUBCLASS_SFF8020I: - case UISUBCLASS_SFF8070I: + switch (id->bInterfaceClass) { + case UICLASS_MASS: + switch (id->bInterfaceSubClass) { + case UISUBCLASS_SCSI: + case UISUBCLASS_UFI: + case UISUBCLASS_SFF8020I: + case UISUBCLASS_SFF8070I: + break; + default: + return (NULL); + } + switch (id->bInterfaceProtocol) { + case UIPROTO_MASS_BBB_OLD: + case UIPROTO_MASS_BBB: + break; + default: + return (NULL); + } + pconfig = bbb_config; + nconfig = ST_MAX; break; - default: - return (NULL); - } - - switch (id->bInterfaceProtocol) { - case UIPROTO_MASS_BBB_OLD: - case UIPROTO_MASS_BBB: + case UICLASS_HID: + switch (id->bInterfaceSubClass) { + case 0: + break; + default: + return (NULL); + } + pconfig = bbb_raw_config; + nconfig = 1; break; default: return (NULL); @@ -549,22 +653,27 @@ bbb_attach(struct usb_device *udev, uint mtx_init(&sc->mtx, "USB autoinstall", NULL, MTX_DEF); cv_init(&sc->cv, "WBBB"); - err = usbd_transfer_setup(udev, &iface_index, sc->xfer, bbb_config, - ST_MAX, sc, &sc->mtx); + err = usbd_transfer_setup(udev, &iface_index, sc->xfer, pconfig, + nconfig, sc, &sc->mtx); if (err) { bbb_detach(sc); return (NULL); } - /* store pointer to DMA buffers */ - sc->buffer = usbd_xfer_get_frame_buffer( - sc->xfer[ST_DATA_RD], 0); - sc->buffer_size = - usbd_xfer_max_len(sc->xfer[ST_DATA_RD]); - sc->cbw = usbd_xfer_get_frame_buffer( - sc->xfer[ST_COMMAND], 0); - sc->csw = usbd_xfer_get_frame_buffer( - sc->xfer[ST_STATUS], 0); - + switch (id->bInterfaceClass) { + case UICLASS_MASS: + /* store pointer to DMA buffers */ + sc->buffer = usbd_xfer_get_frame_buffer( + sc->xfer[ST_DATA_RD], 0); + sc->buffer_size = + usbd_xfer_max_len(sc->xfer[ST_DATA_RD]); + sc->cbw = usbd_xfer_get_frame_buffer( + sc->xfer[ST_COMMAND], 0); + sc->csw = usbd_xfer_get_frame_buffer( + sc->xfer[ST_STATUS], 0); + break; + default: + break; + } return (sc); } @@ -593,7 +702,7 @@ usb_iface_is_cdrom(struct usb_device *ud uint8_t sid_type; int err; - sc = bbb_attach(udev, iface_index); + sc = bbb_attach(udev, iface_index, UICLASS_MASS); if (sc == NULL) return (0); @@ -649,7 +758,7 @@ usb_msc_auto_quirk(struct usb_device *ud uint8_t sid_type; int err; - sc = bbb_attach(udev, iface_index); + sc = bbb_attach(udev, iface_index, UICLASS_MASS); if (sc == NULL) return (0); @@ -818,7 +927,7 @@ usb_msc_eject(struct usb_device *udev, u struct bbb_transfer *sc; usb_error_t err; - sc = bbb_attach(udev, iface_index); + sc = bbb_attach(udev, iface_index, UICLASS_MASS); if (sc == NULL) return (USB_ERR_INVAL); @@ -877,3 +986,19 @@ usb_msc_eject(struct usb_device *udev, u bbb_detach(sc); return (0); } + +usb_error_t +usb_dymo_eject(struct usb_device *udev, uint8_t iface_index) +{ + static const uint8_t data[3] = { 0x1b, 0x5a, 0x01 }; + struct bbb_transfer *sc; + usb_error_t err; + + sc = bbb_attach(udev, iface_index, UICLASS_HID); + if (sc == NULL) + return (USB_ERR_INVAL); + err = bbb_raw_write(sc, data, sizeof(data), USB_MS_HZ); + bbb_detach(sc); + return (err); +} + Modified: stable/9/sys/dev/usb/usb_msctest.h ============================================================================== --- stable/9/sys/dev/usb/usb_msctest.h Thu May 21 06:47:20 2015 (r283173) +++ stable/9/sys/dev/usb/usb_msctest.h Thu May 21 06:53:55 2015 (r283174) @@ -43,5 +43,7 @@ usb_error_t usb_msc_eject(struct usb_dev uint8_t iface_index, int method); usb_error_t usb_msc_auto_quirk(struct usb_device *udev, uint8_t iface_index); +usb_error_t usb_dymo_eject(struct usb_device *udev, + uint8_t iface_index); #endif /* _USB_MSCTEST_H_ */ Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Thu May 21 06:47:20 2015 (r283173) +++ stable/9/sys/dev/usb/usbdevs Thu May 21 06:53:55 2015 (r283174) @@ -452,6 +452,7 @@ vendor GLOBESPAN 0x0915 Globespan vendor CONCORDCAMERA 0x0919 Concord Camera vendor GARMIN 0x091e Garmin International vendor GOHUBS 0x0921 GoHubs +vendor DYMO 0x0922 DYMO vendor XEROX 0x0924 Xerox vendor BIOMETRIC 0x0929 American Biometric Company vendor TOSHIBA 0x0930 Toshiba @@ -1670,6 +1671,9 @@ product DRESDENELEKTRONIK WIRELESSHANDHE product DRESDENELEKTRONIK DE_RFNODE 0x001c deRFnode product DRESDENELEKTRONIK LEVELSHIFTERSTICKLOWCOST 0x0022 Levelshifter Stick Low Cost +/* DYMO */ +product DYMO LABELMANAGERPNP 0x1001 DYMO LabelManager PnP + /* Dynastream Innovations */ product DYNASTREAM ANTDEVBOARD 0x1003 ANT dev board product DYNASTREAM ANT2USB 0x1004 ANT2USB From owner-svn-src-all@FreeBSD.ORG Thu May 21 06:56:35 2015 Return-Path: Delivered-To: svn-src-all@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 E91C624B; Thu, 21 May 2015 06:56: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 D65D11980; Thu, 21 May 2015 06:56: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 t4L6uZsL000165; Thu, 21 May 2015 06:56:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L6uZtE000164; Thu, 21 May 2015 06:56:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210656.t4L6uZtE000164@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 06:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283175 - stable/10/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:56:36 -0000 Author: hselasky Date: Thu May 21 06:56:35 2015 New Revision: 283175 URL: https://svnweb.freebsd.org/changeset/base/283175 Log: MFC r282817: Apply proper locking when iterating the multicast addresses and add a missing check for NULL from a non-blocking "kzalloc()" function call. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Thu May 21 06:53:55 2015 (r283174) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Thu May 21 06:56:35 2015 (r283175) @@ -650,6 +650,7 @@ static void mlx4_en_cache_mclist(struct struct mlx4_en_mc_list *tmp; struct mlx4_en_priv *priv = netdev_priv(dev); + if_maddr_rlock(dev); TAILQ_FOREACH(ifma, &dev->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; @@ -658,10 +659,13 @@ static void mlx4_en_cache_mclist(struct continue; /* Make sure the list didn't grow. */ tmp = kzalloc(sizeof(struct mlx4_en_mc_list), GFP_ATOMIC); + if (tmp == NULL) + break; memcpy(tmp->addr, LLADDR((struct sockaddr_dl *)ifma->ifma_addr), ETH_ALEN); list_add_tail(&tmp->list, &priv->mc_list); } + if_maddr_runlock(dev); } static void update_mclist_flags(struct mlx4_en_priv *priv, From owner-svn-src-all@FreeBSD.ORG Thu May 21 06:57:15 2015 Return-Path: Delivered-To: svn-src-all@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 8335F3A4; Thu, 21 May 2015 06:57: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 6D0A11993; Thu, 21 May 2015 06:57: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 t4L6vFBP000351; Thu, 21 May 2015 06:57:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L6v8jW000310; Thu, 21 May 2015 06:57:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505210657.t4L6v8jW000310@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 06:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283176 - in vendor/llvm/dist: . autoconf cmake docs include/llvm/Config include/llvm/Target lib/Analysis lib/CodeGen lib/CodeGen/SelectionDAG lib/ExecutionEngine/RuntimeDyld lib/IR lib... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:57:15 -0000 Author: dim Date: Thu May 21 06:57:07 2015 New Revision: 283176 URL: https://svnweb.freebsd.org/changeset/base/283176 Log: Vendor import of llvm RELEASE_361/final tag r237755 (effectively, 3.6.1 release): https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_361/final@237755 Added: vendor/llvm/dist/test/Analysis/ScalarEvolution/pr22856.ll vendor/llvm/dist/test/CodeGen/AArch64/implicit-sret.ll vendor/llvm/dist/test/CodeGen/AArch64/machine-copy-prop.ll vendor/llvm/dist/test/CodeGen/AArch64/tailcall-explicit-sret.ll vendor/llvm/dist/test/CodeGen/AArch64/tailcall-implicit-sret.ll vendor/llvm/dist/test/CodeGen/Mips/adjust-callstack-sp.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-small-structures-bigger-than-32bits.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-byte.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-combinations.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-multiple-args.ll vendor/llvm/dist/test/CodeGen/Mips/check-adde-redundant-moves.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/add.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/and.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/ashr.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/lshr.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/or.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/sdiv.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/shl.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/srem.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/sub.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/udiv.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/urem.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/xor.ll vendor/llvm/dist/test/CodeGen/Mips/mips64signextendsesf.ll vendor/llvm/dist/test/CodeGen/Mips/mips64sinttofpsf.ll vendor/llvm/dist/test/CodeGen/Mips/no-odd-spreg-msa.ll vendor/llvm/dist/test/CodeGen/R600/extload-private.ll vendor/llvm/dist/test/CodeGen/R600/fdiv.f64.ll vendor/llvm/dist/test/CodeGen/R600/fmax3.f64.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.flbit.i32.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.fs.interp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.sendmsg-m0.ll vendor/llvm/dist/test/CodeGen/R600/si-annotate-cf.ll vendor/llvm/dist/test/CodeGen/X86/and-load-fold.ll vendor/llvm/dist/test/CodeGen/X86/dag-optnone.ll vendor/llvm/dist/test/CodeGen/X86/getelementptr.ll vendor/llvm/dist/test/CodeGen/X86/lower-vec-shuffle-bug.ll vendor/llvm/dist/test/CodeGen/X86/pr22774.ll vendor/llvm/dist/test/CodeGen/X86/scheduler-backtracking.ll vendor/llvm/dist/test/CodeGen/X86/setcc-combine.ll vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-xfail-mips32r6.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips64/valid-mips64-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64/valid-mips64-xfail.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64/valid-mips64.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2/valid-mips64r2-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2/valid-mips64r2.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2/valid-xfail-mips64r2.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-xfail-mips64r6.txt (contents, props changed) vendor/llvm/dist/test/Transforms/ConstProp/shift.ll vendor/llvm/dist/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcda (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcno (contents, props changed) Deleted: vendor/llvm/dist/test/CodeGen/R600/fdiv64.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.fs.interp.constant.ll vendor/llvm/dist/test/CodeGen/X86/fastmath-optnone.ll Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/cmake/config-ix.cmake vendor/llvm/dist/configure vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/Target/TargetCallingConv.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp vendor/llvm/dist/lib/IR/ConstantFold.cpp vendor/llvm/dist/lib/IR/GCOV.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/Support/Unix/Memory.inc vendor/llvm/dist/lib/Support/Windows/explicit_symbols.inc vendor/llvm/dist/lib/Target/AArch64/AArch64AsmPrinter.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.h vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.td vendor/llvm/dist/lib/Target/AArch64/AArch64MCInstLower.cpp vendor/llvm/dist/lib/Target/AArch64/Utils/AArch64BaseInfo.h vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist/lib/Target/Mips/Disassembler/MipsDisassembler.cpp vendor/llvm/dist/lib/Target/Mips/Mips.td vendor/llvm/dist/lib/Target/Mips/Mips16InstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/Mips32r6InstrInfo.td vendor/llvm/dist/lib/Target/Mips/Mips64InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsCCState.cpp vendor/llvm/dist/lib/Target/Mips/MipsCallingConv.td vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.td vendor/llvm/dist/lib/Target/Mips/MipsSEISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/R600/AMDGPU.td vendor/llvm/dist/lib/Target/R600/AMDGPUAlwaysInlinePass.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUInstrInfo.h vendor/llvm/dist/lib/Target/R600/AMDGPUInstrInfo.td vendor/llvm/dist/lib/Target/R600/AMDGPUInstructions.td vendor/llvm/dist/lib/Target/R600/AMDGPUIntrinsics.td vendor/llvm/dist/lib/Target/R600/AMDGPUSubtarget.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/R600/CaymanInstructions.td vendor/llvm/dist/lib/Target/R600/EvergreenInstructions.td vendor/llvm/dist/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp vendor/llvm/dist/lib/Target/R600/Processors.td vendor/llvm/dist/lib/Target/R600/R600ISelLowering.cpp vendor/llvm/dist/lib/Target/R600/R600Instructions.td vendor/llvm/dist/lib/Target/R600/SIAnnotateControlFlow.cpp vendor/llvm/dist/lib/Target/R600/SIDefines.h vendor/llvm/dist/lib/Target/R600/SIFoldOperands.cpp vendor/llvm/dist/lib/Target/R600/SIISelLowering.cpp vendor/llvm/dist/lib/Target/R600/SIInsertWaits.cpp vendor/llvm/dist/lib/Target/R600/SIInstrFormats.td vendor/llvm/dist/lib/Target/R600/SIInstrInfo.cpp vendor/llvm/dist/lib/Target/R600/SIInstrInfo.h vendor/llvm/dist/lib/Target/R600/SIInstrInfo.td vendor/llvm/dist/lib/Target/R600/SIInstructions.td vendor/llvm/dist/lib/Target/R600/SILowerControlFlow.cpp vendor/llvm/dist/lib/Target/R600/SIRegisterInfo.cpp vendor/llvm/dist/lib/Target/R600/SIRegisterInfo.h vendor/llvm/dist/lib/Target/R600/SIRegisterInfo.td vendor/llvm/dist/lib/Target/R600/VIInstrFormats.td vendor/llvm/dist/lib/Target/R600/VIInstructions.td vendor/llvm/dist/lib/Target/X86/X86FrameLowering.cpp vendor/llvm/dist/lib/Target/X86/X86FrameLowering.h vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrControl.td vendor/llvm/dist/lib/Target/X86/X86IntrinsicsInfo.h vendor/llvm/dist/lib/Transforms/Instrumentation/GCOVProfiling.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRotation.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyIndVar.cpp vendor/llvm/dist/test/CodeGen/AArch64/arm64-tls-dynamics.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-tls-execs.ll vendor/llvm/dist/test/CodeGen/Mips/fcmp.ll vendor/llvm/dist/test/CodeGen/Mips/fmadd1.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/mul.ll vendor/llvm/dist/test/CodeGen/Mips/mips64-f128.ll vendor/llvm/dist/test/CodeGen/R600/128bit-kernel-args.ll vendor/llvm/dist/test/CodeGen/R600/32-bit-local-address-space.ll vendor/llvm/dist/test/CodeGen/R600/64bit-kernel-args.ll vendor/llvm/dist/test/CodeGen/R600/add-debug.ll vendor/llvm/dist/test/CodeGen/R600/add.ll vendor/llvm/dist/test/CodeGen/R600/address-space.ll vendor/llvm/dist/test/CodeGen/R600/and.ll vendor/llvm/dist/test/CodeGen/R600/anyext.ll vendor/llvm/dist/test/CodeGen/R600/atomic_load_add.ll vendor/llvm/dist/test/CodeGen/R600/atomic_load_sub.ll vendor/llvm/dist/test/CodeGen/R600/basic-branch.ll vendor/llvm/dist/test/CodeGen/R600/basic-loop.ll vendor/llvm/dist/test/CodeGen/R600/bfi_int.ll vendor/llvm/dist/test/CodeGen/R600/bitcast.ll vendor/llvm/dist/test/CodeGen/R600/bswap.ll vendor/llvm/dist/test/CodeGen/R600/build_vector.ll vendor/llvm/dist/test/CodeGen/R600/call.ll vendor/llvm/dist/test/CodeGen/R600/call_fs.ll vendor/llvm/dist/test/CodeGen/R600/cf_end.ll vendor/llvm/dist/test/CodeGen/R600/concat_vectors.ll vendor/llvm/dist/test/CodeGen/R600/copy-illegal-type.ll vendor/llvm/dist/test/CodeGen/R600/copy-to-reg.ll vendor/llvm/dist/test/CodeGen/R600/ctlz_zero_undef.ll vendor/llvm/dist/test/CodeGen/R600/cttz-ctlz.ll vendor/llvm/dist/test/CodeGen/R600/cttz_zero_undef.ll vendor/llvm/dist/test/CodeGen/R600/cvt_f32_ubyte.ll vendor/llvm/dist/test/CodeGen/R600/default-fp-mode.ll vendor/llvm/dist/test/CodeGen/R600/ds_read2_offset_order.ll vendor/llvm/dist/test/CodeGen/R600/elf.ll vendor/llvm/dist/test/CodeGen/R600/elf.r600.ll vendor/llvm/dist/test/CodeGen/R600/empty-function.ll vendor/llvm/dist/test/CodeGen/R600/extload.ll vendor/llvm/dist/test/CodeGen/R600/extract_vector_elt_i16.ll vendor/llvm/dist/test/CodeGen/R600/fadd.ll vendor/llvm/dist/test/CodeGen/R600/fadd64.ll vendor/llvm/dist/test/CodeGen/R600/fceil.ll vendor/llvm/dist/test/CodeGen/R600/fcmp64.ll vendor/llvm/dist/test/CodeGen/R600/fconst64.ll vendor/llvm/dist/test/CodeGen/R600/fdiv.ll vendor/llvm/dist/test/CodeGen/R600/ffloor.ll vendor/llvm/dist/test/CodeGen/R600/flat-address-space.ll vendor/llvm/dist/test/CodeGen/R600/fma.f64.ll vendor/llvm/dist/test/CodeGen/R600/fmax3.ll vendor/llvm/dist/test/CodeGen/R600/fmaxnum.f64.ll vendor/llvm/dist/test/CodeGen/R600/fmaxnum.ll vendor/llvm/dist/test/CodeGen/R600/fmin3.ll vendor/llvm/dist/test/CodeGen/R600/fminnum.f64.ll vendor/llvm/dist/test/CodeGen/R600/fminnum.ll vendor/llvm/dist/test/CodeGen/R600/fmul.ll vendor/llvm/dist/test/CodeGen/R600/fmul64.ll vendor/llvm/dist/test/CodeGen/R600/fnearbyint.ll vendor/llvm/dist/test/CodeGen/R600/fneg-fabs.f64.ll vendor/llvm/dist/test/CodeGen/R600/fneg-fabs.ll vendor/llvm/dist/test/CodeGen/R600/fp-classify.ll vendor/llvm/dist/test/CodeGen/R600/fp16_to_fp.ll vendor/llvm/dist/test/CodeGen/R600/fp32_to_fp16.ll vendor/llvm/dist/test/CodeGen/R600/fp_to_sint.ll vendor/llvm/dist/test/CodeGen/R600/fp_to_uint.ll vendor/llvm/dist/test/CodeGen/R600/fpext.ll vendor/llvm/dist/test/CodeGen/R600/fptrunc.ll vendor/llvm/dist/test/CodeGen/R600/frem.ll vendor/llvm/dist/test/CodeGen/R600/fsqrt.ll vendor/llvm/dist/test/CodeGen/R600/fsub.ll vendor/llvm/dist/test/CodeGen/R600/fsub64.ll vendor/llvm/dist/test/CodeGen/R600/ftrunc.ll vendor/llvm/dist/test/CodeGen/R600/global-directive.ll vendor/llvm/dist/test/CodeGen/R600/global-extload-i1.ll vendor/llvm/dist/test/CodeGen/R600/global-extload-i16.ll vendor/llvm/dist/test/CodeGen/R600/global-extload-i32.ll vendor/llvm/dist/test/CodeGen/R600/global-extload-i8.ll vendor/llvm/dist/test/CodeGen/R600/global-zero-initializer.ll vendor/llvm/dist/test/CodeGen/R600/half.ll vendor/llvm/dist/test/CodeGen/R600/i1-copy-implicit-def.ll vendor/llvm/dist/test/CodeGen/R600/i1-copy-phi.ll vendor/llvm/dist/test/CodeGen/R600/icmp64.ll vendor/llvm/dist/test/CodeGen/R600/indirect-addressing-si.ll vendor/llvm/dist/test/CodeGen/R600/indirect-private-64.ll vendor/llvm/dist/test/CodeGen/R600/infinite-loop.ll vendor/llvm/dist/test/CodeGen/R600/inline-asm.ll vendor/llvm/dist/test/CodeGen/R600/inline-calls.ll vendor/llvm/dist/test/CodeGen/R600/input-mods.ll vendor/llvm/dist/test/CodeGen/R600/insert_subreg.ll vendor/llvm/dist/test/CodeGen/R600/insert_vector_elt.ll vendor/llvm/dist/test/CodeGen/R600/kernel-args.ll vendor/llvm/dist/test/CodeGen/R600/large-alloca.ll vendor/llvm/dist/test/CodeGen/R600/large-constant-initializer.ll vendor/llvm/dist/test/CodeGen/R600/lds-initializer.ll vendor/llvm/dist/test/CodeGen/R600/lds-zero-initializer.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.abs.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.bfe.i32.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.bfe.u32.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.bfi.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.bfm.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.brev.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.clamp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.cvt_f32_ubyte.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.div_fmas.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.div_scale.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.fract.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.imad24.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.imax.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.imin.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.imul24.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.kill.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.ldexp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.rcp.f64.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.rcp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.rsq.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.trig_preop.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.trunc.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.umax.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.umin.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.umul24.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.gather4.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.getlod.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.image.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.image.sample.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.image.sample.o.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.imageload.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.load.dword.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.resinfo.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.sample-masked.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.sample.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.sampled.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.sendmsg.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.tbuffer.store.ll vendor/llvm/dist/test/CodeGen/R600/llvm.amdgpu.kilp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.amdgpu.lrp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.cos.ll vendor/llvm/dist/test/CodeGen/R600/llvm.exp2.ll vendor/llvm/dist/test/CodeGen/R600/llvm.log2.ll vendor/llvm/dist/test/CodeGen/R600/llvm.memcpy.ll vendor/llvm/dist/test/CodeGen/R600/llvm.rint.ll vendor/llvm/dist/test/CodeGen/R600/llvm.sin.ll vendor/llvm/dist/test/CodeGen/R600/llvm.sqrt.ll vendor/llvm/dist/test/CodeGen/R600/load-i1.ll vendor/llvm/dist/test/CodeGen/R600/load.ll vendor/llvm/dist/test/CodeGen/R600/load.vec.ll vendor/llvm/dist/test/CodeGen/R600/load64.ll vendor/llvm/dist/test/CodeGen/R600/local-memory-two-objects.ll vendor/llvm/dist/test/CodeGen/R600/loop-idiom.ll vendor/llvm/dist/test/CodeGen/R600/lshl.ll vendor/llvm/dist/test/CodeGen/R600/lshr.ll vendor/llvm/dist/test/CodeGen/R600/m0-spill.ll vendor/llvm/dist/test/CodeGen/R600/mad_int24.ll vendor/llvm/dist/test/CodeGen/R600/mad_uint24.ll vendor/llvm/dist/test/CodeGen/R600/mul.ll vendor/llvm/dist/test/CodeGen/R600/mul_int24.ll vendor/llvm/dist/test/CodeGen/R600/mul_uint24.ll vendor/llvm/dist/test/CodeGen/R600/mulhu.ll vendor/llvm/dist/test/CodeGen/R600/no-initializer-constant-addrspace.ll vendor/llvm/dist/test/CodeGen/R600/or.ll vendor/llvm/dist/test/CodeGen/R600/private-memory-atomics.ll vendor/llvm/dist/test/CodeGen/R600/private-memory-broken.ll vendor/llvm/dist/test/CodeGen/R600/r600-encoding.ll vendor/llvm/dist/test/CodeGen/R600/reorder-stores.ll vendor/llvm/dist/test/CodeGen/R600/rotl.i64.ll vendor/llvm/dist/test/CodeGen/R600/rotl.ll vendor/llvm/dist/test/CodeGen/R600/rotr.i64.ll vendor/llvm/dist/test/CodeGen/R600/rotr.ll vendor/llvm/dist/test/CodeGen/R600/s_movk_i32.ll vendor/llvm/dist/test/CodeGen/R600/saddo.ll vendor/llvm/dist/test/CodeGen/R600/scalar_to_vector.ll vendor/llvm/dist/test/CodeGen/R600/schedule-kernel-arg-loads.ll vendor/llvm/dist/test/CodeGen/R600/schedule-vs-if-nested-loop-failure.ll vendor/llvm/dist/test/CodeGen/R600/sdiv.ll vendor/llvm/dist/test/CodeGen/R600/sdivrem24.ll vendor/llvm/dist/test/CodeGen/R600/select-i1.ll vendor/llvm/dist/test/CodeGen/R600/select-vectors.ll vendor/llvm/dist/test/CodeGen/R600/select64.ll vendor/llvm/dist/test/CodeGen/R600/selectcc-opt.ll vendor/llvm/dist/test/CodeGen/R600/selectcc.ll vendor/llvm/dist/test/CodeGen/R600/setcc64.ll vendor/llvm/dist/test/CodeGen/R600/seto.ll vendor/llvm/dist/test/CodeGen/R600/setuo.ll vendor/llvm/dist/test/CodeGen/R600/sgpr-copy-duplicate-operand.ll vendor/llvm/dist/test/CodeGen/R600/sgpr-copy.ll vendor/llvm/dist/test/CodeGen/R600/shl.ll vendor/llvm/dist/test/CodeGen/R600/shl_add_ptr.ll vendor/llvm/dist/test/CodeGen/R600/si-annotate-cf-assertion.ll vendor/llvm/dist/test/CodeGen/R600/si-lod-bias.ll vendor/llvm/dist/test/CodeGen/R600/si-sgpr-spill.ll vendor/llvm/dist/test/CodeGen/R600/si-vector-hang.ll vendor/llvm/dist/test/CodeGen/R600/sign_extend.ll vendor/llvm/dist/test/CodeGen/R600/simplify-demanded-bits-build-pair.ll vendor/llvm/dist/test/CodeGen/R600/sint_to_fp.ll vendor/llvm/dist/test/CodeGen/R600/sra.ll vendor/llvm/dist/test/CodeGen/R600/srem.ll vendor/llvm/dist/test/CodeGen/R600/ssubo.ll vendor/llvm/dist/test/CodeGen/R600/store-v3i32.ll vendor/llvm/dist/test/CodeGen/R600/store-v3i64.ll vendor/llvm/dist/test/CodeGen/R600/store-vector-ptrs.ll vendor/llvm/dist/test/CodeGen/R600/store.ll vendor/llvm/dist/test/CodeGen/R600/store.r600.ll vendor/llvm/dist/test/CodeGen/R600/subreg-coalescer-crash.ll vendor/llvm/dist/test/CodeGen/R600/swizzle-export.ll vendor/llvm/dist/test/CodeGen/R600/trunc-cmp-constant.ll vendor/llvm/dist/test/CodeGen/R600/trunc-store-i1.ll vendor/llvm/dist/test/CodeGen/R600/trunc.ll vendor/llvm/dist/test/CodeGen/R600/uaddo.ll vendor/llvm/dist/test/CodeGen/R600/udiv.ll vendor/llvm/dist/test/CodeGen/R600/udivrem.ll vendor/llvm/dist/test/CodeGen/R600/udivrem24.ll vendor/llvm/dist/test/CodeGen/R600/udivrem64.ll vendor/llvm/dist/test/CodeGen/R600/uint_to_fp.ll vendor/llvm/dist/test/CodeGen/R600/unaligned-load-store.ll vendor/llvm/dist/test/CodeGen/R600/unhandled-loop-condition-assertion.ll vendor/llvm/dist/test/CodeGen/R600/urecip.ll vendor/llvm/dist/test/CodeGen/R600/urem.ll vendor/llvm/dist/test/CodeGen/R600/usubo.ll vendor/llvm/dist/test/CodeGen/R600/v_cndmask.ll vendor/llvm/dist/test/CodeGen/R600/vector-alloca.ll vendor/llvm/dist/test/CodeGen/R600/vertex-fetch-encoding.ll vendor/llvm/dist/test/CodeGen/R600/vop-shrink.ll vendor/llvm/dist/test/CodeGen/R600/vselect.ll vendor/llvm/dist/test/CodeGen/R600/wait.ll vendor/llvm/dist/test/CodeGen/R600/xor.ll vendor/llvm/dist/test/CodeGen/R600/zero_extend.ll vendor/llvm/dist/test/CodeGen/X86/avx-vperm2x128.ll vendor/llvm/dist/test/CodeGen/X86/avx2-intrinsics-x86.ll vendor/llvm/dist/test/CodeGen/X86/inalloca-stdcall.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-512-v8.ll vendor/llvm/dist/test/CodeGen/X86/win64_alloca_dynalloca.ll vendor/llvm/dist/test/CodeGen/X86/win_chkstk.ll vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s vendor/llvm/dist/test/MC/Disassembler/Mips/mips1/valid-mips1-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips1/valid-mips1.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips1/valid-xfail.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips2/valid-mips2-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips2/valid-mips2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips3/valid-mips3-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips3/valid-mips3.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32/valid-mips32-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32/valid-mips32.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32/valid-xfail-mips32.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2/valid-mips32r2-le.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2/valid-mips32r2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2/valid-xfail-mips32r2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips4/valid-mips4-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips4/valid-mips4.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips4/valid-xfail-mips4.txt vendor/llvm/dist/test/MC/ELF/uleb.s vendor/llvm/dist/test/MC/Mips/mips-abi-bad.s vendor/llvm/dist/test/MC/Mips/mips4/invalid-mips64r2.s vendor/llvm/dist/test/MC/Mips/mips4/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips4/valid.s vendor/llvm/dist/test/MC/Mips/mips5/invalid-mips64r2.s vendor/llvm/dist/test/MC/Mips/mips5/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips5/valid.s vendor/llvm/dist/test/MC/Mips/mips64/invalid-mips64r2.s vendor/llvm/dist/test/MC/Mips/mips64/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips64/valid.s vendor/llvm/dist/test/MC/Mips/mips64r2/abi-bad.s vendor/llvm/dist/test/MC/Mips/mips64r2/valid-xfail.s vendor/llvm/dist/test/Transforms/GCOVProfiling/return-block.ll vendor/llvm/dist/test/Transforms/GVN/edge.ll vendor/llvm/dist/test/Transforms/LoopRotate/crash.ll vendor/llvm/dist/test/tools/llvm-cov/llvm-cov.test vendor/llvm/dist/utils/release/tag.sh Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/CMakeLists.txt Thu May 21 06:57:07 2015 (r283176) @@ -48,7 +48,7 @@ set(CMAKE_MODULE_PATH set(LLVM_VERSION_MAJOR 3) set(LLVM_VERSION_MINOR 6) -set(LLVM_VERSION_PATCH 0) +set(LLVM_VERSION_PATCH 1) if (NOT PACKAGE_VERSION) set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}") Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/autoconf/configure.ac Thu May 21 06:57:07 2015 (r283176) @@ -32,11 +32,11 @@ dnl===---------------------------------- dnl Initialize autoconf and define the package name, version number and dnl address for reporting bugs. -AC_INIT([LLVM],[3.6.0],[http://llvm.org/bugs/]) +AC_INIT([LLVM],[3.6.1],[http://llvm.org/bugs/]) LLVM_VERSION_MAJOR=3 LLVM_VERSION_MINOR=6 -LLVM_VERSION_PATCH=0 +LLVM_VERSION_PATCH=1 LLVM_VERSION_SUFFIX= AC_DEFINE_UNQUOTED([LLVM_VERSION_MAJOR], $LLVM_VERSION_MAJOR, [Major version of the LLVM API]) @@ -1714,7 +1714,9 @@ if test "$llvm_cv_os_type" = "MingW" ; t AC_CHECK_LIB(gcc,_alloca,AC_DEFINE([HAVE__ALLOCA],[1],[Have host's _alloca])) AC_CHECK_LIB(gcc,__alloca,AC_DEFINE([HAVE___ALLOCA],[1],[Have host's __alloca])) AC_CHECK_LIB(gcc,__chkstk,AC_DEFINE([HAVE___CHKSTK],[1],[Have host's __chkstk])) + AC_CHECK_LIB(gcc,__chkstk_ms,AC_DEFINE([HAVE___CHKSTK_MS],[1],[Have host's __chkstk_ms])) AC_CHECK_LIB(gcc,___chkstk,AC_DEFINE([HAVE____CHKSTK],[1],[Have host's ___chkstk])) + AC_CHECK_LIB(gcc,___chkstk_ms,AC_DEFINE([HAVE____CHKSTK_MS],[1],[Have host's ___chkstk_ms])) AC_CHECK_LIB(gcc,__ashldi3,AC_DEFINE([HAVE___ASHLDI3],[1],[Have host's __ashldi3])) AC_CHECK_LIB(gcc,__ashrdi3,AC_DEFINE([HAVE___ASHRDI3],[1],[Have host's __ashrdi3])) Modified: vendor/llvm/dist/cmake/config-ix.cmake ============================================================================== --- vendor/llvm/dist/cmake/config-ix.cmake Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/cmake/config-ix.cmake Thu May 21 06:57:07 2015 (r283176) @@ -198,7 +198,9 @@ if( PURE_WINDOWS ) check_function_exists(_alloca HAVE__ALLOCA) check_function_exists(__alloca HAVE___ALLOCA) check_function_exists(__chkstk HAVE___CHKSTK) + check_function_exists(__chkstk_ms HAVE___CHKSTK_MS) check_function_exists(___chkstk HAVE____CHKSTK) + check_function_exists(___chkstk_ms HAVE____CHKSTK_MS) check_function_exists(__ashldi3 HAVE___ASHLDI3) check_function_exists(__ashrdi3 HAVE___ASHRDI3) Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/configure Thu May 21 06:57:07 2015 (r283176) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for LLVM 3.6.0. +# Generated by GNU Autoconf 2.60 for LLVM 3.6.1. # # Report bugs to . # @@ -561,8 +561,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='LLVM' PACKAGE_TARNAME='llvm' -PACKAGE_VERSION='3.6.0' -PACKAGE_STRING='LLVM 3.6.0' +PACKAGE_VERSION='3.6.1' +PACKAGE_STRING='LLVM 3.6.1' PACKAGE_BUGREPORT='http://llvm.org/bugs/' ac_unique_file="lib/IR/Module.cpp" @@ -1314,7 +1314,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures LLVM 3.6.0 to adapt to many kinds of systems. +\`configure' configures LLVM 3.6.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1380,7 +1380,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of LLVM 3.6.0:";; + short | recursive ) echo "Configuration of LLVM 3.6.1:";; esac cat <<\_ACEOF @@ -1550,7 +1550,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -LLVM configure 3.6.0 +LLVM configure 3.6.1 generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1566,7 +1566,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by LLVM $as_me 3.6.0, which was +It was created by LLVM $as_me 3.6.1, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -1922,7 +1922,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu LLVM_VERSION_MAJOR=3 LLVM_VERSION_MINOR=6 -LLVM_VERSION_PATCH=0 +LLVM_VERSION_PATCH=1 LLVM_VERSION_SUFFIX= @@ -15438,6 +15438,91 @@ _ACEOF fi + { echo "$as_me:$LINENO: checking for __chkstk_ms in -lgcc" >&5 +echo $ECHO_N "checking for __chkstk_ms in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___chkstk_ms+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __chkstk_ms (); +int +main () +{ +return __chkstk_ms (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___chkstk_ms=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___chkstk_ms=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___chkstk_ms" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___chkstk_ms" >&6; } +if test $ac_cv_lib_gcc___chkstk_ms = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___CHKSTK_MS 1 +_ACEOF + +fi + { echo "$as_me:$LINENO: checking for ___chkstk in -lgcc" >&5 echo $ECHO_N "checking for ___chkstk in -lgcc... $ECHO_C" >&6; } if test "${ac_cv_lib_gcc____chkstk+set}" = set; then @@ -15523,6 +15608,91 @@ _ACEOF fi + { echo "$as_me:$LINENO: checking for ___chkstk_ms in -lgcc" >&5 +echo $ECHO_N "checking for ___chkstk_ms in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc____chkstk_ms+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ___chkstk_ms (); +int +main () +{ +return ___chkstk_ms (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc____chkstk_ms=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc____chkstk_ms=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc____chkstk_ms" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc____chkstk_ms" >&6; } +if test $ac_cv_lib_gcc____chkstk_ms = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE____CHKSTK_MS 1 +_ACEOF + +fi + { echo "$as_me:$LINENO: checking for __ashldi3 in -lgcc" >&5 echo $ECHO_N "checking for __ashldi3 in -lgcc... $ECHO_C" >&6; } @@ -18901,7 +19071,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by LLVM $as_me 3.6.0, which was +This file was extended by LLVM $as_me 3.6.1, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18954,7 +19124,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -LLVM config.status 3.6.0 +LLVM config.status 3.6.1 configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Thu May 21 06:57:07 2015 (r283176) @@ -25,6 +25,31 @@ them. Non-comprehensive list of changes in this release ================================================= +Changes to the MIPS Target +-------------------------- + +* Added support for 128-bit integers on 64-bit targets. + +* Fixed some remaining N32/N64 calling convention bugs when using small + structures on big-endian targets. + +* Fixed missing sign-extensions that are required by the N32/N64 calling + convention when generating calls to library functions with 32-bit parameters. + +* ``-mno-odd-spreg`` is now honoured for vector insertion/extraction operations + when using ``-mmsa``. + +* Corrected the representation of member function pointers. This makes them + usable on microMIPS targets. + +* Fixed multiple segfaults and assertions in the disassembler when + disassembling instructions that have memory operands. + +* Fixed multiple cases of suboptimal code generation involving ``$zero``. + +Non-comprehensive list of changes in 3.6.0 +========================================== + .. NOTE For small 1-3 sentence descriptions, just add an entry at the end of this list. If your description won't fit comfortably in one bullet Modified: vendor/llvm/dist/include/llvm/Config/config.h.cmake ============================================================================== --- vendor/llvm/dist/include/llvm/Config/config.h.cmake Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/include/llvm/Config/config.h.cmake Thu May 21 06:57:07 2015 (r283176) @@ -423,6 +423,9 @@ /* Have host's __chkstk */ #cmakedefine HAVE___CHKSTK ${HAVE___CHKSTK} +/* Have host's __chkstk_ms */ +#cmakedefine HAVE___CHKSTK_MS ${HAVE___CHKSTK_MS} + /* Have host's __cmpdi2 */ #cmakedefine HAVE___CMPDI2 ${HAVE___CMPDI2} @@ -459,6 +462,9 @@ /* Have host's ___chkstk */ #cmakedefine HAVE____CHKSTK ${HAVE____CHKSTK} +/* Have host's ___chkstk_ms */ +#cmakedefine HAVE____CHKSTK_MS ${HAVE____CHKSTK_MS} + /* Define if we link Polly to the tools */ #cmakedefine LINK_POLLY_INTO_TOOLS Modified: vendor/llvm/dist/include/llvm/Config/config.h.in ============================================================================== --- vendor/llvm/dist/include/llvm/Config/config.h.in Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/include/llvm/Config/config.h.in Thu May 21 06:57:07 2015 (r283176) @@ -420,6 +420,9 @@ /* Have host's __chkstk */ #undef HAVE___CHKSTK +/* Have host's __chkstk_ms */ +#undef HAVE___CHKSTK_MS + /* Have host's __cmpdi2 */ #undef HAVE___CMPDI2 @@ -456,6 +459,9 @@ /* Have host's ___chkstk */ #undef HAVE____CHKSTK +/* Have host's ___chkstk_ms */ +#undef HAVE____CHKSTK_MS + /* Linker version detected at compile time. */ #undef HOST_LINK_VERSION Modified: vendor/llvm/dist/include/llvm/Target/TargetCallingConv.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetCallingConv.h Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/include/llvm/Target/TargetCallingConv.h Thu May 21 06:57:07 2015 (r283176) @@ -134,6 +134,8 @@ namespace ISD { /// Index original Function's argument. unsigned OrigArgIndex; + /// Sentinel value for implicit machine-level input arguments. + static const unsigned NoArgIndex = UINT_MAX; /// Offset in bytes of current input value relative to the beginning of /// original argument. E.g. if argument was splitted into four 32 bit @@ -147,6 +149,15 @@ namespace ISD { VT = vt.getSimpleVT(); ArgVT = argvt; } + + bool isOrigArg() const { + return OrigArgIndex != NoArgIndex; + } + + unsigned getOrigArgIndex() const { + assert(OrigArgIndex != NoArgIndex && "Implicit machine-level argument"); + return OrigArgIndex; + } }; /// OutputArg - This struct carries flags and a value for a Modified: vendor/llvm/dist/include/llvm/Target/TargetLowering.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetLowering.h Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/include/llvm/Target/TargetLowering.h Thu May 21 06:57:07 2015 (r283176) @@ -2806,6 +2806,11 @@ public: virtual bool useLoadStackGuardNode() const { return false; } + + /// Returns true if arguments should be sign-extended in lib calls. + virtual bool shouldSignExtendTypeInLibCall(EVT Type, bool IsSigned) const { + return IsSigned; + } }; /// Given an LLVM IR type and return type attributes, compute the return value Modified: vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp Thu May 21 06:57:07 2015 (r283176) @@ -1776,9 +1776,12 @@ unsigned SCEVExpander::replaceCongruentI << *IsomorphicInc << '\n'); Value *NewInc = OrigInc; if (OrigInc->getType() != IsomorphicInc->getType()) { - Instruction *IP = isa(OrigInc) - ? (Instruction*)L->getHeader()->getFirstInsertionPt() - : OrigInc->getNextNode(); + Instruction *IP = nullptr; + if (PHINode *PN = dyn_cast(OrigInc)) + IP = PN->getParent()->getFirstInsertionPt(); + else + IP = OrigInc->getNextNode(); + IRBuilder<> Builder(IP); Builder.SetCurrentDebugLocation(IsomorphicInc->getDebugLoc()); NewInc = Builder. Modified: vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp Thu May 21 06:57:07 2015 (r283176) @@ -75,10 +75,9 @@ MachineCopyPropagation::SourceNoLongerAv I != E; ++I) { unsigned MappedDef = *I; // Source of copy is no longer available for propagation. - if (AvailCopyMap.erase(MappedDef)) { - for (MCSubRegIterator SR(MappedDef, TRI); SR.isValid(); ++SR) - AvailCopyMap.erase(*SR); - } + AvailCopyMap.erase(MappedDef); + for (MCSubRegIterator SR(MappedDef, TRI); SR.isValid(); ++SR) + AvailCopyMap.erase(*SR); } } } Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu May 21 06:57:07 2015 (r283176) @@ -1160,13 +1160,6 @@ void DAGCombiner::Run(CombineLevel AtLev LegalOperations = Level >= AfterLegalizeVectorOps; LegalTypes = Level >= AfterLegalizeTypes; - // Early exit if this basic block is in an optnone function. - AttributeSet FnAttrs = - DAG.getMachineFunction().getFunction()->getAttributes(); - if (FnAttrs.hasAttribute(AttributeSet::FunctionIndex, - Attribute::OptimizeNone)) - return; - // Add all the dag nodes to the worklist. for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(), E = DAG.allnodes_end(); I != E; ++I) @@ -2788,9 +2781,13 @@ SDValue DAGCombiner::visitAND(SDNode *N) SplatBitSize = SplatBitSize * 2) SplatValue |= SplatValue.shl(SplatBitSize); - Constant = APInt::getAllOnesValue(BitWidth); - for (unsigned i = 0, n = SplatBitSize/BitWidth; i < n; ++i) - Constant &= SplatValue.lshr(i*BitWidth).zextOrTrunc(BitWidth); + // Make sure that variable 'Constant' is only set if 'SplatBitSize' is a + // multiple of 'BitWidth'. Otherwise, we could propagate a wrong value. + if (SplatBitSize % BitWidth == 0) { + Constant = APInt::getAllOnesValue(BitWidth); + for (unsigned i = 0, n = SplatBitSize/BitWidth; i < n; ++i) + Constant &= SplatValue.lshr(i*BitWidth).zextOrTrunc(BitWidth); + } } } @@ -11043,7 +11040,9 @@ SDValue DAGCombiner::visitBUILD_VECTOR(S } else if (VecInT.getSizeInBits() == VT.getSizeInBits() * 2) { // If the input vector is too large, try to split it. // We don't support having two input vectors that are too large. - if (VecIn2.getNode()) + // If the zero vector was used, we can not split the vector, + // since we'd need 3 inputs. + if (UsesZeroVector || VecIn2.getNode()) return SDValue(); if (!TLI.isExtractSubvectorCheap(VT, VT.getVectorNumElements())) @@ -11055,7 +11054,6 @@ SDValue DAGCombiner::visitBUILD_VECTOR(S DAG.getConstant(VT.getVectorNumElements(), TLI.getVectorIdxTy())); VecIn1 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, VT, VecIn1, DAG.getConstant(0, TLI.getVectorIdxTy())); - UsesZeroVector = false; } else return SDValue(); } Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp Thu May 21 06:57:07 2015 (r283176) @@ -497,7 +497,7 @@ bool FastISel::selectGetElementPtr(const OI != E; ++OI) { const Value *Idx = *OI; if (auto *StTy = dyn_cast(Ty)) { - unsigned Field = cast(Idx)->getZExtValue(); + uint64_t Field = cast(Idx)->getZExtValue(); if (Field) { // N = N + Offset TotalOffs += DL.getStructLayout(StTy)->getElementOffset(Field); @@ -518,8 +518,8 @@ bool FastISel::selectGetElementPtr(const if (CI->isZero()) continue; // N = N + Offset - TotalOffs += - DL.getTypeAllocSize(Ty) * cast(CI)->getSExtValue(); + uint64_t IdxN = CI->getValue().sextOrTrunc(64).getSExtValue(); + TotalOffs += DL.getTypeAllocSize(Ty) * IdxN; if (TotalOffs >= MaxOffs) { N = fastEmit_ri_(VT, ISD::ADD, N, NIsKill, TotalOffs, VT); if (!N) // Unhandled operand. Halt "fast" selection and bail. Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp Thu May 21 06:57:07 2015 (r283176) @@ -658,7 +658,7 @@ SDValue DAGTypeLegalizer::SoftenFloatRes NVT, N->getOperand(0)); return TLI.makeLibCall(DAG, LC, TLI.getTypeToTransformTo(*DAG.getContext(), RVT), - &Op, 1, false, dl).first; + &Op, 1, Signed, dl).first; } Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Thu May 21 06:57:07 2015 (r283176) @@ -1423,9 +1423,10 @@ SUnit *ScheduleDAGRRList::PickNodeToSche // If one or more successors has been unscheduled, then the current // node is no longer available. - if (!TrySU->isAvailable) + if (!TrySU->isAvailable || !TrySU->NodeQueueId) CurSU = AvailableQueue->pop(); else { + // Available and in AvailableQueue AvailableQueue->remove(TrySU); CurSU = TrySU; } Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Thu May 21 06:57:07 2015 (r283176) @@ -3399,30 +3399,21 @@ void SelectionDAGBuilder::visitGetElemen Ty = StTy->getElementType(Field); } else { Ty = cast(Ty)->getElementType(); + MVT PtrTy = DAG.getTargetLoweringInfo().getPointerTy(AS); + unsigned PtrSize = PtrTy.getSizeInBits(); + APInt ElementSize(PtrSize, DL->getTypeAllocSize(Ty)); // If this is a constant subscript, handle it quickly. - const TargetLowering &TLI = DAG.getTargetLoweringInfo(); - if (const ConstantInt *CI = dyn_cast(Idx)) { - if (CI->isZero()) continue; - uint64_t Offs = - DL->getTypeAllocSize(Ty)*cast(CI)->getSExtValue(); - SDValue OffsVal; - EVT PTy = TLI.getPointerTy(AS); - unsigned PtrBits = PTy.getSizeInBits(); - if (PtrBits < 64) - OffsVal = DAG.getNode(ISD::TRUNCATE, getCurSDLoc(), PTy, - DAG.getConstant(Offs, MVT::i64)); - else - OffsVal = DAG.getConstant(Offs, PTy); - - N = DAG.getNode(ISD::ADD, getCurSDLoc(), N.getValueType(), N, - OffsVal); + if (const auto *CI = dyn_cast(Idx)) { + if (CI->isZero()) + continue; + APInt Offs = ElementSize * CI->getValue().sextOrTrunc(PtrSize); + SDValue OffsVal = DAG.getConstant(Offs, PtrTy); + N = DAG.getNode(ISD::ADD, getCurSDLoc(), N.getValueType(), N, OffsVal); continue; } // N = N + Idx * ElementSize; - APInt ElementSize = - APInt(TLI.getPointerSizeInBits(AS), DL->getTypeAllocSize(Ty)); SDValue IdxN = getValue(Idx); // If the index is smaller or larger than intptr_t, truncate or extend @@ -5727,6 +5718,11 @@ void SelectionDAGBuilder::LowerCallTo(Im // Skip the first return-type Attribute to get to params. Entry.setAttributes(&CS, i - CS.arg_begin() + 1); Args.push_back(Entry); + + // If we have an explicit sret argument that is an Instruction, (i.e., it + // might point to function-local memory), we can't meaningfully tail-call. + if (Entry.isSRet && isa(V)) + isTailCall = false; } // Check if target-independent constraints permit a tail call here. @@ -7353,6 +7349,10 @@ TargetLowering::LowerCallTo(TargetLoweri Entry.Alignment = Align; CLI.getArgs().insert(CLI.getArgs().begin(), Entry); CLI.RetTy = Type::getVoidTy(CLI.RetTy->getContext()); + + // sret demotion isn't compatible with tail-calls, since the sret argument + // points into the callers stack frame. + CLI.IsTailCall = false; } else { for (unsigned I = 0, E = RetTys.size(); I != E; ++I) { EVT VT = RetTys[I]; @@ -7638,7 +7638,8 @@ void SelectionDAGISel::LowerArguments(co ISD::ArgFlagsTy Flags; Flags.setSRet(); MVT RegisterVT = TLI->getRegisterType(*DAG.getContext(), ValueVTs[0]); - ISD::InputArg RetArg(Flags, RegisterVT, ValueVTs[0], true, 0, 0); + ISD::InputArg RetArg(Flags, RegisterVT, ValueVTs[0], true, + ISD::InputArg::NoArgIndex, 0); Ins.push_back(RetArg); } Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp Thu May 21 06:57:07 2015 (r283176) @@ -96,18 +96,19 @@ TargetLowering::makeLibCall(SelectionDAG for (unsigned i = 0; i != NumOps; ++i) { Entry.Node = Ops[i]; Entry.Ty = Entry.Node.getValueType().getTypeForEVT(*DAG.getContext()); - Entry.isSExt = isSigned; - Entry.isZExt = !isSigned; + Entry.isSExt = shouldSignExtendTypeInLibCall(Ops[i].getValueType(), isSigned); + Entry.isZExt = !shouldSignExtendTypeInLibCall(Ops[i].getValueType(), isSigned); Args.push_back(Entry); } SDValue Callee = DAG.getExternalSymbol(getLibcallName(LC), getPointerTy()); Type *RetTy = RetVT.getTypeForEVT(*DAG.getContext()); TargetLowering::CallLoweringInfo CLI(DAG); + bool signExtend = shouldSignExtendTypeInLibCall(RetVT, isSigned); CLI.setDebugLoc(dl).setChain(DAG.getEntryNode()) .setCallee(getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0) .setNoReturn(doesNotReturn).setDiscardResult(!isReturnValueUsed) - .setSExtResult(isSigned).setZExtResult(!isSigned); + .setSExtResult(signExtend).setZExtResult(!signExtend); return LowerCallTo(CLI); } Modified: vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp ============================================================================== --- vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp Thu May 21 06:57:07 2015 (r283176) @@ -177,25 +177,30 @@ bool RuntimeDyldMachO::isCompatibleFile( } template -void RuntimeDyldMachOCRTPBase::finalizeLoad(const ObjectFile &ObjImg, +void RuntimeDyldMachOCRTPBase::finalizeLoad(const ObjectFile &Obj, ObjSectionToIDMap &SectionMap) { unsigned EHFrameSID = RTDYLD_INVALID_SECTION_ID; unsigned TextSID = RTDYLD_INVALID_SECTION_ID; unsigned ExceptTabSID = RTDYLD_INVALID_SECTION_ID; - ObjSectionToIDMap::iterator i, e; - for (i = SectionMap.begin(), e = SectionMap.end(); i != e; ++i) { - const SectionRef &Section = i->first; + for (const auto &Section : Obj.sections()) { StringRef Name; Section.getName(Name); - if (Name == "__eh_frame") - EHFrameSID = i->second; - else if (Name == "__text") - TextSID = i->second; + + // Force emission of the __text, __eh_frame, and __gcc_except_tab sections + // if they're present. Otherwise call down to the impl to handle other + // sections that have already been emitted. + if (Name == "__text") + TextSID = findOrEmitSection(Obj, Section, true, SectionMap); + else if (Name == "__eh_frame") + EHFrameSID = findOrEmitSection(Obj, Section, false, SectionMap); else if (Name == "__gcc_except_tab") - ExceptTabSID = i->second; - else - impl().finalizeSection(ObjImg, i->second, Section); + ExceptTabSID = findOrEmitSection(Obj, Section, true, SectionMap); + else { + auto I = SectionMap.find(Section); + if (I != SectionMap.end()) + impl().finalizeSection(Obj, I->second, Section); + } } UnregisteredEHFrameSections.push_back( EHFrameRelatedSections(EHFrameSID, TextSID, ExceptTabSID)); @@ -238,7 +243,8 @@ unsigned char *RuntimeDyldMachOCRTPBase< } static int64_t computeDelta(SectionEntry *A, SectionEntry *B) { - int64_t ObjDistance = A->ObjAddress - B->ObjAddress; + int64_t ObjDistance = + static_cast(A->ObjAddress) - static_cast(B->ObjAddress); int64_t MemDistance = A->LoadAddress - B->LoadAddress; return ObjDistance - MemDistance; } Modified: vendor/llvm/dist/lib/IR/ConstantFold.cpp ============================================================================== --- vendor/llvm/dist/lib/IR/ConstantFold.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/IR/ConstantFold.cpp Thu May 21 06:57:07 2015 (r283176) @@ -1120,27 +1120,18 @@ Constant *llvm::ConstantFoldBinaryInstru return ConstantInt::get(CI1->getContext(), C1V | C2V); case Instruction::Xor: return ConstantInt::get(CI1->getContext(), C1V ^ C2V); - case Instruction::Shl: { - uint32_t shiftAmt = C2V.getZExtValue(); - if (shiftAmt < C1V.getBitWidth()) - return ConstantInt::get(CI1->getContext(), C1V.shl(shiftAmt)); - else - return UndefValue::get(C1->getType()); // too big shift is undef - } - case Instruction::LShr: { - uint32_t shiftAmt = C2V.getZExtValue(); - if (shiftAmt < C1V.getBitWidth()) - return ConstantInt::get(CI1->getContext(), C1V.lshr(shiftAmt)); - else - return UndefValue::get(C1->getType()); // too big shift is undef - } - case Instruction::AShr: { - uint32_t shiftAmt = C2V.getZExtValue(); - if (shiftAmt < C1V.getBitWidth()) - return ConstantInt::get(CI1->getContext(), C1V.ashr(shiftAmt)); - else - return UndefValue::get(C1->getType()); // too big shift is undef - } + case Instruction::Shl: + if (C2V.ult(C1V.getBitWidth())) + return ConstantInt::get(CI1->getContext(), C1V.shl(C2V)); + return UndefValue::get(C1->getType()); // too big shift is undef + case Instruction::LShr: + if (C2V.ult(C1V.getBitWidth())) + return ConstantInt::get(CI1->getContext(), C1V.lshr(C2V)); + return UndefValue::get(C1->getType()); // too big shift is undef + case Instruction::AShr: + if (C2V.ult(C1V.getBitWidth())) + return ConstantInt::get(CI1->getContext(), C1V.ashr(C2V)); + return UndefValue::get(C1->getType()); // too big shift is undef } } Modified: vendor/llvm/dist/lib/IR/GCOV.cpp ============================================================================== --- vendor/llvm/dist/lib/IR/GCOV.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/IR/GCOV.cpp Thu May 21 06:57:07 2015 (r283176) @@ -263,10 +263,12 @@ bool GCOVFunction::readGCDA(GCOVBuffer & // required to combine the edge counts that are contained in the GCDA file. for (uint32_t BlockNo = 0; Count > 0; ++BlockNo) { // The last block is always reserved for exit block - if (BlockNo >= Blocks.size()-1) { + if (BlockNo >= Blocks.size()) { errs() << "Unexpected number of edges (in " << Name << ").\n"; return false; } + if (BlockNo == Blocks.size() - 1) + errs() << "(" << Name << ") has arcs from exit block.\n"; GCOVBlock &Block = *Blocks[BlockNo]; for (size_t EdgeNo = 0, End = Block.getNumDstEdges(); EdgeNo < End; ++EdgeNo) { Modified: vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp Thu May 21 06:57:07 2015 (r283176) @@ -3636,21 +3636,27 @@ bool AsmParser::parseDirectiveSpace(Stri } /// parseDirectiveLEB128 -/// ::= (.sleb128 | .uleb128) expression +/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] bool AsmParser::parseDirectiveLEB128(bool Signed) { checkForValidSection(); const MCExpr *Value; - if (parseExpression(Value)) - return true; + for (;;) { + if (parseExpression(Value)) + return true; - if (getLexer().isNot(AsmToken::EndOfStatement)) - return TokError("unexpected token in directive"); + if (Signed) + getStreamer().EmitSLEB128Value(Value); + else + getStreamer().EmitULEB128Value(Value); - if (Signed) - getStreamer().EmitSLEB128Value(Value); - else - getStreamer().EmitULEB128Value(Value); + if (getLexer().is(AsmToken::EndOfStatement)) + break; + + if (getLexer().isNot(AsmToken::Comma)) + return TokError("unexpected token in directive"); + Lex(); + } return false; } Modified: vendor/llvm/dist/lib/Support/Unix/Memory.inc ============================================================================== --- vendor/llvm/dist/lib/Support/Unix/Memory.inc Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/Support/Unix/Memory.inc Thu May 21 06:57:07 2015 (r283176) @@ -333,23 +333,12 @@ void Memory::InvalidateInstructionCache( for (intptr_t Line = StartLine; Line < EndLine; Line += LineSize) asm volatile("icbi 0, %0" : : "r"(Line)); asm volatile("isync"); -# elif (defined(__arm__) || defined(__aarch64__)) && defined(__GNUC__) +# elif (defined(__arm__) || defined(__aarch64__) || defined(__mips__)) && \ + defined(__GNUC__) // FIXME: Can we safely always call this for __GNUC__ everywhere? const char *Start = static_cast(Addr); const char *End = Start + Len; __clear_cache(const_cast(Start), const_cast(End)); -# elif defined(__mips__) - const char *Start = static_cast(Addr); -# if defined(ANDROID) - // The declaration of "cacheflush" in Android bionic: - // extern int cacheflush(long start, long end, long flags); - const char *End = Start + Len; - long LStart = reinterpret_cast(const_cast(Start)); - long LEnd = reinterpret_cast(const_cast(End)); - cacheflush(LStart, LEnd, BCACHE); -# else - cacheflush(const_cast(Start), Len, BCACHE); -# endif # endif #endif // end apple Modified: vendor/llvm/dist/lib/Support/Windows/explicit_symbols.inc ============================================================================== --- vendor/llvm/dist/lib/Support/Windows/explicit_symbols.inc Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/Support/Windows/explicit_symbols.inc Thu May 21 06:57:07 2015 (r283176) @@ -10,9 +10,15 @@ #ifdef HAVE___CHKSTK EXPLICIT_SYMBOL(__chkstk) #endif +#ifdef HAVE___CHKSTK_MS + EXPLICIT_SYMBOL(__chkstk_ms) +#endif #ifdef HAVE____CHKSTK EXPLICIT_SYMBOL(___chkstk) #endif +#ifdef HAVE____CHKSTK_MS + EXPLICIT_SYMBOL(___chkstk_ms) +#endif #ifdef HAVE___MAIN EXPLICIT_SYMBOL(__main) // FIXME: Don't call it. #endif Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64AsmPrinter.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64AsmPrinter.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64AsmPrinter.cpp Thu May 21 06:57:07 2015 (r283176) @@ -12,6 +12,8 @@ // //===----------------------------------------------------------------------===// +#include "MCTargetDesc/AArch64AddressingModes.h" +#include "MCTargetDesc/AArch64MCExpr.h" #include "AArch64.h" #include "AArch64MCInstLower.h" #include "AArch64MachineFunctionInfo.h" @@ -494,24 +496,57 @@ void AArch64AsmPrinter::EmitInstruction( EmitToStreamer(OutStreamer, TmpInst); return; } - case AArch64::TLSDESC_BLR: { - MCOperand Callee, Sym; - MCInstLowering.lowerOperand(MI->getOperand(0), Callee); - MCInstLowering.lowerOperand(MI->getOperand(1), Sym); + case AArch64::TLSDESC_CALLSEQ: { + /// lower this to: + /// adrp x0, :tlsdesc:var + /// ldr x1, [x0, #:tlsdesc_lo12:var] + /// add x0, x0, #:tlsdesc_lo12:var + /// .tlsdesccall var + /// blr x1 + /// (TPIDR_EL0 offset now in x0) + const MachineOperand &MO_Sym = MI->getOperand(0); + MachineOperand MO_TLSDESC_LO12(MO_Sym), MO_TLSDESC(MO_Sym); + MCOperand Sym, SymTLSDescLo12, SymTLSDesc; + MO_TLSDESC_LO12.setTargetFlags(AArch64II::MO_TLS | AArch64II::MO_PAGEOFF | + AArch64II::MO_NC); + MO_TLSDESC.setTargetFlags(AArch64II::MO_TLS | AArch64II::MO_PAGE); + MCInstLowering.lowerOperand(MO_Sym, Sym); + MCInstLowering.lowerOperand(MO_TLSDESC_LO12, SymTLSDescLo12); + MCInstLowering.lowerOperand(MO_TLSDESC, SymTLSDesc); + + MCInst Adrp; + Adrp.setOpcode(AArch64::ADRP); + Adrp.addOperand(MCOperand::CreateReg(AArch64::X0)); + Adrp.addOperand(SymTLSDesc); + EmitToStreamer(OutStreamer, Adrp); + + MCInst Ldr; + Ldr.setOpcode(AArch64::LDRXui); + Ldr.addOperand(MCOperand::CreateReg(AArch64::X1)); + Ldr.addOperand(MCOperand::CreateReg(AArch64::X0)); + Ldr.addOperand(SymTLSDescLo12); + Ldr.addOperand(MCOperand::CreateImm(0)); + EmitToStreamer(OutStreamer, Ldr); + + MCInst Add; + Add.setOpcode(AArch64::ADDXri); + Add.addOperand(MCOperand::CreateReg(AArch64::X0)); + Add.addOperand(MCOperand::CreateReg(AArch64::X0)); + Add.addOperand(SymTLSDescLo12); + Add.addOperand(MCOperand::CreateImm(AArch64_AM::getShiftValue(0))); + EmitToStreamer(OutStreamer, Add); - // First emit a relocation-annotation. This expands to no code, but requests + // Emit a relocation-annotation. This expands to no code, but requests // the following instruction gets an R_AARCH64_TLSDESC_CALL. MCInst TLSDescCall; TLSDescCall.setOpcode(AArch64::TLSDESCCALL); TLSDescCall.addOperand(Sym); EmitToStreamer(OutStreamer, TLSDescCall); - // Other than that it's just a normal indirect call to the function loaded - // from the descriptor. - MCInst BLR; - BLR.setOpcode(AArch64::BLR); - BLR.addOperand(Callee); - EmitToStreamer(OutStreamer, BLR); + MCInst Blr; + Blr.setOpcode(AArch64::BLR); + Blr.addOperand(MCOperand::CreateReg(AArch64::X1)); + EmitToStreamer(OutStreamer, Blr); return; } Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp Thu May 21 06:57:07 2015 (r283176) @@ -62,10 +62,10 @@ struct LDTLSCleanup : public MachineFunc for (MachineBasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) { switch (I->getOpcode()) { - case AArch64::TLSDESC_BLR: + case AArch64::TLSDESC_CALLSEQ: // Make sure it's a local dynamic access. - if (!I->getOperand(1).isSymbol() || - strcmp(I->getOperand(1).getSymbolName(), "_TLS_MODULE_BASE_")) + if (!I->getOperand(0).isSymbol() || + strcmp(I->getOperand(0).getSymbolName(), "_TLS_MODULE_BASE_")) break; if (TLSBaseAddrReg) Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Thu May 21 06:56:35 2015 (r283175) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Thu May 21 06:57:07 2015 (r283176) @@ -64,8 +64,16 @@ EnableAArch64ExtrGeneration("aarch64-ext static cl::opt EnableAArch64SlrGeneration("aarch64-shift-insert-generation", cl::Hidden, - cl::desc("Allow AArch64 SLI/SRI formation"), - cl::init(false)); + cl::desc("Allow AArch64 SLI/SRI formation"), + cl::init(false)); + +// FIXME: The necessary dtprel relocations don't seem to be supported +// well in the GNU bfd and gold linkers at the moment. Therefore, by +// default, for now, fall back to GeneralDynamic code generation. +cl::opt EnableAArch64ELFLocalDynamicTLSGeneration( + "aarch64-elf-ldtls-generation", cl::Hidden, + cl::desc("Allow AArch64 Local Dynamic TLS code generation"), + cl::init(false)); AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM) @@ -760,7 +768,7 @@ const char *AArch64TargetLowering::getTa case AArch64ISD::CSNEG: return "AArch64ISD::CSNEG"; case AArch64ISD::CSINC: return "AArch64ISD::CSINC"; case AArch64ISD::THREAD_POINTER: return "AArch64ISD::THREAD_POINTER"; - case AArch64ISD::TLSDESC_CALL: return "AArch64ISD::TLSDESC_CALL"; + case AArch64ISD::TLSDESC_CALLSEQ: return "AArch64ISD::TLSDESC_CALLSEQ"; case AArch64ISD::ADC: return "AArch64ISD::ADC"; case AArch64ISD::SBC: return "AArch64ISD::SBC"; case AArch64ISD::ADDS: return "AArch64ISD::ADDS"; @@ -2023,18 +2031,19 @@ SDValue AArch64TargetLowering::LowerForm unsigned CurArgIdx = 0; for (unsigned i = 0; i != NumArgs; ++i) { MVT ValVT = Ins[i].VT; - std::advance(CurOrigArg, Ins[i].OrigArgIndex - CurArgIdx); - CurArgIdx = Ins[i].OrigArgIndex; - - // Get type of the original argument. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu May 21 06:57:52 2015 Return-Path: Delivered-To: svn-src-all@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 3C5684E6; Thu, 21 May 2015 06:57: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 1131719A0; Thu, 21 May 2015 06:57: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 t4L6vpVv000551; Thu, 21 May 2015 06:57:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L6vp4b000550; Thu, 21 May 2015 06:57:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505210657.t4L6vp4b000550@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 06:57:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283177 - vendor/llvm/llvm-release_361-r237755 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:57:52 -0000 Author: dim Date: Thu May 21 06:57:51 2015 New Revision: 283177 URL: https://svnweb.freebsd.org/changeset/base/283177 Log: Tag llvm tags/RELEASE_361/final r237755 (effectively, 3.6.1 release). Added: - copied from r283176, vendor/llvm/dist/ Directory Properties: vendor/llvm/llvm-release_361-r237755/ (props changed) From owner-svn-src-all@FreeBSD.ORG Thu May 21 06:58:20 2015 Return-Path: Delivered-To: svn-src-all@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 9BE0561E; Thu, 21 May 2015 06: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 892A619E5; Thu, 21 May 2015 06:58: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 t4L6wK20000814; Thu, 21 May 2015 06:58:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L6wK4F000813; Thu, 21 May 2015 06:58:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210658.t4L6wK4F000813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 06:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283179 - stable/9/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:58:20 -0000 Author: hselasky Date: Thu May 21 06:58:19 2015 New Revision: 283179 URL: https://svnweb.freebsd.org/changeset/base/283179 Log: MFC r282817: Apply proper locking when iterating the multicast addresses and add a missing check for NULL from a non-blocking "kzalloc()" function call. Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Thu May 21 06:58:08 2015 (r283178) +++ stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Thu May 21 06:58:19 2015 (r283179) @@ -650,6 +650,7 @@ static void mlx4_en_cache_mclist(struct struct mlx4_en_mc_list *tmp; struct mlx4_en_priv *priv = netdev_priv(dev); + if_maddr_rlock(dev); TAILQ_FOREACH(ifma, &dev->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; @@ -658,10 +659,13 @@ static void mlx4_en_cache_mclist(struct continue; /* Make sure the list didn't grow. */ tmp = kzalloc(sizeof(struct mlx4_en_mc_list), GFP_ATOMIC); + if (tmp == NULL) + break; memcpy(tmp->addr, LLADDR((struct sockaddr_dl *)ifma->ifma_addr), ETH_ALEN); list_add_tail(&tmp->list, &priv->mc_list); } + if_maddr_runlock(dev); } static void update_mclist_flags(struct mlx4_en_priv *priv, From owner-svn-src-all@FreeBSD.ORG Thu May 21 06:58:20 2015 Return-Path: Delivered-To: svn-src-all@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 50D8861B; Thu, 21 May 2015 06: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 3B99419E4; Thu, 21 May 2015 06:58: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 t4L6wKBc000803; Thu, 21 May 2015 06:58:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L6w8Rg000662; Thu, 21 May 2015 06:58:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505210658.t4L6w8Rg000662@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 06:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283178 - in vendor/clang/dist: include/clang/Basic include/clang/Sema lib/AST lib/Analysis lib/Basic lib/CodeGen lib/Driver lib/Frontend lib/Sema test/CodeGen test/CodeGenCXX test/Driv... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:58:20 -0000 Author: dim Date: Thu May 21 06:58:08 2015 New Revision: 283178 URL: https://svnweb.freebsd.org/changeset/base/283178 Log: Vendor import of clang RELEASE_361/final tag r237755 (effectively, 3.6.1 release): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_361/final@237755 Added: vendor/clang/dist/test/CodeGen/invalid_global_asm.c (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/ vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtbeginS.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtbeginT.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtendS.o (contents, props changed) vendor/clang/dist/test/Sema/builtin-longjmp.c (contents, props changed) vendor/clang/dist/test/SemaCXX/cxx0x-noexcept-expression.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/thread-safety-reference-handling.cpp (contents, props changed) vendor/clang/dist/test/SemaTemplate/overloaded-functions.cpp (contents, props changed) Deleted: vendor/clang/dist/test/CodeGen/2003-08-06-BuiltinSetjmpLongjmp.c Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/TargetCXXABI.h vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Sema/Template.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTDiagnostic.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/Analysis/ThreadSafety.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Sema/DeclSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/test/CodeGen/builtins.c vendor/clang/dist/test/CodeGen/mangle-windows.c vendor/clang/dist/test/CodeGen/mcount.c vendor/clang/dist/test/CodeGenCXX/inline-functions.cpp vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp vendor/clang/dist/test/CodeGenCXX/trivial-constructor-init.cpp vendor/clang/dist/test/Driver/android-standalone.cpp vendor/clang/dist/test/Misc/diag-template-diffing.cpp vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/SemaCXX/warn-thread-safety-negative.cpp Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu May 21 06:58:08 2015 (r283178) @@ -6972,6 +6972,11 @@ def note_neon_vector_initializer_non_por "vcombine_%0%1(vcreate_%0%1(), vcreate_%0%1()) to initialize from integer " "constants">; +def err_builtin_longjmp_unsupported : Error< + "__builtin_longjmp is not supported for the current target">; +def err_builtin_setjmp_unsupported : Error< + "__builtin_setjmp is not supported for the current target">; + def err_builtin_longjmp_invalid_val : Error< "argument to __builtin_longjmp must be a constant 1">; def err_builtin_requires_language : Error<"'%0' is only available in %1">; Modified: vendor/clang/dist/include/clang/Basic/TargetCXXABI.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/TargetCXXABI.h Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/include/clang/Basic/TargetCXXABI.h Thu May 21 06:58:08 2015 (r283178) @@ -79,6 +79,12 @@ public: /// - guard variables are smaller. GenericAArch64, + /// The generic Mips ABI is a modified version of the Itanium ABI. + /// + /// At the moment, only change from the generic ABI in this case is: + /// - representation of member function pointers adjusted as in ARM. + GenericMIPS, + /// The Microsoft ABI is the ABI used by Microsoft Visual Studio (and /// compatible compilers). /// @@ -114,6 +120,7 @@ public: case GenericARM: case iOS: case iOS64: + case GenericMIPS: return true; case Microsoft: @@ -130,6 +137,7 @@ public: case GenericARM: case iOS: case iOS64: + case GenericMIPS: return false; case Microsoft: @@ -212,6 +220,7 @@ public: case GenericItanium: case iOS: // old iOS compilers did not follow this rule case Microsoft: + case GenericMIPS: return true; } llvm_unreachable("bad ABI kind"); @@ -257,6 +266,7 @@ public: case GenericAArch64: case GenericARM: case iOS: + case GenericMIPS: return UseTailPaddingUnlessPOD03; // iOS on ARM64 uses the C++11 POD rules. It does not honor the Modified: vendor/clang/dist/include/clang/Basic/TargetInfo.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/TargetInfo.h Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/include/clang/Basic/TargetInfo.h Thu May 21 06:58:08 2015 (r283178) @@ -852,6 +852,12 @@ public: } } + /// Controls if __builtin_longjmp / __builtin_setjmp can be lowered to + /// llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp. + virtual bool hasSjLjLowering() const { + return false; + } + protected: virtual uint64_t getPointerWidthV(unsigned AddrSpace) const { return PointerWidth; Modified: vendor/clang/dist/include/clang/Sema/Sema.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Sema.h Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/include/clang/Sema/Sema.h Thu May 21 06:58:08 2015 (r283178) @@ -8550,6 +8550,7 @@ private: bool SemaBuiltinAssume(CallExpr *TheCall); bool SemaBuiltinAssumeAligned(CallExpr *TheCall); bool SemaBuiltinLongjmp(CallExpr *TheCall); + bool SemaBuiltinSetjmp(CallExpr *TheCall); ExprResult SemaBuiltinAtomicOverloaded(ExprResult TheCallResult); ExprResult SemaAtomicOpsOverloaded(ExprResult TheCallResult, AtomicExpr::AtomicOp Op); Modified: vendor/clang/dist/include/clang/Sema/Template.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Template.h Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/include/clang/Sema/Template.h Thu May 21 06:58:08 2015 (r283178) @@ -273,6 +273,11 @@ namespace clang { /// outermost scope. LocalInstantiationScope *cloneScopes(LocalInstantiationScope *Outermost) { if (this == Outermost) return this; + + // Save the current scope from SemaRef since the LocalInstantiationScope + // will overwrite it on construction + LocalInstantiationScope *oldScope = SemaRef.CurrentInstantiationScope; + LocalInstantiationScope *newScope = new LocalInstantiationScope(SemaRef, CombineWithOuterScope); @@ -299,6 +304,8 @@ namespace clang { newScope->ArgumentPacks.push_back(NewPack); } } + // Restore the saved scope to SemaRef + SemaRef.CurrentInstantiationScope = oldScope; return newScope; } Modified: vendor/clang/dist/lib/AST/ASTContext.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTContext.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/AST/ASTContext.cpp Thu May 21 06:58:08 2015 (r283178) @@ -682,6 +682,7 @@ CXXABI *ASTContext::createCXXABI(const T case TargetCXXABI::iOS: case TargetCXXABI::iOS64: case TargetCXXABI::GenericAArch64: + case TargetCXXABI::GenericMIPS: case TargetCXXABI::GenericItanium: return CreateItaniumCXXABI(*this); case TargetCXXABI::Microsoft: @@ -7873,7 +7874,7 @@ static GVALinkage basicGVALinkageForFunc // Functions specified with extern and inline in -fms-compatibility mode // forcibly get emitted. While the body of the function cannot be later // replaced, the function definition cannot be discarded. - if (FD->getMostRecentDecl()->isMSExternInline()) + if (FD->isMSExternInline()) return GVA_StrongODR; return GVA_DiscardableODR; @@ -8064,6 +8065,7 @@ MangleContext *ASTContext::createMangleC case TargetCXXABI::GenericAArch64: case TargetCXXABI::GenericItanium: case TargetCXXABI::GenericARM: + case TargetCXXABI::GenericMIPS: case TargetCXXABI::iOS: case TargetCXXABI::iOS64: return ItaniumMangleContext::create(*this, getDiagnostics()); Modified: vendor/clang/dist/lib/AST/ASTDiagnostic.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTDiagnostic.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/AST/ASTDiagnostic.cpp Thu May 21 06:58:08 2015 (r283178) @@ -998,29 +998,27 @@ class TemplateDiff { (!HasFromValueDecl && !HasToValueDecl)) && "Template argument cannot be both integer and declaration"); - unsigned ParamWidth = 128; // Safe default - if (FromDefaultNonTypeDecl->getType()->isIntegralOrEnumerationType()) - ParamWidth = Context.getIntWidth(FromDefaultNonTypeDecl->getType()); - if (!HasFromInt && !HasToInt && !HasFromValueDecl && !HasToValueDecl) { Tree.SetNode(FromExpr, ToExpr); Tree.SetDefault(FromIter.isEnd() && FromExpr, ToIter.isEnd() && ToExpr); if (FromDefaultNonTypeDecl->getType()->isIntegralOrEnumerationType()) { if (FromExpr) - HasFromInt = GetInt(Context, FromIter, FromExpr, FromInt); + HasFromInt = GetInt(Context, FromIter, FromExpr, FromInt, + FromDefaultNonTypeDecl->getType()); if (ToExpr) - HasToInt = GetInt(Context, ToIter, ToExpr, ToInt); + HasToInt = GetInt(Context, ToIter, ToExpr, ToInt, + ToDefaultNonTypeDecl->getType()); } if (HasFromInt && HasToInt) { Tree.SetNode(FromInt, ToInt, HasFromInt, HasToInt); - Tree.SetSame(IsSameConvertedInt(ParamWidth, FromInt, ToInt)); + Tree.SetSame(FromInt == ToInt); Tree.SetKind(DiffTree::Integer); } else if (HasFromInt || HasToInt) { Tree.SetNode(FromInt, ToInt, HasFromInt, HasToInt); Tree.SetSame(false); Tree.SetKind(DiffTree::Integer); } else { - Tree.SetSame(IsEqualExpr(Context, ParamWidth, FromExpr, ToExpr) || + Tree.SetSame(IsEqualExpr(Context, FromExpr, ToExpr) || (FromNullPtr && ToNullPtr)); Tree.SetNullPtr(FromNullPtr, ToNullPtr); Tree.SetKind(DiffTree::Expression); @@ -1030,11 +1028,17 @@ class TemplateDiff { if (HasFromInt || HasToInt) { if (!HasFromInt && FromExpr) - HasFromInt = GetInt(Context, FromIter, FromExpr, FromInt); + HasFromInt = GetInt(Context, FromIter, FromExpr, FromInt, + FromDefaultNonTypeDecl->getType()); if (!HasToInt && ToExpr) - HasToInt = GetInt(Context, ToIter, ToExpr, ToInt); + HasToInt = GetInt(Context, ToIter, ToExpr, ToInt, + ToDefaultNonTypeDecl->getType()); Tree.SetNode(FromInt, ToInt, HasFromInt, HasToInt); - Tree.SetSame(IsSameConvertedInt(ParamWidth, FromInt, ToInt)); + if (HasFromInt && HasToInt) { + Tree.SetSame(FromInt == ToInt); + } else { + Tree.SetSame(false); + } Tree.SetDefault(FromIter.isEnd() && HasFromInt, ToIter.isEnd() && HasToInt); Tree.SetKind(DiffTree::Integer); @@ -1210,9 +1214,11 @@ class TemplateDiff { } /// GetInt - Retrieves the template integer argument, including evaluating - /// default arguments. + /// default arguments. If the value comes from an expression, extend the + /// APSInt to size of IntegerType to match the behavior in + /// Sema::CheckTemplateArgument static bool GetInt(ASTContext &Context, const TSTiterator &Iter, - Expr *ArgExpr, llvm::APInt &Int) { + Expr *ArgExpr, llvm::APSInt &Int, QualType IntegerType) { // Default, value-depenedent expressions require fetching // from the desugared TemplateArgument, otherwise expression needs to // be evaluatable. @@ -1224,12 +1230,14 @@ class TemplateDiff { case TemplateArgument::Expression: ArgExpr = Iter.getDesugar().getAsExpr(); Int = ArgExpr->EvaluateKnownConstInt(Context); + Int = Int.extOrTrunc(Context.getTypeSize(IntegerType)); return true; default: llvm_unreachable("Unexpected template argument kind"); } } else if (ArgExpr->isEvaluatable(Context)) { Int = ArgExpr->EvaluateKnownConstInt(Context); + Int = Int.extOrTrunc(Context.getTypeSize(IntegerType)); return true; } @@ -1302,18 +1310,8 @@ class TemplateDiff { return nullptr; } - /// IsSameConvertedInt - Returns true if both integers are equal when - /// converted to an integer type with the given width. - static bool IsSameConvertedInt(unsigned Width, const llvm::APSInt &X, - const llvm::APSInt &Y) { - llvm::APInt ConvertedX = X.extOrTrunc(Width); - llvm::APInt ConvertedY = Y.extOrTrunc(Width); - return ConvertedX == ConvertedY; - } - /// IsEqualExpr - Returns true if the expressions evaluate to the same value. - static bool IsEqualExpr(ASTContext &Context, unsigned ParamWidth, - Expr *FromExpr, Expr *ToExpr) { + static bool IsEqualExpr(ASTContext &Context, Expr *FromExpr, Expr *ToExpr) { if (FromExpr == ToExpr) return true; @@ -1345,7 +1343,7 @@ class TemplateDiff { switch (FromVal.getKind()) { case APValue::Int: - return IsSameConvertedInt(ParamWidth, FromVal.getInt(), ToVal.getInt()); + return FromVal.getInt() == ToVal.getInt(); case APValue::LValue: { APValue::LValueBase FromBase = FromVal.getLValueBase(); APValue::LValueBase ToBase = ToVal.getLValueBase(); @@ -1655,11 +1653,14 @@ class TemplateDiff { } Unbold(); } - + /// HasExtraInfo - Returns true if E is not an integer literal or the /// negation of an integer literal bool HasExtraInfo(Expr *E) { if (!E) return false; + + E = E->IgnoreImpCasts(); + if (isa(E)) return false; if (UnaryOperator *UO = dyn_cast(E)) Modified: vendor/clang/dist/lib/AST/Decl.cpp ============================================================================== --- vendor/clang/dist/lib/AST/Decl.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/AST/Decl.cpp Thu May 21 06:58:08 2015 (r283178) @@ -2674,7 +2674,8 @@ bool FunctionDecl::isMSExternInline() co if (!Context.getLangOpts().MSVCCompat && !hasAttr()) return false; - for (const FunctionDecl *FD = this; FD; FD = FD->getPreviousDecl()) + for (const FunctionDecl *FD = getMostRecentDecl(); FD; + FD = FD->getPreviousDecl()) if (FD->getStorageClass() == SC_Extern) return true; Modified: vendor/clang/dist/lib/Analysis/ThreadSafety.cpp ============================================================================== --- vendor/clang/dist/lib/Analysis/ThreadSafety.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/Analysis/ThreadSafety.cpp Thu May 21 06:58:08 2015 (r283178) @@ -2108,8 +2108,8 @@ void ThreadSafetyAnalyzer::runAnalysis(A // Create a dummy expression, VarDecl *VD = const_cast(AD.getVarDecl()); - DeclRefExpr DRE(VD, false, VD->getType(), VK_LValue, - AD.getTriggerStmt()->getLocEnd()); + DeclRefExpr DRE(VD, false, VD->getType().getNonReferenceType(), + VK_LValue, AD.getTriggerStmt()->getLocEnd()); LocksetBuilder.handleCall(&DRE, DD); break; } Modified: vendor/clang/dist/lib/Basic/SourceManager.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/SourceManager.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/Basic/SourceManager.cpp Thu May 21 06:58:08 2015 (r283178) @@ -2076,22 +2076,33 @@ bool SourceManager::isBeforeInTranslatio return IsBeforeInTUCache.getCachedResult(LOffs.second, ROffs.second); } - // This can happen if a location is in a built-ins buffer. - // But see PR5662. + // If we arrived here, the location is either in a built-ins buffer or + // associated with global inline asm. PR5662 and PR22576 are examples. + // Clear the lookup cache, it depends on a common location. IsBeforeInTUCache.clear(); - bool LIsBuiltins = strcmp("", - getBuffer(LOffs.first)->getBufferIdentifier()) == 0; - bool RIsBuiltins = strcmp("", - getBuffer(ROffs.first)->getBufferIdentifier()) == 0; - // built-in is before non-built-in - if (LIsBuiltins != RIsBuiltins) - return LIsBuiltins; - assert(LIsBuiltins && RIsBuiltins && - "Non-built-in locations must be rooted in the main file"); - // Both are in built-in buffers, but from different files. We just claim that - // lower IDs come first. - return LOffs.first < ROffs.first; + llvm::MemoryBuffer *LBuf = getBuffer(LOffs.first); + llvm::MemoryBuffer *RBuf = getBuffer(ROffs.first); + bool LIsBuiltins = strcmp("", LBuf->getBufferIdentifier()) == 0; + bool RIsBuiltins = strcmp("", RBuf->getBufferIdentifier()) == 0; + // Sort built-in before non-built-in. + if (LIsBuiltins || RIsBuiltins) { + if (LIsBuiltins != RIsBuiltins) + return LIsBuiltins; + // Both are in built-in buffers, but from different files. We just claim that + // lower IDs come first. + return LOffs.first < ROffs.first; + } + bool LIsAsm = strcmp("", LBuf->getBufferIdentifier()) == 0; + bool RIsAsm = strcmp("", RBuf->getBufferIdentifier()) == 0; + // Sort assembler after built-ins, but before the rest. + if (LIsAsm || RIsAsm) { + if (LIsAsm != RIsAsm) + return RIsAsm; + assert(LOffs.first == ROffs.first); + return false; + } + llvm_unreachable("Unsortable locations found"); } void SourceManager::PrintStats() const { Modified: vendor/clang/dist/lib/Basic/TargetInfo.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/TargetInfo.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/Basic/TargetInfo.cpp Thu May 21 06:58:08 2015 (r283178) @@ -655,6 +655,7 @@ bool TargetCXXABI::tryParse(llvm::String .Case("ios", iOS) .Case("itanium", GenericItanium) .Case("microsoft", Microsoft) + .Case("mips", GenericMIPS) .Default(unknown); if (kind == unknown) return false; Modified: vendor/clang/dist/lib/Basic/Targets.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Targets.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/Basic/Targets.cpp Thu May 21 06:58:08 2015 (r283178) @@ -419,6 +419,7 @@ protected: public: NetBSDTargetInfo(const llvm::Triple &Triple) : OSTargetInfo(Triple) { this->UserLabelPrefix = ""; + this->MCountName = "_mcount"; } }; @@ -919,6 +920,10 @@ public: if (RegNo == 1) return 4; return -1; } + + bool hasSjLjLowering() const override { + return true; + } }; const Builtin::Info PPCTargetInfo::BuiltinInfo[] = { @@ -2181,6 +2186,10 @@ public: CallingConv getDefaultCallingConv(CallingConvMethodType MT) const override { return MT == CCMT_Member ? CC_X86ThisCall : CC_C; } + + bool hasSjLjLowering() const override { + return true; + } }; bool X86TargetInfo::setFPMath(StringRef Name) { @@ -3354,7 +3363,10 @@ public: : WindowsTargetInfo(Triple) { WCharType = UnsignedShort; DoubleAlign = LongLongAlign = 64; - DescriptionString = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"; + bool IsWinCOFF = + getTriple().isOSWindows() && getTriple().isOSBinFormatCOFF(); + DescriptionString = IsWinCOFF ? "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32" + : "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-S32"; } void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override { @@ -5628,7 +5640,9 @@ public: const std::string &CPUStr) : TargetInfo(Triple), CPU(CPUStr), IsMips16(false), IsMicromips(false), IsNan2008(false), IsSingleFloat(false), FloatABI(HardFloat), - DspRev(NoDSP), HasMSA(false), HasFP64(false), ABI(ABIStr) {} + DspRev(NoDSP), HasMSA(false), HasFP64(false), ABI(ABIStr) { + TheCXXABI.set(TargetCXXABI::GenericMIPS); + } bool isNaN2008Default() const { return CPU == "mips32r6" || CPU == "mips64r6"; @@ -6662,6 +6676,8 @@ static TargetInfo *AllocateTarget(const switch (os) { case llvm::Triple::Linux: return new LinuxTargetInfo(Triple); + case llvm::Triple::NetBSD: + return new NetBSDTargetInfo(Triple); default: return new PPC64TargetInfo(Triple); } Modified: vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Thu May 21 06:58:08 2015 (r283178) @@ -64,6 +64,7 @@ static CGCXXABI *createCXXABI(CodeGenMod case TargetCXXABI::GenericARM: case TargetCXXABI::iOS: case TargetCXXABI::iOS64: + case TargetCXXABI::GenericMIPS: case TargetCXXABI::GenericItanium: return CreateItaniumCXXABI(CGM); case TargetCXXABI::Microsoft: Modified: vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp Thu May 21 06:58:08 2015 (r283178) @@ -339,6 +339,9 @@ CodeGen::CGCXXABI *CodeGen::CreateItaniu return new ItaniumCXXABI(CGM, /* UseARMMethodPtrABI = */ true, /* UseARMGuardVarABI = */ true); + case TargetCXXABI::GenericMIPS: + return new ItaniumCXXABI(CGM, /* UseARMMethodPtrABI = */ true); + case TargetCXXABI::GenericItanium: if (CGM.getContext().getTargetInfo().getTriple().getArch() == llvm::Triple::le32) { Modified: vendor/clang/dist/lib/CodeGen/TargetInfo.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/TargetInfo.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/CodeGen/TargetInfo.cpp Thu May 21 06:58:08 2015 (r283178) @@ -664,7 +664,6 @@ public: ('T' << 24); return llvm::ConstantInt::get(CGM.Int32Ty, Sig); } - }; } @@ -4455,7 +4454,6 @@ public: llvm::AttributeSet::FunctionIndex, B)); } - }; } Modified: vendor/clang/dist/lib/Driver/ToolChains.cpp ============================================================================== --- vendor/clang/dist/lib/Driver/ToolChains.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/Driver/ToolChains.cpp Thu May 21 06:58:08 2015 (r283178) @@ -1724,6 +1724,7 @@ static bool findMIPSMultilibs(const llvm MultilibSet AndroidMipsMultilibs = MultilibSet() .Maybe(Multilib("/mips-r2").flag("+march=mips32r2")) + .Maybe(Multilib("/mips-r6").flag("+march=mips32r6")) .FilterOut(NonExistent); MultilibSet DebianMipsMultilibs; @@ -1783,6 +1784,7 @@ static bool findMIPSMultilibs(const llvm addMultilibFlag(isMips16(Args), "mips16", Flags); addMultilibFlag(CPUName == "mips32", "march=mips32", Flags); addMultilibFlag(CPUName == "mips32r2", "march=mips32r2", Flags); + addMultilibFlag(CPUName == "mips32r6", "march=mips32r6", Flags); addMultilibFlag(CPUName == "mips64", "march=mips64", Flags); addMultilibFlag(CPUName == "mips64r2" || CPUName == "octeon", "march=mips64r2", Flags); Modified: vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp Thu May 21 06:58:08 2015 (r283178) @@ -662,12 +662,7 @@ static void InitializePredefinedMacros(c TI.getTypeWidth(TI.getWCharType()), TI, Builder); DefineTypeSizeof("__SIZEOF_WINT_T__", TI.getTypeWidth(TI.getWIntType()), TI, Builder); - // This is a temporary workaround while MIPS64 has not yet fully supported - // 128-bit integers. But declaration of int128 type is necessary even though - // __SIZEOF_INT128__ is undefined because c++ standard header files like - // limits throw error message if __int128 is not available. - if (TI.hasInt128Type() && !(TI.getTriple().getArch() == llvm::Triple::mips64el - || TI.getTriple().getArch() == llvm::Triple::mips64)) + if (TI.hasInt128Type()) DefineTypeSizeof("__SIZEOF_INT128__", 128, TI, Builder); DefineType("__INTMAX_TYPE__", TI.getIntMaxType(), Builder); Modified: vendor/clang/dist/lib/Sema/DeclSpec.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/DeclSpec.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/Sema/DeclSpec.cpp Thu May 21 06:58:08 2015 (r283178) @@ -345,8 +345,9 @@ bool Declarator::isDeclarationOfFunction bool Declarator::isStaticMember() { assert(getContext() == MemberContext); return getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static || - CXXMethodDecl::isStaticOverloadedOperator( - getName().OperatorFunctionId.Operator); + (getName().Kind == UnqualifiedId::IK_OperatorFunctionId && + CXXMethodDecl::isStaticOverloadedOperator( + getName().OperatorFunctionId.Operator)); } bool DeclSpec::hasTagDefinition() const { Modified: vendor/clang/dist/lib/Sema/SemaChecking.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaChecking.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/Sema/SemaChecking.cpp Thu May 21 06:58:08 2015 (r283178) @@ -297,6 +297,10 @@ Sema::CheckBuiltinFunctionCall(FunctionD if (SemaBuiltinLongjmp(TheCall)) return ExprError(); break; + case Builtin::BI__builtin_setjmp: + if (SemaBuiltinSetjmp(TheCall)) + return ExprError(); + break; case Builtin::BI__builtin_classify_type: if (checkArgCount(*this, TheCall, 1)) return true; @@ -2367,8 +2371,13 @@ bool Sema::SemaBuiltinConstantArgRange(C } /// SemaBuiltinLongjmp - Handle __builtin_longjmp(void *env[5], int val). -/// This checks that val is a constant 1. +/// This checks that the target supports __builtin_longjmp and +/// that val is a constant 1. bool Sema::SemaBuiltinLongjmp(CallExpr *TheCall) { + if (!Context.getTargetInfo().hasSjLjLowering()) + return Diag(TheCall->getLocStart(), diag::err_builtin_longjmp_unsupported) + << SourceRange(TheCall->getLocStart(), TheCall->getLocEnd()); + Expr *Arg = TheCall->getArg(1); llvm::APSInt Result; @@ -2383,6 +2392,16 @@ bool Sema::SemaBuiltinLongjmp(CallExpr * return false; } + +/// SemaBuiltinSetjmp - Handle __builtin_setjmp(void *env[5]). +/// This checks that the target supports __builtin_setjmp. +bool Sema::SemaBuiltinSetjmp(CallExpr *TheCall) { + if (!Context.getTargetInfo().hasSjLjLowering()) + return Diag(TheCall->getLocStart(), diag::err_builtin_setjmp_unsupported) + << SourceRange(TheCall->getLocStart(), TheCall->getLocEnd()); + return false; +} + namespace { enum StringLiteralCheckType { SLCT_NotALiteral, Modified: vendor/clang/dist/lib/Sema/SemaExpr.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExpr.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/Sema/SemaExpr.cpp Thu May 21 06:58:08 2015 (r283178) @@ -117,7 +117,7 @@ static AvailabilityResult DiagnoseAvaila case AR_Available: case AR_NotYetIntroduced: break; - + case AR_Deprecated: if (S.getCurContextAvailability() != AR_Deprecated) S.EmitAvailabilityWarning(Sema::AD_Deprecation, @@ -11630,8 +11630,11 @@ void Sema::MarkFunctionReferenced(Source } else if (CXXDestructorDecl *Destructor = dyn_cast(Func)) { Destructor = cast(Destructor->getFirstDecl()); - if (Destructor->isDefaulted() && !Destructor->isDeleted()) + if (Destructor->isDefaulted() && !Destructor->isDeleted()) { + if (Destructor->isTrivial() && !Destructor->hasAttr()) + return; DefineImplicitDestructor(Loc, Destructor); + } if (Destructor->isVirtual()) MarkVTableUsed(Loc, Destructor->getParent()); } else if (CXXMethodDecl *MethodDecl = dyn_cast(Func)) { Modified: vendor/clang/dist/lib/Sema/SemaExprCXX.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExprCXX.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/Sema/SemaExprCXX.cpp Thu May 21 06:58:08 2015 (r283178) @@ -5705,6 +5705,16 @@ ExprResult Sema::BuildCXXMemberCallExpr( ExprResult Sema::BuildCXXNoexceptExpr(SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen) { + // If the operand is an unresolved lookup expression, the expression is ill- + // formed per [over.over]p1, because overloaded function names cannot be used + // without arguments except in explicit contexts. + ExprResult R = CheckPlaceholderExpr(Operand); + if (R.isInvalid()) + return R; + + // The operand may have been modified when checking the placeholder type. + Operand = R.get(); + if (ActiveTemplateInstantiations.empty() && Operand->HasSideEffects(Context, false)) { // The expression operand for noexcept is in an unevaluated expression Modified: vendor/clang/dist/lib/Sema/SemaTemplate.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaTemplate.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/lib/Sema/SemaTemplate.cpp Thu May 21 06:58:08 2015 (r283178) @@ -3355,7 +3355,7 @@ Sema::SubstDefaultTemplateArgumentIfAvai /// \param Param The template parameter against which the argument will be /// checked. /// -/// \param Arg The template argument. +/// \param Arg The template argument, which may be updated due to conversions. /// /// \param Template The template in which the template argument resides. /// @@ -3433,6 +3433,13 @@ bool Sema::CheckTemplateArgument(NamedDe if (Res.isInvalid()) return true; + // If the resulting expression is new, then use it in place of the + // old expression in the template argument. + if (Res.get() != Arg.getArgument().getAsExpr()) { + TemplateArgument TA(Res.get()); + Arg = TemplateArgumentLoc(TA, Res.get()); + } + Converted.push_back(Result); break; } @@ -3640,9 +3647,14 @@ bool Sema::CheckTemplateArgumentList(Tem TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl &Converted) { + // Make a copy of the template arguments for processing. Only make the + // changes at the end when successful in matching the arguments to the + // template. + TemplateArgumentListInfo NewArgs = TemplateArgs; + TemplateParameterList *Params = Template->getTemplateParameters(); - SourceLocation RAngleLoc = TemplateArgs.getRAngleLoc(); + SourceLocation RAngleLoc = NewArgs.getRAngleLoc(); // C++ [temp.arg]p1: // [...] The type and form of each template-argument specified in @@ -3651,7 +3663,7 @@ bool Sema::CheckTemplateArgumentList(Tem // template-parameter-list. bool isTemplateTemplateParameter = isa(Template); SmallVector ArgumentPack; - unsigned ArgIdx = 0, NumArgs = TemplateArgs.size(); + unsigned ArgIdx = 0, NumArgs = NewArgs.size(); LocalInstantiationScope InstScope(*this, true); for (TemplateParameterList::iterator Param = Params->begin(), ParamEnd = Params->end(); @@ -3687,21 +3699,21 @@ bool Sema::CheckTemplateArgumentList(Tem if (ArgIdx < NumArgs) { // Check the template argument we were given. - if (CheckTemplateArgument(*Param, TemplateArgs[ArgIdx], Template, + if (CheckTemplateArgument(*Param, NewArgs[ArgIdx], Template, TemplateLoc, RAngleLoc, ArgumentPack.size(), Converted)) return true; bool PackExpansionIntoNonPack = - TemplateArgs[ArgIdx].getArgument().isPackExpansion() && + NewArgs[ArgIdx].getArgument().isPackExpansion() && (!(*Param)->isTemplateParameterPack() || getExpandedPackSize(*Param)); if (PackExpansionIntoNonPack && isa(Template)) { // Core issue 1430: we have a pack expansion as an argument to an // alias template, and it's not part of a parameter pack. This // can't be canonicalized, so reject it now. - Diag(TemplateArgs[ArgIdx].getLocation(), + Diag(NewArgs[ArgIdx].getLocation(), diag::err_alias_template_expansion_into_fixed_list) - << TemplateArgs[ArgIdx].getSourceRange(); + << NewArgs[ArgIdx].getSourceRange(); Diag((*Param)->getLocation(), diag::note_template_param_here); return true; } @@ -3733,7 +3745,7 @@ bool Sema::CheckTemplateArgumentList(Tem } while (ArgIdx < NumArgs) { - Converted.push_back(TemplateArgs[ArgIdx].getArgument()); + Converted.push_back(NewArgs[ArgIdx].getArgument()); ++ArgIdx; } @@ -3784,8 +3796,7 @@ bool Sema::CheckTemplateArgumentList(Tem // the default argument. if (TemplateTypeParmDecl *TTP = dyn_cast(*Param)) { if (!TTP->hasDefaultArgument()) - return diagnoseArityMismatch(*this, Template, TemplateLoc, - TemplateArgs); + return diagnoseArityMismatch(*this, Template, TemplateLoc, NewArgs); TypeSourceInfo *ArgType = SubstDefaultTemplateArgument(*this, Template, @@ -3801,8 +3812,7 @@ bool Sema::CheckTemplateArgumentList(Tem } else if (NonTypeTemplateParmDecl *NTTP = dyn_cast(*Param)) { if (!NTTP->hasDefaultArgument()) - return diagnoseArityMismatch(*this, Template, TemplateLoc, - TemplateArgs); + return diagnoseArityMismatch(*this, Template, TemplateLoc, NewArgs); ExprResult E = SubstDefaultTemplateArgument(*this, Template, TemplateLoc, @@ -3819,8 +3829,7 @@ bool Sema::CheckTemplateArgumentList(Tem = cast(*Param); if (!TempParm->hasDefaultArgument()) - return diagnoseArityMismatch(*this, Template, TemplateLoc, - TemplateArgs); + return diagnoseArityMismatch(*this, Template, TemplateLoc, NewArgs); NestedNameSpecifierLoc QualifierLoc; TemplateName Name = SubstDefaultTemplateArgument(*this, Template, @@ -3848,12 +3857,12 @@ bool Sema::CheckTemplateArgumentList(Tem RAngleLoc, 0, Converted)) return true; - // Core issue 150 (assumed resolution): if this is a template template - // parameter, keep track of the default template arguments from the + // Core issue 150 (assumed resolution): if this is a template template + // parameter, keep track of the default template arguments from the // template definition. if (isTemplateTemplateParameter) - TemplateArgs.addArgument(Arg); - + NewArgs.addArgument(Arg); + // Move to the next template parameter and argument. ++Param; ++ArgIdx; @@ -3865,15 +3874,18 @@ bool Sema::CheckTemplateArgumentList(Tem // still dependent). if (ArgIdx < NumArgs && CurrentInstantiationScope && CurrentInstantiationScope->getPartiallySubstitutedPack()) { - while (ArgIdx < NumArgs && - TemplateArgs[ArgIdx].getArgument().isPackExpansion()) - Converted.push_back(TemplateArgs[ArgIdx++].getArgument()); + while (ArgIdx < NumArgs && NewArgs[ArgIdx].getArgument().isPackExpansion()) + Converted.push_back(NewArgs[ArgIdx++].getArgument()); } // If we have any leftover arguments, then there were too many arguments. // Complain and fail. if (ArgIdx < NumArgs) - return diagnoseArityMismatch(*this, Template, TemplateLoc, TemplateArgs); + return diagnoseArityMismatch(*this, Template, TemplateLoc, NewArgs); + + // No problems found with the new argument list, propagate changes back + // to caller. + TemplateArgs = NewArgs; return false; } Modified: vendor/clang/dist/test/CodeGen/builtins.c ============================================================================== --- vendor/clang/dist/test/CodeGen/builtins.c Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/test/CodeGen/builtins.c Thu May 21 06:58:08 2015 (r283178) @@ -220,6 +220,8 @@ void test_float_builtin_ops(float F, dou // CHECK: call x86_fp80 @llvm.fabs.f80(x86_fp80 } +// __builtin_longjmp isn't supported on all platforms, so only test it on X86. +#ifdef __x86_64__ // CHECK-LABEL: define void @test_builtin_longjmp void test_builtin_longjmp(void **buffer) { // CHECK: [[BITCAST:%.*]] = bitcast @@ -227,6 +229,7 @@ void test_builtin_longjmp(void **buffer) __builtin_longjmp(buffer, 1); // CHECK-NEXT: unreachable } +#endif // CHECK-LABEL: define i64 @test_builtin_readcyclecounter long long test_builtin_readcyclecounter() { Added: vendor/clang/dist/test/CodeGen/invalid_global_asm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/CodeGen/invalid_global_asm.c Thu May 21 06:58:08 2015 (r283178) @@ -0,0 +1,5 @@ +// REQUIRES: arm-registered-target +// RUN: not %clang_cc1 -emit-obj -triple armv6-unknown-unknown -o %t %s 2>&1 | FileCheck %s +#pragma clang diagnostic ignored "-Wmissing-noreturn" +__asm__(".Lfoo: movw r2, #:lower16:.Lbar - .Lfoo"); +// CHECK: :1:8: error: instruction requires: armv6t2 Modified: vendor/clang/dist/test/CodeGen/mangle-windows.c ============================================================================== --- vendor/clang/dist/test/CodeGen/mangle-windows.c Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/test/CodeGen/mangle-windows.c Thu May 21 06:58:08 2015 (r283178) @@ -1,15 +1,26 @@ // RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s // RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-mingw32 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-windows-msvc-elf | FileCheck %s --check-prefix=ELF32 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-win32 | FileCheck %s --check-prefix=X64 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-mingw32 | FileCheck %s --check-prefix=X64 +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc-elf | FileCheck %s --check-prefix=ELF64 + +// CHECK: target datalayout = "e-m:w-{{.*}}" +// X64: target datalayout = "e-m:e-{{.*}}" +// ELF32: target datalayout = "e-m:e-{{.*}}" +// ELF64: target datalayout = "e-m:e-{{.*}}" void __stdcall f1(void) {} // CHECK: define x86_stdcallcc void @"\01_f1@0" // X64: define void @f1( +// ELF32: define x86_stdcallcc void @"\01_f1@0" +// ELF64: define void @f1( void __fastcall f2(void) {} // CHECK: define x86_fastcallcc void @"\01@f2@0" // X64: define void @f2( +// ELF32: define x86_fastcallcc void @"\01@f2@0" +// ELF64: define void @f2( void __stdcall f3() {} // CHECK: define x86_stdcallcc void @"\01_f3@0" @@ -46,10 +57,14 @@ void f12(void) {} void __vectorcall v1(void) {} // CHECK: define x86_vectorcallcc void @"\01v1@@0"( // X64: define x86_vectorcallcc void @"\01v1@@0"( +// ELF32: define x86_vectorcallcc void @"\01v1@@0"( +// ELF64: define x86_vectorcallcc void @"\01v1@@0"( void __vectorcall v2(char a) {} // CHECK: define x86_vectorcallcc void @"\01v2@@4"( // X64: define x86_vectorcallcc void @"\01v2@@8"( +// ELF32: define x86_vectorcallcc void @"\01v2@@4"( +// ELF64: define x86_vectorcallcc void @"\01v2@@8"( void __vectorcall v3(short a) {} // CHECK: define x86_vectorcallcc void @"\01v3@@4"( Modified: vendor/clang/dist/test/CodeGen/mcount.c ============================================================================== --- vendor/clang/dist/test/CodeGen/mcount.c Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/test/CodeGen/mcount.c Thu May 21 06:58:08 2015 (r283178) @@ -1,8 +1,18 @@ // RUN: %clang_cc1 -pg -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s -// RUN: %clang_cc1 -pg -triple powerpc-unknown-gnu-linux -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PPC %s -// RUN: %clang_cc1 -pg -triple powerpc64-unknown-gnu-linux -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PPC %s -// RUN: %clang_cc1 -pg -triple powerpc64le-unknown-gnu-linux -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PPC %s +// RUN: %clang_cc1 -pg -triple powerpc-unknown-gnu-linux -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple powerpc64-unknown-gnu-linux -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple powerpc64le-unknown-gnu-linux -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple i386-netbsd -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple x86_64-netbsd -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple arm-netbsd-eabi -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple aarch64-netbsd -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple mips-netbsd -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple powerpc-netbsd -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple powerpc64-netbsd -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple powerpc64le-netbsd -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple sparc-netbsd -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s +// RUN: %clang_cc1 -pg -triple sparc64-netbsd -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PREFIXED %s void foo(void) { // CHECK: call void @mcount() -// CHECK-PPC: call void @_mcount() +// CHECK-PREFIXED: call void @_mcount() } Modified: vendor/clang/dist/test/CodeGenCXX/inline-functions.cpp ============================================================================== --- vendor/clang/dist/test/CodeGenCXX/inline-functions.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/test/CodeGenCXX/inline-functions.cpp Thu May 21 06:58:08 2015 (r283178) @@ -121,3 +121,18 @@ struct TypeWithInlineMethods { // CHECK-NOT: _ZN21TypeWithInlineMethods12NonStaticFunEv void NonStaticFun() { StaticFun(); } }; + +namespace PR22959 { +template +struct S; + +S Foo(); + +template +struct S { + friend S Foo(); +}; + +__attribute__((used)) inline S Foo() { return S(); } +// CHECK-LABEL: define linkonce_odr void @_ZN7PR229593FooEv( +} Modified: vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp ============================================================================== --- vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp Thu May 21 06:58:08 2015 (r283178) @@ -6,6 +6,8 @@ // PNaCl uses the same representation of method pointers as ARM. // RUN: %clang_cc1 %s -emit-llvm -o - -triple=le32-unknown-nacl | FileCheck -check-prefix GLOBAL-ARM %s +// MIPS uses the same representation of method pointers as ARM. +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=mips-unknown-linux-gnu | FileCheck -check-prefix GLOBAL-ARM %s struct A { int a; void f(); virtual void vf1(); virtual void vf2(); }; struct B { int b; virtual void g(); }; Modified: vendor/clang/dist/test/CodeGenCXX/trivial-constructor-init.cpp ============================================================================== --- vendor/clang/dist/test/CodeGenCXX/trivial-constructor-init.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/test/CodeGenCXX/trivial-constructor-init.cpp Thu May 21 06:58:08 2015 (r283178) @@ -32,3 +32,17 @@ static C c[4]; int main() { } + +namespace PR22793 { +template +struct foo { +protected: +// CHECK-NOT: _ZN7PR227933fooIiED2Ev + ~foo() = default; + friend void func(); +}; + +void func() { foo f; } + +template struct foo; +} Added: vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtbegin.o ============================================================================== Added: vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtbeginS.o ============================================================================== Added: vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtbeginT.o ============================================================================== Added: vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtend.o ============================================================================== Added: vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtendS.o ============================================================================== Modified: vendor/clang/dist/test/Driver/android-standalone.cpp ============================================================================== --- vendor/clang/dist/test/Driver/android-standalone.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/test/Driver/android-standalone.cpp Thu May 21 06:58:08 2015 (r283178) @@ -93,3 +93,19 @@ // CHECK-MIPSR2-A: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3/mips-r2" // CHECK-MIPSR2-A: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3/../../../../mipsel-linux-android/lib" // CHECK-MIPSR2-A: "-L{{.*}}/sysroot/usr/lib" +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target mipsel-linux-android \ +// RUN: -mips32r6 \ +// RUN: -B%S/Inputs/basic_android_tree \ +// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ +// RUN: | FileCheck --check-prefix=CHECK-MIPSR6 %s +// CHECK-MIPSR6: {{.*}}clang{{.*}}" "-cc1" +// CHECK-MIPSR6: "-internal-isystem" "{{.*}}/mipsel-linux-android/include/c++/4.4.3" +// CHECK-MIPSR6: "-internal-isystem" "{{.*}}/mipsel-linux-android/include/c++/4.4.3/mipsel-linux-android" +// CHECK-MIPSR6: "-internal-externc-isystem" "{{.*}}/sysroot/include" +// CHECK-MIPSR6: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include" +// CHECK-MIPSR6: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-MIPSR6: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3/mips-r6" +// CHECK-MIPSR6: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3/../../../../mipsel-linux-android/lib" +// CHECK-MIPSR6: "-L{{.*}}/sysroot/usr/lib" Modified: vendor/clang/dist/test/Misc/diag-template-diffing.cpp ============================================================================== --- vendor/clang/dist/test/Misc/diag-template-diffing.cpp Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/test/Misc/diag-template-diffing.cpp Thu May 21 06:58:08 2015 (r283178) @@ -1247,6 +1247,33 @@ template using A7 = A<(T::num) // CHECK-ELIDE-NOTREE: type alias template redefinition with different types ('A<(T::num), (default) 0>' vs 'A') } +namespace TemplateArgumentImplicitConversion { +template struct condition {}; + +struct is_const { + constexpr operator int() const { return 10; } +}; + +using T = condition<(is_const())>; +void foo(const T &t) { + T &t2 = t; +} +// CHECK-ELIDE-NOTREE: binding of reference to type 'condition<[...]>' to a value of type 'const condition<[...]>' drops qualifiers +} + +namespace BoolArgumentBitExtended { +template struct BoolT {}; + +template void foo(T) {} + +void test() { + BoolT X; + foo>(X); +} +// CHECK-ELIDE-NOTREE: no matching function for call to 'foo' +// CHECK-ELIDE-NOTREE: candidate function [with T = BoolArgumentBitExtended::BoolT] not viable: no known conversion from 'BoolT<0>' to 'BoolT<1>' for 1st argument +} + // CHECK-ELIDE-NOTREE: {{[0-9]*}} errors generated. // CHECK-NOELIDE-NOTREE: {{[0-9]*}} errors generated. // CHECK-ELIDE-TREE: {{[0-9]*}} errors generated. Modified: vendor/clang/dist/test/Preprocessor/init.c ============================================================================== --- vendor/clang/dist/test/Preprocessor/init.c Thu May 21 06:57:51 2015 (r283177) +++ vendor/clang/dist/test/Preprocessor/init.c Thu May 21 06:58:08 2015 (r283178) @@ -3752,7 +3752,7 @@ // MIPS64BE:#define __SIG_ATOMIC_WIDTH__ 32 // MIPS64BE:#define __SIZEOF_DOUBLE__ 8 // MIPS64BE:#define __SIZEOF_FLOAT__ 4 -// MIPS64BE-NOT:#define __SIZEOF_INT128__ 16 +// MIPS64BE:#define __SIZEOF_INT128__ 16 // MIPS64BE:#define __SIZEOF_INT__ 4 // MIPS64BE:#define __SIZEOF_LONG_DOUBLE__ 16 // MIPS64BE:#define __SIZEOF_LONG_LONG__ 8 @@ -3960,7 +3960,7 @@ // MIPS64EL:#define __SIG_ATOMIC_WIDTH__ 32 // MIPS64EL:#define __SIZEOF_DOUBLE__ 8 // MIPS64EL:#define __SIZEOF_FLOAT__ 4 -// MIPS64EL-NOT:#define __SIZEOF_INT128__ 16 +// MIPS64EL:#define __SIZEOF_INT128__ 16 // MIPS64EL:#define __SIZEOF_INT__ 4 // MIPS64EL:#define __SIZEOF_LONG_DOUBLE__ 16 // MIPS64EL:#define __SIZEOF_LONG_LONG__ 8 Added: vendor/clang/dist/test/Sema/builtin-longjmp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/Sema/builtin-longjmp.c Thu May 21 06:58:08 2015 (r283178) @@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm < %s| FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm < %s| FileCheck %s +// RUN: %clang_cc1 -triple x86_64-windows -emit-llvm < %s| FileCheck %s +// RUN: %clang_cc1 -triple powerpc-unknown-unknown -emit-llvm < %s| FileCheck %s +// RUN: %clang_cc1 -triple powerpc64-unknown-unknown -emit-llvm < %s| FileCheck %s + +// RUN: %clang_cc1 -triple arm-unknown-unknown -emit-llvm-only -verify %s +// RUN: %clang_cc1 -triple aarch64-unknown-unknown -emit-llvm-only -verify %s +// RUN: %clang_cc1 -triple mips-unknown-unknown -emit-llvm-only -verify %s +// RUN: %clang_cc1 -triple mips64-unknown-unknown -emit-llvm-only -verify %s + +// Check that __builtin_longjmp and __builtin_setjmp are lowered into +// IR intrinsics on those architectures that can handle them. +// Check that an error is created otherwise. + +typedef void *jmp_buf; +jmp_buf buf; + +// CHECK: define{{.*}} void @do_jump() +// CHECK: call{{.*}} void @llvm.eh.sjlj.longjmp + +// CHECK: define{{.*}} void @do_setjmp() *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu May 21 06:58:51 2015 Return-Path: Delivered-To: svn-src-all@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 3847F882; Thu, 21 May 2015 06:58: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 0DE6119F1; Thu, 21 May 2015 06:58: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 t4L6woEK000976; Thu, 21 May 2015 06:58:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L6wouL000975; Thu, 21 May 2015 06:58:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505210658.t4L6wouL000975@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 06:58:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283180 - vendor/clang/clang-release_361-r237755 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:58:51 -0000 Author: dim Date: Thu May 21 06:58:50 2015 New Revision: 283180 URL: https://svnweb.freebsd.org/changeset/base/283180 Log: Tag clang tags/RELEASE_361/final r237755 (effectively, 3.6.1 release). Added: - copied from r283179, vendor/clang/dist/ Directory Properties: vendor/clang/clang-release_361-r237755/ (props changed) From owner-svn-src-all@FreeBSD.ORG Thu May 21 07:01:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 07:07:29 2015 Return-Path: Delivered-To: svn-src-all@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 AFE18D4D; Thu, 21 May 2015 07:07: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 9D68A1AFB; Thu, 21 May 2015 07:07: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 t4L77T7W006167; Thu, 21 May 2015 07:07:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L77TbB006166; Thu, 21 May 2015 07:07:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210707.t4L77TbB006166@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 07:07:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283182 - stable/9/sys/dev/sound/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:07:29 -0000 Author: hselasky Date: Thu May 21 07:07:28 2015 New Revision: 283182 URL: https://svnweb.freebsd.org/changeset/base/283182 Log: MFC r282652: Ensure the USB audio driver doesn't attach twice on the same USB device by grabbing all the USB audio device interfaces. Modified: stable/9/sys/dev/sound/usb/uaudio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Thu May 21 07:01:08 2015 (r283181) +++ stable/9/sys/dev/sound/usb/uaudio.c Thu May 21 07:07:28 2015 (r283182) @@ -1574,6 +1574,19 @@ uaudio_chan_fill_info_sub(struct uaudio_ asf1d.v1 = NULL; ed1 = NULL; sed.v1 = NULL; + + /* + * There can only be one USB audio instance + * per USB device. Grab all USB audio + * interfaces on this USB device so that we + * don't attach USB audio twice: + */ + if (alt_index == 0 && curidx != sc->sc_mixer_iface_index && + (id->bInterfaceClass == UICLASS_AUDIO || audio_if != 0 || + midi_if != 0)) { + usbd_set_parent_iface(sc->sc_udev, curidx, + sc->sc_mixer_iface_index); + } } if (audio_if == 0) { @@ -1809,9 +1822,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; - usbd_set_parent_iface(sc->sc_udev, curidx, - sc->sc_mixer_iface_index); - if (ep_dir == UE_DIR_IN) chan_alt->usb_cfg = uaudio_cfg_record; else From owner-svn-src-all@FreeBSD.ORG Thu May 21 07:09:02 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 07:09:20 2015 Return-Path: Delivered-To: svn-src-all@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 8E25C1F3; Thu, 21 May 2015 07:09: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 7C02C1B2D; Thu, 21 May 2015 07:09: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 t4L79KKq006532; Thu, 21 May 2015 07:09:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L79KKt006531; Thu, 21 May 2015 07:09:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210709.t4L79KKt006531@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 07:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r283184 - stable/8/sys/dev/sound/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:09:20 -0000 Author: hselasky Date: Thu May 21 07:09:19 2015 New Revision: 283184 URL: https://svnweb.freebsd.org/changeset/base/283184 Log: MFC r282652: Ensure the USB audio driver doesn't attach twice on the same USB device by grabbing all the USB audio device interfaces. Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Thu May 21 07:09:01 2015 (r283183) +++ stable/8/sys/dev/sound/usb/uaudio.c Thu May 21 07:09:19 2015 (r283184) @@ -1574,6 +1574,19 @@ uaudio_chan_fill_info_sub(struct uaudio_ asf1d.v1 = NULL; ed1 = NULL; sed.v1 = NULL; + + /* + * There can only be one USB audio instance + * per USB device. Grab all USB audio + * interfaces on this USB device so that we + * don't attach USB audio twice: + */ + if (alt_index == 0 && curidx != sc->sc_mixer_iface_index && + (id->bInterfaceClass == UICLASS_AUDIO || audio_if != 0 || + midi_if != 0)) { + usbd_set_parent_iface(sc->sc_udev, curidx, + sc->sc_mixer_iface_index); + } } if (audio_if == 0) { @@ -1809,9 +1822,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; - usbd_set_parent_iface(sc->sc_udev, curidx, - sc->sc_mixer_iface_index); - if (ep_dir == UE_DIR_IN) chan_alt->usb_cfg = uaudio_cfg_record; else From owner-svn-src-all@FreeBSD.ORG Thu May 21 07:10:50 2015 Return-Path: Delivered-To: svn-src-all@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 1E8AC360; Thu, 21 May 2015 07:10: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 0C0561B52; Thu, 21 May 2015 07:10: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 t4L7An9d009404; Thu, 21 May 2015 07:10:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L7AnO0009403; Thu, 21 May 2015 07:10:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210710.t4L7AnO0009403@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 07:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283185 - stable/10/sys/dev/sound/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:10:50 -0000 Author: hselasky Date: Thu May 21 07:10:49 2015 New Revision: 283185 URL: https://svnweb.freebsd.org/changeset/base/283185 Log: MFC r282652: Ensure the USB audio driver doesn't attach twice on the same USB device by grabbing all the USB audio device interfaces. Modified: stable/10/sys/dev/sound/usb/uaudio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Thu May 21 07:09:19 2015 (r283184) +++ stable/10/sys/dev/sound/usb/uaudio.c Thu May 21 07:10:49 2015 (r283185) @@ -1574,6 +1574,19 @@ uaudio_chan_fill_info_sub(struct uaudio_ asf1d.v1 = NULL; ed1 = NULL; sed.v1 = NULL; + + /* + * There can only be one USB audio instance + * per USB device. Grab all USB audio + * interfaces on this USB device so that we + * don't attach USB audio twice: + */ + if (alt_index == 0 && curidx != sc->sc_mixer_iface_index && + (id->bInterfaceClass == UICLASS_AUDIO || audio_if != 0 || + midi_if != 0)) { + usbd_set_parent_iface(sc->sc_udev, curidx, + sc->sc_mixer_iface_index); + } } if (audio_if == 0) { @@ -1809,9 +1822,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; - usbd_set_parent_iface(sc->sc_udev, curidx, - sc->sc_mixer_iface_index); - if (ep_dir == UE_DIR_IN) chan_alt->usb_cfg = uaudio_cfg_record; else From owner-svn-src-all@FreeBSD.ORG Thu May 21 07:23:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 07:34:10 2015 Return-Path: Delivered-To: svn-src-all@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 27F15856; Thu, 21 May 2015 07:34: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 14F831E53; Thu, 21 May 2015 07:34: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 t4L7Y9h8020716; Thu, 21 May 2015 07:34:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L7Y9id020714; Thu, 21 May 2015 07:34:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210734.t4L7Y9id020714@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 07:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283187 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:34:10 -0000 Author: hselasky Date: Thu May 21 07:34:08 2015 New Revision: 283187 URL: https://svnweb.freebsd.org/changeset/base/283187 Log: MFC r282645, r282646 and r282730: * Prevent switching to NULL or own window in the "vt_proc_window_switch" function. This fixes an issue where X11 keyboard input can appear stuck. The cause of the problem is a duplicate TTY device window switch IOCTL during boot, which leaves the "vt_switch_timer" running, because the current window is already selected. While at it factor out some NULL checks. * The "SYSCTL_INT()" default value is only used for read only SYSCTLs and is not applicable unless the integer pointer is NULL. Set it to zero to avoid confusion. While at it remove extra semicolon at the end of the "VT_SYSCTL_INT()" macro. * Ensure the result from signed subtraction under modulus does not become negative. PR: 200032 Modified: stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Thu May 21 07:23:50 2015 (r283186) +++ stable/10/sys/dev/vt/vt.h Thu May 21 07:34:08 2015 (r283187) @@ -83,10 +83,10 @@ #define ISSIGVALID(sig) ((sig) > 0 && (sig) < NSIG) #define VT_SYSCTL_INT(_name, _default, _descr) \ -static int vt_##_name = _default; \ -SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RW, &vt_##_name, _default,\ +static int vt_##_name = (_default); \ +SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RWTUN, &vt_##_name, 0, \ _descr); \ -TUNABLE_INT("kern.vt." #_name, &vt_##_name); +TUNABLE_INT("kern.vt." #_name, &vt_##_name) struct vt_driver; Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Thu May 21 07:23:50 2015 (r283186) +++ stable/10/sys/dev/vt/vt_core.c Thu May 21 07:34:08 2015 (r283187) @@ -448,12 +448,35 @@ vt_proc_window_switch(struct vt_window * struct vt_device *vd; int ret; + /* Prevent switching to NULL */ + if (vw == NULL) { + DPRINTF(30, "%s: Cannot switch: vw is NULL.", __func__); + return (EINVAL); + } vd = vw->vw_device; curvw = vd->vd_curwindow; + /* Check if virtual terminal is locked */ if (curvw->vw_flags & VWF_VTYLOCK) return (EBUSY); + /* Check if switch already in progress */ + if (curvw->vw_flags & VWF_SWWAIT_REL) { + /* Check if switching to same window */ + if (curvw->vw_switch_to == vw) { + DPRINTF(30, "%s: Switch in progress to same vw.", __func__); + return (0); /* success */ + } + DPRINTF(30, "%s: Switch in progress to different vw.", __func__); + return (EBUSY); + } + + /* Avoid switching to already selected window */ + if (vw == curvw) { + DPRINTF(30, "%s: Cannot switch: vw == curvw.", __func__); + return (0); /* success */ + } + /* Ask current process permission to switch away. */ if (curvw->vw_smode.mode == VT_PROCESS) { DPRINTF(30, "%s: VT_PROCESS ", __func__); @@ -661,8 +684,7 @@ vt_scrollmode_kbdevent(struct vt_window if (console == 0) { if (c >= F_SCR && c <= MIN(L_SCR, F_SCR + VT_MAXWINDOWS - 1)) { vw = vd->vd_windows[c - F_SCR]; - if (vw != NULL) - vt_proc_window_switch(vw); + vt_proc_window_switch(vw); return; } VT_LOCK(vd); @@ -747,8 +769,7 @@ vt_processkey(keyboard_t *kbd, struct vt if (c >= F_SCR && c <= MIN(L_SCR, F_SCR + VT_MAXWINDOWS - 1)) { vw = vd->vd_windows[c - F_SCR]; - if (vw != NULL) - vt_proc_window_switch(vw); + vt_proc_window_switch(vw); return (0); } @@ -757,15 +778,13 @@ vt_processkey(keyboard_t *kbd, struct vt /* Switch to next VT. */ c = (vw->vw_number + 1) % VT_MAXWINDOWS; vw = vd->vd_windows[c]; - if (vw != NULL) - vt_proc_window_switch(vw); + vt_proc_window_switch(vw); return (0); case PREV: /* Switch to previous VT. */ - c = (vw->vw_number - 1) % VT_MAXWINDOWS; + c = (vw->vw_number + VT_MAXWINDOWS - 1) % VT_MAXWINDOWS; vw = vd->vd_windows[c]; - if (vw != NULL) - vt_proc_window_switch(vw); + vt_proc_window_switch(vw); return (0); case SLK: { vt_save_kbd_state(vw, kbd); @@ -2702,8 +2721,7 @@ vt_resume(struct vt_device *vd) if (vt_suspendswitch == 0) return; - /* Switch back to saved window */ - if (vd->vd_savedwindow != NULL) - vt_proc_window_switch(vd->vd_savedwindow); + /* Switch back to saved window, if any */ + vt_proc_window_switch(vd->vd_savedwindow); vd->vd_savedwindow = NULL; } From owner-svn-src-all@FreeBSD.ORG Thu May 21 07:35:21 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 07:41:04 2015 Return-Path: Delivered-To: svn-src-all@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 B3B9AD15; Thu, 21 May 2015 07:41: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 A11261F67; Thu, 21 May 2015 07:41: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 t4L7f4D7024799; Thu, 21 May 2015 07:41:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L7f47m024773; Thu, 21 May 2015 07:41:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210741.t4L7f47m024773@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 07:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283189 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:41:04 -0000 Author: hselasky Date: Thu May 21 07:41:03 2015 New Revision: 283189 URL: https://svnweb.freebsd.org/changeset/base/283189 Log: MFC r279726: Add DA_Q_NO_RC16 quirk for USB mass storage device. PR: 194062 Modified: stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Thu May 21 07:35:20 2015 (r283188) +++ stable/10/sys/cam/scsi/scsi_da.c Thu May 21 07:41:03 2015 (r283189) @@ -1177,6 +1177,13 @@ static struct da_quirk_entry da_quirk_ta }, { /* + * Hama Innostor USB-Stick + */ + { T_DIRECT, SIP_MEDIA_REMOVABLE, "Innostor", "Innostor*", "*" }, + /*quirks*/DA_Q_NO_RC16 + }, + { + /* * MX-ES USB Drive by Mach Xtreme */ { T_DIRECT, SIP_MEDIA_REMOVABLE, "MX", "MXUB3*", "*"}, From owner-svn-src-all@FreeBSD.ORG Thu May 21 07:42:46 2015 Return-Path: Delivered-To: svn-src-all@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 CA72FE6E; Thu, 21 May 2015 07:42: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 B7BCD1F8D; Thu, 21 May 2015 07:42: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 t4L7gkSS025597; Thu, 21 May 2015 07:42:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L7gkpd025596; Thu, 21 May 2015 07:42:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210742.t4L7gkpd025596@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 07:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283190 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:42:46 -0000 Author: hselasky Date: Thu May 21 07:42:46 2015 New Revision: 283190 URL: https://svnweb.freebsd.org/changeset/base/283190 Log: MFC r279726: Add DA_Q_NO_RC16 quirk for USB mass storage device. PR: 194062 Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Thu May 21 07:41:03 2015 (r283189) +++ stable/9/sys/cam/scsi/scsi_da.c Thu May 21 07:42:46 2015 (r283190) @@ -1144,6 +1144,13 @@ static struct da_quirk_entry da_quirk_ta { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SG9XCS2D*", "*" }, /*quirks*/DA_Q_4K }, + { + /* + * Hama Innostor USB-Stick + */ + { T_DIRECT, SIP_MEDIA_REMOVABLE, "Innostor", "Innostor*", "*" }, + /*quirks*/DA_Q_NO_RC16 + }, }; static disk_strategy_t dastrategy; From owner-svn-src-all@FreeBSD.ORG Thu May 21 07:46:02 2015 Return-Path: Delivered-To: svn-src-all@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 8E11C135; Thu, 21 May 2015 07:46: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 7BA6F1FBB; Thu, 21 May 2015 07:46: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 t4L7k2Nc026157; Thu, 21 May 2015 07:46:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L7k2aL026156; Thu, 21 May 2015 07:46:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210746.t4L7k2aL026156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 07:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283191 - stable/9/sys/dev/sound/pcm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:46:02 -0000 Author: hselasky Date: Thu May 21 07:46:01 2015 New Revision: 283191 URL: https://svnweb.freebsd.org/changeset/base/283191 Log: MFC r282017: Allow DSP basename cloning to be disabled or enabled at boot and runtime. This is useful when implementing OSS sound stacks in userspace via libcuse for example. Modified: stable/9/sys/dev/sound/pcm/dsp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pcm/dsp.c ============================================================================== --- stable/9/sys/dev/sound/pcm/dsp.c Thu May 21 07:42:46 2015 (r283190) +++ stable/9/sys/dev/sound/pcm/dsp.c Thu May 21 07:46:01 2015 (r283191) @@ -46,6 +46,12 @@ SYSCTL_INT(_hw_snd, OID_AUTO, compat_lin &dsp_mmap_allow_prot_exec, 0, "linux mmap compatibility (-1=force disable 0=auto 1=force enable)"); +static int dsp_basename_clone = 1; +SYSCTL_INT(_hw_snd, OID_AUTO, basename_clone, CTLFLAG_RWTUN, + &dsp_basename_clone, 0, + "DSP basename cloning (0: Disable; 1: Enabled)"); +TUNABLE_INT("hw.snd.basename_clone", &dsp_basename_clone); + struct dsp_cdevinfo { struct pcm_channel *rdch, *wrch; struct pcm_channel *volch; @@ -2357,9 +2363,10 @@ dsp_clone(void *arg, devname = devcmp; devhw = dsp_cdevs[i].hw; devcmax = dsp_cdevs[i].max - 1; - if (strcmp(name, devcmp) == 0) - unit = snd_unit; - else if (dsp_stdclone(name, devcmp, devsep, + if (strcmp(name, devcmp) == 0) { + if (dsp_basename_clone != 0) + unit = snd_unit; + } else if (dsp_stdclone(name, devcmp, devsep, dsp_cdevs[i].use_sep, &unit, &cunit) != 0) { unit = -1; cunit = -1; From owner-svn-src-all@FreeBSD.ORG Thu May 21 07:48:07 2015 Return-Path: Delivered-To: svn-src-all@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 6D0BB296; Thu, 21 May 2015 07:48: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 5A9DE1FD5; Thu, 21 May 2015 07:48: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 t4L7m7Yf026496; Thu, 21 May 2015 07:48:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L7m7eQ026495; Thu, 21 May 2015 07:48:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210748.t4L7m7eQ026495@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 07:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283192 - stable/10/sys/dev/sound/pcm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:48:07 -0000 Author: hselasky Date: Thu May 21 07:48:06 2015 New Revision: 283192 URL: https://svnweb.freebsd.org/changeset/base/283192 Log: MFC r282017: Allow DSP basename cloning to be disabled or enabled at boot and runtime. This is useful when implementing OSS sound stacks in userspace via libcuse for example. Modified: stable/10/sys/dev/sound/pcm/dsp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pcm/dsp.c ============================================================================== --- stable/10/sys/dev/sound/pcm/dsp.c Thu May 21 07:46:01 2015 (r283191) +++ stable/10/sys/dev/sound/pcm/dsp.c Thu May 21 07:48:06 2015 (r283192) @@ -48,6 +48,12 @@ SYSCTL_INT(_hw_snd, OID_AUTO, compat_lin &dsp_mmap_allow_prot_exec, 0, "linux mmap compatibility (-1=force disable 0=auto 1=force enable)"); +static int dsp_basename_clone = 1; +SYSCTL_INT(_hw_snd, OID_AUTO, basename_clone, CTLFLAG_RWTUN, + &dsp_basename_clone, 0, + "DSP basename cloning (0: Disable; 1: Enabled)"); +TUNABLE_INT("hw.snd.basename_clone", &dsp_basename_clone); + struct dsp_cdevinfo { struct pcm_channel *rdch, *wrch; struct pcm_channel *volch; @@ -2359,9 +2365,10 @@ dsp_clone(void *arg, devname = devcmp; devhw = dsp_cdevs[i].hw; devcmax = dsp_cdevs[i].max - 1; - if (strcmp(name, devcmp) == 0) - unit = snd_unit; - else if (dsp_stdclone(name, devcmp, devsep, + if (strcmp(name, devcmp) == 0) { + if (dsp_basename_clone != 0) + unit = snd_unit; + } else if (dsp_stdclone(name, devcmp, devsep, dsp_cdevs[i].use_sep, &unit, &cunit) != 0) { unit = -1; cunit = -1; From owner-svn-src-all@FreeBSD.ORG Thu May 21 07:49:46 2015 Return-Path: Delivered-To: svn-src-all@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 059315D8; Thu, 21 May 2015 07:49: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 E70241FFB; Thu, 21 May 2015 07:49: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 t4L7njQX027044; Thu, 21 May 2015 07:49:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L7njm9027040; Thu, 21 May 2015 07:49:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210749.t4L7njm9027040@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 07:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283193 - in stable/10/sys/dev/usb: . serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:49:46 -0000 Author: hselasky Date: Thu May 21 07:49:44 2015 New Revision: 283193 URL: https://svnweb.freebsd.org/changeset/base/283193 Log: MFC r282505: Add new USB ID. PR: 199843 Modified: stable/10/sys/dev/usb/serial/uftdi.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/10/sys/dev/usb/serial/uftdi.c Thu May 21 07:48:06 2015 (r283192) +++ stable/10/sys/dev/usb/serial/uftdi.c Thu May 21 07:49:44 2015 (r283193) @@ -497,6 +497,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(FTDI, SCS_DEVICE_5, 0), UFTDI_DEV(FTDI, SCS_DEVICE_6, 0), UFTDI_DEV(FTDI, SCS_DEVICE_7, 0), + UFTDI_DEV(FTDI, SCX8_USB_PHOENIX, 0), UFTDI_DEV(FTDI, SDMUSBQSS, 0), UFTDI_DEV(FTDI, SEMC_DSS20, 0), UFTDI_DEV(FTDI, SERIAL_2232C, UFTDI_JTAG_CHECK_STRING), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Thu May 21 07:48:06 2015 (r283192) +++ stable/10/sys/dev/usb/usbdevs Thu May 21 07:49:44 2015 (r283193) @@ -1851,6 +1851,7 @@ product FREECOM HDD 0xfc05 Classic SL H product FSC E5400 0x1009 PrismGT USB 2.0 WLAN /* Future Technology Devices products */ +product FTDI SCX8_USB_PHOENIX 0x5259 SCx8 USB Phoenix interface product FTDI SERIAL_8U100AX 0x8372 8U100AX Serial product FTDI SERIAL_8U232AM 0x6001 8U232AM Serial product FTDI SERIAL_8U232AM4 0x6004 8U232AM Serial From owner-svn-src-all@FreeBSD.ORG Thu May 21 07:50:57 2015 Return-Path: Delivered-To: svn-src-all@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 B25D973A; Thu, 21 May 2015 07:50: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 9FAC710E4; Thu, 21 May 2015 07:50: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 t4L7ovh1030896; Thu, 21 May 2015 07:50:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L7ovp3030891; Thu, 21 May 2015 07:50:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505210750.t4L7ovp3030891@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 May 2015 07:50:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283194 - in stable/9/sys/dev/usb: . serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 07:50:57 -0000 Author: hselasky Date: Thu May 21 07:50:56 2015 New Revision: 283194 URL: https://svnweb.freebsd.org/changeset/base/283194 Log: MFC r282505: Add new USB ID. PR: 199843 Modified: stable/9/sys/dev/usb/serial/uftdi.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/9/sys/dev/usb/serial/uftdi.c Thu May 21 07:49:44 2015 (r283193) +++ stable/9/sys/dev/usb/serial/uftdi.c Thu May 21 07:50:56 2015 (r283194) @@ -497,6 +497,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(FTDI, SCS_DEVICE_5, 0), UFTDI_DEV(FTDI, SCS_DEVICE_6, 0), UFTDI_DEV(FTDI, SCS_DEVICE_7, 0), + UFTDI_DEV(FTDI, SCX8_USB_PHOENIX, 0), UFTDI_DEV(FTDI, SDMUSBQSS, 0), UFTDI_DEV(FTDI, SEMC_DSS20, 0), UFTDI_DEV(FTDI, SERIAL_2232C, UFTDI_JTAG_CHECK_STRING), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Thu May 21 07:49:44 2015 (r283193) +++ stable/9/sys/dev/usb/usbdevs Thu May 21 07:50:56 2015 (r283194) @@ -1851,6 +1851,7 @@ product FREECOM HDD 0xfc05 Classic SL H product FSC E5400 0x1009 PrismGT USB 2.0 WLAN /* Future Technology Devices products */ +product FTDI SCX8_USB_PHOENIX 0x5259 SCx8 USB Phoenix interface product FTDI SERIAL_8U100AX 0x8372 8U100AX Serial product FTDI SERIAL_8U232AM 0x6001 8U232AM Serial product FTDI SERIAL_8U232AM4 0x6004 8U232AM Serial From owner-svn-src-all@FreeBSD.ORG Thu May 21 08:20:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 08:23:46 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 08:26:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 08:28:36 2015 Return-Path: Delivered-To: svn-src-all@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 883C084B; Thu, 21 May 2015 08:28: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 75E9216F4; Thu, 21 May 2015 08:28: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 t4L8SaCR046941; Thu, 21 May 2015 08:28:36 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L8Sa4m046940; Thu, 21 May 2015 08:28:36 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505210828.t4L8Sa4m046940@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 21 May 2015 08:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283198 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 08:28:36 -0000 Author: ae Date: Thu May 21 08:28:35 2015 New Revision: 283198 URL: https://svnweb.freebsd.org/changeset/base/283198 Log: MFC r282594: m_dup() is supposed to give a writable copy of an mbuf chain. It uses m_dup_pkthdr(), that uses M_COPYFLAGS mask to copy m_flags field. If original mbuf chain has M_RDONLY flag, its copy also will have it. Reset this flag explicitly. Modified: stable/10/sys/kern/uipc_mbuf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_mbuf.c ============================================================================== --- stable/10/sys/kern/uipc_mbuf.c Thu May 21 08:26:24 2015 (r283197) +++ stable/10/sys/kern/uipc_mbuf.c Thu May 21 08:28:35 2015 (r283198) @@ -934,6 +934,7 @@ m_dup(struct mbuf *m, int how) } if ((n->m_flags & M_EXT) == 0) nsize = MHLEN; + n->m_flags &= ~M_RDONLY; } n->m_len = 0; From owner-svn-src-all@FreeBSD.ORG Thu May 21 08:28:49 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 08:32:53 2015 Return-Path: Delivered-To: svn-src-all@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 A1482B4E; Thu, 21 May 2015 08:32: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 8F5D717D2; Thu, 21 May 2015 08:32: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 t4L8WrS6051225; Thu, 21 May 2015 08:32:53 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L8WrGv051224; Thu, 21 May 2015 08:32:53 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505210832.t4L8WrGv051224@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 21 May 2015 08:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283200 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 08:32:53 -0000 Author: ae Date: Thu May 21 08:32:52 2015 New Revision: 283200 URL: https://svnweb.freebsd.org/changeset/base/283200 Log: MFC r282594: m_dup() is supposed to give a writable copy of an mbuf chain. It uses m_dup_pkthdr(), that uses M_COPYFLAGS mask to copy m_flags field. If original mbuf chain has M_RDONLY flag, its copy also will have it. Reset this flag explicitly. Modified: stable/9/sys/kern/uipc_mbuf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_mbuf.c ============================================================================== --- stable/9/sys/kern/uipc_mbuf.c Thu May 21 08:28:48 2015 (r283199) +++ stable/9/sys/kern/uipc_mbuf.c Thu May 21 08:32:52 2015 (r283200) @@ -867,6 +867,7 @@ m_dup(struct mbuf *m, int how) } if ((n->m_flags & M_EXT) == 0) nsize = MHLEN; + n->m_flags &= ~M_RDONLY; } n->m_len = 0; From owner-svn-src-all@FreeBSD.ORG Thu May 21 08:38:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 08:55:07 2015 Return-Path: Delivered-To: svn-src-all@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 C679F5B4; Thu, 21 May 2015 08:55: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 B44B61AFE; Thu, 21 May 2015 08:55: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 t4L8t7fL061557; Thu, 21 May 2015 08:55:07 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L8t7hw061556; Thu, 21 May 2015 08:55:07 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210855.t4L8t7hw061556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 08:55:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283202 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 08:55:07 -0000 Author: arybchik Date: Thu May 21 08:55:06 2015 New Revision: 283202 URL: https://svnweb.freebsd.org/changeset/base/283202 Log: MFC: r282897 sfxge: add missing const qualifier to sfxge_link_mode Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_port.c Thu May 21 08:38:25 2015 (r283201) +++ stable/10/sys/dev/sfxge/sfxge_port.c Thu May 21 08:55:06 2015 (r283202) @@ -624,7 +624,7 @@ fail: return (rc); } -static int sfxge_link_mode[EFX_PHY_MEDIA_NTYPES][EFX_LINK_NMODES] = { +static const int sfxge_link_mode[EFX_PHY_MEDIA_NTYPES][EFX_LINK_NMODES] = { [EFX_PHY_MEDIA_CX4] = { [EFX_LINK_10000FDX] = IFM_ETHER | IFM_FDX | IFM_10G_CX4, }, From owner-svn-src-all@FreeBSD.ORG Thu May 21 08:59:04 2015 Return-Path: Delivered-To: svn-src-all@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 F3F5F774; Thu, 21 May 2015 08:59: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 E23D71B32; Thu, 21 May 2015 08:59: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 t4L8x363062092; Thu, 21 May 2015 08:59:03 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L8x33W062091; Thu, 21 May 2015 08:59:03 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210859.t4L8x33W062091@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 08:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283203 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 08:59:04 -0000 Author: arybchik Date: Thu May 21 08:59:03 2015 New Revision: 283203 URL: https://svnweb.freebsd.org/changeset/base/283203 Log: MFC: r282899 sfxge: add local variable with Rx descriptor flags Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 08:55:06 2015 (r283202) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 08:59:03 2015 (r283203) @@ -322,16 +322,17 @@ static void sfxge_rx_deliver(struct sfxge_softc *sc, struct sfxge_rx_sw_desc *rx_desc) { struct mbuf *m = rx_desc->mbuf; + int flags = rx_desc->flags; int csum_flags; /* Convert checksum flags */ - csum_flags = (rx_desc->flags & EFX_CKSUM_IPV4) ? + csum_flags = (flags & EFX_CKSUM_IPV4) ? (CSUM_IP_CHECKED | CSUM_IP_VALID) : 0; - if (rx_desc->flags & EFX_CKSUM_TCPUDP) + if (flags & EFX_CKSUM_TCPUDP) csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; /* The hash covers a 4-tuple for TCP only */ - if (rx_desc->flags & EFX_PKT_TCP) { + if (flags & EFX_PKT_TCP) { m->m_pkthdr.flowid = EFX_RX_HASH_VALUE(EFX_RX_HASHALG_TOEPLITZ, mtod(m, uint8_t *)); M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:00:46 2015 Return-Path: Delivered-To: svn-src-all@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 45FB4A3A; Thu, 21 May 2015 09: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 349AF1B6C; Thu, 21 May 2015 09:00: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 t4L90krA065575; Thu, 21 May 2015 09:00:46 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L90kjr065574; Thu, 21 May 2015 09:00:46 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210900.t4L90kjr065574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283204 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:00:46 -0000 Author: arybchik Date: Thu May 21 09:00:45 2015 New Revision: 283204 URL: https://svnweb.freebsd.org/changeset/base/283204 Log: MFC: r282900 sfxge: IPv4 Tx checksum offload may be disabled in fact Split IFCAP_HWCSUM to IFCAP_RXCSUM and IFCAP_TXCSUM to highlight Tx and Rx. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 08:59:03 2015 (r283203) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:00:45 2015 (r283204) @@ -58,12 +58,12 @@ __FBSDID("$FreeBSD$"); #include "sfxge_rx.h" #include "sfxge_version.h" -#define SFXGE_CAP (IFCAP_VLAN_MTU | \ - IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | \ +#define SFXGE_CAP (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ + IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO | \ IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #define SFXGE_CAP_ENABLE SFXGE_CAP -#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | \ +#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_RXCSUM | IFCAP_VLAN_HWCSUM | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE) MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:03:19 2015 Return-Path: Delivered-To: svn-src-all@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 6D7CFBB1; Thu, 21 May 2015 09:03: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 41D5C1C3E; Thu, 21 May 2015 09:03: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 t4L93Jm6066464; Thu, 21 May 2015 09:03:19 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L93Ivw066462; Thu, 21 May 2015 09:03:18 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210903.t4L93Ivw066462@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:03:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283205 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:03:19 -0000 Author: arybchik Date: Thu May 21 09:03:18 2015 New Revision: 283205 URL: https://svnweb.freebsd.org/changeset/base/283205 Log: MFC: r282903 sfxge: advertise IPv6 Rx and Tx checksum offload support Tx checksum offload may be enabled/disabled. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:00:45 2015 (r283204) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:03:18 2015 (r283205) @@ -60,10 +60,12 @@ __FBSDID("$FreeBSD$"); #define SFXGE_CAP (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO | \ + IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6 | \ IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #define SFXGE_CAP_ENABLE SFXGE_CAP #define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_RXCSUM | IFCAP_VLAN_HWCSUM | \ + IFCAP_RXCSUM_IPV6 | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE) MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); @@ -275,6 +277,10 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign ifp->if_hwassist |= (CSUM_IP | CSUM_TCP | CSUM_UDP); else ifp->if_hwassist &= ~(CSUM_IP | CSUM_TCP | CSUM_UDP); + if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) + ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); + else + ifp->if_hwassist &= ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); if (ifp->if_capenable & IFCAP_TSO) ifp->if_hwassist |= CSUM_TSO; else @@ -325,7 +331,8 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ifp->if_capabilities = SFXGE_CAP; ifp->if_capenable = SFXGE_CAP_ENABLE; - ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO; + ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | + CSUM_TCP_IPV6 | CSUM_UDP_IPV6; ether_ifattach(ifp, encp->enc_mac_addr); Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:00:45 2015 (r283204) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:03:18 2015 (r283205) @@ -699,7 +699,8 @@ sfxge_if_transmit(struct ifnet *ifp, str ("interface not up")); /* Pick the desired transmit queue. */ - if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_TSO)) { + if (m->m_pkthdr.csum_flags & + (CSUM_DELAY_DATA | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_TSO)) { int index = 0; /* check if flowid is set */ From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:05:14 2015 Return-Path: Delivered-To: svn-src-all@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 AE0ABD1E; Thu, 21 May 2015 09:05: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 81FB11C54; Thu, 21 May 2015 09:05: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 t4L95EFg066804; Thu, 21 May 2015 09:05:14 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L95Eiq066803; Thu, 21 May 2015 09:05:14 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210905.t4L95Eiq066803@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283206 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:05:14 -0000 Author: arybchik Date: Thu May 21 09:05:13 2015 New Revision: 283206 URL: https://svnweb.freebsd.org/changeset/base/283206 Log: MFC: r282940 sfxge: LRO may be done only if checksums are OK Also it is cheaper to check Rx descriptor flags than TCP protocol in IP header. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 09:03:18 2015 (r283205) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 09:05:13 2015 (r283206) @@ -681,15 +681,18 @@ sfxge_lro(struct sfxge_rxq *rxq, struct */ if (l3_proto == htons(ETHERTYPE_IP)) { struct ip *iph = nh; - if ((iph->ip_p - IPPROTO_TCP) | - (iph->ip_hl - (sizeof(*iph) >> 2u)) | + + KASSERT(iph->ip_p == IPPROTO_TCP, + ("IPv4 protocol is not TCP, but packet marker is set")); + if ((iph->ip_hl - (sizeof(*iph) >> 2u)) | (iph->ip_off & htons(IP_MF | IP_OFFMASK))) goto deliver_now; th = (struct tcphdr *)(iph + 1); } else if (l3_proto == htons(ETHERTYPE_IPV6)) { struct ip6_hdr *iph = nh; - if (iph->ip6_nxt != IPPROTO_TCP) - goto deliver_now; + + KASSERT(iph->ip6_nxt == IPPROTO_TCP, + ("IPv6 next header is not TCP, but packet marker is set")); l2_id |= SFXGE_LRO_L2_ID_IPV6; th = (struct tcphdr *)(iph + 1); } else { @@ -834,7 +837,9 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq /* Pass packet up the stack or into LRO (pipelined) */ if (prev != NULL) { - if (lro_enabled) + if (lro_enabled && + ((prev->flags & (EFX_PKT_TCP | EFX_CKSUM_TCPUDP)) == + (EFX_PKT_TCP | EFX_CKSUM_TCPUDP))) sfxge_lro(rxq, prev); else sfxge_rx_deliver(sc, prev); @@ -853,7 +858,9 @@ discard: /* Pass last packet up the stack or into LRO */ if (prev != NULL) { - if (lro_enabled) + if (lro_enabled && + ((prev->flags & (EFX_PKT_TCP | EFX_CKSUM_TCPUDP)) == + (EFX_PKT_TCP | EFX_CKSUM_TCPUDP))) sfxge_lro(rxq, prev); else sfxge_rx_deliver(sc, prev); From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:06:42 2015 Return-Path: Delivered-To: svn-src-all@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 A738EEB6; Thu, 21 May 2015 09:06: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 94D941C6A; Thu, 21 May 2015 09:06: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 t4L96gOq067049; Thu, 21 May 2015 09:06:42 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L96gWE067048; Thu, 21 May 2015 09:06:42 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210906.t4L96gWE067048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283207 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:06:42 -0000 Author: arybchik Date: Thu May 21 09:06:41 2015 New Revision: 283207 URL: https://svnweb.freebsd.org/changeset/base/283207 Log: MFC: r282941 sfxge: do not change CSUM_TSO when IFCAP_TSOx is changed It is simply not required since the kernel checks corresponding IFCAP_TSOx capability and CSUM_TSO in hw-assisted offloads. Note that CSUM_TSO is two bits (CSUM_IP_TSO|CSUM_IP6_TSO) and both bits are set in IPv4 and IPv6 mbufs. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:05:13 2015 (r283206) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:06:41 2015 (r283207) @@ -281,10 +281,14 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); else ifp->if_hwassist &= ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); - if (ifp->if_capenable & IFCAP_TSO) - ifp->if_hwassist |= CSUM_TSO; - else - ifp->if_hwassist &= ~CSUM_TSO; + + /* + * The kernel takes both IFCAP_TSOx and CSUM_TSO into + * account before using TSO. So, we do not touch + * checksum flags when IFCAP_TSOx is modified. + * Note that CSUM_TSO is (CSUM_IP_TSO|CSUM_IP6_TSO), + * but both bits are set in IPv4 and IPv6 mbufs. + */ SFXGE_ADAPTER_UNLOCK(sc); break; From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:08:12 2015 Return-Path: Delivered-To: svn-src-all@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 DC90C10E; Thu, 21 May 2015 09:08: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 BEEF71C93; Thu, 21 May 2015 09:08: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 t4L98BH6067314; Thu, 21 May 2015 09:08:11 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L98BP6067311; Thu, 21 May 2015 09:08:11 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210908.t4L98BP6067311@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283208 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:08:12 -0000 Author: arybchik Date: Thu May 21 09:08:10 2015 New Revision: 283208 URL: https://svnweb.freebsd.org/changeset/base/283208 Log: MFC: r282942 sfxge: split sfxge_tx_qdpl_put() into *_locked() and *_unlocked() It simplifies understanding of the sfxge_tx_packet_add() logic and avoids passing of 'locked' to called function. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:06:41 2015 (r283207) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:08:10 2015 (r283208) @@ -521,18 +521,10 @@ sfxge_tx_qdpl_service(struct sfxge_txq * } /* - * Put a packet on the deferred packet list. - * - * If we are called with the txq lock held, we put the packet on the "get - * list", otherwise we atomically push it on the "put list". The swizzle - * function takes care of ordering. - * - * The length of the put list is bounded by SFXGE_TX_MAX_DEFERRED. We - * overload the csum_data field in the mbuf to keep track of this length - * because there is no cheap alternative to avoid races. + * Put a packet on the deferred packet get-list. */ static int -sfxge_tx_qdpl_put(struct sfxge_txq *txq, struct mbuf *mbuf, int locked) +sfxge_tx_qdpl_put_locked(struct sfxge_txq *txq, struct mbuf *mbuf) { struct sfxge_tx_dpl *stdp; @@ -540,52 +532,66 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, KASSERT(mbuf->m_nextpkt == NULL, ("mbuf->m_nextpkt != NULL")); - if (locked) { - SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); - - sfxge_tx_qdpl_swizzle(txq); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); - if (stdp->std_get_count >= stdp->std_get_max) { - txq->get_overflow++; + if (stdp->std_get_count >= stdp->std_get_max) { + txq->get_overflow++; + return (ENOBUFS); + } + if (sfxge_is_mbuf_non_tcp(mbuf)) { + if (stdp->std_get_non_tcp_count >= + stdp->std_get_non_tcp_max) { + txq->get_non_tcp_overflow++; return (ENOBUFS); } - if (sfxge_is_mbuf_non_tcp(mbuf)) { - if (stdp->std_get_non_tcp_count >= - stdp->std_get_non_tcp_max) { - txq->get_non_tcp_overflow++; - return (ENOBUFS); - } - stdp->std_get_non_tcp_count++; - } - - *(stdp->std_getp) = mbuf; - stdp->std_getp = &mbuf->m_nextpkt; - stdp->std_get_count++; - } else { - volatile uintptr_t *putp; - uintptr_t old; - uintptr_t new; - unsigned old_len; - - putp = &stdp->std_put; - new = (uintptr_t)mbuf; - - do { - old = *putp; - if (old != 0) { - struct mbuf *mp = (struct mbuf *)old; - old_len = mp->m_pkthdr.csum_data; - } else - old_len = 0; - if (old_len >= stdp->std_put_max) { - atomic_add_long(&txq->put_overflow, 1); - return (ENOBUFS); - } - mbuf->m_pkthdr.csum_data = old_len + 1; - mbuf->m_nextpkt = (void *)old; - } while (atomic_cmpset_ptr(putp, old, new) == 0); + stdp->std_get_non_tcp_count++; } + *(stdp->std_getp) = mbuf; + stdp->std_getp = &mbuf->m_nextpkt; + stdp->std_get_count++; + + return (0); +} + +/* + * Put a packet on the deferred packet put-list. + * + * We overload the csum_data field in the mbuf to keep track of this length + * because there is no cheap alternative to avoid races. + */ +static int +sfxge_tx_qdpl_put_unlocked(struct sfxge_txq *txq, struct mbuf *mbuf) +{ + struct sfxge_tx_dpl *stdp; + volatile uintptr_t *putp; + uintptr_t old; + uintptr_t new; + unsigned old_len; + + KASSERT(mbuf->m_nextpkt == NULL, ("mbuf->m_nextpkt != NULL")); + + SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(txq); + + stdp = &txq->dpl; + putp = &stdp->std_put; + new = (uintptr_t)mbuf; + + do { + old = *putp; + if (old != 0) { + struct mbuf *mp = (struct mbuf *)old; + old_len = mp->m_pkthdr.csum_data; + } else + old_len = 0; + if (old_len >= stdp->std_put_max) { + atomic_add_long(&txq->put_overflow, 1); + return (ENOBUFS); + } + mbuf->m_pkthdr.csum_data = old_len + 1; + mbuf->m_nextpkt = (void *)old; + } while (atomic_cmpset_ptr(putp, old, new) == 0); + return (0); } @@ -612,22 +618,29 @@ sfxge_tx_packet_add(struct sfxge_txq *tx */ locked = SFXGE_TXQ_TRYLOCK(txq); - if (sfxge_tx_qdpl_put(txq, m, locked) != 0) { - if (locked) + if (locked) { + /* First swizzle put-list to get-list to keep order */ + sfxge_tx_qdpl_swizzle(txq); + + rc = sfxge_tx_qdpl_put_locked(txq, m); + if (rc != 0) { SFXGE_TXQ_UNLOCK(txq); - rc = ENOBUFS; - goto fail; - } + goto fail; + } + } else { + rc = sfxge_tx_qdpl_put_unlocked(txq, m); + if (rc != 0) + goto fail; - /* - * Try to grab the lock again. - * - * If we are able to get the lock, we need to process the deferred - * packet list. If we are not able to get the lock, another thread - * is processing the list. - */ - if (!locked) + /* + * Try to grab the lock again. + * + * If we are able to get the lock, we need to process + * the deferred packet list. If we are not able to get + * the lock, another thread is processing the list. + */ locked = SFXGE_TXQ_TRYLOCK(txq); + } if (locked) { /* Try to service the list. */ Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Thu May 21 09:06:41 2015 (r283207) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Thu May 21 09:08:10 2015 (r283208) @@ -148,6 +148,8 @@ enum sfxge_txq_type { mtx_unlock(&(_txq)->lock) #define SFXGE_TXQ_LOCK_ASSERT_OWNED(_txq) \ mtx_assert(&(_txq)->lock, MA_OWNED) +#define SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(_txq) \ + mtx_assert(&(_txq)->lock, MA_NOTOWNED) struct sfxge_txq { From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:09:53 2015 Return-Path: Delivered-To: svn-src-all@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 EA73C26F; Thu, 21 May 2015 09:09: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 CBDB91CAA; Thu, 21 May 2015 09:09: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 t4L99qBp067584; Thu, 21 May 2015 09:09:52 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L99qdK067582; Thu, 21 May 2015 09:09:52 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210909.t4L99qdK067582@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:09:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283209 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:09:53 -0000 Author: arybchik Date: Thu May 21 09:09:51 2015 New Revision: 283209 URL: https://svnweb.freebsd.org/changeset/base/283209 Log: MFC: r282996 sfxge: support Rx checksum offloads disabling We can't disable it in HW, but we can ignore result. Discard Rx descriptor checksum flags if Rx checksum offload is off. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:08:10 2015 (r283208) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:09:51 2015 (r283209) @@ -64,8 +64,7 @@ __FBSDID("$FreeBSD$"); IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #define SFXGE_CAP_ENABLE SFXGE_CAP -#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_RXCSUM | IFCAP_VLAN_HWCSUM | \ - IFCAP_RXCSUM_IPV6 | \ +#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE) MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 09:08:10 2015 (r283208) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 09:09:51 2015 (r283209) @@ -788,7 +788,8 @@ void sfxge_rx_qcomplete(struct sfxge_rxq *rxq, boolean_t eop) { struct sfxge_softc *sc = rxq->sc; - int lro_enabled = sc->ifnet->if_capenable & IFCAP_LRO; + int if_capenable = sc->ifnet->if_capenable; + int lro_enabled = if_capenable & IFCAP_LRO; unsigned int index; struct sfxge_evq *evq; unsigned int completed; @@ -818,21 +819,37 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq prefetch_read_many(mtod(m, caddr_t)); - /* Check for loopback packets */ - if (!(rx_desc->flags & EFX_PKT_IPV4) && - !(rx_desc->flags & EFX_PKT_IPV6)) { - struct ether_header *etherhp; - - /*LINTED*/ - etherhp = mtod(m, struct ether_header *); - - if (etherhp->ether_type == - htons(SFXGE_ETHERTYPE_LOOPBACK)) { - EFSYS_PROBE(loopback); - - rxq->loopback++; - goto discard; + switch (rx_desc->flags & (EFX_PKT_IPV4 | EFX_PKT_IPV6)) { + case EFX_PKT_IPV4: + if (~if_capenable & IFCAP_RXCSUM) + rx_desc->flags &= + ~(EFX_CKSUM_IPV4 | EFX_CKSUM_TCPUDP); + break; + case EFX_PKT_IPV6: + if (~if_capenable & IFCAP_RXCSUM_IPV6) + rx_desc->flags &= ~EFX_CKSUM_TCPUDP; + break; + case 0: + /* Check for loopback packets */ + { + struct ether_header *etherhp; + + /*LINTED*/ + etherhp = mtod(m, struct ether_header *); + + if (etherhp->ether_type == + htons(SFXGE_ETHERTYPE_LOOPBACK)) { + EFSYS_PROBE(loopback); + + rxq->loopback++; + goto discard; + } } + break; + default: + KASSERT(B_FALSE, + ("Rx descriptor with both IPv4 and IPv6 flags")); + goto discard; } /* Pass packet up the stack or into LRO (pipelined) */ From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:11:04 2015 Return-Path: Delivered-To: svn-src-all@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 9376D3C6; Thu, 21 May 2015 09:11: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 681781CBC; Thu, 21 May 2015 09:11: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 t4L9B4qs071446; Thu, 21 May 2015 09:11:04 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L9B43P071445; Thu, 21 May 2015 09:11:04 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210911.t4L9B43P071445@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:11:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283210 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:11:04 -0000 Author: arybchik Date: Thu May 21 09:11:03 2015 New Revision: 283210 URL: https://svnweb.freebsd.org/changeset/base/283210 Log: MFC: r282997 sfxge: get rid of locked variable in sfxge_tx_packet_add() Now each branch has one and only one possible TxQ lock state. It simplifies understanding of the code. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:09:51 2015 (r283209) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:11:03 2015 (r283210) @@ -602,7 +602,6 @@ sfxge_tx_qdpl_put_unlocked(struct sfxge_ int sfxge_tx_packet_add(struct sfxge_txq *txq, struct mbuf *m) { - int locked; int rc; if (!SFXGE_LINK_UP(txq->sc)) { @@ -616,9 +615,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx * the packet will be appended to the "get list" of the deferred * packet list. Otherwise, it will be pushed on the "put list". */ - locked = SFXGE_TXQ_TRYLOCK(txq); - - if (locked) { + if (SFXGE_TXQ_TRYLOCK(txq)) { /* First swizzle put-list to get-list to keep order */ sfxge_tx_qdpl_swizzle(txq); @@ -627,6 +624,10 @@ sfxge_tx_packet_add(struct sfxge_txq *tx SFXGE_TXQ_UNLOCK(txq); goto fail; } + + /* 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) @@ -639,14 +640,13 @@ 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. */ - locked = SFXGE_TXQ_TRYLOCK(txq); + if (SFXGE_TXQ_TRYLOCK(txq)) { + sfxge_tx_qdpl_service(txq); + /* Lock has been dropped. */ + } } - if (locked) { - /* Try to service the list. */ - sfxge_tx_qdpl_service(txq); - /* Lock has been dropped. */ - } + SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(txq); return (0); From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:12:26 2015 Return-Path: Delivered-To: svn-src-all@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 C16FF52F; Thu, 21 May 2015 09:12: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 AF39E1D7C; Thu, 21 May 2015 09:12: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 t4L9CQUD071697; Thu, 21 May 2015 09:12:26 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L9CQGF071696; Thu, 21 May 2015 09:12:26 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210912.t4L9CQGF071696@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:12:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283211 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:12:26 -0000 Author: arybchik Date: Thu May 21 09:12:25 2015 New Revision: 283211 URL: https://svnweb.freebsd.org/changeset/base/283211 Log: MFC: r282998 sfxge: move mbuf free to sfxge_if_transmit() It is a preparation to the next patch which will service packet queue even if packet addtion fails. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:11:03 2015 (r283210) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:12:25 2015 (r283211) @@ -605,9 +605,8 @@ sfxge_tx_packet_add(struct sfxge_txq *tx int rc; if (!SFXGE_LINK_UP(txq->sc)) { - rc = ENETDOWN; atomic_add_long(&txq->netdown_drops, 1); - goto fail; + return (ENETDOWN); } /* @@ -622,7 +621,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx rc = sfxge_tx_qdpl_put_locked(txq, m); if (rc != 0) { SFXGE_TXQ_UNLOCK(txq); - goto fail; + return (rc); } /* Try to service the list. */ @@ -631,7 +630,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx } else { rc = sfxge_tx_qdpl_put_unlocked(txq, m); if (rc != 0) - goto fail; + return (rc); /* * Try to grab the lock again. @@ -649,10 +648,6 @@ sfxge_tx_packet_add(struct sfxge_txq *tx SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(txq); return (0); - -fail: - m_freem(m); - return (rc); } static void @@ -730,6 +725,8 @@ sfxge_if_transmit(struct ifnet *ifp, str } rc = sfxge_tx_packet_add(txq, m); + if (rc != 0) + m_freem(m); return (rc); } From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:13:48 2015 Return-Path: Delivered-To: svn-src-all@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 187FB6BB; Thu, 21 May 2015 09:13: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 E0A7F1D8C; Thu, 21 May 2015 09:13: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 t4L9Dlxr071916; Thu, 21 May 2015 09:13:47 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L9DlHZ071915; Thu, 21 May 2015 09:13:47 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210913.t4L9DlHZ071915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283212 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:13:48 -0000 Author: arybchik Date: Thu May 21 09:13:47 2015 New Revision: 283212 URL: https://svnweb.freebsd.org/changeset/base/283212 Log: MFC: r283000 sfxge: add local variable with changed capabilities mask It is required for the next patch which adds dependency of TSO capabilities from Tx checksum offloads. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:12:25 2015 (r283211) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:13:47 2015 (r283212) @@ -257,26 +257,36 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign sfxge_mac_filter_set(sc); break; case SIOCSIFCAP: + { + int reqcap = ifr->ifr_reqcap; + int capchg_mask; + SFXGE_ADAPTER_LOCK(sc); + /* Capabilities to be changed in accordance with request */ + capchg_mask = ifp->if_capenable ^ reqcap; + /* * The networking core already rejects attempts to * enable capabilities we don't have. We still have * to reject attempts to disable capabilities that we * can't (yet) disable. */ - if (~ifr->ifr_reqcap & SFXGE_CAP_FIXED) { + KASSERT((reqcap & ~ifp->if_capabilities) == 0, + ("Unsupported capabilities %x requested %x vs %x", + reqcap & ~ifp->if_capabilities, + reqcap , ifp->if_capabilities)); + if (capchg_mask & SFXGE_CAP_FIXED) { error = EINVAL; SFXGE_ADAPTER_UNLOCK(sc); break; } - ifp->if_capenable = ifr->ifr_reqcap; - if (ifp->if_capenable & IFCAP_TXCSUM) + if (reqcap & IFCAP_TXCSUM) ifp->if_hwassist |= (CSUM_IP | CSUM_TCP | CSUM_UDP); else ifp->if_hwassist &= ~(CSUM_IP | CSUM_TCP | CSUM_UDP); - if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) + if (reqcap & IFCAP_TXCSUM_IPV6) ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); else ifp->if_hwassist &= ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); @@ -289,8 +299,11 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign * but both bits are set in IPv4 and IPv6 mbufs. */ + ifp->if_capenable = reqcap; + SFXGE_ADAPTER_UNLOCK(sc); break; + } case SIOCSIFMEDIA: case SIOCGIFMEDIA: error = ifmedia_ioctl(ifp, ifr, &sc->media, command); From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:15:19 2015 Return-Path: Delivered-To: svn-src-all@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 CBD26847; Thu, 21 May 2015 09:15: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 B9BB41DA2; Thu, 21 May 2015 09:15: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 t4L9FJ7E072229; Thu, 21 May 2015 09:15:19 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L9FJau072228; Thu, 21 May 2015 09:15:19 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210915.t4L9FJau072228@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283213 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:15:19 -0000 Author: arybchik Date: Thu May 21 09:15:19 2015 New Revision: 283213 URL: https://svnweb.freebsd.org/changeset/base/283213 Log: MFC: r283007 sfxge: avoid usage of ifm_data The driver uses ifm_data to save capabilities mask calculated during initialization when supported phy modes are discovered. The patch simply calculates it when either media or options are changed. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_port.c Thu May 21 09:13:47 2015 (r283212) +++ stable/10/sys/dev/sfxge/sfxge_port.c Thu May 21 09:15:19 2015 (r283213) @@ -39,6 +39,8 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" +static int sfxge_phy_cap_mask(struct sfxge_softc *, int, uint32_t *); + static int sfxge_mac_stat_update(struct sfxge_softc *sc) { @@ -381,6 +383,7 @@ sfxge_port_start(struct sfxge_softc *sc) efx_nic_t *enp; size_t pdu; int rc; + uint32_t phy_cap_mask; port = &sc->port; enp = sc->enp; @@ -421,10 +424,13 @@ sfxge_port_start(struct sfxge_softc *sc) if ((rc = efx_mac_drain(enp, B_FALSE)) != 0) goto fail3; - if ((rc = efx_phy_adv_cap_set(sc->enp, sc->media.ifm_cur->ifm_data)) - != 0) + if ((rc = sfxge_phy_cap_mask(sc, sc->media.ifm_cur->ifm_media, + &phy_cap_mask)) != 0) goto fail4; + if ((rc = efx_phy_adv_cap_set(sc->enp, phy_cap_mask)) != 0) + goto fail5; + port->init_state = SFXGE_PORT_STARTED; /* Single poll in case there were missing initial events */ @@ -433,6 +439,7 @@ sfxge_port_start(struct sfxge_softc *sc) return (0); +fail5: fail4: (void)efx_mac_drain(enp, B_TRUE); fail3: @@ -676,12 +683,95 @@ sfxge_media_status(struct ifnet *ifp, st SFXGE_ADAPTER_UNLOCK(sc); } +static efx_phy_cap_type_t +sfxge_link_mode_to_phy_cap(efx_link_mode_t mode) +{ + switch (mode) { + case EFX_LINK_10HDX: + return (EFX_PHY_CAP_10HDX); + case EFX_LINK_10FDX: + return (EFX_PHY_CAP_10FDX); + case EFX_LINK_100HDX: + return (EFX_PHY_CAP_100HDX); + case EFX_LINK_100FDX: + return (EFX_PHY_CAP_100FDX); + case EFX_LINK_1000HDX: + return (EFX_PHY_CAP_1000HDX); + case EFX_LINK_1000FDX: + return (EFX_PHY_CAP_1000FDX); + case EFX_LINK_10000FDX: + return (EFX_PHY_CAP_10000FDX); + default: + EFSYS_ASSERT(B_FALSE); + return (EFX_PHY_CAP_INVALID); + } +} + +static int +sfxge_phy_cap_mask(struct sfxge_softc *sc, int ifmedia, uint32_t *phy_cap_mask) +{ + efx_phy_media_type_t medium_type; + boolean_t mode_found = B_FALSE; + uint32_t cap_mask, mode_cap_mask; + efx_link_mode_t mode; + efx_phy_cap_type_t phy_cap; + + efx_phy_media_type_get(sc->enp, &medium_type); + if (medium_type >= nitems(sfxge_link_mode)) { + if_printf(sc->ifnet, "unexpected media type %d\n", medium_type); + return (EINVAL); + } + + efx_phy_adv_cap_get(sc->enp, EFX_PHY_CAP_PERM, &cap_mask); + + for (mode = EFX_LINK_10HDX; mode < EFX_LINK_NMODES; mode++) { + if (ifmedia == sfxge_link_mode[medium_type][mode]) { + mode_found = B_TRUE; + break; + } + } + + if (!mode_found) { + /* + * If media is not in the table, it must be IFM_AUTO. + */ + KASSERT((cap_mask & (1 << EFX_PHY_CAP_AN)) && + ifmedia == (IFM_ETHER | IFM_AUTO), + ("%s: no mode for media %d", __func__, ifmedia)); + *phy_cap_mask = (cap_mask & ~(1 << EFX_PHY_CAP_ASYM)); + return (0); + } + + phy_cap = sfxge_link_mode_to_phy_cap(mode); + if (phy_cap == EFX_PHY_CAP_INVALID) { + if_printf(sc->ifnet, + "cannot map link mode %d to phy capability\n", + mode); + return (EINVAL); + } + + mode_cap_mask = (1 << phy_cap); + mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_AN); +#ifdef SFXGE_HAVE_PAUSE_MEDIAOPTS + if (ifmedia & IFM_ETH_RXPAUSE) + mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_PAUSE); + if (!(ifmedia & IFM_ETH_TXPAUSE)) + mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_ASYM); +#else + mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_PAUSE); +#endif + + *phy_cap_mask = mode_cap_mask; + return (0); +} + static int sfxge_media_change(struct ifnet *ifp) { struct sfxge_softc *sc; struct ifmedia_entry *ifm; int rc; + uint32_t phy_cap_mask; sc = ifp->if_softc; ifm = sc->media.ifm_cur; @@ -697,7 +787,10 @@ sfxge_media_change(struct ifnet *ifp) if (rc != 0) goto out; - rc = efx_phy_adv_cap_set(sc->enp, ifm->ifm_data); + if ((rc = sfxge_phy_cap_mask(sc, ifm->ifm_media, &phy_cap_mask)) != 0) + goto out; + + rc = efx_phy_adv_cap_set(sc->enp, phy_cap_mask); out: SFXGE_ADAPTER_UNLOCK(sc); @@ -709,6 +802,7 @@ int sfxge_port_ifmedia_init(struct sfxge efx_phy_media_type_t medium_type; uint32_t cap_mask, mode_cap_mask; efx_link_mode_t mode; + efx_phy_cap_type_t phy_cap; int mode_ifm, best_mode_ifm = 0; int rc; @@ -739,41 +833,30 @@ int sfxge_port_ifmedia_init(struct sfxge efx_phy_media_type_get(sc->enp, &medium_type); efx_phy_adv_cap_get(sc->enp, EFX_PHY_CAP_PERM, &cap_mask); - EFX_STATIC_ASSERT(EFX_LINK_10HDX == EFX_PHY_CAP_10HDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_10FDX == EFX_PHY_CAP_10FDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_100HDX == EFX_PHY_CAP_100HDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_100FDX == EFX_PHY_CAP_100FDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_1000HDX == EFX_PHY_CAP_1000HDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_1000FDX == EFX_PHY_CAP_1000FDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_10000FDX == EFX_PHY_CAP_10000FDX + 1); + for (mode = EFX_LINK_10HDX; mode < EFX_LINK_NMODES; mode++) { + phy_cap = sfxge_link_mode_to_phy_cap(mode); + if (phy_cap == EFX_PHY_CAP_INVALID) + continue; - for (mode = EFX_LINK_10HDX; mode <= EFX_LINK_10000FDX; mode++) { - mode_cap_mask = 1 << (mode - 1); + mode_cap_mask = (1 << phy_cap); mode_ifm = sfxge_link_mode[medium_type][mode]; if ((cap_mask & mode_cap_mask) && mode_ifm) { - mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_AN); - -#ifdef SFXGE_HAVE_PAUSE_MEDIAOPTS /* No flow-control */ - ifmedia_add(&sc->media, mode_ifm, mode_cap_mask, NULL); + ifmedia_add(&sc->media, mode_ifm, 0, NULL); +#ifdef SFXGE_HAVE_PAUSE_MEDIAOPTS /* Respond-only. If using AN, we implicitly * offer symmetric as well, but that doesn't * mean we *have* to generate pause frames. */ - mode_cap_mask |= cap_mask & ((1 << EFX_PHY_CAP_PAUSE) | - (1 << EFX_PHY_CAP_ASYM)); mode_ifm |= IFM_ETH_RXPAUSE; - ifmedia_add(&sc->media, mode_ifm, mode_cap_mask, NULL); + ifmedia_add(&sc->media, mode_ifm, 0, NULL); /* Symmetric */ - mode_cap_mask &= ~(1 << EFX_PHY_CAP_ASYM); mode_ifm |= IFM_ETH_TXPAUSE; -#else /* !SFXGE_HAVE_PAUSE_MEDIAOPTS */ - mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_PAUSE); + ifmedia_add(&sc->media, mode_ifm, 0, NULL); #endif - ifmedia_add(&sc->media, mode_ifm, mode_cap_mask, NULL); /* Link modes are numbered in order of speed, * so assume the last one available is the best. @@ -785,8 +868,7 @@ int sfxge_port_ifmedia_init(struct sfxge if (cap_mask & (1 << EFX_PHY_CAP_AN)) { /* Add autoselect mode. */ mode_ifm = IFM_ETHER | IFM_AUTO; - ifmedia_add(&sc->media, mode_ifm, - cap_mask & ~(1 << EFX_PHY_CAP_ASYM), NULL); + ifmedia_add(&sc->media, mode_ifm, 0, NULL); best_mode_ifm = mode_ifm; } From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:21:06 2015 Return-Path: Delivered-To: svn-src-all@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 8FA72B63; Thu, 21 May 2015 09:21: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 637391E98; Thu, 21 May 2015 09:21: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 t4L9L6fu075592; Thu, 21 May 2015 09:21:06 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L9L6P8075591; Thu, 21 May 2015 09:21:06 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210921.t4L9L6P8075591@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:21:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283214 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:21:06 -0000 Author: arybchik Date: Thu May 21 09:21:05 2015 New Revision: 283214 URL: https://svnweb.freebsd.org/changeset/base/283214 Log: MFC: r283048 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. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:15:19 2015 (r283213) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:21:05 2015 (r283214) @@ -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-all@FreeBSD.ORG Thu May 21 09:22:16 2015 Return-Path: Delivered-To: svn-src-all@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 D48F2CAF; Thu, 21 May 2015 09:22: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 C27951EB2; Thu, 21 May 2015 09:22: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 t4L9MGUA076984; Thu, 21 May 2015 09:22:16 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L9MGtk076983; Thu, 21 May 2015 09:22:16 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210922.t4L9MGtk076983@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283215 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:22:17 -0000 Author: arybchik Date: Thu May 21 09:22:15 2015 New Revision: 283215 URL: https://svnweb.freebsd.org/changeset/base/283215 Log: MFC: r283049 sfxge: allow to disable checksum offloads over VLAN It just affects capabilities of the created VLAN interface. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:21:05 2015 (r283214) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:22:15 2015 (r283215) @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #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) MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:23:29 2015 Return-Path: Delivered-To: svn-src-all@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 3EEA1E04; Thu, 21 May 2015 09:23: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 134311EC3; Thu, 21 May 2015 09:23: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 t4L9NSFa077198; Thu, 21 May 2015 09:23:28 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L9NSZY077197; Thu, 21 May 2015 09:23:28 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210923.t4L9NSZY077197@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283216 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:23:29 -0000 Author: arybchik Date: Thu May 21 09:23:28 2015 New Revision: 283216 URL: https://svnweb.freebsd.org/changeset/base/283216 Log: MFC: r283050 sfxge: automatically turn off TSO when Tx checksum offload is disabled Also return error if TSO is requested without Tx checksum offload. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:22:15 2015 (r283215) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:23:28 2015 (r283216) @@ -59,8 +59,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) #define SFXGE_CAP_ENABLE SFXGE_CAP @@ -282,14 +283,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-all@FreeBSD.ORG Thu May 21 09:24:36 2015 Return-Path: Delivered-To: svn-src-all@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 3B3F0F64; Thu, 21 May 2015 09:24: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 299C01ECF; Thu, 21 May 2015 09:24: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 t4L9OZq8077411; Thu, 21 May 2015 09:24:35 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L9OZK6077410; Thu, 21 May 2015 09:24:35 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210924.t4L9OZK6077410@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:24:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283217 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:24:36 -0000 Author: arybchik Date: Thu May 21 09:24:35 2015 New Revision: 283217 URL: https://svnweb.freebsd.org/changeset/base/283217 Log: MFC: r283051 sfxge: do not advertise LRO capability if LRO is compiled out Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:23:28 2015 (r283216) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:24:35 2015 (r283217) @@ -62,7 +62,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) #define SFXGE_CAP_ENABLE SFXGE_CAP #define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | \ @@ -88,7 +88,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); @@ -376,6 +375,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-all@FreeBSD.ORG Thu May 21 09:55:00 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 10:28:34 2015 Return-Path: Delivered-To: svn-src-all@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 1A392549; Thu, 21 May 2015 10:28: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 08C0B16AD; Thu, 21 May 2015 10:28: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 t4LASX1r007491; Thu, 21 May 2015 10:28:33 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LASXQ5007490; Thu, 21 May 2015 10:28:33 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201505211028.t4LASXQ5007490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Thu, 21 May 2015 10:28:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283218 - stable/10/sys/dev/xen/netfront X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 10:28:34 -0000 Author: royger Date: Thu May 21 10:28:33 2015 New Revision: 283218 URL: https://svnweb.freebsd.org/changeset/base/283218 Log: MFC: r282908 netfront: wait for backend to connect before sending ARP Sponsored by: Citrix Systems R&D Modified: stable/10/sys/dev/xen/netfront/netfront.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/10/sys/dev/xen/netfront/netfront.c Thu May 21 09:24:35 2015 (r283217) +++ stable/10/sys/dev/xen/netfront/netfront.c Thu May 21 10:28:33 2015 (r283218) @@ -683,7 +683,6 @@ netfront_backend_changed(device_t dev, X switch (newstate) { case XenbusStateInitialising: case XenbusStateInitialised: - case XenbusStateConnected: case XenbusStateUnknown: case XenbusStateClosed: case XenbusStateReconfigured: @@ -695,13 +694,15 @@ netfront_backend_changed(device_t dev, X if (network_connect(sc) != 0) break; xenbus_set_state(dev, XenbusStateConnected); -#ifdef INET - netfront_send_fake_arp(dev, sc); -#endif break; case XenbusStateClosing: xenbus_set_state(dev, XenbusStateClosed); break; + case XenbusStateConnected: +#ifdef INET + netfront_send_fake_arp(dev, sc); +#endif + break; } } From owner-svn-src-all@FreeBSD.ORG Thu May 21 10:40:20 2015 Return-Path: Delivered-To: svn-src-all@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 108AE7D4; Thu, 21 May 2015 10:40: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 E585617AB; Thu, 21 May 2015 10:40: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 t4LAeJE5012812; Thu, 21 May 2015 10:40:19 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LAeJJm012808; Thu, 21 May 2015 10:40:19 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201505211040.t4LAeJJm012808@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Thu, 21 May 2015 10:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283219 - in stable/10/sys: conf dev/atkbdc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 10:40:20 -0000 Author: royger Date: Thu May 21 10:40:18 2015 New Revision: 283219 URL: https://svnweb.freebsd.org/changeset/base/283219 Log: MFC: r282269, r282277 atkbd: remove usage of x86bios Remove leftover from r282269. Modified: stable/10/sys/conf/files.amd64 stable/10/sys/conf/files.i386 stable/10/sys/dev/atkbdc/atkbd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.amd64 ============================================================================== --- stable/10/sys/conf/files.amd64 Thu May 21 10:28:33 2015 (r283218) +++ stable/10/sys/conf/files.amd64 Thu May 21 10:40:18 2015 (r283219) @@ -531,10 +531,10 @@ compat/ndis/winx64_wrap.S optional ndisa libkern/memmove.c standard libkern/memset.c standard # -# x86 real mode BIOS emulator, required by atkbdc/dpms/vesa +# x86 real mode BIOS emulator, required by dpms/vesa # -compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | vesa -contrib/x86emu/x86emu.c optional x86bios | atkbd | dpms | vesa +compat/x86bios/x86bios.c optional x86bios | dpms | vesa +contrib/x86emu/x86emu.c optional x86bios | dpms | vesa # # bvm console # Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Thu May 21 10:28:33 2015 (r283218) +++ stable/10/sys/conf/files.i386 Thu May 21 10:40:18 2015 (r283219) @@ -552,9 +552,9 @@ i386/xbox/xboxfb.c optional xboxfb dev/fb/boot_font.c optional xboxfb i386/xbox/pic16l.s optional xbox # -# x86 real mode BIOS support, required by atkbdc/dpms/vesa +# x86 real mode BIOS support, required by dpms/vesa # -compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | vesa +compat/x86bios/x86bios.c optional x86bios | dpms | vesa # # x86 shared code between IA32, AMD64 and PC98 architectures # Modified: stable/10/sys/dev/atkbdc/atkbd.c ============================================================================== --- stable/10/sys/dev/atkbdc/atkbd.c Thu May 21 10:28:33 2015 (r283218) +++ stable/10/sys/dev/atkbdc/atkbd.c Thu May 21 10:40:18 2015 (r283219) @@ -44,19 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__i386__) || defined(__amd64__) -#include -#include -#include -#include - -#include -#include -#include - -#include -#endif /* __i386__ || __amd64__ */ - #include #include #include @@ -65,6 +52,9 @@ __FBSDID("$FreeBSD$"); static timeout_t atkbd_timeout; static void atkbd_shutdown_final(void *v); +#define DEFAULT_DELAY 0x1 /* 500ms */ +#define DEFAULT_RATE 0x10 /* 14Hz */ + int atkbd_probe_unit(device_t dev, int irq, int flags) { @@ -239,7 +229,7 @@ static keyboard_switch_t atkbdsw = { KEYBOARD_DRIVER(atkbd, atkbdsw, atkbd_configure); /* local functions */ -static int get_typematic(keyboard_t *kbd); +static int set_typematic(keyboard_t *kbd); static int setup_kbd_port(KBDC kbdc, int port, int intr); static int get_kbd_echo(KBDC kbdc); static int probe_keyboard(KBDC kbdc, int flags); @@ -433,7 +423,7 @@ atkbd_init(int unit, keyboard_t **kbdp, goto bad; } atkbd_ioctl(kbd, KDSETLED, (caddr_t)&state->ks_state); - get_typematic(kbd); + set_typematic(kbd); delay[0] = kbd->kb_delay1; delay[1] = kbd->kb_delay2; atkbd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay); @@ -490,7 +480,7 @@ atkbd_intr(keyboard_t *kbd, void *arg) init_keyboard(state->kbdc, &kbd->kb_type, kbd->kb_config); KBD_FOUND_DEVICE(kbd); atkbd_ioctl(kbd, KDSETLED, (caddr_t)&state->ks_state); - get_typematic(kbd); + set_typematic(kbd); delay[0] = kbd->kb_delay1; delay[1] = kbd->kb_delay2; atkbd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay); @@ -1089,57 +1079,19 @@ atkbd_shutdown_final(void *v) /* local functions */ static int -get_typematic(keyboard_t *kbd) +set_typematic(keyboard_t *kbd) { -#if defined(__i386__) || defined(__amd64__) - /* - * Only some systems allow us to retrieve the keyboard repeat - * rate previously set via the BIOS... - */ - x86regs_t regs; - uint8_t *p; + int val, error; + atkbd_state_t *state = kbd->kb_data; - /* - * Traditional entry points of int 0x15 and 0x16 are fixed - * and later BIOSes follow them. (U)EFI CSM specification - * also mandates these fixed entry points. - * - * Validate the entry points here before we proceed further. - * It's known that some recent laptops does not have the - * same entry point and hang on boot if we call it. - */ - if (x86bios_get_intr(0x15) != 0xf000f859 || - x86bios_get_intr(0x16) != 0xf000e82e) - return (ENODEV); - - /* Is BIOS system configuration table supported? */ - x86bios_init_regs(®s); - regs.R_AH = 0xc0; - x86bios_intr(®s, 0x15); - if ((regs.R_FLG & PSL_C) != 0 || regs.R_AH != 0) - return (ENODEV); - - /* Is int 0x16, function 0x09 supported? */ - p = x86bios_offset((regs.R_ES << 4) + regs.R_BX); - if (readw(p) < 5 || (readb(p + 6) & 0x40) == 0) - return (ENODEV); - - /* Is int 0x16, function 0x0306 supported? */ - x86bios_init_regs(®s); - regs.R_AH = 0x09; - x86bios_intr(®s, 0x16); - if ((regs.R_AL & 0x08) == 0) - return (ENODEV); - - x86bios_init_regs(®s); - regs.R_AX = 0x0306; - x86bios_intr(®s, 0x16); - kbd->kb_delay1 = typematic_delay(regs.R_BH << 5); - kbd->kb_delay2 = typematic_rate(regs.R_BL); - return (0); -#else - return (ENODEV); -#endif /* __i386__ || __amd64__ */ + val = typematic(DEFAULT_DELAY, DEFAULT_RATE); + error = write_kbd(state->kbdc, KBDC_SET_TYPEMATIC, val); + if (error == 0) { + kbd->kb_delay1 = typematic_delay(val); + kbd->kb_delay2 = typematic_rate(val); + } + + return (error); } static int From owner-svn-src-all@FreeBSD.ORG Thu May 21 12:51:57 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 13:02:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 13:04:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 13:08:32 2015 Return-Path: Delivered-To: svn-src-all@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 4F89B837; Thu, 21 May 2015 13:08: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 3BFB61A3B; Thu, 21 May 2015 13:08: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 t4LD8WCQ088328; Thu, 21 May 2015 13:08:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LD8UCl088320; Thu, 21 May 2015 13:08:30 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211308.t4LD8UCl088320@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283223 - in stable/10: etc etc/autofs usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:08:32 -0000 Author: trasz Date: Thu May 21 13:08:30 2015 New Revision: 283223 URL: https://svnweb.freebsd.org/changeset/base/283223 Log: MFC r275681: Add "-media" autofs map, to access data on removable media, such as CD drives or flash keys. It can be enabled by uncommenting a single entry in default /etc/auto_master. It can also be easily modified to use fuse-based filesystems instead of in-kernel ones. There is still one deficiency - the mountpoints are permanent, they don't disappear when user removes the media. Fixing it needs some autofs changes. Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/etc/autofs/special_media - copied unchanged from r275681, head/etc/autofs/special_media Modified: stable/10/etc/auto_master stable/10/etc/autofs/Makefile stable/10/etc/devd.conf stable/10/usr.sbin/autofs/auto_master.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/auto_master ============================================================================== --- stable/10/etc/auto_master Thu May 21 13:04:14 2015 (r283222) +++ stable/10/etc/auto_master Thu May 21 13:08:30 2015 (r283223) @@ -3,3 +3,6 @@ # Automounter master map, see auto_master(5) for details. # /net -hosts -nobrowse,nosuid +# When using the -media special map, make sure to edit devd.conf(5) +# to move the call to "automount -c" out of the comments section. +#/media -media -nosuid Modified: stable/10/etc/autofs/Makefile ============================================================================== --- stable/10/etc/autofs/Makefile Thu May 21 13:04:14 2015 (r283222) +++ stable/10/etc/autofs/Makefile Thu May 21 13:08:30 2015 (r283223) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= include_ldap special_hosts special_null +FILES= include_ldap special_hosts special_media special_null NO_OBJ= FILESDIR= /etc/autofs Copied: stable/10/etc/autofs/special_media (from r275681, head/etc/autofs/special_media) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/autofs/special_media Thu May 21 13:08:30 2015 (r283223, copy of r275681, head/etc/autofs/special_media) @@ -0,0 +1,93 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Print newline-separated list of devices available for mounting. +# If there is a filesystem label - use it, otherwise use device name. +print_available() { + local _fstype _fstype_and_label _label _p + + for _p in ${providers}; do + _fstype_and_label="$(fstyp -l "/dev/${_p}" 2> /dev/null)" + if [ $? -ne 0 ]; then + # Ignore devices for which we were unable + # to determine filesystem type. + continue + fi + + _fstype="${_fstype_and_label%% *}" + if [ "${_fstype}" != "${_fstype_and_label}" ]; then + _label="${_fstype_and_label#* }" + echo "${_label}" + continue + fi + + echo "${_p}" + done +} + +# Print a single map entry. +print_one() { + local _fstype _fstype_and_label _label _key _p + + _key="$1" + + _fstype="$(fstyp "/dev/${_key}" 2> /dev/null)" + if [ $? -eq 0 ]; then + echo "-fstype=${_fstype},nosuid :/dev/${_key}" + return + fi + + for _p in ${providers}; do + _fstype_and_label="$(fstyp -l "/dev/${_p}" 2> /dev/null)" + if [ $? -ne 0 ]; then + # Ignore devices for which we were unable + # to determine filesystem type. + continue + fi + + _fstype="${_fstype_and_label%% *}" + if [ "${_fstype}" = "${_fstype_and_label}" ]; then + # No label, try another device. + continue + fi + + _label="${_fstype_and_label#* }" + if [ "${_label}" != "${_key}" ]; then + # Labels don't match, try another device. + continue + fi + + echo "-fstype=${_fstype},nosuid :/dev/${_p}" + done + + # No matching device - don't print anything, autofs will handle it. +} + +# Obtain a list of (geom-provider-name, access-count) pairs, turning this: +# +# z0xfffff80005085d00 [shape=hexagon,label="ada0\nr2w2e3\nerr#0\nsector=512\nstripe=0"]; +# +# Into this: +# +# ada0 r2w2e3 +# +# XXX: It would be easier to use kern.geom.conftxt instead, but it lacks +# access counts. +pairs=$(sysctl kern.geom.confdot | sed -n 's/^.*hexagon,label="\([^\]*\)\\n\([^\]*\).*/\1 \2/p') + +# Obtain a list of GEOM providers that are not already open - not mounted, +# and without other GEOM class, such as gpart, attached. In other words, +# grep for "r0w0e0". Skip providers with names containing slashes; we're +# not interested in geom_label(4) creations. +providers=$(echo "$pairs" | awk '$2 == "r0w0e0" && $1 !~ /\// { print $1 }') + +if [ $# -eq 0 ]; then + print_available + exit 0 +fi + +print_one "$1" +exit 0 + Modified: stable/10/etc/devd.conf ============================================================================== --- stable/10/etc/devd.conf Thu May 21 13:04:14 2015 (r283222) +++ stable/10/etc/devd.conf Thu May 21 13:08:30 2015 (r283223) @@ -318,4 +318,16 @@ notify 0 { action "/usr/local/etc/rc.d/postgresql restart"; }; +# Discard autofs caches, useful for the -media special map. The one +# second delay is for GEOM to finish tasting. +# +# XXX: We should probably have a devctl(4) event that fires after GEOM +# tasting. +# +notify 100 { + match "system" "DEVFS"; + match "cdev" "(da|mmcsd)[0-9]+"; + action "sleep 1 && /usr/sbin/automount -c"; +}; + */ Modified: stable/10/usr.sbin/autofs/auto_master.5 ============================================================================== --- stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:04:14 2015 (r283222) +++ stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:08:30 2015 (r283223) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 21, 2014 +.Dd November 22, 2014 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -213,14 +213,17 @@ Supported special maps are: .Pp .Bl -tag -width "-hosts" -compact .It Li -hosts -This map queries the remote NFS server and maps exported volumes. -It is traditionally mounted on +Query the remote NFS server and map exported shares. +This map is traditionally mounted on .Pa /net . -It enables access to files on a remote NFS server by accessing +Access to files on a remote NFS server is provided through the .Pa /net/nfs-server-ip/share-name/ -directory, without the need for any further configuration. +directory without any additional configuration. +.It Li -media +Query devices that are not yet mounted, but contain valid filesystems. +Generally used to access files on removable media. .It Li -null -This map prevents the +Prevent .Xr automountd 8 from mounting anything on the mountpoint. .El From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:10:09 2015 Return-Path: Delivered-To: svn-src-all@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 2E2BDA43; Thu, 21 May 2015 13:10: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 1BB631A6E; Thu, 21 May 2015 13:10: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 t4LDA83g088668; Thu, 21 May 2015 13:10:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDA8iK088667; Thu, 21 May 2015 13:10:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211310.t4LDA8iK088667@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283224 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:10:09 -0000 Author: trasz Date: Thu May 21 13:10:08 2015 New Revision: 283224 URL: https://svnweb.freebsd.org/changeset/base/283224 Log: MFC r276833: Make /net use -intr by default. Linux does that, and it seems a good idea. Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/auto_master Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/auto_master ============================================================================== --- stable/10/etc/auto_master Thu May 21 13:08:30 2015 (r283223) +++ stable/10/etc/auto_master Thu May 21 13:10:08 2015 (r283224) @@ -2,7 +2,7 @@ # # Automounter master map, see auto_master(5) for details. # -/net -hosts -nobrowse,nosuid +/net -hosts -nobrowse,nosuid,intr # When using the -media special map, make sure to edit devd.conf(5) # to move the call to "automount -c" out of the comments section. #/media -media -nosuid From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:11:49 2015 Return-Path: Delivered-To: svn-src-all@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 6FE6DBAF; Thu, 21 May 2015 13:11:49 +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 5D6171B32; Thu, 21 May 2015 13:11:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LDBnwA092013; Thu, 21 May 2015 13:11:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDBnjA092012; Thu, 21 May 2015 13:11:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211311.t4LDBnjA092012@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283225 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:11:49 -0000 Author: trasz Date: Thu May 21 13:11:48 2015 New Revision: 283225 URL: https://svnweb.freebsd.org/changeset/base/283225 Log: MFC r276883: Improve documentation for autofs variables and executable maps; also some markup fixes. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/auto_master.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/auto_master.5 ============================================================================== --- stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:10:08 2015 (r283224) +++ stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:11:48 2015 (r283225) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2014 +.Dd January 9, 2015 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -172,6 +172,42 @@ This is typically used with wildcards, l .Li * 192.168.1.1:/share/& .Ed .Pp +The +.Ar location +field may contain references to variables, like: +.Bd -literal -offset indent +.Li sys 192.168.1.1:/sys/${OSNAME} +.Ed +.Pp +Defined variables are: +.Pp +.Bl -tag -width "-OSNAME" -compact +.It Li ARCH +Expands to the output of +.Li "uname -p" . +.It Li CPU +Same as ARCH. +.It Li HOST +Expands to the output of +.Li "uname -n" . +.It Li OSNAME +Expands to the output of +.Li "uname -s" . +.It Li OSREL +Expands to the output of +.Li "uname -r" . +.It Li OSVERS +Expands to the output of +.Li "uname -v" . +.El +.Pp +Additional variables can be defined with the +.Fl D +option of +.Xr automount 8 +and +.Xr automountd 8 . +.Pp To pass a location that begins with .Li / , prefix it with a colon. @@ -217,8 +253,10 @@ Query the remote NFS server and map expo This map is traditionally mounted on .Pa /net . Access to files on a remote NFS server is provided through the -.Pa /net/nfs-server-ip/share-name/ +.Pf /net/ Ar nfs-server-ip Ns / Ns Ar share-name Ns/ directory without any additional configuration. +Directories for individual NFS servers are not present until the first access, +when they are automatically created. .It Li -media Query devices that are not yet mounted, but contain valid filesystems. Generally used to access files on removable media. @@ -227,13 +265,27 @@ Prevent .Xr automountd 8 from mounting anything on the mountpoint. .El +.Pp +It is possible to add custom special maps by adding them, as executable +maps named +.Pa special_foo , +to the +.Pa /etc/autofs/ +directory. .Sh EXECUTABLE MAPS If the map file specified in .Nm -has execute bit set, the +has the execute bit set, .Xr automountd 8 will execute it and parse the standard output instead of parsing the file contents. +When called without command line arguments, the executable is +expected to output a list of available map keys separated by +newline characters. +Otherwise, the executable will be called with a key name as +a command line argument. +Output from the executable is expected to be the entry for that key, +not including the key itself. .Sh INDIRECT VERSUS DIRECT MAPS Indirect maps are referred to in .Nm @@ -300,6 +352,9 @@ It can be symlinked to The default location of the .Pa auto_master file. +.It Pa /etc/autofs/ +Directory containing shell scripts to implement special maps and directory +services. .El .Sh SEE ALSO .Xr autofs 5 , From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:13:57 2015 Return-Path: Delivered-To: svn-src-all@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 891B0D48; Thu, 21 May 2015 13:13: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 76AC41B76; Thu, 21 May 2015 13:13: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 t4LDDvge092831; Thu, 21 May 2015 13:13:57 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDDvNK092830; Thu, 21 May 2015 13:13:57 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211313.t4LDDvNK092830@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283226 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:13:57 -0000 Author: trasz Date: Thu May 21 13:13:56 2015 New Revision: 283226 URL: https://svnweb.freebsd.org/changeset/base/283226 Log: MFC r277171: Use newly added GEOM notifications to discard autofs caches. Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/devd.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/devd.conf ============================================================================== --- stable/10/etc/devd.conf Thu May 21 13:11:48 2015 (r283225) +++ stable/10/etc/devd.conf Thu May 21 13:13:56 2015 (r283226) @@ -318,16 +318,11 @@ notify 0 { action "/usr/local/etc/rc.d/postgresql restart"; }; -# Discard autofs caches, useful for the -media special map. The one -# second delay is for GEOM to finish tasting. -# -# XXX: We should probably have a devctl(4) event that fires after GEOM -# tasting. -# +# Discard autofs caches, useful for the -media special map. notify 100 { - match "system" "DEVFS"; - match "cdev" "(da|mmcsd)[0-9]+"; - action "sleep 1 && /usr/sbin/automount -c"; + match "system" "GEOM"; + match "subsystem" "DEV"; + action "/usr/sbin/automount -c"; }; */ From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:18:03 2015 Return-Path: Delivered-To: svn-src-all@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 CDD4AFA0; Thu, 21 May 2015 13:18: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 BADCC1BC2; Thu, 21 May 2015 13:18: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 t4LDI3nR093450; Thu, 21 May 2015 13:18:03 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDI3GH093449; Thu, 21 May 2015 13:18:03 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211318.t4LDI3GH093449@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:18:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283227 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:18:03 -0000 Author: trasz Date: Thu May 21 13:18:02 2015 New Revision: 283227 URL: https://svnweb.freebsd.org/changeset/base/283227 Log: MFC r279806: Minor optimization/cleanup in node_path(); no functional changes. Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:13:56 2015 (r283226) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:18:02 2015 (r283227) @@ -561,7 +561,6 @@ static char * node_path_x(const struct node *n, char *x) { char *path; - size_t len; if (n->n_parent == NULL) return (x); @@ -580,14 +579,6 @@ node_path_x(const struct node *n, char * path = separated_concat(n->n_key, x, '/'); free(x); - /* - * Strip trailing slash. - */ - len = strlen(path); - assert(len > 0); - if (path[len - 1] == '/') - path[len - 1] = '\0'; - return (node_path_x(n->n_parent, path)); } @@ -598,8 +589,19 @@ node_path_x(const struct node *n, char * char * node_path(const struct node *n) { + char *path; + size_t len; + + path = node_path_x(n, checked_strdup("")); + + /* + * Strip trailing slash, unless the whole path is "/". + */ + len = strlen(path); + if (len > 1 && path[len - 1] == '/') + path[len - 1] = '\0'; - return (node_path_x(n, checked_strdup(""))); + return (path); } static char * From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:19:44 2015 Return-Path: Delivered-To: svn-src-all@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 DEA2F185; Thu, 21 May 2015 13:19: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 CBD0D1BD6; Thu, 21 May 2015 13:19: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 t4LDJipG093718; Thu, 21 May 2015 13:19:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDJitP093717; Thu, 21 May 2015 13:19:44 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211319.t4LDJitP093717@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283228 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:19:45 -0000 Author: trasz Date: Thu May 21 13:19:44 2015 New Revision: 283228 URL: https://svnweb.freebsd.org/changeset/base/283228 Log: MFC r279807: Improve separated_concat() to properly handle the case of concatenating "/" and "/foo". Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:18:02 2015 (r283227) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:19:44 2015 (r283228) @@ -136,8 +136,14 @@ separated_concat(const char *s1, const c assert(s1 != NULL); assert(s2 != NULL); - if (s1[0] == '\0' || s2[0] == '\0' || - s1[strlen(s1) - 1] == separator || s2[0] == separator) { + /* + * If s2 starts with separator - skip it; otherwise concatenating + * "/" and "/foo" would end up returning "//foo". + */ + if (s2[0] == separator) + s2++; + + if (s1[0] == '\0' || s2[0] == '\0' || s1[strlen(s1) - 1] == separator) { ret = asprintf(&result, "%s%s", s1, s2); } else { ret = asprintf(&result, "%s%c%s", s1, separator, s2); From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:21:04 2015 Return-Path: Delivered-To: svn-src-all@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 2A22C2F0; Thu, 21 May 2015 13:21: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 17B941BEF; Thu, 21 May 2015 13:21: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 t4LDL35q095184; Thu, 21 May 2015 13:21:03 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDL35I095183; Thu, 21 May 2015 13:21:03 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211321.t4LDL35I095183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283229 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:21:04 -0000 Author: trasz Date: Thu May 21 13:21:03 2015 New Revision: 283229 URL: https://svnweb.freebsd.org/changeset/base/283229 Log: MFC r279808: Fix memory leak. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:19:44 2015 (r283228) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:21:03 2015 (r283229) @@ -615,9 +615,11 @@ node_options_x(const struct node *n, cha { char *options; + if (n == NULL) + return (x); + options = separated_concat(x, n->n_options, ','); - if (n->n_parent == NULL) - return (options); + free(x); return (node_options_x(n->n_parent, options)); } From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:23:50 2015 Return-Path: Delivered-To: svn-src-all@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 88BC249C; Thu, 21 May 2015 13:23: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 5C2231CD3; Thu, 21 May 2015 13:23: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 t4LDNowo097994; Thu, 21 May 2015 13:23:50 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDNoul097993; Thu, 21 May 2015 13:23:50 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211323.t4LDNoul097993@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:23:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283230 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:23:50 -0000 Author: trasz Date: Thu May 21 13:23:49 2015 New Revision: 283230 URL: https://svnweb.freebsd.org/changeset/base/283230 Log: MFC r279812: Remove some particularly bad code; no functional changes. MFC r279815: Erm, revert chunk committed by mistake. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:21:03 2015 (r283229) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:23:49 2015 (r283230) @@ -86,46 +86,7 @@ checked_strdup(const char *s) } /* - * Take two pointers to strings, concatenate the contents with "/" in the - * middle, make the first pointer point to the result, the second pointer - * to NULL, and free the old strings. - * - * Concatenate pathnames, basically. - */ -static void -concat(char **p1, char **p2) -{ - int ret; - char *path; - - assert(p1 != NULL); - assert(p2 != NULL); - - if (*p1 == NULL) - *p1 = checked_strdup(""); - - if (*p2 == NULL) - *p2 = checked_strdup(""); - - ret = asprintf(&path, "%s/%s", *p1, *p2); - if (ret < 0) - log_err(1, "asprintf"); - - /* - * XXX - */ - //free(*p1); - //free(*p2); - - *p1 = path; - *p2 = NULL; -} - -/* * Concatenate two strings, inserting separator between them, unless not needed. - * - * This function is very convenient to use when you do not care about freeing - * memory - which is okay here, because we are a short running process. */ char * separated_concat(const char *s1, const char *s2, char separator) @@ -151,7 +112,7 @@ separated_concat(const char *s1, const c if (ret < 0) log_err(1, "asprintf"); - //log_debugx("separated_concat: got %s and %s, returning %s", s1, s2, result); + //log_debugx("%s: got %s and %s, returning %s", __func__, s1, s2, result); return (result); } @@ -159,7 +120,7 @@ separated_concat(const char *s1, const c void create_directory(const char *path) { - char *component, *copy, *tofree, *partial; + char *component, *copy, *tofree, *partial, *tmp; int error; assert(path[0] == '/'); @@ -169,12 +130,14 @@ create_directory(const char *path) */ copy = tofree = checked_strdup(path + 1); - partial = NULL; + partial = checked_strdup(""); for (;;) { component = strsep(©, "/"); if (component == NULL) break; - concat(&partial, &component); + tmp = separated_concat(partial, component, '/'); + free(partial); + partial = tmp; //log_debugx("creating \"%s\"", partial); error = mkdir(partial, 0755); if (error != 0 && errno != EEXIST) { From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:25:30 2015 Return-Path: Delivered-To: svn-src-all@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 A6735600; Thu, 21 May 2015 13:25: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 939041CEF; Thu, 21 May 2015 13:25: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 t4LDPUJ4098307; Thu, 21 May 2015 13:25:30 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDPTra098302; Thu, 21 May 2015 13:25:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211325.t4LDPTra098302@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283231 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:25:30 -0000 Author: trasz Date: Thu May 21 13:25:28 2015 New Revision: 283231 URL: https://svnweb.freebsd.org/changeset/base/283231 Log: MFC r279813: Make things more readable; no functional changes. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automount.c stable/10/usr.sbin/autofs/automountd.c stable/10/usr.sbin/autofs/common.c stable/10/usr.sbin/autofs/common.h stable/10/usr.sbin/autofs/popen.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automount.c ============================================================================== --- stable/10/usr.sbin/autofs/automount.c Thu May 21 13:23:49 2015 (r283230) +++ stable/10/usr.sbin/autofs/automount.c Thu May 21 13:25:28 2015 (r283231) @@ -349,8 +349,7 @@ main_automount(int argc, char **argv) if (options == NULL) { options = checked_strdup(optarg); } else { - options = - separated_concat(options, optarg, ','); + options = concat(options, ',', optarg); } break; case 'u': @@ -388,8 +387,7 @@ main_automount(int argc, char **argv) if (show_maps) { if (options != NULL) { - root->n_options = separated_concat(options, - root->n_options, ','); + root->n_options = concat(options, ',', root->n_options); } if (show_maps > 1) { node_expand_indirect_maps(root); Modified: stable/10/usr.sbin/autofs/automountd.c ============================================================================== --- stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:23:49 2015 (r283230) +++ stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:25:28 2015 (r283231) @@ -241,8 +241,7 @@ handle_request(const struct autofs_daemo * Prepend options passed via automountd(8) command line. */ if (cmdline_options != NULL) { - options = - separated_concat(cmdline_options, options, ','); + options = concat(cmdline_options, ',', options); } nobrowse = pick_option("nobrowse", &options); @@ -268,8 +267,7 @@ handle_request(const struct autofs_daemo * We still need to create the single subdirectory * user is trying to access. */ - tmp = separated_concat(adr->adr_path, - adr->adr_key, '/'); + tmp = concat(adr->adr_path, '/', adr->adr_key); node = node_find(root, tmp); if (node != NULL) create_subtree(node, false); @@ -301,12 +299,12 @@ handle_request(const struct autofs_daemo * Prepend options passed via automountd(8) command line. */ if (cmdline_options != NULL) - options = separated_concat(cmdline_options, options, ','); + options = concat(cmdline_options, ',', options); /* * Append "automounted". */ - options = separated_concat(options, "automounted", ','); + options = concat(options, ',', "automounted"); /* * Remove "nobrowse", mount(8) doesn't understand it. @@ -334,11 +332,10 @@ handle_request(const struct autofs_daemo if (retrycnt == NULL) { log_debugx("retrycnt not specified in options; " "defaulting to 1"); - options = separated_concat(options, - separated_concat("retrycnt", "1", '='), ','); + options = concat(options, ',', "retrycnt=1"); } else { - options = separated_concat(options, - separated_concat("retrycnt", retrycnt, '='), ','); + options = concat(options, ',', + concat("retrycnt", '=', retrycnt)); } } @@ -465,8 +462,7 @@ main_automountd(int argc, char **argv) if (options == NULL) { options = checked_strdup(optarg); } else { - options = - separated_concat(options, optarg, ','); + options = concat(options, ',', optarg); } break; case 'v': Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:23:49 2015 (r283230) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:25:28 2015 (r283231) @@ -89,7 +89,7 @@ checked_strdup(const char *s) * Concatenate two strings, inserting separator between them, unless not needed. */ char * -separated_concat(const char *s1, const char *s2, char separator) +concat(const char *s1, char separator, const char *s2) { char *result; int ret; @@ -135,7 +135,7 @@ create_directory(const char *path) component = strsep(©, "/"); if (component == NULL) break; - tmp = separated_concat(partial, component, '/'); + tmp = concat(partial, '/', component); free(partial); partial = tmp; //log_debugx("creating \"%s\"", partial); @@ -545,7 +545,7 @@ node_path_x(const struct node *n, char * } assert(n->n_key[0] != '\0'); - path = separated_concat(n->n_key, x, '/'); + path = concat(n->n_key, '/', x); free(x); return (node_path_x(n->n_parent, path)); @@ -581,7 +581,7 @@ node_options_x(const struct node *n, cha if (n == NULL) return (x); - options = separated_concat(x, n->n_options, ','); + options = concat(x, ',', n->n_options); free(x); return (node_options_x(n->n_parent, options)); Modified: stable/10/usr.sbin/autofs/common.h ============================================================================== --- stable/10/usr.sbin/autofs/common.h Thu May 21 13:23:49 2015 (r283230) +++ stable/10/usr.sbin/autofs/common.h Thu May 21 13:25:28 2015 (r283231) @@ -70,7 +70,7 @@ void log_warnx(const char *, ...) __prin void log_debugx(const char *, ...) __printf0like(1, 2); char *checked_strdup(const char *); -char *separated_concat(const char *s1, const char *s2, char separator); +char *concat(const char *s1, char separator, const char *s2); void create_directory(const char *path); struct node *node_new_root(void); Modified: stable/10/usr.sbin/autofs/popen.c ============================================================================== --- stable/10/usr.sbin/autofs/popen.c Thu May 21 13:23:49 2015 (r283230) +++ stable/10/usr.sbin/autofs/popen.c Thu May 21 13:25:28 2015 (r283231) @@ -104,7 +104,7 @@ auto_popen(const char *argv0, ...) if (arg == NULL) break; - command = separated_concat(command, arg, ' '); + command = concat(command, ' ', arg); } va_end(ap); From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:26:53 2015 Return-Path: Delivered-To: svn-src-all@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 0E4CD756; Thu, 21 May 2015 13:26: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 EF0941D05; Thu, 21 May 2015 13:26: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 t4LDQqLs098545; Thu, 21 May 2015 13:26:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDQqIU098544; Thu, 21 May 2015 13:26:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211326.t4LDQqIU098544@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283232 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:26:53 -0000 Author: trasz Date: Thu May 21 13:26:52 2015 New Revision: 283232 URL: https://svnweb.freebsd.org/changeset/base/283232 Log: MFC r279843: Refactor. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:25:28 2015 (r283231) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:26:52 2015 (r283232) @@ -449,6 +449,18 @@ node_expand_defined(struct node *n) return (cumulated_error); } +static bool +node_is_direct_key(const struct node *n) +{ + + if (n->n_parent != NULL && n->n_parent->n_parent == NULL && + strcmp(n->n_key, "/-") == 0) { + return (true); + } + + return (false); +} + bool node_is_direct_map(const struct node *n) { @@ -460,11 +472,7 @@ node_is_direct_map(const struct node *n) n = n->n_parent; } - assert(n->n_key != NULL); - if (strcmp(n->n_key, "/-") != 0) - return (false); - - return (true); + return (node_is_direct_key(n)); } bool @@ -538,11 +546,8 @@ node_path_x(const struct node *n, char * * Return "/-" for direct maps only if we were asked for path * to the "/-" node itself, not to any of its subnodes. */ - if (n->n_parent->n_parent == NULL && - strcmp(n->n_key, "/-") == 0 && - x[0] != '\0') { + if (node_is_direct_key(n) && x[0] != '\0') return (x); - } assert(n->n_key[0] != '\0'); path = concat(n->n_key, '/', x); From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:29:35 2015 Return-Path: Delivered-To: svn-src-all@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 019388DD; Thu, 21 May 2015 13:29: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 C96ED1D28; Thu, 21 May 2015 13:29: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 t4LDTY0J098972; Thu, 21 May 2015 13:29:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDTYJ5098971; Thu, 21 May 2015 13:29:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211329.t4LDTYJ5098971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283233 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:29:35 -0000 Author: trasz Date: Thu May 21 13:29:34 2015 New Revision: 283233 URL: https://svnweb.freebsd.org/changeset/base/283233 Log: MFC r279845: Fix handling of direct maps, broken in r275756. Previously, running automount(8) would unmount direct map trigger nodes every second time. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:26:52 2015 (r283232) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:29:34 2015 (r283233) @@ -661,23 +661,25 @@ node_find_x(struct node *node, const cha char *tmp; size_t tmplen; - //log_debugx("looking up %s in %s", path, node->n_key); + //log_debugx("looking up %s in %s", path, node_path(node)); - tmp = node_path(node); - tmplen = strlen(tmp); - if (strncmp(tmp, path, tmplen) != 0) { - free(tmp); - return (NULL); - } - if (path[tmplen] != '/' && path[tmplen] != '\0') { - /* - * If we have two map entries like 'foo' and 'foobar', make - * sure the search for 'foobar' won't match 'foo' instead. - */ + if (!node_is_direct_key(node)) { + tmp = node_path(node); + tmplen = strlen(tmp); + if (strncmp(tmp, path, tmplen) != 0) { + free(tmp); + return (NULL); + } + if (path[tmplen] != '/' && path[tmplen] != '\0') { + /* + * If we have two map entries like 'foo' and 'foobar', make + * sure the search for 'foobar' won't match 'foo' instead. + */ + free(tmp); + return (NULL); + } free(tmp); - return (NULL); } - free(tmp); TAILQ_FOREACH(child, &node->n_children, n_next) { found = node_find_x(child, path); @@ -685,6 +687,9 @@ node_find_x(struct node *node, const cha return (found); } + if (node->n_parent == NULL || node_is_direct_key(node)) + return (NULL); + return (node); } @@ -693,9 +698,12 @@ node_find(struct node *root, const char { struct node *node; + assert(root->n_parent == NULL); + node = node_find_x(root, path); - if (node == root) - return (NULL); + if (node != NULL) + assert(node != root); + return (node); } From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:30:10 2015 Return-Path: Delivered-To: svn-src-all@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 BCC6FA29; Thu, 21 May 2015 13:30: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 AA5551DDA; Thu, 21 May 2015 13:30: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 t4LDUAv4099220; Thu, 21 May 2015 13:30:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDUAPl099219; Thu, 21 May 2015 13:30:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505211330.t4LDUAPl099219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 May 2015 13:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283234 - stable/10/usr.bin/ar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:30:10 -0000 Author: emaste Date: Thu May 21 13:30:10 2015 New Revision: 283234 URL: https://svnweb.freebsd.org/changeset/base/283234 Log: MFC r276774: ar: Avoid null pointer deref while reading corrupt archives ELF Tool Chain ticket #467 Reported by: Alexander Cherepanov Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/ar/read.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ar/read.c ============================================================================== --- stable/10/usr.bin/ar/read.c Thu May 21 13:29:34 2015 (r283233) +++ stable/10/usr.bin/ar/read.c Thu May 21 13:30:10 2015 (r283234) @@ -102,7 +102,8 @@ read_archive(struct bsdar *bsdar, char m continue; } - name = archive_entry_pathname(entry); + if ((name = archive_entry_pathname(entry)) == NULL) + break; /* Skip pseudo members. */ if (strcmp(name, "/") == 0 || strcmp(name, "//") == 0) From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:31:46 2015 Return-Path: Delivered-To: svn-src-all@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 D450BB9B; Thu, 21 May 2015 13:31: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 C0E031DF4; Thu, 21 May 2015 13:31: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 t4LDVj4U000588; Thu, 21 May 2015 13:31:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDVjaV000586; Thu, 21 May 2015 13:31:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211331.t4LDVjaV000586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283235 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:31:46 -0000 Author: trasz Date: Thu May 21 13:31:44 2015 New Revision: 283235 URL: https://svnweb.freebsd.org/changeset/base/283235 Log: MFC r279846: Properly pass options for direct maps. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automount.c stable/10/usr.sbin/autofs/automountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automount.c ============================================================================== --- stable/10/usr.sbin/autofs/automount.c Thu May 21 13:30:10 2015 (r283234) +++ stable/10/usr.sbin/autofs/automount.c Thu May 21 13:31:44 2015 (r283235) @@ -141,8 +141,8 @@ mount_autofs(const char *from, const cha } static void -mount_if_not_already(const struct node *n, const char *map, - const struct statfs *mntbuf, int nitems) +mount_if_not_already(const struct node *n, const char *map, const char *options, + const char *prefix, const struct statfs *mntbuf, int nitems) { const struct statfs *sb; char *mountpoint; @@ -175,7 +175,7 @@ mount_if_not_already(const struct node * mountpoint); } - mount_autofs(from, mountpoint, n->n_options, n->n_key); + mount_autofs(from, mountpoint, options, prefix); free(from); free(mountpoint); } @@ -184,7 +184,7 @@ static void mount_unmount(struct node *root) { struct statfs *mntbuf; - struct node *n, *n2, *n3; + struct node *n, *n2; int i, nitems; nitems = getmntinfo(&mntbuf, MNT_WAIT); @@ -216,15 +216,14 @@ mount_unmount(struct node *root) TAILQ_FOREACH(n, &root->n_children, n_next) { if (!node_is_direct_map(n)) { - mount_if_not_already(n, n->n_map, mntbuf, nitems); + mount_if_not_already(n, n->n_map, n->n_options, + n->n_key, mntbuf, nitems); continue; } TAILQ_FOREACH(n2, &n->n_children, n_next) { - TAILQ_FOREACH(n3, &n2->n_children, n_next) { - mount_if_not_already(n3, n->n_map, - mntbuf, nitems); - } + mount_if_not_already(n2, n->n_map, n->n_options, + "/", mntbuf, nitems); } } } Modified: stable/10/usr.sbin/autofs/automountd.c ============================================================================== --- stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:30:10 2015 (r283234) +++ stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:31:44 2015 (r283235) @@ -202,7 +202,7 @@ handle_request(const struct autofs_daemo parent = root; } else { parent = node_new_map(root, checked_strdup(adr->adr_prefix), - checked_strdup(adr->adr_options), checked_strdup(map), + NULL, checked_strdup(map), checked_strdup("[kernel request]"), lineno); } @@ -231,19 +231,19 @@ handle_request(const struct autofs_daemo "failing mount", map, adr->adr_path); } + options = node_options(node); + options = concat(adr->adr_options, ',', options); + + /* + * Prepend options passed via automountd(8) command line. + */ + if (cmdline_options != NULL) + options = concat(cmdline_options, ',', options); + if (node->n_location == NULL) { log_debugx("found node defined at %s:%d; not a mountpoint", node->n_config_file, node->n_config_line); - options = node_options(node); - - /* - * Prepend options passed via automountd(8) command line. - */ - if (cmdline_options != NULL) { - options = concat(cmdline_options, ',', options); - } - nobrowse = pick_option("nobrowse", &options); if (nobrowse != NULL && adr->adr_key[0] == '\0') { log_debugx("skipping map %s due to \"nobrowse\" " @@ -293,14 +293,6 @@ handle_request(const struct autofs_daemo "failing mount", adr->adr_path); } - options = node_options(node); - - /* - * Prepend options passed via automountd(8) command line. - */ - if (cmdline_options != NULL) - options = concat(cmdline_options, ',', options); - /* * Append "automounted". */ From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:33:07 2015 Return-Path: Delivered-To: svn-src-all@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 32D0FDD9; Thu, 21 May 2015 13:33: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 201B01E0B; Thu, 21 May 2015 13:33: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 t4LDX6I6003535; Thu, 21 May 2015 13:33:06 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDX6V6003534; Thu, 21 May 2015 13:33:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211333.t4LDX6V6003534@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283236 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:33:07 -0000 Author: trasz Date: Thu May 21 13:33:06 2015 New Revision: 283236 URL: https://svnweb.freebsd.org/changeset/base/283236 Log: MFC r279851: Fix typo. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automountd.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automountd.8 ============================================================================== --- stable/10/usr.sbin/autofs/automountd.8 Thu May 21 13:31:44 2015 (r283235) +++ stable/10/usr.sbin/autofs/automountd.8 Thu May 21 13:33:06 2015 (r283236) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 20, 2014 +.Dd March 10, 2015 .Dt AUTOMOUNTD 8 .Os .Sh NAME @@ -78,7 +78,7 @@ The default is 30. Debug mode: increase verbosity and do not daemonize. .It Fl o Ar options Specify mount options. -Options specified here ill be overridden by options entered in maps or +Options specified here will be overridden by options entered in maps or .Xr auto_master 5 . .It Fl v Increase verbosity. From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:34:34 2015 Return-Path: Delivered-To: svn-src-all@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 3871AFBD; Thu, 21 May 2015 13:34: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 25C1D1E28; Thu, 21 May 2015 13:34: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 t4LDYY6N003769; Thu, 21 May 2015 13:34:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDYYE1003768; Thu, 21 May 2015 13:34:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211334.t4LDYYE1003768@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283237 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:34:34 -0000 Author: trasz Date: Thu May 21 13:34:33 2015 New Revision: 283237 URL: https://svnweb.freebsd.org/changeset/base/283237 Log: MFC r279914: Options from auto_master must be appended to options from maps, not prepended. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automountd.c ============================================================================== --- stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:33:06 2015 (r283236) +++ stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:34:33 2015 (r283237) @@ -232,7 +232,11 @@ handle_request(const struct autofs_daemo } options = node_options(node); - options = concat(adr->adr_options, ',', options); + + /* + * Append options from auto_master. + */ + options = concat(options, ',', adr->adr_options); /* * Prepend options passed via automountd(8) command line. From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:36:02 2015 Return-Path: Delivered-To: svn-src-all@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 3F65126B; Thu, 21 May 2015 13:36: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 1F1D01E37; Thu, 21 May 2015 13:36: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 t4LDa1pL004202; Thu, 21 May 2015 13:36:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDa1OD004195; Thu, 21 May 2015 13:36:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211336.t4LDa1OD004195@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283238 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:36:02 -0000 Author: trasz Date: Thu May 21 13:36:00 2015 New Revision: 283238 URL: https://svnweb.freebsd.org/changeset/base/283238 Log: MFC r279915: Make concat() accept NULL arguments. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automount.c stable/10/usr.sbin/autofs/automountd.c stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automount.c ============================================================================== --- stable/10/usr.sbin/autofs/automount.c Thu May 21 13:34:33 2015 (r283237) +++ stable/10/usr.sbin/autofs/automount.c Thu May 21 13:36:00 2015 (r283238) @@ -345,11 +345,7 @@ main_automount(int argc, char **argv) force_unmount = true; break; case 'o': - if (options == NULL) { - options = checked_strdup(optarg); - } else { - options = concat(options, ',', optarg); - } + options = concat(options, ',', optarg); break; case 'u': do_unmount = true; @@ -385,9 +381,7 @@ main_automount(int argc, char **argv) parse_master(root, AUTO_MASTER_PATH); if (show_maps) { - if (options != NULL) { - root->n_options = concat(options, ',', root->n_options); - } + root->n_options = concat(options, ',', root->n_options); if (show_maps > 1) { node_expand_indirect_maps(root); node_expand_ampersand(root, NULL); Modified: stable/10/usr.sbin/autofs/automountd.c ============================================================================== --- stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:34:33 2015 (r283237) +++ stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:36:00 2015 (r283238) @@ -241,8 +241,7 @@ handle_request(const struct autofs_daemo /* * Prepend options passed via automountd(8) command line. */ - if (cmdline_options != NULL) - options = concat(cmdline_options, ',', options); + options = concat(cmdline_options, ',', options); if (node->n_location == NULL) { log_debugx("found node defined at %s:%d; not a mountpoint", @@ -455,11 +454,7 @@ main_automountd(int argc, char **argv) maxproc = atoi(optarg); break; case 'o': - if (options == NULL) { - options = checked_strdup(optarg); - } else { - options = concat(options, ',', optarg); - } + options = concat(options, ',', optarg); break; case 'v': debug++; Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:34:33 2015 (r283237) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:36:00 2015 (r283238) @@ -94,8 +94,10 @@ concat(const char *s1, char separator, c char *result; int ret; - assert(s1 != NULL); - assert(s2 != NULL); + if (s1 == NULL) + s1 = ""; + if (s2 == NULL) + s2 = ""; /* * If s2 starts with separator - skip it; otherwise concatenating From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:37:49 2015 Return-Path: Delivered-To: svn-src-all@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 B79614AA; Thu, 21 May 2015 13:37:49 +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 A4B081E5B; Thu, 21 May 2015 13:37:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LDbndp004600; Thu, 21 May 2015 13:37:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDbmXG004595; Thu, 21 May 2015 13:37:48 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211337.t4LDbmXG004595@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283239 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:37:49 -0000 Author: trasz Date: Thu May 21 13:37:48 2015 New Revision: 283239 URL: https://svnweb.freebsd.org/changeset/base/283239 Log: MFC r279916: Make "automount -LL -o whatever" present options in the same order as used by automountd(8). Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automount.c stable/10/usr.sbin/autofs/common.c stable/10/usr.sbin/autofs/common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automount.c ============================================================================== --- stable/10/usr.sbin/autofs/automount.c Thu May 21 13:36:00 2015 (r283238) +++ stable/10/usr.sbin/autofs/automount.c Thu May 21 13:37:48 2015 (r283239) @@ -381,13 +381,12 @@ main_automount(int argc, char **argv) parse_master(root, AUTO_MASTER_PATH); if (show_maps) { - root->n_options = concat(options, ',', root->n_options); if (show_maps > 1) { node_expand_indirect_maps(root); node_expand_ampersand(root, NULL); } node_expand_defined(root); - node_print(root); + node_print(root, options); return (0); } Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:36:00 2015 (r283238) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:37:48 2015 (r283239) @@ -607,13 +607,16 @@ node_options(const struct node *n) } static void -node_print_indent(const struct node *n, int indent) +node_print_indent(const struct node *n, const char *cmdline_options, + int indent) { const struct node *child, *first_child; - char *path, *options; + char *path, *options, *tmp; path = node_path(n); - options = node_options(n); + tmp = node_options(n); + options = concat(cmdline_options, ',', tmp); + free(tmp); /* * Do not show both parent and child node if they have the same @@ -644,16 +647,21 @@ node_print_indent(const struct node *n, free(options); TAILQ_FOREACH(child, &n->n_children, n_next) - node_print_indent(child, indent + 2); + node_print_indent(child, cmdline_options, indent + 2); } +/* + * Recursively print node with all its children. The cmdline_options + * argument is used for additional options to be prepended to all the + * others - usually those are the options passed by command line. + */ void -node_print(const struct node *n) +node_print(const struct node *n, const char *cmdline_options) { const struct node *child; TAILQ_FOREACH(child, &n->n_children, n_next) - node_print_indent(child, 0); + node_print_indent(child, cmdline_options, 0); } static struct node * Modified: stable/10/usr.sbin/autofs/common.h ============================================================================== --- stable/10/usr.sbin/autofs/common.h Thu May 21 13:36:00 2015 (r283238) +++ stable/10/usr.sbin/autofs/common.h Thu May 21 13:37:48 2015 (r283239) @@ -87,7 +87,7 @@ void node_expand_ampersand(struct node * void node_expand_wildcard(struct node *root, const char *key); int node_expand_defined(struct node *root); void node_expand_indirect_maps(struct node *n); -void node_print(const struct node *n); +void node_print(const struct node *n, const char *cmdline_options); void parse_master(struct node *root, const char *path); void parse_map(struct node *parent, const char *map, const char *args, bool *wildcards); From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:39:39 2015 Return-Path: Delivered-To: svn-src-all@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 C99A85FC; Thu, 21 May 2015 13:39: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 B72E21E6E; Thu, 21 May 2015 13:39: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 t4LDddb3004888; Thu, 21 May 2015 13:39:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDddUG004887; Thu, 21 May 2015 13:39:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211339.t4LDddUG004887@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283240 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:39:39 -0000 Author: trasz Date: Thu May 21 13:39:38 2015 New Revision: 283240 URL: https://svnweb.freebsd.org/changeset/base/283240 Log: MFC r279953: Rework the concat() algorithm to be correct in all cases. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:37:48 2015 (r283239) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:39:38 2015 (r283240) @@ -92,6 +92,7 @@ char * concat(const char *s1, char separator, const char *s2) { char *result; + char s1last, s2first; int ret; if (s1 == NULL) @@ -99,14 +100,22 @@ concat(const char *s1, char separator, c if (s2 == NULL) s2 = ""; - /* - * If s2 starts with separator - skip it; otherwise concatenating - * "/" and "/foo" would end up returning "//foo". - */ - if (s2[0] == separator) - s2++; + if (s1[0] == '\0') + s1last = '\0'; + else + s1last = s1[strlen(s1) - 1]; - if (s1[0] == '\0' || s2[0] == '\0' || s1[strlen(s1) - 1] == separator) { + s2first = s2[0]; + + if (s1last == separator && s2first == separator) { + /* + * If s1 ends with the separator and s2 begins with + * it - skip the latter; otherwise concatenating "/" + * and "/foo" would end up returning "//foo". + */ + ret = asprintf(&result, "%s%s", s1, s2 + 1); + } else if (s1last == separator || s2first == separator || + s1[0] == '\0' || s2[0] == '\0') { ret = asprintf(&result, "%s%s", s1, s2); } else { ret = asprintf(&result, "%s%c%s", s1, separator, s2); From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:41:09 2015 Return-Path: Delivered-To: svn-src-all@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 04653763; Thu, 21 May 2015 13:41: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 E5F081F23; Thu, 21 May 2015 13:41: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 t4LDf8YS006193; Thu, 21 May 2015 13:41:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDf8hL006192; Thu, 21 May 2015 13:41:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211341.t4LDf8hL006192@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283241 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:41:09 -0000 Author: trasz Date: Thu May 21 13:41:08 2015 New Revision: 283241 URL: https://svnweb.freebsd.org/changeset/base/283241 Log: MFC r279954: Get executable direct maps to work. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automountd.c ============================================================================== --- stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:39:38 2015 (r283240) +++ stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:41:08 2015 (r283241) @@ -177,7 +177,7 @@ handle_request(const struct autofs_daemo const char *map; struct node *root, *parent, *node; FILE *f; - char *options, *fstype, *nobrowse, *retrycnt, *tmp; + char *key, *options, *fstype, *nobrowse, *retrycnt, *tmp; int error; bool wildcards; @@ -199,11 +199,25 @@ handle_request(const struct autofs_daemo map = adr->adr_from + 4; /* 4 for strlen("map "); */ root = node_new_root(); if (adr->adr_prefix[0] == '\0' || strcmp(adr->adr_prefix, "/") == 0) { + /* + * Direct map. autofs(4) doesn't have a way to determine + * correct map key, but since it's a direct map, we can just + * use adr_path instead. + */ parent = root; + key = checked_strdup(adr->adr_path); } else { + /* + * Indirect map. + */ parent = node_new_map(root, checked_strdup(adr->adr_prefix), NULL, checked_strdup(map), checked_strdup("[kernel request]"), lineno); + + if (adr->adr_key[0] == '\0') + key = NULL; + else + key = checked_strdup(adr->adr_key); } /* @@ -213,8 +227,7 @@ handle_request(const struct autofs_daemo * needs to be done for maps with wildcard entries, but also * for special and executable maps. */ - parse_map(parent, map, adr->adr_key[0] != '\0' ? adr->adr_key : NULL, - &wildcards); + parse_map(parent, map, key, &wildcards); if (!wildcards) wildcards = node_has_wildcards(parent); if (wildcards) @@ -222,8 +235,8 @@ handle_request(const struct autofs_daemo else log_debugx("map does not contain wildcard entries"); - if (adr->adr_key[0] != '\0') - node_expand_wildcard(root, adr->adr_key); + if (key != NULL) + node_expand_wildcard(root, key); node = node_find(root, adr->adr_path); if (node == NULL) { @@ -248,7 +261,7 @@ handle_request(const struct autofs_daemo node->n_config_file, node->n_config_line); nobrowse = pick_option("nobrowse", &options); - if (nobrowse != NULL && adr->adr_key[0] == '\0') { + if (nobrowse != NULL && key == NULL) { log_debugx("skipping map %s due to \"nobrowse\" " "option; exiting", map); done(0, true); @@ -265,12 +278,12 @@ handle_request(const struct autofs_daemo */ create_subtree(node, incomplete_hierarchy); - if (incomplete_hierarchy && adr->adr_key[0] != '\0') { + if (incomplete_hierarchy && key != NULL) { /* * We still need to create the single subdirectory * user is trying to access. */ - tmp = concat(adr->adr_path, '/', adr->adr_key); + tmp = concat(adr->adr_path, '/', key); node = node_find(root, tmp); if (node != NULL) create_subtree(node, false); @@ -288,8 +301,8 @@ handle_request(const struct autofs_daemo log_debugx("found node defined at %s:%d; it is a mountpoint", node->n_config_file, node->n_config_line); - node_expand_ampersand(node, - adr->adr_key[0] != '\0' ? adr->adr_key : NULL); + if (key != NULL) + node_expand_ampersand(node, key); error = node_expand_defined(node); if (error != 0) { log_errx(1, "variable expansion failed for %s; " From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:42:39 2015 Return-Path: Delivered-To: svn-src-all@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 28AFE93B; Thu, 21 May 2015 13:42: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 092931F43; Thu, 21 May 2015 13:42: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 t4LDgcXx008995; Thu, 21 May 2015 13:42:38 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDgcTb008991; Thu, 21 May 2015 13:42:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211342.t4LDgcTb008991@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283242 - in stable/10: etc etc/autofs usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:42:39 -0000 Author: trasz Date: Thu May 21 13:42:37 2015 New Revision: 283242 URL: https://svnweb.freebsd.org/changeset/base/283242 Log: MFC r279955: Add -noauto autofs map, for automatic handling of fstab entries marked "noauto". Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/etc/autofs/special_noauto - copied unchanged from r279955, head/etc/autofs/special_noauto Modified: stable/10/etc/auto_master stable/10/etc/autofs/Makefile stable/10/usr.sbin/autofs/auto_master.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/auto_master ============================================================================== --- stable/10/etc/auto_master Thu May 21 13:41:08 2015 (r283241) +++ stable/10/etc/auto_master Thu May 21 13:42:37 2015 (r283242) @@ -6,3 +6,4 @@ # When using the -media special map, make sure to edit devd.conf(5) # to move the call to "automount -c" out of the comments section. #/media -media -nosuid +#/- -noauto Modified: stable/10/etc/autofs/Makefile ============================================================================== --- stable/10/etc/autofs/Makefile Thu May 21 13:41:08 2015 (r283241) +++ stable/10/etc/autofs/Makefile Thu May 21 13:42:37 2015 (r283242) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= include_ldap special_hosts special_media special_null +FILES= include_ldap special_hosts special_media special_noauto special_null NO_OBJ= FILESDIR= /etc/autofs Copied: stable/10/etc/autofs/special_noauto (from r279955, head/etc/autofs/special_noauto) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/autofs/special_noauto Thu May 21 13:42:37 2015 (r283242, copy of r279955, head/etc/autofs/special_noauto) @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +print_available() { + sed 's/#.*//' /etc/fstab | awk '$4 ~ /noauto/ { print $2 }' +} + +print_one() { + local _mntpoint + + _mntpoint="${1%/}" + + sed 's/#.*//' /etc/fstab | awk ' + $2 == "'"${_mntpoint}"'" && $4 ~ /noauto/ { + if ($1 ~ /:/) { dev=$1 } else { dev=":"$1 } + print "-fstype=" $3 "," $4, dev + }' +} + +if [ $# -eq 0 ]; then + print_available + exit 0 +fi + +print_one "$1" +exit 0 + Modified: stable/10/usr.sbin/autofs/auto_master.5 ============================================================================== --- stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:41:08 2015 (r283241) +++ stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:42:37 2015 (r283242) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 9, 2015 +.Dd March 13, 2015 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -260,6 +260,11 @@ when they are automatically created. .It Li -media Query devices that are not yet mounted, but contain valid filesystems. Generally used to access files on removable media. +.It Li -noauto +Mount filesystems configured in +.Xr fstab 5 +as "noauto". +This needs to be set up as a direct map. .It Li -null Prevent .Xr automountd 8 From owner-svn-src-all@FreeBSD.ORG Thu May 21 14:36:11 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 14:36:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 14:36:13 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 14:36:16 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 15:05:46 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 15:16:27 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 15:38:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 16:43:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 16:44:33 2015 Return-Path: Delivered-To: svn-src-all@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 2892C95E; Thu, 21 May 2015 16:44: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 F0A111686; Thu, 21 May 2015 16:44: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 t4LGiW8G001503; Thu, 21 May 2015 16:44:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LGiWa6001498; Thu, 21 May 2015 16:44:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201505211644.t4LGiWa6001498@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 21 May 2015 16:44:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283251 - in stable/10: . share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 16:44:33 -0000 Author: bdrewery Date: Thu May 21 16:44:31 2015 New Revision: 283251 URL: https://svnweb.freebsd.org/changeset/base/283251 Log: MFC r282574: Remove references to Giant in namei(9). This was removed in r241896. Modified: stable/10/ObsoleteFiles.inc stable/10/share/man/man9/Makefile stable/10/share/man/man9/namei.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Thu May 21 16:43:26 2015 (r283250) +++ stable/10/ObsoleteFiles.inc Thu May 21 16:44:31 2015 (r283251) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20150506 +OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz # 20141205: convert sbin/mdconfig/tests to ATF format tests OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Thu May 21 16:43:26 2015 (r283250) +++ stable/10/share/man/man9/Makefile Thu May 21 16:44:31 2015 (r283251) @@ -1001,7 +1001,6 @@ MLINKS+=mutex.9 mtx_assert.9 \ mutex.9 mtx_unlock_spin.9 \ mutex.9 mtx_unlock_spin_flags.9 MLINKS+=namei.9 NDFREE.9 \ - namei.9 NDHASGIANT.9 \ namei.9 NDINIT.9 MLINKS+=pbuf.9 getpbuf.9 \ pbuf.9 relpbuf.9 \ Modified: stable/10/share/man/man9/namei.9 ============================================================================== --- stable/10/share/man/man9/namei.9 Thu May 21 16:43:26 2015 (r283250) +++ stable/10/share/man/man9/namei.9 Thu May 21 16:44:31 2015 (r283251) @@ -33,14 +33,13 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2012 +.Dd May 6, 2015 .Dt NAMEI 9 .Os .Sh NAME .Nm namei , .Nm NDINIT , .Nm NDFREE , -.Nm NDHASGIANT .Nd pathname translation and lookup operations .Sh SYNOPSIS .In sys/param.h @@ -55,8 +54,6 @@ .Fc .Ft void .Fn NDFREE "struct nameidata *ndp" "const uint flags" -.Ft int -.Fn NDHASGIANT "struct nameidata *ndp" .Sh DESCRIPTION The .Nm @@ -73,16 +70,6 @@ or depending on whether the .Dv LOCKLEAF flag was specified or not. -If the -.Va Giant -lock is required, -.Nm -will acquire it if the caller indicates it is -.Dv MPSAFE , -in which case the caller must later release -.Va Giant -based on the results of -.Fn NDHASGIANT . .Pp The .Fn NDINIT @@ -362,6 +349,3 @@ In order to solve this for the cases whe and .Dv LOCKLEAF are used, it is necessary to resort to recursive locking. -.Pp -Non-MPSAFE file systems exist, requiring callers to conditionally unlock -.Va Giant . From owner-svn-src-all@FreeBSD.ORG Thu May 21 16:45:25 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 16:45:25 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 16:58:32 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 17:39:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 17:39:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 17:40:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 18:23:38 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 18:29:12 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 18:29:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 18:59:12 2015 Return-Path: Delivered-To: svn-src-all@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 9DD5A796; Thu, 21 May 2015 18:59: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 72C661867; Thu, 21 May 2015 18:59: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 t4LIxCkE070121; Thu, 21 May 2015 18:59:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LIxCFx070119; Thu, 21 May 2015 18:59:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505211859.t4LIxCFx070119@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:59:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283258 - stable/10/bin/date X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 18:59:12 -0000 Author: delphij Date: Thu May 21 18:59:11 2015 New Revision: 283258 URL: https://svnweb.freebsd.org/changeset/base/283258 Log: MFC r282608: date(1): Make -r behave like GNU's version when the option can not be interpreted as a number, which checks the file's modification time and use that as the date/time value. This improves compatibility with GNU coreutils's version of date(1). Modified: stable/10/bin/date/date.1 stable/10/bin/date/date.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/date/date.1 ============================================================================== --- stable/10/bin/date/date.1 Thu May 21 18:29:36 2015 (r283257) +++ stable/10/bin/date/date.1 Thu May 21 18:59:11 2015 (r283258) @@ -32,7 +32,7 @@ .\" @(#)date.1 8.3 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd April 26, 2014 +.Dd May 7, 2015 .Dt DATE 1 .Os .Sh NAME @@ -41,7 +41,7 @@ .Sh SYNOPSIS .Nm .Op Fl jRu -.Op Fl r Ar seconds +.Op Fl r Ar seconds | Ar filename .Oo .Fl v .Sm off @@ -150,6 +150,9 @@ is the number of seconds since the Epoch see .Xr time 3 ) , and can be specified in decimal, octal, or hex. +.It Fl r Ar filename +Print the date and time of the last modification of +.Ar filename . .It Fl t Ar minutes_west Set the system's value for minutes west of .Tn GMT . Modified: stable/10/bin/date/date.c ============================================================================== --- stable/10/bin/date/date.c Thu May 21 18:29:36 2015 (r283257) +++ stable/10/bin/date/date.c Thu May 21 18:59:11 2015 (r283258) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -85,6 +86,7 @@ main(int argc, char *argv[]) struct vary *v; const struct vary *badv; struct tm lt; + struct stat sb; v = NULL; fmt = NULL; @@ -116,8 +118,12 @@ main(int argc, char *argv[]) case 'r': /* user specified seconds */ rflag = 1; tval = strtoq(optarg, &tmp, 0); - if (*tmp != 0) - usage(); + if (*tmp != 0) { + if (stat(optarg, &sb) == 0) + tval = sb.st_mtim.tv_sec; + else + usage(); + } break; case 't': /* minutes west of UTC */ /* error check; don't allow "PST" */ From owner-svn-src-all@FreeBSD.ORG Thu May 21 19:05:48 2015 Return-Path: Delivered-To: svn-src-all@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 4562D969; Thu, 21 May 2015 19:05: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 33F051949; Thu, 21 May 2015 19:05: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 t4LJ5mBt075029; Thu, 21 May 2015 19:05:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LJ5lYN075027; Thu, 21 May 2015 19:05:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505211905.t4LJ5lYN075027@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 19:05:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283259 - stable/10/contrib/libarchive/libarchive X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 19:05:48 -0000 Author: delphij Date: Thu May 21 19:05:47 2015 New Revision: 283259 URL: https://svnweb.freebsd.org/changeset/base/283259 Log: MFC r282932: MFV r282927,r282928,r282930 (kientzle): Don't segfault when reading malformed cpio archives. Modified: stable/10/contrib/libarchive/libarchive/archive_read.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read.c Thu May 21 18:59:11 2015 (r283258) +++ stable/10/contrib/libarchive/libarchive/archive_read.c Thu May 21 19:05:47 2015 (r283259) @@ -1395,6 +1395,8 @@ __archive_read_filter_consume(struct arc { int64_t skipped; + if (request < 0) + return ARCHIVE_FATAL; if (request == 0) return 0; Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 21 18:59:11 2015 (r283258) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 21 19:05:47 2015 (r283259) @@ -198,7 +198,7 @@ static int archive_read_format_cpio_read static int archive_read_format_cpio_read_header(struct archive_read *, struct archive_entry *); static int archive_read_format_cpio_skip(struct archive_read *); -static int be4(const unsigned char *); +static int64_t be4(const unsigned char *); static int find_odc_header(struct archive_read *); static int find_newc_header(struct archive_read *); static int header_bin_be(struct archive_read *, struct cpio *, @@ -213,7 +213,7 @@ static int header_afiol(struct archive_r struct archive_entry *, size_t *, size_t *); static int is_octal(const char *, size_t); static int is_hex(const char *, size_t); -static int le4(const unsigned char *); +static int64_t le4(const unsigned char *); static int record_hardlink(struct archive_read *a, struct cpio *cpio, struct archive_entry *entry); @@ -864,8 +864,11 @@ header_bin_le(struct archive_read *a, st /* Read fixed-size portion of header. */ h = __archive_read_ahead(a, bin_header_size, NULL); - if (h == NULL) + if (h == NULL) { + archive_set_error(&a->archive, 0, + "End of file trying to read next cpio header"); return (ARCHIVE_FATAL); + } /* Parse out binary fields. */ header = (const unsigned char *)h; @@ -900,8 +903,11 @@ header_bin_be(struct archive_read *a, st /* Read fixed-size portion of header. */ h = __archive_read_ahead(a, bin_header_size, NULL); - if (h == NULL) + if (h == NULL) { + archive_set_error(&a->archive, 0, + "End of file trying to read next cpio header"); return (ARCHIVE_FATAL); + } /* Parse out binary fields. */ header = (const unsigned char *)h; @@ -944,17 +950,17 @@ archive_read_format_cpio_cleanup(struct return (ARCHIVE_OK); } -static int +static int64_t le4(const unsigned char *p) { - return ((p[0]<<16) + (p[1]<<24) + (p[2]<<0) + (p[3]<<8)); + return ((p[0] << 16) + (((int64_t)p[1]) << 24) + (p[2] << 0) + (p[3] << 8)); } -static int +static int64_t be4(const unsigned char *p) { - return ((p[0]<<24) + (p[1]<<16) + (p[2]<<8) + (p[3])); + return ((((int64_t)p[0]) << 24) + (p[1] << 16) + (p[2] << 8) + (p[3])); } /* From owner-svn-src-all@FreeBSD.ORG Thu May 21 19:16:28 2015 Return-Path: Delivered-To: svn-src-all@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 D255CD9F; Thu, 21 May 2015 19:16: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 A67761AAA; Thu, 21 May 2015 19:16: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 t4LJGSxE080218; Thu, 21 May 2015 19:16:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LJGSCj080217; Thu, 21 May 2015 19:16:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505211916.t4LJGSCj080217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 May 2015 19:16:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283260 - stable/10/usr.sbin/crunch/crunchide X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 19:16:28 -0000 Author: emaste Date: Thu May 21 19:16:28 2015 New Revision: 283260 URL: https://svnweb.freebsd.org/changeset/base/283260 Log: MFC r282144: crunchide: add basic string table sanity checks Reported by: Coverity Scan CID: 978805, 980919 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/crunch/crunchide/exec_elf32.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/crunch/crunchide/exec_elf32.c ============================================================================== --- stable/10/usr.sbin/crunch/crunchide/exec_elf32.c Thu May 21 19:05:47 2015 (r283259) +++ stable/10/usr.sbin/crunch/crunchide/exec_elf32.c Thu May 21 19:16:28 2015 (r283260) @@ -342,11 +342,14 @@ ELFNAMEEND(hide)(int fd, const char *fn) */ /* load section string table for debug use */ - if ((shstrtabp = xmalloc(xewtoh(shstrtabshdr->sh_size), fn, - "section string table")) == NULL) + if ((size = xewtoh(shstrtabshdr->sh_size)) == 0) + goto bad; + if ((shstrtabp = xmalloc(size, fn, "section string table")) == NULL) goto bad; if ((size_t)xreadatoff(fd, shstrtabp, xewtoh(shstrtabshdr->sh_offset), - xewtoh(shstrtabshdr->sh_size), fn) != xewtoh(shstrtabshdr->sh_size)) + size, fn) != size) + goto bad; + if (shstrtabp[size - 1] != '\0') goto bad; /* we need symtab, strtab, and everything behind strtab */ @@ -367,7 +370,8 @@ ELFNAMEEND(hide)(int fd, const char *fn) strtabidx = i; if (layoutp[i].shdr == symtabshdr || i >= strtabidx) { off = xewtoh(layoutp[i].shdr->sh_offset); - size = xewtoh(layoutp[i].shdr->sh_size); + if ((size = xewtoh(layoutp[i].shdr->sh_size)) == 0) + goto bad; layoutp[i].bufp = xmalloc(size, fn, shstrtabp + xewtoh(layoutp[i].shdr->sh_name)); if (layoutp[i].bufp == NULL) @@ -377,10 +381,13 @@ ELFNAMEEND(hide)(int fd, const char *fn) goto bad; /* set symbol table and string table */ - if (layoutp[i].shdr == symtabshdr) + if (layoutp[i].shdr == symtabshdr) { symtabp = layoutp[i].bufp; - else if (layoutp[i].shdr == strtabshdr) + } else if (layoutp[i].shdr == strtabshdr) { strtabp = layoutp[i].bufp; + if (strtabp[size - 1] != '\0') + goto bad; + } } } From owner-svn-src-all@FreeBSD.ORG Thu May 21 19:31:12 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 19:40:32 2015 Return-Path: Delivered-To: svn-src-all@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 A072C394; Thu, 21 May 2015 19:40: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 8F22B1D2E; Thu, 21 May 2015 19:40: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 t4LJeWqd090642; Thu, 21 May 2015 19:40:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LJeW3M090641; Thu, 21 May 2015 19:40:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505211940.t4LJeW3M090641@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 May 2015 19:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283262 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 19:40:32 -0000 Author: emaste Date: Thu May 21 19:40:31 2015 New Revision: 283262 URL: https://svnweb.freebsd.org/changeset/base/283262 Log: MFC r258431: Disable amd64 boot time memory test by default The page presence memory test takes a long time on large memory systems and has little value on contemporary amd64 hardware. Relnotes: Yes Reviewed by: jhb, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1544 Modified: stable/10/sys/amd64/amd64/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Thu May 21 19:31:10 2015 (r283261) +++ stable/10/sys/amd64/amd64/machdep.c Thu May 21 19:40:31 2015 (r283262) @@ -1590,13 +1590,15 @@ getmemsize(caddr_t kmdp, u_int64_t first Maxmem = atop(physmem_tunable); /* - * By default enable the memory test on real hardware, and disable - * it if we appear to be running in a VM. This avoids touching all - * pages unnecessarily, which doesn't matter on real hardware but is - * bad for shared VM hosts. Use a general name so that - * one could eventually do more with the code than just disable it. + * The boot memory test is disabled by default, as it takes a + * significant amount of time on large-memory systems, and is + * unfriendly to virtual machines as it unnecessarily touches all + * pages. + * + * A general name is used as the code may be extended to support + * additional tests beyond the current "page present" test. */ - memtest = (vm_guest > VM_GUEST_NO) ? 0 : 1; + memtest = 0; TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest); /* From owner-svn-src-all@FreeBSD.ORG Thu May 21 20:03:37 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 20:09:37 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 20:11:53 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 20:15:32 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 20:18:14 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 20:22:56 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 20:39:39 2015 Return-Path: Delivered-To: svn-src-all@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 DB6DA70D; Thu, 21 May 2015 20:39: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 C8D6E1448; Thu, 21 May 2015 20:39: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 t4LKddcd020652; Thu, 21 May 2015 20:39:39 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LKddQh020651; Thu, 21 May 2015 20:39:39 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505212039.t4LKddQh020651@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 20:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283267 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 20:39:40 -0000 Author: pfg Date: Thu May 21 20:39:39 2015 New Revision: 283267 URL: https://svnweb.freebsd.org/changeset/base/283267 Log: MFC r282863: Adjust visibility macros. The GCC visibility attributes were introduced in GCC 4.0. Apparently the "protected" attribute was introduced only until GCC 4.2, but we are not currently using it. Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/cdefs.h ============================================================================== --- stable/10/sys/sys/cdefs.h Thu May 21 20:22:55 2015 (r283266) +++ stable/10/sys/sys/cdefs.h Thu May 21 20:39:39 2015 (r283267) @@ -439,7 +439,7 @@ #define __predict_false(exp) (exp) #endif -#if __GNUC_PREREQ__(4, 2) +#if __GNUC_PREREQ__(4, 0) #define __hidden __attribute__((__visibility__("hidden"))) #define __exported __attribute__((__visibility__("default"))) #else From owner-svn-src-all@FreeBSD.ORG Thu May 21 20:43:02 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 20:47:20 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 21:20:55 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 21:45:38 2015 Return-Path: Delivered-To: svn-src-all@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 C4650D48; Thu, 21 May 2015 21:45: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 A4A101C58; Thu, 21 May 2015 21:45: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 t4LLjcte058423; Thu, 21 May 2015 21:45:38 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LLjcvn058422; Thu, 21 May 2015 21:45:38 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505212145.t4LLjcvn058422@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 21:45:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283270 - stable/10/contrib/netcat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 21:45:38 -0000 Author: delphij Date: Thu May 21 21:45:37 2015 New Revision: 283270 URL: https://svnweb.freebsd.org/changeset/base/283270 Log: MFC r282613: MFV r282611: netcat from OpenBSD 5.7. Modified: stable/10/contrib/netcat/netcat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netcat/netcat.c ============================================================================== --- stable/10/contrib/netcat/netcat.c Thu May 21 20:47:19 2015 (r283269) +++ stable/10/contrib/netcat/netcat.c Thu May 21 21:45:37 2015 (r283270) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.122 2014/07/20 01:38:40 guenther Exp $ */ +/* $OpenBSD: netcat.c,v 1.127 2015/02/14 22:40:22 jca Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -42,7 +42,6 @@ #include #include -#include #ifdef IPSEC #include #endif @@ -73,6 +72,12 @@ #define PORT_MAX_LEN 6 #define UNIX_DG_TMP_SOCKET_SIZE 19 +#define POLL_STDIN 0 +#define POLL_NETOUT 1 +#define POLL_NETIN 2 +#define POLL_STDOUT 3 +#define BUFSIZE 16384 + /* Command Line Options */ int dflag; /* detached, no stdin */ int Fflag; /* fdpass sock to stdout */ @@ -117,10 +122,12 @@ int udptest(int); int unix_bind(char *); int unix_connect(char *); int unix_listen(char *); -void set_common_sockopts(int); +void set_common_sockopts(int, int); int map_tos(char *, int *); void report_connect(const struct sockaddr *, socklen_t); void usage(int); +ssize_t drainbuf(int, unsigned char *, size_t *); +ssize_t fillbuf(int, unsigned char *, size_t *); #ifdef IPSEC void add_ipsec_policy(int, char *); @@ -436,7 +443,7 @@ main(int argc, char *argv[]) &len); if (connfd == -1) { /* For now, all errnos are fatal */ - err(1, "accept"); + err(1, "accept"); } if (vflag) report_connect((struct sockaddr *)&cliaddr, len); @@ -663,7 +670,7 @@ remote_connect(const char *host, const c freeaddrinfo(ares); } - set_common_sockopts(s); + set_common_sockopts(s, res0->ai_family); if (timeout_connect(s, res0->ai_addr, res0->ai_addrlen) == 0) break; @@ -767,6 +774,8 @@ local_listen(char *host, char *port, str err(1, "disable TCP options"); } + set_common_sockopts(s, res0->ai_family); + if (bind(s, (struct sockaddr *)res0->ai_addr, res0->ai_addrlen) == 0) break; @@ -790,68 +799,224 @@ local_listen(char *host, char *port, str * Loop that polls on the network file descriptor and stdin. */ void -readwrite(int nfd) +readwrite(int net_fd) { - struct pollfd pfd[2]; - unsigned char buf[16 * 1024]; - int n, wfd = fileno(stdin); - int lfd = fileno(stdout); - int plen; - - plen = sizeof(buf); - - /* Setup Network FD */ - pfd[0].fd = nfd; - pfd[0].events = POLLIN; - - /* Set up STDIN FD. */ - pfd[1].fd = wfd; - pfd[1].events = POLLIN; + struct pollfd pfd[4]; + int stdin_fd = STDIN_FILENO; + int stdout_fd = STDOUT_FILENO; + unsigned char netinbuf[BUFSIZE]; + size_t netinbufpos = 0; + unsigned char stdinbuf[BUFSIZE]; + size_t stdinbufpos = 0; + int n, num_fds; + ssize_t ret; + + /* don't read from stdin if requested */ + if (dflag) + stdin_fd = -1; + + /* stdin */ + pfd[POLL_STDIN].fd = stdin_fd; + pfd[POLL_STDIN].events = POLLIN; + + /* network out */ + pfd[POLL_NETOUT].fd = net_fd; + pfd[POLL_NETOUT].events = 0; + + /* network in */ + pfd[POLL_NETIN].fd = net_fd; + pfd[POLL_NETIN].events = POLLIN; + + /* stdout */ + pfd[POLL_STDOUT].fd = stdout_fd; + pfd[POLL_STDOUT].events = 0; + + while (1) { + /* both inputs are gone, buffers are empty, we are done */ + if (pfd[POLL_STDIN].fd == -1 && pfd[POLL_NETIN].fd == -1 + && stdinbufpos == 0 && netinbufpos == 0) { + close(net_fd); + return; + } + /* both outputs are gone, we can't continue */ + if (pfd[POLL_NETOUT].fd == -1 && pfd[POLL_STDOUT].fd == -1) { + close(net_fd); + return; + } + /* listen and net in gone, queues empty, done */ + if (lflag && pfd[POLL_NETIN].fd == -1 + && stdinbufpos == 0 && netinbufpos == 0) { + close(net_fd); + return; + } - while (pfd[0].fd != -1) { + /* help says -i is for "wait between lines sent". We read and + * write arbitrary amounts of data, and we don't want to start + * scanning for newlines, so this is as good as it gets */ if (iflag) sleep(iflag); - if ((n = poll(pfd, 2 - dflag, timeout)) < 0) { - int saved_errno = errno; - close(nfd); - errc(1, saved_errno, "Polling Error"); + /* poll */ + num_fds = poll(pfd, 4, timeout); + + /* treat poll errors */ + if (num_fds == -1) { + close(net_fd); + err(1, "polling error"); } - if (n == 0) + /* timeout happened */ + if (num_fds == 0) return; - if (pfd[0].revents & POLLIN) { - if ((n = read(nfd, buf, plen)) < 0) - return; - else if (n == 0) { - shutdown(nfd, SHUT_RD); - pfd[0].fd = -1; - pfd[0].events = 0; - } else { - if (tflag) - atelnet(nfd, buf, n); - if (atomicio(vwrite, lfd, buf, n) != n) - return; + /* treat socket error conditions */ + for (n = 0; n < 4; n++) { + if (pfd[n].revents & (POLLERR|POLLNVAL)) { + pfd[n].fd = -1; } } + /* reading is possible after HUP */ + if (pfd[POLL_STDIN].events & POLLIN && + pfd[POLL_STDIN].revents & POLLHUP && + ! (pfd[POLL_STDIN].revents & POLLIN)) + pfd[POLL_STDIN].fd = -1; + + if (pfd[POLL_NETIN].events & POLLIN && + pfd[POLL_NETIN].revents & POLLHUP && + ! (pfd[POLL_NETIN].revents & POLLIN)) + pfd[POLL_NETIN].fd = -1; + + if (pfd[POLL_NETOUT].revents & POLLHUP) { + if (Nflag) + shutdown(pfd[POLL_NETOUT].fd, SHUT_WR); + pfd[POLL_NETOUT].fd = -1; + } + /* if HUP, stop watching stdout */ + if (pfd[POLL_STDOUT].revents & POLLHUP) + pfd[POLL_STDOUT].fd = -1; + /* if no net out, stop watching stdin */ + if (pfd[POLL_NETOUT].fd == -1) + pfd[POLL_STDIN].fd = -1; + /* if no stdout, stop watching net in */ + if (pfd[POLL_STDOUT].fd == -1) { + if (pfd[POLL_NETIN].fd != -1) + shutdown(pfd[POLL_NETIN].fd, SHUT_RD); + pfd[POLL_NETIN].fd = -1; + } - if (!dflag && pfd[1].revents & POLLIN) { - if ((n = read(wfd, buf, plen)) < 0) - return; - else if (n == 0) { - if (Nflag) - shutdown(nfd, SHUT_WR); - pfd[1].fd = -1; - pfd[1].events = 0; - } else { - if (atomicio(vwrite, nfd, buf, n) != n) - return; + /* try to read from stdin */ + if (pfd[POLL_STDIN].revents & POLLIN && stdinbufpos < BUFSIZE) { + ret = fillbuf(pfd[POLL_STDIN].fd, stdinbuf, + &stdinbufpos); + /* error or eof on stdin - remove from pfd */ + if (ret == 0 || ret == -1) + pfd[POLL_STDIN].fd = -1; + /* read something - poll net out */ + if (stdinbufpos > 0) + pfd[POLL_NETOUT].events = POLLOUT; + /* filled buffer - remove self from polling */ + if (stdinbufpos == BUFSIZE) + pfd[POLL_STDIN].events = 0; + } + /* try to write to network */ + if (pfd[POLL_NETOUT].revents & POLLOUT && stdinbufpos > 0) { + ret = drainbuf(pfd[POLL_NETOUT].fd, stdinbuf, + &stdinbufpos); + if (ret == -1) + pfd[POLL_NETOUT].fd = -1; + /* buffer empty - remove self from polling */ + if (stdinbufpos == 0) + pfd[POLL_NETOUT].events = 0; + /* buffer no longer full - poll stdin again */ + if (stdinbufpos < BUFSIZE) + pfd[POLL_STDIN].events = POLLIN; + } + /* try to read from network */ + if (pfd[POLL_NETIN].revents & POLLIN && netinbufpos < BUFSIZE) { + ret = fillbuf(pfd[POLL_NETIN].fd, netinbuf, + &netinbufpos); + if (ret == -1) + pfd[POLL_NETIN].fd = -1; + /* eof on net in - remove from pfd */ + if (ret == 0) { + shutdown(pfd[POLL_NETIN].fd, SHUT_RD); + pfd[POLL_NETIN].fd = -1; } + /* read something - poll stdout */ + if (netinbufpos > 0) + pfd[POLL_STDOUT].events = POLLOUT; + /* filled buffer - remove self from polling */ + if (netinbufpos == BUFSIZE) + pfd[POLL_NETIN].events = 0; + /* handle telnet */ + if (tflag) + atelnet(pfd[POLL_NETIN].fd, netinbuf, + netinbufpos); + } + /* try to write to stdout */ + if (pfd[POLL_STDOUT].revents & POLLOUT && netinbufpos > 0) { + ret = drainbuf(pfd[POLL_STDOUT].fd, netinbuf, + &netinbufpos); + if (ret == -1) + pfd[POLL_STDOUT].fd = -1; + /* buffer empty - remove self from polling */ + if (netinbufpos == 0) + pfd[POLL_STDOUT].events = 0; + /* buffer no longer full - poll net in again */ + if (netinbufpos < BUFSIZE) + pfd[POLL_NETIN].events = POLLIN; + } + + /* stdin gone and queue empty? */ + if (pfd[POLL_STDIN].fd == -1 && stdinbufpos == 0) { + if (pfd[POLL_NETOUT].fd != -1 && Nflag) + shutdown(pfd[POLL_NETOUT].fd, SHUT_WR); + pfd[POLL_NETOUT].fd = -1; + } + /* net in gone and queue empty? */ + if (pfd[POLL_NETIN].fd == -1 && netinbufpos == 0) { + pfd[POLL_STDOUT].fd = -1; } } } +ssize_t +drainbuf(int fd, unsigned char *buf, size_t *bufpos) +{ + ssize_t n; + ssize_t adjust; + + n = write(fd, buf, *bufpos); + /* don't treat EAGAIN, EINTR as error */ + if (n == -1 && (errno == EAGAIN || errno == EINTR)) + n = -2; + if (n <= 0) + return n; + /* adjust buffer */ + adjust = *bufpos - n; + if (adjust > 0) + memmove(buf, buf + n, adjust); + *bufpos -= n; + return n; +} + + +ssize_t +fillbuf(int fd, unsigned char *buf, size_t *bufpos) +{ + size_t num = BUFSIZE - *bufpos; + ssize_t n; + + n = read(fd, buf + *bufpos, num); + /* don't treat EAGAIN, EINTR as error */ + if (n == -1 && (errno == EAGAIN || errno == EINTR)) + n = -2; + if (n <= 0) + return n; + *bufpos += n; + return n; +} + /* * fdpass() * Pass the connected file descriptor to stdout and exit. @@ -1025,7 +1190,7 @@ udptest(int s) } void -set_common_sockopts(int s) +set_common_sockopts(int s, int af) { int x = 1; @@ -1040,8 +1205,17 @@ set_common_sockopts(int s) err(1, NULL); } if (Tflag != -1) { - if (setsockopt(s, IPPROTO_IP, IP_TOS, - &Tflag, sizeof(Tflag)) == -1) + int proto, option; + + if (af == AF_INET6) { + proto = IPPROTO_IPV6; + option = IPV6_TCLASS; + } else { + proto = IPPROTO_IP; + option = IP_TOS; + } + + if (setsockopt(s, proto, option, &Tflag, sizeof(Tflag)) == -1) err(1, "set IP ToS"); } if (Iflag) { From owner-svn-src-all@FreeBSD.ORG Thu May 21 22:11:58 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 22:50:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Thu May 21 23:14:19 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@FreeBSD.ORG Fri May 22 01:44:08 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 02:00:46 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 03:16:21 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 04:34:45 2015 Return-Path: Delivered-To: svn-src-all@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 E6C0B6F4 for ; Fri, 22 May 2015 04:34:44 +0000 (UTC) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com [209.85.215.41]) (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 734BB1700 for ; Fri, 22 May 2015 04:34:44 +0000 (UTC) Received: by lagv1 with SMTP id v1so4606257lag.3 for ; Thu, 21 May 2015 21:34:42 -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:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=JkVdDLIiAD958ftCtOTUos0kWUXqFzM3uhHWPgos7F0=; b=NabSQekGXXaIZ4FSVhi6oqUfJ5er03rSUJ/dL6jyrUxPL08QZUkV6i6+DJAlVgCot2 MMVVObcVuKNRZSeeRBsHe5wpv0XJpMhtroTNnNXbGeYGQCndEjwyWHjW4uutG7WVVd6R H3QjwSOCnIw1f03e58RC/NQw37WFOI1VUZmBZg2kMkvwQtIa5KITjs5ATgx7Zcn+GD9x vyRgxboahQH94ltCRWvQjaNqbREq/k9ZoK0JO4cGGvDEMkhUoze4560MswwEuKfOqtgG ff4p3D29mTYVUuiC8/ngowlKAG5210dm1n1mEG5/QVTVdC2skalJI1Q0gYKyVi14gBAC w5dg== X-Gm-Message-State: ALoCoQnr0vijIgqDjnfouFKNxbgd27S13i7RQ2UocEfTjwKJqu8g6VZx7QVNppItHbAE7SAXPk1+ X-Received: by 10.153.6.36 with SMTP id cr4mr4948449lad.56.1432268832124; Thu, 21 May 2015 21:27:12 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id kb5sm211229lbc.16.2015.05.21.21.27.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 May 2015 21:27:11 -0700 (PDT) Message-ID: <555EB01C.6020805@freebsd.org> Date: Fri, 22 May 2015 07:27:08 +0300 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r283258 - stable/10/bin/date References: <201505211859.t4LIxCFx070119@svn.freebsd.org> In-Reply-To: <201505211859.t4LIxCFx070119@svn.freebsd.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 04:34:45 -0000 On 21.05.2015 21:59, Xin LI wrote: > Author: delphij > Date: Thu May 21 18:59:11 2015 > New Revision: 283258 > URL: https://svnweb.freebsd.org/changeset/base/283258 > > Log: > MFC r282608: > > date(1): Make -r behave like GNU's version when the option can not be > interpreted as a number, which checks the file's modification time and > use that as the date/time value. > > This improves compatibility with GNU coreutils's version of date(1). This is ambiguous. What about, say, file '222'? Doing strtoq() first makes such files not handled and doing stat() first (if the file exists by chance) makes such dates not handled. GNU date always uses -r/--reference for files only. Perhaps it will be better to just add long option --reference for files. > > Modified: > stable/10/bin/date/date.1 > stable/10/bin/date/date.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/bin/date/date.1 > ============================================================================== > --- stable/10/bin/date/date.1 Thu May 21 18:29:36 2015 (r283257) > +++ stable/10/bin/date/date.1 Thu May 21 18:59:11 2015 (r283258) > @@ -32,7 +32,7 @@ > .\" @(#)date.1 8.3 (Berkeley) 4/28/95 > .\" $FreeBSD$ > .\" > -.Dd April 26, 2014 > +.Dd May 7, 2015 > .Dt DATE 1 > .Os > .Sh NAME > @@ -41,7 +41,7 @@ > .Sh SYNOPSIS > .Nm > .Op Fl jRu > -.Op Fl r Ar seconds > +.Op Fl r Ar seconds | Ar filename > .Oo > .Fl v > .Sm off > @@ -150,6 +150,9 @@ is the number of seconds since the Epoch > see > .Xr time 3 ) , > and can be specified in decimal, octal, or hex. > +.It Fl r Ar filename > +Print the date and time of the last modification of > +.Ar filename . > .It Fl t Ar minutes_west > Set the system's value for minutes west of > .Tn GMT . > > Modified: stable/10/bin/date/date.c > ============================================================================== > --- stable/10/bin/date/date.c Thu May 21 18:29:36 2015 (r283257) > +++ stable/10/bin/date/date.c Thu May 21 18:59:11 2015 (r283258) > @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > > #include > #include > @@ -85,6 +86,7 @@ main(int argc, char *argv[]) > struct vary *v; > const struct vary *badv; > struct tm lt; > + struct stat sb; > > v = NULL; > fmt = NULL; > @@ -116,8 +118,12 @@ main(int argc, char *argv[]) > case 'r': /* user specified seconds */ > rflag = 1; > tval = strtoq(optarg, &tmp, 0); > - if (*tmp != 0) > - usage(); > + if (*tmp != 0) { > + if (stat(optarg, &sb) == 0) > + tval = sb.st_mtim.tv_sec; > + else > + usage(); > + } > break; > case 't': /* minutes west of UTC */ > /* error check; don't allow "PST" */ > -- http://ache.vniz.net/ From owner-svn-src-all@FreeBSD.ORG Fri May 22 05:02:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 06:46:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 07:39:22 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 08:11:32 2015 Return-Path: Delivered-To: svn-src-all@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 55783C9F; Fri, 22 May 2015 08:11: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 437661ED2; Fri, 22 May 2015 08:11: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 t4M8BWSx067680; Fri, 22 May 2015 08:11:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4M8BVrQ067677; Fri, 22 May 2015 08:11:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505220811.t4M8BVrQ067677@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 May 2015 08:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283279 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 08:11:32 -0000 Author: kib Date: Fri May 22 08:11:31 2015 New Revision: 283279 URL: https://svnweb.freebsd.org/changeset/base/283279 Log: MFC r282944: Decrement p_boundary_count in the single-threading thread, during making other thread runnable. This guarantees that upon return from the thread_single_end(), p_boundary_count is zero. Modified: stable/10/sys/kern/kern_thread.c stable/10/sys/sys/proc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_thread.c ============================================================================== --- stable/10/sys/kern/kern_thread.c Fri May 22 07:39:21 2015 (r283278) +++ stable/10/sys/kern/kern_thread.c Fri May 22 08:11:31 2015 (r283279) @@ -75,6 +75,8 @@ static struct mtx zombie_lock; MTX_SYSINIT(zombie_lock, &zombie_lock, "zombie lock", MTX_SPIN); static void thread_zombie(struct thread *); +static int thread_unsuspend_one(struct thread *td, struct proc *p, + bool boundary); #define TID_BUFFER_SIZE 1024 @@ -446,7 +448,7 @@ thread_exit(void) if (p->p_numthreads == p->p_suspcount) { thread_lock(p->p_singlethread); wakeup_swapper = thread_unsuspend_one( - p->p_singlethread, p); + p->p_singlethread, p, false); thread_unlock(p->p_singlethread); if (wakeup_swapper) kick_proc0(); @@ -602,19 +604,19 @@ weed_inhib(int mode, struct thread *td2, switch (mode) { case SINGLE_EXIT: if (TD_IS_SUSPENDED(td2)) - wakeup_swapper |= thread_unsuspend_one(td2, p); + wakeup_swapper |= thread_unsuspend_one(td2, p, true); if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) wakeup_swapper |= sleepq_abort(td2, EINTR); break; case SINGLE_BOUNDARY: if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY) == 0) - wakeup_swapper |= thread_unsuspend_one(td2, p); + wakeup_swapper |= thread_unsuspend_one(td2, p, false); if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) wakeup_swapper |= sleepq_abort(td2, ERESTART); break; case SINGLE_NO_EXIT: if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY) == 0) - wakeup_swapper |= thread_unsuspend_one(td2, p); + wakeup_swapper |= thread_unsuspend_one(td2, p, false); if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) wakeup_swapper |= sleepq_abort(td2, ERESTART); break; @@ -629,7 +631,7 @@ weed_inhib(int mode, struct thread *td2, */ if (TD_IS_SUSPENDED(td2) && (td2->td_flags & (TDF_BOUNDARY | TDF_ALLPROCSUSP)) == 0) - wakeup_swapper |= thread_unsuspend_one(td2, p); + wakeup_swapper |= thread_unsuspend_one(td2, p, false); if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) { if ((td2->td_flags & TDF_SBDRY) == 0) { thread_suspend_one(td2); @@ -897,8 +899,8 @@ thread_suspend_check(int return_instead) if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) { if (p->p_numthreads == p->p_suspcount + 1) { thread_lock(p->p_singlethread); - wakeup_swapper = - thread_unsuspend_one(p->p_singlethread, p); + wakeup_swapper = thread_unsuspend_one( + p->p_singlethread, p, false); thread_unlock(p->p_singlethread); if (wakeup_swapper) kick_proc0(); @@ -917,15 +919,8 @@ thread_suspend_check(int return_instead) } PROC_SUNLOCK(p); mi_switch(SW_INVOL | SWT_SUSPEND, NULL); - if (return_instead == 0) - td->td_flags &= ~TDF_BOUNDARY; thread_unlock(td); PROC_LOCK(p); - if (return_instead == 0) { - PROC_SLOCK(p); - p->p_boundary_count--; - PROC_SUNLOCK(p); - } } return (0); } @@ -974,8 +969,8 @@ thread_suspend_one(struct thread *td) sched_sleep(td, 0); } -int -thread_unsuspend_one(struct thread *td, struct proc *p) +static int +thread_unsuspend_one(struct thread *td, struct proc *p, bool boundary) { THREAD_LOCK_ASSERT(td, MA_OWNED); @@ -985,6 +980,10 @@ thread_unsuspend_one(struct thread *td, if (td->td_proc == p) { PROC_SLOCK_ASSERT(p, MA_OWNED); p->p_suspcount--; + if (boundary && (td->td_flags & TDF_BOUNDARY) != 0) { + td->td_flags &= ~TDF_BOUNDARY; + p->p_boundary_count--; + } } return (setrunnable(td)); } @@ -1005,12 +1004,13 @@ thread_unsuspend(struct proc *p) FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); if (TD_IS_SUSPENDED(td)) { - wakeup_swapper |= thread_unsuspend_one(td, p); + wakeup_swapper |= thread_unsuspend_one(td, p, + true); } thread_unlock(td); } - } else if ((P_SHOULDSTOP(p) == P_STOPPED_SINGLE) && - (p->p_numthreads == p->p_suspcount)) { + } else if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE && + p->p_numthreads == p->p_suspcount) { /* * Stopping everything also did the job for the single * threading request. Now we've downgraded to single-threaded, @@ -1019,7 +1019,7 @@ thread_unsuspend(struct proc *p) if (p->p_singlethread->td_proc == p) { thread_lock(p->p_singlethread); wakeup_swapper = thread_unsuspend_one( - p->p_singlethread, p); + p->p_singlethread, p, false); thread_unlock(p->p_singlethread); } } @@ -1043,6 +1043,12 @@ thread_single_end(struct proc *p, int mo KASSERT((mode == SINGLE_ALLPROC && (p->p_flag & P_TOTAL_STOP) != 0) || (mode != SINGLE_ALLPROC && (p->p_flag & P_TOTAL_STOP) == 0), ("mode %d does not match P_TOTAL_STOP", mode)); + KASSERT(mode == SINGLE_ALLPROC || p->p_singlethread == curthread, + ("thread_single_end from other thread %p %p", + curthread, p->p_singlethread)); + KASSERT(mode != SINGLE_BOUNDARY || + (p->p_flag & P_SINGLE_BOUNDARY) != 0, + ("mis-matched SINGLE_BOUNDARY flags %x", p->p_flag)); p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT | P_SINGLE_BOUNDARY | P_TOTAL_STOP); PROC_SLOCK(p); @@ -1058,11 +1064,14 @@ thread_single_end(struct proc *p, int mo FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); if (TD_IS_SUSPENDED(td)) { - wakeup_swapper |= thread_unsuspend_one(td, p); + wakeup_swapper |= thread_unsuspend_one(td, p, + mode == SINGLE_BOUNDARY); } thread_unlock(td); } } + KASSERT(mode != SINGLE_BOUNDARY || p->p_boundary_count == 0, + ("inconsistent boundary count %d", p->p_boundary_count)); PROC_SUNLOCK(p); if (wakeup_swapper) kick_proc0(); Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Fri May 22 07:39:21 2015 (r283278) +++ stable/10/sys/sys/proc.h Fri May 22 08:11:31 2015 (r283279) @@ -966,7 +966,6 @@ void thread_suspend_switch(struct thread void thread_suspend_one(struct thread *td); void thread_unlink(struct thread *td); void thread_unsuspend(struct proc *p); -int thread_unsuspend_one(struct thread *td, struct proc *p); void thread_wait(struct proc *p); struct thread *thread_find(struct proc *p, lwpid_t tid); From owner-svn-src-all@FreeBSD.ORG Fri May 22 09:03:58 2015 Return-Path: Delivered-To: svn-src-all@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 5909D2EB; Fri, 22 May 2015 09:03: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 441041564; Fri, 22 May 2015 09:03: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 t4M93wgh093618; Fri, 22 May 2015 09:03:58 GMT (envelope-from whu@FreeBSD.org) Received: (from whu@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4M93uHI093604; Fri, 22 May 2015 09:03:56 GMT (envelope-from whu@FreeBSD.org) Message-Id: <201505220903.t4M93uHI093604@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: whu set sender to whu@FreeBSD.org using -f From: Wei Hu Date: Fri, 22 May 2015 09:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283280 - in stable/10/sys: amd64/amd64 amd64/conf amd64/include conf dev/hyperv/include dev/hyperv/storvsc dev/hyperv/utilities dev/hyperv/vmbus i386/conf i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 09:03:58 -0000 Author: whu Date: Fri May 22 09:03:55 2015 New Revision: 283280 URL: https://svnweb.freebsd.org/changeset/base/283280 Log: MFC r282212: Microsoft vmbus, storage and other related driver enhancements for HyperV. - Vmbus multi channel support. - Vector interrupt support. - Signal optimization. - Storvsc driver performance improvement. - Scatter and gather support for storvsc driver. - Minor bug fix for KVP driver. Thanks royger, jhb and delphij from FreeBSD community for the reviews and comments. Also thanks Hovy Xu from NetApp for the contributions to the storvsc driver. PR: 195238 Submitted by: whu Reviewed by: royger Approved by: royger Relnotes: yes Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D2575 Modified: stable/10/sys/amd64/amd64/apic_vector.S stable/10/sys/amd64/conf/GENERIC stable/10/sys/amd64/conf/NOTES stable/10/sys/amd64/include/apicvar.h stable/10/sys/conf/options.amd64 stable/10/sys/conf/options.i386 stable/10/sys/dev/hyperv/include/hyperv.h stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c stable/10/sys/dev/hyperv/storvsc/hv_vstorage.h stable/10/sys/dev/hyperv/utilities/hv_kvp.c stable/10/sys/dev/hyperv/utilities/hv_util.c stable/10/sys/dev/hyperv/vmbus/hv_channel.c stable/10/sys/dev/hyperv/vmbus/hv_channel_mgmt.c stable/10/sys/dev/hyperv/vmbus/hv_connection.c stable/10/sys/dev/hyperv/vmbus/hv_hv.c stable/10/sys/dev/hyperv/vmbus/hv_ring_buffer.c stable/10/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c stable/10/sys/dev/hyperv/vmbus/hv_vmbus_priv.h stable/10/sys/i386/conf/GENERIC stable/10/sys/i386/i386/apic_vector.s Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/apic_vector.S ============================================================================== --- stable/10/sys/amd64/amd64/apic_vector.S Fri May 22 08:11:31 2015 (r283279) +++ stable/10/sys/amd64/amd64/apic_vector.S Fri May 22 09:03:55 2015 (r283280) @@ -150,6 +150,22 @@ IDTVEC(xen_intr_upcall) jmp doreti #endif +#ifdef HYPERV +/* + * This is the Hyper-V vmbus channel direct callback interrupt. + * Only used when it is running on Hyper-V. + */ + .text + SUPERALIGN_TEXT +IDTVEC(hv_vmbus_callback) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + movq %rsp, %rdi + call hv_vector_handler + MEXITCOUNT + jmp doreti +#endif + #ifdef SMP /* * Global address space TLB shootdown. Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Fri May 22 08:11:31 2015 (r283279) +++ stable/10/sys/amd64/conf/GENERIC Fri May 22 09:03:55 2015 (r283280) @@ -346,7 +346,9 @@ device virtio_blk # VirtIO Block devic device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device -# HyperV drivers +# HyperV drivers and enchancement support +# NOTE: HYPERV depends on hyperv. They must be added or removed together. +options HYPERV # Hyper-V kernel infrastructure device hyperv # HyperV drivers # Xen HVM Guest Optimizations Modified: stable/10/sys/amd64/conf/NOTES ============================================================================== --- stable/10/sys/amd64/conf/NOTES Fri May 22 08:11:31 2015 (r283279) +++ stable/10/sys/amd64/conf/NOTES Fri May 22 09:03:55 2015 (r283280) @@ -479,6 +479,8 @@ device virtio_balloon # VirtIO Memory B device virtio_random # VirtIO Entropy device device virtio_console # VirtIO Console device +# Microsoft Hyper-V enchancement support +options HYPERV # Hyper-V kernel infrastructure device hyperv # HyperV drivers # Xen HVM Guest Optimizations Modified: stable/10/sys/amd64/include/apicvar.h ============================================================================== --- stable/10/sys/amd64/include/apicvar.h Fri May 22 08:11:31 2015 (r283279) +++ stable/10/sys/amd64/include/apicvar.h Fri May 22 09:03:55 2015 (r283280) @@ -216,6 +216,7 @@ int lapic_set_lvt_triggermode(u_int apic void lapic_set_tpr(u_int vector); void lapic_setup(int boot); void xen_intr_handle_upcall(struct trapframe *frame); +void hv_vector_handler(struct trapframe *frame); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ Modified: stable/10/sys/conf/options.amd64 ============================================================================== --- stable/10/sys/conf/options.amd64 Fri May 22 08:11:31 2015 (r283279) +++ stable/10/sys/conf/options.amd64 Fri May 22 09:03:55 2015 (r283280) @@ -67,5 +67,7 @@ BPF_JITTER opt_bpf.h XENHVM opt_global.h +HYPERV opt_global.h + # options for the Intel C600 SAS driver (isci) ISCI_LOGGING opt_isci.h Modified: stable/10/sys/conf/options.i386 ============================================================================== --- stable/10/sys/conf/options.i386 Fri May 22 08:11:31 2015 (r283279) +++ stable/10/sys/conf/options.i386 Fri May 22 09:03:55 2015 (r283280) @@ -127,5 +127,7 @@ NATIVE opt_global.h XEN opt_global.h XENHVM opt_global.h +HYPERV opt_global.h + # options for the Intel C600 SAS driver (isci) ISCI_LOGGING opt_isci.h Modified: stable/10/sys/dev/hyperv/include/hyperv.h ============================================================================== --- stable/10/sys/dev/hyperv/include/hyperv.h Fri May 22 08:11:31 2015 (r283279) +++ stable/10/sys/dev/hyperv/include/hyperv.h Fri May 22 09:03:55 2015 (r283280) @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -63,11 +64,22 @@ typedef uint8_t hv_bool_uint8_t; #define HV_ERROR_MACHINE_LOCKED 0x800704F7 /* - * A revision number of vmbus that is used for ensuring both ends on a - * partition are using compatible versions. - */ + * VMBUS version is 32 bit, upper 16 bit for major_number and lower + * 16 bit for minor_number. + * + * 0.13 -- Windows Server 2008 + * 1.1 -- Windows 7 + * 2.4 -- Windows 8 + * 3.0 -- Windows 8.1 + */ +#define HV_VMBUS_VERSION_WS2008 ((0 << 16) | (13)) +#define HV_VMBUS_VERSION_WIN7 ((1 << 16) | (1)) +#define HV_VMBUS_VERSION_WIN8 ((2 << 16) | (4)) +#define HV_VMBUS_VERSION_WIN8_1 ((3 << 16) | (0)) -#define HV_VMBUS_REVISION_NUMBER 13 +#define HV_VMBUS_VERSION_INVALID -1 + +#define HV_VMBUS_VERSION_CURRENT HV_VMBUS_VERSION_WIN8_1 /* * Make maximum size of pipe payload of 16K @@ -112,6 +124,18 @@ typedef struct hv_guid { unsigned char data[16]; } __packed hv_guid; +#define HV_NIC_GUID \ + .data = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46, \ + 0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E} + +#define HV_IDE_GUID \ + .data = {0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44, \ + 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5} + +#define HV_SCSI_GUID \ + .data = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d, \ + 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f} + /* * At the center of the Channel Management library is * the Channel Offer. This struct contains the @@ -147,7 +171,11 @@ typedef struct hv_vmbus_channel_offer { } __packed pipe; } u; - uint32_t padding; + /* + * Sub_channel_index, newly added in Win8. + */ + uint16_t sub_channel_index; + uint16_t padding; } __packed hv_vmbus_channel_offer; @@ -344,7 +372,25 @@ typedef struct { hv_vmbus_channel_offer offer; uint32_t child_rel_id; uint8_t monitor_id; - hv_bool_uint8_t monitor_allocated; + /* + * This field has been split into a bit field on Win7 + * and higher. + */ + uint8_t monitor_allocated:1; + uint8_t reserved:7; + /* + * Following fields were added in win7 and higher. + * Make sure to check the version before accessing these fields. + * + * If "is_dedicated_interrupt" is set, we must not set the + * associated bit in the channel bitmap while sending the + * interrupt to the host. + * + * connection_id is used in signaling the host. + */ + uint16_t is_dedicated_interrupt:1; + uint16_t reserved1:15; + uint32_t connection_id; } __packed hv_vmbus_channel_offer_channel; /* @@ -394,9 +440,11 @@ typedef struct hv_gpadl_handle ring_buffer_gpadl_handle; /* - * GPADL for the channel's server context save area. + * Before win8, all incoming channel interrupts are only + * delivered on cpu 0. Setting this value to 0 would + * preserve the earlier behavior. */ - hv_gpadl_handle server_context_area_gpadl_handle; + uint32_t target_vcpu; /* * The upstream ring buffer begins at offset zero in the memory described @@ -646,14 +694,42 @@ typedef struct { } hv_vmbus_ring_buffer_info; typedef void (*hv_vmbus_pfn_channel_callback)(void *context); +typedef void (*hv_vmbus_sc_creation_callback)(void *context); typedef enum { HV_CHANNEL_OFFER_STATE, HV_CHANNEL_OPENING_STATE, HV_CHANNEL_OPEN_STATE, + HV_CHANNEL_OPENED_STATE, HV_CHANNEL_CLOSING_NONDESTRUCTIVE_STATE, } hv_vmbus_channel_state; +/* + * Connection identifier type + */ +typedef union { + uint32_t as_uint32_t; + struct { + uint32_t id:24; + uint32_t reserved:8; + } u; + +} __packed hv_vmbus_connection_id; + +/* + * Definition of the hv_vmbus_signal_event hypercall input structure + */ +typedef struct { + hv_vmbus_connection_id connection_id; + uint16_t flag_number; + uint16_t rsvd_z; +} __packed hv_vmbus_input_signal_event; + +typedef struct { + uint64_t align8; + hv_vmbus_input_signal_event event; +} __packed hv_vmbus_input_signal_event_buffer; + typedef struct hv_vmbus_channel { TAILQ_ENTRY(hv_vmbus_channel) list_entry; struct hv_device* device; @@ -688,8 +764,82 @@ typedef struct hv_vmbus_channel { hv_vmbus_pfn_channel_callback on_channel_callback; void* channel_callback_context; + /* + * If batched_reading is set to "true", mask the interrupt + * and read until the channel is empty. + * If batched_reading is set to "false", the channel is not + * going to perform batched reading. + * + * Batched reading is enabled by default; specific + * drivers that don't want this behavior can turn it off. + */ + boolean_t batched_reading; + + boolean_t is_dedicated_interrupt; + + /* + * Used as an input param for HV_CALL_SIGNAL_EVENT hypercall. + */ + hv_vmbus_input_signal_event_buffer signal_event_buffer; + /* + * 8-bytes aligned of the buffer above + */ + hv_vmbus_input_signal_event *signal_event_param; + + /* + * From Win8, this field specifies the target virtual process + * on which to deliver the interupt from the host to guest. + * Before Win8, all channel interrupts would only be + * delivered on cpu 0. Setting this value to 0 would preserve + * the earlier behavior. + */ + uint32_t target_vcpu; + /* The corresponding CPUID in the guest */ + uint32_t target_cpu; + + /* + * Support for multi-channels. + * The initial offer is considered the primary channel and this + * offer message will indicate if the host supports multi-channels. + * The guest is free to ask for multi-channels to be offerred and can + * open these multi-channels as a normal "primary" channel. However, + * all multi-channels will have the same type and instance guids as the + * primary channel. Requests sent on a given channel will result in a + * response on the same channel. + */ + + /* + * Multi-channel creation callback. This callback will be called in + * process context when a Multi-channel offer is received from the host. + * The guest can open the Multi-channel in the context of this callback. + */ + hv_vmbus_sc_creation_callback sc_creation_callback; + + struct mtx sc_lock; + + /* + * Link list of all the multi-channels if this is a primary channel + */ + TAILQ_HEAD(, hv_vmbus_channel) sc_list_anchor; + TAILQ_ENTRY(hv_vmbus_channel) sc_list_entry; + + /* + * The primary channel this sub-channle belongs to. + * This will be NULL for the primary channel. + */ + struct hv_vmbus_channel *primary_channel; + /* + * Support per channel state for use by vmbus drivers. + */ + void *per_channel_state; } hv_vmbus_channel; +static inline void +hv_set_channel_read_state(hv_vmbus_channel* channel, boolean_t state) +{ + channel->batched_reading = state; +} + typedef struct hv_device { hv_guid class_id; hv_guid device_id; @@ -760,6 +910,8 @@ int hv_vmbus_channel_teardown_gpdal( hv_vmbus_channel* channel, uint32_t gpadl_handle); +struct hv_vmbus_channel* vmbus_select_outgoing_channel(struct hv_vmbus_channel *promary); + /* * Work abstraction defines */ @@ -819,6 +971,7 @@ typedef struct hv_vmbus_service { extern uint8_t* receive_buffer[]; extern hv_vmbus_service service_table[]; +extern uint32_t hv_vmbus_protocal_version; void hv_kvp_callback(void *context); int hv_kvp_init(hv_vmbus_service *serv); Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri May 22 08:11:31 2015 (r283279) +++ stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri May 22 09:03:55 2015 (r283280) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -53,8 +54,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include +#include +#include #include #include @@ -66,7 +71,6 @@ __FBSDID("$FreeBSD$"); #include #include - #include #include "hv_vstorage.h" @@ -77,8 +81,29 @@ __FBSDID("$FreeBSD$"); #define BLKVSC_MAX_IO_REQUESTS STORVSC_MAX_IO_REQUESTS #define STORVSC_MAX_TARGETS (2) +#define STORVSC_WIN7_MAJOR 4 +#define STORVSC_WIN7_MINOR 2 + +#define STORVSC_WIN8_MAJOR 5 +#define STORVSC_WIN8_MINOR 1 + +#define HV_ALIGN(x, a) roundup2(x, a) + struct storvsc_softc; +struct hv_sgl_node { + LIST_ENTRY(hv_sgl_node) link; + struct sglist *sgl_data; +}; + +struct hv_sgl_page_pool{ + LIST_HEAD(, hv_sgl_node) in_use_sgl_list; + LIST_HEAD(, hv_sgl_node) free_sgl_list; + boolean_t is_init; +} g_hv_sgl_page_pool; + +#define STORVSC_MAX_SG_PAGE_CNT STORVSC_MAX_IO_REQUESTS * HV_MAX_MULTIPAGE_BUFFER_COUNT + enum storvsc_request_type { WRITE_TYPE, READ_TYPE, @@ -96,20 +121,24 @@ struct hv_storvsc_request { struct storvsc_softc *softc; struct callout callout; struct sema synch_sema; /*Synchronize the request/response if needed */ + struct sglist *bounce_sgl; + unsigned int bounce_sgl_count; + uint64_t not_aligned_seg_bits; }; struct storvsc_softc { struct hv_device *hs_dev; - LIST_HEAD(, hv_storvsc_request) hs_free_list; - struct mtx hs_lock; - struct storvsc_driver_props *hs_drv_props; - int hs_unit; - uint32_t hs_frozen; - struct cam_sim *hs_sim; - struct cam_path *hs_path; + LIST_HEAD(, hv_storvsc_request) hs_free_list; + struct mtx hs_lock; + struct storvsc_driver_props *hs_drv_props; + int hs_unit; + uint32_t hs_frozen; + struct cam_sim *hs_sim; + struct cam_path *hs_path; uint32_t hs_num_out_reqs; boolean_t hs_destroy; boolean_t hs_drain_notify; + boolean_t hs_open_multi_channel; struct sema hs_drain_sema; struct hv_storvsc_request hs_init_req; struct hv_storvsc_request hs_reset_req; @@ -124,7 +153,7 @@ struct storvsc_softc { * The first can be tested by "sg_senddiag -vv /dev/daX", * and the second and third can be done by * "sg_wr_mode -v -p 08 -c 0,1a -m 0,ff /dev/daX". - */ + */ #define HVS_TIMEOUT_TEST 0 /* @@ -138,7 +167,7 @@ struct storvsc_driver_props { char *drv_name; char *drv_desc; uint8_t drv_max_luns_per_target; - uint8_t drv_max_ios_per_target; + uint8_t drv_max_ios_per_target; uint32_t drv_ringbuffer_size; }; @@ -150,6 +179,8 @@ enum hv_storage_type { #define HS_MAX_ADAPTERS 10 +#define HV_STORAGE_SUPPORTS_MULTI_CHANNEL 0x1 + /* {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f} */ static const hv_guid gStorVscDeviceType={ .data = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d, @@ -171,13 +202,16 @@ static struct storvsc_driver_props g_drv STORVSC_RINGBUFFER_SIZE} }; +static int storvsc_current_major; +static int storvsc_current_minor; + /* static functions */ static int storvsc_probe(device_t dev); static int storvsc_attach(device_t dev); static int storvsc_detach(device_t dev); static void storvsc_poll(struct cam_sim * sim); static void storvsc_action(struct cam_sim * sim, union ccb * ccb); -static void create_storvsc_request(union ccb *ccb, struct hv_storvsc_request *reqp); +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_on_channel_callback(void *context); @@ -186,6 +220,14 @@ static void hv_storvsc_on_iocompletion( struct hv_storvsc_request *request); static int hv_storvsc_connect_vsp(struct hv_device *device); static void storvsc_io_done(struct hv_storvsc_request *reqp); +static void storvsc_copy_sgl_to_bounce_buf(struct sglist *bounce_sgl, + bus_dma_segment_t *orig_sgl, + unsigned int orig_sgl_count, + uint64_t seg_bits); +void storvsc_copy_from_bounce_buf_to_sgl(bus_dma_segment_t *dest_sgl, + unsigned int dest_sgl_count, + struct sglist* src_sgl, + uint64_t seg_bits); static device_method_t storvsc_methods[] = { /* Device interface */ @@ -207,7 +249,7 @@ MODULE_DEPEND(storvsc, vmbus, 1, 1, 1); /** - * The host is capable of sending messages to us that are + * The host is capable of sending messages to us that are * completely unsolicited. So, we need to address the race * condition where we may be in the process of unloading the * driver when the host may send us an unsolicited message. @@ -223,7 +265,7 @@ MODULE_DEPEND(storvsc, vmbus, 1, 1, 1); * destroyed. * * 3. Once the device is marked as being destroyed, we only - * permit incoming traffic to properly account for + * permit incoming traffic to properly account for * packets already sent out. */ static inline struct storvsc_softc * @@ -260,6 +302,113 @@ get_stor_device(struct hv_device *device } /** + * @brief Callback handler, will be invoked when receive mutil-channel offer + * + * @param context new multi-channel + */ +static void +storvsc_handle_sc_creation(void *context) +{ + hv_vmbus_channel *new_channel; + struct hv_device *device; + struct storvsc_softc *sc; + struct vmstor_chan_props props; + int ret = 0; + + new_channel = (hv_vmbus_channel *)context; + device = new_channel->primary_channel->device; + sc = get_stor_device(device, TRUE); + if (sc == NULL) + return; + + if (FALSE == sc->hs_open_multi_channel) + return; + + memset(&props, 0, sizeof(props)); + + ret = hv_vmbus_channel_open(new_channel, + sc->hs_drv_props->drv_ringbuffer_size, + sc->hs_drv_props->drv_ringbuffer_size, + (void *)&props, + sizeof(struct vmstor_chan_props), + hv_storvsc_on_channel_callback, + new_channel); + + return; +} + +/** + * @brief Send multi-channel creation request to host + * + * @param device a Hyper-V device pointer + * @param max_chans the max channels supported by vmbus + */ +static void +storvsc_send_multichannel_request(struct hv_device *dev, int max_chans) +{ + struct storvsc_softc *sc; + struct hv_storvsc_request *request; + struct vstor_packet *vstor_packet; + int request_channels_cnt = 0; + int ret; + + /* get multichannels count that need to create */ + request_channels_cnt = MIN(max_chans, mp_ncpus); + + sc = get_stor_device(dev, TRUE); + if (sc == NULL) { + printf("Storvsc_error: get sc failed while send mutilchannel " + "request\n"); + return; + } + + request = &sc->hs_init_req; + + /* Establish a handler for multi-channel */ + dev->channel->sc_creation_callback = storvsc_handle_sc_creation; + + /* request the host to create multi-channel */ + memset(request, 0, sizeof(struct hv_storvsc_request)); + + sema_init(&request->synch_sema, 0, ("stor_synch_sema")); + + vstor_packet = &request->vstor_packet; + + vstor_packet->operation = VSTOR_OPERATION_CREATE_MULTI_CHANNELS; + vstor_packet->flags = REQUEST_COMPLETION_FLAG; + vstor_packet->u.multi_channels_cnt = request_channels_cnt; + + ret = hv_vmbus_channel_send_packet( + dev->channel, + vstor_packet, + sizeof(struct vstor_packet), + (uint64_t)(uintptr_t)request, + HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, + HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); + + /* wait for 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); + if (ret != 0) { + printf("Storvsc_error: create multi-channel timeout, %d\n", + ret); + return; + } + + if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || + vstor_packet->status != 0) { + printf("Storvsc_error: create multi-channel invalid operation " + "(%d) or statue (%u)\n", + vstor_packet->operation, vstor_packet->status); + return; + } + + sc->hs_open_multi_channel = TRUE; + + if (bootverbose) + printf("Storvsc create multi-channel success!\n"); +} + +/** * @brief initialize channel connection to parent partition * * @param dev a Hyper-V device pointer @@ -272,11 +421,15 @@ hv_storvsc_channel_init(struct hv_device struct hv_storvsc_request *request; struct vstor_packet *vstor_packet; struct storvsc_softc *sc; + uint16_t max_chans = 0; + boolean_t support_multichannel = FALSE; + + max_chans = 0; + support_multichannel = FALSE; sc = get_stor_device(dev, TRUE); - if (sc == NULL) { - return ENODEV; - } + if (sc == NULL) + return (ENODEV); request = &sc->hs_init_req; memset(request, 0, sizeof(struct hv_storvsc_request)); @@ -300,15 +453,13 @@ hv_storvsc_channel_init(struct hv_device HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); - if (ret != 0) { + if (ret != 0) goto cleanup; - } - ret = sema_timedwait(&request->synch_sema, 500); /* KYS 5 seconds */ - - if (ret != 0) { + /* wait 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); + if (ret != 0) goto cleanup; - } if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || vstor_packet->status != 0) { @@ -321,7 +472,8 @@ hv_storvsc_channel_init(struct hv_device vstor_packet->operation = VSTOR_OPERATION_QUERYPROTOCOLVERSION; vstor_packet->flags = REQUEST_COMPLETION_FLAG; - vstor_packet->u.version.major_minor = VMSTOR_PROTOCOL_VERSION_CURRENT; + vstor_packet->u.version.major_minor = + VMSTOR_PROTOCOL_VERSION(storvsc_current_major, storvsc_current_minor); /* revision is only significant for Windows guests */ vstor_packet->u.version.revision = 0; @@ -334,21 +486,19 @@ hv_storvsc_channel_init(struct hv_device HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); - if (ret != 0) { + if (ret != 0) goto cleanup; - } - ret = sema_timedwait(&request->synch_sema, 500); /* KYS 5 seconds */ + /* wait 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); - if (ret) { + if (ret) goto cleanup; - } /* TODO: Check returned version */ if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || - vstor_packet->status != 0) { + vstor_packet->status != 0) goto cleanup; - } /** * Query channel properties @@ -365,22 +515,30 @@ hv_storvsc_channel_init(struct hv_device HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); - if ( ret != 0) { + if ( ret != 0) goto cleanup; - } - ret = sema_timedwait(&request->synch_sema, 500); /* KYS 5 seconds */ + /* wait 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); - if (ret != 0) { + if (ret != 0) goto cleanup; - } /* TODO: Check returned version */ if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || - vstor_packet->status != 0) { + vstor_packet->status != 0) { goto cleanup; } + /* multi-channels feature is supported by WIN8 and above version */ + max_chans = vstor_packet->u.chan_props.max_channel_cnt; + if ((hv_vmbus_protocal_version != HV_VMBUS_VERSION_WIN7) && + (hv_vmbus_protocal_version != HV_VMBUS_VERSION_WS2008) && + (vstor_packet->u.chan_props.flags & + HV_STORAGE_SUPPORTS_MULTI_CHANNEL)) { + support_multichannel = TRUE; + } + memset(vstor_packet, 0, sizeof(struct vstor_packet)); vstor_packet->operation = VSTOR_OPERATION_ENDINITIALIZATION; vstor_packet->flags = REQUEST_COMPLETION_FLAG; @@ -397,16 +555,22 @@ hv_storvsc_channel_init(struct hv_device goto cleanup; } - ret = sema_timedwait(&request->synch_sema, 500); /* KYS 5 seconds */ + /* wait 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); - if (ret != 0) { + if (ret != 0) goto cleanup; - } if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || - vstor_packet->status != 0) { + vstor_packet->status != 0) goto cleanup; - } + + /* + * If multi-channel is supported, send multichannel create + * request to host. + */ + if (support_multichannel) + storvsc_send_multichannel_request(dev, max_chans); cleanup: sema_destroy(&request->synch_sema); @@ -443,8 +607,7 @@ hv_storvsc_connect_vsp(struct hv_device (void *)&props, sizeof(struct vmstor_chan_props), hv_storvsc_on_channel_callback, - dev); - + dev->channel); if (ret != 0) { return ret; @@ -490,7 +653,7 @@ hv_storvsc_host_reset(struct hv_device * goto cleanup; } - ret = sema_timedwait(&request->synch_sema, 500); /* KYS 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); /* KYS 5 seconds */ if (ret) { goto cleanup; @@ -498,7 +661,7 @@ hv_storvsc_host_reset(struct hv_device * /* - * At this point, all outstanding requests in the adapter + * At this point, all outstanding requests in the adapter * should have been flushed out and return to us */ @@ -521,6 +684,7 @@ hv_storvsc_io_request(struct hv_device * { struct storvsc_softc *sc; struct vstor_packet *vstor_packet = &request->vstor_packet; + struct hv_vmbus_channel* outgoing_channel = NULL; int ret = 0; sc = get_stor_device(device, TRUE); @@ -539,19 +703,20 @@ hv_storvsc_io_request(struct hv_device * vstor_packet->operation = VSTOR_OPERATION_EXECUTESRB; + outgoing_channel = vmbus_select_outgoing_channel(device->channel); mtx_unlock(&request->softc->hs_lock); if (request->data_buf.length) { ret = hv_vmbus_channel_send_packet_multipagebuffer( - device->channel, + outgoing_channel, &request->data_buf, - vstor_packet, - sizeof(struct vstor_packet), + vstor_packet, + sizeof(struct vstor_packet), (uint64_t)(uintptr_t)request); } else { ret = hv_vmbus_channel_send_packet( - device->channel, + outgoing_channel, vstor_packet, sizeof(struct vstor_packet), (uint64_t)(uintptr_t)request, @@ -610,7 +775,8 @@ static void hv_storvsc_on_channel_callback(void *context) { int ret = 0; - struct hv_device *device = (struct hv_device *)context; + hv_vmbus_channel *channel = (hv_vmbus_channel *)context; + struct hv_device *device = NULL; struct storvsc_softc *sc; uint32_t bytes_recvd; uint64_t request_id; @@ -618,15 +784,22 @@ hv_storvsc_on_channel_callback(void *con struct hv_storvsc_request *request; struct vstor_packet *vstor_packet; + if (channel->primary_channel != NULL){ + device = channel->primary_channel->device; + } else { + device = channel->device; + } + + KASSERT(device, ("device is NULL")); + sc = get_stor_device(device, FALSE); if (sc == NULL) { + printf("Storvsc_error: get stor device failed.\n"); return; } - KASSERT(device, ("device")); - ret = hv_vmbus_channel_recv_packet( - device->channel, + channel, packet, roundup2(sizeof(struct vstor_packet), 8), &bytes_recvd, @@ -634,21 +807,28 @@ hv_storvsc_on_channel_callback(void *con while ((ret == 0) && (bytes_recvd > 0)) { request = (struct hv_storvsc_request *)(uintptr_t)request_id; - KASSERT(request, ("request")); if ((request == &sc->hs_init_req) || (request == &sc->hs_reset_req)) { memcpy(&request->vstor_packet, packet, sizeof(struct vstor_packet)); - sema_post(&request->synch_sema); + sema_post(&request->synch_sema); } else { vstor_packet = (struct vstor_packet *)packet; switch(vstor_packet->operation) { case VSTOR_OPERATION_COMPLETEIO: + if (request == NULL) + panic("VMBUS: storvsc received a " + "packet with NULL request id in " + "COMPLETEIO operation."); + hv_storvsc_on_iocompletion(sc, 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; default: @@ -656,7 +836,7 @@ hv_storvsc_on_channel_callback(void *con } } ret = hv_vmbus_channel_recv_packet( - device->channel, + channel, packet, roundup2(sizeof(struct vstor_packet), 8), &bytes_recvd, @@ -680,7 +860,16 @@ 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 { + storvsc_current_major = STORVSC_WIN7_MAJOR; + storvsc_current_minor = STORVSC_WIN7_MINOR; + } + switch (storvsc_get_storage_type(dev)) { case DRIVER_BLKVSC: if(bootverbose) @@ -721,9 +910,11 @@ storvsc_attach(device_t dev) enum hv_storage_type stor_type; struct storvsc_softc *sc; struct cam_devq *devq; - int ret, i; + int ret, i, j; struct hv_storvsc_request *reqp; struct root_hold_token *root_mount_token = NULL; + struct hv_sgl_node *sgl_node = NULL; + void *tmp_buff = NULL; /* * We need to serialize storvsc attach calls. @@ -764,8 +955,41 @@ storvsc_attach(device_t dev) LIST_INSERT_HEAD(&sc->hs_free_list, reqp, link); } + /* create sg-list page pool */ + if (FALSE == g_hv_sgl_page_pool.is_init) { + g_hv_sgl_page_pool.is_init = TRUE; + LIST_INIT(&g_hv_sgl_page_pool.in_use_sgl_list); + LIST_INIT(&g_hv_sgl_page_pool.free_sgl_list); + + /* + * Pre-create SG list, each SG list with + * HV_MAX_MULTIPAGE_BUFFER_COUNT segments, each + * segment has one page buffer + */ + for (i = 0; i < STORVSC_MAX_IO_REQUESTS; i++) { + sgl_node = malloc(sizeof(struct hv_sgl_node), + M_DEVBUF, M_WAITOK|M_ZERO); + + sgl_node->sgl_data = + sglist_alloc(HV_MAX_MULTIPAGE_BUFFER_COUNT, + M_WAITOK|M_ZERO); + + for (j = 0; j < HV_MAX_MULTIPAGE_BUFFER_COUNT; j++) { + tmp_buff = malloc(PAGE_SIZE, + M_DEVBUF, M_WAITOK|M_ZERO); + + sgl_node->sgl_data->sg_segs[j].ss_paddr = + (vm_paddr_t)tmp_buff; + } + + LIST_INSERT_HEAD(&g_hv_sgl_page_pool.free_sgl_list, + sgl_node, link); + } + } + sc->hs_destroy = FALSE; sc->hs_drain_notify = FALSE; + sc->hs_open_multi_channel = FALSE; sema_init(&sc->hs_drain_sema, 0, "Store Drain Sema"); ret = hv_storvsc_connect_vsp(hv_dev); @@ -834,6 +1058,20 @@ cleanup: LIST_REMOVE(reqp, link); free(reqp, M_DEVBUF); } + + while (!LIST_EMPTY(&g_hv_sgl_page_pool.free_sgl_list)) { + sgl_node = LIST_FIRST(&g_hv_sgl_page_pool.free_sgl_list); + LIST_REMOVE(sgl_node, link); + for (j = 0; j < HV_MAX_MULTIPAGE_BUFFER_COUNT; j++) { + if (NULL != + (void*)sgl_node->sgl_data->sg_segs[j].ss_paddr) { + free((void*)sgl_node->sgl_data->sg_segs[j].ss_paddr, M_DEVBUF); + } + } + sglist_free(sgl_node->sgl_data); + free(sgl_node, M_DEVBUF); + } + return (ret); } @@ -853,6 +1091,8 @@ storvsc_detach(device_t dev) struct storvsc_softc *sc = device_get_softc(dev); struct hv_storvsc_request *reqp = NULL; struct hv_device *hv_device = vmbus_get_devctx(dev); + struct hv_sgl_node *sgl_node = NULL; + int j = 0; mtx_lock(&hv_device->channel->inbound_lock); sc->hs_destroy = TRUE; @@ -884,6 +1124,20 @@ storvsc_detach(device_t dev) free(reqp, M_DEVBUF); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri May 22 10:43:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 10:44:32 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 10:53:17 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 11:03:52 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 11:04:55 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 11:09:42 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 11:21:00 2015 Return-Path: Delivered-To: svn-src-all@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 815C1F45; Fri, 22 May 2015 11:21:00 +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 6ECE1167C; Fri, 22 May 2015 11:21:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MBL07i063946; Fri, 22 May 2015 11:21:00 GMT (envelope-from whu@FreeBSD.org) Received: (from whu@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MBL0jO063945; Fri, 22 May 2015 11:21:00 GMT (envelope-from whu@FreeBSD.org) Message-Id: <201505221121.t4MBL0jO063945@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: whu set sender to whu@FreeBSD.org using -f From: Wei Hu Date: Fri, 22 May 2015 11:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283284 - stable/10/sys/i386/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 11:21:00 -0000 Author: whu Date: Fri May 22 11:20:59 2015 New Revision: 283284 URL: https://svnweb.freebsd.org/changeset/base/283284 Log: Fix a i386 build failure cause by commit r283280. Modified: stable/10/sys/i386/include/apicvar.h Modified: stable/10/sys/i386/include/apicvar.h ============================================================================== --- stable/10/sys/i386/include/apicvar.h Fri May 22 11:09:41 2015 (r283283) +++ stable/10/sys/i386/include/apicvar.h Fri May 22 11:20:59 2015 (r283284) @@ -215,6 +215,7 @@ int lapic_set_lvt_triggermode(u_int apic void lapic_set_tpr(u_int vector); void lapic_setup(int boot); void xen_intr_handle_upcall(struct trapframe *frame); +void hv_vector_handler(struct trapframe *frame); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Fri May 22 11:59:39 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 12:01:30 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 14:25:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 15:57:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 16:38:56 2015 Return-Path: Delivered-To: svn-src-all@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 6D0FFDC0; Fri, 22 May 2015 16:38: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 5A9371C97; Fri, 22 May 2015 16:38: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 t4MGcuH1022912; Fri, 22 May 2015 16:38:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MGcuSQ022911; Fri, 22 May 2015 16:38:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505221638.t4MGcuSQ022911@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 16:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283289 - stable/10/sys/boot/powerpc/ps3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 16:38:56 -0000 Author: gjb Date: Fri May 22 16:38:55 2015 New Revision: 283289 URL: https://svnweb.freebsd.org/changeset/base/283289 Log: MFC r281011 (jkim): Fix powerpc, powerpc64 build. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/boot/powerpc/ps3/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/powerpc/ps3/Makefile ============================================================================== --- stable/10/sys/boot/powerpc/ps3/Makefile Fri May 22 15:57:42 2015 (r283288) +++ stable/10/sys/boot/powerpc/ps3/Makefile Fri May 22 16:38:55 2015 (r283289) @@ -113,6 +113,7 @@ loader.help: help.common help.ps3 ${.CUR cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} +.PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) From owner-svn-src-all@FreeBSD.ORG Fri May 22 16:48:02 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 17:01:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 17:05:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 17:34:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 18:31:27 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 18:47:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 19:04:07 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 19:57:35 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 20:05:21 2015 Return-Path: Delivered-To: svn-src-all@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 CE26779C 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 AD81E15F7 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 20:50:36 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 21:04:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 21:09:11 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 21:10:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 21:33:14 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 21:38:12 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 21:51:38 2015 Return-Path: Delivered-To: svn-src-all@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 F2CE28F6; Fri, 22 May 2015 21:51: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 E0DCC12CE; Fri, 22 May 2015 21:51: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 t4MLpbiN094091; Fri, 22 May 2015 21:51:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MLpb76094089; Fri, 22 May 2015 21:51:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505222151.t4MLpb76094089@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 21:51:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283303 - in stable/10/sys: amd64/include netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 21:51:38 -0000 Author: jhb Date: Fri May 22 21:51:36 2015 New Revision: 283303 URL: https://svnweb.freebsd.org/changeset/base/283303 Log: MFC 266852,270223: - Fix pf(4) to build with MAXCPU set to 256. MAXCPU is actually a count, not a maximum ID value (so it is a cap on mp_ncpus, not mp_maxid). - Bump MAXCPU on amd64 from 64 to 256. In practice APIC only permits 255 CPUs (IDs 0 through 254). Getting above that limit requires x2APIC. Modified: stable/10/sys/amd64/include/param.h stable/10/sys/netpfil/pf/pf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/param.h ============================================================================== --- stable/10/sys/amd64/include/param.h Fri May 22 21:38:11 2015 (r283302) +++ stable/10/sys/amd64/include/param.h Fri May 22 21:51:36 2015 (r283303) @@ -65,7 +65,7 @@ #if defined(SMP) || defined(KLD_MODULE) #ifndef MAXCPU -#define MAXCPU 64 +#define MAXCPU 256 #endif #else #define MAXCPU 1 Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Fri May 22 21:38:11 2015 (r283302) +++ stable/10/sys/netpfil/pf/pf.c Fri May 22 21:51:36 2015 (r283303) @@ -195,7 +195,7 @@ VNET_DEFINE(uint64_t, pf_stateid[MAXCPU] #define PFID_CPUSHIFT (sizeof(uint64_t) * NBBY - PFID_CPUBITS) #define PFID_CPUMASK ((uint64_t)((1 << PFID_CPUBITS) - 1) << PFID_CPUSHIFT) #define PFID_MAXID (~PFID_CPUMASK) -CTASSERT((1 << PFID_CPUBITS) > MAXCPU); +CTASSERT((1 << PFID_CPUBITS) >= MAXCPU); static void pf_src_tree_remove_state(struct pf_state *); static void pf_init_threshold(struct pf_threshold *, u_int32_t, From owner-svn-src-all@FreeBSD.ORG Fri May 22 23:07:57 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Fri May 22 23:54:13 2015 Return-Path: Delivered-To: svn-src-all@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 B42362C4; Fri, 22 May 2015 23:54: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 A287B1FCA; Fri, 22 May 2015 23:54: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 t4MNsD1e054900; Fri, 22 May 2015 23:54:13 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MNsDOI054899; Fri, 22 May 2015 23:54:13 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505222354.t4MNsDOI054899@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 23:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283305 - stable/10/sys/dev/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 23:54:13 -0000 Author: jhb Date: Fri May 22 23:54:12 2015 New Revision: 283305 URL: https://svnweb.freebsd.org/changeset/base/283305 Log: MFC 281872: Fix some incorrect #if conditions around older workarounds for bus numbering goofs. Modified: stable/10/sys/dev/pci/pci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pci/pci_pci.c ============================================================================== --- stable/10/sys/dev/pci/pci_pci.c Fri May 22 23:07:55 2015 (r283304) +++ stable/10/sys/dev/pci/pci_pci.c Fri May 22 23:54:12 2015 (r283305) @@ -946,7 +946,7 @@ pcib_attach_common(device_t dev) * Quirk handling. */ switch (pci_get_devid(dev)) { -#if !defined(NEW_PCIB) && !defined(PCI_RES_BUS) +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) case 0x12258086: /* Intel 82454KX/GX (Orion) */ { uint8_t supbus; @@ -972,7 +972,7 @@ pcib_attach_common(device_t dev) sc->flags |= PCIB_SUBTRACTIVE; break; -#if !defined(NEW_PCIB) && !defined(PCI_RES_BUS) +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) /* Compaq R3000 BIOS sets wrong subordinate bus number. */ case 0x00dd10de: { From owner-svn-src-all@FreeBSD.ORG Fri May 22 23:56:00 2015 Return-Path: Delivered-To: svn-src-all@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 BC79841A; Fri, 22 May 2015 23:56:00 +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 AA8C51FE1; Fri, 22 May 2015 23:56:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4MNu0m2055246; Fri, 22 May 2015 23:56:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4MNu0Y6055245; Fri, 22 May 2015 23:56:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505222356.t4MNu0Y6055245@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 23:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283306 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 23:56:00 -0000 Author: jhb Date: Fri May 22 23:55:59 2015 New Revision: 283306 URL: https://svnweb.freebsd.org/changeset/base/283306 Log: MFC 282273: Update this page to note that XENHVM now works on i386. (It shipped enabled in GENERIC in 10.0.) Modified: stable/10/share/man/man4/xen.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/xen.4 ============================================================================== --- stable/10/share/man/man4/xen.4 Fri May 22 23:54:12 2015 (r283305) +++ stable/10/share/man/man4/xen.4 Fri May 22 23:55:59 2015 (r283306) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 17, 2010 +.Dd April 30, 2015 .Dt XEN 4 .Os .Sh NAME @@ -44,8 +44,8 @@ the following lines in your kernel confi .Ed .Pp To compile hardware-assisted virtualization (HVM) Xen guest support with -para-virtualized drivers into an amd64 kernel, place the following lines in -your kernel configuration file: +para-virtualized drivers into an amd64 or i386 kernel, +place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "options XENHVM" .Cd "device xenpci" @@ -176,9 +176,6 @@ is only able to run as a Xen guest (DomU A fully para-virtualized (PV) kernel is only supported on i386, and not amd64. .Pp -Para-virtualized drivers under hardware-assisted virtualization (HVM) kernel -are only supported on amd64, not i386. -.Pp As of this release, Xen PV DomU support is not heavily tested; instability has been reported during VM migration of PV kernels. .Pp From owner-svn-src-all@FreeBSD.ORG Fri May 22 23:58:37 2015 Return-Path: Delivered-To: svn-src-all@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 C8F87563 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 94ED01FFB 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 t4MNwbvT084638 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 t4MNwbRa084631 for svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@FreeBSD.ORG Sat May 23 00:32:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 01:17:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 08:02:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 09:14:31 2015 Return-Path: Delivered-To: svn-src-all@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 68FB53FD; Sat, 23 May 2015 09:14: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 56A6B16DA; Sat, 23 May 2015 09:14: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 t4N9EVfo032549; Sat, 23 May 2015 09:14:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4N9EUMX032545; Sat, 23 May 2015 09:14:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505230914.t4N9EUMX032545@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 09:14:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283310 - in stable/10/sys: kern vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 09:14:31 -0000 Author: kib Date: Sat May 23 09:14:29 2015 New Revision: 283310 URL: https://svnweb.freebsd.org/changeset/base/283310 Log: MFC r282690: Call uma_reclaim() from the additional pagedaemon thread to reclaim kmem arena address space. Modified: stable/10/sys/kern/kern_malloc.c stable/10/sys/vm/uma.h stable/10/sys/vm/uma_core.c stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_malloc.c ============================================================================== --- stable/10/sys/kern/kern_malloc.c Sat May 23 08:02:54 2015 (r283309) +++ stable/10/sys/kern/kern_malloc.c Sat May 23 09:14:29 2015 (r283310) @@ -667,13 +667,15 @@ reallocf(void *addr, unsigned long size, } /* - * Wake the page daemon when we exhaust KVA. It will call the lowmem handler - * and uma_reclaim() callbacks in a context that is safe. + * Wake the uma reclamation pagedaemon thread when we exhaust KVA. It + * will call the lowmem handler and uma_reclaim() callbacks in a + * context that is safe. */ static void kmem_reclaim(vmem_t *vm, int flags) { + uma_reclaim_wakeup(); pagedaemon_wakeup(); } Modified: stable/10/sys/vm/uma.h ============================================================================== --- stable/10/sys/vm/uma.h Sat May 23 08:02:54 2015 (r283309) +++ stable/10/sys/vm/uma.h Sat May 23 09:14:29 2015 (r283310) @@ -689,4 +689,7 @@ struct uma_percpu_stat { uint64_t _ups_reserved[5]; /* Reserved. */ }; +void uma_reclaim_wakeup(void); +void uma_reclaim_worker(void *); + #endif /* _VM_UMA_H_ */ Modified: stable/10/sys/vm/uma_core.c ============================================================================== --- stable/10/sys/vm/uma_core.c Sat May 23 08:02:54 2015 (r283309) +++ stable/10/sys/vm/uma_core.c Sat May 23 09:14:29 2015 (r283310) @@ -3192,16 +3192,17 @@ uma_find_refcnt(uma_zone_t zone, void *i } /* See uma.h */ -void -uma_reclaim(void) +static void +uma_reclaim_locked(bool kmem_danger) { + #ifdef UMA_DEBUG printf("UMA: vm asked us to release pages!\n"); #endif - sx_xlock(&uma_drain_lock); + sx_assert(&uma_drain_lock, SA_XLOCKED); bucket_enable(); zone_foreach(zone_drain); - if (vm_page_count_min()) { + if (vm_page_count_min() || kmem_danger) { cache_drain_safe(NULL); zone_foreach(zone_drain); } @@ -3213,9 +3214,42 @@ uma_reclaim(void) zone_drain(slabzone); zone_drain(slabrefzone); bucket_zone_drain(); +} + +void +uma_reclaim(void) +{ + + sx_xlock(&uma_drain_lock); + uma_reclaim_locked(false); sx_xunlock(&uma_drain_lock); } +static int uma_reclaim_needed; + +void +uma_reclaim_wakeup(void) +{ + + uma_reclaim_needed = 1; + wakeup(&uma_reclaim_needed); +} + +void +uma_reclaim_worker(void *arg __unused) +{ + + sx_xlock(&uma_drain_lock); + for (;;) { + sx_sleep(&uma_reclaim_needed, &uma_drain_lock, PVM, + "umarcl", 0); + if (uma_reclaim_needed) { + uma_reclaim_needed = 0; + uma_reclaim_locked(true); + } + } +} + /* See uma.h */ int uma_zone_exhausted(uma_zone_t zone) Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Sat May 23 08:02:54 2015 (r283309) +++ stable/10/sys/vm/vm_pageout.c Sat May 23 09:14:29 2015 (r283310) @@ -1726,8 +1726,9 @@ vm_pageout_init(void) static void vm_pageout(void) { + int error; #if MAXMEMDOM > 1 - int error, i; + int i; #endif swap_pager_swap_init(); @@ -1741,6 +1742,10 @@ vm_pageout(void) } } #endif + error = kthread_add(uma_reclaim_worker, NULL, curproc, NULL, + 0, 0, "uma"); + if (error != 0) + panic("starting uma_reclaim helper, error %d\n", error); vm_pageout_worker((void *)(uintptr_t)0); } From owner-svn-src-all@FreeBSD.ORG Sat May 23 09:16:36 2015 Return-Path: Delivered-To: svn-src-all@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 2043878E; Sat, 23 May 2015 09:16: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 0D6C816FC; Sat, 23 May 2015 09:16: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 t4N9GZav033059; Sat, 23 May 2015 09:16:35 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4N9GZke033058; Sat, 23 May 2015 09:16:35 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201505230916.t4N9GZke033058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sat, 23 May 2015 09:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283311 - stable/10/contrib/netbsd-tests/bin/expr X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 09:16:36 -0000 Author: rodrigc Date: Sat May 23 09:16:35 2015 New Revision: 283311 URL: https://svnweb.freebsd.org/changeset/base/283311 Log: Merge: r277829 Revert r277357 as expr has been enhanced to better detect overflow conditions, and now the tests pass PR: 196867 X-MFC with: r277798 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/netbsd-tests/bin/expr/t_expr.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/bin/expr/t_expr.sh ============================================================================== --- stable/10/contrib/netbsd-tests/bin/expr/t_expr.sh Sat May 23 09:14:29 2015 (r283310) +++ stable/10/contrib/netbsd-tests/bin/expr/t_expr.sh Sat May 23 09:16:35 2015 (r283311) @@ -54,9 +54,6 @@ overflow_head() { atf_set "descr" "Test overflow cases" } overflow_body() { - # Begin FreeBSD - atf_expect_fail "FreeBSD's expr does not check overflow to the same degree NetBSD's expr does; see bug 196867 for more details" - # End FreeBSD test_expr '4611686018427387904 + 4611686018427387903' \ '9223372036854775807' test_expr '4611686018427387904 + 4611686018427387904' \ From owner-svn-src-all@FreeBSD.ORG Sat May 23 09:49:00 2015 Return-Path: Delivered-To: svn-src-all@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 88B11BBA; Sat, 23 May 2015 09:49:00 +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 69A0F1A43; Sat, 23 May 2015 09:49:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4N9n0N1048139; Sat, 23 May 2015 09:49:00 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4N9n00p048129; Sat, 23 May 2015 09:49:00 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201505230949.t4N9n00p048129@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sat, 23 May 2015 09:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283312 - stable/10/bin/pkill/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 09:49:00 -0000 Author: rodrigc Date: Sat May 23 09:48:59 2015 New Revision: 283312 URL: https://svnweb.freebsd.org/changeset/base/283312 Log: Merge: 278618 278633 278636 278653 278742 278776 279121 Multiple fixes for pgrep and pkill tests. PR: 19109 Modified: stable/10/bin/pkill/tests/pgrep-j_test.sh stable/10/bin/pkill/tests/pkill-j_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/pkill/tests/pgrep-j_test.sh ============================================================================== --- stable/10/bin/pkill/tests/pgrep-j_test.sh Sat May 23 09:16:35 2015 (r283311) +++ stable/10/bin/pkill/tests/pgrep-j_test.sh Sat May 23 09:48:59 2015 (r283312) @@ -4,94 +4,88 @@ jail_name_to_jid() { local check_name="$1" - ( - line="$(jls -n 2> /dev/null | grep name=$check_name )" - for nv in $line; do - local name="${nv%=*}" - if [ "${name}" = "jid" ]; then - eval $nv - echo $jid - break - fi - done - ) + jls -j "$check_name" -s | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g' } base=pgrep_j_test +if [ `id -u` -ne 0 ]; then + echo "1..0 # skip Test needs uid 0." + exit 0 +fi + echo "1..3" +sleep=$(pwd)/sleep.txt +ln -sf /bin/sleep $sleep + name="pgrep -j " -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 & +sleep_amount=5 +jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_1.pid $sleep $sleep_amount & - jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 & +jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_2.pid $sleep $sleep_amount & +for i in `seq 1 10`; do jid1=$(jail_name_to_jid ${base}_1_1) jid2=$(jail_name_to_jid ${base}_1_2) jid="${jid1},${jid2}" - pid1="$(pgrep -f -x -j $jid "$sleep 5" | sort)" - pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \ - $(cat ${PWD}/${base}_1_2.pid) | sort) - if [ "$pid1" = "$pid2" ]; then - echo "ok 1 - $name" - else - echo "not ok 1 - $name" - fi - [ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) - [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) - rm -f $sleep + case "$jid" in + [0-9]+,[0-9]+) + break + ;; + esac + sleep 0.1 +done +sleep 0.5 + +pid1="$(pgrep -f -x -j "$jid" "$sleep $sleep_amount" | sort)" +pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \ + $(cat ${PWD}/${base}_1_2.pid) | sort) +if [ "$pid1" = "$pid2" ]; then + echo "ok 1 - $name" else - echo "ok 1 - $name # skip Test needs uid 0." + echo "not ok 1 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" fi +[ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) +[ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) +wait name="pgrep -j any" -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 & - - jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 & - - sleep 2 - pid1="$(pgrep -f -x -j any "$sleep 5" | sort)" - pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \ - $(cat ${PWD}/${base}_2_2.pid) | sort) - if [ "$pid1" = "$pid2" ]; then - echo "ok 2 - $name" - else - echo "not ok 2 - $name" - fi - [ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) - [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) - rm -f $sleep +sleep_amount=6 +jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_1.pid $sleep $sleep_amount & + +jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_2.pid $sleep $sleep_amount & + +sleep 2 +pid1="$(pgrep -f -x -j any "$sleep $sleep_amount" | sort)" +pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \ + $(cat ${PWD}/${base}_2_2.pid) | sort) +if [ "$pid1" = "$pid2" ]; then + echo "ok 2 - $name" else - echo "ok 2 - $name # skip Test needs uid 0." + echo "not ok 2 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" fi +[ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) +[ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) +wait name="pgrep -j none" -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - daemon -p ${PWD}/${base}_3_1.pid $sleep 5 & - jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 & - sleep 2 - pid="$(pgrep -f -x -j none "$sleep 5")" - if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then - echo "ok 3 - $name" - else - echo "not ok 3 - $name" - fi - rm -f $sleep - [ -f ${PWD}/${base}_3_1.pid ] && kill $(cat $PWD/${base}_3_1.pid) - [ -f ${PWD}/${base}_3_2.pid ] && kill $(cat $PWD/${base}_3_2.pid) +sleep_amount=7 +daemon -p ${PWD}/${base}_3_1.pid $sleep $sleep_amount & +jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_3_2.pid $sleep $sleep_amount & +sleep 2 +pid="$(pgrep -f -x -j none "$sleep $sleep_amount")" +if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then + echo "ok 3 - $name" else - echo "ok 3 - $name # skip Test needs uid 0." + echo "not ok 3 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" fi +[ -f ${PWD}/${base}_3_1.pid ] && kill $(cat $PWD/${base}_3_1.pid) +[ -f ${PWD}/${base}_3_2.pid ] && kill $(cat $PWD/${base}_3_2.pid) + +rm -f $sleep Modified: stable/10/bin/pkill/tests/pkill-j_test.sh ============================================================================== --- stable/10/bin/pkill/tests/pkill-j_test.sh Sat May 23 09:16:35 2015 (r283311) +++ stable/10/bin/pkill/tests/pkill-j_test.sh Sat May 23 09:48:59 2015 (r283312) @@ -4,99 +4,91 @@ jail_name_to_jid() { local check_name="$1" - ( - line="$(jls -n 2> /dev/null | grep name=$check_name )" - for nv in $line; do - local name="${nv%=*}" - if [ "${name}" = "jid" ]; then - eval $nv - echo $jid - break - fi - done - ) + jls -j "$check_name" -s | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g' } base=pkill_j_test +if [ `id -u` -ne 0 ]; then + echo "1..0 # skip Test needs uid 0." + exit 0 +fi + echo "1..3" +sleep=$(pwd)/sleep.txt +ln -sf /bin/sleep $sleep + name="pkill -j " -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 & +sleep_amount=5 +jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_1.pid $sleep $sleep_amount & + +jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_2.pid $sleep $sleep_amount & - jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 & +$sleep $sleep_amount & - $sleep 5 & - sleep 0.5 +for i in `seq 1 10`; do jid1=$(jail_name_to_jid ${base}_1_1) jid2=$(jail_name_to_jid ${base}_1_2) jid="${jid1},${jid2}" - if pkill -f -j "$jid" $sleep && sleep 0.5 && - ! -f ${PWD}/${base}_1_1.pid && - ! -f ${PWD}/${base}_1_2.pid ; then - echo "ok 1 - $name" - else - echo "not ok 1 - $name" - fi 2>/dev/null - rm -f $sleep - [ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) - [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) - wait + case "$jid" in + [0-9]+,[0-9]+) + break + ;; + esac + sleep 0.1 +done +sleep 0.5 + +if pkill -f -j "$jid" $sleep && sleep 0.5 && + ! -f ${PWD}/${base}_1_1.pid && + ! -f ${PWD}/${base}_1_2.pid ; then + echo "ok 1 - $name" else - echo "ok 1 - $name # skip Test needs uid 0." -fi + echo "not ok 1 - $name" +fi 2>/dev/null +[ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) +[ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) +wait name="pkill -j any" -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 & - - jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 & - - $sleep 5 & - sleep 0.5 - chpid3=$! - if pkill -f -j any $sleep && sleep 0.5 && - [ ! -f ${PWD}/${base}_2_1.pid -a - ! -f ${PWD}/${base}_2_2.pid ] && kill $chpid3; then - echo "ok 2 - $name" - else - echo "not ok 2 - $name" - fi 2>/dev/null - rm -f $sleep - [ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) - [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) - wait +sleep_amount=6 +jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_1.pid $sleep $sleep_amount & + +jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_2.pid $sleep $sleep_amount & + +$sleep $sleep_amount & +chpid3=$! +sleep 0.5 +if pkill -f -j any $sleep && sleep 0.5 && + [ ! -f ${PWD}/${base}_2_1.pid -a + ! -f ${PWD}/${base}_2_2.pid ] && kill $chpid3; then + echo "ok 2 - $name" else - echo "ok 2 - $name # skip Test needs uid 0." -fi + echo "not ok 2 - $name" +fi 2>/dev/null +[ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) +[ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) +wait name="pkill -j none" -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - daemon -p ${PWD}/${base}_3_1.pid $sleep 5 - jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 & - sleep 1 - if pkill -f -j none "$sleep 5" && sleep 1 && - [ ! -f ${PWD}/${base}_3_1.pid -a -f ${PWD}/${base}_3_2.pid ] ; then - echo "ok 3 - $name" - else - ls ${PWD}/*.pid - echo "not ok 3 - $name" - fi 2>/dev/null - rm -f $sleep - [ -f ${PWD}/${base}_3_1.pid ] && kill $(cat ${base}_3_1.pid) - [ -f ${PWD}/${base}_3_2.pid ] && kill $(cat ${base}_3_2.pid) +sleep_amount=7 +daemon -p ${PWD}/${base}_3_1.pid $sleep $sleep_amount +jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_3_2.pid $sleep $sleep_amount & +sleep 1 +if pkill -f -j none "$sleep $sleep_amount" && sleep 1 && + [ ! -f ${PWD}/${base}_3_1.pid -a -f ${PWD}/${base}_3_2.pid ] ; then + echo "ok 3 - $name" else - echo "ok 3 - $name # skip Test needs uid 0." -fi + ls ${PWD}/*.pid + echo "not ok 3 - $name" +fi 2>/dev/null +[ -f ${PWD}/${base}_3_1.pid ] && kill $(cat ${base}_3_1.pid) +[ -f ${PWD}/${base}_3_2.pid ] && kill $(cat ${base}_3_2.pid) + +rm -f $sleep From owner-svn-src-all@FreeBSD.ORG Sat May 23 09:49:41 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 14:48:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 14:59:30 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 16:54:47 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 17:30:32 2015 Return-Path: Delivered-To: svn-src-all@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 D517CD85; Sat, 23 May 2015 17:30: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 B83651852; Sat, 23 May 2015 17:30: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 t4NHUVqo082456; Sat, 23 May 2015 17:30:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NHUVZj082453; Sat, 23 May 2015 17:30:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505231730.t4NHUVZj082453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 17:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283317 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 17:30:32 -0000 Author: ian Date: Sat May 23 17:30:30 2015 New Revision: 283317 URL: https://svnweb.freebsd.org/changeset/base/283317 Log: MFC r278770, r279114, r279215, r279338, r279543: Add logic for handling new-style ARM cpu ID info. Correct a comment which was exactly backwards from reality. There is no reason to do i+dcache writeback and invalidate when changing the translation table (this may be left over from armv5 days). It's especially bad to do so using a cache operation that isn't coherent on SMP systems. Add casting to make atomic ops work for pointers. (Apparently nobody has ever done atomic ops on pointers before now on arm). Revert incorrect casting. Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/arm/cpuinfo.c stable/10/sys/arm/include/atomic.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 23 16:54:46 2015 (r283316) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 23 17:30:30 2015 (r283317) @@ -66,11 +66,7 @@ __FBSDID("$FreeBSD$"); #endif ENTRY(armv7_setttb) - stmdb sp!, {r0, lr} - bl _C_LABEL(armv7_idcache_wbinv_all) /* clean the D cache */ - ldmia sp!, {r0, lr} dsb - orr r0, r0, #PT_ATTR mcr CP15_TTBR0(r0) isb Modified: stable/10/sys/arm/arm/cpuinfo.c ============================================================================== --- stable/10/sys/arm/arm/cpuinfo.c Sat May 23 16:54:46 2015 (r283316) +++ stable/10/sys/arm/arm/cpuinfo.c Sat May 23 17:30:30 2015 (r283317) @@ -58,9 +58,13 @@ cpuinfo_init(void) /* ARMv4T CPU */ cpuinfo.architecture = 1; cpuinfo.revision = (cpuinfo.midr >> 16) & 0x7F; - } + } else { + /* ARM new id scheme */ + cpuinfo.architecture = (cpuinfo.midr >> 16) & 0x0F; + cpuinfo.revision = (cpuinfo.midr >> 20) & 0x0F; + } } else { - /* must be new id scheme */ + /* non ARM -> must be new id scheme */ cpuinfo.architecture = (cpuinfo.midr >> 16) & 0x0F; cpuinfo.revision = (cpuinfo.midr >> 20) & 0x0F; } Modified: stable/10/sys/arm/include/atomic.h ============================================================================== --- stable/10/sys/arm/include/atomic.h Sat May 23 16:54:46 2015 (r283316) +++ stable/10/sys/arm/include/atomic.h Sat May 23 17:30:30 2015 (r283317) @@ -582,8 +582,8 @@ atomic_load_64(volatile uint64_t *p) /* * The only way to atomically load 64 bits is with LDREXD which puts the - * exclusive monitor into the open state, so reset it with CLREX because - * we don't actually need to store anything. + * exclusive monitor into the exclusive state, so reset it to open state + * with CLREX because we don't actually need to store anything. */ __asm __volatile( "1: \n" From owner-svn-src-all@FreeBSD.ORG Sat May 23 17:43:04 2015 Return-Path: Delivered-To: svn-src-all@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 EF22CFAD; Sat, 23 May 2015 17:43: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 D03351A3B; Sat, 23 May 2015 17:43: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 t4NHh3ZZ090691; Sat, 23 May 2015 17:43:03 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NHh3QQ090689; Sat, 23 May 2015 17:43:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505231743.t4NHh3QQ090689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 17:43:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283318 - in stable/10/sys/dev: mmc sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 17:43:04 -0000 Author: ian Date: Sat May 23 17:43:02 2015 New Revision: 283318 URL: https://svnweb.freebsd.org/changeset/base/283318 Log: MFC r279359, r279360: For new eMMC chips, we must signal controller HC capability in OP_COND command. Detect, report and use 8-bit bus if is available. Modified: stable/10/sys/dev/mmc/mmc.c stable/10/sys/dev/sdhci/sdhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mmc/mmc.c ============================================================================== --- stable/10/sys/dev/mmc/mmc.c Sat May 23 17:30:30 2015 (r283317) +++ stable/10/sys/dev/mmc/mmc.c Sat May 23 17:43:02 2015 (r283318) @@ -1622,7 +1622,7 @@ mmc_go_discovery(struct mmc_softc *sc) mmc_send_app_op_cond(sc, (err ? 0 : MMC_OCR_CCS) | mmcbr_get_ocr(dev), NULL); } else - mmc_send_op_cond(sc, mmcbr_get_ocr(dev), NULL); + mmc_send_op_cond(sc, MMC_OCR_CCS | mmcbr_get_ocr(dev), NULL); mmc_discover_cards(sc); mmc_rescan_cards(sc); Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Sat May 23 17:30:30 2015 (r283317) +++ stable/10/sys/dev/sdhci/sdhci.c Sat May 23 17:43:02 2015 (r283318) @@ -584,6 +584,8 @@ sdhci_init_slot(device_t dev, struct sdh "support voltages.\n"); } slot->host.caps = MMC_CAP_4_BIT_DATA; + if (caps & SDHCI_CAN_DO_8BITBUS) + slot->host.caps |= MMC_CAP_8_BIT_DATA; if (caps & SDHCI_CAN_DO_HISPD) slot->host.caps |= MMC_CAP_HSPEED; /* Decide if we have usable DMA. */ @@ -603,9 +605,11 @@ sdhci_init_slot(device_t dev, struct sdh slot->opt &= ~SDHCI_HAVE_DMA; if (bootverbose || sdhci_debug) { - slot_printf(slot, "%uMHz%s 4bits%s%s%s %s\n", + slot_printf(slot, "%uMHz%s %s%s%s%s %s\n", slot->max_clk / 1000000, (caps & SDHCI_CAN_DO_HISPD) ? " HS" : "", + (caps & MMC_CAP_8_BIT_DATA) ? "8bits" : + ((caps & MMC_CAP_4_BIT_DATA) ? "4bits" : "1bit"), (caps & SDHCI_CAN_VDD_330) ? " 3.3V" : "", (caps & SDHCI_CAN_VDD_300) ? " 3.0V" : "", (caps & SDHCI_CAN_VDD_180) ? " 1.8V" : "", @@ -692,11 +696,19 @@ sdhci_generic_update_ios(device_t brdev, } /* Configure the bus. */ sdhci_set_clock(slot, ios->clock); - sdhci_set_power(slot, (ios->power_mode == power_off)?0:ios->vdd); - if (ios->bus_width == bus_width_4) + sdhci_set_power(slot, (ios->power_mode == power_off) ? 0 : ios->vdd); + if (ios->bus_width == bus_width_8) { + slot->hostctrl |= SDHCI_CTRL_8BITBUS; + slot->hostctrl &= ~SDHCI_CTRL_4BITBUS; + } else if (ios->bus_width == bus_width_4) { + slot->hostctrl &= ~SDHCI_CTRL_8BITBUS; slot->hostctrl |= SDHCI_CTRL_4BITBUS; - else + } else if (ios->bus_width == bus_width_1) { + slot->hostctrl &= ~SDHCI_CTRL_8BITBUS; slot->hostctrl &= ~SDHCI_CTRL_4BITBUS; + } else { + panic("Invalid bus width: %d", ios->bus_width); + } if (ios->timing == bus_timing_hs && !(slot->quirks & SDHCI_QUIRK_DONT_SET_HISPD_BIT)) slot->hostctrl |= SDHCI_CTRL_HISPD; From owner-svn-src-all@FreeBSD.ORG Sat May 23 17:48:09 2015 Return-Path: Delivered-To: svn-src-all@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 CC3F7241; Sat, 23 May 2015 17:48: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 BA81C1A70; Sat, 23 May 2015 17:48: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 t4NHm9gR091439; Sat, 23 May 2015 17:48:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NHm9cs091438; Sat, 23 May 2015 17:48:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505231748.t4NHm9cs091438@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 17:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283319 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 17:48:09 -0000 Author: ian Date: Sat May 23 17:48:09 2015 New Revision: 283319 URL: https://svnweb.freebsd.org/changeset/base/283319 Log: MFC r279702: Update a comment that had drifted out of date. Modified: stable/10/sys/arm/arm/physmem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/physmem.c ============================================================================== --- stable/10/sys/arm/arm/physmem.c Sat May 23 17:43:02 2015 (r283318) +++ stable/10/sys/arm/arm/physmem.c Sat May 23 17:48:09 2015 (r283319) @@ -153,7 +153,7 @@ arm_physmem_print_tables() * Walk the list of hardware regions, processing it against the list of * exclusions that contain the given exflags, and generating an "avail list". * - * Updates the kernel global 'realmem' with the sum of all pages in hw regions. + * Updates the value at *pavail with the sum of all pages in all hw regions. * * Returns the number of pages of non-excluded memory added to the avail list. */ From owner-svn-src-all@FreeBSD.ORG Sat May 23 19:09:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 19:27:06 2015 Return-Path: Delivered-To: svn-src-all@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 A9194C6; Sat, 23 May 2015 19:27: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 94E9C13CD; Sat, 23 May 2015 19:27: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 t4NJR6JG041654; Sat, 23 May 2015 19:27:06 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NJR5lE041645; Sat, 23 May 2015 19:27:05 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505231927.t4NJR5lE041645@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 19:27:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283321 - stable/10/sys/dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 19:27:06 -0000 Author: ian Date: Sat May 23 19:27:04 2015 New Revision: 283321 URL: https://svnweb.freebsd.org/changeset/base/283321 Log: MFC r272399, r272602, r274451, r274452: Add uart driver for Qualcomm MSM 7000/8000 series chips. It is working on IFC6410 board which has Qualcomm Snapdragon SoC. Use documented compat string for msm uart. Make PL011 UART to wait on putc only when TX FIFO is full Make uart_bus_fdt a decendant of ofwbus Added: stable/10/sys/dev/uart/uart_dev_msm.c - copied unchanged from r272399, head/sys/dev/uart/uart_dev_msm.c stable/10/sys/dev/uart/uart_dev_msm.h - copied unchanged from r272399, head/sys/dev/uart/uart_dev_msm.h Modified: stable/10/sys/dev/uart/uart.h stable/10/sys/dev/uart/uart_bus_fdt.c stable/10/sys/dev/uart/uart_dev_pl011.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/uart/uart.h ============================================================================== --- stable/10/sys/dev/uart/uart.h Sat May 23 19:09:04 2015 (r283320) +++ stable/10/sys/dev/uart/uart.h Sat May 23 19:27:04 2015 (r283321) @@ -65,6 +65,7 @@ struct uart_bas { struct uart_class; extern struct uart_class uart_imx_class __attribute__((weak)); +extern struct uart_class uart_msm_class __attribute__((weak)); extern struct uart_class uart_ns8250_class __attribute__((weak)); extern struct uart_class uart_quicc_class __attribute__((weak)); extern struct uart_class uart_s3c2410_class __attribute__((weak)); Modified: stable/10/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_fdt.c Sat May 23 19:09:04 2015 (r283320) +++ stable/10/sys/dev/uart/uart_bus_fdt.c Sat May 23 19:27:04 2015 (r283321) @@ -84,6 +84,7 @@ static struct ofw_compat_data compat_dat {"fsl,imx21-uart", (uintptr_t)&uart_imx_class}, {"fsl,mvf600-uart", (uintptr_t)&uart_vybrid_class}, {"lpc,uart", (uintptr_t)&uart_lpc_class}, + {"qcom,msm-uartdm", (uintptr_t)&uart_msm_class}, {"ti,ns16550", (uintptr_t)&uart_ti8250_class}, {"ns16550", (uintptr_t)&uart_ns8250_class}, {NULL, (uintptr_t)NULL}, @@ -156,3 +157,4 @@ uart_fdt_probe(device_t dev) } DRIVER_MODULE(uart, simplebus, uart_fdt_driver, uart_devclass, 0, 0); +DRIVER_MODULE(uart, ofwbus, uart_fdt_driver, uart_devclass, 0, 0); Copied: stable/10/sys/dev/uart/uart_dev_msm.c (from r272399, head/sys/dev/uart/uart_dev_msm.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/uart/uart_dev_msm.c Sat May 23 19:27:04 2015 (r283321, copy of r272399, head/sys/dev/uart/uart_dev_msm.c) @@ -0,0 +1,568 @@ +/*- + * Copyright (c) 2014 Ganbold Tsagaankhuu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Qualcomm MSM7K/8K uart driver */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_ddb.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "uart_if.h" + +#define DEF_CLK 7372800 + +#define GETREG(bas, reg) \ + bus_space_read_4((bas)->bst, (bas)->bsh, (reg)) +#define SETREG(bas, reg, value) \ + bus_space_write_4((bas)->bst, (bas)->bsh, (reg), (value)) + +static int msm_uart_param(struct uart_bas *, int, int, int, int); + +/* + * Low-level UART interface. + */ +static int msm_probe(struct uart_bas *bas); +static void msm_init(struct uart_bas *bas, int, int, int, int); +static void msm_term(struct uart_bas *bas); +static void msm_putc(struct uart_bas *bas, int); +static int msm_rxready(struct uart_bas *bas); +static int msm_getc(struct uart_bas *bas, struct mtx *mtx); + +extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; + +static int +msm_uart_param(struct uart_bas *bas, int baudrate, int databits, + int stopbits, int parity) +{ + int ulcon; + + ulcon = 0; + + switch (databits) { + case 5: + ulcon |= (UART_DM_5_BPS << 4); + break; + case 6: + ulcon |= (UART_DM_6_BPS << 4); + break; + case 7: + ulcon |= (UART_DM_7_BPS << 4); + break; + case 8: + ulcon |= (UART_DM_8_BPS << 4); + break; + default: + return (EINVAL); + } + + switch (parity) { + case UART_PARITY_NONE: + ulcon |= UART_DM_NO_PARITY; + break; + case UART_PARITY_ODD: + ulcon |= UART_DM_ODD_PARITY; + break; + case UART_PARITY_EVEN: + ulcon |= UART_DM_EVEN_PARITY; + break; + case UART_PARITY_SPACE: + ulcon |= UART_DM_SPACE_PARITY; + break; + case UART_PARITY_MARK: + default: + return (EINVAL); + } + + switch (stopbits) { + case 1: + ulcon |= (UART_DM_SBL_1 << 2); + break; + case 2: + ulcon |= (UART_DM_SBL_2 << 2); + break; + default: + return (EINVAL); + } + uart_setreg(bas, UART_DM_MR2, ulcon); + + /* Set 115200 for both TX and RX. */; + uart_setreg(bas, UART_DM_CSR, UART_DM_CSR_115200); + uart_barrier(bas); + + return (0); +} + +struct uart_ops uart_msm_ops = { + .probe = msm_probe, + .init = msm_init, + .term = msm_term, + .putc = msm_putc, + .rxready = msm_rxready, + .getc = msm_getc, +}; + +static int +msm_probe(struct uart_bas *bas) +{ + + return (0); +} + +static void +msm_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, + int parity) +{ + + if (bas->rclk == 0) + bas->rclk = DEF_CLK; + + KASSERT(bas->rclk != 0, ("msm_init: Invalid rclk")); + + /* Set default parameters */ + msm_uart_param(bas, baudrate, databits, stopbits, parity); + + /* + * Configure UART mode registers MR1 and MR2. + * Hardware flow control isn't supported. + */ + uart_setreg(bas, UART_DM_MR1, 0x0); + + /* Reset interrupt mask register. */ + uart_setreg(bas, UART_DM_IMR, 0); + + /* + * Configure Tx and Rx watermarks configuration registers. + * TX watermark value is set to 0 - interrupt is generated when + * FIFO level is less than or equal to 0. + */ + uart_setreg(bas, UART_DM_TFWR, UART_DM_TFW_VALUE); + + /* Set RX watermark value */ + uart_setreg(bas, UART_DM_RFWR, UART_DM_RFW_VALUE); + + /* + * Configure Interrupt Programming Register. + * Set initial Stale timeout value. + */ + uart_setreg(bas, UART_DM_IPR, UART_DM_STALE_TIMEOUT_LSB); + + /* Disable IRDA mode */ + uart_setreg(bas, UART_DM_IRDA, 0x0); + + /* + * Configure and enable sim interface if required. + * Configure hunt character value in HCR register. + * Keep it in reset state. + */ + uart_setreg(bas, UART_DM_HCR, 0x0); + + /* Issue soft reset command */ + SETREG(bas, UART_DM_CR, UART_DM_RESET_TX); + SETREG(bas, UART_DM_CR, UART_DM_RESET_RX); + SETREG(bas, UART_DM_CR, UART_DM_RESET_ERROR_STATUS); + SETREG(bas, UART_DM_CR, UART_DM_RESET_BREAK_INT); + SETREG(bas, UART_DM_CR, UART_DM_RESET_STALE_INT); + + /* Enable/Disable Rx/Tx DM interfaces */ + /* Disable Data Mover for now. */ + uart_setreg(bas, UART_DM_DMEN, 0x0); + + /* Enable transmitter and receiver */ + uart_setreg(bas, UART_DM_CR, UART_DM_CR_RX_ENABLE); + uart_setreg(bas, UART_DM_CR, UART_DM_CR_TX_ENABLE); + + uart_barrier(bas); +} + +static void +msm_term(struct uart_bas *bas) +{ + + /* XXX */ +} + +static void +msm_putc(struct uart_bas *bas, int c) +{ + int limit; + + /* + * Write to NO_CHARS_FOR_TX register the number of characters + * to be transmitted. However, before writing TX_FIFO must + * be empty as indicated by TX_READY interrupt in IMR register + */ + + /* + * Check if transmit FIFO is empty. + * If not wait for TX_READY interrupt. + */ + limit = 1000; + if (!(uart_getreg(bas, UART_DM_SR) & UART_DM_SR_TXEMT)) { + while ((uart_getreg(bas, UART_DM_ISR) & UART_DM_TX_READY) == 0 + && --limit) + DELAY(4); + } + /* FIFO is ready, write number of characters to be written */ + uart_setreg(bas, UART_DM_NO_CHARS_FOR_TX, 1); + + /* Wait till TX FIFO has space */ + while ((uart_getreg(bas, UART_DM_SR) & UART_DM_SR_TXRDY) == 0) + DELAY(4); + + /* TX FIFO has space. Write char */ + SETREG(bas, UART_DM_TF(0), (c & 0xff)); +} + +static int +msm_rxready(struct uart_bas *bas) +{ + + /* Wait for a character to come ready */ + return ((uart_getreg(bas, UART_DM_SR) & UART_DM_SR_RXRDY) == + UART_DM_SR_RXRDY); +} + +static int +msm_getc(struct uart_bas *bas, struct mtx *mtx) +{ + int c; + + uart_lock(mtx); + + /* Wait for a character to come ready */ + while ((uart_getreg(bas, UART_DM_SR) & UART_DM_SR_RXRDY) != + UART_DM_SR_RXRDY) + DELAY(4); + + /* Check for Overrun error. If so reset Error Status */ + if (uart_getreg(bas, UART_DM_SR) & UART_DM_SR_UART_OVERRUN) + uart_setreg(bas, UART_DM_CR, UART_DM_RESET_ERROR_STATUS); + + /* Read char */ + c = uart_getreg(bas, UART_DM_RF(0)); + + uart_unlock(mtx); + + return (c); +} + +/* + * High-level UART interface. + */ +struct msm_uart_softc { + struct uart_softc base; + uint32_t ier; +}; + +static int msm_bus_probe(struct uart_softc *sc); +static int msm_bus_attach(struct uart_softc *sc); +static int msm_bus_flush(struct uart_softc *, int); +static int msm_bus_getsig(struct uart_softc *); +static int msm_bus_ioctl(struct uart_softc *, int, intptr_t); +static int msm_bus_ipend(struct uart_softc *); +static int msm_bus_param(struct uart_softc *, int, int, int, int); +static int msm_bus_receive(struct uart_softc *); +static int msm_bus_setsig(struct uart_softc *, int); +static int msm_bus_transmit(struct uart_softc *); +static void msm_bus_grab(struct uart_softc *); +static void msm_bus_ungrab(struct uart_softc *); + +static kobj_method_t msm_methods[] = { + KOBJMETHOD(uart_probe, msm_bus_probe), + KOBJMETHOD(uart_attach, msm_bus_attach), + KOBJMETHOD(uart_flush, msm_bus_flush), + KOBJMETHOD(uart_getsig, msm_bus_getsig), + KOBJMETHOD(uart_ioctl, msm_bus_ioctl), + KOBJMETHOD(uart_ipend, msm_bus_ipend), + KOBJMETHOD(uart_param, msm_bus_param), + KOBJMETHOD(uart_receive, msm_bus_receive), + KOBJMETHOD(uart_setsig, msm_bus_setsig), + KOBJMETHOD(uart_transmit, msm_bus_transmit), + KOBJMETHOD(uart_grab, msm_bus_grab), + KOBJMETHOD(uart_ungrab, msm_bus_ungrab), + {0, 0 } +}; + +int +msm_bus_probe(struct uart_softc *sc) +{ + + sc->sc_txfifosz = 64; + sc->sc_rxfifosz = 64; + + device_set_desc(sc->sc_dev, "Qualcomm HSUART"); + + return (0); +} + +static int +msm_bus_attach(struct uart_softc *sc) +{ + struct msm_uart_softc *u = (struct msm_uart_softc *)sc; + struct uart_bas *bas = &sc->sc_bas; + + sc->sc_hwiflow = 0; + sc->sc_hwoflow = 0; + + /* Set TX_READY, TXLEV, RXLEV, RXSTALE */ + u->ier = UART_DM_IMR_ENABLED; + + /* Configure Interrupt Mask register IMR */ + uart_setreg(bas, UART_DM_IMR, u->ier); + + return (0); +} + +/* + * Write the current transmit buffer to the TX FIFO. + */ +static int +msm_bus_transmit(struct uart_softc *sc) +{ + struct msm_uart_softc *u = (struct msm_uart_softc *)sc; + struct uart_bas *bas = &sc->sc_bas; + int i; + + uart_lock(sc->sc_hwmtx); + + /* Write some data */ + for (i = 0; i < sc->sc_txdatasz; i++) { + /* Write TX data */ + msm_putc(bas, sc->sc_txbuf[i]); + uart_barrier(bas); + } + + /* TX FIFO is empty now, enable TX_READY interrupt */ + u->ier |= UART_DM_TX_READY; + SETREG(bas, UART_DM_IMR, u->ier); + uart_barrier(bas); + + /* + * Inform upper layer that it is transmitting data to hardware, + * this will be cleared when TXIDLE interrupt occurs. + */ + sc->sc_txbusy = 1; + uart_unlock(sc->sc_hwmtx); + + return (0); +} + +static int +msm_bus_setsig(struct uart_softc *sc, int sig) +{ + + return (0); +} + +static int +msm_bus_receive(struct uart_softc *sc) +{ + struct msm_uart_softc *u = (struct msm_uart_softc *)sc; + struct uart_bas *bas; + int c; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + + /* Initialize Receive Path and interrupt */ + SETREG(bas, UART_DM_CR, UART_DM_RESET_STALE_INT); + SETREG(bas, UART_DM_CR, UART_DM_STALE_EVENT_ENABLE); + u->ier |= UART_DM_RXLEV; + SETREG(bas, UART_DM_IMR, u->ier); + + /* Loop over until we are full, or no data is available */ + while (uart_getreg(bas, UART_DM_SR) & UART_DM_SR_RXRDY) { + if (uart_rx_full(sc)) { + /* No space left in input buffer */ + sc->sc_rxbuf[sc->sc_rxput] = UART_STAT_OVERRUN; + break; + } + + /* Read RX FIFO */ + c = uart_getreg(bas, UART_DM_RF(0)); + uart_barrier(bas); + + uart_rx_put(sc, c); + } + + uart_unlock(sc->sc_hwmtx); + + return (0); +} + +static int +msm_bus_param(struct uart_softc *sc, int baudrate, int databits, + int stopbits, int parity) +{ + int error; + + if (sc->sc_bas.rclk == 0) + sc->sc_bas.rclk = DEF_CLK; + + KASSERT(sc->sc_bas.rclk != 0, ("msm_init: Invalid rclk")); + + uart_lock(sc->sc_hwmtx); + error = msm_uart_param(&sc->sc_bas, baudrate, databits, stopbits, + parity); + uart_unlock(sc->sc_hwmtx); + + return (error); +} + +static int +msm_bus_ipend(struct uart_softc *sc) +{ + struct msm_uart_softc *u = (struct msm_uart_softc *)sc; + struct uart_bas *bas = &sc->sc_bas; + uint32_t isr; + int ipend; + + uart_lock(sc->sc_hwmtx); + + /* Get ISR status */ + isr = GETREG(bas, UART_DM_MISR); + + ipend = 0; + + /* Uart RX starting, notify upper layer */ + if (isr & UART_DM_RXLEV) { + u->ier &= ~UART_DM_RXLEV; + SETREG(bas, UART_DM_IMR, u->ier); + uart_barrier(bas); + ipend |= SER_INT_RXREADY; + } + + /* Stale RX interrupt */ + if (isr & UART_DM_RXSTALE) { + /* Disable and reset it */ + SETREG(bas, UART_DM_CR, UART_DM_STALE_EVENT_DISABLE); + SETREG(bas, UART_DM_CR, UART_DM_RESET_STALE_INT); + uart_barrier(bas); + ipend |= SER_INT_RXREADY; + } + + /* TX READY interrupt */ + if (isr & UART_DM_TX_READY) { + /* Clear TX Ready */ + SETREG(bas, UART_DM_CR, UART_DM_CLEAR_TX_READY); + + /* Disable TX_READY */ + u->ier &= ~UART_DM_TX_READY; + SETREG(bas, UART_DM_IMR, u->ier); + uart_barrier(bas); + + if (sc->sc_txbusy != 0) + ipend |= SER_INT_TXIDLE; + } + + if (isr & UART_DM_TXLEV) { + /* TX FIFO is empty */ + u->ier &= ~UART_DM_TXLEV; + SETREG(bas, UART_DM_IMR, u->ier); + uart_barrier(bas); + + if (sc->sc_txbusy != 0) + ipend |= SER_INT_TXIDLE; + } + + uart_unlock(sc->sc_hwmtx); + return (ipend); +} + +static int +msm_bus_flush(struct uart_softc *sc, int what) +{ + + return (0); +} + +static int +msm_bus_getsig(struct uart_softc *sc) +{ + + return (0); +} + +static int +msm_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) +{ + + return (EINVAL); +} + +static void +msm_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* + * XXX: Turn off all interrupts to enter polling mode. Leave the + * saved mask alone. We'll restore whatever it was in ungrab. + */ + uart_lock(sc->sc_hwmtx); + SETREG(bas, UART_DM_CR, UART_DM_RESET_STALE_INT); + SETREG(bas, UART_DM_IMR, 0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +static void +msm_bus_ungrab(struct uart_softc *sc) +{ + struct msm_uart_softc *u = (struct msm_uart_softc *)sc; + struct uart_bas *bas = &sc->sc_bas; + + /* + * Restore previous interrupt mask + */ + uart_lock(sc->sc_hwmtx); + SETREG(bas, UART_DM_IMR, u->ier); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +struct uart_class uart_msm_class = { + "msm", + msm_methods, + sizeof(struct msm_uart_softc), + .uc_ops = &uart_msm_ops, + .uc_range = 8, + .uc_rclk = DEF_CLK, +}; Copied: stable/10/sys/dev/uart/uart_dev_msm.h (from r272399, head/sys/dev/uart/uart_dev_msm.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/uart/uart_dev_msm.h Sat May 23 19:27:04 2015 (r283321, copy of r272399, head/sys/dev/uart/uart_dev_msm.h) @@ -0,0 +1,229 @@ +/*- + * Copyright (c) 2014 Ganbold Tsagaankhuu + * 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 _UART_DM_H_ +#define _UART_DM_H_ + +#define UART_DM_EXTR_BITS(value, start_pos, end_pos) \ + ((value << (32 - end_pos)) >> (32 - (end_pos - start_pos))) + +/* UART Parity Mode */ +enum UART_DM_PARITY_MODE { + UART_DM_NO_PARITY, + UART_DM_ODD_PARITY, + UART_DM_EVEN_PARITY, + UART_DM_SPACE_PARITY +}; + +/* UART Stop Bit Length */ +enum UART_DM_STOP_BIT_LEN { + UART_DM_SBL_9_16, + UART_DM_SBL_1, + UART_DM_SBL_1_9_16, + UART_DM_SBL_2 +}; + +/* UART Bits per Char */ +enum UART_DM_BITS_PER_CHAR { + UART_DM_5_BPS, + UART_DM_6_BPS, + UART_DM_7_BPS, + UART_DM_8_BPS +}; + +/* 8-N-1 Configuration */ +#define UART_DM_8_N_1_MODE (UART_DM_NO_PARITY | \ + (UART_DM_SBL_1 << 2) | \ + (UART_DM_8_BPS << 4)) + +/* UART_DM Registers */ + +/* UART Operational Mode Registers (HSUART) */ +#define UART_DM_MR1 0x00 +#define UART_DM_MR1_AUTO_RFR_LEVEL1_BMSK 0xffffff00 +#define UART_DM_MR1_AUTO_RFR_LEVEL0_BMSK 0x3f +#define UART_DM_MR1_CTS_CTL_BMSK 0x40 +#define UART_DM_MR1_RX_RDY_CTL_BMSK 0x80 + +#define UART_DM_MR2 0x04 +#define UART_DM_MR2_ERROR_MODE_BMSK 0x40 +#define UART_DM_MR2_BITS_PER_CHAR_BMSK 0x30 +#define UART_DM_MR2_STOP_BIT_LEN_BMSK 0x0c +#define UART_DM_MR2_PARITY_MODE_BMSK 0x03 +#define UART_DM_RXBRK_ZERO_CHAR_OFF (1 << 8) +#define UART_DM_LOOPBACK (1 << 7) + +/* UART Clock Selection Register, write only */ +#define UART_DM_CSR 0x08 +#define UART_DM_CSR_115200 0xff +#define UART_DM_CSR_57600 0xee +#define UART_DM_CSR_38400 0xdd +#define UART_DM_CSR_28800 0xcc +#define UART_DM_CSR_19200 0xbb +#define UART_DM_CSR_14400 0xaa +#define UART_DM_CSR_9600 0x99 +#define UART_DM_CSR_7200 0x88 +#define UART_DM_CSR_4800 0x77 +#define UART_DM_CSR_3600 0x66 +#define UART_DM_CSR_2400 0x55 +#define UART_DM_CSR_1200 0x44 +#define UART_DM_CSR_600 0x33 +#define UART_DM_CSR_300 0x22 +#define UART_DM_CSR_150 0x11 +#define UART_DM_CSR_75 0x00 + +/* UART DM TX FIFO Registers - 4, write only */ +#define UART_DM_TF(x) (0x70 + (4 * (x))) + +/* UART Command Register, write only */ +#define UART_DM_CR 0x10 +#define UART_DM_CR_RX_ENABLE (1 << 0) +#define UART_DM_CR_RX_DISABLE (1 << 1) +#define UART_DM_CR_TX_ENABLE (1 << 2) +#define UART_DM_CR_TX_DISABLE (1 << 3) + +/* UART_DM_CR channel command bit value (register field is bits 8:4) */ +#define UART_DM_RESET_RX 0x10 +#define UART_DM_RESET_TX 0x20 +#define UART_DM_RESET_ERROR_STATUS 0x30 +#define UART_DM_RESET_BREAK_INT 0x40 +#define UART_DM_START_BREAK 0x50 +#define UART_DM_STOP_BREAK 0x60 +#define UART_DM_RESET_CTS 0x70 +#define UART_DM_RESET_STALE_INT 0x80 +#define UART_DM_RFR_LOW 0xD0 +#define UART_DM_RFR_HIGH 0xE0 +#define UART_DM_CR_PROTECTION_EN 0x100 +#define UART_DM_STALE_EVENT_ENABLE 0x500 +#define UART_DM_STALE_EVENT_DISABLE 0x600 +#define UART_DM_FORCE_STALE_EVENT 0x400 +#define UART_DM_CLEAR_TX_READY 0x300 +#define UART_DM_RESET_TX_ERROR 0x800 +#define UART_DM_RESET_TX_DONE 0x810 + +/* UART Interrupt Mask Register */ +#define UART_DM_IMR 0x14 +/* these can be used for both ISR and IMR registers */ +#define UART_DM_TXLEV (1 << 0) +#define UART_DM_RXHUNT (1 << 1) +#define UART_DM_RXBRK_CHNG (1 << 2) +#define UART_DM_RXSTALE (1 << 3) +#define UART_DM_RXLEV (1 << 4) +#define UART_DM_DELTA_CTS (1 << 5) +#define UART_DM_CURRENT_CTS (1 << 6) +#define UART_DM_TX_READY (1 << 7) +#define UART_DM_TX_ERROR (1 << 8) +#define UART_DM_TX_DONE (1 << 9) +#define UART_DM_RXBREAK_START (1 << 10) +#define UART_DM_RXBREAK_END (1 << 11) +#define UART_DM_PAR_FRAME_ERR_IRQ (1 << 12) + +#define UART_DM_IMR_ENABLED (UART_DM_TX_READY | \ + UART_DM_TXLEV | \ + UART_DM_RXLEV | \ + UART_DM_RXSTALE) + +/* UART Interrupt Programming Register */ +#define UART_DM_IPR 0x18 +#define UART_DM_STALE_TIMEOUT_LSB 0x0f +#define UART_DM_STALE_TIMEOUT_MSB 0x00 +#define UART_DM_IPR_STALE_TIMEOUT_MSB_BMSK 0xffffff80 +#define UART_DM_IPR_STALE_LSB_BMSK 0x1f + +/* UART Transmit/Receive FIFO Watermark Register */ +#define UART_DM_TFWR 0x1c +/* Interrupt is generated when FIFO level is less than or equal to this value */ +#define UART_DM_TFW_VALUE 0 + +#define UART_DM_RFWR 0x20 +/* Interrupt generated when no of words in RX FIFO is greater than this value */ +#define UART_DM_RFW_VALUE 0 + +/* UART Hunt Character Register */ +#define UART_DM_HCR 0x24 + +/* Used for RX transfer initialization */ +#define UART_DM_DMRX 0x34 +/* Default DMRX value - any value bigger than FIFO size would be fine */ +#define UART_DM_DMRX_DEF_VALUE 0x220 + +/* Register to enable IRDA function */ +#define UART_DM_IRDA 0x38 + +/* UART Data Mover Enable Register */ +#define UART_DM_DMEN 0x3c + +/* Number of characters for Transmission */ +#define UART_DM_NO_CHARS_FOR_TX 0x40 + +/* UART RX FIFO Base Address */ +#define UART_DM_BADR 0x44 + +#define UART_DM_SIM_CFG_ADDR 0x80 + +/* Read only registers */ +/* UART Status Register */ +#define UART_DM_SR 0x08 +/* register field mask mapping */ +#define UART_DM_SR_RXRDY (1 << 0) +#define UART_DM_SR_RXFULL (1 << 1) +#define UART_DM_SR_TXRDY (1 << 2) +#define UART_DM_SR_TXEMT (1 << 3) +#define UART_DM_SR_UART_OVERRUN (1 << 4) +#define UART_DM_SR_PAR_FRAME_ERR (1 << 5) +#define UART_DM_RX_BREAK (1 << 6) +#define UART_DM_HUNT_CHAR (1 << 7) +#define UART_DM_RX_BRK_START_LAST (1 << 8) + +/* UART Receive FIFO Registers - 4 in numbers */ +#define UART_DM_RF(x) (0x70 + (4 * (x))) + +/* UART Masked Interrupt Status Register */ +#define UART_DM_MISR 0x10 + +/* UART Interrupt Status Register */ +#define UART_DM_ISR 0x14 + +/* Number of characters received since the end of last RX transfer */ +#define UART_DM_RX_TOTAL_SNAP 0x38 + +/* UART TX FIFO Status Register */ +#define UART_DM_TXFS 0x4c +#define UART_DM_TXFS_STATE_LSB(x) UART_DM_EXTR_BITS(x,0,6) +#define UART_DM_TXFS_STATE_MSB(x) UART_DM_EXTR_BITS(x,14,31) +#define UART_DM_TXFS_BUF_STATE(x) UART_DM_EXTR_BITS(x,7,9) +#define UART_DM_TXFS_ASYNC_STATE(x) UART_DM_EXTR_BITS(x,10,13) + +/* UART RX FIFO Status Register */ +#define UART_DM_RXFS 0x50 +#define UART_DM_RXFS_STATE_LSB(x) UART_DM_EXTR_BITS(x,0,6) +#define UART_DM_RXFS_STATE_MSB(x) UART_DM_EXTR_BITS(x,14,31) +#define UART_DM_RXFS_BUF_STATE(x) UART_DM_EXTR_BITS(x,7,9) +#define UART_DM_RXFS_ASYNC_STATE(x) UART_DM_EXTR_BITS(x,10,13) + +#endif /* _UART_DM_H_ */ Modified: stable/10/sys/dev/uart/uart_dev_pl011.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_pl011.c Sat May 23 19:09:04 2015 (r283320) +++ stable/10/sys/dev/uart/uart_dev_pl011.c Sat May 23 19:27:04 2015 (r283321) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #define DR_OE (1 << 11) /* Overrun error */ #define UART_FR 0x06 /* Flag register */ +#define FR_TXFF (1 << 5) /* Transmit FIFO/reg full */ #define FR_RXFF (1 << 6) /* Receive FIFO/reg full */ #define FR_TXFE (1 << 7) /* Transmit FIFO/reg empty */ @@ -194,7 +195,8 @@ static void uart_pl011_putc(struct uart_bas *bas, int c) { - while (!(__uart_getreg(bas, UART_FR) & FR_TXFE)) + /* Wait when TX FIFO full. Push character otherwise. */ + while (__uart_getreg(bas, UART_FR) & FR_TXFF) ; __uart_setreg(bas, UART_DR, c & 0xff); } From owner-svn-src-all@FreeBSD.ORG Sat May 23 19:50:15 2015 Return-Path: Delivered-To: svn-src-all@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 DAC884BA; Sat, 23 May 2015 19:50: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 C6A19163B; Sat, 23 May 2015 19:50: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 t4NJoFdZ052648; Sat, 23 May 2015 19:50:15 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NJoFGF052644; Sat, 23 May 2015 19:50:15 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505231950.t4NJoFGF052644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 19:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283322 - stable/10/sys/arm/samsung/exynos X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 19:50:16 -0000 Author: ian Date: Sat May 23 19:50:14 2015 New Revision: 283322 URL: https://svnweb.freebsd.org/changeset/base/283322 Log: MFC r266942, r266944: Do only receive chars if there are some data in the buffer. This fixes operation on newer Exynos boards. Rename exynos uart driver filenames. Added: stable/10/sys/arm/samsung/exynos/exynos_uart.c - copied unchanged from r266944, head/sys/arm/samsung/exynos/exynos_uart.c stable/10/sys/arm/samsung/exynos/exynos_uart.h - copied unchanged from r266944, head/sys/arm/samsung/exynos/exynos_uart.h Deleted: stable/10/sys/arm/samsung/exynos/uart.c stable/10/sys/arm/samsung/exynos/uart.h Modified: stable/10/sys/arm/samsung/exynos/files.exynos5 Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/arm/samsung/exynos/exynos_uart.c (from r266944, head/sys/arm/samsung/exynos/exynos_uart.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/samsung/exynos/exynos_uart.c Sat May 23 19:50:14 2015 (r283322, copy of r266944, head/sys/arm/samsung/exynos/exynos_uart.c) @@ -0,0 +1,382 @@ +/* + * Copyright (c) 2003 Marcel Moolenaar + * Copyright (c) 2007-2009 Andrew Turner + * Copyright (c) 2013 Ruslan Bukin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "uart_if.h" + +#define DEF_CLK 100000000 + +static int sscomspeed(long, long); +static int s3c24x0_uart_param(struct uart_bas *, int, int, int, int); + +/* + * Low-level UART interface. + */ +static int s3c2410_probe(struct uart_bas *bas); +static void s3c2410_init(struct uart_bas *bas, int, int, int, int); +static void s3c2410_term(struct uart_bas *bas); +static void s3c2410_putc(struct uart_bas *bas, int); +static int s3c2410_rxready(struct uart_bas *bas); +static int s3c2410_getc(struct uart_bas *bas, struct mtx *mtx); + +extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; + +static int +sscomspeed(long speed, long frequency) +{ + int x; + + if (speed <= 0 || frequency <= 0) + return (-1); + x = (frequency / 16) / speed; + return (x-1); +} + +static int +s3c24x0_uart_param(struct uart_bas *bas, int baudrate, int databits, + int stopbits, int parity) +{ + int brd, ulcon; + + ulcon = 0; + + switch(databits) { + case 5: + ulcon |= ULCON_LENGTH_5; + break; + case 6: + ulcon |= ULCON_LENGTH_6; + break; + case 7: + ulcon |= ULCON_LENGTH_7; + break; + case 8: + ulcon |= ULCON_LENGTH_8; + break; + default: + return (EINVAL); + } + + switch (parity) { + case UART_PARITY_NONE: + ulcon |= ULCON_PARITY_NONE; + break; + case UART_PARITY_ODD: + ulcon |= ULCON_PARITY_ODD; + break; + case UART_PARITY_EVEN: + ulcon |= ULCON_PARITY_EVEN; + break; + case UART_PARITY_MARK: + case UART_PARITY_SPACE: + default: + return (EINVAL); + } + + if (stopbits == 2) + ulcon |= ULCON_STOP; + + uart_setreg(bas, SSCOM_ULCON, ulcon); + + brd = sscomspeed(baudrate, bas->rclk); + uart_setreg(bas, SSCOM_UBRDIV, brd); + + return (0); +} + +struct uart_ops uart_s3c2410_ops = { + .probe = s3c2410_probe, + .init = s3c2410_init, + .term = s3c2410_term, + .putc = s3c2410_putc, + .rxready = s3c2410_rxready, + .getc = s3c2410_getc, +}; + +static int +s3c2410_probe(struct uart_bas *bas) +{ + + return (0); +} + +static void +s3c2410_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, + int parity) +{ + + if (bas->rclk == 0) + bas->rclk = DEF_CLK; + + KASSERT(bas->rclk != 0, ("s3c2410_init: Invalid rclk")); + + uart_setreg(bas, SSCOM_UCON, 0); + uart_setreg(bas, SSCOM_UFCON, + UFCON_TXTRIGGER_8 | UFCON_RXTRIGGER_8 | + UFCON_TXFIFO_RESET | UFCON_RXFIFO_RESET | + UFCON_FIFO_ENABLE); + s3c24x0_uart_param(bas, baudrate, databits, stopbits, parity); + + /* Enable UART. */ + uart_setreg(bas, SSCOM_UCON, UCON_TXMODE_INT | UCON_RXMODE_INT | + UCON_TOINT); + uart_setreg(bas, SSCOM_UMCON, UMCON_RTS); +} + +static void +s3c2410_term(struct uart_bas *bas) +{ + /* XXX */ +} + +static void +s3c2410_putc(struct uart_bas *bas, int c) +{ + + while ((bus_space_read_4(bas->bst, bas->bsh, SSCOM_UFSTAT) & + UFSTAT_TXFULL) == UFSTAT_TXFULL) + continue; + + uart_setreg(bas, SSCOM_UTXH, c); +} + +static int +s3c2410_rxready(struct uart_bas *bas) +{ + + return ((uart_getreg(bas, SSCOM_UTRSTAT) & UTRSTAT_RXREADY) == + UTRSTAT_RXREADY); +} + +static int +s3c2410_getc(struct uart_bas *bas, struct mtx *mtx) +{ + int utrstat; + + utrstat = bus_space_read_1(bas->bst, bas->bsh, SSCOM_UTRSTAT); + while (!(utrstat & UTRSTAT_RXREADY)) { + utrstat = bus_space_read_1(bas->bst, bas->bsh, SSCOM_UTRSTAT); + continue; + } + + return (bus_space_read_1(bas->bst, bas->bsh, SSCOM_URXH)); +} + +static int s3c2410_bus_probe(struct uart_softc *sc); +static int s3c2410_bus_attach(struct uart_softc *sc); +static int s3c2410_bus_flush(struct uart_softc *, int); +static int s3c2410_bus_getsig(struct uart_softc *); +static int s3c2410_bus_ioctl(struct uart_softc *, int, intptr_t); +static int s3c2410_bus_ipend(struct uart_softc *); +static int s3c2410_bus_param(struct uart_softc *, int, int, int, int); +static int s3c2410_bus_receive(struct uart_softc *); +static int s3c2410_bus_setsig(struct uart_softc *, int); +static int s3c2410_bus_transmit(struct uart_softc *); + +static kobj_method_t s3c2410_methods[] = { + KOBJMETHOD(uart_probe, s3c2410_bus_probe), + KOBJMETHOD(uart_attach, s3c2410_bus_attach), + KOBJMETHOD(uart_flush, s3c2410_bus_flush), + KOBJMETHOD(uart_getsig, s3c2410_bus_getsig), + KOBJMETHOD(uart_ioctl, s3c2410_bus_ioctl), + KOBJMETHOD(uart_ipend, s3c2410_bus_ipend), + KOBJMETHOD(uart_param, s3c2410_bus_param), + KOBJMETHOD(uart_receive, s3c2410_bus_receive), + KOBJMETHOD(uart_setsig, s3c2410_bus_setsig), + KOBJMETHOD(uart_transmit, s3c2410_bus_transmit), + + {0, 0 } +}; + +int +s3c2410_bus_probe(struct uart_softc *sc) +{ + + sc->sc_txfifosz = 16; + sc->sc_rxfifosz = 16; + + return (0); +} + +static int +s3c2410_bus_attach(struct uart_softc *sc) +{ + + sc->sc_hwiflow = 0; + sc->sc_hwoflow = 0; + + return (0); +} + +static int +s3c2410_bus_transmit(struct uart_softc *sc) +{ + int i; + int reg; + + uart_lock(sc->sc_hwmtx); + + for (i = 0; i < sc->sc_txdatasz; i++) { + s3c2410_putc(&sc->sc_bas, sc->sc_txbuf[i]); + uart_barrier(&sc->sc_bas); + } + + sc->sc_txbusy = 1; + + uart_unlock(sc->sc_hwmtx); + + /* unmask TX interrupt */ + reg = bus_space_read_4(sc->sc_bas.bst, sc->sc_bas.bsh, SSCOM_UINTM); + reg &= ~(1 << 2); + bus_space_write_4(sc->sc_bas.bst, sc->sc_bas.bsh, SSCOM_UINTM, reg); + + return (0); +} + +static int +s3c2410_bus_setsig(struct uart_softc *sc, int sig) +{ + + return (0); +} + +static int +s3c2410_bus_receive(struct uart_softc *sc) +{ + struct uart_bas *bas; + + bas = &sc->sc_bas; + while (bus_space_read_4(bas->bst, bas->bsh, + SSCOM_UFSTAT) & UFSTAT_RXCOUNT) + uart_rx_put(sc, uart_getreg(&sc->sc_bas, SSCOM_URXH)); + + return (0); +} + +static int +s3c2410_bus_param(struct uart_softc *sc, int baudrate, int databits, + int stopbits, int parity) +{ + int error; + + if (sc->sc_bas.rclk == 0) + sc->sc_bas.rclk = DEF_CLK; + + KASSERT(sc->sc_bas.rclk != 0, ("s3c2410_init: Invalid rclk")); + + uart_lock(sc->sc_hwmtx); + error = s3c24x0_uart_param(&sc->sc_bas, baudrate, databits, stopbits, + parity); + uart_unlock(sc->sc_hwmtx); + + return (error); +} + +static int +s3c2410_bus_ipend(struct uart_softc *sc) +{ + uint32_t ints; + uint32_t txempty, rxready; + int reg; + int ipend; + + uart_lock(sc->sc_hwmtx); + ints = bus_space_read_4(sc->sc_bas.bst, sc->sc_bas.bsh, SSCOM_UINTP); + bus_space_write_4(sc->sc_bas.bst, sc->sc_bas.bsh, SSCOM_UINTP, ints); + + txempty = (1 << 2); + rxready = (1 << 0); + + ipend = 0; + if ((ints & txempty) > 0) { + if (sc->sc_txbusy != 0) + ipend |= SER_INT_TXIDLE; + + /* mask TX interrupt */ + reg = bus_space_read_4(sc->sc_bas.bst, sc->sc_bas.bsh, + SSCOM_UINTM); + reg |= (1 << 2); + bus_space_write_4(sc->sc_bas.bst, sc->sc_bas.bsh, + SSCOM_UINTM, reg); + } + + if ((ints & rxready) > 0) { + ipend |= SER_INT_RXREADY; + } + + uart_unlock(sc->sc_hwmtx); + return (ipend); +} + +static int +s3c2410_bus_flush(struct uart_softc *sc, int what) +{ + + return (0); +} + +static int +s3c2410_bus_getsig(struct uart_softc *sc) +{ + + return (0); +} + +static int +s3c2410_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) +{ + + return (EINVAL); +} + +struct uart_class uart_s3c2410_class = { + "s3c2410 class", + s3c2410_methods, + 1, + .uc_ops = &uart_s3c2410_ops, + .uc_range = 8, + .uc_rclk = 0, +}; Copied: stable/10/sys/arm/samsung/exynos/exynos_uart.h (from r266944, head/sys/arm/samsung/exynos/exynos_uart.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/samsung/exynos/exynos_uart.h Sat May 23 19:50:14 2015 (r283322, copy of r266944, head/sys/arm/samsung/exynos/exynos_uart.h) @@ -0,0 +1,126 @@ +/* $NetBSD: s3c2xx0reg.h,v 1.4 2004/02/12 03:47:29 bsh Exp $ */ + +/*- + * Copyright (c) 2002, 2003 Fujitsu Component Limited + * Copyright (c) 2002, 2003 Genetec Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of The Fujitsu Component Limited nor the name of + * Genetec corporation may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY FUJITSU COMPONENT LIMITED AND GENETEC + * CORPORATION ``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 FUJITSU COMPONENT LIMITED OR GENETEC + * CORPORATION 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$ + */ + +/* s3c2410-specific registers */ +#define UMCON_AFC (1 << 4) /* auto flow control */ +#define UMSTAT_DCTS (1 << 2) /* CTS change */ +#define ULCON_IR (1 << 6) +#define ULCON_PARITY_SHIFT 3 + +/* + * Exynos-specific + * + * UFSTAT_TXFULL register differs between Exynos and others. + * Others have UFSTAT_TXFULL (1 << 9) + */ +#define UFSTAT_TXFULL (1 << 24) + +#define SSCOM_UINTM 0x038 +#define SSCOM_UINTP 0x030 + +/* common for s3c2800 and s3c24x0 */ +#define SSCOM_ULCON 0x00 /* UART line control */ +#define ULCON_PARITY_NONE (0 << ULCON_PARITY_SHIFT) +#define ULCON_PARITY_ODD (4 << ULCON_PARITY_SHIFT) +#define ULCON_PARITY_EVEN (5 << ULCON_PARITY_SHIFT) +#define ULCON_PARITY_ONE (6 << ULCON_PARITY_SHIFT) +#define ULCON_PARITY_ZERO (7 << ULCON_PARITY_SHIFT) +#define ULCON_STOP (1 << 2) +#define ULCON_LENGTH_5 0 +#define ULCON_LENGTH_6 1 +#define ULCON_LENGTH_7 2 +#define ULCON_LENGTH_8 3 +#define SSCOM_UCON 0x04 /* UART control */ +#define UCON_TXINT_TYPE (1 << 9) /* Tx interrupt. 0=pulse,1=level */ +#define UCON_TXINT_TYPE_LEVEL UCON_TXINT_TYPE +#define UCON_TXINT_TYPE_PULSE 0 +#define UCON_RXINT_TYPE (1 << 8) /* Rx interrupt */ +#define UCON_RXINT_TYPE_LEVEL UCON_RXINT_TYPE +#define UCON_RXINT_TYPE_PULSE 0 +#define UCON_TOINT (1 << 7) /* Rx timeout interrupt */ +#define UCON_ERRINT (1 << 6) /* receive error interrupt */ +#define UCON_LOOP (1 << 5) /* loopback */ +#define UCON_SBREAK (1 << 4) /* send break */ +#define UCON_TXMODE_DISABLE (0 << 2) +#define UCON_TXMODE_INT (1 << 2) +#define UCON_TXMODE_DMA (2 << 2) +#define UCON_TXMODE_MASK (3 << 2) +#define UCON_RXMODE_DISABLE (0 << 0) +#define UCON_RXMODE_INT (1 << 0) +#define UCON_RXMODE_DMA (2 << 0) +#define UCON_RXMODE_MASK (3 << 0) +#define SSCOM_UFCON 0x08 /* FIFO control */ +#define UFCON_TXTRIGGER_0 (0 << 6) +#define UFCON_TXTRIGGER_4 (1 << 6) +#define UFCON_TXTRIGGER_8 (2 << 6) +#define UFCON_TXTRIGGER_16 (3 << 6) +#define UFCON_RXTRIGGER_4 (0 << 4) +#define UFCON_RXTRIGGER_8 (1 << 4) +#define UFCON_RXTRIGGER_12 (2 << 4) +#define UFCON_RXTRIGGER_16 (3 << 4) +#define UFCON_TXFIFO_RESET (1 << 2) +#define UFCON_RXFIFO_RESET (1 << 1) +#define UFCON_FIFO_ENABLE (1 << 0) +#define SSCOM_UMCON 0x0c /* MODEM control */ +#define UMCON_RTS (1 << 0) /* Request to send */ +#define SSCOM_UTRSTAT 0x10 /* Status register */ +#define UTRSTAT_TXSHIFTER_EMPTY ( 1<< 2) +#define UTRSTAT_TXEMPTY (1 << 1) /* TX fifo or buffer empty */ +#define UTRSTAT_RXREADY (1 << 0) /* RX fifo or buffer is not empty */ +#define SSCOM_UERSTAT 0x14 /* Error status register */ +#define UERSTAT_BREAK (1 << 3) /* Break signal, not 2410 */ +#define UERSTAT_FRAME (1 << 2) /* Frame error */ +#define UERSTAT_PARITY (1 << 1) /* Parity error, not 2410 */ +#define UERSTAT_OVERRUN (1 << 0) /* Overrun */ +#define UERSTAT_ALL_ERRORS \ + (UERSTAT_OVERRUN|UERSTAT_BREAK|UERSTAT_FRAME|UERSTAT_PARITY) +#define SSCOM_UFSTAT 0x18 /* Fifo status register */ +#define UFSTAT_RXFULL (1 <<8) /* Rx fifo full */ +#define UFSTAT_TXCOUNT_SHIFT 4 /* TX FIFO count */ +#define UFSTAT_TXCOUNT (0x0f << UFSTAT_TXCOUNT_SHIFT) +#define UFSTAT_RXCOUNT_SHIFT 0 /* RX FIFO count */ +#define UFSTAT_RXCOUNT (0x0f << UFSTAT_RXCOUNT_SHIFT) +#define SSCOM_UMSTAT 0x1c /* Modem status register */ +#define UMSTAT_CTS (1 << 0) /* Clear to send */ +#if _BYTE_ORDER == _LITTLE_ENDIAN +#define SSCOM_UTXH 0x20 /* Transmit data register */ +#define SSCOM_URXH 0x24 /* Receive data register */ +#else +#define SSCOM_UTXH 0x23 /* Transmit data register */ +#define SSCOM_URXH 0x27 /* Receive data register */ +#endif +#define SSCOM_UBRDIV 0x28 /* baud-reate divisor */ +#define SSCOM_SIZE 0x2c Modified: stable/10/sys/arm/samsung/exynos/files.exynos5 ============================================================================== --- stable/10/sys/arm/samsung/exynos/files.exynos5 Sat May 23 19:27:04 2015 (r283321) +++ stable/10/sys/arm/samsung/exynos/files.exynos5 Sat May 23 19:50:14 2015 (r283322) @@ -19,7 +19,7 @@ arm/samsung/exynos/exynos5_common.c sta arm/samsung/exynos/exynos5_machdep.c standard arm/samsung/exynos/exynos5_combiner.c standard arm/samsung/exynos/exynos5_pad.c optional gpio -arm/samsung/exynos/uart.c optional uart +arm/samsung/exynos/exynos_uart.c optional uart arm/samsung/exynos/exynos5_ehci.c optional ehci arm/samsung/exynos/exynos5_fimd.c optional vt arm/samsung/exynos/exynos5_i2c.c optional iicbus From owner-svn-src-all@FreeBSD.ORG Sat May 23 19:57:46 2015 Return-Path: Delivered-To: svn-src-all@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 3E82763B; Sat, 23 May 2015 19:57: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 1F04F1705; Sat, 23 May 2015 19:57: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 t4NJvjCK056733; Sat, 23 May 2015 19:57:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NJvjhP056729; Sat, 23 May 2015 19:57:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505231957.t4NJvjhP056729@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 19:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283323 - in stable/10/sys: arm/samsung/exynos dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 19:57:46 -0000 Author: ian Date: Sat May 23 19:57:44 2015 New Revision: 283323 URL: https://svnweb.freebsd.org/changeset/base/283323 Log: MFC r277132: Rename Exynos UART driver functions. No functional change. Modified: stable/10/sys/arm/samsung/exynos/exynos_uart.c stable/10/sys/dev/uart/uart.h stable/10/sys/dev/uart/uart_bus_fdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/samsung/exynos/exynos_uart.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/exynos_uart.c Sat May 23 19:50:14 2015 (r283322) +++ stable/10/sys/arm/samsung/exynos/exynos_uart.c Sat May 23 19:57:44 2015 (r283323) @@ -50,17 +50,17 @@ __FBSDID("$FreeBSD$"); #define DEF_CLK 100000000 static int sscomspeed(long, long); -static int s3c24x0_uart_param(struct uart_bas *, int, int, int, int); +static int exynos4210_uart_param(struct uart_bas *, int, int, int, int); /* * Low-level UART interface. */ -static int s3c2410_probe(struct uart_bas *bas); -static void s3c2410_init(struct uart_bas *bas, int, int, int, int); -static void s3c2410_term(struct uart_bas *bas); -static void s3c2410_putc(struct uart_bas *bas, int); -static int s3c2410_rxready(struct uart_bas *bas); -static int s3c2410_getc(struct uart_bas *bas, struct mtx *mtx); +static int exynos4210_probe(struct uart_bas *bas); +static void exynos4210_init(struct uart_bas *bas, int, int, int, int); +static void exynos4210_term(struct uart_bas *bas); +static void exynos4210_putc(struct uart_bas *bas, int); +static int exynos4210_rxready(struct uart_bas *bas); +static int exynos4210_getc(struct uart_bas *bas, struct mtx *mtx); extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; @@ -76,7 +76,7 @@ sscomspeed(long speed, long frequency) } static int -s3c24x0_uart_param(struct uart_bas *bas, int baudrate, int databits, +exynos4210_uart_param(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { int brd, ulcon; @@ -127,38 +127,38 @@ s3c24x0_uart_param(struct uart_bas *bas, return (0); } -struct uart_ops uart_s3c2410_ops = { - .probe = s3c2410_probe, - .init = s3c2410_init, - .term = s3c2410_term, - .putc = s3c2410_putc, - .rxready = s3c2410_rxready, - .getc = s3c2410_getc, +struct uart_ops uart_exynos4210_ops = { + .probe = exynos4210_probe, + .init = exynos4210_init, + .term = exynos4210_term, + .putc = exynos4210_putc, + .rxready = exynos4210_rxready, + .getc = exynos4210_getc, }; static int -s3c2410_probe(struct uart_bas *bas) +exynos4210_probe(struct uart_bas *bas) { return (0); } static void -s3c2410_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, +exynos4210_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { if (bas->rclk == 0) bas->rclk = DEF_CLK; - KASSERT(bas->rclk != 0, ("s3c2410_init: Invalid rclk")); + KASSERT(bas->rclk != 0, ("exynos4210_init: Invalid rclk")); uart_setreg(bas, SSCOM_UCON, 0); uart_setreg(bas, SSCOM_UFCON, UFCON_TXTRIGGER_8 | UFCON_RXTRIGGER_8 | UFCON_TXFIFO_RESET | UFCON_RXFIFO_RESET | UFCON_FIFO_ENABLE); - s3c24x0_uart_param(bas, baudrate, databits, stopbits, parity); + exynos4210_uart_param(bas, baudrate, databits, stopbits, parity); /* Enable UART. */ uart_setreg(bas, SSCOM_UCON, UCON_TXMODE_INT | UCON_RXMODE_INT | @@ -167,13 +167,13 @@ s3c2410_init(struct uart_bas *bas, int b } static void -s3c2410_term(struct uart_bas *bas) +exynos4210_term(struct uart_bas *bas) { /* XXX */ } static void -s3c2410_putc(struct uart_bas *bas, int c) +exynos4210_putc(struct uart_bas *bas, int c) { while ((bus_space_read_4(bas->bst, bas->bsh, SSCOM_UFSTAT) & @@ -184,7 +184,7 @@ s3c2410_putc(struct uart_bas *bas, int c } static int -s3c2410_rxready(struct uart_bas *bas) +exynos4210_rxready(struct uart_bas *bas) { return ((uart_getreg(bas, SSCOM_UTRSTAT) & UTRSTAT_RXREADY) == @@ -192,7 +192,7 @@ s3c2410_rxready(struct uart_bas *bas) } static int -s3c2410_getc(struct uart_bas *bas, struct mtx *mtx) +exynos4210_getc(struct uart_bas *bas, struct mtx *mtx) { int utrstat; @@ -205,34 +205,34 @@ s3c2410_getc(struct uart_bas *bas, struc return (bus_space_read_1(bas->bst, bas->bsh, SSCOM_URXH)); } -static int s3c2410_bus_probe(struct uart_softc *sc); -static int s3c2410_bus_attach(struct uart_softc *sc); -static int s3c2410_bus_flush(struct uart_softc *, int); -static int s3c2410_bus_getsig(struct uart_softc *); -static int s3c2410_bus_ioctl(struct uart_softc *, int, intptr_t); -static int s3c2410_bus_ipend(struct uart_softc *); -static int s3c2410_bus_param(struct uart_softc *, int, int, int, int); -static int s3c2410_bus_receive(struct uart_softc *); -static int s3c2410_bus_setsig(struct uart_softc *, int); -static int s3c2410_bus_transmit(struct uart_softc *); - -static kobj_method_t s3c2410_methods[] = { - KOBJMETHOD(uart_probe, s3c2410_bus_probe), - KOBJMETHOD(uart_attach, s3c2410_bus_attach), - KOBJMETHOD(uart_flush, s3c2410_bus_flush), - KOBJMETHOD(uart_getsig, s3c2410_bus_getsig), - KOBJMETHOD(uart_ioctl, s3c2410_bus_ioctl), - KOBJMETHOD(uart_ipend, s3c2410_bus_ipend), - KOBJMETHOD(uart_param, s3c2410_bus_param), - KOBJMETHOD(uart_receive, s3c2410_bus_receive), - KOBJMETHOD(uart_setsig, s3c2410_bus_setsig), - KOBJMETHOD(uart_transmit, s3c2410_bus_transmit), +static int exynos4210_bus_probe(struct uart_softc *sc); +static int exynos4210_bus_attach(struct uart_softc *sc); +static int exynos4210_bus_flush(struct uart_softc *, int); +static int exynos4210_bus_getsig(struct uart_softc *); +static int exynos4210_bus_ioctl(struct uart_softc *, int, intptr_t); +static int exynos4210_bus_ipend(struct uart_softc *); +static int exynos4210_bus_param(struct uart_softc *, int, int, int, int); +static int exynos4210_bus_receive(struct uart_softc *); +static int exynos4210_bus_setsig(struct uart_softc *, int); +static int exynos4210_bus_transmit(struct uart_softc *); + +static kobj_method_t exynos4210_methods[] = { + KOBJMETHOD(uart_probe, exynos4210_bus_probe), + KOBJMETHOD(uart_attach, exynos4210_bus_attach), + KOBJMETHOD(uart_flush, exynos4210_bus_flush), + KOBJMETHOD(uart_getsig, exynos4210_bus_getsig), + KOBJMETHOD(uart_ioctl, exynos4210_bus_ioctl), + KOBJMETHOD(uart_ipend, exynos4210_bus_ipend), + KOBJMETHOD(uart_param, exynos4210_bus_param), + KOBJMETHOD(uart_receive, exynos4210_bus_receive), + KOBJMETHOD(uart_setsig, exynos4210_bus_setsig), + KOBJMETHOD(uart_transmit, exynos4210_bus_transmit), {0, 0 } }; int -s3c2410_bus_probe(struct uart_softc *sc) +exynos4210_bus_probe(struct uart_softc *sc) { sc->sc_txfifosz = 16; @@ -242,7 +242,7 @@ s3c2410_bus_probe(struct uart_softc *sc) } static int -s3c2410_bus_attach(struct uart_softc *sc) +exynos4210_bus_attach(struct uart_softc *sc) { sc->sc_hwiflow = 0; @@ -252,7 +252,7 @@ s3c2410_bus_attach(struct uart_softc *sc } static int -s3c2410_bus_transmit(struct uart_softc *sc) +exynos4210_bus_transmit(struct uart_softc *sc) { int i; int reg; @@ -260,7 +260,7 @@ s3c2410_bus_transmit(struct uart_softc * uart_lock(sc->sc_hwmtx); for (i = 0; i < sc->sc_txdatasz; i++) { - s3c2410_putc(&sc->sc_bas, sc->sc_txbuf[i]); + exynos4210_putc(&sc->sc_bas, sc->sc_txbuf[i]); uart_barrier(&sc->sc_bas); } @@ -277,14 +277,14 @@ s3c2410_bus_transmit(struct uart_softc * } static int -s3c2410_bus_setsig(struct uart_softc *sc, int sig) +exynos4210_bus_setsig(struct uart_softc *sc, int sig) { return (0); } static int -s3c2410_bus_receive(struct uart_softc *sc) +exynos4210_bus_receive(struct uart_softc *sc) { struct uart_bas *bas; @@ -297,7 +297,7 @@ s3c2410_bus_receive(struct uart_softc *s } static int -s3c2410_bus_param(struct uart_softc *sc, int baudrate, int databits, +exynos4210_bus_param(struct uart_softc *sc, int baudrate, int databits, int stopbits, int parity) { int error; @@ -305,10 +305,10 @@ s3c2410_bus_param(struct uart_softc *sc, if (sc->sc_bas.rclk == 0) sc->sc_bas.rclk = DEF_CLK; - KASSERT(sc->sc_bas.rclk != 0, ("s3c2410_init: Invalid rclk")); + KASSERT(sc->sc_bas.rclk != 0, ("exynos4210_init: Invalid rclk")); uart_lock(sc->sc_hwmtx); - error = s3c24x0_uart_param(&sc->sc_bas, baudrate, databits, stopbits, + error = exynos4210_uart_param(&sc->sc_bas, baudrate, databits, stopbits, parity); uart_unlock(sc->sc_hwmtx); @@ -316,7 +316,7 @@ s3c2410_bus_param(struct uart_softc *sc, } static int -s3c2410_bus_ipend(struct uart_softc *sc) +exynos4210_bus_ipend(struct uart_softc *sc) { uint32_t ints; uint32_t txempty, rxready; @@ -352,31 +352,31 @@ s3c2410_bus_ipend(struct uart_softc *sc) } static int -s3c2410_bus_flush(struct uart_softc *sc, int what) +exynos4210_bus_flush(struct uart_softc *sc, int what) { return (0); } static int -s3c2410_bus_getsig(struct uart_softc *sc) +exynos4210_bus_getsig(struct uart_softc *sc) { return (0); } static int -s3c2410_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) +exynos4210_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) { return (EINVAL); } -struct uart_class uart_s3c2410_class = { - "s3c2410 class", - s3c2410_methods, +struct uart_class uart_exynos4210_class = { + "exynos4210 class", + exynos4210_methods, 1, - .uc_ops = &uart_s3c2410_ops, + .uc_ops = &uart_exynos4210_ops, .uc_range = 8, .uc_rclk = 0, }; Modified: stable/10/sys/dev/uart/uart.h ============================================================================== --- stable/10/sys/dev/uart/uart.h Sat May 23 19:50:14 2015 (r283322) +++ stable/10/sys/dev/uart/uart.h Sat May 23 19:57:44 2015 (r283323) @@ -78,6 +78,7 @@ extern struct uart_class uart_cdnc_class extern struct uart_class uart_ti8250_class __attribute__((weak)); extern struct uart_class uart_vybrid_class __attribute__((weak)); extern struct uart_class at91_usart_class __attribute__((weak)); +extern struct uart_class uart_exynos4210_class __attribute__((weak)); #ifdef FDT struct ofw_compat_data; Modified: stable/10/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_fdt.c Sat May 23 19:50:14 2015 (r283322) +++ stable/10/sys/dev/uart/uart_bus_fdt.c Sat May 23 19:57:44 2015 (r283323) @@ -74,7 +74,7 @@ static struct ofw_compat_data compat_dat {"atmel,at91rm9200-usart",(uintptr_t)&at91_usart_class}, {"atmel,at91sam9260-usart",(uintptr_t)&at91_usart_class}, {"cadence,uart", (uintptr_t)&uart_cdnc_class}, - {"exynos", (uintptr_t)&uart_s3c2410_class}, + {"exynos", (uintptr_t)&uart_exynos4210_class}, {"fsl,imx6q-uart", (uintptr_t)&uart_imx_class}, {"fsl,imx53-uart", (uintptr_t)&uart_imx_class}, {"fsl,imx51-uart", (uintptr_t)&uart_imx_class}, From owner-svn-src-all@FreeBSD.ORG Sat May 23 20:01:21 2015 Return-Path: Delivered-To: svn-src-all@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 6AE21892; Sat, 23 May 2015 20:01: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 57C5917C6; Sat, 23 May 2015 20:01: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 t4NK1LG3061203; Sat, 23 May 2015 20:01:21 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NK1L0w061202; Sat, 23 May 2015 20:01:21 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232001.t4NK1L0w061202@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 20:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283324 - stable/10/sys/dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 20:01:21 -0000 Author: ian Date: Sat May 23 20:01:20 2015 New Revision: 283324 URL: https://svnweb.freebsd.org/changeset/base/283324 Log: MFC r279239: Enable 'receive timeout' interrupt allowing us to not loose 'rx buffer full' event. Modified: stable/10/sys/dev/uart/uart_dev_pl011.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/uart/uart_dev_pl011.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_pl011.c Sat May 23 19:57:44 2015 (r283323) +++ stable/10/sys/dev/uart/uart_dev_pl011.c Sat May 23 20:01:20 2015 (r283324) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #define UART_RIS 0x0f /* Raw interrupt status register */ #define UART_RXREADY (1 << 4) /* RX buffer full */ #define UART_TXEMPTY (1 << 5) /* TX buffer empty */ +#define RIS_RTIM (1 << 6) /* Receive timeout */ #define RIS_FE (1 << 7) /* Framing error interrupt status */ #define RIS_PE (1 << 8) /* Parity error interrupt status */ #define RIS_BE (1 << 9) /* Break error interrupt status */ @@ -278,11 +279,15 @@ static int uart_pl011_bus_attach(struct uart_softc *sc) { struct uart_bas *bas; + int reg; bas = &sc->sc_bas; - /* Enable RX & TX interrupts */ - __uart_setreg(bas, UART_IMSC, (UART_RXREADY | UART_TXEMPTY)); - /* Clear RX & TX interrupts */ + + /* Enable interrupts */ + reg = (UART_RXREADY | RIS_RTIM | UART_TXEMPTY); + __uart_setreg(bas, UART_IMSC, reg); + + /* Clear interrupts */ __uart_setreg(bas, UART_ICR, IMSC_MASK_ALL); return (0); @@ -337,15 +342,16 @@ static int uart_pl011_bus_ipend(struct uart_softc *sc) { struct uart_bas *bas; - int ipend; uint32_t ints; + int ipend; + int reg; bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); ints = __uart_getreg(bas, UART_MIS); ipend = 0; - if (ints & UART_RXREADY) + if (ints & (UART_RXREADY | RIS_RTIM)) ipend |= SER_INT_RXREADY; if (ints & RIS_BE) ipend |= SER_INT_BREAK; @@ -355,7 +361,10 @@ uart_pl011_bus_ipend(struct uart_softc * if (sc->sc_txbusy) ipend |= SER_INT_TXIDLE; - __uart_setreg(bas, UART_IMSC, UART_RXREADY); + /* Disable TX interrupt */ + reg = __uart_getreg(bas, UART_IMSC); + reg &= ~(UART_TXEMPTY); + __uart_setreg(bas, UART_IMSC, reg); } uart_unlock(sc->sc_hwmtx); @@ -391,14 +400,14 @@ static int uart_pl011_bus_receive(struct uart_softc *sc) { struct uart_bas *bas; - int rx; uint32_t ints, xc; + int rx; bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); ints = __uart_getreg(bas, UART_MIS); - while (ints & UART_RXREADY) { + while (ints & (UART_RXREADY | RIS_RTIM)) { if (uart_rx_full(sc)) { sc->sc_rxbuf[sc->sc_rxput] = UART_STAT_OVERRUN; break; @@ -411,7 +420,7 @@ uart_pl011_bus_receive(struct uart_softc if (xc & DR_PE) rx |= UART_STAT_PARERR; - __uart_setreg(bas, UART_ICR, UART_RXREADY); + __uart_setreg(bas, UART_ICR, (UART_RXREADY | RIS_RTIM)); uart_rx_put(sc, rx); ints = __uart_getreg(bas, UART_MIS); @@ -433,6 +442,7 @@ static int uart_pl011_bus_transmit(struct uart_softc *sc) { struct uart_bas *bas; + int reg; int i; bas = &sc->sc_bas; @@ -443,7 +453,12 @@ uart_pl011_bus_transmit(struct uart_soft uart_barrier(bas); } sc->sc_txbusy = 1; - __uart_setreg(bas, UART_IMSC, (UART_RXREADY | UART_TXEMPTY)); + + /* Enable TX interrupt */ + reg = __uart_getreg(bas, UART_IMSC); + reg |= (UART_TXEMPTY); + __uart_setreg(bas, UART_IMSC, reg); + uart_unlock(sc->sc_hwmtx); return (0); From owner-svn-src-all@FreeBSD.ORG Sat May 23 20:53:20 2015 Return-Path: Delivered-To: svn-src-all@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 863B3EA5; Sat, 23 May 2015 20:53: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 7409B1C89; Sat, 23 May 2015 20:53: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 t4NKrK6s086343; Sat, 23 May 2015 20:53:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NKrKwJ086341; Sat, 23 May 2015 20:53:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232053.t4NKrKwJ086341@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 20:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283326 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 20:53:20 -0000 Author: ian Date: Sat May 23 20:53:19 2015 New Revision: 283326 URL: https://svnweb.freebsd.org/changeset/base/283326 Log: MFC r268137, r268138: Define a "__weak" macro for declaring symbols "weak". Add support for empty data sets. Data set begin and end pointers should resolve to "NULL" when not present. This is done by declaring the data set begin and end symbols as "weak". Modified: stable/10/sys/sys/cdefs.h stable/10/sys/sys/linker_set.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/cdefs.h ============================================================================== --- stable/10/sys/sys/cdefs.h Sat May 23 20:29:06 2015 (r283325) +++ stable/10/sys/sys/cdefs.h Sat May 23 20:53:19 2015 (r283326) @@ -213,7 +213,9 @@ #define __packed #define __aligned(x) #define __section(x) +#define __weak #else +#define __weak __attribute__((__weak__)) #if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER) #define __dead2 #define __pure2 Modified: stable/10/sys/sys/linker_set.h ============================================================================== --- stable/10/sys/sys/linker_set.h Sat May 23 20:29:06 2015 (r283325) +++ stable/10/sys/sys/linker_set.h Sat May 23 20:53:19 2015 (r283326) @@ -68,9 +68,9 @@ /* * Initialize before referring to a given linker set. */ -#define SET_DECLARE(set, ptype) \ - extern ptype *__CONCAT(__start_set_,set); \ - extern ptype *__CONCAT(__stop_set_,set) +#define SET_DECLARE(set, ptype) \ + extern ptype __weak *__CONCAT(__start_set_,set); \ + extern ptype __weak *__CONCAT(__stop_set_,set) #define SET_BEGIN(set) \ (&__CONCAT(__start_set_,set)) From owner-svn-src-all@FreeBSD.ORG Sat May 23 20:54:31 2015 Return-Path: Delivered-To: svn-src-all@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 36413FDE; Sat, 23 May 2015 20:54: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 21B0C1C91; Sat, 23 May 2015 20:54: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 t4NKsVks086582; Sat, 23 May 2015 20:54:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NKsP7L086552; Sat, 23 May 2015 20:54:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232054.t4NKsP7L086552@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 20:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283327 - in stable/10/sys: arm/at91 arm/freescale/vybrid arm/samsung/exynos arm/samsung/s3c2xx0 arm/xilinx dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 20:54:31 -0000 Author: ian Date: Sat May 23 20:54:25 2015 New Revision: 283327 URL: https://svnweb.freebsd.org/changeset/base/283327 Log: MFC r279723, r279724: Define new linker set, UART_FDT_CLASS_AND_DEVICE, for registering full (class and device) FDT UART. Define second one, UART_FDT_CLASS, for UART class only. Move the uart_class definitions and fdt compat data into the individual uart implementations, and export them using the new linker-set mechanism. Added: stable/10/sys/dev/uart/uart_cpu_fdt.h - copied unchanged from r279723, head/sys/dev/uart/uart_cpu_fdt.h Modified: stable/10/sys/arm/at91/uart_bus_at91usart.c stable/10/sys/arm/at91/uart_cpu_at91usart.c stable/10/sys/arm/at91/uart_dev_at91usart.c stable/10/sys/arm/freescale/vybrid/vf_uart.c stable/10/sys/arm/samsung/exynos/exynos_uart.c stable/10/sys/arm/samsung/s3c2xx0/uart_bus_s3c2410.c stable/10/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c stable/10/sys/arm/xilinx/uart_dev_cdnc.c stable/10/sys/dev/uart/uart.h stable/10/sys/dev/uart/uart_bus_fdt.c stable/10/sys/dev/uart/uart_cpu_fdt.c stable/10/sys/dev/uart/uart_dev_imx.c stable/10/sys/dev/uart/uart_dev_lpc.c stable/10/sys/dev/uart/uart_dev_msm.c stable/10/sys/dev/uart/uart_dev_ns8250.c stable/10/sys/dev/uart/uart_dev_pl011.c stable/10/sys/dev/uart/uart_dev_ti8250.c stable/10/sys/dev/uart/uart_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/at91/uart_bus_at91usart.c ============================================================================== --- stable/10/sys/arm/at91/uart_bus_at91usart.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/arm/at91/uart_bus_at91usart.c Sat May 23 20:54:25 2015 (r283327) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include "uart_if.h" +extern struct uart_class at91_usart_class; static int usart_at91_probe(device_t dev); static device_method_t usart_at91_methods[] = { Modified: stable/10/sys/arm/at91/uart_cpu_at91usart.c ============================================================================== --- stable/10/sys/arm/at91/uart_cpu_at91usart.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/arm/at91/uart_cpu_at91usart.c Sat May 23 20:54:25 2015 (r283327) @@ -51,6 +51,7 @@ bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; extern struct bus_space at91_bs_tag; +extern struct uart_class at91_usart_class; int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) Modified: stable/10/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- stable/10/sys/arm/at91/uart_dev_at91usart.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/arm/at91/uart_dev_at91usart.c Sat May 23 20:54:25 2015 (r283327) @@ -40,6 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#endif #include #include #include @@ -866,3 +869,12 @@ struct uart_class at91_usart_class = { .uc_ops = &at91_usart_ops, .uc_range = 8 }; + +#ifdef FDT +static struct ofw_compat_data compat_data[] = { + {"atmel,at91rm9200-usart",(uintptr_t)&at91_usart_class}, + {"atmel,at91sam9260-usart",(uintptr_t)&at91_usart_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(compat_data); +#endif Modified: stable/10/sys/arm/freescale/vybrid/vf_uart.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_uart.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/arm/freescale/vybrid/vf_uart.c Sat May 23 20:54:25 2015 (r283327) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "uart_if.h" @@ -270,7 +271,7 @@ static kobj_method_t vf_uart_methods[] = { 0, 0 } }; -struct uart_class uart_vybrid_class = { +static struct uart_class uart_vybrid_class = { "vybrid", vf_uart_methods, sizeof(struct vf_uart_softc), @@ -279,6 +280,12 @@ struct uart_class uart_vybrid_class = { .uc_rclk = 24000000 /* TODO: get value from CCM */ }; +static struct ofw_compat_data compat_data[] = { + {"fsl,mvf600-uart", (uintptr_t)&uart_vybrid_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(compat_data); + static int vf_uart_bus_attach(struct uart_softc *sc) { Modified: stable/10/sys/arm/samsung/exynos/exynos_uart.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/exynos_uart.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/arm/samsung/exynos/exynos_uart.c Sat May 23 20:54:25 2015 (r283327) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -372,7 +373,7 @@ exynos4210_bus_ioctl(struct uart_softc * return (EINVAL); } -struct uart_class uart_exynos4210_class = { +static struct uart_class uart_exynos4210_class = { "exynos4210 class", exynos4210_methods, 1, @@ -380,3 +381,9 @@ struct uart_class uart_exynos4210_class .uc_range = 8, .uc_rclk = 0, }; + +static struct ofw_compat_data compat_data[] = { + {"exynos", (uintptr_t)&uart_exynos4210_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(compat_data); Modified: stable/10/sys/arm/samsung/s3c2xx0/uart_bus_s3c2410.c ============================================================================== --- stable/10/sys/arm/samsung/s3c2xx0/uart_bus_s3c2410.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/arm/samsung/s3c2xx0/uart_bus_s3c2410.c Sat May 23 20:54:25 2015 (r283327) @@ -19,6 +19,8 @@ __FBSDID("$FreeBSD$"); #include "uart_if.h" +extern struct uart_class uart_s3c2410_class; + static int uart_s3c2410_probe(device_t dev); static device_method_t uart_s3c2410_methods[] = { Modified: stable/10/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c ============================================================================== --- stable/10/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c Sat May 23 20:54:25 2015 (r283327) @@ -39,11 +39,11 @@ __FBSDID("$FreeBSD$"); #include +extern struct uart_class uart_s3c2410_class; + bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; -extern struct uart_ops uart_s3c2410_ops; - vm_offset_t s3c2410_uart_vaddr; unsigned int s3c2410_pclk; Modified: stable/10/sys/arm/xilinx/uart_dev_cdnc.c ============================================================================== --- stable/10/sys/arm/xilinx/uart_dev_cdnc.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/arm/xilinx/uart_dev_cdnc.c Sat May 23 20:54:25 2015 (r283327) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "uart_if.h" @@ -700,10 +701,16 @@ cdnc_uart_bus_ungrab(struct uart_softc * CDNC_UART_INT_DMSI); } -struct uart_class uart_cdnc_class = { +static struct uart_class uart_cdnc_class = { "cdnc_uart", cdnc_uart_bus_methods, sizeof(struct uart_softc), .uc_ops = &cdnc_uart_ops, .uc_range = 8 }; + +static struct ofw_compat_data compat_data[] = { + {"cadence,uart", (uintptr_t)&uart_cdnc_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(compat_data); Modified: stable/10/sys/dev/uart/uart.h ============================================================================== --- stable/10/sys/dev/uart/uart.h Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/dev/uart/uart.h Sat May 23 20:54:25 2015 (r283327) @@ -64,26 +64,12 @@ struct uart_bas { */ struct uart_class; -extern struct uart_class uart_imx_class __attribute__((weak)); -extern struct uart_class uart_msm_class __attribute__((weak)); extern struct uart_class uart_ns8250_class __attribute__((weak)); extern struct uart_class uart_quicc_class __attribute__((weak)); extern struct uart_class uart_s3c2410_class __attribute__((weak)); extern struct uart_class uart_sab82532_class __attribute__((weak)); extern struct uart_class uart_sbbc_class __attribute__((weak)); extern struct uart_class uart_z8530_class __attribute__((weak)); -extern struct uart_class uart_lpc_class __attribute__((weak)); -extern struct uart_class uart_pl011_class __attribute__((weak)); -extern struct uart_class uart_cdnc_class __attribute__((weak)); -extern struct uart_class uart_ti8250_class __attribute__((weak)); -extern struct uart_class uart_vybrid_class __attribute__((weak)); -extern struct uart_class at91_usart_class __attribute__((weak)); -extern struct uart_class uart_exynos4210_class __attribute__((weak)); - -#ifdef FDT -struct ofw_compat_data; -extern const struct ofw_compat_data *uart_fdt_compat_data; -#endif #ifdef PC98 struct uart_class *uart_pc98_getdev(u_long port); Modified: stable/10/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_fdt.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/dev/uart/uart_bus_fdt.c Sat May 23 20:54:25 2015 (r283327) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include static int uart_fdt_probe(device_t); @@ -62,37 +63,6 @@ static driver_t uart_fdt_driver = { sizeof(struct uart_softc), }; -/* - * Compatible devices. Keep this sorted in most- to least-specific order first, - * alphabetical second. That is, "zwie,ns16550" should appear before "ns16550" - * on the theory that the zwie driver knows how to make better use of the - * hardware than the generic driver. Likewise with chips within a family, the - * highest-numbers / most recent models should probably appear earlier. - */ -static struct ofw_compat_data compat_data[] = { - {"arm,pl011", (uintptr_t)&uart_pl011_class}, - {"atmel,at91rm9200-usart",(uintptr_t)&at91_usart_class}, - {"atmel,at91sam9260-usart",(uintptr_t)&at91_usart_class}, - {"cadence,uart", (uintptr_t)&uart_cdnc_class}, - {"exynos", (uintptr_t)&uart_exynos4210_class}, - {"fsl,imx6q-uart", (uintptr_t)&uart_imx_class}, - {"fsl,imx53-uart", (uintptr_t)&uart_imx_class}, - {"fsl,imx51-uart", (uintptr_t)&uart_imx_class}, - {"fsl,imx31-uart", (uintptr_t)&uart_imx_class}, - {"fsl,imx27-uart", (uintptr_t)&uart_imx_class}, - {"fsl,imx25-uart", (uintptr_t)&uart_imx_class}, - {"fsl,imx21-uart", (uintptr_t)&uart_imx_class}, - {"fsl,mvf600-uart", (uintptr_t)&uart_vybrid_class}, - {"lpc,uart", (uintptr_t)&uart_lpc_class}, - {"qcom,msm-uartdm", (uintptr_t)&uart_msm_class}, - {"ti,ns16550", (uintptr_t)&uart_ti8250_class}, - {"ns16550", (uintptr_t)&uart_ns8250_class}, - {NULL, (uintptr_t)NULL}, -}; - -/* Export the compat_data table for use by the uart_cpu_fdt.c probe routine. */ -const struct ofw_compat_data *uart_fdt_compat_data = compat_data; - static int uart_fdt_get_clock(phandle_t node, pcell_t *cell) { @@ -127,6 +97,20 @@ uart_fdt_get_shift(phandle_t node, pcell return (0); } +static uintptr_t +uart_fdt_find_device(device_t dev) +{ + struct ofw_compat_data **cd; + const struct ofw_compat_data *ocd; + + SET_FOREACH(cd, uart_fdt_class_and_device_set) { + ocd = ofw_bus_search_compatible(dev, *cd); + if (ocd->ocd_data != 0) + return (ocd->ocd_data); + } + return (0); +} + static int uart_fdt_probe(device_t dev) { @@ -134,19 +118,16 @@ uart_fdt_probe(device_t dev) phandle_t node; pcell_t clock, shift; int err; - const struct ofw_compat_data * cd; sc = device_get_softc(dev); if (!ofw_bus_status_okay(dev)) return (ENXIO); - cd = ofw_bus_search_compatible(dev, compat_data); - if (cd->ocd_data == (uintptr_t)NULL) + sc->sc_class = (struct uart_class *)uart_fdt_find_device(dev); + if (sc->sc_class == NULL) return (ENXIO); - sc->sc_class = (struct uart_class *)cd->ocd_data; - node = ofw_bus_get_node(dev); if ((err = uart_fdt_get_clock(node, &clock)) != 0) Modified: stable/10/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- stable/10/sys/dev/uart/uart_cpu_fdt.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/dev/uart/uart_cpu_fdt.c Sat May 23 20:54:25 2015 (r283327) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* * UART console routines. @@ -115,13 +116,46 @@ phandle_chosen_propdev(phandle_t chosen, return (0); } +static const struct ofw_compat_data * +uart_fdt_find_compatible(phandle_t node, const struct ofw_compat_data *cd) +{ + const struct ofw_compat_data *ocd; + + for (ocd = cd; ocd->ocd_str != NULL; ocd++) { + if (fdt_is_compatible(node, ocd->ocd_str)) + return (ocd); + } + return (NULL); +} + +static uintptr_t +uart_fdt_find_by_node(phandle_t node, int class_list) +{ + struct ofw_compat_data **cd; + const struct ofw_compat_data *ocd; + + if (class_list) { + SET_FOREACH(cd, uart_fdt_class_set) { + ocd = uart_fdt_find_compatible(node, *cd); + if ((ocd != NULL) && (ocd->ocd_data != 0)) + return (ocd->ocd_data); + } + } else { + SET_FOREACH(cd, uart_fdt_class_and_device_set) { + ocd = uart_fdt_find_compatible(node, *cd); + if ((ocd != NULL) && (ocd->ocd_data != 0)) + return (ocd->ocd_data); + } + } + return (0); +} + int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { const char *propnames[] = {"stdout-path", "linux,stdout-path", "stdout", "stdin-path", "stdin", NULL}; const char **name; - const struct ofw_compat_data *cd; struct uart_class *class; phandle_t node, chosen; pcell_t shift, br, rclk; @@ -160,24 +194,32 @@ uart_cpu_getdev(int devtype, struct uart * Retrieve serial attributes. */ uart_fdt_get_shift(node, &shift); - if (OF_getprop(node, "current-speed", &br, sizeof(br)) <= 0) br = 0; - br = fdt32_to_cpu(br); + else + br = fdt32_to_cpu(br); - if ((err = uart_fdt_get_clock(node, &rclk)) != 0) - return (err); /* - * Finalize configuration. + * Check old style of UART definition first. Unfortunately, the common + * FDT processing is not possible if we have clock, power domains and + * pinmux stuff. */ - for (cd = uart_fdt_compat_data; cd->ocd_str != NULL; ++cd) { - if (fdt_is_compatible(node, cd->ocd_str)) - break; + class = (struct uart_class *)uart_fdt_find_by_node(node, 0); + if (class != NULL) { + if ((err = uart_fdt_get_clock(node, &rclk)) != 0) + return (err); + } else { + /* Check class only linker set */ + class = + (struct uart_class *)uart_fdt_find_by_node(node, 1); + if (class == NULL) + return (ENXIO); + rclk = 0; } - if (cd->ocd_str == NULL) - return (ENXIO); - class = (struct uart_class *)cd->ocd_data; + /* + * Finalize configuration. + */ di->bas.chan = 0; di->bas.regshft = (u_int)shift; di->baudrate = br; Copied: stable/10/sys/dev/uart/uart_cpu_fdt.h (from r279723, head/sys/dev/uart/uart_cpu_fdt.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/uart/uart_cpu_fdt.h Sat May 23 20:54:25 2015 (r283327, copy of r279723, head/sys/dev/uart/uart_cpu_fdt.h) @@ -0,0 +1,54 @@ +/*- + * Copyright 2015 Michal Meloun + * 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 _DEV_UART_CPU_FDT_H_ +#define _DEV_UART_CPU_FDT_H_ + +#include + +#include + +/* + * If your UART driver implements only uart_class and uses uart_cpu_fdt.c + * for device instantiation, then use UART_FDT_CLASS_AND_DEVICE for its + * declaration + */ +SET_DECLARE(uart_fdt_class_and_device_set, struct ofw_compat_data ); +#define UART_FDT_CLASS_AND_DEVICE(data) \ + DATA_SET(uart_fdt_class_and_device_set, data) + +/* + * If your UART driver implements uart_class and custom device layer, + * then use UART_FDT_CLASS for its declaration + */ +SET_DECLARE(uart_fdt_class_set, struct ofw_compat_data ); +#define UART_FDT_CLASS(data) \ + DATA_SET(uart_fdt_class_set, data) + + +#endif /* _DEV_UART_CPU_FDT_H_ */ Modified: stable/10/sys/dev/uart/uart_dev_imx.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_imx.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/dev/uart/uart_dev_imx.c Sat May 23 20:54:25 2015 (r283327) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include "uart_if.h" @@ -291,7 +292,7 @@ static kobj_method_t imx_uart_methods[] { 0, 0 } }; -struct uart_class uart_imx_class = { +static struct uart_class uart_imx_class = { "imx", imx_uart_methods, sizeof(struct imx_uart_softc), @@ -300,6 +301,18 @@ struct uart_class uart_imx_class = { .uc_rclk = 24000000 /* TODO: get value from CCM */ }; +static struct ofw_compat_data compat_data[] = { + {"fsl,imx6q-uart", (uintptr_t)&uart_imx_class}, + {"fsl,imx53-uart", (uintptr_t)&uart_imx_class}, + {"fsl,imx51-uart", (uintptr_t)&uart_imx_class}, + {"fsl,imx31-uart", (uintptr_t)&uart_imx_class}, + {"fsl,imx27-uart", (uintptr_t)&uart_imx_class}, + {"fsl,imx25-uart", (uintptr_t)&uart_imx_class}, + {"fsl,imx21-uart", (uintptr_t)&uart_imx_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(compat_data); + #define SIGCHG(c, i, s, d) \ if (c) { \ i |= (i & s) ? s : s | d; \ Modified: stable/10/sys/dev/uart/uart_dev_lpc.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_lpc.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/dev/uart/uart_dev_lpc.c Sat May 23 20:54:25 2015 (r283327) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -421,7 +422,7 @@ static kobj_method_t lpc_ns8250_methods[ { 0, 0 } }; -struct uart_class uart_lpc_class = { +static struct uart_class uart_lpc_class = { "lpc_ns8250", lpc_ns8250_methods, sizeof(struct lpc_ns8250_softc), @@ -430,6 +431,12 @@ struct uart_class uart_lpc_class = { .uc_rclk = DEFAULT_RCLK }; +static struct ofw_compat_data compat_data[] = { + {"lpc,uart", (uintptr_t)&uart_lpc_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(compat_data); + #define SIGCHG(c, i, s, d) \ if (c) { \ i |= (i & s) ? s : s | d; \ Modified: stable/10/sys/dev/uart/uart_dev_msm.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_msm.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/dev/uart/uart_dev_msm.c Sat May 23 20:54:25 2015 (r283327) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -558,7 +559,7 @@ msm_bus_ungrab(struct uart_softc *sc) uart_unlock(sc->sc_hwmtx); } -struct uart_class uart_msm_class = { +static struct uart_class uart_msm_class = { "msm", msm_methods, sizeof(struct msm_uart_softc), @@ -566,3 +567,9 @@ struct uart_class uart_msm_class = { .uc_range = 8, .uc_rclk = DEF_CLK, }; + +static struct ofw_compat_data compat_data[] = { + {"qcom,msm-uartdm", (uintptr_t)&uart_msm_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(compat_data); Modified: stable/10/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_ns8250.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/dev/uart/uart_dev_ns8250.c Sat May 23 20:54:25 2015 (r283327) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#endif #include #include @@ -379,6 +382,14 @@ struct uart_class uart_ns8250_class = { .uc_rclk = DEFAULT_RCLK }; +#ifdef FDT +static struct ofw_compat_data compat_data[] = { + {"ns16550", (uintptr_t)&uart_ns8250_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(compat_data); +#endif + #define SIGCHG(c, i, s, d) \ if (c) { \ i |= (i & s) ? s : s | d; \ Modified: stable/10/sys/dev/uart/uart_dev_pl011.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_pl011.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/dev/uart/uart_dev_pl011.c Sat May 23 20:54:25 2015 (r283327) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "uart_if.h" @@ -266,7 +267,7 @@ static kobj_method_t uart_pl011_methods[ { 0, 0 } }; -struct uart_class uart_pl011_class = { +static struct uart_class uart_pl011_class = { "uart_pl011", uart_pl011_methods, sizeof(struct uart_pl011_softc), @@ -275,6 +276,12 @@ struct uart_class uart_pl011_class = { .uc_rclk = 0 }; +static struct ofw_compat_data compat_data[] = { + {"arm,pl011", (uintptr_t)&uart_pl011_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(compat_data); + static int uart_pl011_bus_attach(struct uart_softc *sc) { Modified: stable/10/sys/dev/uart/uart_dev_ti8250.c ============================================================================== --- stable/10/sys/dev/uart/uart_dev_ti8250.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/dev/uart/uart_dev_ti8250.c Sat May 23 20:54:25 2015 (r283327) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -130,7 +131,7 @@ static kobj_method_t ti8250_methods[] = KOBJMETHOD_END }; -struct uart_class uart_ti8250_class = { +static struct uart_class uart_ti8250_class = { "ti8250", ti8250_methods, sizeof(struct ti8250_softc), @@ -138,4 +139,8 @@ struct uart_class uart_ti8250_class = { .uc_range = 0x88, .uc_rclk = 48000000 }; - +static struct ofw_compat_data compat_data[] = { + {"ti,ns16550", (uintptr_t)&uart_ti8250_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(compat_data); Modified: stable/10/sys/dev/uart/uart_subr.c ============================================================================== --- stable/10/sys/dev/uart/uart_subr.c Sat May 23 20:53:19 2015 (r283326) +++ stable/10/sys/dev/uart/uart_subr.c Sat May 23 20:54:25 2015 (r283327) @@ -53,7 +53,6 @@ static struct uart_class *uart_classes[] &uart_sab82532_class, &uart_z8530_class, #if defined(__arm__) - &uart_lpc_class, &uart_s3c2410_class, #endif }; From owner-svn-src-all@FreeBSD.ORG Sat May 23 21:04:16 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 21:12:52 2015 Return-Path: Delivered-To: svn-src-all@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 A105D4E3; Sat, 23 May 2015 21:12: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 8EAD91E76; Sat, 23 May 2015 21:12: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 t4NLCq1x096427; Sat, 23 May 2015 21:12:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NLCqdE096426; Sat, 23 May 2015 21:12:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232112.t4NLCqdE096426@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 21:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283329 - stable/10/sys/arm/ti X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 21:12:52 -0000 Author: ian Date: Sat May 23 21:12:51 2015 New Revision: 283329 URL: https://svnweb.freebsd.org/changeset/base/283329 Log: MFC r276021, r279766: Reduce the diff in the Ti aintc between head and arm_intrng Fix spurious interrupts on arm am335x (beaglebone), by doing the EOI in both the post-filter and post-thread callbacks. Modified: stable/10/sys/arm/ti/aintc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/aintc.c ============================================================================== --- stable/10/sys/arm/ti/aintc.c Sat May 23 21:04:15 2015 (r283328) +++ stable/10/sys/arm/ti/aintc.c Sat May 23 21:12:51 2015 (r283329) @@ -72,12 +72,20 @@ static struct resource_spec ti_aintc_spe static struct ti_aintc_softc *ti_aintc_sc = NULL; -#define aintc_read_4(reg) \ - bus_space_read_4(ti_aintc_sc->aintc_bst, ti_aintc_sc->aintc_bsh, reg) -#define aintc_write_4(reg, val) \ - bus_space_write_4(ti_aintc_sc->aintc_bst, ti_aintc_sc->aintc_bsh, reg, val) +#define aintc_read_4(_sc, reg) \ + bus_space_read_4((_sc)->aintc_bst, (_sc)->aintc_bsh, (reg)) +#define aintc_write_4(_sc, reg, val) \ + bus_space_write_4((_sc)->aintc_bst, (_sc)->aintc_bsh, (reg), (val)) +static void +aintc_post_filter(void *arg) +{ + + arm_irq_memory_barrier(0); + aintc_write_4(ti_aintc_sc, INTC_CONTROL, 1); /* EOI */ +} + static int ti_aintc_probe(device_t dev) { @@ -112,17 +120,19 @@ ti_aintc_attach(device_t dev) ti_aintc_sc = sc; - x = aintc_read_4(INTC_REVISION); + x = aintc_read_4(sc, INTC_REVISION); device_printf(dev, "Revision %u.%u\n",(x >> 4) & 0xF, x & 0xF); /* SoftReset */ - aintc_write_4(INTC_SYSCONFIG, 2); + aintc_write_4(sc, INTC_SYSCONFIG, 2); /* Wait for reset to complete */ - while(!(aintc_read_4(INTC_SYSSTATUS) & 1)); + while(!(aintc_read_4(sc, INTC_SYSSTATUS) & 1)); /*Set Priority Threshold */ - aintc_write_4(INTC_THRESHOLD, 0xFF); + aintc_write_4(sc, INTC_THRESHOLD, 0xFF); + + arm_post_filter = aintc_post_filter; return (0); } @@ -146,22 +156,17 @@ DRIVER_MODULE(aintc, simplebus, ti_aintc int arm_get_next_irq(int last_irq) { + struct ti_aintc_softc *sc = ti_aintc_sc; uint32_t active_irq; - if (last_irq != -1) { - aintc_write_4(INTC_ISR_CLEAR(last_irq >> 5), - 1UL << (last_irq & 0x1F)); - aintc_write_4(INTC_CONTROL,1); - } - /* Get the next active interrupt */ - active_irq = aintc_read_4(INTC_SIR_IRQ); + active_irq = aintc_read_4(sc, INTC_SIR_IRQ); /* Check for spurious interrupt */ if ((active_irq & 0xffffff80)) { - device_printf(ti_aintc_sc->sc_dev, - "Spurious interrupt detected (0x%08x)\n", active_irq); - aintc_write_4(INTC_SIR_IRQ, 0); + device_printf(sc->sc_dev, + "Spurious interrupt detected (0x%08x)\n", active_irq); + aintc_write_4(sc, INTC_SIR_IRQ, 0); return -1; } @@ -174,13 +179,17 @@ arm_get_next_irq(int last_irq) void arm_mask_irq(uintptr_t nb) { - aintc_write_4(INTC_MIR_SET(nb >> 5), (1UL << (nb & 0x1F))); + struct ti_aintc_softc *sc = ti_aintc_sc; + + aintc_write_4(sc, INTC_MIR_SET(nb >> 5), (1UL << (nb & 0x1F))); + aintc_write_4(sc, INTC_CONTROL, 1); /* EOI */ } void arm_unmask_irq(uintptr_t nb) { + struct ti_aintc_softc *sc = ti_aintc_sc; arm_irq_memory_barrier(nb); - aintc_write_4(INTC_MIR_CLEAR(nb >> 5), (1UL << (nb & 0x1F))); + aintc_write_4(sc, INTC_MIR_CLEAR(nb >> 5), (1UL << (nb & 0x1F))); } From owner-svn-src-all@FreeBSD.ORG Sat May 23 21:58:42 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 21:59:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 22:28:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@FreeBSD.ORG Sat May 23 22:33:07 2015 Return-Path: Delivered-To: svn-src-all@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 C28335CC; Sat, 23 May 2015 22:33: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 9673816A3; Sat, 23 May 2015 22:33: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 t4NMX723036593; Sat, 23 May 2015 22:33:07 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NMX6SH036584; Sat, 23 May 2015 22:33:06 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232233.t4NMX6SH036584@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 22:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283332 - in stable/10/sys: arm/arm arm/mv dev/ofw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 22:33:07 -0000 Author: ian Date: Sat May 23 22:33:06 2015 New Revision: 283332 URL: https://svnweb.freebsd.org/changeset/base/283332 Log: MFC r274249, r274484, r275583: Avoid panic in ofwbus caused by not released resource list entry Fix typo in ARM GIC device_printf() Fix buffer overflow in Marvell PCI/PCIe driver Modified: stable/10/sys/arm/arm/gic.c stable/10/sys/arm/mv/mv_pci.c stable/10/sys/dev/ofw/ofwbus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/gic.c ============================================================================== --- stable/10/sys/arm/arm/gic.c Sat May 23 22:28:59 2015 (r283331) +++ stable/10/sys/arm/arm/gic.c Sat May 23 22:33:06 2015 (r283332) @@ -273,7 +273,7 @@ arm_gic_attach(device_t dev) arm_config_irq = gic_config_irq; icciidr = gic_c_read_4(GICC_IIDR); - device_printf(dev,"pn 0x%x, arch 0x%x, rev 0x%x, implementer 0x%x sc->nirqs %u\n", + device_printf(dev,"pn 0x%x, arch 0x%x, rev 0x%x, implementer 0x%x irqs %u\n", icciidr>>20, (icciidr>>16) & 0xF, (icciidr>>12) & 0xf, (icciidr & 0xfff), sc->nirqs); Modified: stable/10/sys/arm/mv/mv_pci.c ============================================================================== --- stable/10/sys/arm/mv/mv_pci.c Sat May 23 22:28:59 2015 (r283331) +++ stable/10/sys/arm/mv/mv_pci.c Sat May 23 22:33:06 2015 (r283332) @@ -1171,7 +1171,7 @@ mv_pcib_alloc_msi(device_t dev, device_t for (i = start; i < start + count; i++) { setbit(&sc->sc_msi_bitmap, i); - irqs[i] = MSI_IRQ + i; + *irqs++ = MSI_IRQ + i; } debugf("%s: start: %x count: %x\n", __func__, start, count); Modified: stable/10/sys/dev/ofw/ofwbus.c ============================================================================== --- stable/10/sys/dev/ofw/ofwbus.c Sat May 23 22:28:59 2015 (r283331) +++ stable/10/sys/dev/ofw/ofwbus.c Sat May 23 22:33:06 2015 (r283332) @@ -399,11 +399,17 @@ ofwbus_adjust_resource(device_t bus, dev } static int -ofwbus_release_resource(device_t bus __unused, device_t child, int type, +ofwbus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { + struct resource_list_entry *rle; int error; + /* Clean resource list entry */ + rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), type, rid); + if (rle != NULL) + rle->res = NULL; + if ((rman_get_flags(r) & RF_ACTIVE) != 0) { error = bus_deactivate_resource(child, type, rid, r); if (error) From owner-svn-src-all@FreeBSD.ORG Sat May 23 22:34:26 2015 Return-Path: Delivered-To: svn-src-all@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 4B7CF730; Sat, 23 May 2015 22:34: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 39E0B16AF; Sat, 23 May 2015 22:34: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 t4NMYQls036838; Sat, 23 May 2015 22:34:26 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NMYQnD036837; Sat, 23 May 2015 22:34:26 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232234.t4NMYQnD036837@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 22:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283333 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 22:34:26 -0000 Author: ian Date: Sat May 23 22:34:25 2015 New Revision: 283333 URL: https://svnweb.freebsd.org/changeset/base/283333 Log: MFC r274711: Stop using early_putc immediately after configuring console with cninit() Modified: stable/10/sys/kern/kern_cons.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_cons.c ============================================================================== --- stable/10/sys/kern/kern_cons.c Sat May 23 22:33:06 2015 (r283332) +++ stable/10/sys/kern/kern_cons.c Sat May 23 22:34:25 2015 (r283333) @@ -156,6 +156,13 @@ cninit(void) * Make the best console the preferred console. */ cnselect(best_cn); + +#ifdef EARLY_PRINTF + /* + * Release early console. + */ + early_putc = NULL; +#endif } void From owner-svn-src-all@FreeBSD.ORG Sat May 23 22:36:43 2015 Return-Path: Delivered-To: svn-src-all@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 BCB7087B; Sat, 23 May 2015 22:36: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 AAA7316C1; Sat, 23 May 2015 22:36: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 t4NMahlU037214; Sat, 23 May 2015 22:36:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NMagtZ037207; Sat, 23 May 2015 22:36:42 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232236.t4NMagtZ037207@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 22:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283334 - in stable/10/sys: arm/arm dev/fdt dev/ofw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 22:36:43 -0000 Author: ian Date: Sat May 23 22:36:41 2015 New Revision: 283334 URL: https://svnweb.freebsd.org/changeset/base/283334 Log: MFC r277098, r279235: Introduce ofw_bus_reg_to_rl() to replace part of common bus code Fix endianness on FDT read in ARM GIC Modified: stable/10/sys/arm/arm/gic.c stable/10/sys/dev/fdt/simplebus.c stable/10/sys/dev/ofw/ofw_bus_subr.c stable/10/sys/dev/ofw/ofw_bus_subr.h stable/10/sys/dev/ofw/ofwbus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/gic.c ============================================================================== --- stable/10/sys/arm/arm/gic.c Sat May 23 22:34:25 2015 (r283333) +++ stable/10/sys/arm/arm/gic.c Sat May 23 22:36:41 2015 (r283334) @@ -204,7 +204,7 @@ gic_decode_fdt(uint32_t iparent, uint32_ *trig = INTR_TRIGGER_CONFORM; *pol = INTR_POLARITY_CONFORM; } else { - if (intr[0] == 0) + if (fdt32_to_cpu(intr[0]) == 0) *interrupt = fdt32_to_cpu(intr[1]) + GIC_FIRST_SPI; else *interrupt = fdt32_to_cpu(intr[1]) + GIC_FIRST_PPI; @@ -216,13 +216,13 @@ gic_decode_fdt(uint32_t iparent, uint32_ * 8 = active low level-sensitive * The hardware only supports active-high-level or rising-edge. */ - if (intr[2] & 0x0a) { + if (fdt32_to_cpu(intr[2]) & 0x0a) { printf("unsupported trigger/polarity configuration " - "0x%2x\n", intr[2] & 0x0f); + "0x%2x\n", fdt32_to_cpu(intr[2]) & 0x0f); return (ENOTSUP); } *pol = INTR_POLARITY_CONFORM; - if (intr[2] & 0x01) + if (fdt32_to_cpu(intr[2]) & 0x01) *trig = INTR_TRIGGER_EDGE; else *trig = INTR_TRIGGER_LEVEL; Modified: stable/10/sys/dev/fdt/simplebus.c ============================================================================== --- stable/10/sys/dev/fdt/simplebus.c Sat May 23 22:34:25 2015 (r283333) +++ stable/10/sys/dev/fdt/simplebus.c Sat May 23 22:36:41 2015 (r283334) @@ -253,10 +253,6 @@ simplebus_setup_dinfo(device_t dev, phan { struct simplebus_softc *sc; struct simplebus_devinfo *ndi; - uint32_t *reg; - uint64_t phys, size; - int i, j, k; - int nreg; sc = device_get_softc(dev); @@ -267,32 +263,7 @@ simplebus_setup_dinfo(device_t dev, phan } resource_list_init(&ndi->rl); - nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); - if (nreg == -1) - nreg = 0; - if (nreg % (sc->acells + sc->scells) != 0) { - if (bootverbose) - device_printf(dev, "Malformed reg property on <%s>\n", - ndi->obdinfo.obd_name); - nreg = 0; - } - - for (i = 0, k = 0; i < nreg; i += sc->acells + sc->scells, k++) { - phys = size = 0; - for (j = 0; j < sc->acells; j++) { - phys <<= 32; - phys |= reg[i + j]; - } - for (j = 0; j < sc->scells; j++) { - size <<= 32; - size |= reg[i + sc->acells + j]; - } - - resource_list_add(&ndi->rl, SYS_RES_MEMORY, k, - phys, phys + size - 1, size); - } - free(reg, M_OFWPROP); - + ofw_bus_reg_to_rl(dev, node, sc->acells, sc->scells, &ndi->rl); ofw_bus_intr_to_rl(dev, node, &ndi->rl); return (ndi); Modified: stable/10/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_subr.c Sat May 23 22:34:25 2015 (r283333) +++ stable/10/sys/dev/ofw/ofw_bus_subr.c Sat May 23 22:36:41 2015 (r283334) @@ -370,6 +370,54 @@ ofw_bus_search_intrmap(void *intr, int i } int +ofw_bus_reg_to_rl(device_t dev, phandle_t node, pcell_t acells, pcell_t scells, + struct resource_list *rl) +{ + uint64_t phys, size; + ssize_t i, j, rid, nreg, ret; + uint32_t *reg; + char *name; + + /* + * This may be just redundant when having ofw_bus_devinfo + * but makes this routine independent of it. + */ + ret = OF_getencprop_alloc(node, "name", sizeof(*name), (void **)&name); + if (ret == -1) + name = NULL; + + ret = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); + nreg = (ret == -1) ? 0 : ret; + + if (nreg % (acells + scells) != 0) { + if (bootverbose) + device_printf(dev, "Malformed reg property on <%s>\n", + (name == NULL) ? "unknown" : name); + nreg = 0; + } + + for (i = 0, rid = 0; i < nreg; i += acells + scells, rid++) { + phys = size = 0; + for (j = 0; j < acells; j++) { + phys <<= 32; + phys |= reg[i + j]; + } + for (j = 0; j < scells; j++) { + size <<= 32; + size |= reg[i + acells + j]; + } + /* Skip the dummy reg property of glue devices like ssm(4). */ + if (size != 0) + resource_list_add(rl, SYS_RES_MEMORY, rid, + phys, phys + size - 1, size); + } + free(name, M_OFWPROP); + free(reg, M_OFWPROP); + + return (0); +} + +int ofw_bus_intr_to_rl(device_t dev, phandle_t node, struct resource_list *rl) { phandle_t iparent; Modified: stable/10/sys/dev/ofw/ofw_bus_subr.h ============================================================================== --- stable/10/sys/dev/ofw/ofw_bus_subr.h Sat May 23 22:34:25 2015 (r283333) +++ stable/10/sys/dev/ofw/ofw_bus_subr.h Sat May 23 22:36:41 2015 (r283334) @@ -73,6 +73,8 @@ int ofw_bus_search_intrmap(void *, int, void *, void *, int, phandle_t *); /* Routines for parsing device-tree data into resource lists. */ +int ofw_bus_reg_to_rl(device_t, phandle_t, pcell_t, pcell_t, + struct resource_list *); int ofw_bus_intr_to_rl(device_t, phandle_t, struct resource_list *); /* Helper to get device status property */ Modified: stable/10/sys/dev/ofw/ofwbus.c ============================================================================== --- stable/10/sys/dev/ofw/ofwbus.c Sat May 23 22:34:25 2015 (r283333) +++ stable/10/sys/dev/ofw/ofwbus.c Sat May 23 22:36:41 2015 (r283334) @@ -442,10 +442,6 @@ ofwbus_setup_dinfo(device_t dev, phandle struct ofwbus_softc *sc; struct ofwbus_devinfo *ndi; const char *nodename; - uint32_t *reg; - uint64_t phys, size; - int i, j, rid; - int nreg; sc = device_get_softc(dev); @@ -462,33 +458,7 @@ ofwbus_setup_dinfo(device_t dev, phandle } resource_list_init(&ndi->ndi_rl); - nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); - if (nreg == -1) - nreg = 0; - if (nreg % (sc->acells + sc->scells) != 0) { - if (bootverbose) - device_printf(dev, "Malformed reg property on <%s>\n", - nodename); - nreg = 0; - } - - for (i = 0, rid = 0; i < nreg; i += sc->acells + sc->scells, rid++) { - phys = size = 0; - for (j = 0; j < sc->acells; j++) { - phys <<= 32; - phys |= reg[i + j]; - } - for (j = 0; j < sc->scells; j++) { - size <<= 32; - size |= reg[i + sc->acells + j]; - } - /* Skip the dummy reg property of glue devices like ssm(4). */ - if (size != 0) - resource_list_add(&ndi->ndi_rl, SYS_RES_MEMORY, rid, - phys, phys + size - 1, size); - } - free(reg, M_OFWPROP); - + ofw_bus_reg_to_rl(dev, node, sc->acells, sc->scells, &ndi->ndi_rl); ofw_bus_intr_to_rl(dev, node, &ndi->ndi_rl); return (ndi); From owner-svn-src-all@FreeBSD.ORG Sat May 23 22:48:56 2015 Return-Path: Delivered-To: svn-src-all@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 96877A5E; Sat, 23 May 2015 22:48: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 77A5017A5; Sat, 23 May 2015 22:48: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 t4NMmuiU042406; Sat, 23 May 2015 22:48:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NMmtqi042400; Sat, 23 May 2015 22:48:55 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232248.t4NMmtqi042400@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 22:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283335 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 22:48:56 -0000 Author: ian Date: Sat May 23 22:48:54 2015 New Revision: 283335 URL: https://svnweb.freebsd.org/changeset/base/283335 Log: MFC r278518: Resolve cache line size from CP15 instead of hard-coded 32. Modified: stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/arm/elf_trampoline.c stable/10/sys/arm/include/armreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Sat May 23 22:36:41 2015 (r283334) +++ stable/10/sys/arm/arm/cpufunc.c Sat May 23 22:48:54 2015 (r283335) @@ -837,6 +837,11 @@ u_int cpu_reset_needs_v4_MMU_disable; /* defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ defined(CPU_CORTEXA) || defined(CPU_KRAIT) +/* Global cache line sizes, use 32 as default */ +int arm_dcache_min_line_size = 32; +int arm_icache_min_line_size = 32; +int arm_idcache_min_line_size = 32; + static void get_cachetype_cp15(void); /* Additional cache information local to this file. Log2 of some of the @@ -868,6 +873,12 @@ get_cachetype_cp15() goto out; if (CPU_CT_FORMAT(ctype) == CPU_CT_ARMV7) { + /* Resolve minimal cache line sizes */ + arm_dcache_min_line_size = 1 << (CPU_CT_DMINLINE(ctype) + 2); + arm_icache_min_line_size = 1 << (CPU_CT_IMINLINE(ctype) + 2); + arm_idcache_min_line_size = + min(arm_icache_min_line_size, arm_dcache_min_line_size); + __asm __volatile("mrc p15, 1, %0, c0, c0, 1" : "=r" (clevel)); arm_cache_level = clevel; Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 23 22:36:41 2015 (r283334) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 23 22:48:54 2015 (r283335) @@ -41,6 +41,12 @@ __FBSDID("$FreeBSD$"); .word _C_LABEL(arm_cache_loc) .Lcache_type: .word _C_LABEL(arm_cache_type) +.Larmv7_dcache_line_size: + .word _C_LABEL(arm_dcache_min_line_size) +.Larmv7_icache_line_size: + .word _C_LABEL(arm_icache_min_line_size) +.Larmv7_idcache_line_size: + .word _C_LABEL(arm_idcache_min_line_size) .Lway_mask: .word 0x3ff .Lmax_index: @@ -176,14 +182,9 @@ ENTRY(armv7_idcache_wbinv_all) RET END(armv7_idcache_wbinv_all) -/* XXX Temporary set it to 32 for MV cores, however this value should be - * get from Cache Type register - */ -.Larmv7_line_size: - .word 32 - ENTRY(armv7_dcache_wb_range) - ldr ip, .Larmv7_line_size + ldr ip, .Larmv7_dcache_line_size + ldr ip, [ip] sub r3, ip, #1 and r2, r0, r3 add r1, r1, r2 @@ -198,7 +199,8 @@ ENTRY(armv7_dcache_wb_range) END(armv7_dcache_wb_range) ENTRY(armv7_dcache_wbinv_range) - ldr ip, .Larmv7_line_size + ldr ip, .Larmv7_dcache_line_size + ldr ip, [ip] sub r3, ip, #1 and r2, r0, r3 add r1, r1, r2 @@ -217,7 +219,8 @@ END(armv7_dcache_wbinv_range) * must use wb-inv of the entire cache. */ ENTRY(armv7_dcache_inv_range) - ldr ip, .Larmv7_line_size + ldr ip, .Larmv7_dcache_line_size + ldr ip, [ip] sub r3, ip, #1 and r2, r0, r3 add r1, r1, r2 @@ -232,7 +235,8 @@ ENTRY(armv7_dcache_inv_range) END(armv7_dcache_inv_range) ENTRY(armv7_idcache_wbinv_range) - ldr ip, .Larmv7_line_size + ldr ip, .Larmv7_idcache_line_size + ldr ip, [ip] sub r3, ip, #1 and r2, r0, r3 add r1, r1, r2 @@ -260,7 +264,8 @@ ENTRY_NP(armv7_icache_sync_all) END(armv7_icache_sync_all) ENTRY_NP(armv7_icache_sync_range) - ldr ip, .Larmv7_line_size + ldr ip, .Larmv7_icache_line_size + ldr ip, [ip] .Larmv7_sync_next: mcr CP15_ICIMVAU(r0) mcr CP15_DCCMVAC(r0) Modified: stable/10/sys/arm/arm/elf_trampoline.c ============================================================================== --- stable/10/sys/arm/arm/elf_trampoline.c Sat May 23 22:36:41 2015 (r283334) +++ stable/10/sys/arm/arm/elf_trampoline.c Sat May 23 22:48:54 2015 (r283335) @@ -115,6 +115,10 @@ int arm_pcache_unified; int arm_dcache_align; int arm_dcache_align_mask; +int arm_dcache_min_line_size = 32; +int arm_icache_min_line_size = 32; +int arm_idcache_min_line_size = 32; + u_int arm_cache_level; u_int arm_cache_type[14]; u_int arm_cache_loc; @@ -277,6 +281,13 @@ get_cachetype_cp15() goto out; if (CPU_CT_FORMAT(ctype) == CPU_CT_ARMV7) { + /* Resolve minimal cache line sizes */ + arm_dcache_min_line_size = 1 << (CPU_CT_DMINLINE(ctype) + 2); + arm_icache_min_line_size = 1 << (CPU_CT_IMINLINE(ctype) + 2); + arm_idcache_min_line_size = + (arm_dcache_min_line_size > arm_icache_min_line_size ? + arm_icache_min_line_size : arm_dcache_min_line_size); + __asm __volatile("mrc p15, 1, %0, c0, c0, 1" : "=r" (clevel)); arm_cache_level = clevel; Modified: stable/10/sys/arm/include/armreg.h ============================================================================== --- stable/10/sys/arm/include/armreg.h Sat May 23 22:36:41 2015 (r283334) +++ stable/10/sys/arm/include/armreg.h Sat May 23 22:48:54 2015 (r283335) @@ -318,6 +318,9 @@ #define CPU_CT_S (1U << 24) /* split cache */ #define CPU_CT_CTYPE(x) (((x) >> 25) & 0xf) /* cache type */ #define CPU_CT_FORMAT(x) ((x) >> 29) +/* Cache type register definitions for ARM v7 */ +#define CPU_CT_IMINLINE(x) ((x) & 0xf) /* I$ min line size */ +#define CPU_CT_DMINLINE(x) (((x) >> 16) & 0xf) /* D$ min line size */ #define CPU_CT_CTYPE_WT 0 /* write-through */ #define CPU_CT_CTYPE_WB1 1 /* write-back, clean w/ read */ From owner-svn-src-all@FreeBSD.ORG Sat May 23 23:05:33 2015 Return-Path: Delivered-To: svn-src-all@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 E6B7FE4F; Sat, 23 May 2015 23:05: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 D484B1968; Sat, 23 May 2015 23:05: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 t4NN5X5U052066; Sat, 23 May 2015 23:05:33 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NN5WCe052056; Sat, 23 May 2015 23:05:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232305.t4NN5WCe052056@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 23:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283336 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 23:05:34 -0000 Author: ian Date: Sat May 23 23:05:31 2015 New Revision: 283336 URL: https://svnweb.freebsd.org/changeset/base/283336 Log: MFC r279810, r279811: Clean data cache before instruction cache in armv7_icache_sync_range(). Add minimum cache line sizes to struct cpuinfo, use them in the new cache maintenance routines. Also add a routine to invalidate the branch cache. Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/arm/cpuinfo.c stable/10/sys/arm/arm/genassym.c stable/10/sys/arm/include/cpu-v6.h stable/10/sys/arm/include/cpuinfo.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 23 22:48:54 2015 (r283335) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Sat May 23 23:05:31 2015 (r283336) @@ -247,8 +247,8 @@ ENTRY(armv7_idcache_wbinv_range) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_id_wbinv_next - isb /* instruction synchronization barrier */ dsb /* data synchronization barrier */ + isb /* instruction synchronization barrier */ RET END(armv7_idcache_wbinv_range) @@ -258,8 +258,8 @@ ENTRY_NP(armv7_icache_sync_all) #else mcr CP15_ICIALLU #endif - isb /* instruction synchronization barrier */ dsb /* data synchronization barrier */ + isb /* instruction synchronization barrier */ RET END(armv7_icache_sync_all) @@ -267,13 +267,13 @@ ENTRY_NP(armv7_icache_sync_range) ldr ip, .Larmv7_icache_line_size ldr ip, [ip] .Larmv7_sync_next: - mcr CP15_ICIMVAU(r0) mcr CP15_DCCMVAC(r0) + mcr CP15_ICIMVAU(r0) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_sync_next - isb /* instruction synchronization barrier */ dsb /* data synchronization barrier */ + isb /* instruction synchronization barrier */ RET END(armv7_icache_sync_range) Modified: stable/10/sys/arm/arm/cpuinfo.c ============================================================================== --- stable/10/sys/arm/arm/cpuinfo.c Sat May 23 22:48:54 2015 (r283335) +++ stable/10/sys/arm/arm/cpuinfo.c Sat May 23 23:05:31 2015 (r283336) @@ -34,7 +34,14 @@ __FBSDID("$FreeBSD$"); #include #include -struct cpuinfo cpuinfo; +struct cpuinfo cpuinfo = +{ + /* Use safe defaults for start */ + .dcache_line_size = 32, + .dcache_line_mask = 31, + .icache_line_size = 32, + .icache_line_mask = 31, +}; /* Read and parse CPU id scheme */ void @@ -122,4 +129,10 @@ cpuinfo_init(void) cpuinfo.generic_timer_ext = (cpuinfo.id_pfr1 >> 16) & 0xF; cpuinfo.virtualization_ext = (cpuinfo.id_pfr1 >> 12) & 0xF; cpuinfo.security_ext = (cpuinfo.id_pfr1 >> 4) & 0xF; + + /* L1 Cache sizes */ + cpuinfo.dcache_line_size = 1 << (CPU_CT_DMINLINE(cpuinfo.ctr ) + 2); + cpuinfo.dcache_line_mask = cpuinfo.dcache_line_size - 1; + cpuinfo.icache_line_size= 1 << (CPU_CT_IMINLINE(cpuinfo.ctr ) + 2); + cpuinfo.icache_line_mask = cpuinfo.icache_line_size - 1; } Modified: stable/10/sys/arm/arm/genassym.c ============================================================================== --- stable/10/sys/arm/arm/genassym.c Sat May 23 22:48:54 2015 (r283335) +++ stable/10/sys/arm/arm/genassym.c Sat May 23 23:05:31 2015 (r283336) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -146,3 +147,8 @@ ASSYM(MAXCOMLEN, MAXCOMLEN); ASSYM(MAXCPU, MAXCPU); ASSYM(NIRQ, NIRQ); ASSYM(PCPU_SIZE, sizeof(struct pcpu)); + +ASSYM(DCACHE_LINE_SIZE, offsetof(struct cpuinfo, dcache_line_size)); +ASSYM(DCACHE_LINE_MASK, offsetof(struct cpuinfo, dcache_line_mask)); +ASSYM(ICACHE_LINE_SIZE, offsetof(struct cpuinfo, icache_line_size)); +ASSYM(ICACHE_LINE_MASK, offsetof(struct cpuinfo, icache_line_mask)); Modified: stable/10/sys/arm/include/cpu-v6.h ============================================================================== --- stable/10/sys/arm/include/cpu-v6.h Sat May 23 22:48:54 2015 (r283335) +++ stable/10/sys/arm/include/cpu-v6.h Sat May 23 23:05:31 2015 (r283336) @@ -37,6 +37,9 @@ #define CPU_ASID_KERNEL 0 +vm_offset_t dcache_wb_pou_checked(vm_offset_t, vm_size_t); +vm_offset_t icache_inv_pou_checked(vm_offset_t, vm_size_t); + /* * Macros to generate CP15 (system control processor) read/write functions. */ @@ -295,7 +298,7 @@ icache_sync(vm_offset_t sva, vm_size_t s vm_offset_t eva = sva + size; dsb(); - for (va = sva; va < eva; va += arm_dcache_align) { + for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP _CP15_DCCMVAU(va); #else @@ -325,6 +328,19 @@ icache_inv_all(void) isb(); } +/* Invalidate branch predictor buffer */ +static __inline void +bpb_inv_all(void) +{ +#if __ARM_ARCH >= 7 && defined SMP + _CP15_BPIALLIS(); +#else + _CP15_BPIALL(); +#endif + dsb(); + isb(); +} + /* Write back D-cache to PoU */ static __inline void dcache_wb_pou(vm_offset_t sva, vm_size_t size) @@ -333,7 +349,7 @@ dcache_wb_pou(vm_offset_t sva, vm_size_t vm_offset_t eva = sva + size; dsb(); - for (va = sva; va < eva; va += arm_dcache_align) { + for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP _CP15_DCCMVAU(va); #else @@ -351,7 +367,7 @@ dcache_inv_poc(vm_offset_t sva, vm_paddr vm_offset_t eva = sva + size; /* invalidate L1 first */ - for (va = sva; va < eva; va += arm_dcache_align) { + for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { _CP15_DCIMVAC(va); } dsb(); @@ -361,7 +377,7 @@ dcache_inv_poc(vm_offset_t sva, vm_paddr dsb(); /* then L1 again */ - for (va = sva; va < eva; va += arm_dcache_align) { + for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { _CP15_DCIMVAC(va); } dsb(); @@ -376,7 +392,7 @@ dcache_wb_poc(vm_offset_t sva, vm_paddr_ dsb(); - for (va = sva; va < eva; va += arm_dcache_align) { + for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { _CP15_DCCMVAC(va); } dsb(); @@ -394,7 +410,7 @@ dcache_wbinv_poc(vm_offset_t sva, vm_pad dsb(); /* write back L1 first */ - for (va = sva; va < eva; va += arm_dcache_align) { + for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { _CP15_DCCMVAC(va); } dsb(); @@ -403,7 +419,7 @@ dcache_wbinv_poc(vm_offset_t sva, vm_pad cpu_l2cache_wbinv_range(pa, size); /* then invalidate L1 */ - for (va = sva; va < eva; va += arm_dcache_align) { + for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { _CP15_DCIMVAC(va); } dsb(); Modified: stable/10/sys/arm/include/cpuinfo.h ============================================================================== --- stable/10/sys/arm/include/cpuinfo.h Sat May 23 22:48:54 2015 (r283335) +++ stable/10/sys/arm/include/cpuinfo.h Sat May 23 23:05:31 2015 (r283336) @@ -82,6 +82,12 @@ struct cpuinfo { int generic_timer_ext; int virtualization_ext; int security_ext; + + /* L1 cache info */ + int dcache_line_size; + int dcache_line_mask; + int icache_line_size; + int icache_line_mask; }; extern struct cpuinfo cpuinfo; From owner-svn-src-all@FreeBSD.ORG Sat May 23 23:08:17 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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; } From owner-svn-src-all@FreeBSD.ORG Sat May 23 23:08:55 2015 Return-Path: Delivered-To: svn-src-all@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 A117E169; Sat, 23 May 2015 23:08: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 8F82F1983; Sat, 23 May 2015 23:08: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 t4NN8tnq052587; Sat, 23 May 2015 23:08:55 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NN8toV052585; Sat, 23 May 2015 23:08:55 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232308.t4NN8toV052585@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 23:08:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283338 - in stable/10/sys/arm/ti: am335x omap4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 23:08:55 -0000 Author: ian Date: Sat May 23 23:08:54 2015 New Revision: 283338 URL: https://svnweb.freebsd.org/changeset/base/283338 Log: MFC r279816, r279826: Attach the prcm clock driver early, so it can set the mpcore timer frequency. Change the name of the dmtimer pps device from /dev/ppsN to /dev/dmtppsN. Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Sat May 23 23:08:16 2015 (r283337) +++ stable/10/sys/arm/ti/am335x/am335x_dmtimer.c Sat May 23 23:08:54 2015 (r283338) @@ -200,7 +200,7 @@ am335x_dmtimer_et_write_4(struct am335x_ */ #ifdef PPS_SYNC -#define PPS_CDEV_NAME "pps" +#define PPS_CDEV_NAME "dmtpps" static void am335x_dmtimer_set_capture_mode(struct am335x_dmtimer_softc *sc, bool force_off) Modified: stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c ============================================================================== --- stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c Sat May 23 23:08:16 2015 (r283337) +++ stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c Sat May 23 23:08:54 2015 (r283338) @@ -1423,5 +1423,6 @@ static driver_t omap4_prcm_driver = { static devclass_t omap4_prcm_devclass; -DRIVER_MODULE(omap4_prcm, simplebus, omap4_prcm_driver, omap4_prcm_devclass, 0, 0); +EARLY_DRIVER_MODULE(omap4_prcm, simplebus, omap4_prcm_driver, + omap4_prcm_devclass, 0, 0, BUS_PASS_TIMER + BUS_PASS_ORDER_EARLY); MODULE_VERSION(omap4_prcm, 1); From owner-svn-src-all@FreeBSD.ORG Sat May 23 23:27:02 2015 Return-Path: Delivered-To: svn-src-all@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 61B6B518; Sat, 23 May 2015 23:27: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 4FD941B93; Sat, 23 May 2015 23:27: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 t4NNR2mw062414; Sat, 23 May 2015 23:27:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NNR1mU062403; Sat, 23 May 2015 23:27:01 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232327.t4NNR1mU062403@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 23:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283339 - in stable/10/sys: arm/arm arm/include conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 23:27:02 -0000 Author: ian Date: Sat May 23 23:27:00 2015 New Revision: 283339 URL: https://svnweb.freebsd.org/changeset/base/283339 Log: MFC r280278, r280402: Allow to override default kernel virtual address assignment on ARM. Do not save/restore the TLS pointer on context switch for armv6. Modified: stable/10/sys/arm/arm/swtch.S stable/10/sys/arm/arm/sys_machdep.c stable/10/sys/arm/arm/vm_machdep.c stable/10/sys/arm/include/vmparam.h stable/10/sys/conf/options.arm Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/swtch.S ============================================================================== --- stable/10/sys/arm/arm/swtch.S Sat May 23 23:08:54 2015 (r283338) +++ stable/10/sys/arm/arm/swtch.S Sat May 23 23:27:00 2015 (r283339) @@ -255,7 +255,7 @@ ENTRY(cpu_switch) mov r4, r0 /* Save the old thread. */ #ifdef ARM_TP_ADDRESS - /* Store the old tp */ + /* Store the old tp; userland can change it on armv4. */ ldr r3, =ARM_TP_ADDRESS ldr r9, [r3] str r9, [r0, #(TD_MD + MD_TP)] @@ -272,11 +272,10 @@ ENTRY(cpu_switch) ldr r9, [r1, #(TD_MD + MD_RAS_END)] str r9, [r3, #8] #else - /* Store the old tp */ - mrc p15, 0, r9, c13, c0, 3 - str r9, [r0, #(TD_MD + MD_TP)] - - /* Set the new tp */ + /* + * Set new tp. No need to store the old one first, userland can't + * change it directly on armv6. + */ ldr r9, [r1, #(TD_MD + MD_TP)] mcr p15, 0, r9, c13, c0, 3 #endif Modified: stable/10/sys/arm/arm/sys_machdep.c ============================================================================== --- stable/10/sys/arm/arm/sys_machdep.c Sat May 23 23:08:54 2015 (r283338) +++ stable/10/sys/arm/arm/sys_machdep.c Sat May 23 23:27:00 2015 (r283339) @@ -84,13 +84,11 @@ static int arm32_set_tp(struct thread *td, void *args) { - if (td != curthread) - td->td_md.md_tp = (register_t)args; - else + td->td_md.md_tp = (register_t)args; #ifndef ARM_TP_ADDRESS - set_tls(args); + set_tls(args); #else - *(register_t *)ARM_TP_ADDRESS = (register_t)args; + *(register_t *)ARM_TP_ADDRESS = (register_t)args; #endif return (0); } @@ -99,13 +97,10 @@ static int arm32_get_tp(struct thread *td, void *args) { - if (td != curthread) - td->td_retval[0] = td->td_md.md_tp; - else #ifndef ARM_TP_ADDRESS - td->td_retval[0] = (register_t)get_tls(); + td->td_retval[0] = td->td_md.md_tp; #else - td->td_retval[0] = *(register_t *)ARM_TP_ADDRESS; + td->td_retval[0] = *(register_t *)ARM_TP_ADDRESS; #endif return (0); } Modified: stable/10/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/10/sys/arm/arm/vm_machdep.c Sat May 23 23:08:54 2015 (r283338) +++ stable/10/sys/arm/arm/vm_machdep.c Sat May 23 23:27:00 2015 (r283339) @@ -182,7 +182,7 @@ cpu_fork(register struct thread *td1, re #ifdef ARM_TP_ADDRESS td2->td_md.md_tp = *(register_t *)ARM_TP_ADDRESS; #else - td2->td_md.md_tp = (register_t) get_tls(); + td2->td_md.md_tp = td1->td_md.md_tp; #endif } @@ -411,7 +411,7 @@ cpu_set_user_tls(struct thread *td, void #ifdef ARM_TP_ADDRESS *(register_t *)ARM_TP_ADDRESS = (register_t)tls_base; #else - set_tls((void *)tls_base); + set_tls(tls_base); #endif critical_exit(); } Modified: stable/10/sys/arm/include/vmparam.h ============================================================================== --- stable/10/sys/arm/include/vmparam.h Sat May 23 23:08:54 2015 (r283338) +++ stable/10/sys/arm/include/vmparam.h Sat May 23 23:27:00 2015 (r283339) @@ -68,7 +68,9 @@ * The line between user space and kernel space * Mappings >= KERNEL_BASE are constant across all processes */ +#ifndef KERNBASE #define KERNBASE 0xc0000000 +#endif /* * max number of non-contig chunks of physical RAM you can have Modified: stable/10/sys/conf/options.arm ============================================================================== --- stable/10/sys/conf/options.arm Sat May 23 23:08:54 2015 (r283338) +++ stable/10/sys/conf/options.arm Sat May 23 23:27:00 2015 (r283339) @@ -28,6 +28,7 @@ IPI_IRQ_START opt_smp.h IPI_IRQ_END opt_smp.h FREEBSD_BOOT_LOADER opt_global.h IXP4XX_FLASH_SIZE opt_global.h +KERNBASE opt_global.h KERNPHYSADDR opt_global.h KERNVIRTADDR opt_global.h LINUX_BOOT_ABI opt_global.h From owner-svn-src-all@FreeBSD.ORG Sat May 23 23:35:20 2015 Return-Path: Delivered-To: svn-src-all@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 5731C75C; Sat, 23 May 2015 23:35: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 38D1E1C52; Sat, 23 May 2015 23:35: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 t4NNZK8E067291; Sat, 23 May 2015 23:35:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4NNZJvB067289; Sat, 23 May 2015 23:35:19 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505232335.t4NNZJvB067289@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 23 May 2015 23:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283340 - stable/10/sys/arm/mv/armadaxp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 23:35:20 -0000 Author: ian Date: Sat May 23 23:35:19 2015 New Revision: 283340 URL: https://svnweb.freebsd.org/changeset/base/283340 Log: MFC r262409, r267129, r267130, r280709: Move the declaration for mpentry() into a header file Fix broken SMP startup on Armada XP after r265694 Avoid using hard-coded SoC's register address in mptramp code for Armada XP Use pmap_mapdev()/unmapdev() to temporarily map on-chip sram while copying the startup trampoline code. Modified: stable/10/sys/arm/mv/armadaxp/armadaxp_mp.c stable/10/sys/arm/mv/armadaxp/mptramp.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/mv/armadaxp/armadaxp_mp.c ============================================================================== --- stable/10/sys/arm/mv/armadaxp/armadaxp_mp.c Sat May 23 23:27:00 2015 (r283339) +++ stable/10/sys/arm/mv/armadaxp/armadaxp_mp.c Sat May 23 23:35:19 2015 (r283340) @@ -37,6 +37,8 @@ #include #include +#include + #include #include #include @@ -97,14 +99,14 @@ platform_mp_init_secondary(void) } void mptramp(void); - - +void mptramp_end(void); +extern vm_offset_t mptramp_pmu_boot; void platform_mp_start_ap(void) { uint32_t reg, *src, *dst, cpu_num, div_val, cputype; - vm_offset_t smp_boot; + vm_offset_t pmu_boot_off; /* * Initialization procedure depends on core revision, * in this step CHIP ID is checked to choose proper procedure @@ -112,16 +114,18 @@ platform_mp_start_ap(void) cputype = cpufunc_id(); cputype &= CPU_ID_CPU_MASK; - smp_boot = kva_alloc(PAGE_SIZE); - pmap_kenter_nocache(smp_boot, 0xffff0000); - dst = (uint32_t *) smp_boot; - - for (src = (uint32_t *)mptramp; src < (uint32_t *)mpentry; + /* + * Set the PA of CPU0 Boot Address Redirect register used in + * mptramp according to the actual SoC registers' base address. + */ + pmu_boot_off = (CPU_PMU(0) - MV_BASE) + CPU_PMU_BOOT; + mptramp_pmu_boot = fdt_immr_pa + pmu_boot_off; + dst = pmap_mapdev(0xffff0000, PAGE_SIZE); + for (src = (uint32_t *)mptramp; src < (uint32_t *)mptramp_end; src++, dst++) { *dst = *src; } - kva_free(smp_boot, PAGE_SIZE); - + pmap_unmapdev((vm_offset_t)dst, PAGE_SIZE); if (cputype == CPU_ID_MV88SV584X_V7) { /* Core rev A0 */ div_val = read_cpu_clkdiv(CPU_DIVCLK_CTRL2_RATIO_FULL1); Modified: stable/10/sys/arm/mv/armadaxp/mptramp.S ============================================================================== --- stable/10/sys/arm/mv/armadaxp/mptramp.S Sat May 23 23:27:00 2015 (r283339) +++ stable/10/sys/arm/mv/armadaxp/mptramp.S Sat May 23 23:35:19 2015 (r283340) @@ -29,6 +29,8 @@ __FBSDID("$FreeBSD$"); +.global _C_LABEL(mptramp_pmu_boot) + ASENTRY_NP(mptramp) mov r0, #0 mcr p15, 0, r0, c7, c7, 0 @@ -44,13 +46,16 @@ ASENTRY_NP(mptramp) /* Read boot address for CPU */ mov r1, #0x100 mul r2, r0, r1 - ldr r1, Lpmureg + ldr r1, mptramp_pmu_boot add r0, r2, r1 ldr r1, [r0], #0x00 mov pc, r1 -Lpmureg: - .word 0xd0022124 +_C_LABEL(mptramp_pmu_boot): + .word 0x0 + END(mptramp) + .global _C_LABEL(mptramp_end) +_C_LABEL(mptramp_end):