From owner-svn-src-head@freebsd.org Sun Nov 1 06:15:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D747EA2328F; Sun, 1 Nov 2015 06:15:15 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1B7A127F; Sun, 1 Nov 2015 06:15:15 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA16FEM2071018; Sun, 1 Nov 2015 06:15:14 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA16FELV071017; Sun, 1 Nov 2015 06:15:14 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201511010615.tA16FELV071017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Sun, 1 Nov 2015 06:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290230 - head/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 06:15:15 -0000 Author: ache Date: Sun Nov 1 06:15:14 2015 New Revision: 290230 URL: https://svnweb.freebsd.org/changeset/base/290230 Log: Don't seek to the end if write buffer is empty (in append modes). PR: 204156 MFC after: 1 week Modified: head/lib/libc/stdio/ftell.c Modified: head/lib/libc/stdio/ftell.c ============================================================================== --- head/lib/libc/stdio/ftell.c Sat Oct 31 20:38:06 2015 (r290229) +++ head/lib/libc/stdio/ftell.c Sun Nov 1 06:15:14 2015 (r290230) @@ -119,7 +119,18 @@ _ftello(FILE *fp, fpos_t *offset) if (HASUB(fp)) pos -= fp->_r; /* Can be negative at this point. */ } else if ((fp->_flags & __SWR) && fp->_p != NULL) { - if ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP)) { + /* + * Writing. Any buffered characters cause the + * position to be greater than that in the + * underlying object. + */ + n = fp->_p - fp->_bf._base; + if (pos > OFF_MAX - n) { + errno = EOVERFLOW; + return (1); + } + if (n > 0 && + ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP))) { int serrno = errno; errno = 0; @@ -137,16 +148,6 @@ _ftello(FILE *fp, fpos_t *offset) } errno = serrno; } - /* - * Writing. Any buffered characters cause the - * position to be greater than that in the - * underlying object. - */ - n = fp->_p - fp->_bf._base; - if (pos > OFF_MAX - n) { - errno = EOVERFLOW; - return (1); - } pos += n; } *offset = pos; From owner-svn-src-head@freebsd.org Sun Nov 1 06:47:07 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38550A2368C; Sun, 1 Nov 2015 06:47:07 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3F1813AA; Sun, 1 Nov 2015 06:47:06 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA16l5MC079639; Sun, 1 Nov 2015 06:47:05 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA16l5Of079638; Sun, 1 Nov 2015 06:47:05 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201511010647.tA16l5Of079638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Sun, 1 Nov 2015 06:47:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290231 - head/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 06:47:07 -0000 Author: ache Date: Sun Nov 1 06:47:05 2015 New Revision: 290231 URL: https://svnweb.freebsd.org/changeset/base/290231 Log: Addition to prev. commit. In some edge cases fp->_p can be changed in _sseek(), recalculate. PR: 204156 MFC after: 1 week Modified: head/lib/libc/stdio/ftell.c Modified: head/lib/libc/stdio/ftell.c ============================================================================== --- head/lib/libc/stdio/ftell.c Sun Nov 1 06:15:14 2015 (r290230) +++ head/lib/libc/stdio/ftell.c Sun Nov 1 06:47:05 2015 (r290231) @@ -125,10 +125,6 @@ _ftello(FILE *fp, fpos_t *offset) * underlying object. */ n = fp->_p - fp->_bf._base; - if (pos > OFF_MAX - n) { - errno = EOVERFLOW; - return (1); - } if (n > 0 && ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP))) { int serrno = errno; @@ -147,6 +143,12 @@ _ftello(FILE *fp, fpos_t *offset) } } errno = serrno; + /* fp->_p can be changed in _sseek(), recalculate. */ + n = fp->_p - fp->_bf._base; + } + if (pos > OFF_MAX - n) { + errno = EOVERFLOW; + return (1); } pos += n; } From owner-svn-src-head@freebsd.org Sun Nov 1 08:40:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DE4BA2371E; Sun, 1 Nov 2015 08:40:17 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DECB19B4; Sun, 1 Nov 2015 08:40:17 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA18eGag010967; Sun, 1 Nov 2015 08:40:16 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA18eGvb010966; Sun, 1 Nov 2015 08:40:16 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201511010840.tA18eGvb010966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Sun, 1 Nov 2015 08:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290232 - head/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 08:40:17 -0000 Author: ache Date: Sun Nov 1 08:40:15 2015 New Revision: 290232 URL: https://svnweb.freebsd.org/changeset/base/290232 Log: Microoptimize. Modified: head/lib/libc/stdio/ftell.c Modified: head/lib/libc/stdio/ftell.c ============================================================================== --- head/lib/libc/stdio/ftell.c Sun Nov 1 06:47:05 2015 (r290231) +++ head/lib/libc/stdio/ftell.c Sun Nov 1 08:40:15 2015 (r290232) @@ -118,15 +118,14 @@ _ftello(FILE *fp, fpos_t *offset) } if (HASUB(fp)) pos -= fp->_r; /* Can be negative at this point. */ - } else if ((fp->_flags & __SWR) && fp->_p != NULL) { + } else if ((fp->_flags & __SWR) && fp->_p != NULL && + (n = fp->_p - fp->_bf._base) > 0) { /* * Writing. Any buffered characters cause the * position to be greater than that in the * underlying object. */ - n = fp->_p - fp->_bf._base; - if (n > 0 && - ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP))) { + if ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP)) { int serrno = errno; errno = 0; From owner-svn-src-head@freebsd.org Sun Nov 1 13:01:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F532A22382; Sun, 1 Nov 2015 13:01:19 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com [IPv6:2a00:1450:4010:c04::22e]) (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 07B951B0A; Sun, 1 Nov 2015 13:01:19 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by lbbwb3 with SMTP id wb3so72643668lbb.1; Sun, 01 Nov 2015 05:01:16 -0800 (PST) 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=tAci5ww9SQVERef0u7jE8a0EdGjnerZnlPz0/CCZKq0=; b=IMojIJ8jkSCJS/R3WXKaAJOUwY+twt8G9MGQVQqKMnWjXeZkRUEffDT2beVFaw5DXj c5k5dSu4SXcE8jo6x/e4eewrlBmnbtFRTQzcPIU30kjzQ/Wxk0PweFWW8CwntUe1SGtd DJY1MwcIZ9MZ6wRk36dtXik2oplLGPPzyru3cYR2bfLdMptaon7K9d8i6HY2guHHH8pe AZYdDRMgFSGBWOdcVuyBV6Cjv/0NJ5EUe1mTl1s03qppXBvwe8RevoA68suOmzRoKAnV TqXdrtMNtBy8TFt3EQF7umlExx50tr7aZ+nCT1MHcKiQpY+zMyGn/Sq+6LEgnFeLqVh4 khHw== MIME-Version: 1.0 X-Received: by 10.112.16.199 with SMTP id i7mr7995426lbd.105.1446382876151; Sun, 01 Nov 2015 05:01:16 -0800 (PST) Received: by 10.112.126.104 with HTTP; Sun, 1 Nov 2015 05:01:16 -0800 (PST) In-Reply-To: <56348FF8.3010602@gmail.com> References: <201510221638.t9MGc1cc053885@repo.freebsd.org> <56348FF8.3010602@gmail.com> Date: Sun, 1 Nov 2015 07:01:16 -0600 Message-ID: Subject: Re: svn commit: r289759 - in head/sys/arm: arm include From: Jason Harmening To: Ganbold Tsagaankhuu Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 13:01:19 -0000 On Sat, Oct 31, 2015 at 4:55 AM, Jason Harmening wrote: > > > On 10/31/15 03:21, Ganbold Tsagaankhuu wrote: > > On Fri, Oct 23, 2015 at 12:38 AM, Jason A. Harmening > > wrote: > > > >> Author: jah > >> Date: Thu Oct 22 16:38:01 2015 > >> New Revision: 289759 > >> URL: https://svnweb.freebsd.org/changeset/base/289759 > >> > >> Log: > >> Use pmap_quick* functions in armv6 busdma, for bounce buffers and > cache > >> maintenance. This makes it safe to sync buffers that have no VA mapping > >> associated with the busdma map, but may have other mappings, possibly on > >> different CPUs. This also makes it safe to sync unmapped bounce > buffers in > >> non-sleepable thread contexts. > >> > >> Similar to r286787 for x86, this treats userspace buffers the same as > >> unmapped buffers and no longer borrows the UVA for sync operations. > >> > >> Submitted by: Svatopluk Kraus (earlier > >> revision) > >> Tested by: Svatopluk Kraus > >> Differential Revision: https://reviews.freebsd.org/D3869 > > > > > > > > It seems I can't boot Odroid C1 with this change. > > > > http://pastebin.ca/3227678 > > > > r289758 works for me. > > > > Am I missing something? > > > > thanks, > > > > Ganbold > > > > > > Hmmm, the fault address of 0x20 and the fact that this is happening > during mi_startup() make me wonder if the per-cpu pageframes used by > pmap_quick* haven't been initialized yet. > > I wonder if changing the order of qpages_init in > sys/arm/arm/pmap-v6[-new].c to something other than SI_ORDER_ANY would > help? > > It seems like we'd want SI_ORDER_FOURTH or SI_ORDER_MIDDLE, since > mp_start() is SI_ORDER_THIRD. > > It would be nice to know what's calling bus_dmamap_sync() in this case. > I can't figure that out, but maybe that's because I haven't had coffee > yet. > > Can you build the kernel with 'options VERBOSE_SYSINIT' ? That will add some spew to the boot log, but it should confirm whether this is a sysinit ordering issue. From owner-svn-src-head@freebsd.org Sun Nov 1 13:31:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70F7CA22C75 for ; Sun, 1 Nov 2015 13:31:56 +0000 (UTC) (envelope-from mmel@freebsd.org) Received: from mail.miracle.cz (mail.miracle.cz [193.84.128.19]) by mx1.freebsd.org (Postfix) with ESMTP id EC2281A1B for ; Sun, 1 Nov 2015 13:31:55 +0000 (UTC) (envelope-from mmel@freebsd.org) Received: from [193.84.128.50] (meloun.ad.miracle.cz [193.84.128.50]) by mail.miracle.cz (Postfix) with ESMTPSA id 8C4F0ACAD34 for ; Sun, 1 Nov 2015 14:31:53 +0100 (CET) Subject: Re: svn commit: r289759 - in head/sys/arm: arm include References: <201510221638.t9MGc1cc053885@repo.freebsd.org> <56348FF8.3010602@gmail.com> From: Michal Meloun X-Enigmail-Draft-Status: N1110 To: svn-src-head@freebsd.org Message-ID: <56361449.3010709@freebsd.org> Date: Sun, 1 Nov 2015 14:31:53 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.miracle.cz); Sun, 01 Nov 2015 14:31:53 +0100 (CET) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 13:31:56 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Dne 01.11.2015 v 14:01 Jason Harmening napsal(a): > > > On Sat, Oct 31, 2015 at 4:55 AM, Jason Harmening > > > wrote: > > > > On 10/31/15 03:21, Ganbold Tsagaankhuu wrote: >> On Fri, Oct 23, 2015 at 12:38 AM, Jason A. Harmening > > >> wrote: >> >>> Author: jah Date: Thu Oct 22 16:38:01 2015 New Revision: >>> 289759 URL: https://svnweb.freebsd.org/changeset/base/289759 >>> >>> Log: Use pmap_quick* functions in armv6 busdma, for bounce >>> buffers > and cache >>> maintenance. This makes it safe to sync buffers that have no >>> VA > mapping >>> associated with the busdma map, but may have other mappings, > possibly on >>> different CPUs. This also makes it safe to sync unmapped >>> bounce > buffers in >>> non-sleepable thread contexts. >>> >>> Similar to r286787 for x86, this treats userspace buffers the > same as >>> unmapped buffers and no longer borrows the UVA for sync >>> operations. >>> >>> Submitted by: Svatopluk Kraus > (earlier >>> revision) Tested by: Svatopluk Kraus Differential Revision: >>> https://reviews.freebsd.org/D3869 >> >> >> >> It seems I can't boot Odroid C1 with this change. >> >> http://pastebin.ca/3227678 >> >> r289758 works for me. >> >> Am I missing something? >> >> thanks, >> >> Ganbold >> >> > > Hmmm, the fault address of 0x20 and the fact that this is > happening during mi_startup() make me wonder if the per-cpu > pageframes used by pmap_quick* haven't been initialized yet. > > I wonder if changing the order of qpages_init in > sys/arm/arm/pmap-v6[-new].c to something other than SI_ORDER_ANY > would help? > > It seems like we'd want SI_ORDER_FOURTH or SI_ORDER_MIDDLE, since > mp_start() is SI_ORDER_THIRD. > > It would be nice to know what's calling bus_dmamap_sync() in this > case. I can't figure that out, but maybe that's because I haven't > had coffee yet. > > > Can you build the kernel with 'options VERBOSE_SYSINIT' ? That will > add some spew to the boot log, but it should confirm whether this > is a sysinit ordering issue. > The problem is already identified. ARM uses VM_PHYSSEG_SPARSE memory. This means that not all used memory is backed by vm_page_array, i.e kernel code, data, bss sections and initial CPU stacks are outside of this array. Unfortunately, some drivers (MMC for example) initiates DMA transfer to buffers on initial stack, (statically allocated buffers in bss or data section is second example). I have prepared (idea quality) patch, and I can confirm that works (for Ganbold). See: https://gist.github.com/strejda/d5ca3ed202427a2e0557 Michal -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWNhRJAAoJEGkesmtexaqq4g8H/imNISydjQC667Xh3Xe+wp3g 2yL3y1vijJwoIjIwhXC8UdFY1cTh4h7eReVPA6emreo2IFWPADWXbtHjJP50x/Sy SVT3vteQu2Z8EOrPdUxbVJQFs/ZA2wLHWKsKQruuFQzdyE+zd52G/L77nodmU4+O Zrq3NACqGp9/VPNQtwlMx347wE4V/a6QHYE2jh+s9rp1zkt/MhoTZWDmgNMRn1KR eiIfXf48l2m6TsRMTdJlroa5Vaxv8QWfx7aqO6/5XSu1MyGuxbeD51iJkNsUYO42 nzP+nodx5xonyPgtLbqWPwFpTM8//ipLCBWF2w0VYws/N4FcCNChbxS0fLL3Fho= =PfNh -----END PGP SIGNATURE----- From owner-svn-src-head@freebsd.org Sun Nov 1 16:11:59 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4361A2389C for ; Sun, 1 Nov 2015 16:11:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9277A14CE for ; Sun, 1 Nov 2015 16:11:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sun, 1 Nov 2015 16:12:20 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id tA1GBpo4040907; Sun, 1 Nov 2015 09:11:51 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1446394311.91534.236.camel@freebsd.org> Subject: Re: svn commit: r289759 - in head/sys/arm: arm include From: Ian Lepore To: Jason Harmening , Ganbold Tsagaankhuu Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 01 Nov 2015 09:11:51 -0700 In-Reply-To: References: <201510221638.t9MGc1cc053885@repo.freebsd.org> <56348FF8.3010602@gmail.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 16:11:59 -0000 On Sun, 2015-11-01 at 07:01 -0600, Jason Harmening wrote: > On Sat, Oct 31, 2015 at 4:55 AM, Jason Harmening < > jason.harmening@gmail.com> > wrote: > > > > > > > On 10/31/15 03:21, Ganbold Tsagaankhuu wrote: > > > On Fri, Oct 23, 2015 at 12:38 AM, Jason A. Harmening < > > > jah@freebsd.org> > > > wrote: > > > > > > > Author: jah > > > > Date: Thu Oct 22 16:38:01 2015 > > > > New Revision: 289759 > > > > URL: https://svnweb.freebsd.org/changeset/base/289759 > > > > > > > > Log: > > > > Use pmap_quick* functions in armv6 busdma, for bounce buffers > > > > and > > cache > > > > maintenance. This makes it safe to sync buffers that have no > > > > VA mapping > > > > associated with the busdma map, but may have other mappings, > > > > possibly on > > > > different CPUs. This also makes it safe to sync unmapped > > > > bounce > > buffers in > > > > non-sleepable thread contexts. > > > > > > > > Similar to r286787 for x86, this treats userspace buffers the > > > > same as > > > > unmapped buffers and no longer borrows the UVA for sync > > > > operations. > > > > > > > > Submitted by: Svatopluk Kraus > > > > (earlier > > > > revision) > > > > Tested by: Svatopluk Kraus > > > > Differential Revision: > > > > https://reviews.freebsd.org/D3869 > > > > > > > > > > > > It seems I can't boot Odroid C1 with this change. > > > > > > http://pastebin.ca/3227678 > > > > > > r289758 works for me. > > > > > > Am I missing something? > > > > > > thanks, > > > > > > Ganbold > > > > > > > > > > Hmmm, the fault address of 0x20 and the fact that this is happening > > during mi_startup() make me wonder if the per-cpu pageframes used > > by > > pmap_quick* haven't been initialized yet. > > > > I wonder if changing the order of qpages_init in > > sys/arm/arm/pmap-v6[-new].c to something other than SI_ORDER_ANY > > would > > help? > > > > It seems like we'd want SI_ORDER_FOURTH or SI_ORDER_MIDDLE, since > > mp_start() is SI_ORDER_THIRD. > > > > It would be nice to know what's calling bus_dmamap_sync() in this > > case. > > I can't figure that out, but maybe that's because I haven't had > > coffee > > yet. > > > > > Can you build the kernel with 'options VERBOSE_SYSINIT' ? > That will add some spew to the boot log, but it should confirm > whether this > is a sysinit ordering issue. It's almost certainly not related to sysinit ordering. This exception is happening during mmc probing after interrupts are enabled. It appears that the problem is the faulting code is running on one of the very early pre-allocated kernel stacks (perhaps in an interrupt handler on an idle thread stack), and these stacks are not in memory represented in the vm page arrays. The mmc code is using a 64-byte buffer on the stack and mapping it for DMA. Normally that causes a bounce for cacheline alignment, but unluckily in this case that buffer on the stack just happened to be aligned to a cacheline boundary and a multiple of the cacheline size, so no bounce. That causes the new sync logic that is based on keeping vm_page_t pointers and offsets to get a NULL pointer back from PHYS_TO_VM_PAGE when mapping, then it dies at sync time trying to dereference that. It used to work because the sync logic used to use the vaddr, not a page pointer. Michal was working on a patch yesterday. -- Ian From owner-svn-src-head@freebsd.org Sun Nov 1 16:54:57 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CC05A23060; Sun, 1 Nov 2015 16:54:57 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE8AE179C; Sun, 1 Nov 2015 16:54:56 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA1Gst0D054579; Sun, 1 Nov 2015 16:54:55 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA1GstJP054578; Sun, 1 Nov 2015 16:54:55 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201511011654.tA1GstJP054578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 1 Nov 2015 16:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290234 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 16:54:57 -0000 Author: mmel Date: Sun Nov 1 16:54:55 2015 New Revision: 290234 URL: https://svnweb.freebsd.org/changeset/base/290234 Log: Install myself as src committer. Approved by: kib (mentor) > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > MFH: Ports tree branch name. Request approval for merge. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization. > Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed). > Empty fields above will be automatically removed. M share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Sun Nov 1 12:00:55 2015 (r290233) +++ head/share/misc/committers-src.dot Sun Nov 1 16:54:55 2015 (r290234) @@ -235,6 +235,7 @@ melifaro [label="Alexander V. Chernikov\ mjacob [label="Matt Jacob\nmjacob@FreeBSD.org\n1997/08/13"] mjg [label="Mateusz Guzik\nmjg@FreeBSD.org\n2012/06/04"] mlaier [label="Max Laier\nmlaier@FreeBSD.org\n2004/02/10"] +mmel [label="Michal Meloun\nmmel@FreeBSD.org\n2015/11/01"] monthadar [label="Monthadar Al Jaberi\nmonthadar@FreeBSD.org\n2012/04/02"] mp [label="Mark Peek\nmp@FreeBSD.org\n2001/07/27"] mr [label="Michael Reifenberger\nmr@FreeBSD.org\n2001/09/30"] @@ -572,6 +573,7 @@ kib -> jlh kib -> jpaetzel kib -> lulf kib -> melifaro +kib -> mmel kib -> pho kib -> pluknet kib -> rdivacky From owner-svn-src-head@freebsd.org Sun Nov 1 17:20:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00B6CA23718; Sun, 1 Nov 2015 17:20:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC53B157A; Sun, 1 Nov 2015 17:20:18 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA1HKHxR060776; Sun, 1 Nov 2015 17:20:17 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA1HKHLH060775; Sun, 1 Nov 2015 17:20:17 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201511011720.tA1HKHLH060775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 1 Nov 2015 17:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290236 - head/sbin/pfctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 17:20:19 -0000 Author: kp Date: Sun Nov 1 17:20:17 2015 New Revision: 290236 URL: https://svnweb.freebsd.org/changeset/base/290236 Log: pfctl: Fix uninitialised veriable In pfctl_set_debug() we used 'level' without ever initialising it. We correctly parsed the option, but them failed to actually assign the parsed value to 'level' before performing to ioctl() to configure the debug level. PR: 202996 Submitted by: Andrej Kolontai Modified: head/sbin/pfctl/pfctl.c Modified: head/sbin/pfctl/pfctl.c ============================================================================== --- head/sbin/pfctl/pfctl.c Sun Nov 1 16:59:28 2015 (r290235) +++ head/sbin/pfctl/pfctl.c Sun Nov 1 17:20:17 2015 (r290236) @@ -1840,6 +1840,7 @@ pfctl_set_debug(struct pfctl *pf, char * } pf->debug_set = 1; + level = pf->debug; if ((pf->opts & PF_OPT_NOACTION) == 0) if (ioctl(dev, DIOCSETDEBUG, &level)) From owner-svn-src-head@freebsd.org Sun Nov 1 19:48:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C8B1A24EEB; Sun, 1 Nov 2015 19:48:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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 A6C7F1E6D; Sun, 1 Nov 2015 19:48:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tA1Jm9RJ039229 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 1 Nov 2015 21:48:09 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tA1Jm9RJ039229 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tA1Jm9Yi039228; Sun, 1 Nov 2015 21:48:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 1 Nov 2015 21:48:09 +0200 From: Konstantin Belousov To: Ian Lepore Cc: Jason Harmening , Ganbold Tsagaankhuu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289759 - in head/sys/arm: arm include Message-ID: <20151101194809.GT2257@kib.kiev.ua> References: <201510221638.t9MGc1cc053885@repo.freebsd.org> <56348FF8.3010602@gmail.com> <1446394311.91534.236.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446394311.91534.236.camel@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 19:48:16 -0000 On Sun, Nov 01, 2015 at 09:11:51AM -0700, Ian Lepore wrote: > It's almost certainly not related to sysinit ordering. This exception > is happening during mmc probing after interrupts are enabled. > > It appears that the problem is the faulting code is running on one of > the very early pre-allocated kernel stacks (perhaps in an interrupt > handler on an idle thread stack), and these stacks are not in memory > represented in the vm page arrays. The mmc code is using a 64-byte > buffer on the stack and mapping it for DMA. Normally that causes a > bounce for cacheline alignment, but unluckily in this case that buffer > on the stack just happened to be aligned to a cacheline boundary and a > multiple of the cacheline size, so no bounce. That causes the new sync > logic that is based on keeping vm_page_t pointers and offsets to get a > NULL pointer back from PHYS_TO_VM_PAGE when mapping, then it dies at > sync time trying to dereference that. It used to work because the sync > logic used to use the vaddr, not a page pointer. > > Michal was working on a patch yesterday. This actually is the same as the issue I had with the DMAR busdma on x86. You could see the trick used in the sys/x86/iommu/busdma_dmar.c:dmar_bus_dmamap_load_buffer(), the dumping case. I just allocated fictitious pages to cope with kernel core dump needing to DMA from memory which is not described by vm_page_array. From owner-svn-src-head@freebsd.org Sun Nov 1 19:55:33 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8514DA230C5; Sun, 1 Nov 2015 19:55:33 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A5A8122C; Sun, 1 Nov 2015 19:55:33 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA1JtWTO005898; Sun, 1 Nov 2015 19:55:32 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA1JtWo5005897; Sun, 1 Nov 2015 19:55:32 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201511011955.tA1JtWo5005897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Date: Sun, 1 Nov 2015 19:55:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290238 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 19:55:33 -0000 Author: dumbbell Date: Sun Nov 1 19:55:32 2015 New Revision: 290238 URL: https://svnweb.freebsd.org/changeset/base/290238 Log: drm/i915: Reduce diff with Linux 3.8 There is no functional change. The goal is to ease the future update to Linux 3.8's i915 driver. MFC after: 2 months Modified: head/sys/dev/drm2/i915/intel_ringbuffer.c Modified: head/sys/dev/drm2/i915/intel_ringbuffer.c ============================================================================== --- head/sys/dev/drm2/i915/intel_ringbuffer.c Sun Nov 1 18:42:48 2015 (r290237) +++ head/sys/dev/drm2/i915/intel_ringbuffer.c Sun Nov 1 19:55:32 2015 (r290238) @@ -99,11 +99,11 @@ gen2_render_ring_flush(struct intel_ring static int gen4_render_ring_flush(struct intel_ring_buffer *ring, - u32 invalidate_domains, - u32 flush_domains) + u32 invalidate_domains, + u32 flush_domains) { struct drm_device *dev = ring->dev; - uint32_t cmd; + u32 cmd; int ret; /* @@ -268,7 +268,7 @@ gen6_render_ring_flush(struct intel_ring } static void ring_write_tail(struct intel_ring_buffer *ring, - uint32_t value) + u32 value) { drm_i915_private_t *dev_priv = ring->dev->dev_private; I915_WRITE_TAIL(ring, value); @@ -277,7 +277,7 @@ static void ring_write_tail(struct intel u32 intel_ring_get_active_head(struct intel_ring_buffer *ring) { drm_i915_private_t *dev_priv = ring->dev->dev_private; - uint32_t acthd_reg = INTEL_INFO(ring->dev)->gen >= 4 ? + u32 acthd_reg = INTEL_INFO(ring->dev)->gen >= 4 ? RING_ACTHD(ring->mmio_base) : ACTHD; return I915_READ(acthd_reg); @@ -287,7 +287,7 @@ static int init_ring_common(struct intel { drm_i915_private_t *dev_priv = ring->dev->dev_private; struct drm_i915_gem_object *obj = ring->obj; - uint32_t head; + u32 head; /* Stop the ring if it's running. */ I915_WRITE_CTL(ring, 0); @@ -300,7 +300,7 @@ static int init_ring_common(struct intel /* G45 ring initialization fails to reset head to zero */ if (head != 0) { - DRM_DEBUG("%s head not reset to zero " + DRM_DEBUG_KMS("%s head not reset to zero " "ctl %08x head %08x tail %08x start %08x\n", ring->name, I915_READ_CTL(ring), @@ -410,6 +410,7 @@ cleanup_pipe_control(struct intel_ring_b return; obj = pc->obj; + pmap_qremove((vm_offset_t)pc->cpu_page, 1); kva_free((uintptr_t)pc->cpu_page, PAGE_SIZE); i915_gem_object_unpin(obj); @@ -439,7 +440,6 @@ static int init_render_ring(struct intel return ret; } - if (IS_GEN6(dev)) { /* From the Sandybridge PRM, volume 1 part 3, page 24: * "If this bit is set, STCunit will have LRA as replacement @@ -473,8 +473,8 @@ static void render_ring_cleanup(struct i static void update_mboxes(struct intel_ring_buffer *ring, - u32 seqno, - u32 mmio_offset) + u32 seqno, + u32 mmio_offset) { intel_ring_emit(ring, MI_SEMAPHORE_MBOX | MI_SEMAPHORE_GLOBAL_GTT | @@ -643,7 +643,7 @@ gen6_ring_get_seqno(struct intel_ring_bu return intel_read_status_page(ring, I915_GEM_HWS_INDEX); } -static uint32_t +static u32 ring_get_seqno(struct intel_ring_buffer *ring) { if (ring->status_page.page_addr == NULL) @@ -651,7 +651,7 @@ ring_get_seqno(struct intel_ring_buffer return intel_read_status_page(ring, I915_GEM_HWS_INDEX); } -static uint32_t +static u32 pc_render_get_seqno(struct intel_ring_buffer *ring) { struct pipe_control *pc = ring->private; @@ -764,7 +764,7 @@ void intel_ring_setup_status_page(struct { struct drm_device *dev = ring->dev; drm_i915_private_t *dev_priv = dev->dev_private; - uint32_t mmio = 0; + u32 mmio = 0; /* The ring status page addresses are no longer next to the rest of * the ring registers as of gen7. @@ -793,8 +793,8 @@ void intel_ring_setup_status_page(struct static int bsd_ring_flush(struct intel_ring_buffer *ring, - uint32_t invalidate_domains, - uint32_t flush_domains) + u32 invalidate_domains, + u32 flush_domains) { int ret; @@ -871,7 +871,8 @@ gen6_ring_put_irq(struct intel_ring_buff } static int -i965_dispatch_execbuffer(struct intel_ring_buffer *ring, u32 offset, u32 length) +i965_dispatch_execbuffer(struct intel_ring_buffer *ring, + u32 offset, u32 length) { int ret; @@ -910,7 +911,7 @@ i830_dispatch_execbuffer(struct intel_ri static int i915_dispatch_execbuffer(struct intel_ring_buffer *ring, - u32 offset, u32 len) + u32 offset, u32 len) { int ret; @@ -974,7 +975,7 @@ static int init_status_page(struct intel memset(ring->status_page.page_addr, 0, PAGE_SIZE); intel_ring_setup_status_page(ring); - DRM_DEBUG("i915: init_status_page %s hws offset: 0x%08x\n", + DRM_DEBUG_DRIVER("%s hws offset: 0x%08x\n", ring->name, ring->status_page.gfx_addr); return 0; @@ -1078,28 +1079,6 @@ void intel_cleanup_ring_buffer(struct in cleanup_status_page(ring); } -static int intel_wrap_ring_buffer(struct intel_ring_buffer *ring) -{ - uint32_t *virt; - int rem = ring->size - ring->tail; - - if (ring->space < rem) { - int ret = intel_wait_ring_buffer(ring, rem); - if (ret) - return ret; - } - - virt = (uint32_t *)((char *)ring->virtual_start + ring->tail); - rem /= 4; - while (rem--) - *virt++ = MI_NOOP; - - ring->tail = 0; - ring->space = ring_space(ring); - - return 0; -} - static int intel_ring_wait_seqno(struct intel_ring_buffer *ring, u32 seqno) { struct drm_i915_private *dev_priv = ring->dev->dev_private; @@ -1222,6 +1201,28 @@ int intel_wait_ring_buffer(struct intel_ return -EBUSY; } +static int intel_wrap_ring_buffer(struct intel_ring_buffer *ring) +{ + uint32_t *virt; + int rem = ring->size - ring->tail; + + if (ring->space < rem) { + int ret = intel_wait_ring_buffer(ring, rem); + if (ret) + return ret; + } + + virt = (uint32_t *)((char *)ring->virtual_start + ring->tail); + rem /= 4; + while (rem--) + *virt++ = MI_NOOP; + + ring->tail = 0; + ring->space = ring_space(ring); + + return 0; +} + int intel_ring_begin(struct intel_ring_buffer *ring, int num_dwords) { @@ -1283,7 +1284,7 @@ static void gen6_bsd_ring_write_tail(str } static int gen6_ring_flush(struct intel_ring_buffer *ring, - uint32_t invalidate, uint32_t flush) + u32 invalidate, u32 flush) { uint32_t cmd; int ret; @@ -1305,7 +1306,7 @@ static int gen6_ring_flush(struct intel_ static int gen6_ring_dispatch_execbuffer(struct intel_ring_buffer *ring, - uint32_t offset, uint32_t len) + u32 offset, u32 len) { int ret; @@ -1326,7 +1327,7 @@ gen6_ring_dispatch_execbuffer(struct int static int blt_ring_flush(struct intel_ring_buffer *ring, u32 invalidate, u32 flush) { - u32 cmd; + uint32_t cmd; int ret; ret = intel_ring_begin(ring, 4); From owner-svn-src-head@freebsd.org Sun Nov 1 19:59:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52370A23126; Sun, 1 Nov 2015 19:59:06 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F16C13BE; Sun, 1 Nov 2015 19:59:06 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA1Jx5Zv006078; Sun, 1 Nov 2015 19:59:05 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA1Jx4OB006074; Sun, 1 Nov 2015 19:59:04 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201511011959.tA1Jx4OB006074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 1 Nov 2015 19:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290239 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 19:59:06 -0000 Author: melifaro Date: Sun Nov 1 19:59:04 2015 New Revision: 290239 URL: https://svnweb.freebsd.org/changeset/base/290239 Log: Fix lladdr change propagation for on vlans on top of it. Fix lladdr update when setting mac address manually. Fix lladdr_event for slave ports addition. MFC after: 4 weeks Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D4004 Modified: head/sys/net/if.c head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sun Nov 1 19:55:32 2015 (r290238) +++ head/sys/net/if.c Sun Nov 1 19:59:04 2015 (r290239) @@ -3314,8 +3314,10 @@ if_delmulti_locked(struct ifnet *ifp, st * * At this time we only support certain types of interfaces, * and we don't allow the length of the address to change. + * + * Set noinline to be dtrace-friendly */ -int +__noinline int if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len) { struct sockaddr_dl *sdl; Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sun Nov 1 19:55:32 2015 (r290238) +++ head/sys/net/if_lagg.c Sun Nov 1 19:59:04 2015 (r290239) @@ -100,7 +100,7 @@ static const char laggname[] = "lagg"; static void lagg_lladdr(struct lagg_softc *, uint8_t *); static void lagg_capabilities(struct lagg_softc *); -static void lagg_port_lladdr(struct lagg_port *, uint8_t *); +static void lagg_port_lladdr(struct lagg_port *, uint8_t *, lagg_llqtype); static void lagg_port_setlladdr(void *, int); static int lagg_port_create(struct lagg_softc *, struct ifnet *); static int lagg_port_destroy(struct lagg_port *, int); @@ -543,6 +543,7 @@ lagg_clone_destroy(struct ifnet *ifp) lagg_port_destroy(lp, 1); /* Unhook the aggregation protocol */ lagg_proto_detach(sc); + LAGG_UNLOCK_ASSERT(sc); ifmedia_removeall(&sc->sc_media); ether_ifdetach(ifp); @@ -557,7 +558,12 @@ lagg_clone_destroy(struct ifnet *ifp) free(sc, M_DEVBUF); } -static void +/* + * Set link-layer address on the lagg interface itself. + * + * Set noinline to be dtrace-friendly + */ +static __noinline void lagg_lladdr(struct lagg_softc *sc, uint8_t *lladdr) { struct ifnet *ifp = sc->sc_ifp; @@ -577,11 +583,16 @@ lagg_lladdr(struct lagg_softc *sc, uint8 bcopy(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN); lagg_proto_lladdr(sc); + /* + * Send notification request for lagg interface + * itself. Note that new lladdr is already set. + */ bzero(&lp, sizeof(lp)); lp.lp_ifp = sc->sc_ifp; lp.lp_softc = sc; - lagg_port_lladdr(&lp, lladdr); + /* Do not request lladdr change */ + lagg_port_lladdr(&lp, lladdr, LAGG_LLQTYPE_VIRT); } static void @@ -622,51 +633,58 @@ lagg_capabilities(struct lagg_softc *sc) } } -static void -lagg_port_lladdr(struct lagg_port *lp, uint8_t *lladdr) +/* + * Enqueue interface lladdr notification. + * If request is already queued, it is updated. + * If setting lladdr is also desired, @do_change has to be set to 1. + * + * Set noinline to be dtrace-friendly + */ +static __noinline void +lagg_port_lladdr(struct lagg_port *lp, uint8_t *lladdr, lagg_llqtype llq_type) { struct lagg_softc *sc = lp->lp_softc; struct ifnet *ifp = lp->lp_ifp; struct lagg_llq *llq; - int pending = 0; - int primary; LAGG_WLOCK_ASSERT(sc); - primary = (sc->sc_primary->lp_ifp == ifp) ? 1 : 0; - if (primary == 0 && (lp->lp_detaching || - memcmp(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN) == 0)) + /* + * Do not enqueue requests where lladdr is the same for + * "physical" interfaces (e.g. ports in lagg) + */ + if (llq_type == LAGG_LLQTYPE_PHYS && + memcmp(IF_LLADDR(ifp), lladdr, ETHER_ADDR_LEN) == 0) return; /* Check to make sure its not already queued to be changed */ SLIST_FOREACH(llq, &sc->sc_llq_head, llq_entries) { - if (llq->llq_ifp == ifp && llq->llq_primary == primary) { - pending = 1; - break; + if (llq->llq_ifp == ifp) { + /* Update lladdr, it may have changed */ + bcopy(lladdr, llq->llq_lladdr, ETHER_ADDR_LEN); + return; } } - if (!pending) { - llq = malloc(sizeof(struct lagg_llq), M_DEVBUF, M_NOWAIT); - if (llq == NULL) /* XXX what to do */ - return; - } + llq = malloc(sizeof(struct lagg_llq), M_DEVBUF, M_NOWAIT | M_ZERO); + if (llq == NULL) /* XXX what to do */ + return; - /* Update the lladdr even if pending, it may have changed */ llq->llq_ifp = ifp; - llq->llq_primary = primary; + llq->llq_type = llq_type; bcopy(lladdr, llq->llq_lladdr, ETHER_ADDR_LEN); - - if (!pending) - SLIST_INSERT_HEAD(&sc->sc_llq_head, llq, llq_entries); + /* XXX: We should insert to tail */ + SLIST_INSERT_HEAD(&sc->sc_llq_head, llq, llq_entries); taskqueue_enqueue(taskqueue_swi, &sc->sc_lladdr_task); } /* * Set the interface MAC address from a taskqueue to avoid a LOR. + * + * Set noinline to be dtrace-friendly */ -static void +static __noinline void lagg_port_setlladdr(void *arg, int pending) { struct lagg_softc *sc = (struct lagg_softc *)arg; @@ -688,17 +706,20 @@ lagg_port_setlladdr(void *arg, int pendi ifp = llq->llq_ifp; CURVNET_SET(ifp->if_vnet); - if (llq->llq_primary == 0) { - /* - * Set the link layer address on the laggport interface. - * if_setlladdr() triggers gratuitous ARPs for INET. - */ + error = 0; + + /* + * Set the link layer address on the laggport interface. + * Note that if_setlladdr() or iflladdr_event handler + * may result in arp transmission / lltable updates. + */ + if (llq->llq_type == LAGG_LLQTYPE_PHYS) error = if_setlladdr(ifp, llq->llq_lladdr, ETHER_ADDR_LEN); - if (error) - printf("%s: setlladdr failed on %s\n", __func__, - ifp->if_xname); - } else + if (error) + printf("%s: setlladdr failed on %s\n", __func__, + ifp->if_xname); + else EVENTHANDLER_INVOKE(iflladdr_event, ifp); CURVNET_RESTORE(); head = SLIST_NEXT(llq, llq_entries); @@ -730,7 +751,7 @@ lagg_port_create(struct lagg_softc *sc, } /* XXX Disallow non-ethernet interfaces (this should be any of 802) */ - if (ifp->if_type != IFT_ETHER) + if (ifp->if_type != IFT_ETHER && ifp->if_type != IFT_L2VLAN) return (EPROTONOSUPPORT); /* Allow the first Ethernet member to define the MTU */ @@ -784,10 +805,15 @@ lagg_port_create(struct lagg_softc *sc, if (SLIST_EMPTY(&sc->sc_ports)) { sc->sc_primary = lp; + /* First port in lagg. Update/notify lagg lladdress */ lagg_lladdr(sc, IF_LLADDR(ifp)); } else { - /* Update link layer address for this port */ - lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp)); + + /* + * Update link layer address for this port and + * send notifications to other subsystems. + */ + lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp), LAGG_LLQTYPE_PHYS); } /* @@ -873,7 +899,7 @@ lagg_port_destroy(struct lagg_port *lp, if (!lp->lp_detaching) { lagg_ether_cmdmulti(lp, 0); lagg_setflags(lp, 0); - lagg_port_lladdr(lp, lp->lp_lladdr); + lagg_port_lladdr(lp, lp->lp_lladdr, LAGG_LLQTYPE_PHYS); } /* Restore interface */ @@ -905,19 +931,16 @@ lagg_port_destroy(struct lagg_port *lp, } lagg_lladdr(sc, lladdr); + /* Mark lp0 as new primary */ + sc->sc_primary = lp0; + /* - * Update link layer address for each port. No port is - * marked as primary at this moment. + * Enqueue lladdr update/notification for each port + * (new primary needs update as well, to switch from + * old lladdr to its 'real' one). */ SLIST_FOREACH(lp_ptr, &sc->sc_ports, lp_entries) - lagg_port_lladdr(lp_ptr, lladdr); - /* - * Mark lp0 as the new primary. This invokes an - * iflladdr_event. - */ - sc->sc_primary = lp0; - if (lp0 != NULL) - lagg_port_lladdr(lp0, lladdr); + lagg_port_lladdr(lp_ptr, lladdr, LAGG_LLQTYPE_PHYS); } /* Remove any pending lladdr changes from the queue */ @@ -1149,8 +1172,8 @@ static void lagg_init(void *xsc) { struct lagg_softc *sc = (struct lagg_softc *)xsc; - struct lagg_port *lp; struct ifnet *ifp = sc->sc_ifp; + struct lagg_port *lp; if (ifp->if_drv_flags & IFF_DRV_RUNNING) return; @@ -1158,9 +1181,14 @@ lagg_init(void *xsc) LAGG_WLOCK(sc); ifp->if_drv_flags |= IFF_DRV_RUNNING; - /* Update the port lladdrs */ + + /* + * Update the port lladdrs if needed. + * This might be if_setlladdr() notification + * that lladdr has been changed. + */ SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) - lagg_port_lladdr(lp, IF_LLADDR(ifp)); + lagg_port_lladdr(lp, IF_LLADDR(ifp), LAGG_LLQTYPE_PHYS); lagg_proto_init(sc); @@ -1244,6 +1272,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd LAGG_WLOCK(sc); lagg_proto_detach(sc); + LAGG_UNLOCK_ASSERT(sc); lagg_proto_attach(sc, ra->ra_proto); break; case SIOCGLAGGOPTS: Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Sun Nov 1 19:55:32 2015 (r290238) +++ head/sys/net/if_lagg.h Sun Nov 1 19:59:04 2015 (r290239) @@ -201,11 +201,16 @@ struct lagg_mc { SLIST_ENTRY(lagg_mc) mc_entries; }; +typedef enum { + LAGG_LLQTYPE_PHYS = 0, /* Task related to physical (underlying) port */ + LAGG_LLQTYPE_VIRT, /* Task related to lagg interface itself */ +} lagg_llqtype; + /* List of interfaces to have the MAC address modified */ struct lagg_llq { struct ifnet *llq_ifp; uint8_t llq_lladdr[ETHER_ADDR_LEN]; - uint8_t llq_primary; + lagg_llqtype llq_type; SLIST_ENTRY(lagg_llq) llq_entries; }; @@ -273,6 +278,7 @@ struct lagg_port { #define LAGG_WUNLOCK(_sc) rm_wunlock(&(_sc)->sc_mtx) #define LAGG_RLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_RLOCKED) #define LAGG_WLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_WLOCKED) +#define LAGG_UNLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_UNLOCKED) extern struct mbuf *(*lagg_input_p)(struct ifnet *, struct mbuf *); extern void (*lagg_linkstate_p)(struct ifnet *, int ); From owner-svn-src-head@freebsd.org Sun Nov 1 21:59:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F8A1A24AA5; Sun, 1 Nov 2015 21:59:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F7321D28; Sun, 1 Nov 2015 21:59:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA1Lxvq0041601; Sun, 1 Nov 2015 21:59:57 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA1LxvZq041599; Sun, 1 Nov 2015 21:59:57 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201511012159.tA1LxvZq041599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 1 Nov 2015 21:59:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290243 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 21:59:58 -0000 Author: gonzo Date: Sun Nov 1 21:59:56 2015 New Revision: 290243 URL: https://svnweb.freebsd.org/changeset/base/290243 Log: Treat synchronous VFP exception just like aynchronous: as an FP exception, not as illegal instruction Modified: head/sys/arm/arm/vfp.c head/sys/arm/include/vfp.h Modified: head/sys/arm/arm/vfp.c ============================================================================== --- head/sys/arm/arm/vfp.c Sun Nov 1 21:20:29 2015 (r290242) +++ head/sys/arm/arm/vfp.c Sun Nov 1 21:59:56 2015 (r290243) @@ -179,12 +179,12 @@ vfp_bounce(u_int addr, u_int insn, struc fpexc = fmrx(fpexc); if (fpexc & VFPEXC_EN) { /* Clear any exceptions */ - fmxr(fpexc, fpexc & ~(VFPEXC_EX | VFPEXC_FP2V)); + fmxr(fpexc, fpexc & ~(VFPEXC_EX | VFPEXC_DEX | VFPEXC_FP2V)); /* kill the process - we do not handle emulation */ critical_exit(); - if (fpexc & VFPEXC_EX) { + if (fpexc & (VFPEXC_EX | VFPEXC_DEX)) { /* We have an exception, signal a SIGFPE */ ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGFPE; Modified: head/sys/arm/include/vfp.h ============================================================================== --- head/sys/arm/include/vfp.h Sun Nov 1 21:20:29 2015 (r290242) +++ head/sys/arm/include/vfp.h Sun Nov 1 21:59:56 2015 (r290243) @@ -92,6 +92,7 @@ /* VFPEXC */ #define VFPEXC_EX (0x80000000) /* exception v1 v2 */ #define VFPEXC_EN (0x40000000) /* vfp enable */ +#define VFPEXC_DEX (0x20000000) /* Synchronous exception */ #define VFPEXC_FP2V (0x10000000) /* FPINST2 valid */ #define VFPEXC_INV (0x00000080) /* Input exception */ #define VFPEXC_UFC (0x00000008) /* Underflow exception */ From owner-svn-src-head@freebsd.org Sun Nov 1 22:07:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6544AA24BF0; Sun, 1 Nov 2015 22:07:42 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FCD810C5; Sun, 1 Nov 2015 22:07:42 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA1M7f16044436; Sun, 1 Nov 2015 22:07:41 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA1M7egG044433; Sun, 1 Nov 2015 22:07:40 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201511012207.tA1M7egG044433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 1 Nov 2015 22:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290244 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 22:07:42 -0000 Author: jilles Date: Sun Nov 1 22:07:40 2015 New Revision: 290244 URL: https://svnweb.freebsd.org/changeset/base/290244 Log: sh: Avoid copying argv for simple commands. Add dummy entries before and after so arglist's array is directly usable as argv. Modified: head/bin/sh/eval.c head/bin/sh/expand.c head/bin/sh/expand.h Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sun Nov 1 21:59:56 2015 (r290243) +++ head/bin/sh/eval.c Sun Nov 1 22:07:40 2015 (r290244) @@ -750,7 +750,7 @@ isdeclarationcmd(struct narg *arg) } static void -xtracecommand(struct arglist *varlist, struct arglist *arglist) +xtracecommand(struct arglist *varlist, int argc, char **argv) { char sep = 0; const char *text, *p, *ps4; @@ -771,8 +771,8 @@ xtracecommand(struct arglist *varlist, s out2qstr(text); sep = ' '; } - for (i = 0; i < arglist->count; i++) { - text = arglist->args[i]; + for (i = 0; i < argc; i++) { + text = argv[i]; if (sep != 0) out2c(' '); out2qstr(text); @@ -849,6 +849,8 @@ evalcommand(union node *cmd, int flags, do_clearcmdentry = 0; oexitstatus = exitstatus; exitstatus = 0; + /* Add one slot at the beginning for tryexec(). */ + appendarglist(&arglist, nullstr); for (argp = cmd->ncmd.args ; argp ; argp = argp->narg.next) { if (varflag && isassignment(argp->narg.text)) { expandarg(argp, varflag == 1 ? &varlist : &arglist, @@ -858,13 +860,11 @@ evalcommand(union node *cmd, int flags, varflag = isdeclarationcmd(&argp->narg) ? 2 : 0; expandarg(argp, &arglist, EXP_FULL | EXP_TILDE); } + appendarglist(&arglist, nullstr); expredir(cmd->ncmd.redirect); - argc = arglist.count; - /* Add one slot at the beginning for tryexec(). */ - argv = stalloc(sizeof (char *) * (argc + 2)); - argv++; + argc = arglist.count - 2; + argv = &arglist.args[1]; - memcpy(argv, arglist.args, sizeof(*argv) * argc); argv[argc] = NULL; lastarg = NULL; if (iflag && funcnest == 0 && argc > 0) @@ -872,7 +872,7 @@ evalcommand(union node *cmd, int flags, /* Print the command if xflag is set. */ if (xflag) - xtracecommand(&varlist, &arglist); + xtracecommand(&varlist, argc, argv); /* Now locate the command. */ if (argc == 0) { Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sun Nov 1 21:59:56 2015 (r290243) +++ head/bin/sh/expand.c Sun Nov 1 22:07:40 2015 (r290244) @@ -114,7 +114,6 @@ static void expmeta(char *, char *, stru static int expsortcmp(const void *, const void *); static int patmatch(const char *, const char *, int); static char *cvtnum(int, char *); -static void appendarglist(struct arglist *, char *); static int collate_range_cmp(wchar_t, wchar_t); void @@ -126,7 +125,7 @@ emptyarglist(struct arglist *list) list->capacity = sizeof(list->smallarg) / sizeof(list->smallarg[0]); } -static void +void appendarglist(struct arglist *list, char *str) { char **newargs; Modified: head/bin/sh/expand.h ============================================================================== --- head/bin/sh/expand.h Sun Nov 1 21:59:56 2015 (r290243) +++ head/bin/sh/expand.h Sun Nov 1 22:07:40 2015 (r290244) @@ -52,6 +52,7 @@ struct arglist { void emptyarglist(struct arglist *); +void appendarglist(struct arglist *, char *); union node; void expandarg(union node *, struct arglist *, int); void rmescapes(char *); From owner-svn-src-head@freebsd.org Sun Nov 1 22:17:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4695A24D4F; Sun, 1 Nov 2015 22:17:41 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D6F314D3; Sun, 1 Nov 2015 22:17:41 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA1MHe1I047234; Sun, 1 Nov 2015 22:17:40 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA1MHdMJ047219; Sun, 1 Nov 2015 22:17:39 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201511012217.tA1MHdMJ047219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 1 Nov 2015 22:17:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290245 - in head/sys/contrib/vchiq/interface: vchi vchiq_arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 22:17:41 -0000 Author: gonzo Date: Sun Nov 1 22:17:39 2015 New Revision: 290245 URL: https://svnweb.freebsd.org/changeset/base/290245 Log: Synchronize with latest upstream VCHI code: - Add LIB_VERSION ioctl - Add CLOSE_DELIVERED ioctl - Bump code version Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5 Added: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_debugfs.c (contents, props changed) head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_debugfs.h (contents, props changed) head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_killable.h (contents, props changed) Deleted: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_proc.c Modified: head/sys/contrib/vchiq/interface/vchi/vchi.h head/sys/contrib/vchiq/interface/vchi/vchi_common.h head/sys/contrib/vchiq/interface/vchiq_arm/vchiq.h head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.h head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_cfg.h head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_connected.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_connected.h head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_if.h head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_ioctl.h head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kern_lib.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_shim.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_util.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_util.h Modified: head/sys/contrib/vchiq/interface/vchi/vchi.h ============================================================================== --- head/sys/contrib/vchiq/interface/vchi/vchi.h Sun Nov 1 22:07:40 2015 (r290244) +++ head/sys/contrib/vchiq/interface/vchi/vchi.h Sun Nov 1 22:17:39 2015 (r290245) @@ -220,7 +220,12 @@ extern int32_t vchi_service_use( const V // Routine to decrement ref count on a named service extern int32_t vchi_service_release( const VCHI_SERVICE_HANDLE_T handle ); -// Routine to send a message accross a service +// Routine to set a control option for a named service +extern int32_t vchi_service_set_option( const VCHI_SERVICE_HANDLE_T handle, + VCHI_SERVICE_OPTION_T option, + int value); + +// Routine to send a message across a service extern int32_t vchi_msg_queue( VCHI_SERVICE_HANDLE_T handle, const void *data, uint32_t data_size, Modified: head/sys/contrib/vchiq/interface/vchi/vchi_common.h ============================================================================== --- head/sys/contrib/vchiq/interface/vchi/vchi_common.h Sun Nov 1 22:07:40 2015 (r290244) +++ head/sys/contrib/vchiq/interface/vchi/vchi_common.h Sun Nov 1 22:17:39 2015 (r290245) @@ -110,7 +110,19 @@ typedef enum VCHI_CALLBACK_REASON_MAX } VCHI_CALLBACK_REASON_T; -//Calback used by all services / bulk transfers +// service control options +typedef enum +{ + VCHI_SERVICE_OPTION_MIN, + + VCHI_SERVICE_OPTION_TRACE, + VCHI_SERVICE_OPTION_SYNCHRONOUS, + + VCHI_SERVICE_OPTION_MAX +} VCHI_SERVICE_OPTION_T; + + +//Callback used by all services / bulk transfers typedef void (*VCHI_CALLBACK_T)( void *callback_param, //my service local param VCHI_CALLBACK_REASON_T reason, void *handle ); //for transmitting msg's only Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq.h ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq.h Sun Nov 1 22:07:40 2015 (r290244) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq.h Sun Nov 1 22:17:39 2015 (r290245) @@ -38,4 +38,3 @@ #include "vchiq_util.h" #endif - Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Sun Nov 1 22:07:40 2015 (r290244) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Sun Nov 1 22:17:39 2015 (r290245) @@ -61,6 +61,7 @@ MALLOC_DEFINE(M_VCPAGELIST, "vcpagelist" #include "vchiq_arm.h" #include "vchiq_2835.h" #include "vchiq_connected.h" +#include "vchiq_killable.h" #define MAX_FRAGMENTS (VCHIQ_NUM_CURRENT_BULKS * 2) Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Sun Nov 1 22:07:40 2015 (r290244) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Sun Nov 1 22:17:39 2015 (r290245) @@ -1,4 +1,5 @@ /** + * Copyright (c) 2014 Raspberry Pi (Trading) Ltd. All rights reserved. * Copyright (c) 2010-2012 Broadcom. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -102,13 +103,15 @@ typedef struct user_service_struct { VCHIQ_SERVICE_T *service; void *userdata; VCHIQ_INSTANCE_T instance; - int is_vchi; - int dequeue_pending; + char is_vchi; + char dequeue_pending; + char close_pending; int message_available_pos; int msg_insert; int msg_remove; struct semaphore insert_event; struct semaphore remove_event; + struct semaphore close_event; VCHIQ_HEADER_T * msg_queue[MSG_QUEUE_SIZE]; } USER_SERVICE_T; @@ -131,11 +134,15 @@ struct vchiq_instance_struct { int closing; int pid; int mark; + int use_close_delivered; + int trace; struct list_head bulk_waiter_list; struct mutex bulk_waiter_list_mutex; - struct proc_dir_entry *proc_entry; +#ifdef notyet + VCHIQ_DEBUGFS_NODE_T proc_entry; +#endif }; typedef struct dump_context_struct { @@ -165,7 +172,9 @@ static const char *const ioctl_names[] = "USE_SERVICE", "RELEASE_SERVICE", "SET_SERVICE_OPTION", - "DUMP_PHYS_MEM" + "DUMP_PHYS_MEM", + "LIB_VERSION", + "CLOSE_DELIVERED" }; vchiq_static_assert((sizeof(ioctl_names)/sizeof(ioctl_names[0])) == @@ -232,10 +241,13 @@ add_completion(VCHIQ_INSTANCE_T instance completion->service_userdata = user_service->service; completion->bulk_userdata = bulk_userdata; - if (reason == VCHIQ_SERVICE_CLOSED) + if (reason == VCHIQ_SERVICE_CLOSED) { /* Take an extra reference, to be held until this CLOSED notification is delivered. */ lock_service(user_service->service); + if (instance->use_close_delivered) + user_service->close_pending = 1; + } /* A write barrier is needed here to ensure that the entire completion record is written out before the insert point. */ @@ -282,10 +294,10 @@ service_callback(VCHIQ_REASON_T reason, return VCHIQ_SUCCESS; vchiq_log_trace(vchiq_arm_log_level, - "service_callback - service %lx(%d), handle %x, reason %d, header %lx, " + "service_callback - service %lx(%d,%p), reason %d, header %lx, " "instance %lx, bulk_userdata %lx", (unsigned long)user_service, - service->localport, service->handle, + service->localport, user_service->userdata, reason, (unsigned long)header, (unsigned long)instance, (unsigned long)bulk_userdata); @@ -377,6 +389,28 @@ user_service_free(void *userdata) /**************************************************************************** * +* close_delivered +* +***************************************************************************/ +static void close_delivered(USER_SERVICE_T *user_service) +{ + vchiq_log_info(vchiq_arm_log_level, + "close_delivered(handle=%x)", + user_service->service->handle); + + if (user_service->close_pending) { + /* Allow the underlying service to be culled */ + unlock_service(user_service->service); + + /* Wake the user-thread blocked in close_ or remove_service */ + up(&user_service->close_event); + + user_service->close_pending = 0; + } +} + +/**************************************************************************** +* * vchiq_ioctl * ***************************************************************************/ @@ -496,14 +530,16 @@ vchiq_ioctl(struct cdev *cdev, u_long cm user_service->service = service; user_service->userdata = userdata; user_service->instance = instance; - user_service->is_vchi = args.is_vchi; + user_service->is_vchi = (args.is_vchi != 0); user_service->dequeue_pending = 0; + user_service->close_pending = 0; user_service->message_available_pos = instance->completion_remove - 1; user_service->msg_insert = 0; user_service->msg_remove = 0; _sema_init(&user_service->insert_event, 0); _sema_init(&user_service->remove_event, 0); + _sema_init(&user_service->close_event, 0); if (args.is_open) { status = vchiq_open_service_internal @@ -543,8 +579,24 @@ vchiq_ioctl(struct cdev *cdev, u_long cm #endif service = find_service_for_instance(instance, handle); - if (service != NULL) - status = vchiq_close_service(service->handle); + if (service != NULL) { + USER_SERVICE_T *user_service = + (USER_SERVICE_T *)service->base.userdata; + /* close_pending is false on first entry, and when the + wait in vchiq_close_service has been interrupted. */ + if (!user_service->close_pending) { + status = vchiq_close_service(service->handle); + if (status != VCHIQ_SUCCESS) + break; + } + + /* close_pending is true once the underlying service + has been closed until the client library calls the + CLOSE_DELIVERED ioctl, signalling close_event. */ + if (user_service->close_pending && + down_interruptible(&user_service->close_event)) + status = VCHIQ_RETRY; + } else ret = -EINVAL; } break; @@ -559,8 +611,24 @@ vchiq_ioctl(struct cdev *cdev, u_long cm #endif service = find_service_for_instance(instance, handle); - if (service != NULL) - status = vchiq_remove_service(service->handle); + if (service != NULL) { + USER_SERVICE_T *user_service = + (USER_SERVICE_T *)service->base.userdata; + /* close_pending is false on first entry, and when the + wait in vchiq_close_service has been interrupted. */ + if (!user_service->close_pending) { + status = vchiq_remove_service(service->handle); + if (status != VCHIQ_SUCCESS) + break; + } + + /* close_pending is true once the underlying service + has been closed until the client library calls the + CLOSE_DELIVERED ioctl, signalling close_event. */ + if (user_service->close_pending && + down_interruptible(&user_service->close_event)) + status = VCHIQ_RETRY; + } else ret = -EINVAL; } break; @@ -824,8 +892,9 @@ vchiq_ioctl(struct cdev *cdev, u_long cm completion->header = msgbuf; } - if (completion->reason == - VCHIQ_SERVICE_CLOSED) + if ((completion->reason == + VCHIQ_SERVICE_CLOSED) && + !instance->use_close_delivered) unlock_service(service1); if (copy_to_user((void __user *)( @@ -1007,6 +1076,29 @@ vchiq_ioctl(struct cdev *cdev, u_long cm #endif } break; + case VCHIQ_IOC_LIB_VERSION: { + unsigned int lib_version = (unsigned int)arg; + + if (lib_version < VCHIQ_VERSION_MIN) + ret = -EINVAL; + else if (lib_version >= VCHIQ_VERSION_CLOSE_DELIVERED) + instance->use_close_delivered = 1; + } break; + + case VCHIQ_IOC_CLOSE_DELIVERED: { + VCHIQ_SERVICE_HANDLE_T handle; + memcpy(&handle, (const void*)arg, sizeof(handle)); + + service = find_closed_service_for_instance(instance, handle); + if (service != NULL) { + USER_SERVICE_T *user_service = + (USER_SERVICE_T *)service->base.userdata; + close_delivered(user_service); + } + else + ret = -EINVAL; + } break; + default: ret = -ENOTTY; break; @@ -1209,7 +1301,15 @@ vchiq_close(struct cdev *dev, int flags (MAX_COMPLETIONS - 1)]; service1 = completion->service_userdata; if (completion->reason == VCHIQ_SERVICE_CLOSED) + { + USER_SERVICE_T *user_service = + service->base.userdata; + + /* Wake any blocked user-thread */ + if (instance->use_close_delivered) + up(&user_service->close_event); unlock_service(service1); + } instance->completion_remove++; } @@ -1704,7 +1804,7 @@ vchiq_arm_init_state(VCHIQ_STATE_T *stat ** VC_RESUME_FAILED - Currently unused - no mechanism to fail resume exists. */ -inline void +void set_suspend_state(VCHIQ_ARM_STATE_T *arm_state, enum vc_suspend_status new_state) { @@ -1725,6 +1825,7 @@ set_suspend_state(VCHIQ_ARM_STATE_T *arm complete_all(&arm_state->vc_resume_complete); break; case VC_SUSPEND_IDLE: + /* TODO: reinit_completion */ INIT_COMPLETION(arm_state->vc_suspend_complete); break; case VC_SUSPEND_REQUESTED: @@ -1741,7 +1842,7 @@ set_suspend_state(VCHIQ_ARM_STATE_T *arm } } -inline void +void set_resume_state(VCHIQ_ARM_STATE_T *arm_state, enum vc_resume_status new_state) { @@ -1753,6 +1854,7 @@ set_resume_state(VCHIQ_ARM_STATE_T *arm_ case VC_RESUME_FAILED: break; case VC_RESUME_IDLE: + /* TODO: reinit_completion */ INIT_COMPLETION(arm_state->vc_resume_complete); break; case VC_RESUME_REQUESTED: @@ -1815,6 +1917,7 @@ block_resume(VCHIQ_ARM_STATE_T *arm_stat * (which only happens when blocked_count hits 0) then those threads * will have to wait until next time around */ if (arm_state->blocked_count) { + /* TODO: reinit_completion */ INIT_COMPLETION(arm_state->blocked_blocker); write_unlock_bh(&arm_state->susp_res_lock); vchiq_log_info(vchiq_susp_log_level, "%s wait for previously " @@ -1860,6 +1963,7 @@ block_resume(VCHIQ_ARM_STATE_T *arm_stat write_lock_bh(&arm_state->susp_res_lock); resume_count++; } + /* TODO: reinit_completion */ INIT_COMPLETION(arm_state->resume_blocker); arm_state->resume_blocked = 1; Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.h ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.h Sun Nov 1 22:07:40 2015 (r290244) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.h Sun Nov 1 22:17:39 2015 (r290245) @@ -1,4 +1,5 @@ /** + * Copyright (c) 2014 Raspberry Pi (Trading) Ltd. All rights reserved. * Copyright (c) 2010-2012 Broadcom. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -153,6 +154,9 @@ vchiq_check_resume(VCHIQ_STATE_T *state) extern void vchiq_check_suspend(VCHIQ_STATE_T *state); +VCHIQ_STATUS_T +vchiq_use_service(VCHIQ_SERVICE_HANDLE_T handle); + extern VCHIQ_STATUS_T vchiq_platform_suspend(VCHIQ_STATE_T *state); @@ -180,21 +184,32 @@ vchiq_use_internal(VCHIQ_STATE_T *state, extern VCHIQ_STATUS_T vchiq_release_internal(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service); -void +#ifdef notyet +extern VCHIQ_DEBUGFS_NODE_T * +vchiq_instance_get_debugfs_node(VCHIQ_INSTANCE_T instance); +#endif + +extern int +vchiq_instance_get_use_count(VCHIQ_INSTANCE_T instance); + +extern int +vchiq_instance_get_pid(VCHIQ_INSTANCE_T instance); + +extern int +vchiq_instance_get_trace(VCHIQ_INSTANCE_T instance); + +extern void +vchiq_instance_set_trace(VCHIQ_INSTANCE_T instance, int trace); + +extern void set_suspend_state(VCHIQ_ARM_STATE_T *arm_state, enum vc_suspend_status new_state); -void +extern void set_resume_state(VCHIQ_ARM_STATE_T *arm_state, enum vc_resume_status new_state); -void +extern void start_suspend_timer(VCHIQ_ARM_STATE_T *arm_state); -extern int vchiq_proc_init(void); -extern void vchiq_proc_deinit(void); -extern struct proc_dir_entry *vchiq_proc_top(void); -extern struct proc_dir_entry *vchiq_clients_top(void); - - #endif /* VCHIQ_ARM_H */ Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_cfg.h ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_cfg.h Sun Nov 1 22:07:40 2015 (r290244) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_cfg.h Sun Nov 1 22:17:39 2015 (r290245) @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2012 Broadcom. All rights reserved. + * Copyright (c) 2010-2014 Broadcom. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -36,11 +36,20 @@ #define VCHIQ_MAGIC VCHIQ_MAKE_FOURCC('V', 'C', 'H', 'I') /* The version of VCHIQ - change with any non-trivial change */ -#define VCHIQ_VERSION 6 +#define VCHIQ_VERSION 8 /* The minimum compatible version - update to match VCHIQ_VERSION with any ** incompatible change */ #define VCHIQ_VERSION_MIN 3 +/* The version that introduced the VCHIQ_IOC_LIB_VERSION ioctl */ +#define VCHIQ_VERSION_LIB_VERSION 7 + +/* The version that introduced the VCHIQ_IOC_CLOSE_DELIVERED ioctl */ +#define VCHIQ_VERSION_CLOSE_DELIVERED 7 + +/* The version that made it safe to use SYNCHRONOUS mode */ +#define VCHIQ_VERSION_SYNCHRONOUS_MODE 8 + #define VCHIQ_MAX_STATES 1 #define VCHIQ_MAX_SERVICES 4096 #define VCHIQ_MAX_SLOTS 128 Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_connected.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_connected.c Sun Nov 1 22:07:40 2015 (r290244) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_connected.c Sun Nov 1 22:17:39 2015 (r290245) @@ -33,6 +33,7 @@ #include "vchiq_connected.h" #include "vchiq_core.h" +#include "vchiq_killable.h" #define MAX_CALLBACKS 10 Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_connected.h ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_connected.h Sun Nov 1 22:07:40 2015 (r290244) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_connected.h Sun Nov 1 22:17:39 2015 (r290245) @@ -48,4 +48,3 @@ void vchiq_add_connected_callback(VCHIQ_ void vchiq_call_connected_callbacks(void); #endif /* VCHIQ_CONNECTED_H */ - Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c Sun Nov 1 22:07:40 2015 (r290244) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c Sun Nov 1 22:17:39 2015 (r290245) @@ -32,6 +32,7 @@ */ #include "vchiq_core.h" +#include "vchiq_killable.h" #define VCHIQ_SLOT_HANDLER_STACK 8192 @@ -47,9 +48,12 @@ #define SLOT_QUEUE_INDEX_FROM_POS(pos) \ ((int)((unsigned int)(pos) / VCHIQ_SLOT_SIZE)) - #define BULK_INDEX(x) (x & (VCHIQ_NUM_SERVICE_BULKS - 1)) +#define SRVTRACE_LEVEL(srv) \ + (((srv) && (srv)->trace) ? VCHIQ_LOG_TRACE : vchiq_core_msg_log_level) +#define SRVTRACE_ENABLED(srv, lev) \ + (((srv) && (srv)->trace) || (vchiq_core_msg_log_level >= (lev))) struct vchiq_open_payload { int fourcc; @@ -62,6 +66,13 @@ struct vchiq_openack_payload { short version; }; +enum +{ + QMFLAGS_IS_BLOCKING = (1 << 0), + QMFLAGS_NO_MUTEX_LOCK = (1 << 1), + QMFLAGS_NO_MUTEX_UNLOCK = (1 << 2) +}; + /* we require this for consistency between endpoints */ vchiq_static_assert(sizeof(VCHIQ_HEADER_T) == 8); vchiq_static_assert(IS_POW2(sizeof(VCHIQ_HEADER_T))); @@ -231,6 +242,31 @@ find_service_for_instance(VCHIQ_INSTANCE } VCHIQ_SERVICE_T * +find_closed_service_for_instance(VCHIQ_INSTANCE_T instance, + VCHIQ_SERVICE_HANDLE_T handle) { + VCHIQ_SERVICE_T *service; + + spin_lock(&service_spinlock); + service = handle_to_service(handle); + if (service && + ((service->srvstate == VCHIQ_SRVSTATE_FREE) || + (service->srvstate == VCHIQ_SRVSTATE_CLOSED)) && + (service->handle == handle) && + (service->instance == instance)) { + BUG_ON(service->ref_count == 0); + service->ref_count++; + } else + service = NULL; + spin_unlock(&service_spinlock); + + if (!service) + vchiq_log_info(vchiq_core_log_level, + "Invalid service handle 0x%x", handle); + + return service; +} + +VCHIQ_SERVICE_T * next_service_by_instance(VCHIQ_STATE_T *state, VCHIQ_INSTANCE_T instance, int *pidx) { @@ -726,7 +762,7 @@ process_free_queue(VCHIQ_STATE_T *state) static VCHIQ_STATUS_T queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, int msgid, const VCHIQ_ELEMENT_T *elements, - int count, int size, int is_blocking) + int count, int size, int flags) { VCHIQ_SHARED_STATE_T *local; VCHIQ_SERVICE_QUOTA_T *service_quota = NULL; @@ -741,7 +777,7 @@ queue_message(VCHIQ_STATE_T *state, VCHI WARN_ON(!(stride <= VCHIQ_SLOT_SIZE)); - if ((type != VCHIQ_MSG_RESUME) && + if (!(flags & QMFLAGS_NO_MUTEX_LOCK) && (lmutex_lock_interruptible(&state->slot_mutex) != 0)) return VCHIQ_RETRY; @@ -749,6 +785,8 @@ queue_message(VCHIQ_STATE_T *state, VCHI int tx_end_index; BUG_ON(!service); + BUG_ON((flags & (QMFLAGS_NO_MUTEX_LOCK | + QMFLAGS_NO_MUTEX_UNLOCK)) != 0); if (service->closing) { /* The service has been closed */ @@ -824,12 +862,16 @@ queue_message(VCHIQ_STATE_T *state, VCHI spin_unlock("a_spinlock); } - header = reserve_space(state, stride, is_blocking); + header = reserve_space(state, stride, flags & QMFLAGS_IS_BLOCKING); if (!header) { if (service) VCHIQ_SERVICE_STATS_INC(service, slot_stalls); - lmutex_unlock(&state->slot_mutex); + /* In the event of a failure, return the mutex to the + state it was in */ + if (!(flags & QMFLAGS_NO_MUTEX_LOCK)) + lmutex_unlock(&state->slot_mutex); + return VCHIQ_RETRY; } @@ -847,6 +889,8 @@ queue_message(VCHIQ_STATE_T *state, VCHI VCHIQ_MSG_DSTPORT(msgid)); BUG_ON(!service); + BUG_ON((flags & (QMFLAGS_NO_MUTEX_LOCK | + QMFLAGS_NO_MUTEX_UNLOCK)) != 0); for (i = 0, pos = 0; i < (unsigned int)count; pos += elements[i++].size) @@ -861,11 +905,11 @@ queue_message(VCHIQ_STATE_T *state, VCHI return VCHIQ_ERROR; } if (i == 0) { - if (vchiq_core_msg_log_level >= - VCHIQ_LOG_INFO) + if (SRVTRACE_ENABLED(service, + VCHIQ_LOG_INFO)) vchiq_log_dump_mem("Sent", 0, header->data + pos, - min(64, + min(64u, elements[0].size)); } } @@ -928,7 +972,7 @@ queue_message(VCHIQ_STATE_T *state, VCHI ? service->base.fourcc : VCHIQ_MAKE_FOURCC('?', '?', '?', '?'); - vchiq_log_info(vchiq_core_msg_log_level, + vchiq_log_info(SRVTRACE_LEVEL(service), "Sent Msg %s(%u) to %c%c%c%c s:%u d:%d len:%d", msg_type_str(VCHIQ_MSG_TYPE(msgid)), VCHIQ_MSG_TYPE(msgid), @@ -948,7 +992,7 @@ queue_message(VCHIQ_STATE_T *state, VCHI if (service && (type == VCHIQ_MSG_CLOSE)) vchiq_set_service_state(service, VCHIQ_SRVSTATE_CLOSESENT); - if (VCHIQ_MSG_TYPE(msgid) != VCHIQ_MSG_PAUSE) + if (!(flags & QMFLAGS_NO_MUTEX_UNLOCK)) lmutex_unlock(&state->slot_mutex); remote_event_signal(&state->remote->trigger); @@ -1013,7 +1057,7 @@ queue_message_sync(VCHIQ_STATE_T *state, VCHIQ_LOG_TRACE) vchiq_log_dump_mem("Sent Sync", 0, header->data + pos, - min(64, + min(64u, elements[0].size)); } } @@ -1320,11 +1364,11 @@ resolve_bulks(VCHIQ_SERVICE_T *service, vchiq_transfer_bulk(bulk); lmutex_unlock(&state->bulk_transfer_mutex); - if (vchiq_core_msg_log_level >= VCHIQ_LOG_INFO) { + if (SRVTRACE_ENABLED(service, VCHIQ_LOG_INFO)) { const char *header = (queue == &service->bulk_tx) ? "Send Bulk to" : "Recv Bulk from"; if (bulk->actual != VCHIQ_BULK_ACTUAL_ABORTED) - vchiq_log_info(vchiq_core_msg_log_level, + vchiq_log_info(SRVTRACE_LEVEL(service), "%s %c%c%c%c d:%d len:%d %x<->%x", header, VCHIQ_FOURCC_AS_4CHARS( @@ -1334,7 +1378,7 @@ resolve_bulks(VCHIQ_SERVICE_T *service, (unsigned int)bulk->data, (unsigned int)bulk->remote_data); else - vchiq_log_info(vchiq_core_msg_log_level, + vchiq_log_info(SRVTRACE_LEVEL(service), "%s %c%c%c%c d:%d ABORTED - tx len:%d," " rx len:%d %x<->%x", header, @@ -1381,7 +1425,7 @@ abort_outstanding_bulks(VCHIQ_SERVICE_T if (queue->process != queue->local_insert) { vchiq_complete_bulk(bulk); - vchiq_log_info(vchiq_core_msg_log_level, + vchiq_log_info(SRVTRACE_LEVEL(service), "%s %c%c%c%c d:%d ABORTED - tx len:%d, " "rx len:%d", is_tx ? "Send Bulk to" : "Recv Bulk from", @@ -1488,10 +1532,10 @@ parse_open(VCHIQ_STATE_T *state, VCHIQ_H if (service) { /* A matching service exists */ - short v = payload->version; + short version = payload->version; short version_min = payload->version_min; if ((service->version < version_min) || - (v < service->version_min)) { + (version < service->version_min)) { /* Version mismatch */ vchiq_loud_error_header(); vchiq_loud_error("%d: service %d (%c%c%c%c) " @@ -1500,12 +1544,13 @@ parse_open(VCHIQ_STATE_T *state, VCHIQ_H state->id, service->localport, VCHIQ_FOURCC_AS_4CHARS(fourcc), service->version, service->version_min, - v, version_min); + version, version_min); vchiq_loud_error_footer(); unlock_service(service); + service = NULL; goto fail_open; } - service->peer_version = v; + service->peer_version = version; if (service->srvstate == VCHIQ_SRVSTATE_LISTENING) { struct vchiq_openack_payload ack_payload = { @@ -1516,8 +1561,14 @@ parse_open(VCHIQ_STATE_T *state, VCHIQ_H sizeof(ack_payload) }; + if (state->version_common < + VCHIQ_VERSION_SYNCHRONOUS_MODE) + service->sync = 0; + /* Acknowledge the OPEN */ - if (service->sync) { + if (service->sync && + (state->version_common >= + VCHIQ_VERSION_SYNCHRONOUS_MODE)) { if (queue_message_sync(state, NULL, VCHIQ_MAKE_MSG( VCHIQ_MSG_OPENACK, @@ -1631,9 +1682,11 @@ parse_rx_slots(VCHIQ_STATE_T *state) case VCHIQ_MSG_BULK_RX_DONE: case VCHIQ_MSG_BULK_TX_DONE: service = find_service_by_port(state, localport); - if ((!service || service->remoteport != remoteport) && - (localport == 0) && - (type == VCHIQ_MSG_CLOSE)) { + if ((!service || + ((service->remoteport != remoteport) && + (service->remoteport != VCHIQ_PORT_FREE))) && + (localport == 0) && + (type == VCHIQ_MSG_CLOSE)) { /* This could be a CLOSE from a client which hadn't yet received the OPENACK - look for the connected service */ @@ -1665,13 +1718,13 @@ parse_rx_slots(VCHIQ_STATE_T *state) break; } - if (vchiq_core_msg_log_level >= VCHIQ_LOG_INFO) { + if (SRVTRACE_ENABLED(service, VCHIQ_LOG_INFO)) { int svc_fourcc; svc_fourcc = service ? service->base.fourcc : VCHIQ_MAKE_FOURCC('?', '?', '?', '?'); - vchiq_log_info(vchiq_core_msg_log_level, + vchiq_log_info(SRVTRACE_LEVEL(service), "Rcvd Msg %s(%u) from %c%c%c%c s:%d d:%d " "len:%d", msg_type_str(type), type, @@ -1741,7 +1794,7 @@ parse_rx_slots(VCHIQ_STATE_T *state) service->remoteport); break; case VCHIQ_MSG_DATA: - vchiq_log_trace(vchiq_core_log_level, + vchiq_log_info(vchiq_core_log_level, "%d: prs DATA@%x,%x (%d->%d)", state->id, (unsigned int)header, size, remoteport, localport); @@ -1769,6 +1822,8 @@ parse_rx_slots(VCHIQ_STATE_T *state) vchiq_log_info(vchiq_core_log_level, "%d: prs CONNECT@%x", state->id, (unsigned int)header); + state->version_common = ((VCHIQ_SLOT_ZERO_T *) + state->slot_data)->version; up(&state->connect); break; case VCHIQ_MSG_BULK_RX: @@ -1922,7 +1977,8 @@ parse_rx_slots(VCHIQ_STATE_T *state) /* Send a PAUSE in response */ if (queue_message(state, NULL, VCHIQ_MAKE_MSG(VCHIQ_MSG_PAUSE, 0, 0), - NULL, 0, 0, 0) == VCHIQ_RETRY) + NULL, 0, 0, QMFLAGS_NO_MUTEX_UNLOCK) + == VCHIQ_RETRY) goto bail_not_ready; if (state->is_master) pause_bulks(state); @@ -2021,7 +2077,9 @@ slot_handler_func(void *v) pause_bulks(state); if (queue_message(state, NULL, VCHIQ_MAKE_MSG(VCHIQ_MSG_PAUSE, 0, 0), - NULL, 0, 0, 0) != VCHIQ_RETRY) { + NULL, 0, 0, + QMFLAGS_NO_MUTEX_UNLOCK) + != VCHIQ_RETRY) { vchiq_set_conn_state(state, VCHIQ_CONNSTATE_PAUSE_SENT); } else { @@ -2039,7 +2097,8 @@ slot_handler_func(void *v) case VCHIQ_CONNSTATE_RESUMING: if (queue_message(state, NULL, VCHIQ_MAKE_MSG(VCHIQ_MSG_RESUME, 0, 0), - NULL, 0, 0, 0) != VCHIQ_RETRY) { + NULL, 0, 0, QMFLAGS_NO_MUTEX_LOCK) + != VCHIQ_RETRY) { if (state->is_master) resume_bulks(state); vchiq_set_conn_state(state, @@ -2162,6 +2221,7 @@ sync_func(void *v) service->remoteport = remoteport; vchiq_set_service_state(service, VCHIQ_SRVSTATE_OPENSYNC); + service->sync = 1; up(&service->remove_event); } release_message_sync(state, header); @@ -2341,6 +2401,9 @@ vchiq_init_state(VCHIQ_STATE_T *state, V return VCHIQ_ERROR; } + if (VCHIQ_VERSION < slot_zero->version) + slot_zero->version = VCHIQ_VERSION; + if (is_master) { local = &slot_zero->master; remote = &slot_zero->slave; @@ -2517,6 +2580,7 @@ vchiq_add_service_internal(VCHIQ_STATE_T service->auto_close = 1; service->sync = 0; service->closing = 0; + service->trace = 0; atomic_set(&service->poll_flags, 0); service->version = params->version; service->version_min = params->version_min; @@ -2647,8 +2711,9 @@ vchiq_open_service_internal(VCHIQ_SERVIC vchiq_use_service_internal(service); status = queue_message(service->state, NULL, VCHIQ_MAKE_MSG(VCHIQ_MSG_OPEN, service->localport, 0), - &body, 1, sizeof(payload), 1); + &body, 1, sizeof(payload), QMFLAGS_IS_BLOCKING); if (status == VCHIQ_SUCCESS) { + /* Wait for the ACK/NAK */ if (down_interruptible(&service->remove_event) != 0) { status = VCHIQ_RETRY; vchiq_release_service_internal(service); @@ -2675,7 +2740,18 @@ release_service_messages(VCHIQ_SERVICE_T int slot_last = state->remote->slot_last; int i; - /* Release any claimed messages */ + /* Release any claimed messages aimed at this service */ + + if (service->sync) { + VCHIQ_HEADER_T *header = + (VCHIQ_HEADER_T *)SLOT_DATA_FROM_INDEX(state, + state->remote->slot_sync); + if (VCHIQ_MSG_DSTPORT(header->msgid) == service->localport) + release_message_sync(state, header); + + return; + } + for (i = state->remote->slot_first; i <= slot_last; i++) { VCHIQ_SLOT_INFO_T *slot_info = SLOT_INFO_FROM_INDEX(state, i); @@ -2873,17 +2949,31 @@ vchiq_close_service_internal(VCHIQ_SERVI (VCHIQ_MSG_CLOSE, service->localport, VCHIQ_MSG_DSTPORT(service->remoteport)), - NULL, 0, 0, 0); + NULL, 0, 0, QMFLAGS_NO_MUTEX_UNLOCK); if (status == VCHIQ_SUCCESS) { - if (!close_recvd) + if (!close_recvd) { + /* Change the state while the mutex is + still held */ + vchiq_set_service_state(service, + VCHIQ_SRVSTATE_CLOSESENT); + lmutex_unlock(&state->slot_mutex); + if (service->sync) + lmutex_unlock(&state->sync_mutex); break; + } } else if (service->srvstate == VCHIQ_SRVSTATE_OPENSYNC) { lmutex_unlock(&state->sync_mutex); break; } else break; + /* Change the state while the mutex is still held */ + vchiq_set_service_state(service, VCHIQ_SRVSTATE_CLOSERECVD); + lmutex_unlock(&state->slot_mutex); + if (service->sync) + lmutex_unlock(&state->sync_mutex); + status = close_service_complete(service, VCHIQ_SRVSTATE_CLOSERECVD); break; @@ -2990,7 +3080,7 @@ vchiq_connect_internal(VCHIQ_STATE_T *st if (state->conn_state == VCHIQ_CONNSTATE_DISCONNECTED) { if (queue_message(state, NULL, VCHIQ_MAKE_MSG(VCHIQ_MSG_CONNECT, 0, 0), NULL, 0, - 0, 1) == VCHIQ_RETRY) + 0, QMFLAGS_IS_BLOCKING) == VCHIQ_RETRY) return VCHIQ_RETRY; vchiq_set_conn_state(state, VCHIQ_CONNSTATE_CONNECTING); @@ -3276,6 +3366,16 @@ vchiq_bulk_transfer(VCHIQ_SERVICE_HANDLE service->localport, service->remoteport, dir_char, size, (unsigned int)bulk->data, (unsigned int)userdata); + /* The slot mutex must be held when the service is being closed, so + claim it here to ensure that isn't happening */ + if (lmutex_lock_interruptible(&state->slot_mutex) != 0) { + status = VCHIQ_RETRY; + goto cancel_bulk_error_exit; + } + + if (service->srvstate != VCHIQ_SRVSTATE_OPEN) + goto unlock_both_error_exit; + if (state->is_master) { queue->local_insert++; if (resolve_bulks(service, queue)) @@ -3289,14 +3389,17 @@ vchiq_bulk_transfer(VCHIQ_SERVICE_HANDLE status = queue_message(state, NULL, VCHIQ_MAKE_MSG(dir_msgtype, service->localport, service->remoteport), - &element, 1, sizeof(payload), 1); + &element, 1, sizeof(payload), + QMFLAGS_IS_BLOCKING | + QMFLAGS_NO_MUTEX_LOCK | + QMFLAGS_NO_MUTEX_UNLOCK); if (status != VCHIQ_SUCCESS) { - vchiq_complete_bulk(bulk); - goto unlock_error_exit; + goto unlock_both_error_exit; } queue->local_insert++; } + lmutex_unlock(&state->slot_mutex); lmutex_unlock(&service->bulk_mutex); vchiq_log_trace(vchiq_core_log_level, @@ -3320,6 +3423,10 @@ waiting: return status; +unlock_both_error_exit: + lmutex_unlock(&state->slot_mutex); +cancel_bulk_error_exit: + vchiq_complete_bulk(bulk); unlock_error_exit: lmutex_unlock(&service->bulk_mutex); @@ -3530,6 +3637,11 @@ vchiq_set_service_option(VCHIQ_SERVICE_H } break; + case VCHIQ_SERVICE_OPTION_TRACE: + service->trace = value; + status = VCHIQ_SUCCESS; + break; + default: break; } Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h Sun Nov 1 22:07:40 2015 (r290244) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h Sun Nov 1 22:17:39 2015 (r290245) @@ -295,6 +295,7 @@ typedef struct vchiq_service_struct { char auto_close; char sync; char closing; + char trace; atomic_t poll_flags; short version; short version_min; @@ -402,6 +403,7 @@ struct vchiq_state_struct { int initialised; VCHIQ_CONNSTATE_T conn_state; int is_master; + short version_common; VCHIQ_SHARED_STATE_T *local; VCHIQ_SHARED_STATE_T *remote; @@ -606,6 +608,10 @@ find_service_for_instance(VCHIQ_INSTANCE VCHIQ_SERVICE_HANDLE_T handle); extern VCHIQ_SERVICE_T * +find_closed_service_for_instance(VCHIQ_INSTANCE_T instance, + VCHIQ_SERVICE_HANDLE_T handle); + +extern VCHIQ_SERVICE_T * next_service_by_instance(VCHIQ_STATE_T *state, VCHIQ_INSTANCE_T instance, int *pidx); Added: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_debugfs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_debugfs.c Sun Nov 1 22:17:39 2015 (r290245) @@ -0,0 +1,383 @@ +/** + * Copyright (c) 2014 Raspberry Pi (Trading) Ltd. All rights reserved. + * Copyright (c) 2010-2012 Broadcom. 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 the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The names of the above-listed copyright holders may not 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Nov 1 23:50:09 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FE9FA24BFF; Sun, 1 Nov 2015 23:50:09 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA7B219CA; Sun, 1 Nov 2015 23:50:08 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA1No7Z0073177; Sun, 1 Nov 2015 23:50:07 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA1No7tr073176; Sun, 1 Nov 2015 23:50:07 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201511012350.tA1No7tr073176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 1 Nov 2015 23:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290249 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 23:50:09 -0000 Author: gonzo Date: Sun Nov 1 23:50:07 2015 New Revision: 290249 URL: https://svnweb.freebsd.org/changeset/base/290249 Log: Add mailbox tag/structure for touchscreen buffer address property Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Sun Nov 1 23:48:16 2015 (r290248) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Sun Nov 1 23:50:07 2015 (r290249) @@ -438,6 +438,21 @@ struct bcm2835_mbox_tag_release_buffer { } body; }; +#define BCM2835_MBOX_TAG_GET_TOUCHBUF 0x0004000f + +struct bcm2835_mbox_tag_touchbuf { + struct bcm2835_mbox_hdr hdr; + struct bcm2835_mbox_tag_hdr tag_hdr; + union { + struct { + } req; + struct { + uint32_t address; + } resp; + } body; + uint32_t end_tag; +}; + struct bcm2835_fb_config { uint32_t xres; uint32_t yres; From owner-svn-src-head@freebsd.org Mon Nov 2 00:39:29 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF14FA23692; Mon, 2 Nov 2015 00:39:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A7E619F3; Mon, 2 Nov 2015 00:39:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA20dSr8087328; Mon, 2 Nov 2015 00:39:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA20dSNW087326; Mon, 2 Nov 2015 00:39:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020039.tA20dSNW087326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 00:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290250 - in head: share/man/man4 tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 00:39:30 -0000 Author: ngie Date: Mon Nov 2 00:39:28 2015 New Revision: 290250 URL: https://svnweb.freebsd.org/changeset/base/290250 Log: Conditionally install (if_)?(otus|rsu).4, otusfw.4, rsufw.4, and urtwn.4 if MK_USB != no Add the manpages to OptionalObsoleteFiles.inc As a side-effect, this also fixes installworld with MK_USB == no X-MFC with: r290128 Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man4/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Nov 1 23:50:07 2015 (r290249) +++ head/share/man/man4/Makefile Mon Nov 2 00:39:28 2015 (r290250) @@ -379,8 +379,6 @@ MAN= aac.4 \ oce.4 \ ohci.4 \ orm.4 \ - otus.4 \ - otusfw.4 \ ow.4 \ ow_temp.4 \ owc.4 \ @@ -425,8 +423,6 @@ MAN= aac.4 \ rndtest.4 \ route.4 \ rp.4 \ - rsu.4 \ - rsufw.4 \ rue.4 \ rum.4 \ run.4 \ @@ -672,7 +668,6 @@ MLINKS+=nge.4 if_nge.4 MLINKS+=${_ntb.4} ${_if_ntb.4} \ ${_ntb.4} ${_ntb_hw.4} MLINKS+=${_nxge.4} ${_if_nxge.4} -MLINKS+=otus.4 if_otus.4 MLINKS+=ow.4 onewire.4 MLINKS+=patm.4 if_patm.4 MLINKS+=pccbb.4 cbb.4 @@ -686,7 +681,6 @@ MLINKS+=rl.4 if_rl.4 MLINKS+=rue.4 if_rue.4 MLINKS+=rum.4 if_rum.4 MLINKS+=run.4 if_run.4 -MLINKS+=rsu.4 if_rsu.4 MLINKS+=scsi.4 CAM.4 \ scsi.4 cam.4 \ scsi.4 scbus.4 \ @@ -715,7 +709,6 @@ MLINKS+=tl.4 if_tl.4 MLINKS+=tun.4 if_tun.4 MLINKS+=tx.4 if_tx.4 MLINKS+=txp.4 if_txp.4 -MLINKS+=urtwn.4 if_urtwn.4 MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vxlan.4 if_vxlan.4 @@ -869,6 +862,10 @@ _pfsync.4= pfsync.4 .if ${MK_USB} != "no" MAN+= \ + otus.4 \ + otusfw.4 \ + rsu.4 \ + rsufw.4 \ u3g.4 \ uark.4 \ uart.4 \ @@ -922,6 +919,8 @@ MAN+= \ uvisor.4 \ uvscom.4 \ +MLINKS+=otus.4 if_otus.4 +MLINKS+=rsu.4 if_rsu.4 MLINKS+=u3g.4 u3gstub.4 MLINKS+=uath.4 if_uath.4 MLINKS+=udav.4 if_udav.4 @@ -929,6 +928,7 @@ MLINKS+=upgt.4 if_upgt.4 MLINKS+=ural.4 if_ural.4 MLINKS+=urndis.4 if_urndis.4 MLINKS+=${_urtw.4} ${_if_urtw.4} +MLINKS+=urtwn.4 if_urtwn.4 .endif .include Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 1 23:50:07 2015 (r290249) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Nov 2 00:39:28 2015 (r290250) @@ -8029,6 +8029,12 @@ OLD_FILES+=usr/share/man/man3/usb_set_co OLD_FILES+=usr/share/man/man3/usb_set_debug.3.gz OLD_FILES+=usr/share/man/man3/usb_strerror.3.gz OLD_FILES+=usr/share/man/man3/usbhid.3.gz +OLD_FILES+=usr/share/man/man4/if_otus.4.gz +OLD_FILES+=usr/share/man/man4/if_rsu.4.gz +OLD_FILES+=usr/share/man/man4/otus.4.gz +OLD_FILES+=usr/share/man/man4/otusfw.4.gz +OLD_FILES+=usr/share/man/man4/rsu.4.gz +OLD_FILES+=usr/share/man/man4/rsufw.4.gz OLD_FILES+=usr/share/man/man4/u3g.4.gz OLD_FILES+=usr/share/man/man4/u3gstub.4.gz OLD_FILES+=usr/share/man/man4/uark.4.gz From owner-svn-src-head@freebsd.org Mon Nov 2 00:42:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CAB1A237D9; Mon, 2 Nov 2015 00:42:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 470401D55; Mon, 2 Nov 2015 00:42:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA20gVP7089880; Mon, 2 Nov 2015 00:42:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA20gVfx089879; Mon, 2 Nov 2015 00:42:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020042.tA20gVfx089879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 00:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290251 - head/tools/regression/security/open_to_operation X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 00:42:32 -0000 Author: ngie Date: Mon Nov 2 00:42:31 2015 New Revision: 290251 URL: https://svnweb.freebsd.org/changeset/base/290251 Log: Use nitems(x) instead of sizeof(x)/sizeof(x[0]) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/security/open_to_operation/open_to_operation.c Modified: head/tools/regression/security/open_to_operation/open_to_operation.c ============================================================================== --- head/tools/regression/security/open_to_operation/open_to_operation.c Mon Nov 2 00:39:28 2015 (r290250) +++ head/tools/regression/security/open_to_operation/open_to_operation.c Mon Nov 2 00:42:31 2015 (r290251) @@ -119,10 +119,10 @@ __FBSDID("$FreeBSD$"); */ static const int file_modes[] = { O_RDONLY, O_WRONLY, O_RDWR, O_RDONLY | O_TRUNC, O_WRONLY | O_TRUNC, O_RDWR | O_TRUNC }; -static const int file_modes_count = sizeof(file_modes) / sizeof(int); +static const int file_modes_count = nitems(file_modes); static const int dir_modes[] = { O_RDONLY }; -static const int dir_modes_count = sizeof(dir_modes) / sizeof(int); +static const int dir_modes_count = nitems(dir_modes); static int testnum; static int aio_present; From owner-svn-src-head@freebsd.org Mon Nov 2 01:05:35 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2C29A23B7D; Mon, 2 Nov 2015 01:05:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A02261579; Mon, 2 Nov 2015 01:05:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA215Y5t095730; Mon, 2 Nov 2015 01:05:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA215YhV095725; Mon, 2 Nov 2015 01:05:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020105.tA215YhV095725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 01:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290252 - in head: . etc/defaults etc/periodic/daily tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 01:05:36 -0000 Author: ngie Date: Mon Nov 2 01:05:34 2015 New Revision: 290252 URL: https://svnweb.freebsd.org/changeset/base/290252 Log: Rename etc/periodic/daily/430.status-rwho to periodic/daily/430.status-uptime The command was checking local/remote system uptime, so rename the script to match its function and to avoid confusion The controlling variable in /etc/periodic.conf has been renamed from daily_status_rwho_enable to daily_status_uptime_enable. MFC after: 3 days Reported by: Peter Jeremy Relnotes: yes Sponsored by: EMC / Isilon Storage Division Added: head/etc/periodic/daily/430.status-uptime - copied, changed from r290251, head/etc/periodic/daily/430.status-rwho Deleted: head/etc/periodic/daily/430.status-rwho Modified: head/ObsoleteFiles.inc head/etc/defaults/periodic.conf head/etc/periodic/daily/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Nov 2 00:42:31 2015 (r290251) +++ head/ObsoleteFiles.inc Mon Nov 2 01:05:34 2015 (r290252) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20151101: 430.status-rwho was renamed to 430.status-uptime +OLD_FILES+=etc/periodic/daily/430.status-rwho # 20151030: OpenSSL 1.0.2d import OLD_FILES+=usr/share/openssl/man/man3/CMS_set1_signer_certs.3.gz OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_ctrl.3.gz Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Mon Nov 2 00:42:31 2015 (r290251) +++ head/etc/defaults/periodic.conf Mon Nov 2 01:05:34 2015 (r290252) @@ -115,8 +115,8 @@ daily_status_network_enable="YES" # Ch daily_status_network_usedns="YES" # DNS lookups are ok daily_status_network_netstat_flags="-d" # netstat(1) flags -# 430.status-rwho -daily_status_rwho_enable="YES" # Check system status +# 430.status-uptime +daily_status_uptime_enable="YES" # Check system uptime # 440.status-mailq daily_status_mailq_enable="YES" # Check mail status Copied and modified: head/etc/periodic/daily/430.status-uptime (from r290251, head/etc/periodic/daily/430.status-rwho) ============================================================================== --- head/etc/periodic/daily/430.status-rwho Mon Nov 2 00:42:31 2015 (r290251, copy source) +++ head/etc/periodic/daily/430.status-uptime Mon Nov 2 01:05:34 2015 (r290252) @@ -11,7 +11,7 @@ then source_periodic_confs fi -case "$daily_status_rwho_enable" in +case "$daily_status_uptime_enable" in [Yy][Ee][Ss]) rwho=$(echo /var/rwho/*) if [ -f "${rwho%% *}" ] Modified: head/etc/periodic/daily/Makefile ============================================================================== --- head/etc/periodic/daily/Makefile Mon Nov 2 00:42:31 2015 (r290251) +++ head/etc/periodic/daily/Makefile Mon Nov 2 01:05:34 2015 (r290252) @@ -15,6 +15,7 @@ FILES= 100.clean-disks \ 408.status-gstripe \ 409.status-gconcat \ 420.status-network \ + 430.status-uptime \ 450.status-security \ 510.status-world-kernel \ 999.local @@ -38,8 +39,7 @@ FILES+= 480.status-ntpd .endif .if ${MK_RCMDS} != "no" -FILES+= 140.clean-rwho \ - 430.status-rwho +FILES+= 140.clean-rwho .endif .if ${MK_SENDMAIL} != "no" Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Nov 2 00:42:31 2015 (r290251) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Nov 2 01:05:34 2015 (r290252) @@ -6517,8 +6517,7 @@ OLD_FILES+=usr/share/man/man8/repquota.8 .if ${MK_RCMDS} == no OLD_FILES+=bin/rcp OLD_FILES+=etc/rc.d/rwho -OLD_FILES+=etc/periodic/daily/140.clean-rwho -OLD_FILES+=etc/periodic/daily/430.status-rwho +OLD_FILES+=etc/periodic/daily/140.clean-rwho OLD_FILES+=rescue/rcp OLD_FILES+=usr/bin/rlogin OLD_FILES+=usr/bin/rsh From owner-svn-src-head@freebsd.org Mon Nov 2 01:22:09 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11125A23E25; Mon, 2 Nov 2015 01:22:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7DBB1D02; Mon, 2 Nov 2015 01:22:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA21M7BL001403; Mon, 2 Nov 2015 01:22:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA21M6Nq001392; Mon, 2 Nov 2015 01:22:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020122.tA21M6Nq001392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 01:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290253 - head/lib/libc/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 01:22:09 -0000 Author: ngie Date: Mon Nov 2 01:22:06 2015 New Revision: 290253 URL: https://svnweb.freebsd.org/changeset/base/290253 Log: Remove unnecessary `if (x)` tests before calling `free(x)`; free(3) already employs this check MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/rpc/clnt_bcast.c head/lib/libc/rpc/clnt_vc.c head/lib/libc/rpc/getnetconfig.c head/lib/libc/rpc/mt_misc.c head/lib/libc/rpc/rpc_soc.c head/lib/libc/rpc/rpcb_clnt.c head/lib/libc/rpc/svc.c head/lib/libc/rpc/svc_dg.c head/lib/libc/rpc/svc_simple.c head/lib/libc/rpc/svc_vc.c Modified: head/lib/libc/rpc/clnt_bcast.c ============================================================================== --- head/lib/libc/rpc/clnt_bcast.c Mon Nov 2 01:05:34 2015 (r290252) +++ head/lib/libc/rpc/clnt_bcast.c Mon Nov 2 01:22:06 2015 (r290253) @@ -636,13 +636,10 @@ rpc_broadcast_exp(rpcprog_t prog, rpcver } /* The giant for loop */ done_broad: - if (inbuf) - (void) free(inbuf); - if (outbuf) - (void) free(outbuf); + free(inbuf); + free(outbuf); #ifdef PORTMAP - if (outbuf_pmap) - (void) free(outbuf_pmap); + free(outbuf_pmap); #endif /* PORTMAP */ for (i = 0; i < fdlistno; i++) { (void)_close(fdlist[i].fd); Modified: head/lib/libc/rpc/clnt_vc.c ============================================================================== --- head/lib/libc/rpc/clnt_vc.c Mon Nov 2 01:05:34 2015 (r290252) +++ head/lib/libc/rpc/clnt_vc.c Mon Nov 2 01:22:06 2015 (r290253) @@ -651,8 +651,7 @@ clnt_vc_destroy(CLIENT *cl) (void)_close(ct->ct_fd); } XDR_DESTROY(&(ct->ct_xdrs)); - if (ct->ct_addr.buf) - free(ct->ct_addr.buf); + free(ct->ct_addr.buf); mem_free(ct, sizeof(struct ct_data)); if (cl->cl_netid && cl->cl_netid[0]) mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); Modified: head/lib/libc/rpc/getnetconfig.c ============================================================================== --- head/lib/libc/rpc/getnetconfig.c Mon Nov 2 01:05:34 2015 (r290252) +++ head/lib/libc/rpc/getnetconfig.c Mon Nov 2 01:22:06 2015 (r290253) @@ -164,8 +164,7 @@ __nc_error(void) if ((nc_addr = (int *)thr_getspecific(nc_key)) == NULL) { nc_addr = (int *)malloc(sizeof (int)); if (thr_setspecific(nc_key, (void *) nc_addr) != 0) { - if (nc_addr) - free(nc_addr); + free(nc_addr); return (&nc_error); } *nc_addr = 0; @@ -417,7 +416,7 @@ endnetconfig(void *handlep) while (q != NULL) { p = q->next; - if (q->ncp->nc_lookups != NULL) free(q->ncp->nc_lookups); + free(q->ncp->nc_lookups); free(q->ncp); free(q->linep); free(q); @@ -537,8 +536,7 @@ freenetconfigent(struct netconfig *netco { if (netconfigp != NULL) { free(netconfigp->nc_netid); /* holds all netconfigp's strings */ - if (netconfigp->nc_lookups != NULL) - free(netconfigp->nc_lookups); + free(netconfigp->nc_lookups); free(netconfigp); } return; @@ -628,8 +626,7 @@ parse_ncp(char *stringp, struct netconfi } else { char *cp; /* tmp string */ - if (ncp->nc_lookups != NULL) /* from last visit */ - free(ncp->nc_lookups); + free(ncp->nc_lookups); /* from last visit */ ncp->nc_lookups = NULL; ncp->nc_nlookups = 0; while ((cp = tokenp) != NULL) { Modified: head/lib/libc/rpc/mt_misc.c ============================================================================== --- head/lib/libc/rpc/mt_misc.c Mon Nov 2 01:05:34 2015 (r290252) +++ head/lib/libc/rpc/mt_misc.c Mon Nov 2 01:22:06 2015 (r290253) @@ -106,8 +106,7 @@ __rpc_createerr(void) rce_addr = (struct rpc_createerr *) malloc(sizeof (struct rpc_createerr)); if (thr_setspecific(rce_key, (void *) rce_addr) != 0) { - if (rce_addr) - free(rce_addr); + free(rce_addr); return (&rpc_createerr); } memset(rce_addr, 0, sizeof (struct rpc_createerr)); Modified: head/lib/libc/rpc/rpc_soc.c ============================================================================== --- head/lib/libc/rpc/rpc_soc.c Mon Nov 2 01:05:34 2015 (r290252) +++ head/lib/libc/rpc/rpc_soc.c Mon Nov 2 01:22:06 2015 (r290253) @@ -432,8 +432,7 @@ clntunix_create(struct sockaddr_un *radd if ((raddr->sun_len == 0) || ((svcaddr = malloc(sizeof(struct netbuf))) == NULL ) || ((svcaddr->buf = malloc(sizeof(struct sockaddr_un))) == NULL)) { - if (svcaddr != NULL) - free(svcaddr); + free(svcaddr); rpc_createerr.cf_stat = RPC_SYSTEMERROR; rpc_createerr.cf_error.re_errno = errno; return(cl); Modified: head/lib/libc/rpc/rpcb_clnt.c ============================================================================== --- head/lib/libc/rpc/rpcb_clnt.c Mon Nov 2 01:05:34 2015 (r290252) +++ head/lib/libc/rpc/rpcb_clnt.c Mon Nov 2 01:22:06 2015 (r290253) @@ -179,8 +179,7 @@ delete_cache(struct netbuf *addr) free(cptr->ac_netid); free(cptr->ac_taddr->buf); free(cptr->ac_taddr); - if (cptr->ac_uaddr) - free(cptr->ac_uaddr); + free(cptr->ac_uaddr); if (prevptr) prevptr->ac_next = cptr->ac_next; else @@ -216,14 +215,10 @@ add_cache(const char *host, const char * ad_cache->ac_taddr->buf = (char *) malloc(taddr->len); if (ad_cache->ac_taddr->buf == NULL) { out: - if (ad_cache->ac_host) - free(ad_cache->ac_host); - if (ad_cache->ac_netid) - free(ad_cache->ac_netid); - if (ad_cache->ac_uaddr) - free(ad_cache->ac_uaddr); - if (ad_cache->ac_taddr) - free(ad_cache->ac_taddr); + free(ad_cache->ac_host); + free(ad_cache->ac_netid); + free(ad_cache->ac_uaddr); + free(ad_cache->ac_taddr); free(ad_cache); return; } @@ -256,8 +251,7 @@ out: free(cptr->ac_netid); free(cptr->ac_taddr->buf); free(cptr->ac_taddr); - if (cptr->ac_uaddr) - free(cptr->ac_uaddr); + free(cptr->ac_uaddr); if (prevptr) { prevptr->ac_next = NULL; @@ -798,10 +792,8 @@ __rpcb_findaddr_timed(rpcprog_t program, malloc(remote.len)) == NULL)) { rpc_createerr.cf_stat = RPC_SYSTEMERROR; clnt_geterr(client, &rpc_createerr.cf_error); - if (address) { - free(address); - address = NULL; - } + free(address); + address = NULL; goto error; } memcpy(address->buf, remote.buf, remote.len); Modified: head/lib/libc/rpc/svc.c ============================================================================== --- head/lib/libc/rpc/svc.c Mon Nov 2 01:05:34 2015 (r290252) +++ head/lib/libc/rpc/svc.c Mon Nov 2 01:22:06 2015 (r290253) @@ -198,8 +198,7 @@ svc_reg(SVCXPRT *xprt, const rpcprog_t p rwlock_wrlock(&svc_lock); if ((s = svc_find(prog, vers, &prev, netid)) != NULL) { - if (netid) - free(netid); + free(netid); if (s->sc_dispatch == dispatch) goto rpcb_it; /* he is registering another xptr */ rwlock_unlock(&svc_lock); @@ -207,8 +206,7 @@ svc_reg(SVCXPRT *xprt, const rpcprog_t p } s = mem_alloc(sizeof (struct svc_callout)); if (s == NULL) { - if (netid) - free(netid); + free(netid); rwlock_unlock(&svc_lock); return (FALSE); } Modified: head/lib/libc/rpc/svc_dg.c ============================================================================== --- head/lib/libc/rpc/svc_dg.c Mon Nov 2 01:05:34 2015 (r290252) +++ head/lib/libc/rpc/svc_dg.c Mon Nov 2 01:22:06 2015 (r290253) @@ -406,8 +406,7 @@ svc_dg_destroy(SVCXPRT *xprt) (void) mem_free(xprt->xp_rtaddr.buf, xprt->xp_rtaddr.maxlen); if (xprt->xp_ltaddr.buf) (void) mem_free(xprt->xp_ltaddr.buf, xprt->xp_ltaddr.maxlen); - if (xprt->xp_tp) - (void) free(xprt->xp_tp); + free(xprt->xp_tp); svc_xprt_free(xprt); } Modified: head/lib/libc/rpc/svc_simple.c ============================================================================== --- head/lib/libc/rpc/svc_simple.c Mon Nov 2 01:05:34 2015 (r290252) +++ head/lib/libc/rpc/svc_simple.c Mon Nov 2 01:22:06 2015 (r290253) @@ -166,10 +166,8 @@ rpc_reg(rpcprog_t prognum, rpcvers_t ver if (((xdrbuf = malloc((unsigned)recvsz)) == NULL) || ((netid = strdup(nconf->nc_netid)) == NULL)) { warnx(rpc_reg_err, rpc_reg_msg, __no_mem_str); - if (xdrbuf != NULL) - free(xdrbuf); - if (netid != NULL) - free(netid); + free(xdrbuf); + free(netid); SVC_DESTROY(svcxprt); break; } Modified: head/lib/libc/rpc/svc_vc.c ============================================================================== --- head/lib/libc/rpc/svc_vc.c Mon Nov 2 01:05:34 2015 (r290252) +++ head/lib/libc/rpc/svc_vc.c Mon Nov 2 01:22:06 2015 (r290253) @@ -394,10 +394,8 @@ __svc_vc_dodestroy(SVCXPRT *xprt) mem_free(xprt->xp_rtaddr.buf, xprt->xp_rtaddr.maxlen); if (xprt->xp_ltaddr.buf) mem_free(xprt->xp_ltaddr.buf, xprt->xp_ltaddr.maxlen); - if (xprt->xp_tp) - free(xprt->xp_tp); - if (xprt->xp_netid) - free(xprt->xp_netid); + free(xprt->xp_tp); + free(xprt->xp_netid); svc_xprt_free(xprt); } From owner-svn-src-head@freebsd.org Mon Nov 2 01:23:05 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF645A23F69; Mon, 2 Nov 2015 01:23:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBB8C1E92; Mon, 2 Nov 2015 01:23:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA21N4hT001482; Mon, 2 Nov 2015 01:23:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA21N41k001481; Mon, 2 Nov 2015 01:23:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020123.tA21N41k001481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 01:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290254 - head/lib/libc/tests/tls_dso X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 01:23:06 -0000 Author: ngie Date: Mon Nov 2 01:23:04 2015 New Revision: 290254 URL: https://svnweb.freebsd.org/changeset/base/290254 Log: Remove unused variable (SRCDIR) MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/tests/tls_dso/Makefile Modified: head/lib/libc/tests/tls_dso/Makefile ============================================================================== --- head/lib/libc/tests/tls_dso/Makefile Mon Nov 2 01:22:06 2015 (r290253) +++ head/lib/libc/tests/tls_dso/Makefile Mon Nov 2 01:23:04 2015 (r290254) @@ -1,7 +1,5 @@ # $FreeBSD$ -SRCDIR= ${SRCTOP}/contrib/netbsd/ - .include LIB= h_tls_dynamic From owner-svn-src-head@freebsd.org Mon Nov 2 01:29:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EE5BA2309F; Mon, 2 Nov 2015 01:29:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F6AD10B7; Mon, 2 Nov 2015 01:29:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA21T2QW001716; Mon, 2 Nov 2015 01:29:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA21T17U001712; Mon, 2 Nov 2015 01:29:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020129.tA21T17U001712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 01:29:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290255 - in head: . lib/libc/tests/c063 lib/libc/tests/setjmp lib/libc/tests/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 01:29:03 -0000 Author: ngie Date: Mon Nov 2 01:29:01 2015 New Revision: 290255 URL: https://svnweb.freebsd.org/changeset/base/290255 Log: Add _test suffix to multiple tests in lib/libc to conform to the design noted in the FreeBSD Test Suite wiki MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/ObsoleteFiles.inc head/lib/libc/tests/c063/Makefile head/lib/libc/tests/setjmp/Makefile head/lib/libc/tests/string/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Nov 2 01:23:04 2015 (r290254) +++ head/ObsoleteFiles.inc Mon Nov 2 01:29:01 2015 (r290255) @@ -38,6 +38,37 @@ # xargs -n1 | sort | uniq -d; # done +# 20151101: added missing _test suffix on multiple tests in lib/libc +OLD_FILES+=usr/tests/lib/libc/c063/faccessat +OLD_FILES+=usr/tests/lib/libc/c063/fchmodat +OLD_FILES+=usr/tests/lib/libc/c063/fchownat +OLD_FILES+=usr/tests/lib/libc/c063/fexecve +OLD_FILES+=usr/tests/lib/libc/c063/fstatat +OLD_FILES+=usr/tests/lib/libc/c063/linkat +OLD_FILES+=usr/tests/lib/libc/c063/mkdirat +OLD_FILES+=usr/tests/lib/libc/c063/mkfifoat +OLD_FILES+=usr/tests/lib/libc/c063/mknodat +OLD_FILES+=usr/tests/lib/libc/c063/openat +OLD_FILES+=usr/tests/lib/libc/c063/readlinkat +OLD_FILES+=usr/tests/lib/libc/c063/renameat +OLD_FILES+=usr/tests/lib/libc/c063/symlinkat +OLD_FILES+=usr/tests/lib/libc/c063/unlinkat +OLD_FILES+=usr/tests/lib/libc/c063/utimensat +OLD_FILES+=usr/tests/lib/libc/string/memchr +OLD_FILES+=usr/tests/lib/libc/string/memcpy +OLD_FILES+=usr/tests/lib/libc/string/memmem +OLD_FILES+=usr/tests/lib/libc/string/memset +OLD_FILES+=usr/tests/lib/libc/string/strcat +OLD_FILES+=usr/tests/lib/libc/string/strchr +OLD_FILES+=usr/tests/lib/libc/string/strcmp +OLD_FILES+=usr/tests/lib/libc/string/strcpy +OLD_FILES+=usr/tests/lib/libc/string/strcspn +OLD_FILES+=usr/tests/lib/libc/string/strerror +OLD_FILES+=usr/tests/lib/libc/string/strlen +OLD_FILES+=usr/tests/lib/libc/string/strpbrk +OLD_FILES+=usr/tests/lib/libc/string/strrchr +OLD_FILES+=usr/tests/lib/libc/string/strspn +OLD_FILES+=usr/tests/lib/libc/string/swab # 20151101: 430.status-rwho was renamed to 430.status-uptime OLD_FILES+=etc/periodic/daily/430.status-rwho # 20151030: OpenSSL 1.0.2d import Modified: head/lib/libc/tests/c063/Makefile ============================================================================== --- head/lib/libc/tests/c063/Makefile Mon Nov 2 01:23:04 2015 (r290254) +++ head/lib/libc/tests/c063/Makefile Mon Nov 2 01:29:01 2015 (r290255) @@ -2,21 +2,21 @@ #TODO: t_o_search -NETBSD_ATF_TESTS_C= faccessat -NETBSD_ATF_TESTS_C+= fchmodat -NETBSD_ATF_TESTS_C+= fchownat -NETBSD_ATF_TESTS_C+= fexecve -NETBSD_ATF_TESTS_C+= fstatat -NETBSD_ATF_TESTS_C+= linkat -NETBSD_ATF_TESTS_C+= mkdirat -NETBSD_ATF_TESTS_C+= mkfifoat -NETBSD_ATF_TESTS_C+= mknodat -NETBSD_ATF_TESTS_C+= openat -NETBSD_ATF_TESTS_C+= readlinkat -NETBSD_ATF_TESTS_C+= renameat -NETBSD_ATF_TESTS_C+= symlinkat -NETBSD_ATF_TESTS_C+= unlinkat -NETBSD_ATF_TESTS_C+= utimensat +NETBSD_ATF_TESTS_C= faccessat_test +NETBSD_ATF_TESTS_C+= fchmodat_test +NETBSD_ATF_TESTS_C+= fchownat_test +NETBSD_ATF_TESTS_C+= fexecve_test +NETBSD_ATF_TESTS_C+= fstatat_test +NETBSD_ATF_TESTS_C+= linkat_test +NETBSD_ATF_TESTS_C+= mkdirat_test +NETBSD_ATF_TESTS_C+= mkfifoat_test +NETBSD_ATF_TESTS_C+= mknodat_test +NETBSD_ATF_TESTS_C+= openat_test +NETBSD_ATF_TESTS_C+= readlinkat_test +NETBSD_ATF_TESTS_C+= renameat_test +NETBSD_ATF_TESTS_C+= symlinkat_test +NETBSD_ATF_TESTS_C+= unlinkat_test +NETBSD_ATF_TESTS_C+= utimensat_test CFLAGS+= -D_INCOMPLETE_XOPEN_C063 Modified: head/lib/libc/tests/setjmp/Makefile ============================================================================== --- head/lib/libc/tests/setjmp/Makefile Mon Nov 2 01:23:04 2015 (r290254) +++ head/lib/libc/tests/setjmp/Makefile Mon Nov 2 01:29:01 2015 (r290255) @@ -1,10 +1,10 @@ # $FreeBSD$ -NETBSD_ATF_TESTS_C= t_setjmp -NETBSD_ATF_TESTS_C+= t_threadjmp +NETBSD_ATF_TESTS_C= setjmp_test +NETBSD_ATF_TESTS_C+= threadjmp_test -DPADD.t_threadjmp+= ${LIBPTHREAD} -LDADD.t_threadjmp+= -lpthread +DPADD.threadjmp_test+= ${LIBPTHREAD} +LDADD.threadjmp_test+= -lpthread WARNS?= 4 Modified: head/lib/libc/tests/string/Makefile ============================================================================== --- head/lib/libc/tests/string/Makefile Mon Nov 2 01:23:04 2015 (r290254) +++ head/lib/libc/tests/string/Makefile Mon Nov 2 01:29:01 2015 (r290255) @@ -4,28 +4,28 @@ # TODO: popcount, stresep -NETBSD_ATF_TESTS_C+= memchr -NETBSD_ATF_TESTS_C+= memcpy -NETBSD_ATF_TESTS_C+= memmem -NETBSD_ATF_TESTS_C+= memset -NETBSD_ATF_TESTS_C+= strcat -NETBSD_ATF_TESTS_C+= strchr -NETBSD_ATF_TESTS_C+= strcmp -NETBSD_ATF_TESTS_C+= strcpy -NETBSD_ATF_TESTS_C+= strcspn -NETBSD_ATF_TESTS_C+= strerror -NETBSD_ATF_TESTS_C+= strlen -NETBSD_ATF_TESTS_C+= strpbrk -NETBSD_ATF_TESTS_C+= strrchr -NETBSD_ATF_TESTS_C+= strspn -NETBSD_ATF_TESTS_C+= swab +NETBSD_ATF_TESTS_C+= memchr_test +NETBSD_ATF_TESTS_C+= memcpy_test +NETBSD_ATF_TESTS_C+= memmem_test +NETBSD_ATF_TESTS_C+= memset_test +NETBSD_ATF_TESTS_C+= strcat_test +NETBSD_ATF_TESTS_C+= strchr_test +NETBSD_ATF_TESTS_C+= strcmp_test +NETBSD_ATF_TESTS_C+= strcpy_test +NETBSD_ATF_TESTS_C+= strcspn_test +NETBSD_ATF_TESTS_C+= strerror_test +NETBSD_ATF_TESTS_C+= strlen_test +NETBSD_ATF_TESTS_C+= strpbrk_test +NETBSD_ATF_TESTS_C+= strrchr_test +NETBSD_ATF_TESTS_C+= strspn_test +NETBSD_ATF_TESTS_C+= swab_test .include "../Makefile.netbsd-tests" -LDADD.memchr+= -lmd -DPADD.memchr+= ${LIBMD} +LDADD.memchr_test+= -lmd +DPADD.memchr_test+= ${LIBMD} -LDADD.memcpy+= -lmd -DPADD.memcpy+= ${LIBMD} +LDADD.memcpy_test+= -lmd +DPADD.memcpy_test+= ${LIBMD} .include From owner-svn-src-head@freebsd.org Mon Nov 2 01:47:27 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D069CA234AF; Mon, 2 Nov 2015 01:47:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ED2C199D; Mon, 2 Nov 2015 01:47:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA21lQ4d007447; Mon, 2 Nov 2015 01:47:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA21lQBp007446; Mon, 2 Nov 2015 01:47:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020147.tA21lQBp007446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 01:47:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290256 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 01:47:27 -0000 Author: ngie Date: Mon Nov 2 01:47:26 2015 New Revision: 290256 URL: https://svnweb.freebsd.org/changeset/base/290256 Log: Define `compress` in `__elfN(coredump)` when #ifdef GZIO is true to mute an -Wunused-but-set-variable warning Reported by: FreeBSD_HEAD_amd64_gcc4.9 jenkins job Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Mon Nov 2 01:29:01 2015 (r290255) +++ head/sys/kern/imgact_elf.c Mon Nov 2 01:47:26 2015 (r290256) @@ -1270,9 +1270,11 @@ __elfN(coredump)(struct thread *td, stru struct note_info *ninfo; void *hdr, *tmpbuf; size_t hdrsize, notesz, coresize; +#ifdef GZIO boolean_t compress; compress = (flags & IMGACT_CORE_COMPRESS) != 0; +#endif hdr = NULL; tmpbuf = NULL; TAILQ_INIT(¬elst); From owner-svn-src-head@freebsd.org Mon Nov 2 03:14:38 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E995A249A8; Mon, 2 Nov 2015 03:14:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B9E81FEF; Mon, 2 Nov 2015 03:14:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA23EbgY036923; Mon, 2 Nov 2015 03:14:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA23Eb40036922; Mon, 2 Nov 2015 03:14:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020314.tA23Eb40036922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 03:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290257 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 03:14:38 -0000 Author: ngie Date: Mon Nov 2 03:14:37 2015 New Revision: 290257 URL: https://svnweb.freebsd.org/changeset/base/290257 Log: Define `fhard` in pps_event(..) only when PPS_SYNC is defined to mute an -Wunused-but-set-variable warning Reported by: FreeBSD_HEAD_amd64_gcc4.9 jenkins job Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Mon Nov 2 01:47:26 2015 (r290256) +++ head/sys/kern/kern_tc.c Mon Nov 2 03:14:37 2015 (r290257) @@ -1702,13 +1702,16 @@ pps_event(struct pps_state *pps, int eve struct bintime bt; struct timespec ts, *tsp, *osp; u_int tcount, *pcount; - int foff, fhard; + int foff; pps_seq_t *pseq; #ifdef FFCLOCK struct timespec *tsp_ffc; pps_seq_t *pseq_ffc; ffcounter *ffcount; #endif +#ifdef PPS_SYNC + int fhard; +#endif KASSERT(pps != NULL, ("NULL pps pointer in pps_event")); /* Nothing to do if not currently set to capture this event type. */ @@ -1724,7 +1727,9 @@ pps_event(struct pps_state *pps, int eve tsp = &pps->ppsinfo.assert_timestamp; osp = &pps->ppsparam.assert_offset; foff = pps->ppsparam.mode & PPS_OFFSETASSERT; +#ifdef PPS_SYNC fhard = pps->kcmode & PPS_CAPTUREASSERT; +#endif pcount = &pps->ppscount[0]; pseq = &pps->ppsinfo.assert_sequence; #ifdef FFCLOCK @@ -1736,7 +1741,9 @@ pps_event(struct pps_state *pps, int eve tsp = &pps->ppsinfo.clear_timestamp; osp = &pps->ppsparam.clear_offset; foff = pps->ppsparam.mode & PPS_OFFSETCLEAR; +#ifdef PPS_SYNC fhard = pps->kcmode & PPS_CAPTURECLEAR; +#endif pcount = &pps->ppscount[1]; pseq = &pps->ppsinfo.clear_sequence; #ifdef FFCLOCK From owner-svn-src-head@freebsd.org Mon Nov 2 03:20:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C26FEA24A5C; Mon, 2 Nov 2015 03:20:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [IPv6:2607:f8b0:4001:c05::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 873A8121D; Mon, 2 Nov 2015 03:20:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbhv6 with SMTP id hv6so46015405igb.0; Sun, 01 Nov 2015 19:20:14 -0800 (PST) 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=8vAqWpp3fCoV4rdCz7VY8H40rDwfXXFWE2Xx8xbq0uI=; b=zf4CkWOEroblFvW6OnvRcjX/bKDmiUCC+tfbwMAajqtJcC4pm4HqzrWkCix3CoMzu0 FxyCyNMJQLxAUtEj0PTLYUhZxCyXggBxSP+W86vMpCzjQnUIUN6X2WRgmc284T+E5W+n GzGNRyvdb9Pg9A87wp4xeVJ46cHmMz1Bl1TbPkWSmme9REHcMtJUDYlO6QLcKk17c06I tGMUH+iiMPZ4WOItQExT9j7QUnw1fW9WuiJVecos3R5nllJ8Ubch3umqfI2t2RtB/jd6 n5gB7eqezzUjiAKTkkcNv2kSvxHBF1r1X+gkWnJ/WvvJZMsm1krq5C+v3kFNwkE3lxKe fyxQ== MIME-Version: 1.0 X-Received: by 10.50.178.141 with SMTP id cy13mr8444285igc.61.1446434414056; Sun, 01 Nov 2015 19:20:14 -0800 (PST) Received: by 10.36.46.66 with HTTP; Sun, 1 Nov 2015 19:20:13 -0800 (PST) In-Reply-To: <201510140210.t9E2A79H056595@repo.freebsd.org> References: <201510140210.t9E2A79H056595@repo.freebsd.org> Date: Sun, 1 Nov 2015 19:20:13 -0800 Message-ID: Subject: Re: svn commit: r289279 - in head/sys: kern vm From: Adrian Chadd To: Jeff Roberson , Mark Johnston , Warner Losh , benno Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 03:20:15 -0000 hiya jeff, this broke low-memory, no-swap boards (eg MIPS.) On a MIPS board (carambola2) with 32MB of RAM, just scp'ing a kernel into the rootfs on USB hangs the system. After doing some digging, I found this: INTERNAL: Allocating one item from buf free cache(0x83fea7e0) uma_zalloc_arg: Bucketzone returned NULL INTERNAL: Allocating one item from buf free cache(0x83fea7e0) uma_zalloc_arg: Bucketzone returned NULL .. and it was just stuck in a loop trying to allocate them, failing, and trying to allocate them again. I'll see if I can reproduce it with a qemu emulator with sufficiently low RAM so you don't need a MIPS router to reproduce it. It's sufficient to just start the scp; it runs out of RAM within a couple of seconds. Any ideas? -adrian On 13 October 2015 at 19:10, Jeff Roberson wrote: > Author: jeff > Date: Wed Oct 14 02:10:07 2015 > New Revision: 289279 > URL: https://svnweb.freebsd.org/changeset/base/289279 > > Log: > Parallelize the buffer cache and rewrite getnewbuf(). This results in a > 8x performance improvement in a micro benchmark on a 4 socket machine. > > - Get buffer headers from a per-cpu uma cache that sits in from of the > free queue. > - Use a per-cpu quantum cache in vmem to eliminate contention for kva. > - Use multiple clean queues according to buffer cache size to eliminate > clean queue lock contention. > - Introduce a bufspace daemon that attempts to prevent getnewbuf() callers > from blocking or doing direct recycling. > - Close some bufspace allocation races that could lead to endless > recycling. > - Further the transition to a more modern style of small functions grouped > by prefix in order to improve growing complexity. > > Sponsored by: EMC / Isilon > Reviewed by: kib > Tested by: pho > > Modified: > head/sys/kern/vfs_bio.c > head/sys/vm/vm_init.c > > Modified: head/sys/kern/vfs_bio.c > ============================================================================== > --- head/sys/kern/vfs_bio.c Wed Oct 14 00:43:29 2015 (r289278) > +++ head/sys/kern/vfs_bio.c Wed Oct 14 02:10:07 2015 (r289279) > @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -100,6 +101,7 @@ caddr_t unmapped_buf; > > /* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */ > struct proc *bufdaemonproc; > +struct proc *bufspacedaemonproc; > > static int inmem(struct vnode *vp, daddr_t blkno); > static void vm_hold_free_pages(struct buf *bp, int newbsize); > @@ -116,11 +118,18 @@ static void vfs_vmio_extend(struct buf * > static int vfs_bio_clcheck(struct vnode *vp, int size, > daddr_t lblkno, daddr_t blkno); > static int buf_flush(struct vnode *vp, int); > +static int buf_recycle(bool); > +static int buf_scan(bool); > static int flushbufqueues(struct vnode *, int, int); > static void buf_daemon(void); > static void bremfreel(struct buf *bp); > static __inline void bd_wakeup(void); > static int sysctl_runningspace(SYSCTL_HANDLER_ARGS); > +static void bufkva_reclaim(vmem_t *, int); > +static void bufkva_free(struct buf *); > +static int buf_import(void *, void **, int, int); > +static void buf_release(void *, void **, int); > + > #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ > defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) > static int sysctl_bufspace(SYSCTL_HANDLER_ARGS); > @@ -145,23 +154,23 @@ static long bufkvaspace; > SYSCTL_LONG(_vfs, OID_AUTO, bufkvaspace, CTLFLAG_RD, &bufkvaspace, 0, > "Kernel virtual memory used for buffers"); > static long maxbufspace; > -SYSCTL_LONG(_vfs, OID_AUTO, maxbufspace, CTLFLAG_RD, &maxbufspace, 0, > - "Maximum allowed value of bufspace (including buf_daemon)"); > +SYSCTL_LONG(_vfs, OID_AUTO, maxbufspace, CTLFLAG_RW, &maxbufspace, 0, > + "Maximum allowed value of bufspace (including metadata)"); > static long bufmallocspace; > SYSCTL_LONG(_vfs, OID_AUTO, bufmallocspace, CTLFLAG_RD, &bufmallocspace, 0, > "Amount of malloced memory for buffers"); > static long maxbufmallocspace; > -SYSCTL_LONG(_vfs, OID_AUTO, maxmallocbufspace, CTLFLAG_RW, &maxbufmallocspace, 0, > - "Maximum amount of malloced memory for buffers"); > +SYSCTL_LONG(_vfs, OID_AUTO, maxmallocbufspace, CTLFLAG_RW, &maxbufmallocspace, > + 0, "Maximum amount of malloced memory for buffers"); > static long lobufspace; > -SYSCTL_LONG(_vfs, OID_AUTO, lobufspace, CTLFLAG_RD, &lobufspace, 0, > +SYSCTL_LONG(_vfs, OID_AUTO, lobufspace, CTLFLAG_RW, &lobufspace, 0, > "Minimum amount of buffers we want to have"); > long hibufspace; > -SYSCTL_LONG(_vfs, OID_AUTO, hibufspace, CTLFLAG_RD, &hibufspace, 0, > - "Maximum allowed value of bufspace (excluding buf_daemon)"); > -static int bufreusecnt; > -SYSCTL_INT(_vfs, OID_AUTO, bufreusecnt, CTLFLAG_RW, &bufreusecnt, 0, > - "Number of times we have reused a buffer"); > +SYSCTL_LONG(_vfs, OID_AUTO, hibufspace, CTLFLAG_RW, &hibufspace, 0, > + "Maximum allowed value of bufspace (excluding metadata)"); > +long bufspacethresh; > +SYSCTL_LONG(_vfs, OID_AUTO, bufspacethresh, CTLFLAG_RW, &bufspacethresh, > + 0, "Bufspace consumed before waking the daemon to free some"); > static int buffreekvacnt; > SYSCTL_INT(_vfs, OID_AUTO, buffreekvacnt, CTLFLAG_RW, &buffreekvacnt, 0, > "Number of times we have freed the KVA space from some buffer"); > @@ -205,10 +214,10 @@ SYSCTL_INT(_vfs, OID_AUTO, numfreebuffer > "Number of free buffers"); > static int lofreebuffers; > SYSCTL_INT(_vfs, OID_AUTO, lofreebuffers, CTLFLAG_RW, &lofreebuffers, 0, > - "XXX Unused"); > + "Target number of free buffers"); > static int hifreebuffers; > SYSCTL_INT(_vfs, OID_AUTO, hifreebuffers, CTLFLAG_RW, &hifreebuffers, 0, > - "XXX Complicatedly unused"); > + "Threshold for clean buffer recycling"); > static int getnewbufcalls; > SYSCTL_INT(_vfs, OID_AUTO, getnewbufcalls, CTLFLAG_RW, &getnewbufcalls, 0, > "Number of calls to getnewbuf"); > @@ -219,6 +228,9 @@ static int mappingrestarts; > SYSCTL_INT(_vfs, OID_AUTO, mappingrestarts, CTLFLAG_RW, &mappingrestarts, 0, > "Number of times getblk has had to restart a buffer mapping for " > "unmapped buffer"); > +static int numbufallocfails; > +SYSCTL_INT(_vfs, OID_AUTO, numbufallocfails, CTLFLAG_RW, &numbufallocfails, 0, > + "Number of times buffer allocations failed"); > static int flushbufqtarget = 100; > SYSCTL_INT(_vfs, OID_AUTO, flushbufqtarget, CTLFLAG_RW, &flushbufqtarget, 0, > "Amount of work to do in flushbufqueues when helping bufdaemon"); > @@ -233,16 +245,6 @@ SYSCTL_INT(_vfs, OID_AUTO, unmapped_buf_ > "Permit the use of the unmapped i/o"); > > /* > - * Lock for the non-dirty bufqueues > - */ > -static struct mtx_padalign bqclean; > - > -/* > - * Lock for the dirty queue. > - */ > -static struct mtx_padalign bqdirty; > - > -/* > * This lock synchronizes access to bd_request. > */ > static struct mtx_padalign bdlock; > @@ -271,6 +273,11 @@ static struct mtx_padalign bdirtylock; > static int bd_request; > > /* > + * Request/wakeup point for the bufspace daemon. > + */ > +static int bufspace_request; > + > +/* > * Request for the buf daemon to write more buffers than is indicated by > * lodirtybuf. This may be necessary to push out excess dependencies or > * defragment the address space where a simple count of the number of dirty > @@ -298,7 +305,7 @@ static int runningbufreq; > * Synchronization (sleep/wakeup) variable for buffer requests. > * Can contain the VFS_BIO_NEED flags defined below; setting/clearing is done > * by and/or. > - * Used in numdirtywakeup(), bufspacewakeup(), bufcountadd(), bwillwrite(), > + * Used in numdirtywakeup(), bufspace_wakeup(), bwillwrite(), > * getnewbuf(), and getblk(). > */ > static volatile int needsbuffer; > @@ -311,14 +318,21 @@ static int bdirtywait; > /* > * Definitions for the buffer free lists. > */ > -#define BUFFER_QUEUES 4 /* number of free buffer queues */ > - > #define QUEUE_NONE 0 /* on no queue */ > -#define QUEUE_CLEAN 1 /* non-B_DELWRI buffers */ > +#define QUEUE_EMPTY 1 /* empty buffer headers */ > #define QUEUE_DIRTY 2 /* B_DELWRI buffers */ > -#define QUEUE_EMPTY 3 /* empty buffer headers */ > +#define QUEUE_CLEAN 3 /* non-B_DELWRI buffers */ > #define QUEUE_SENTINEL 1024 /* not an queue index, but mark for sentinel */ > > +/* Maximum number of clean buffer queues. */ > +#define CLEAN_QUEUES 16 > + > +/* Configured number of clean queues. */ > +static int clean_queues; > + > +/* Maximum number of buffer queues. */ > +#define BUFFER_QUEUES (QUEUE_CLEAN + CLEAN_QUEUES) > + > /* Queues for free buffers with various properties */ > static TAILQ_HEAD(bqueues, buf) bufqueues[BUFFER_QUEUES] = { { 0 } }; > #ifdef INVARIANTS > @@ -326,15 +340,21 @@ static int bq_len[BUFFER_QUEUES]; > #endif > > /* > + * Lock for each bufqueue > + */ > +static struct mtx_padalign bqlocks[BUFFER_QUEUES]; > + > +/* > + * per-cpu empty buffer cache. > + */ > +uma_zone_t buf_zone; > + > +/* > * Single global constant for BUF_WMESG, to avoid getting multiple references. > * buf_wmesg is referred from macros. > */ > const char *buf_wmesg = BUF_WMESG; > > -#define VFS_BIO_NEED_ANY 0x01 /* any freeable buffer */ > -#define VFS_BIO_NEED_FREE 0x04 /* wait for free bufs, hi hysteresis */ > -#define VFS_BIO_NEED_BUFSPACE 0x08 /* wait for buf space, lo hysteresis */ > - > static int > sysctl_runningspace(SYSCTL_HANDLER_ARGS) > { > @@ -382,6 +402,21 @@ sysctl_bufspace(SYSCTL_HANDLER_ARGS) > } > #endif > > +static int > +bqcleanq(void) > +{ > + static int nextq; > + > + return ((atomic_fetchadd_int(&nextq, 1) % clean_queues) + QUEUE_CLEAN); > +} > + > +static int > +bqisclean(int qindex) > +{ > + > + return (qindex >= QUEUE_CLEAN && qindex < QUEUE_CLEAN + CLEAN_QUEUES); > +} > + > /* > * bqlock: > * > @@ -391,9 +426,7 @@ static inline struct mtx * > bqlock(int qindex) > { > > - if (qindex == QUEUE_DIRTY) > - return (struct mtx *)(&bqdirty); > - return (struct mtx *)(&bqclean); > + return (struct mtx *)&bqlocks[qindex]; > } > > /* > @@ -447,62 +480,255 @@ bdirtyadd(void) > } > > /* > - * bufspacewakeup: > + * bufspace_wakeup: > * > * Called when buffer space is potentially available for recovery. > * getnewbuf() will block on this flag when it is unable to free > * sufficient buffer space. Buffer space becomes recoverable when > * bp's get placed back in the queues. > */ > -static __inline void > -bufspacewakeup(void) > +static void > +bufspace_wakeup(void) > { > - int need_wakeup, on; > > /* > - * If someone is waiting for bufspace, wake them up. Even > - * though we may not have freed the kva space yet, the waiting > - * process will be able to now. > + * If someone is waiting for bufspace, wake them up. > + * > + * Since needsbuffer is set prior to doing an additional queue > + * scan it is safe to check for the flag prior to acquiring the > + * lock. The thread that is preparing to scan again before > + * blocking would discover the buf we released. > */ > + if (needsbuffer) { > + rw_rlock(&nblock); > + if (atomic_cmpset_int(&needsbuffer, 1, 0) == 1) > + wakeup(__DEVOLATILE(void *, &needsbuffer)); > + rw_runlock(&nblock); > + } > +} > + > +/* > + * bufspace_daemonwakeup: > + * > + * Wakeup the daemon responsible for freeing clean bufs. > + */ > +static void > +bufspace_daemonwakeup(void) > +{ > rw_rlock(&nblock); > - for (;;) { > - need_wakeup = 0; > - on = needsbuffer; > - if ((on & VFS_BIO_NEED_BUFSPACE) == 0) > - break; > - need_wakeup = 1; > - if (atomic_cmpset_rel_int(&needsbuffer, on, > - on & ~VFS_BIO_NEED_BUFSPACE)) > - break; > + if (bufspace_request == 0) { > + bufspace_request = 1; > + wakeup(&bufspace_request); > } > - if (need_wakeup) > - wakeup(__DEVOLATILE(void *, &needsbuffer)); > rw_runlock(&nblock); > } > > /* > - * bufspaceadjust: > + * bufspace_adjust: > * > * Adjust the reported bufspace for a KVA managed buffer, possibly > * waking any waiters. > */ > static void > -bufspaceadjust(struct buf *bp, int bufsize) > +bufspace_adjust(struct buf *bp, int bufsize) > { > + long space; > int diff; > > KASSERT((bp->b_flags & B_MALLOC) == 0, > - ("bufspaceadjust: malloc buf %p", bp)); > + ("bufspace_adjust: malloc buf %p", bp)); > diff = bufsize - bp->b_bufsize; > if (diff < 0) { > atomic_subtract_long(&bufspace, -diff); > - bufspacewakeup(); > - } else > - atomic_add_long(&bufspace, diff); > + bufspace_wakeup(); > + } else { > + space = atomic_fetchadd_long(&bufspace, diff); > + /* Wake up the daemon on the transition. */ > + if (space < bufspacethresh && space + diff >= bufspacethresh) > + bufspace_daemonwakeup(); > + } > bp->b_bufsize = bufsize; > } > > /* > + * bufspace_reserve: > + * > + * Reserve bufspace before calling allocbuf(). metadata has a > + * different space limit than data. > + */ > +static int > +bufspace_reserve(int size, bool metadata) > +{ > + long limit; > + long space; > + > + if (metadata) > + limit = maxbufspace; > + else > + limit = hibufspace; > + do { > + space = bufspace; > + if (space + size > limit) > + return (ENOSPC); > + } while (atomic_cmpset_long(&bufspace, space, space + size) == 0); > + > + /* Wake up the daemon on the transition. */ > + if (space < bufspacethresh && space + size >= bufspacethresh) > + bufspace_daemonwakeup(); > + > + return (0); > +} > + > +/* > + * bufspace_release: > + * > + * Release reserved bufspace after bufspace_adjust() has consumed it. > + */ > +static void > +bufspace_release(int size) > +{ > + atomic_subtract_long(&bufspace, size); > + bufspace_wakeup(); > +} > + > +/* > + * bufspace_wait: > + * > + * Wait for bufspace, acting as the buf daemon if a locked vnode is > + * supplied. needsbuffer must be set in a safe fashion prior to > + * polling for space. The operation must be re-tried on return. > + */ > +static void > +bufspace_wait(struct vnode *vp, int gbflags, int slpflag, int slptimeo) > +{ > + struct thread *td; > + int error, fl, norunbuf; > + > + if ((gbflags & GB_NOWAIT_BD) != 0) > + return; > + > + td = curthread; > + rw_wlock(&nblock); > + while (needsbuffer != 0) { > + if (vp != NULL && vp->v_type != VCHR && > + (td->td_pflags & TDP_BUFNEED) == 0) { > + rw_wunlock(&nblock); > + /* > + * getblk() is called with a vnode locked, and > + * some majority of the dirty buffers may as > + * well belong to the vnode. Flushing the > + * buffers there would make a progress that > + * cannot be achieved by the buf_daemon, that > + * cannot lock the vnode. > + */ > + norunbuf = ~(TDP_BUFNEED | TDP_NORUNNINGBUF) | > + (td->td_pflags & TDP_NORUNNINGBUF); > + > + /* > + * Play bufdaemon. The getnewbuf() function > + * may be called while the thread owns lock > + * for another dirty buffer for the same > + * vnode, which makes it impossible to use > + * VOP_FSYNC() there, due to the buffer lock > + * recursion. > + */ > + td->td_pflags |= TDP_BUFNEED | TDP_NORUNNINGBUF; > + fl = buf_flush(vp, flushbufqtarget); > + td->td_pflags &= norunbuf; > + rw_wlock(&nblock); > + if (fl != 0) > + continue; > + if (needsbuffer == 0) > + break; > + } > + error = rw_sleep(__DEVOLATILE(void *, &needsbuffer), &nblock, > + (PRIBIO + 4) | slpflag, "newbuf", slptimeo); > + if (error != 0) > + break; > + } > + rw_wunlock(&nblock); > +} > + > + > +/* > + * bufspace_daemon: > + * > + * buffer space management daemon. Tries to maintain some marginal > + * amount of free buffer space so that requesting processes neither > + * block nor work to reclaim buffers. > + */ > +static void > +bufspace_daemon(void) > +{ > + for (;;) { > + kproc_suspend_check(bufspacedaemonproc); > + > + /* > + * Free buffers from the clean queue until we meet our > + * targets. > + * > + * Theory of operation: The buffer cache is most efficient > + * when some free buffer headers and space are always > + * available to getnewbuf(). This daemon attempts to prevent > + * the excessive blocking and synchronization associated > + * with shortfall. It goes through three phases according > + * demand: > + * > + * 1) The daemon wakes up voluntarily once per-second > + * during idle periods when the counters are below > + * the wakeup thresholds (bufspacethresh, lofreebuffers). > + * > + * 2) The daemon wakes up as we cross the thresholds > + * ahead of any potential blocking. This may bounce > + * slightly according to the rate of consumption and > + * release. > + * > + * 3) The daemon and consumers are starved for working > + * clean buffers. This is the 'bufspace' sleep below > + * which will inefficiently trade bufs with bqrelse > + * until we return to condition 2. > + */ > + while (bufspace > lobufspace || > + numfreebuffers < hifreebuffers) { > + if (buf_recycle(false) != 0) { > + atomic_set_int(&needsbuffer, 1); > + if (buf_recycle(false) != 0) { > + rw_wlock(&nblock); > + if (needsbuffer) > + rw_sleep(__DEVOLATILE(void *, > + &needsbuffer), &nblock, > + PRIBIO|PDROP, "bufspace", > + hz/10); > + else > + rw_wunlock(&nblock); > + } > + } > + maybe_yield(); > + } > + > + /* > + * Re-check our limits under the exclusive nblock. > + */ > + rw_wlock(&nblock); > + if (bufspace < bufspacethresh && > + numfreebuffers > lofreebuffers) { > + bufspace_request = 0; > + rw_sleep(&bufspace_request, &nblock, PRIBIO|PDROP, > + "-", hz); > + } else > + rw_wunlock(&nblock); > + } > +} > + > +static struct kproc_desc bufspace_kp = { > + "bufspacedaemon", > + bufspace_daemon, > + &bufspacedaemonproc > +}; > +SYSINIT(bufspacedaemon, SI_SUB_KTHREAD_BUF, SI_ORDER_FIRST, kproc_start, > + &bufspace_kp); > + > +/* > * bufmallocadjust: > * > * Adjust the reported bufspace for a malloc managed buffer, possibly > @@ -516,10 +742,9 @@ bufmallocadjust(struct buf *bp, int bufs > KASSERT((bp->b_flags & B_MALLOC) != 0, > ("bufmallocadjust: non-malloc buf %p", bp)); > diff = bufsize - bp->b_bufsize; > - if (diff < 0) { > + if (diff < 0) > atomic_subtract_long(&bufmallocspace, -diff); > - bufspacewakeup(); > - } else > + else > atomic_add_long(&bufmallocspace, diff); > bp->b_bufsize = bufsize; > } > @@ -571,67 +796,6 @@ runningbufwakeup(struct buf *bp) > } > > /* > - * bufcountadd: > - * > - * Called when a buffer has been added to one of the free queues to > - * account for the buffer and to wakeup anyone waiting for free buffers. > - * This typically occurs when large amounts of metadata are being handled > - * by the buffer cache ( else buffer space runs out first, usually ). > - */ > -static __inline void > -bufcountadd(struct buf *bp) > -{ > - int mask, need_wakeup, old, on; > - > - KASSERT((bp->b_flags & B_INFREECNT) == 0, > - ("buf %p already counted as free", bp)); > - bp->b_flags |= B_INFREECNT; > - old = atomic_fetchadd_int(&numfreebuffers, 1); > - KASSERT(old >= 0 && old < nbuf, > - ("numfreebuffers climbed to %d", old + 1)); > - mask = VFS_BIO_NEED_ANY; > - if (numfreebuffers >= hifreebuffers) > - mask |= VFS_BIO_NEED_FREE; > - rw_rlock(&nblock); > - for (;;) { > - need_wakeup = 0; > - on = needsbuffer; > - if (on == 0) > - break; > - need_wakeup = 1; > - if (atomic_cmpset_rel_int(&needsbuffer, on, on & ~mask)) > - break; > - } > - if (need_wakeup) > - wakeup(__DEVOLATILE(void *, &needsbuffer)); > - rw_runlock(&nblock); > -} > - > -/* > - * bufcountsub: > - * > - * Decrement the numfreebuffers count as needed. > - */ > -static void > -bufcountsub(struct buf *bp) > -{ > - int old; > - > - /* > - * Fixup numfreebuffers count. If the buffer is invalid or not > - * delayed-write, the buffer was free and we must decrement > - * numfreebuffers. > - */ > - if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) { > - KASSERT((bp->b_flags & B_INFREECNT) != 0, > - ("buf %p not counted in numfreebuffers", bp)); > - bp->b_flags &= ~B_INFREECNT; > - old = atomic_fetchadd_int(&numfreebuffers, -1); > - KASSERT(old > 0, ("numfreebuffers dropped to %d", old - 1)); > - } > -} > - > -/* > * waitrunningbufspace() > * > * runningbufspace is a measure of the amount of I/O currently > @@ -847,8 +1011,10 @@ bufinit(void) > int i; > > CTASSERT(MAXBCACHEBUF >= MAXBSIZE); > - mtx_init(&bqclean, "bufq clean lock", NULL, MTX_DEF); > - mtx_init(&bqdirty, "bufq dirty lock", NULL, MTX_DEF); > + mtx_init(&bqlocks[QUEUE_DIRTY], "bufq dirty lock", NULL, MTX_DEF); > + mtx_init(&bqlocks[QUEUE_EMPTY], "bufq empty lock", NULL, MTX_DEF); > + for (i = QUEUE_CLEAN; i < QUEUE_CLEAN + CLEAN_QUEUES; i++) > + mtx_init(&bqlocks[i], "bufq clean lock", NULL, MTX_DEF); > mtx_init(&rbreqlock, "runningbufspace lock", NULL, MTX_DEF); > rw_init(&nblock, "needsbuffer lock"); > mtx_init(&bdlock, "buffer daemon lock", NULL, MTX_DEF); > @@ -864,7 +1030,7 @@ bufinit(void) > for (i = 0; i < nbuf; i++) { > bp = &buf[i]; > bzero(bp, sizeof *bp); > - bp->b_flags = B_INVAL | B_INFREECNT; > + bp->b_flags = B_INVAL; > bp->b_rcred = NOCRED; > bp->b_wcred = NOCRED; > bp->b_qindex = QUEUE_EMPTY; > @@ -881,18 +1047,19 @@ bufinit(void) > /* > * maxbufspace is the absolute maximum amount of buffer space we are > * allowed to reserve in KVM and in real terms. The absolute maximum > - * is nominally used by buf_daemon. hibufspace is the nominal maximum > - * used by most other processes. The differential is required to > - * ensure that buf_daemon is able to run when other processes might > - * be blocked waiting for buffer space. > + * is nominally used by metadata. hibufspace is the nominal maximum > + * used by most other requests. The differential is required to > + * ensure that metadata deadlocks don't occur. > * > * maxbufspace is based on BKVASIZE. Allocating buffers larger then > * this may result in KVM fragmentation which is not handled optimally > - * by the system. > + * by the system. XXX This is less true with vmem. We could use > + * PAGE_SIZE. > */ > maxbufspace = (long)nbuf * BKVASIZE; > hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBCACHEBUF * 10); > - lobufspace = hibufspace - MAXBCACHEBUF; > + lobufspace = (hibufspace / 20) * 19; /* 95% */ > + bufspacethresh = lobufspace + (hibufspace - lobufspace) / 2; > > /* > * Note: The 16 MiB upper limit for hirunningspace was chosen > @@ -906,44 +1073,61 @@ bufinit(void) > 16 * 1024 * 1024), 1024 * 1024); > lorunningspace = roundup((hirunningspace * 2) / 3, MAXBCACHEBUF); > > -/* > - * Limit the amount of malloc memory since it is wired permanently into > - * the kernel space. Even though this is accounted for in the buffer > - * allocation, we don't want the malloced region to grow uncontrolled. > - * The malloc scheme improves memory utilization significantly on average > - * (small) directories. > - */ > + /* > + * Limit the amount of malloc memory since it is wired permanently into > + * the kernel space. Even though this is accounted for in the buffer > + * allocation, we don't want the malloced region to grow uncontrolled. > + * The malloc scheme improves memory utilization significantly on > + * average (small) directories. > + */ > maxbufmallocspace = hibufspace / 20; > > -/* > - * Reduce the chance of a deadlock occuring by limiting the number > - * of delayed-write dirty buffers we allow to stack up. > - */ > + /* > + * Reduce the chance of a deadlock occuring by limiting the number > + * of delayed-write dirty buffers we allow to stack up. > + */ > hidirtybuffers = nbuf / 4 + 20; > dirtybufthresh = hidirtybuffers * 9 / 10; > numdirtybuffers = 0; > -/* > - * To support extreme low-memory systems, make sure hidirtybuffers cannot > - * eat up all available buffer space. This occurs when our minimum cannot > - * be met. We try to size hidirtybuffers to 3/4 our buffer space assuming > - * BKVASIZE'd buffers. > - */ > + /* > + * To support extreme low-memory systems, make sure hidirtybuffers > + * cannot eat up all available buffer space. This occurs when our > + * minimum cannot be met. We try to size hidirtybuffers to 3/4 our > + * buffer space assuming BKVASIZE'd buffers. > + */ > while ((long)hidirtybuffers * BKVASIZE > 3 * hibufspace / 4) { > hidirtybuffers >>= 1; > } > lodirtybuffers = hidirtybuffers / 2; > > -/* > - * Try to keep the number of free buffers in the specified range, > - * and give special processes (e.g. like buf_daemon) access to an > - * emergency reserve. > - */ > - lofreebuffers = nbuf / 18 + 5; > - hifreebuffers = 2 * lofreebuffers; > + /* > + * lofreebuffers should be sufficient to avoid stalling waiting on > + * buf headers under heavy utilization. The bufs in per-cpu caches > + * are counted as free but will be unavailable to threads executing > + * on other cpus. > + * > + * hifreebuffers is the free target for the bufspace daemon. This > + * should be set appropriately to limit work per-iteration. > + */ > + lofreebuffers = MIN((nbuf / 25) + (20 * mp_ncpus), 128 * mp_ncpus); > + hifreebuffers = (3 * lofreebuffers) / 2; > numfreebuffers = nbuf; > > bogus_page = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | > VM_ALLOC_NORMAL | VM_ALLOC_WIRED); > + > + /* Setup the kva and free list allocators. */ > + vmem_set_reclaim(buffer_arena, bufkva_reclaim); > + buf_zone = uma_zcache_create("buf free cache", sizeof(struct buf), > + NULL, NULL, NULL, NULL, buf_import, buf_release, NULL, 0); > + > + /* > + * Size the clean queue according to the amount of buffer space. > + * One queue per-256mb up to the max. More queues gives better > + * concurrency but less accurate LRU. > + */ > + clean_queues = MIN(howmany(maxbufspace, 256*1024*1024), CLEAN_QUEUES); > + > } > > #ifdef INVARIANTS > @@ -1129,10 +1313,25 @@ binsfree(struct buf *bp, int qindex) > { > struct mtx *olock, *nlock; > > - BUF_ASSERT_XLOCKED(bp); > + if (qindex != QUEUE_EMPTY) { > + BUF_ASSERT_XLOCKED(bp); > + } > + > + /* > + * Stick to the same clean queue for the lifetime of the buf to > + * limit locking below. Otherwise pick ont sequentially. > + */ > + if (qindex == QUEUE_CLEAN) { > + if (bqisclean(bp->b_qindex)) > + qindex = bp->b_qindex; > + else > + qindex = bqcleanq(); > + } > > + /* > + * Handle delayed bremfree() processing. > + */ > nlock = bqlock(qindex); > - /* Handle delayed bremfree() processing. */ > if (bp->b_flags & B_REMFREE) { > olock = bqlock(bp->b_qindex); > mtx_lock(olock); > @@ -1156,15 +1355,263 @@ binsfree(struct buf *bp, int qindex) > bq_len[bp->b_qindex]++; > #endif > mtx_unlock(nlock); > +} > + > +/* > + * buf_free: > + * > + * Free a buffer to the buf zone once it no longer has valid contents. > + */ > +static void > +buf_free(struct buf *bp) > +{ > + > + if (bp->b_flags & B_REMFREE) > + bremfreef(bp); > + if (bp->b_vflags & BV_BKGRDINPROG) > + panic("losing buffer 1"); > + if (bp->b_rcred != NOCRED) { > + crfree(bp->b_rcred); > + bp->b_rcred = NOCRED; > + } > + if (bp->b_wcred != NOCRED) { > + crfree(bp->b_wcred); > + bp->b_wcred = NOCRED; > + } > + if (!LIST_EMPTY(&bp->b_dep)) > + buf_deallocate(bp); > + bufkva_free(bp); > + BUF_UNLOCK(bp); > + uma_zfree(buf_zone, bp); > + atomic_add_int(&numfreebuffers, 1); > + bufspace_wakeup(); > +} > + > +/* > + * buf_import: > + * > + * Import bufs into the uma cache from the buf list. The system still > + * expects a static array of bufs and much of the synchronization > + * around bufs assumes type stable storage. As a result, UMA is used > + * only as a per-cpu cache of bufs still maintained on a global list. > + */ > +static int > +buf_import(void *arg, void **store, int cnt, int flags) > +{ > + struct buf *bp; > + int i; > + > + mtx_lock(&bqlocks[QUEUE_EMPTY]); > + for (i = 0; i < cnt; i++) { > + bp = TAILQ_FIRST(&bufqueues[QUEUE_EMPTY]); > + if (bp == NULL) > + break; > + bremfreel(bp); > + store[i] = bp; > + } > + mtx_unlock(&bqlocks[QUEUE_EMPTY]); > + > + return (i); > +} > + > +/* > + * buf_release: > + * > + * Release bufs from the uma cache back to the buffer queues. > + */ > +static void > +buf_release(void *arg, void **store, int cnt) > +{ > + int i; > + > + for (i = 0; i < cnt; i++) > + binsfree(store[i], QUEUE_EMPTY); > +} > + > +/* > + * buf_alloc: > + * > + * Allocate an empty buffer header. > + */ > +static struct buf * > +buf_alloc(void) > +{ > + struct buf *bp; > + > + bp = uma_zalloc(buf_zone, M_NOWAIT); > + if (bp == NULL) { > + bufspace_daemonwakeup(); > + atomic_add_int(&numbufallocfails, 1); > + return (NULL); > + } > + > + /* > + * Wake-up the bufspace daemon on transition. > + */ > + if (atomic_fetchadd_int(&numfreebuffers, -1) == lofreebuffers) > + bufspace_daemonwakeup(); > + > + if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) != 0) > + panic("getnewbuf_empty: Locked buf %p on free queue.", bp); > + > + KASSERT(bp->b_vp == NULL, > + ("bp: %p still has vnode %p.", bp, bp->b_vp)); > + KASSERT((bp->b_flags & (B_DELWRI | B_NOREUSE)) == 0, > + ("invalid buffer %p flags %#x", bp, bp->b_flags)); > + KASSERT((bp->b_xflags & (BX_VNCLEAN|BX_VNDIRTY)) == 0, > + ("bp: %p still on a buffer list. xflags %X", bp, bp->b_xflags)); > + KASSERT(bp->b_npages == 0, > + ("bp: %p still has %d vm pages\n", bp, bp->b_npages)); > + KASSERT(bp->b_kvasize == 0, ("bp: %p still has kva\n", bp)); > + KASSERT(bp->b_bufsize == 0, ("bp: %p still has bufspace\n", bp)); > + > + bp->b_flags = 0; > + bp->b_ioflags = 0; > + bp->b_xflags = 0; > + bp->b_vflags = 0; > + bp->b_vp = NULL; > + bp->b_blkno = bp->b_lblkno = 0; > + bp->b_offset = NOOFFSET; > + bp->b_iodone = 0; > + bp->b_error = 0; > + bp->b_resid = 0; > + bp->b_bcount = 0; > + bp->b_npages = 0; > + bp->b_dirtyoff = bp->b_dirtyend = 0; > + bp->b_bufobj = NULL; > + bp->b_pin_count = 0; > + bp->b_data = bp->b_kvabase = unmapped_buf; > + bp->b_fsprivate1 = NULL; > + bp->b_fsprivate2 = NULL; > + bp->b_fsprivate3 = NULL; > + LIST_INIT(&bp->b_dep); > + > + return (bp); > +} > + > +/* > + * buf_qrecycle: > + * > + * Free a buffer from the given bufqueue. kva controls whether the > + * freed buf must own some kva resources. This is used for > + * defragmenting. > + */ > +static int > +buf_qrecycle(int qindex, bool kva) > +{ > + struct buf *bp, *nbp; > + > + if (kva) > + atomic_add_int(&bufdefragcnt, 1); > + nbp = NULL; > + mtx_lock(&bqlocks[qindex]); > + nbp = TAILQ_FIRST(&bufqueues[qindex]); > + > + /* > + * Run scan, possibly freeing data and/or kva mappings on the fly > + * depending. > + */ > + while ((bp = nbp) != NULL) { > + /* > + * Calculate next bp (we can only use it if we do not > + * release the bqlock). > + */ > + nbp = TAILQ_NEXT(bp, b_freelist); > + > + /* > + * If we are defragging then we need a buffer with > + * some kva to reclaim. > + */ > + if (kva && bp->b_kvasize == 0) > + continue; > + > + if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) != 0) > + continue; > + > + /* > + * Skip buffers with background writes in progress. > + */ > + if ((bp->b_vflags & BV_BKGRDINPROG) != 0) { > + BUF_UNLOCK(bp); > + continue; > + } > + > + KASSERT(bp->b_qindex == qindex, > + ("getnewbuf: inconsistent queue %d bp %p", qindex, bp)); > + /* > + * NOTE: nbp is now entirely invalid. We can only restart > + * the scan from this point on. > + */ > + bremfreel(bp); > + mtx_unlock(&bqlocks[qindex]); > + > + /* > + * Requeue the background write buffer with error and > + * restart the scan. > + */ > + if ((bp->b_vflags & BV_BKGRDERR) != 0) { > + bqrelse(bp); > + mtx_lock(&bqlocks[qindex]); > + nbp = TAILQ_FIRST(&bufqueues[qindex]); > + continue; > + } > + bp->b_flags |= B_INVAL; > + brelse(bp); > + return (0); > + } > + mtx_unlock(&bqlocks[qindex]); > + > + return (ENOBUFS); > +} > + > +/* > + * buf_recycle: > + * > + * Iterate through all clean queues until we find a buf to recycle or > + * exhaust the search. > + */ > +static int > +buf_recycle(bool kva) > +{ > + int qindex, first_qindex; > + > + qindex = first_qindex = bqcleanq(); > + do { > + if (buf_qrecycle(qindex, kva) == 0) > + return (0); > + if (++qindex == QUEUE_CLEAN + clean_queues) > + qindex = QUEUE_CLEAN; > + } while (qindex != first_qindex); > + > + return (ENOBUFS); > +} > + > +/* > + * buf_scan: > + * > + * Scan the clean queues looking for a buffer to recycle. needsbuffer > + * is set on failure so that the caller may optionally bufspace_wait() > + * in a race-free fashion. > + */ > +static int > +buf_scan(bool defrag) > +{ > + int error; > > /* > - * Something we can maybe free or reuse. > - */ > - if (bp->b_bufsize && !(bp->b_flags & B_DELWRI)) > - bufspacewakeup(); > - > - if ((bp->b_flags & B_INVAL) || !(bp->b_flags & B_DELWRI)) > - bufcountadd(bp); > + * To avoid heavy synchronization and wakeup races we set > + * needsbuffer and re-poll before failing. This ensures that > + * no frees can be missed between an unsuccessful poll and > + * going to sleep in a synchronized fashion. > + */ > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-head@freebsd.org Mon Nov 2 03:29:30 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CE62A24BD0; Mon, 2 Nov 2015 03:29:30 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::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 34FD7162A; Mon, 2 Nov 2015 03:29:30 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pasz6 with SMTP id z6so133817696pas.2; Sun, 01 Nov 2015 19:29:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KcoGsHNLX26JNxUldatFyiJnP65GvtTKAS+F3/uBZPI=; b=XvQkl0QgrS7x0w1z5YZomdHV0paGXrE1Uy0AYWZ4yF2HXmlfUcrwKzvd6+B2186Yz0 3RcPurIzJPXGosp+CXJy+VKsiACobqQ/s08I5uA5TKvPVZelAl7ks/oY2Se5hmLtcd2Z dhIiD6m7SUR/oT32PI6NdOnn1nuOinjmExfwr7/2UNIdioj6sds1ZnLL+kFglMaFSG4R GHhkT5ROtCu00gbPEiMqsDl5Jg++LkDWmhhS/2jJwagbOSFHng8DiN7uuBHPl40sxNS1 5wLJZ9sy66MPKHxK6hIZtz8EHvp3gJYkwY6LrERf2O757owpioAayXQgD8jFvLGE1YnA 0oiQ== X-Received: by 10.69.26.7 with SMTP id iu7mr24620153pbd.27.1446434969814; Sun, 01 Nov 2015 19:29:29 -0800 (PST) Received: from ?IPv6:2601:601:800:126d:541b:f764:9c9c:ea2b? ([2601:601:800:126d:541b:f764:9c9c:ea2b]) by smtp.gmail.com with ESMTPSA id ia3sm20893264pbb.5.2015.11.01.19.29.28 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 01 Nov 2015 19:29:29 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289279 - in head/sys: kern vm From: NGie Cooper In-Reply-To: Date: Sun, 1 Nov 2015 19:29:28 -0800 Cc: Jeff Roberson , Mark Johnston , Warner Losh , benno , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <201510140210.t9E2A79H056595@repo.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 03:29:30 -0000 > On Nov 1, 2015, at 19:20, Adrian Chadd wrote: >=20 > hiya jeff, >=20 > this broke low-memory, no-swap boards (eg MIPS.) >=20 > On a MIPS board (carambola2) with 32MB of RAM, just scp'ing a kernel > into the rootfs on USB hangs the system. After doing some digging, I > found this: >=20 >=20 > INTERNAL: Allocating one item from buf free cache(0x83fea7e0) > uma_zalloc_arg: Bucketzone returned NULL > INTERNAL: Allocating one item from buf free cache(0x83fea7e0) > uma_zalloc_arg: Bucketzone returned NULL >=20 > .. and it was just stuck in a loop trying to allocate them, failing, > and trying to allocate them again. >=20 > I'll see if I can reproduce it with a qemu emulator with sufficiently > low RAM so you don't need a MIPS router to reproduce it. >=20 > It's sufficient to just start the scp; it runs out of RAM within a > couple of seconds. >=20 > Any ideas? What happens if you change vfs.maxbufspace ? The reason that I=E2=80=99m noting is that (if I=E2=80=99m reading the = code correctly), it=E2=80=99s now allocating 16 clean queues instead of = 1 and each is up to vfs.maxbufspace size, which is 256MB per queue based = on this line: + clean_queues =3D MIN(howmany(maxbufspace, 256*1024*1024), = CLEAN_QUEUES); The 256MB amount seems like it should be a tunable, as well as the = CLEAN_QUEUES #define=E2=80=A6 it=E2=80=99s a bit high for low memory = platforms, i.e. platforms with <372MB of scratch space to play around = with I=E2=80=99m guessing=E2=80=A6 Thanks, -NGie= From owner-svn-src-head@freebsd.org Mon Nov 2 03:36:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39B4DA24CF0; Mon, 2 Nov 2015 03:36:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E60081ABD; Mon, 2 Nov 2015 03:36:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA23aGpB044403; Mon, 2 Nov 2015 03:36:16 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA23aGQH044402; Mon, 2 Nov 2015 03:36:16 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511020336.tA23aGQH044402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 2 Nov 2015 03:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290258 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 03:36:17 -0000 Author: adrian Date: Mon Nov 2 03:36:15 2015 New Revision: 290258 URL: https://svnweb.freebsd.org/changeset/base/290258 Log: mips: rate limit the trap handler output; add pid/tid/program name. I discovered that we're logging each trap, which gets pretty spendy; and there wasn't any further information on the pid/tid/progname involved. I originally noticed this because I don't attach anything to /dev/log and so the log() output stays going to the kernel. That's an oops on my part, but I'm glad I did it. This commit adds the following: * a rate limiter, which could do with some eyeballs/ideas on how to make it more predictable on SMP; * log pid, tid, progname (comm) as part of the output. I now get output like this: Unaligned Load Word: pid=621 (pmcstat), tid=100060, pc=0xffffffff803ae898, badvaddr=0x40a10055 Unaligned Load Word: pid=621 (pmcstat), tid=100060, pc=0xffffffff803ae898, badvaddr=0x40a10051 Unaligned Load Word: pid=621 (pmcstat), tid=100060, pc=0xffffffff803ae898, badvaddr=0x40a1004d Unaligned Load Word: pid=602 (login), tid=100042, pc=0xffffffff803ae898, badvaddr=0x401159 Unaligned Load Word: pid=602 (login), tid=100042, pc=0xffffffff803ae898, badvaddr=0x401155 Unaligned Load Word: pid=602 (login), tid=100042, pc=0xffffffff803ae898, badvaddr=0x401151 .. which makes it much easier to start figuring out what/where to fix. The pc looks suss (it looks like it's in kernel space); I'll dig into that one next. Tested: * AR9331 SoC (Carambola2) Modified: head/sys/mips/mips/trap.c Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Mon Nov 2 03:14:37 2015 (r290257) +++ head/sys/mips/mips/trap.c Mon Nov 2 03:36:15 2015 (r290258) @@ -1660,11 +1660,25 @@ mips_unaligned_load_store(struct trapfra } +/* + * XXX TODO: SMP? + */ +static struct timeval unaligned_lasterr; +static int unaligned_curerr; + +static int unaligned_pps_log_limit = 4; + +SYSCTL_INT(_machdep, OID_AUTO, unaligned_log_pps_limit, CTLFLAG_RWTUN, + &unaligned_pps_log_limit, 0, + "limit number of userland unaligned log messages per second"); + static int emulate_unaligned_access(struct trapframe *frame, int mode) { register_t pc; int access_type = 0; + struct thread *td = curthread; + struct proc *p = curproc; pc = frame->pc + (DELAYBRANCH(frame->cause) ? 4 : 0); @@ -1691,9 +1705,19 @@ emulate_unaligned_access(struct trapfram else frame->pc += 4; - log(LOG_INFO, "Unaligned %s: pc=%#jx, badvaddr=%#jx\n", - access_name[access_type - 1], (intmax_t)pc, - (intmax_t)frame->badvaddr); + if (ppsratecheck(&unaligned_lasterr, + &unaligned_curerr, unaligned_pps_log_limit)) { + /* XXX TODO: keep global/tid/pid counters? */ + log(LOG_INFO, + "Unaligned %s: pid=%ld (%s), tid=%ld, " + "pc=%#jx, badvaddr=%#jx\n", + access_name[access_type - 1], + (long) p->p_pid, + p->p_comm, + (long) td->td_tid, + (intmax_t)pc, + (intmax_t)frame->badvaddr); + } } } return access_type; From owner-svn-src-head@freebsd.org Mon Nov 2 04:07:22 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CADDA1E20A for ; Mon, 2 Nov 2015 04:07:22 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-pa0-x234.google.com (mail-pa0-x234.google.com [IPv6:2607:f8b0:400e:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 024D013B2 for ; Mon, 2 Nov 2015 04:07:22 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: by pabfh17 with SMTP id fh17so10811652pab.0 for ; Sun, 01 Nov 2015 20:07:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jroberson_net.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=MvZukJWOZKYizJjyo/+CsrhQQNPlxzVZVAfOC/hdp64=; b=mC96YSgSFw62DKu0N6MF/lm4ZdrFu1smZSIP4k2zjChwewgDs2WUPI+YjF1RMqfmOZ 9nm+toL8Enavjtl6+yr7+da9xHvjNa9K0Wui/VrBPbF6bty1wI7YOB1H5M8L5Rni0vb4 KV9XB20R+p2gurDpsciQjWOZPiF1svmZW97hBtIfVb3GfzOgcMLhHJxq0vIfGDMpuWI1 ar39KvhNq8WzJVa/Zjkvauym+a9UiotW5NDgMRoYDfFMrT2+PttPDudZGWnhmfMctogy GWuTyH04Jl2cRc62RzwBZMc3nfGUhEgas6GpWd69II/dHRY5UzM8MyIiYG+iyCcD28Fu wIWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=MvZukJWOZKYizJjyo/+CsrhQQNPlxzVZVAfOC/hdp64=; b=KXQZ/a63l7/iywjrx3+VdchdyooS88RtSPuvz8NJObUcmyOWfMLPE58JxhekZozTQK pQ4jftErvmaPjA+z8Rp2htlH1bbJMAACccLu0+LQbos4SNlGYFQOn5ovJihcic17inQH eHrSpMqn8kejRQ4iRlapgrMVEhc/spiQou9+LXfstZRjoiQZRqjRx004KskhJrDMN53+ gYoCA9HLibhTttXchw6QSrqL3CTVpC44mG2NUIM1gsCIvxxw5pXHc77OlIo7K9/3DjmL klz5CyOz66PuAFwPm9uAHkB6XvGUNfNMTZYB1ND8EO/a4OWU5J35wFcF/abT27+hL0Kf CLWg== X-Gm-Message-State: ALoCoQllRMLB10yXkpLhOV3gMAjIPZT+VbE4E1p9s4Sxxa7AsCUpfMTC3r7RhrPsevE5nY17zsIi X-Received: by 10.66.236.37 with SMTP id ur5mr25106982pac.66.1446437241113; Sun, 01 Nov 2015 20:07:21 -0800 (PST) Received: from rrcs-66-91-135-210.west.biz.rr.com (rrcs-66-91-135-210.west.biz.rr.com. [66.91.135.210]) by smtp.gmail.com with ESMTPSA id ez1sm21047607pab.6.2015.11.01.20.07.19 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Nov 2015 20:07:20 -0800 (PST) Date: Sun, 1 Nov 2015 18:05:10 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: NGie Cooper cc: Adrian Chadd , Jeff Roberson , Mark Johnston , Warner Losh , benno , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r289279 - in head/sys: kern vm In-Reply-To: Message-ID: References: <201510140210.t9E2A79H056595@repo.freebsd.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 04:07:22 -0000 On Sun, 1 Nov 2015, NGie Cooper wrote: > >> On Nov 1, 2015, at 19:20, Adrian Chadd wrote: >> >> hiya jeff, >> >> this broke low-memory, no-swap boards (eg MIPS.) >> >> On a MIPS board (carambola2) with 32MB of RAM, just scp'ing a kernel >> into the rootfs on USB hangs the system. After doing some digging, I >> found this: >> >> >> INTERNAL: Allocating one item from buf free cache(0x83fea7e0) >> uma_zalloc_arg: Bucketzone returned NULL >> INTERNAL: Allocating one item from buf free cache(0x83fea7e0) >> uma_zalloc_arg: Bucketzone returned NULL >> >> .. and it was just stuck in a loop trying to allocate them, failing, >> and trying to allocate them again. >> >> I'll see if I can reproduce it with a qemu emulator with sufficiently >> low RAM so you don't need a MIPS router to reproduce it. >> >> It's sufficient to just start the scp; it runs out of RAM within a >> couple of seconds. >> >> Any ideas? > > What happens if you change vfs.maxbufspace ? > > The reason that I?m noting is that (if I?m reading the code correctly), it?s now allocating 16 clean queues instead of 1 and each is up to vfs.maxbufspace size, which is 256MB per queue based on this line: > > + clean_queues = MIN(howmany(maxbufspace, 256*1024*1024), CLEAN_QUEUES); > > The 256MB amount seems like it should be a tunable, as well as the CLEAN_QUEUES #define? it?s a bit high for low memory platforms, i.e. platforms with <372MB of scratch space to play around with I?m guessing? maxbufspace is still a global. It just makes N queues for every 256MB of configured buffer cache size. We shouldn't be looping forever. It should sleep and try to re-allocate. How many cpus are on the mips board? We may need to implement something to directly flush the buf zone and disable the per-cpu caches when allocation fails. Jeff > > Thanks, > -NGie From owner-svn-src-head@freebsd.org Mon Nov 2 04:09:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C42B0A1E2A0; Mon, 2 Nov 2015 04:09:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) 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 9DCCD15A8; Mon, 2 Nov 2015 04:09:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pasz6 with SMTP id z6so134858896pas.2; Sun, 01 Nov 2015 20:09:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=SYFCvJh6Hufl1vUFdV/GtFZEWF+0DwCcxG8aIj/waes=; b=DWOxIaOMiVdsgQe+mAG2GCzH/a8z+0IiwD1oh8AefLsApFlUHLgxloyGhXqE0UZful ARwyIizNEHOn8GtCuyghyxGN9YJ9seX5k8ycSV/b+3T7OZ91ioxDXLNESkHGEFZnpHef 6IwRFumrfHnH8py8WASjrljJHbfi6YLSBuj1/v41Gh4PjTV8SbGF/+wQVk+SQ/xeaqkv di5gS+tpkxHEc3zFmP+5iDFWakhWWbbPEkFH601iKaOlDqnD3RikDGG79wm2e/SQnaKz Fg3a6GtAXx1ligmV/JqZLxgAgjgr+oZv39B1oBLNFqHjADcS5yFpD3VtERsaIE9z7kb5 zAjg== X-Received: by 10.66.221.6 with SMTP id qa6mr24956724pac.9.1446437340233; Sun, 01 Nov 2015 20:09:00 -0800 (PST) Received: from ?IPv6:2601:601:800:126d:541b:f764:9c9c:ea2b? ([2601:601:800:126d:541b:f764:9c9c:ea2b]) by smtp.gmail.com with ESMTPSA id kd9sm4404547pbb.32.2015.11.01.20.08.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 01 Nov 2015 20:08:59 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289279 - in head/sys: kern vm From: NGie Cooper In-Reply-To: Date: Sun, 1 Nov 2015 20:08:58 -0800 Cc: Jeff Roberson , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <201510140210.t9E2A79H056595@repo.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 04:09:00 -0000 > On Nov 1, 2015, at 19:33, Adrian Chadd wrote: >=20 > Well, sure, but what was it doing before? Like, what should I tune it = to? >=20 > 32MB of RAM (and we still boot/run on 16MB RAM, fwiw) doesn't exactly > leave much in the way of "space" ... I don=E2=80=99t have benchmarks that I can provide to back up any = particular claim, so your guess is as good as mine (unfortunately). The calculations for lofreebuffers and hifreebuffers have changed. With = kern.nbuf =3D 20125, kern.smp.cpus =3D 3, and vfs.maxbufspace =3D = 329728000 (314 MB), I ended up with some interesting new numbers... Old formulas Old values lofreebuffers =3D nbuf / 18 + 5 | 1123 hifreebuffers =3D 2 * lofreebuffers; | 2246 clean_queues | 1 (hardcoded as part = of the previous design) New formulas = New values lofreebuffers =3D MIN((nbuf / 25) + (20 * mp_ncpus), 128 * mp_ncpus); = | 384 hifreebuffers =3D (3 * lofreebuffers) / 2; = | 576 clean_queues =3D MIN(howmany(maxbufspace, 256*1024*1024), CLEAN_QUEUES); = | ~1 What happens if you plug in your current values with the old and new = formulas? Thanks, -NGie= From owner-svn-src-head@freebsd.org Mon Nov 2 04:13:50 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 679BFA1E43E; Mon, 2 Nov 2015 04:13:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001: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 2E31E1A0F; Mon, 2 Nov 2015 04:13:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbdj2 with SMTP id dj2so46234430igb.1; Sun, 01 Nov 2015 20:13:49 -0800 (PST) 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=dw4/iwv1A+vpz6u+PEjFQBsE5PEYQg6IX5t0sYva268=; b=wKDTa8FU41wlx8WU5RYH6+LoS6vBoZGeBVGyh9sArrCf+I6qZvgLSQGHUjzqKlebyW gL9xiUMEMu6y6Raa9CNVTn9TbpHT8IRNU1Prl2tq9sVbiuoeFQYtIpqpsPHoOvnkjfy+ fmu8JQE65yfS8QDNUt5gseZJhc3QgEKXHwaSOGqI8CR3llR0fBQuLjkBxRnRggourPZA ob8Qyvf0drWpydFjHoy7irbLw++X3RBLMA1MvFry88KOVUQFrFXSzq/dakAu2iNO5M+c Fvilq9Wm3Y987n6ds0AQVKU9vea2RU9htb5lhbp0DEb2CHCfGLC7iEgbJtTK6T1nHVuW rIKw== MIME-Version: 1.0 X-Received: by 10.50.164.196 with SMTP id ys4mr9414091igb.37.1446437629699; Sun, 01 Nov 2015 20:13:49 -0800 (PST) Received: by 10.36.46.66 with HTTP; Sun, 1 Nov 2015 20:13:49 -0800 (PST) In-Reply-To: References: <201510140210.t9E2A79H056595@repo.freebsd.org> Date: Sun, 1 Nov 2015 20:13:49 -0800 Message-ID: Subject: Re: svn commit: r289279 - in head/sys: kern vm From: Adrian Chadd To: Jeff Roberson Cc: NGie Cooper , Jeff Roberson , Mark Johnston , Warner Losh , benno , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 04:13:50 -0000 On 1 November 2015 at 20:05, Jeff Roberson wrote: > On Sun, 1 Nov 2015, NGie Cooper wrote: > >> >>> On Nov 1, 2015, at 19:20, Adrian Chadd wrote: >>> >>> hiya jeff, >>> >>> this broke low-memory, no-swap boards (eg MIPS.) >>> >>> On a MIPS board (carambola2) with 32MB of RAM, just scp'ing a kernel >>> into the rootfs on USB hangs the system. After doing some digging, I >>> found this: >>> >>> >>> INTERNAL: Allocating one item from buf free cache(0x83fea7e0) >>> uma_zalloc_arg: Bucketzone returned NULL >>> INTERNAL: Allocating one item from buf free cache(0x83fea7e0) >>> uma_zalloc_arg: Bucketzone returned NULL >>> >>> .. and it was just stuck in a loop trying to allocate them, failing, >>> and trying to allocate them again. >>> >>> I'll see if I can reproduce it with a qemu emulator with sufficiently >>> low RAM so you don't need a MIPS router to reproduce it. >>> >>> It's sufficient to just start the scp; it runs out of RAM within a >>> couple of seconds. >>> >>> Any ideas? >> >> >> What happens if you change vfs.maxbufspace ? >> >> The reason that I?m noting is that (if I?m reading the code correctly), >> it?s now allocating 16 clean queues instead of 1 and each is up to >> vfs.maxbufspace size, which is 256MB per queue based on this line: >> >> + clean_queues = MIN(howmany(maxbufspace, 256*1024*1024), CLEAN_QUEUES); >> >> The 256MB amount seems like it should be a tunable, as well as the >> CLEAN_QUEUES #define? it?s a bit high for low memory platforms, i.e. >> platforms with <372MB of scratch space to play around with I?m guessing? > > > maxbufspace is still a global. It just makes N queues for every 256MB of > configured buffer cache size. > > We shouldn't be looping forever. It should sleep and try to re-allocate. > How many cpus are on the mips board? We may need to implement something to > directly flush the buf zone and disable the per-cpu caches when allocation > fails. It's a single CPU mips board (AR9331 SoC.) -adrian From owner-svn-src-head@freebsd.org Mon Nov 2 04:15:57 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B033A1E4A7; Mon, 2 Nov 2015 04:15:57 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [IPv6:2607:f8b0:4001:c05::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 41F611B7F; Mon, 2 Nov 2015 04:15:57 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbdj2 with SMTP id dj2so46255322igb.1; Sun, 01 Nov 2015 20:15:56 -0800 (PST) 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=9Rgg5WXr+poXKC7L5fhG2iHSDUeJX+LDyZ/KnQkO0A8=; b=hLGuCi22emmtdUZxvoG+Hm6sCGgroR7UqcBbzc+k9YeBQtlZqau0oMfm9jfF2flFp/ Qr8Dz97nQMozojBPONp2xnSXocTzLwjgZV5gTWlliX2cOVzaqCvRbovGrVnskWegSvXU dWPuBEEXO3x27Fe5PMr1Zn8bnz401PNsRiFuNN0f9zzyTApJtFKSb4uvShegU5GG4lEZ PMS8GFMM3sE0jXlfVLPnO0zM4Jd1RBQ+paUfas+vS6hGpN/gpD4UVDoBLk2gV/nNyhf3 cbZGEAJpjqlGJiZeXqIXDJUuXPv7x1r8/a7XDwQlhkU4b9PZE3WvV9IMTbYJtfiKjVkn UtHA== MIME-Version: 1.0 X-Received: by 10.50.73.228 with SMTP id o4mr9406492igv.37.1446437756787; Sun, 01 Nov 2015 20:15:56 -0800 (PST) Received: by 10.36.46.66 with HTTP; Sun, 1 Nov 2015 20:15:56 -0800 (PST) In-Reply-To: References: <201510140210.t9E2A79H056595@repo.freebsd.org> Date: Sun, 1 Nov 2015 20:15:56 -0800 Message-ID: Subject: Re: svn commit: r289279 - in head/sys: kern vm From: Adrian Chadd To: NGie Cooper Cc: Jeff Roberson , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 04:15:57 -0000 well, there's one cpu, nbuf=128, so lofreebuffers will be MIN(nbuf/25+20, 128); nbuf=128, so it'll be 25. hifreebuffers will be .. (3*25)/2, so 37. -adrian From owner-svn-src-head@freebsd.org Mon Nov 2 04:20:59 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD87EA1E65C; Mon, 2 Nov 2015 04:20:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [IPv6:2607:f8b0:400e:c03::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 8DE891D76; Mon, 2 Nov 2015 04:20:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by padec8 with SMTP id ec8so26042201pad.1; Sun, 01 Nov 2015 20:20:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=M6eWChWyIsJdgfjxLyPzNtNmmirItxxio71/VqIga6k=; b=cBFPvmLeBasnwIhzLNiEgxQQrWJohjPOVaouGCNzbUQ9CG5y+VSwy1d50qGWmEwYPD UlxdjCNLGGmezb/XcznzZ237uNFJGpSxqdLcjWwao8mnePEa1nNNg30+yz6z+EicY8sn 1tGCjGwCBqJPdNMgVBodMs7dirfE2n7SO3F4SPAKhq5PHelTw02O0zOZJwRGlaNfNdqh I7b882NiNdBOxOSyNwAUvCrwep/wHVUcBe+/ioFM0inyKiE6KKzP/8W9uMrT89hRz46G QfiE3uTgm8DWfEZ3PaAx7FbMz5Z3CZD1H2gmf41z9OJ6QgWQdBWdE82NYHve4GmeJL6i m2Fg== X-Received: by 10.68.225.199 with SMTP id rm7mr25034775pbc.0.1446438058968; Sun, 01 Nov 2015 20:20:58 -0800 (PST) Received: from [192.168.20.7] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id bn1sm21119206pad.17.2015.11.01.20.20.58 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Nov 2015 20:20:58 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289279 - in head/sys: kern vm From: NGie Cooper In-Reply-To: Date: Sun, 1 Nov 2015 20:20:57 -0800 Cc: Jeff Roberson , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <11056C8B-1E41-4132-BBDB-AFA37B2A104B@gmail.com> References: <201510140210.t9E2A79H056595@repo.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 04:20:59 -0000 > On Nov 1, 2015, at 20:15, Adrian Chadd wrote: >=20 > well, there's one cpu, nbuf=3D128, so lofreebuffers will be > MIN(nbuf/25+20, 128); nbuf=3D128, so it'll be 25. > hifreebuffers will be .. (3*25)/2, so 37. The values calculated via the old formulas were 12 and 24, BTW. What=E2=80= =99s your maxbufspace set to?= From owner-svn-src-head@freebsd.org Mon Nov 2 04:24:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0D91A1E6F8; Mon, 2 Nov 2015 04:24:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::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 A9AD31083; Mon, 2 Nov 2015 04:24:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by ioll68 with SMTP id l68so133703419iol.3; Sun, 01 Nov 2015 20:24:03 -0800 (PST) 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:content-transfer-encoding; bh=HXef/vAqYyEP8rOS2fDxnvcTVckqdDsj028hCRfmv+U=; b=H/+f2QpYPWJd4+3YEvuzsg3cj5SCc6772jrNHZSxVbypxHayJv7xOTmQBPWaeIHxPu S2v2g64bWWbH7B9cjYYc3m1GII/7uWSV6miRTWGm+0+pG3vY5FHXNmjgjPPIJiXzM9we VAktXRJGKijgRCEnwMLFimjC6aUC8kqL/tiCHF1G74uSkilUy7nGLHPvqd3JRu4uZiQC mAEzPLIhDhDEpgYe3kpzKJj51Jz9R9mDm1TXSxBsnzYUGxBD/+HH5OInE3PzhBtWGczn /+qpdnxahlBC97Q0tRaNdIkg4fQ4iaHPX1QqJ3wIGNqVG9J2Ldr9TNdmffO6kmIj9Kox 4/BQ== MIME-Version: 1.0 X-Received: by 10.107.3.72 with SMTP id 69mr20016396iod.75.1446438243199; Sun, 01 Nov 2015 20:24:03 -0800 (PST) Received: by 10.36.46.66 with HTTP; Sun, 1 Nov 2015 20:24:03 -0800 (PST) In-Reply-To: <11056C8B-1E41-4132-BBDB-AFA37B2A104B@gmail.com> References: <201510140210.t9E2A79H056595@repo.freebsd.org> <11056C8B-1E41-4132-BBDB-AFA37B2A104B@gmail.com> Date: Sun, 1 Nov 2015 20:24:03 -0800 Message-ID: Subject: Re: svn commit: r289279 - in head/sys: kern vm From: Adrian Chadd To: NGie Cooper Cc: Jeff Roberson , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 04:24:04 -0000 On 1 November 2015 at 20:20, NGie Cooper wrote: > >> On Nov 1, 2015, at 20:15, Adrian Chadd wrote: >> >> well, there's one cpu, nbuf=3D128, so lofreebuffers will be >> MIN(nbuf/25+20, 128); nbuf=3D128, so it'll be 25. >> hifreebuffers will be .. (3*25)/2, so 37. > > The values calculated via the old formulas were 12 and 24, BTW. What=E2= =80=99s your maxbufspace set to? This is running with the patch reverted: root@:~ # sysctl vfs | grep buf | grep space vfs.runningbufspace: 0 vfs.bufspace: 424960 vfs.bufkvaspace: 1081344 vfs.maxbufspace: 2097152 vfs.bufmallocspace: 0 vfs.maxmallocbufspace: 78643 vfs.lobufspace: 1507328 vfs.hibufspace: 1572864 -adrian From owner-svn-src-head@freebsd.org Mon Nov 2 07:13:46 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B0DAA24648; Mon, 2 Nov 2015 07:13:46 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6E3CE1A4F; Mon, 2 Nov 2015 07:13:46 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 6E39E1823; Mon, 2 Nov 2015 07:13:46 +0000 (UTC) Date: Mon, 2 Nov 2015 07:13:46 +0000 From: Alexey Dokuchaev To: Michal Meloun Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290234 - head/share/misc Message-ID: <20151102071346.GA12970@FreeBSD.org> References: <201511011654.tA1GstJP054578@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201511011654.tA1GstJP054578@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 07:13:46 -0000 On Sun, Nov 01, 2015 at 04:54:55PM +0000, Michal Meloun wrote: > New Revision: 290234 > URL: https://svnweb.freebsd.org/changeset/base/290234 > > Log: > Install myself as src committer. > > Approved by: kib (mentor) > > Description of fields to fill in above: 76 columns --| > [ garbage omitteed ] Here is a small advice: do not rely on "svn ci" calling your $EDITOR for you, compose the message yourself first and then do "svn ci -F $logfile". For one-liners, "svn ci -m message" works even better. ./danfe From owner-svn-src-head@freebsd.org Mon Nov 2 07:36:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85A35A24A7C; Mon, 2 Nov 2015 07:36:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53A98160C; Mon, 2 Nov 2015 07:36:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA27agXF021425; Mon, 2 Nov 2015 07:36:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA27agJq021424; Mon, 2 Nov 2015 07:36:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020736.tA27agJq021424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 07:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290259 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 07:36:43 -0000 Author: ngie Date: Mon Nov 2 07:36:42 2015 New Revision: 290259 URL: https://svnweb.freebsd.org/changeset/base/290259 Log: Sync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53 Sections involving unimplemented filesystems (chfs, msdosfs, udf, v7fs) and options have been omitted. MFC after: 1 week Obtained from: NetBSD Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/makefs.8 Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Mon Nov 2 03:36:15 2015 (r290258) +++ head/usr.sbin/makefs/makefs.8 Mon Nov 2 07:36:42 2015 (r290259) @@ -44,10 +44,10 @@ .Sh SYNOPSIS .Nm .Op Fl DxZ -.Op Fl B Ar byte-order +.Op Fl B Ar endian .Op Fl b Ar free-blocks .Op Fl d Ar debug-mask -.Op Fl F Ar specfile +.Op Fl F Ar mtree-specfile .Op Fl f Ar free-files .Op Fl M Ar minimum-size .Op Fl m Ar maximum-size @@ -69,9 +69,9 @@ from the directory tree .Ar directory or from the mtree manifest .Ar manifest . -If optional directory tree +If any optional directory trees are passed in the .Ar extra-directory -is passed, then the directory tree of each argument will be merged +arguments, then the directory tree of each argument will be merged into the .Ar directory or @@ -82,9 +82,9 @@ No special devices or privileges are req .Pp The options are as follows: .Bl -tag -width flag -.It Fl B Ar byte-order +.It Fl B Ar endian Set the byte order of the image to -.Ar byte-order . +.Ar endian . Valid byte orders are .Ql 4321 , .Ql big , @@ -114,9 +114,9 @@ Enable various levels of debugging, depe set in .Ar debug-mask . XXX: document these -.It Fl F Ar specfile +.It Fl F Ar mtree-specfile Use -.Ar specfile +.Ar mtree-specfile as an .Xr mtree 8 .Sq specfile @@ -174,13 +174,13 @@ Set the maximum size of the file system .Ar maximum-size . An error will be raised if the target file system needs to be larger than this to accommodate the provided directory tree. -.It Fl N Ar dbdir +.It Fl N Ar userdb-dir Use the user database text file .Pa master.passwd and group database text file .Pa group from -.Ar dbdir , +.Ar userdb-dir , rather than using the results from the system's .Xr getpwnam 3 and @@ -226,7 +226,9 @@ ISO 9660 file system. .It Fl x Exclude file system nodes not explicitly listed in the specfile. .It Fl Z -Create the image as a sparse file. +Create a sparse file for +.Sy ffs . +This is useful for virtual machine images. .El .Pp Where sizes are specified, a decimal number of bytes is expected. @@ -339,7 +341,7 @@ Load a generic boot image into the first .It Sy hard-disk-boot Boot image is a hard disk image. .It Sy keep-bad-images -Do not throw away images whose write was aborted due to an error. +Don't throw away images whose write was aborted due to an error. For debugging purposes. .It Sy label Label name of the image. @@ -372,11 +374,12 @@ The utility appeared in .Nx 1.6 . .Sh AUTHORS -.An Luke Mewburn Aq Mt lukem@NetBSD.org -(original program) -.An Daniel Watt -.An Walter Deignan -.An Ryan Gabrys -.An Alan Perez-Rathke +.An Luke Mewburn +.Aq lukem@NetBSD.org +(original program), +.An Daniel Watt , +.An Walter Deignan , +.An Ryan Gabrys , +.An Alan Perez-Rathke , .An Ram Vedam (cd9660 support) From owner-svn-src-head@freebsd.org Mon Nov 2 07:40:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F97FA24BD5; Mon, 2 Nov 2015 07:40:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4A6C1925; Mon, 2 Nov 2015 07:40:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA27eJKM021602; Mon, 2 Nov 2015 07:40:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA27eJLw021601; Mon, 2 Nov 2015 07:40:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020740.tA27eJLw021601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 07:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290260 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 07:40:20 -0000 Author: ngie Date: Mon Nov 2 07:40:18 2015 New Revision: 290260 URL: https://svnweb.freebsd.org/changeset/base/290260 Log: Document undocumented long options for -t cd9660 Note which options have been implemented and which options haven't been implemented Submitted as the following NetBSD PRs: bin/50390 and bin/50392 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/makefs.8 Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Mon Nov 2 07:36:42 2015 (r290259) +++ head/usr.sbin/makefs/makefs.8 Mon Nov 2 07:40:18 2015 (r290260) @@ -303,10 +303,10 @@ The following keywords are supported: .It Sy allow-deep-trees Allow the directory structure to exceed the maximum specified in the spec. -.\" .It Sy allow-illegal-chars -.\" Unknown -.\" .It Sy allow-lowercase -.\" Unknown +.It Sy allow-illegal-chars +Allow illegal characters in filenames. This option is not implemented. +.It Sy allow-lowercase +Allow lowercase characters in filenames. This option is not implemented. .It Sy allow-max-name Allow 37 instead of 33 characters for filenames by omitting the version id. @@ -320,6 +320,8 @@ Use the extension to encode .Tn RISC OS metadata. +.It Sy bootimagedir +Boot image directory. This option is not implemented. .It Sy chrp-boot Write an MBR partition table to the image to allow older CHRP hardware to boot. @@ -340,6 +342,16 @@ or Load a generic boot image into the first 32K of the cd9660 image. .It Sy hard-disk-boot Boot image is a hard disk image. +.It Sy isoLevel +An integer representing the ISO 9660 interchange level where +.Dq level +is either +.Ql 1 +or +.Ql 2 . +.Dq level +.Ql 3 +is not implemented. .It Sy keep-bad-images Don't throw away images whose write was aborted due to an error. For debugging purposes. @@ -353,14 +365,16 @@ Boot image is a ElTorito image. .It Sy no-trailing-padding Do not pad the image (apparently Linux needs the padding). -.\" .It Sy omit-trailing-period -.\" Unknown +.It Sy omit-trailing-period +Omit trailing periods in filenames. .It Sy preparer Preparer ID of the image. .It Sy publisher Publisher ID of the image. .It Sy rockridge Use RockRidge extensions (for longer filenames, etc.). +.It Sy verbose +Turns on verbose output. .It Sy volumeid Volume set identifier of the image. .El From owner-svn-src-head@freebsd.org Mon Nov 2 07:42:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56D96A24D81; Mon, 2 Nov 2015 07:42:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21D611D72; Mon, 2 Nov 2015 07:42:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA27ggCO024237; Mon, 2 Nov 2015 07:42:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA27ggRU024236; Mon, 2 Nov 2015 07:42:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020742.tA27ggRU024236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 07:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290261 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 07:42:43 -0000 Author: ngie Date: Mon Nov 2 07:42:42 2015 New Revision: 290261 URL: https://svnweb.freebsd.org/changeset/base/290261 Log: Bump .Dd for r290259 and r290260 Modified: head/usr.sbin/makefs/makefs.8 Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Mon Nov 2 07:40:18 2015 (r290260) +++ head/usr.sbin/makefs/makefs.8 Mon Nov 2 07:42:42 2015 (r290261) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2015 +.Dd November 1, 2015 .Dt MAKEFS 8 .Os .Sh NAME From owner-svn-src-head@freebsd.org Mon Nov 2 07:46:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D249A24E0F; Mon, 2 Nov 2015 07:46:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A99B1F3B; Mon, 2 Nov 2015 07:46:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA27kl1K024427; Mon, 2 Nov 2015 07:46:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA27klbn024426; Mon, 2 Nov 2015 07:46:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020746.tA27klbn024426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 07:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290262 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 07:46:48 -0000 Author: ngie Date: Mon Nov 2 07:46:47 2015 New Revision: 290262 URL: https://svnweb.freebsd.org/changeset/base/290262 Log: Fix spelling of `isolevel` cd9660 option MFC after: 1 week X-MFC with: r290260 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/makefs.8 Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Mon Nov 2 07:42:42 2015 (r290261) +++ head/usr.sbin/makefs/makefs.8 Mon Nov 2 07:46:47 2015 (r290262) @@ -342,7 +342,7 @@ or Load a generic boot image into the first 32K of the cd9660 image. .It Sy hard-disk-boot Boot image is a hard disk image. -.It Sy isoLevel +.It Sy isolevel An integer representing the ISO 9660 interchange level where .Dq level is either From owner-svn-src-head@freebsd.org Mon Nov 2 08:43:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7359A23BD3; Mon, 2 Nov 2015 08:43:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90F4E1B94; Mon, 2 Nov 2015 08:43:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA28hFhX041747; Mon, 2 Nov 2015 08:43:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA28hFOA041746; Mon, 2 Nov 2015 08:43:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020843.tA28hFOA041746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 08:43:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290264 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 08:43:16 -0000 Author: ngie Date: Mon Nov 2 08:43:15 2015 New Revision: 290264 URL: https://svnweb.freebsd.org/changeset/base/290264 Log: Limit isoLevel to 1 and 2 to avoid segfaulting when isoLevel is set to 3 by dereferencing a NULL function pointer Add some asserts to ensure that isolevel is always either 1 or 2. PR: 203645 Reported by: Thomas Schmitt MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/cd9660.c Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Mon Nov 2 07:59:17 2015 (r290263) +++ head/usr.sbin/makefs/cd9660.c Mon Nov 2 08:43:15 2015 (r290264) @@ -296,8 +296,8 @@ cd9660_parse_opts(const char *option, fs int rv; /* Set up allowed options - integer options ONLY */ option_t cd9660_options[] = { - { "l", &diskStructure.isoLevel, 1, 3, "ISO Level" }, - { "isolevel", &diskStructure.isoLevel, 1, 3, "ISO Level" }, + { "l", &diskStructure.isoLevel, 1, 2, "ISO Level" }, + { "isolevel", &diskStructure.isoLevel, 1, 2, "ISO Level" }, { "verbose", &diskStructure.verbose_level, 0, 2, "Turns on verbose output" }, { "v", &diskStructure.verbose_level, 0 , 2, @@ -1055,6 +1055,7 @@ cd9660_rename_filename(cd9660node *iter, if (diskStructure.verbose_level > 0) printf("Rename_filename called\n"); + assert(1 <= diskStructure.isoLevel && diskStructure.isoLevel <= 2); /* TODO : A LOT of chanes regarding 8.3 filenames */ if (diskStructure.isoLevel == 1) maxlength = 8; @@ -1730,6 +1731,7 @@ cd9660_joliet_convert_filename(const cha static int cd9660_convert_filename(const char *oldname, char *newname, int is_file) { + assert(1 <= diskStructure.isoLevel && diskStructure.isoLevel <= 2); /* NEW */ cd9660_filename_conversion_functor conversion_function = 0; if (diskStructure.isoLevel == 1) From owner-svn-src-head@freebsd.org Mon Nov 2 09:16:52 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB9DDA2465F; Mon, 2 Nov 2015 09:16:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D2FF1EB2; Mon, 2 Nov 2015 09:16:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA29GpU3050703; Mon, 2 Nov 2015 09:16:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA29Gppj050702; Mon, 2 Nov 2015 09:16:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020916.tA29Gppj050702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 09:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290265 - head/usr.sbin/makefs/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 09:16:53 -0000 Author: ngie Date: Mon Nov 2 09:16:51 2015 New Revision: 290265 URL: https://svnweb.freebsd.org/changeset/base/290265 Log: Add testcases for -t cd9660 -o isolevel=[1-3] -- -o isolevel=1 currently fails because of path comparison issues, so mark it as an expected failure. -- -o isolevel=3 is not implemented, so expect it to fail as an out of bounds value [*]. PR: 203645 MFC after: 1 week X-MFC with: r290264 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Mon Nov 2 08:43:15 2015 (r290264) +++ head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Mon Nov 2 09:16:51 2015 (r290265) @@ -208,6 +208,61 @@ o_flag_allow_max_name_cleanup() common_cleanup } +atf_test_case o_flag_isolevel_1 cleanup +o_flag_isolevel_1_body() +{ + atf_expect_fail "this testcase needs work; the filenames generated seem incorrect/corrupt" + + create_test_inputs + + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS -o isolevel=1 $TEST_IMAGE $TEST_INPUTS_DIR + + mount_image + check_base_iso9660_image_contents +} +o_flag_isolevel_1_cleanup() +{ + common_cleanup +} + +atf_test_case o_flag_isolevel_2 cleanup +o_flag_isolevel_2_body() +{ + create_test_inputs + + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS -o isolevel=2 $TEST_IMAGE $TEST_INPUTS_DIR + + mount_image + check_base_iso9660_image_contents +} +o_flag_isolevel_2_cleanup() +{ + common_cleanup +} + +atf_test_case o_flag_isolevel_3 cleanup +o_flag_isolevel_3_body() +{ + create_test_inputs + + # XXX: isolevel=3 isn't implemented yet. See FreeBSD bug # 203645 + if true; then + atf_check -e match:'makefs: ISO Level 3 is greater than 2\.' -o empty -s not-exit:0 \ + $MAKEFS -o isolevel=3 $TEST_IMAGE $TEST_INPUTS_DIR + else + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS -o isolevel=3 $TEST_IMAGE $TEST_INPUTS_DIR + mount_image + check_base_iso9660_image_contents + fi +} +o_flag_isolevel_3_cleanup() +{ + common_cleanup +} + atf_test_case o_flag_preparer o_flag_preparer_body() { @@ -308,6 +363,9 @@ atf_init_test_cases() atf_add_test_case o_flag_allow_deep_trees atf_add_test_case o_flag_allow_max_name + atf_add_test_case o_flag_isolevel_1 + atf_add_test_case o_flag_isolevel_2 + atf_add_test_case o_flag_isolevel_3 atf_add_test_case o_flag_preparer atf_add_test_case o_flag_publisher atf_add_test_case o_flag_rockridge From owner-svn-src-head@freebsd.org Mon Nov 2 09:36:46 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A96ECA24E35; Mon, 2 Nov 2015 09:36:46 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 7776B1E00; Mon, 2 Nov 2015 09:36:46 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from bender.Home (bcdc67a8.skybroadband.com [188.220.103.168]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 55F05D78E6; Mon, 2 Nov 2015 09:36:14 +0000 (UTC) Date: Mon, 2 Nov 2015 09:36:03 +0000 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: r290245 - in head/sys/contrib/vchiq/interface: vchi vchiq_arm Message-ID: <20151102093603.0aebe7a8@bender.Home> In-Reply-To: <201511012217.tA1MHdMJ047219@repo.freebsd.org> References: <201511012217.tA1MHdMJ047219@repo.freebsd.org> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; amd64-portbld-freebsd10.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 09:36:46 -0000 On Sun, 1 Nov 2015 22:17:39 +0000 (UTC) Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Sun Nov 1 22:17:39 2015 > New Revision: 290245 > URL: https://svnweb.freebsd.org/changeset/base/290245 > > Log: > Synchronize with latest upstream VCHI code: > > - Add LIB_VERSION ioctl > - Add CLOSE_DELIVERED ioctl > - Bump code version > > Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5 Was there a reason we don't use the vendor-sys area for vchiq? Andrew From owner-svn-src-head@freebsd.org Mon Nov 2 10:07:22 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B58F1A236D1; Mon, 2 Nov 2015 10:07:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81598179B; Mon, 2 Nov 2015 10:07:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2A7L1a065534; Mon, 2 Nov 2015 10:07:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2A7L6p065533; Mon, 2 Nov 2015 10:07:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201511021007.tA2A7L6p065533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 2 Nov 2015 10:07:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290266 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 10:07:22 -0000 Author: avg Date: Mon Nov 2 10:07:21 2015 New Revision: 290266 URL: https://svnweb.freebsd.org/changeset/base/290266 Log: zfs: allow the lookup of extended attributes of an unlinked file That's required for extattr_get_fd(2) and the like to work properly. PR: 203201 MFC after: 17 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Mon Nov 2 09:16:51 2015 (r290265) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Mon Nov 2 10:07:21 2015 (r290266) @@ -222,7 +222,7 @@ zfs_dirent_lock(zfs_dirlock_t **dlpp, zn mutex_enter(&dzp->z_lock); for (;;) { - if (dzp->z_unlinked) { + if (dzp->z_unlinked && !(flag & ZXATTR)) { mutex_exit(&dzp->z_lock); if (!(flag & ZHAVELOCK)) rw_exit(&dzp->z_name_lock); From owner-svn-src-head@freebsd.org Mon Nov 2 10:08:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04C74A2376D; Mon, 2 Nov 2015 10:08:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA4E719E2; Mon, 2 Nov 2015 10:08:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2A80Ni065616; Mon, 2 Nov 2015 10:08:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2A80Ng065613; Mon, 2 Nov 2015 10:08:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511021008.tA2A80Ng065613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 10:08:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290267 - head/usr.sbin/makefs/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 10:08:02 -0000 Author: ngie Date: Mon Nov 2 10:08:00 2015 New Revision: 290267 URL: https://svnweb.freebsd.org/changeset/base/290267 Log: Clean up mtree keyword support a slight bit and add a few more default keywords - Parameterize the mtree keywords as $DEFAULT_MTREE_KEYWORDS - Test with the extra mtree keywords, `mode,gid,uid`. - Add a note about mtrees with time support not working with makefs right now MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh head/usr.sbin/makefs/tests/makefs_ffs_tests.sh head/usr.sbin/makefs/tests/makefs_tests_common.sh Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Mon Nov 2 10:07:21 2015 (r290266) +++ head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Mon Nov 2 10:08:00 2015 (r290267) @@ -113,7 +113,7 @@ from_mtree_spec_file_body() create_test_inputs atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -c -k type,link,size -p $TEST_INPUTS_DIR + mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR atf_check -e empty -o empty -s exit:0 \ $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE Modified: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Mon Nov 2 10:07:21 2015 (r290266) +++ head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Mon Nov 2 10:08:00 2015 (r290267) @@ -105,7 +105,7 @@ from_mtree_spec_file_body() create_test_inputs atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -c -k type,link,size -p $TEST_INPUTS_DIR + mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR atf_check -e empty -o not-empty -s exit:0 \ Modified: head/usr.sbin/makefs/tests/makefs_tests_common.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_tests_common.sh Mon Nov 2 10:07:21 2015 (r290266) +++ head/usr.sbin/makefs/tests/makefs_tests_common.sh Mon Nov 2 10:08:00 2015 (r290267) @@ -29,6 +29,13 @@ KB=1024 : ${TMPDIR=/tmp} +# TODO: add mtree `time` support; get a lot of errors like this right now when +# passing generating disk images with keyword mtree support, like: +# +# `[...]/mtree.spec:8: error: time: invalid value '1446458503'` +# +#DEFAULT_MTREE_KEYWORDS="type,mode,gid,uid,size,link,time" +DEFAULT_MTREE_KEYWORDS="type,mode,gid,uid,size,link" TEST_IMAGE="$TMPDIR/test.img" TEST_INPUTS_DIR="$TMPDIR/inputs" TEST_MD_DEVICE_FILE="$TMPDIR/md.output" @@ -39,7 +46,7 @@ check_image_contents() { local directories=$TEST_INPUTS_DIR local excludes mtree_excludes_arg mtree_file - local mtree_keywords="type,link,size" + local mtree_keywords="$DEFAULT_MTREE_KEYWORDS" while getopts "d:f:m:X:" flag; do case "$flag" in From owner-svn-src-head@freebsd.org Mon Nov 2 10:09:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25B24A2381E; Mon, 2 Nov 2015 10:09:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E178C1B9F; Mon, 2 Nov 2015 10:09:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2A99nO065697; Mon, 2 Nov 2015 10:09:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2A99Ep065696; Mon, 2 Nov 2015 10:09:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511021009.tA2A99Ep065696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 10:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290268 - head/usr.sbin/makefs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 10:09:11 -0000 Author: ngie Date: Mon Nov 2 10:09:09 2015 New Revision: 290268 URL: https://svnweb.freebsd.org/changeset/base/290268 Log: Sync minor whitespace / type changes in ffs_csum_swap and ffs_sb_swap with src/sys/ufs/ffs/ffs_bswap.c@1.39 Obtained from: NetBSD MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/ffs/ffs_bswap.c Modified: head/usr.sbin/makefs/ffs/ffs_bswap.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_bswap.c Mon Nov 2 10:08:00 2015 (r290267) +++ head/usr.sbin/makefs/ffs/ffs_bswap.c Mon Nov 2 10:09:09 2015 (r290268) @@ -67,7 +67,7 @@ void ffs_csumtotal_swap(struct csum_tota void ffs_sb_swap(struct fs *o, struct fs *n) { - int i; + size_t i; u_int32_t *o32, *n32; /* @@ -97,7 +97,7 @@ ffs_sb_swap(struct fs *o, struct fs *n) n->fs_csaddr = bswap64(o->fs_csaddr); n->fs_pendingblocks = bswap64(o->fs_pendingblocks); n->fs_pendinginodes = bswap32(o->fs_pendinginodes); - + /* These fields overlap with the second half of the * historic FS_42POSTBLFMT postbl table */ @@ -171,9 +171,9 @@ ffs_dinode2_swap(struct ufs2_dinode *o, void ffs_csum_swap(struct csum *o, struct csum *n, int size) { - int i; + size_t i; u_int32_t *oint, *nint; - + oint = (u_int32_t*)o; nint = (u_int32_t*)n; From owner-svn-src-head@freebsd.org Mon Nov 2 10:38:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FAE6A244F0; Mon, 2 Nov 2015 10:38:03 +0000 (UTC) (envelope-from glebius@FreeBSD.org) 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 C2DCB17BE; Mon, 2 Nov 2015 10:38:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.15.2/8.15.2) with ESMTPS id tA2AbwcR084744 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Nov 2015 13:37:58 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id tA2AbvP7084743; Mon, 2 Nov 2015 13:37:57 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 2 Nov 2015 13:37:57 +0300 From: Gleb Smirnoff To: Alexey Dokuchaev Cc: Michal Meloun , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r290234 - head/share/misc Message-ID: <20151102103757.GE78469@FreeBSD.org> References: <201511011654.tA1GstJP054578@repo.freebsd.org> <20151102071346.GA12970@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151102071346.GA12970@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 10:38:03 -0000 On Mon, Nov 02, 2015 at 07:13:46AM +0000, Alexey Dokuchaev wrote: A> On Sun, Nov 01, 2015 at 04:54:55PM +0000, Michal Meloun wrote: A> > New Revision: 290234 A> > URL: https://svnweb.freebsd.org/changeset/base/290234 A> > A> > Log: A> > Install myself as src committer. A> > A> > Approved by: kib (mentor) A> > > Description of fields to fill in above: 76 columns --| A> > [ garbage omitteed ] A> A> Here is a small advice: do not rely on "svn ci" calling your $EDITOR for A> you, compose the message yourself first and then do "svn ci -F $logfile". A> For one-liners, "svn ci -m message" works even better. Alternatively: rely on $EDITOR, but don't trust the line: --This line, and those below, will be ignored-- Finalize your message manually. P.S. Not that there is bugs in the svn, but you can have touched the line. -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Mon Nov 2 11:06:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1577EA24A6D; Mon, 2 Nov 2015 11:06:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B865013D6; Mon, 2 Nov 2015 11:06:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2B6pvN083125; Mon, 2 Nov 2015 11:06:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2B6pmr083124; Mon, 2 Nov 2015 11:06:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511021106.tA2B6pmr083124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 11:06:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290270 - head/usr.sbin/makefs/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 11:06:53 -0000 Author: ngie Date: Mon Nov 2 11:06:51 2015 New Revision: 290270 URL: https://svnweb.freebsd.org/changeset/base/290270 Log: Add testcases for -t ffs -o version=[12] Verify the filesystem type using dumpfs. Add preliminary support for NetBSD (needs to be validated) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Modified: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Mon Nov 2 10:39:26 2015 (r290269) +++ head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Mon Nov 2 11:06:51 2015 (r290270) @@ -158,6 +158,70 @@ from_single_dir_cleanup() common_cleanup } +atf_test_case o_flag_version_1 cleanup +o_flag_version_1_body() +{ + ffs_version=1 + + platform=$(uname) + case "$platform" in + FreeBSD) + ffs_label=UFS${ffs_version} + ;; + NetBSD) + ffs_label=FFSv${ffs_version} + ;; + *) + atf_skip "Unsupported platform" + ;; + esac + + create_test_inputs + + atf_check -e empty -o not-empty -s exit:0 \ + $MAKEFS -M 1m -o version=$ffs_version $TEST_IMAGE $TEST_INPUTS_DIR + + mount_image + atf_check -e empty -o match:"$ffs_label" dumpfs $TEST_MOUNT_DIR + check_ffs_image_contents +} +o_flag_version_1_cleanup() +{ + common_cleanup +} + +atf_test_case o_flag_version_2 cleanup +o_flag_version_2_body() +{ + ffs_version=2 + + platform=$(uname) + case "$platform" in + FreeBSD) + ffs_label=UFS${ffs_version} + ;; + NetBSD) + ffs_label=FFSv${ffs_version} + ;; + *) + atf_skip "Unsupported platform" + ;; + esac + + create_test_inputs + + atf_check -e empty -o not-empty -s exit:0 \ + $MAKEFS -M 1m -o version=$ffs_version $TEST_IMAGE $TEST_INPUTS_DIR + + mount_image + atf_check -e empty -o match:"$ffs_label" dumpfs $TEST_MOUNT_DIR + check_ffs_image_contents +} +o_flag_version_2_cleanup() +{ + common_cleanup +} + atf_init_test_cases() { @@ -168,5 +232,6 @@ atf_init_test_cases() atf_add_test_case from_multiple_dirs atf_add_test_case from_single_dir - + atf_add_test_case o_flag_version_1 + atf_add_test_case o_flag_version_2 } From owner-svn-src-head@freebsd.org Mon Nov 2 11:47:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE67AA234BA; Mon, 2 Nov 2015 11:47:25 +0000 (UTC) (envelope-from mmel@freebsd.org) Received: from mail.miracle.cz (mail.miracle.cz [193.84.128.19]) by mx1.freebsd.org (Postfix) with ESMTP id 9ECC11808; Mon, 2 Nov 2015 11:47:25 +0000 (UTC) (envelope-from mmel@freebsd.org) Received: from [193.84.128.50] (meloun.ad.miracle.cz [193.84.128.50]) by mail.miracle.cz (Postfix) with ESMTPSA id 5E510ACAD34; Mon, 2 Nov 2015 12:47:18 +0100 (CET) Subject: Re: svn commit: r290234 - head/share/misc To: Gleb Smirnoff , Alexey Dokuchaev References: <201511011654.tA1GstJP054578@repo.freebsd.org> <20151102071346.GA12970@FreeBSD.org> <20151102103757.GE78469@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: Michal Meloun X-Enigmail-Draft-Status: N1110 Organization: freebsd.org Message-ID: <56374D46.9040506@freebsd.org> Date: Mon, 2 Nov 2015 12:47:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151102103757.GE78469@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.miracle.cz); Mon, 02 Nov 2015 12:47:18 +0100 (CET) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 11:47:26 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Dne 02.11.2015 v 11:37 Gleb Smirnoff napsal(a): > On Mon, Nov 02, 2015 at 07:13:46AM +0000, Alexey Dokuchaev wrote: > A> On Sun, Nov 01, 2015 at 04:54:55PM +0000, Michal Meloun wrote: > A> > New Revision: 290234 A> > URL: > https://svnweb.freebsd.org/changeset/base/290234 A> > A> > Log: A> > > Install myself as src committer. A> > A> > Approved by: kib > (mentor) A> > > Description of fields to fill in above: > 76 columns --| A> > [ garbage omitteed ] A> A> Here is a small > advice: do not rely on "svn ci" calling your $EDITOR for A> you, > compose the message yourself first and then do "svn ci -F > $logfile". A> For one-liners, "svn ci -m message" works even > better. > > Alternatively: rely on $EDITOR, but don't trust the line: > > --This line, and those below, will be ignored-- > > Finalize your message manually. > > P.S. Not that there is bugs in the svn, but you can have touched > the line. > I'm sorry to all, it痴 my bug. Commit using editor (but using git) is standard practice here @work. So I automatically select same workflow for FreeBSD. Anyway, I already got hit from kib@, so I'll use a file for commit log next time. But i'm pretty sure that i have not touched template. I only deleted all prepared unfilled lines (for PR:, MFC: ...) and then i paste commit message. And, ironically, only - --This line, and those below, will be ignored-- line has been omitted from real commit log. Michal -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWN01GAAoJEGkesmtexaqqGvEIAICYBFTeblZZ+C3Y82JqN97h fnFHNG0wyJEhj9a4jDBWyAJldU4kesa2XHw2I8dGIUB9Iz+Vp0nnib5WIvhWPL7S t1NdQDyy9MELAXx0v4wNnyDexl+YYM9nEGvQokesFV/V0vI+6WctjMM8S8tnRs1e hVu80ZgbvJOTTV6OuNl9/Cjo4oPeh3IWZMlLuYP95pV4vzlgoF6CPimrdki8gVMX dW/9DUIJd1bX73LYoCtwfM0WZEFFbbgrpBO8DJbSWEmx1hJUQmk5mYE8jUYDk9Ot 8wxE+3n1g5ovZUQGREiR5s+3xu7MJ8PSroLIM69kJUvER0pAedXkDphYm/l8v8g= =s8VI -----END PGP SIGNATURE----- From owner-svn-src-head@freebsd.org Mon Nov 2 12:49:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F3B8A24D69; Mon, 2 Nov 2015 12:49:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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 1A17B1C9B; Mon, 2 Nov 2015 12:49:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tA2Cn9ld092772 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 2 Nov 2015 14:49:09 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tA2Cn9ld092772 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tA2Cn8bl092771; Mon, 2 Nov 2015 14:49:08 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 2 Nov 2015 14:49:08 +0200 From: Konstantin Belousov To: Michal Meloun Cc: Gleb Smirnoff , Alexey Dokuchaev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r290234 - head/share/misc Message-ID: <20151102124908.GY2257@kib.kiev.ua> References: <201511011654.tA1GstJP054578@repo.freebsd.org> <20151102071346.GA12970@FreeBSD.org> <20151102103757.GE78469@FreeBSD.org> <56374D46.9040506@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56374D46.9040506@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 12:49:15 -0000 On Mon, Nov 02, 2015 at 12:47:18PM +0100, Michal Meloun wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Dne 02.11.2015 v 11:37 Gleb Smirnoff napsal(a): > > On Mon, Nov 02, 2015 at 07:13:46AM +0000, Alexey Dokuchaev wrote: > > A> On Sun, Nov 01, 2015 at 04:54:55PM +0000, Michal Meloun wrote: > > A> > New Revision: 290234 A> > URL: > > https://svnweb.freebsd.org/changeset/base/290234 A> > A> > Log: A> > > > Install myself as src committer. A> > A> > Approved by: kib > > (mentor) A> > > Description of fields to fill in above: > > 76 columns --| A> > [ garbage omitteed ] A> A> Here is a small > > advice: do not rely on "svn ci" calling your $EDITOR for A> you, > > compose the message yourself first and then do "svn ci -F > > $logfile". A> For one-liners, "svn ci -m message" works even > > better. > > > > Alternatively: rely on $EDITOR, but don't trust the line: > > > > --This line, and those below, will be ignored-- > > > > Finalize your message manually. > > > > P.S. Not that there is bugs in the svn, but you can have touched > > the line. > > > > I'm sorry to all, it?s my bug. > Commit using editor (but using git) is standard practice here @work. > So I automatically select same workflow for FreeBSD. > Anyway, I already got hit from kib@, so I'll use a file for commit log I hope you mean 'hint'. > next time. > > But i'm pretty sure that i have not touched template. > I only deleted all prepared unfilled lines (for PR:, MFC: ...) > and then i paste commit message. > And, ironically, only > > - --This line, and those below, will be ignored-- > > line has been omitted from real commit log. > > Michal > > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQEcBAEBCAAGBQJWN01GAAoJEGkesmtexaqqGvEIAICYBFTeblZZ+C3Y82JqN97h > fnFHNG0wyJEhj9a4jDBWyAJldU4kesa2XHw2I8dGIUB9Iz+Vp0nnib5WIvhWPL7S > t1NdQDyy9MELAXx0v4wNnyDexl+YYM9nEGvQokesFV/V0vI+6WctjMM8S8tnRs1e > hVu80ZgbvJOTTV6OuNl9/Cjo4oPeh3IWZMlLuYP95pV4vzlgoF6CPimrdki8gVMX > dW/9DUIJd1bX73LYoCtwfM0WZEFFbbgrpBO8DJbSWEmx1hJUQmk5mYE8jUYDk9Ot > 8wxE+3n1g5ovZUQGREiR5s+3xu7MJ8PSroLIM69kJUvER0pAedXkDphYm/l8v8g= > =s8VI > -----END PGP SIGNATURE----- From owner-svn-src-head@freebsd.org Mon Nov 2 13:30:24 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5D7AA22521; Mon, 2 Nov 2015 13:30:24 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::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 3915F1EDF; Mon, 2 Nov 2015 13:30:24 +0000 (UTC) (envelope-from royger@gmail.com) Received: by wmeg8 with SMTP id g8so60673511wme.1; Mon, 02 Nov 2015 05:30:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=oObvyYhOyWhJwhFN9HEZuOsQvSMpgfXXGi3gRs2pn64=; b=FvWhmI34XFtpvha8fabFux7FpxpD1zGLw++MHP+5OXYADayn/ujL6LBq5szPtVVqGO 5zmRlsu5FqP6Jkv9vxuiz1iawS1ugfGzewkwkMTMMnhq5RQ3U3+6R79mr+ESwYw4UMGV ExI1cp82TzC43V2hloFx9TfeXgRo/gEJjGCY/m2ysZ8UKjFpcNyI7sCWezT5fyggFycc Qr6G7IPKnZIL2qfmI7sXPf0fGrlCR6d1wzq6804Ex9OwOUcDTZviIiLkZ++w5beXVODT gT/grqJySO3sAYh8lk3ByM2d60SRTesuUJZD6yOJy9HazVKHH1k3omCZkAFapVK9wytb aRgw== X-Received: by 10.28.214.146 with SMTP id n140mr12946776wmg.47.1446471022373; Mon, 02 Nov 2015 05:30:22 -0800 (PST) Received: from MacBook-Air-de-Roger.local (235.Red-79-152-22.dynamicIP.rima-tde.net. [79.152.22.235]) by smtp.gmail.com with ESMTPSA id ki7sm22379738wjc.28.2015.11.02.05.30.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Nov 2015 05:30:21 -0800 (PST) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Subject: Re: svn commit: r289834 - head/sys/x86/x86 To: Oliver Pinter References: <201510231539.t9NFdxPe018130@repo.freebsd.org> <562A564D.9080703@citrix.com> <562E1F8F.3010304@FreeBSD.org> <5632447B.1020402@FreeBSD.org> Cc: Adrian Chadd , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Message-ID: <56376567.9090100@FreeBSD.org> Date: Mon, 2 Nov 2015 14:30:15 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 13:30:24 -0000 El 29/10/15 a les 22.48, Oliver Pinter ha escrit: > Yes, at next week I have time for the test. Please ping me again at > Monday. Ping :). From owner-svn-src-head@freebsd.org Mon Nov 2 13:44:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 802D5A229F9 for ; Mon, 2 Nov 2015 13:44:20 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::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 0C71E1960 for ; Mon, 2 Nov 2015 13:44:20 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by wmec75 with SMTP id c75so60804407wme.1 for ; Mon, 02 Nov 2015 05:44:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd_org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=tB15OXWBZKX9xGiv+z30feT1phLycCF94KWENk2M6Yo=; b=BO6+DkYONbuvabb4NqXAexGjP0+TlSFvLJEr0xXEDr+pNyQIRBeqHVDN10E1PaV5Ju TXgqHms/nmpdgxq+pjEU4xSIrRn/BuV+QTzWM+cwv4tpe6Wb4YoF1zRAEME9B7BZMgiY ZrJRc59Ul6PCMiiemNP6CRKSMWTWOGAKWDChOPrV/8wdGDrouPVr3eQbJlP03QEcxGEw Y4x2bqBreaMMCUupWfaeOJuDndI1iXevC+FWN6AFHDRTGzjIFnzR3ka2TrjE8RleNO6b 1Mp1Aik1rSiAN+QM3TH2zIqAw8/y0BpSgH5otXfuIvxAHLKssqbanKcMj/ZPlbFmPn6g UxZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=tB15OXWBZKX9xGiv+z30feT1phLycCF94KWENk2M6Yo=; b=LJ7AKrYaVdZ1mBwqpHYiZeCpFjE4C07nUTwU30y5RDvbbmXlVmYKIgg+5j5J0IUuZu 29hqzm6ZHJolof9oU1UuhXhRckBuTC0sby+gGiHJls6ypWFTWyJQU7WhYIqTZiPsfMdD ejmx3PCrv2Dv3Zn+6H2zhZZEvYsgb5jewUhUFgsaHu0W9H9OwKVl6a5ilXgT5iOIFdgF cSjotqLSgplckEfJIITe0Lp3kbzUVKVcWDfGKfLoWNu5sQKoQQlsDRctoIAXE0IQy+Pt uD/7ihyV7+5EV+eiVwmQaC34i4XFMJj3v/9Rim1VZdGmvTERV+TwHlGs93JrsbHj4UIh jzwg== X-Gm-Message-State: ALoCoQm92xgA/rEhiDF2E81urOXd2hlMy4rGoYGy1T7eV5ml7LOhMpzTlFBq8i7AQNidgeNLP9QZ MIME-Version: 1.0 X-Received: by 10.28.13.75 with SMTP id 72mr12980159wmn.20.1446471857716; Mon, 02 Nov 2015 05:44:17 -0800 (PST) Received: by 10.194.240.226 with HTTP; Mon, 2 Nov 2015 05:44:17 -0800 (PST) In-Reply-To: <56376567.9090100@FreeBSD.org> References: <201510231539.t9NFdxPe018130@repo.freebsd.org> <562A564D.9080703@citrix.com> <562E1F8F.3010304@FreeBSD.org> <5632447B.1020402@FreeBSD.org> <56376567.9090100@FreeBSD.org> Date: Mon, 2 Nov 2015 14:44:17 +0100 Message-ID: Subject: Re: svn commit: r289834 - head/sys/x86/x86 From: Oliver Pinter To: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Cc: Adrian Chadd , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 13:44:20 -0000 On 11/2/15, Roger Pau Monn=C3=A9 wrote: > El 29/10/15 a les 22.48, Oliver Pinter ha escrit: >> Yes, at next week I have time for the test. Please ping me again at >> Monday. > > Ping :). Pong. :) I now stared a new build with the patch, so I will report back 1-2 hours from now. > > From owner-svn-src-head@freebsd.org Mon Nov 2 15:06:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BADD8A02E94 for ; Mon, 2 Nov 2015 15:06:48 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::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 46AA51C46 for ; Mon, 2 Nov 2015 15:06:48 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by wmff134 with SMTP id f134so61467332wmf.1 for ; Mon, 02 Nov 2015 07:06:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd_org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ZzJN/L1GPVBPfJb/8rtwH5Lm9eXpONO5JVzcfRBg68Q=; b=Gck7XKNyiLRyXxm2S++Gdl+GjxEWlBbMYWtJWkS/38y7LzByfhfDR+Gs8AbfjKKBpa ulpE+IcXK8MSytNMtFG6e5ijND6ITf/RqKcDqL+G6SOauK0J5nM5PDmIQw1Z8r6ol0Te wEJla2JTKE4Xq66I5A/2RNk6IMPEEzjN3d7BxX7B1IJyz/x7jAF8kKupAkMua87tMAws mFhzoDXy7xwR992cMgUTYrFguvCRPEgWgBnduYsdquI/DWFdESkk5vskCFJuGzxscv9i qiXfeHN6mAlWoSpARtk2w+5fiMLbOm5wLrMgaHNhqKh2YX70bJqff8eK2ApLWh9rW4nQ 5kwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ZzJN/L1GPVBPfJb/8rtwH5Lm9eXpONO5JVzcfRBg68Q=; b=VxK4CQ7OkbMnYTsDNr6SpgSo0VRvDz6LOVdwOcOj1Q8pFIt92UjIijiQbTQwJOWNNt d/WMd7K/bu9o+EUHBOZKEoeluj9bLziZ7M4Gy0Lq6AS37jtXzu8WWZcM8Sa/1OkzSW3q 2pRisGSzaog1Xaa869m1xIaqzhfM2PoDWmEaJg+v6qIESfCXReCcCP1DxzZDR7+MilOK Cywr6xim2gHpPVdQA2n9Y3ylg6n+DN0HaGPMEApqpKtcaU0qOH6nmyBzQeSBnDe8cn09 dp5tTtmKVu8leLaCbaRQT9uK+RoRSu/2uNGxcQ/nrG60jDDEPzP1UKfRoym85navhrXm wp7w== X-Gm-Message-State: ALoCoQlzVgsKN66ZIY4iQQDwJENgmwiXiaRiTbVQMQszQ1KNOkm7B8L21BMgbw1qYLgyVkmXPYj4 MIME-Version: 1.0 X-Received: by 10.28.13.75 with SMTP id 72mr13407657wmn.20.1446476806799; Mon, 02 Nov 2015 07:06:46 -0800 (PST) Received: by 10.194.240.226 with HTTP; Mon, 2 Nov 2015 07:06:46 -0800 (PST) In-Reply-To: References: <201510231539.t9NFdxPe018130@repo.freebsd.org> <562A564D.9080703@citrix.com> <562E1F8F.3010304@FreeBSD.org> <5632447B.1020402@FreeBSD.org> <56376567.9090100@FreeBSD.org> Date: Mon, 2 Nov 2015 16:06:46 +0100 Message-ID: Subject: Re: svn commit: r289834 - head/sys/x86/x86 From: Oliver Pinter To: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Cc: Adrian Chadd , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 15:06:48 -0000 On Mon, Nov 2, 2015 at 2:44 PM, Oliver Pinter wrote: > On 11/2/15, Roger Pau Monn=C3=A9 wrote: >> El 29/10/15 a les 22.48, Oliver Pinter ha escrit: >>> Yes, at next week I have time for the test. Please ping me again at >>> Monday. >> >> Ping :). > > Pong. :) I now stared a new build with the patch, so I will report > back 1-2 hours from now. It's better. :) root@nyi-01 src# git show | head -30 commit 8f6110bd2e258b3f4224eb580e99fa142bebc727 Author: Roger Pau Monne Date: Thu Oct 29 12:58:23 2015 +0100 x86/dma_bounce: rework _bus_dmamap_load_ma implementation The implementation of bus_dmamap_load_ma_triv currently calls _bus_dmamap_load_phys on each page that is part of the passed in buffer= . Since each page is treated as an individual buffer, the resulting behav= iour is different from the behaviour of _bus_dmamap_load_buffer. This breaks certain drivers, like Xen blkfront. If an unmapped buffer of size 4096 that starts at offset 13 into the fi= rst page is passed to the current _bus_dmamap_load_ma implementation (so th= e ma array contains two pages), the result is that two segments are created,= one with a size of 4083 and the other with size 13 (because two independant calls to _bus_dmamap_load_phys are performed, one for each physical pag= e). If the same is done with a mapped buffer and calling _bus_dmamap_load_b= uffer the result is that only one segment is created, with a size of 4096. This patch relegates the usage of bus_dmamap_load_ma_triv in x86 bounce buffer code to drivers requesting BUS_DMA_KEEP_PG_OFFSET and implements _bus_dmamap_load_ma so that it's behaviour is the same as the mapped ve= rsion (_bus_dmamap_load_buffer). This patch only modifies the x86 bounce buff= er code, other arches are left untouched. Reviewed by: kib, jah Differential Revision: https://reviews.freebsd.org/D888 Sponsored by: Citrix Systems R&D root@nyi-01 src# uname -a FreeBSD nyi-01.build.hardenedbsd.org 11.0-CURRENT-HBSD FreeBSD 11.0-CURRENT-HBSD #14 8f6110b(jenkins-world-kernel-20151102): Mon Nov 2 09:42:26 EST 2015 root@nyi-01.build.hardenedbsd.org:/usr/obj/usr/src/sys/JENKINS amd64 root@nyi-01 src# uptime 10:05AM up 3 mins, 2 users, load averages: 0.46, 1.09, 0.57 root@nyi-01 src# Now I started a new jenkins build to see the patch under stress. >> >> From owner-svn-src-head@freebsd.org Mon Nov 2 16:13:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84581A03DE7; Mon, 2 Nov 2015 16:13:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001: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 4B7A211C5; Mon, 2 Nov 2015 16:13:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbhv6 with SMTP id hv6so57298391igb.0; Mon, 02 Nov 2015 08:13:27 -0800 (PST) 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=tFEAV7Xq7xdlAX4E/TKbH7VDpgnGyj4bIeuewKOJBlg=; b=rdRdMwnpzmHRMmMKuM2jiRXoJyL54iMjzxfGSaBtpVMcR9iWt/jRJzziEAZQDQmBri 6QWsIPV2ijEljdAR1GoCXA0IYPXzPzkPt5DrcFMbElcG8pc56DqxrktJgS7iA+5FbtSr hYVAIHPkVVsT9vd/clSTbA3jYRfyE7G1N+S0na4vhyvsg6Czt4PRgsWNy1IWsOK7OJNB 11bWaxiYBgQhBXQhqHe6j5avNjDuP3Z1Wgj71OTvQZ677eO4KlG1ow/Iw35P5NOKn5k8 SOoEw7RaLrH3r5IP1j1ne5Cpza7Av5sMW7RIgLetTfYHrMEerERugaVc32JjdU52RbeM UOOg== MIME-Version: 1.0 X-Received: by 10.50.164.196 with SMTP id ys4mr12399630igb.37.1446480807789; Mon, 02 Nov 2015 08:13:27 -0800 (PST) Received: by 10.36.46.66 with HTTP; Mon, 2 Nov 2015 08:13:27 -0800 (PST) In-Reply-To: <20151102093603.0aebe7a8@bender.Home> References: <201511012217.tA1MHdMJ047219@repo.freebsd.org> <20151102093603.0aebe7a8@bender.Home> Date: Mon, 2 Nov 2015 11:13:27 -0500 Message-ID: Subject: Re: svn commit: r290245 - in head/sys/contrib/vchiq/interface: vchi vchiq_arm From: Adrian Chadd To: Andrew Turner Cc: Oleksandr Tymoshenko , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 16:13:28 -0000 The same reason we don't use it for dri, etc. The vendor driver isn't portable by any stretch. We could put it there, but then we'd have to maintain the vendor changes on top of it in subversion and I kinda dont want to think about how that'll work out.. :) -adrian From owner-svn-src-head@freebsd.org Mon Nov 2 16:41:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12CEBA2445B for ; Mon, 2 Nov 2015 16:41:04 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::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 906F51244 for ; Mon, 2 Nov 2015 16:41:03 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by wmeg8 with SMTP id g8so65641370wme.1 for ; Mon, 02 Nov 2015 08:41:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd_org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=3AkJK1BPaR0+RpG4zpwoR3GVJFzVwX6r8pcMwlRZJB8=; b=Vp2urvaoX4i9u0j29ss0X7rv8X3AebJ9l0wNm8QeEOBZ4QUc1QMkkes3xaZw1IIPjY gyAXpU+CaU89Qkll36xODaSTPfz0R86k5fS6w7s4HkV7T+h8PFBJZnzf6Z5zkAH7vzrJ AWPju4E2yxVr5HY7pNwiIFlmqtPn45Rc1iiquzUMjZ9tys35voqTVrskw9NZHG5WWas3 Iyic9oAwk6DwU0n2vpLOTacjU7cCgDfK2spxUM1Y+PsRnQsnTqPd3HZfDzg7/ThHRi+J 6LVL6mQl2hJaLvhm+1almZvBzFDetNJsW+TgdtsgGi00wTc6UspPrGTcK6YBioOpNdtv eXtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=3AkJK1BPaR0+RpG4zpwoR3GVJFzVwX6r8pcMwlRZJB8=; b=RnfP8I2p6KoZRC6vCjSYyYkD19iPex1Fc5kZ38BaIZyh2c70sS6KulUbuL6NcnOous ZZ8IY7gRk3sRM1NoZy9Yz9bJvpXmWUKve4oqfcpooL60x+V/xVBhJZZlqxr0QP8Aj5aT dpjZU7tX7sg/bZkAFMcKz4Ct4hXXWQSfXpOdIqFVZS3wEVGdoJcK/HlqNFIuaLGwMFrm 8k65CUvOHd50XH0jBUxee119l2mJkiWNsCVJzCHn82LOd9eHba0PPiIAHvqhikWfMANK XZFFIXH6q+QtnN/ncLBEdmn0Z8RYqNSM/Y5J7uSAOflnfb5EHX7ipPZwkcC88Ua+zLJe CXtg== X-Gm-Message-State: ALoCoQnxgrOZL1X+lY47KtEbS5Jzgw49zqgS3DIdYF99iRE/TwVggzAe+/RnHZnFlwCBkreFysAX MIME-Version: 1.0 X-Received: by 10.28.93.145 with SMTP id r139mr13879689wmb.20.1446482461988; Mon, 02 Nov 2015 08:41:01 -0800 (PST) Received: by 10.194.240.226 with HTTP; Mon, 2 Nov 2015 08:41:01 -0800 (PST) In-Reply-To: References: <201510231539.t9NFdxPe018130@repo.freebsd.org> <562A564D.9080703@citrix.com> <562E1F8F.3010304@FreeBSD.org> <5632447B.1020402@FreeBSD.org> <56376567.9090100@FreeBSD.org> Date: Mon, 2 Nov 2015 17:41:01 +0100 Message-ID: Subject: Re: svn commit: r289834 - head/sys/x86/x86 From: Oliver Pinter To: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Cc: Adrian Chadd , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 16:41:04 -0000 On Mon, Nov 2, 2015 at 4:06 PM, Oliver Pinter wrote: > On Mon, Nov 2, 2015 at 2:44 PM, Oliver Pinter > wrote: >> On 11/2/15, Roger Pau Monn=C3=A9 wrote: >>> El 29/10/15 a les 22.48, Oliver Pinter ha escrit: >>>> Yes, at next week I have time for the test. Please ping me again at >>>> Monday. >>> >>> Ping :). >> >> Pong. :) I now stared a new build with the patch, so I will report >> back 1-2 hours from now. > > It's better. :) > > root@nyi-01 src# git show | head -30 > commit 8f6110bd2e258b3f4224eb580e99fa142bebc727 > Author: Roger Pau Monne > Date: Thu Oct 29 12:58:23 2015 +0100 > > x86/dma_bounce: rework _bus_dmamap_load_ma implementation > > The implementation of bus_dmamap_load_ma_triv currently calls > _bus_dmamap_load_phys on each page that is part of the passed in buff= er. > Since each page is treated as an individual buffer, the resulting beh= aviour > is different from the behaviour of _bus_dmamap_load_buffer. This brea= ks > certain drivers, like Xen blkfront. > > If an unmapped buffer of size 4096 that starts at offset 13 into the = first > page is passed to the current _bus_dmamap_load_ma implementation (so = the ma > array contains two pages), the result is that two segments are create= d, one > with a size of 4083 and the other with size 13 (because two independa= nt > calls to _bus_dmamap_load_phys are performed, one for each physical p= age). > If the same is done with a mapped buffer and calling _bus_dmamap_load= _buffer > the result is that only one segment is created, with a size of 4096. > > This patch relegates the usage of bus_dmamap_load_ma_triv in x86 boun= ce > buffer code to drivers requesting BUS_DMA_KEEP_PG_OFFSET and implemen= ts > _bus_dmamap_load_ma so that it's behaviour is the same as the mapped = version > (_bus_dmamap_load_buffer). This patch only modifies the x86 bounce bu= ffer > code, other arches are left untouched. > > Reviewed by: kib, jah > Differential Revision: https://reviews.freebsd.org/D888 > Sponsored by: Citrix Systems R&D > > root@nyi-01 src# uname -a > FreeBSD nyi-01.build.hardenedbsd.org 11.0-CURRENT-HBSD FreeBSD > 11.0-CURRENT-HBSD #14 8f6110b(jenkins-world-kernel-20151102): Mon Nov > 2 09:42:26 EST 2015 > root@nyi-01.build.hardenedbsd.org:/usr/obj/usr/src/sys/JENKINS amd64 > root@nyi-01 src# uptime > 10:05AM up 3 mins, 2 users, load averages: 0.46, 1.09, 0.57 > root@nyi-01 src# > > Now I started a new jenkins build to see the patch under stress. Okay, the server survived a full buildworld + installer generation with the new patch. > >>> >>> From owner-svn-src-head@freebsd.org Mon Nov 2 16:43:27 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67598A245A6; Mon, 2 Nov 2015 16:43:27 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C0211520; Mon, 2 Nov 2015 16:43:27 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2GhQgR081918; Mon, 2 Nov 2015 16:43:26 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2GhQHo081917; Mon, 2 Nov 2015 16:43:26 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201511021643.tA2GhQHo081917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 2 Nov 2015 16:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290272 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 16:43:27 -0000 Author: andrew Date: Mon Nov 2 16:43:26 2015 New Revision: 290272 URL: https://svnweb.freebsd.org/changeset/base/290272 Log: Make the arm64_cpu driver quiet as it adds no new information. Only report the register used to start each cpu in bootverbose. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Mon Nov 2 13:14:27 2015 (r290271) +++ head/sys/arm64/arm64/mp_machdep.c Mon Nov 2 16:43:26 2015 (r290272) @@ -137,6 +137,7 @@ arm64_cpu_probe(device_t dev) if (cpuid >= MAXCPU || cpuid > mp_maxid) return (EINVAL); + device_quiet(dev); return (0); } @@ -158,10 +159,12 @@ arm64_cpu_attach(device_t dev) if (reg == NULL) return (EINVAL); - device_printf(dev, "Found register:"); - for (i = 0; i < reg_size; i++) - printf(" %x", reg[i]); - printf("\n"); + if (bootverbose) { + device_printf(dev, "register <"); + for (i = 0; i < reg_size; i++) + printf("%s%x", (i == 0) ? "" : " ", reg[i]); + printf(">\n"); + } /* Set the device to start it later */ cpu_list[cpuid] = dev; From owner-svn-src-head@freebsd.org Mon Nov 2 16:49:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38BE6A2463E; Mon, 2 Nov 2015 16:49:10 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::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 C5A6B182E; Mon, 2 Nov 2015 16:49:09 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by wicfv8 with SMTP id fv8so54446953wic.0; Mon, 02 Nov 2015 08:49:08 -0800 (PST) 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=hBJNCxJH0BLGyAfv05RF8gqtylSwshMi6fddG7zdEXo=; b=shAQCm5WIF/ChLgks5PnHAR17uUaf1ZoINMPaAHY7tqdq6DitqVgU3YFqKolD53uIe FfEZb4nNIVFfLIZ2z5fMWR+1PDNnk4122XAmAC/49a/Nca6SFA6fqto6ljvF4Iqkg4ZM MCdPt2D5rTUhSWADzmKPX3x3ahUoEwixN0ObENsZ6/+05GpmKffRLcoczGzDbpavr0kA ekxpEGQgdAsanSAJSfsyWojHoMXx/f2gJUrCMI3TaPzyoD8FPC5BK6rZoHwRbvUoEwqC XjLxsR2geoWv14mQnDowilEphFmLg5+uJwNXDpmT2sMUv7rNd8ODwFdVR/gXAWiO0hsN 6gKw== MIME-Version: 1.0 X-Received: by 10.194.249.35 with SMTP id yr3mr28379882wjc.17.1446482948363; Mon, 02 Nov 2015 08:49:08 -0800 (PST) Received: by 10.27.10.234 with HTTP; Mon, 2 Nov 2015 08:49:08 -0800 (PST) In-Reply-To: <201511020736.tA27agJq021424@repo.freebsd.org> References: <201511020736.tA27agJq021424@repo.freebsd.org> Date: Mon, 2 Nov 2015 10:49:08 -0600 Message-ID: Subject: Re: svn commit: r290259 - head/usr.sbin/makefs From: Benjamin Kaduk To: Garrett Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 16:49:10 -0000 On Mon, Nov 2, 2015 at 1:36 AM, Garrett Cooper wrote: > Author: ngie > Date: Mon Nov 2 07:36:42 2015 > New Revision: 290259 > URL: https://svnweb.freebsd.org/changeset/base/290259 > > Log: > Sync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53 > > Sections involving unimplemented filesystems (chfs, msdosfs, udf, v7fs) > and > options have been omitted. > > MFC after: 1 week > Obtained from: NetBSD > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/usr.sbin/makefs/makefs.8 > > Modified: head/usr.sbin/makefs/makefs.8 > > ============================================================================== > --- head/usr.sbin/makefs/makefs.8 Mon Nov 2 03:36:15 2015 > (r290258) > +++ head/usr.sbin/makefs/makefs.8 Mon Nov 2 07:36:42 2015 > (r290259) > @@ -339,7 +341,7 @@ Load a generic boot image into the first > .It Sy hard-disk-boot > Boot image is a hard disk image. > .It Sy keep-bad-images > -Do not throw away images whose write was aborted due to an error. > +Don't throw away images whose write was aborted due to an error. > Documentation style is to not use contractions. (Also, "discard" might be better than "throw away", while you're on this line.) > For debugging purposes. > .It Sy label > Label name of the image. > @@ -372,11 +374,12 @@ The > utility appeared in > .Nx 1.6 . > .Sh AUTHORS > -.An Luke Mewburn Aq Mt lukem@NetBSD.org > -(original program) > -.An Daniel Watt > -.An Walter Deignan > -.An Ryan Gabrys > -.An Alan Perez-Rathke > +.An Luke Mewburn > +.Aq lukem@NetBSD.org > mdoc(7) itself lists An ... Aq ... on the same line; please do not split them like this. -Ben > +(original program), > +.An Daniel Watt , > +.An Walter Deignan , > +.An Ryan Gabrys , > +.An Alan Perez-Rathke , > .An Ram Vedam > (cd9660 support) > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Mon Nov 2 16:56:36 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 031C5A24810; Mon, 2 Nov 2015 16:56:36 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B52331C8D; Mon, 2 Nov 2015 16:56:35 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2GuY4A084954; Mon, 2 Nov 2015 16:56:34 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2GuYOB084948; Mon, 2 Nov 2015 16:56:34 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201511021656.tA2GuYOB084948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Mon, 2 Nov 2015 16:56:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290273 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 16:56:36 -0000 Author: zbb Date: Mon Nov 2 16:56:34 2015 New Revision: 290273 URL: https://svnweb.freebsd.org/changeset/base/290273 Log: Add support for branch instruction on armv7 with ptrace single step Previous code supported only "continuous" code without any kind of branch instructions. To change that, new function was implemented which parses current instruction and returns an addres where the jump might happen (alternative addr). mdthread structure was extended to support two breakpoints (one directly below current instruction and the second placed at the alternative location). One of them must trigger regardless the instruction has or has not been executed due to condition field. Upon cleanup, both software breakpoints are removed. This implementation parses only the most common instructions that are present in the code (like 99.99% of all), but there is a chance there are some left, not covered by the parsing routine. Parsing is done only for 32-bit instruction, no Thumb nor Thumb-2 support is provided. Reviewed by: kib Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4021 Modified: head/sys/arm/arm/db_interface.c head/sys/arm/arm/machdep.c head/sys/arm/include/armreg.h head/sys/arm/include/db_machdep.h head/sys/arm/include/machdep.h head/sys/arm/include/proc.h Modified: head/sys/arm/arm/db_interface.c ============================================================================== --- head/sys/arm/arm/db_interface.c Mon Nov 2 16:43:26 2015 (r290272) +++ head/sys/arm/arm/db_interface.c Mon Nov 2 16:56:34 2015 (r290273) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -291,94 +292,35 @@ db_fetch_reg(int reg) } } +static u_int +db_branch_taken_read_int(void *cookie __unused, vm_offset_t offset, u_int *val) +{ + u_int ret; + + db_read_bytes(offset, 4, (char *)&ret); + *val = ret; + + return (0); +} + +static u_int +db_branch_taken_fetch_reg(void *cookie __unused, int reg) +{ + + return (db_fetch_reg(reg)); +} + u_int branch_taken(u_int insn, db_addr_t pc) { - u_int addr, nregs, offset = 0; + register_t new_pc; + int ret; - switch ((insn >> 24) & 0xf) { - case 0x2: /* add pc, reg1, #value */ - case 0x0: /* add pc, reg1, reg2, lsl #offset */ - addr = db_fetch_reg((insn >> 16) & 0xf); - if (((insn >> 16) & 0xf) == 15) - addr += 8; - if (insn & 0x0200000) { - offset = (insn >> 7) & 0x1e; - offset = (insn & 0xff) << (32 - offset) | - (insn & 0xff) >> offset; - } else { - - offset = db_fetch_reg(insn & 0x0f); - if ((insn & 0x0000ff0) != 0x00000000) { - if (insn & 0x10) - nregs = db_fetch_reg((insn >> 8) & 0xf); - else - nregs = (insn >> 7) & 0x1f; - switch ((insn >> 5) & 3) { - case 0: - /* lsl */ - offset = offset << nregs; - break; - case 1: - /* lsr */ - offset = offset >> nregs; - break; - default: - break; /* XXX */ - } - } - return (addr + offset); - } - case 0xa: /* b ... */ - case 0xb: /* bl ... */ - addr = ((insn << 2) & 0x03ffffff); - if (addr & 0x02000000) - addr |= 0xfc000000; - return (pc + 8 + addr); - case 0x7: /* ldr pc, [pc, reg, lsl #2] */ - addr = db_fetch_reg(insn & 0xf); - addr = pc + 8 + (addr << 2); - db_read_bytes(addr, 4, (char *)&addr); - return (addr); - case 0x1: /* mov pc, reg */ - addr = db_fetch_reg(insn & 0xf); - return (addr); - case 0x4: - case 0x5: /* ldr pc, [reg] */ - addr = db_fetch_reg((insn >> 16) & 0xf); - /* ldr pc, [reg, #offset] */ - if (insn & (1 << 24)) - offset = insn & 0xfff; - if (insn & 0x00800000) - addr += offset; - else - addr -= offset; - db_read_bytes(addr, 4, (char *)&addr); - return (addr); - case 0x8: /* ldmxx reg, {..., pc} */ - case 0x9: - addr = db_fetch_reg((insn >> 16) & 0xf); - nregs = (insn & 0x5555) + ((insn >> 1) & 0x5555); - nregs = (nregs & 0x3333) + ((nregs >> 2) & 0x3333); - nregs = (nregs + (nregs >> 4)) & 0x0f0f; - nregs = (nregs + (nregs >> 8)) & 0x001f; - switch ((insn >> 23) & 0x3) { - case 0x0: /* ldmda */ - addr = addr - 0; - break; - case 0x1: /* ldmia */ - addr = addr + 0 + ((nregs - 1) << 2); - break; - case 0x2: /* ldmdb */ - addr = addr - 4; - break; - case 0x3: /* ldmib */ - addr = addr + 4 + ((nregs - 1) << 2); - break; - } - db_read_bytes(addr, 4, (char *)&addr); - return (addr); - default: - panic("branch_taken: botch"); - } + ret = arm_predict_branch(NULL, insn, (register_t)pc, &new_pc, + db_branch_taken_fetch_reg, db_branch_taken_read_int); + + if (ret != 0) + kdb_reenter(); + + return (new_pc); } Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Mon Nov 2 16:43:26 2015 (r290272) +++ head/sys/arm/arm/machdep.c Mon Nov 2 16:56:34 2015 (r290273) @@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -627,11 +628,81 @@ ptrace_write_int(struct thread *td, vm_o return proc_rwmem(td->td_proc, &uio); } +static u_int +ptrace_get_usr_reg(void *cookie, int reg) +{ + int ret; + struct thread *td = cookie; + + KASSERT(((reg >= 0) && (reg <= ARM_REG_NUM_PC)), + ("reg is outside range")); + + switch(reg) { + case ARM_REG_NUM_PC: + ret = td->td_frame->tf_pc; + break; + case ARM_REG_NUM_LR: + ret = td->td_frame->tf_usr_lr; + break; + case ARM_REG_NUM_SP: + ret = td->td_frame->tf_usr_sp; + break; + default: + ret = *((register_t*)&td->td_frame->tf_r0 + reg); + break; + } + + return (ret); +} + +static u_int +ptrace_get_usr_int(void* cookie, vm_offset_t offset, u_int* val) +{ + struct thread *td = cookie; + u_int error; + + error = ptrace_read_int(td, offset, val); + + return (error); +} + +/** + * This function parses current instruction opcode and decodes + * any possible jump (change in PC) which might occur after + * the instruction is executed. + * + * @param td Thread structure of analysed task + * @param cur_instr Currently executed instruction + * @param alt_next_address Pointer to the variable where + * the destination address of the + * jump instruction shall be stored. + * + * @return <0> when jump is possible + * otherwise + */ +static int +ptrace_get_alternative_next(struct thread *td, uint32_t cur_instr, + uint32_t *alt_next_address) +{ + int error; + + if (inst_branch(cur_instr) || inst_call(cur_instr) || + inst_return(cur_instr)) { + error = arm_predict_branch(td, cur_instr, td->td_frame->tf_pc, + alt_next_address, ptrace_get_usr_reg, ptrace_get_usr_int); + + return (error); + } + + return (EINVAL); +} + int ptrace_single_step(struct thread *td) { struct proc *p; - int error; + int error, error_alt; + uint32_t cur_instr, alt_next = 0; /* TODO: This needs to be updated for Thumb-2 */ if ((td->td_frame->tf_spsr & PSR_T) != 0) @@ -639,20 +710,48 @@ ptrace_single_step(struct thread *td) KASSERT(td->td_md.md_ptrace_instr == 0, ("Didn't clear single step")); + KASSERT(td->td_md.md_ptrace_instr_alt == 0, + ("Didn't clear alternative single step")); p = td->td_proc; PROC_UNLOCK(p); - error = ptrace_read_int(td, td->td_frame->tf_pc + 4, - &td->td_md.md_ptrace_instr); + + error = ptrace_read_int(td, td->td_frame->tf_pc, + &cur_instr); if (error) goto out; - error = ptrace_write_int(td, td->td_frame->tf_pc + 4, - PTRACE_BREAKPOINT); - if (error) - td->td_md.md_ptrace_instr = 0; - td->td_md.md_ptrace_addr = td->td_frame->tf_pc + 4; + + error = ptrace_read_int(td, td->td_frame->tf_pc + INSN_SIZE, + &td->td_md.md_ptrace_instr); + if (error == 0) { + error = ptrace_write_int(td, td->td_frame->tf_pc + INSN_SIZE, + PTRACE_BREAKPOINT); + if (error) { + td->td_md.md_ptrace_instr = 0; + } else { + td->td_md.md_ptrace_addr = td->td_frame->tf_pc + + INSN_SIZE; + } + } + + error_alt = ptrace_get_alternative_next(td, cur_instr, &alt_next); + if (error_alt == 0) { + error_alt = ptrace_read_int(td, alt_next, + &td->td_md.md_ptrace_instr_alt); + if (error_alt) { + td->td_md.md_ptrace_instr_alt = 0; + } else { + error_alt = ptrace_write_int(td, alt_next, + PTRACE_BREAKPOINT); + if (error_alt) + td->td_md.md_ptrace_instr_alt = 0; + else + td->td_md.md_ptrace_addr_alt = alt_next; + } + } + out: PROC_LOCK(p); - return (error); + return ((error != 0) && (error_alt != 0)); } int @@ -664,7 +763,7 @@ ptrace_clear_single_step(struct thread * if ((td->td_frame->tf_spsr & PSR_T) != 0) return (EINVAL); - if (td->td_md.md_ptrace_instr) { + if (td->td_md.md_ptrace_instr != 0) { p = td->td_proc; PROC_UNLOCK(p); ptrace_write_int(td, td->td_md.md_ptrace_addr, @@ -672,6 +771,16 @@ ptrace_clear_single_step(struct thread * PROC_LOCK(p); td->td_md.md_ptrace_instr = 0; } + + if (td->td_md.md_ptrace_instr_alt != 0) { + p = td->td_proc; + PROC_UNLOCK(p); + ptrace_write_int(td, td->td_md.md_ptrace_addr_alt, + td->td_md.md_ptrace_instr_alt); + PROC_LOCK(p); + td->td_md.md_ptrace_instr_alt = 0; + } + return (0); } @@ -1074,6 +1183,111 @@ init_proc0(vm_offset_t kstack) pcpup->pc_curpcb = thread0.td_pcb; } +int +arm_predict_branch(void *cookie, u_int insn, register_t pc, register_t *new_pc, + u_int (*fetch_reg)(void*, int), u_int (*read_int)(void*, vm_offset_t, u_int*)) +{ + u_int addr, nregs, offset = 0; + int error = 0; + + switch ((insn >> 24) & 0xf) { + case 0x2: /* add pc, reg1, #value */ + case 0x0: /* add pc, reg1, reg2, lsl #offset */ + addr = fetch_reg(cookie, (insn >> 16) & 0xf); + if (((insn >> 16) & 0xf) == 15) + addr += 8; + if (insn & 0x0200000) { + offset = (insn >> 7) & 0x1e; + offset = (insn & 0xff) << (32 - offset) | + (insn & 0xff) >> offset; + } else { + + offset = fetch_reg(cookie, insn & 0x0f); + if ((insn & 0x0000ff0) != 0x00000000) { + if (insn & 0x10) + nregs = fetch_reg(cookie, + (insn >> 8) & 0xf); + else + nregs = (insn >> 7) & 0x1f; + switch ((insn >> 5) & 3) { + case 0: + /* lsl */ + offset = offset << nregs; + break; + case 1: + /* lsr */ + offset = offset >> nregs; + break; + default: + break; /* XXX */ + } + + } + *new_pc = addr + offset; + return (0); + + } + + case 0xa: /* b ... */ + case 0xb: /* bl ... */ + addr = ((insn << 2) & 0x03ffffff); + if (addr & 0x02000000) + addr |= 0xfc000000; + *new_pc = (pc + 8 + addr); + return (0); + case 0x7: /* ldr pc, [pc, reg, lsl #2] */ + addr = fetch_reg(cookie, insn & 0xf); + addr = pc + 8 + (addr << 2); + error = read_int(cookie, addr, &addr); + *new_pc = addr; + return (error); + case 0x1: /* mov pc, reg */ + *new_pc = fetch_reg(cookie, insn & 0xf); + return (0); + case 0x4: + case 0x5: /* ldr pc, [reg] */ + addr = fetch_reg(cookie, (insn >> 16) & 0xf); + /* ldr pc, [reg, #offset] */ + if (insn & (1 << 24)) + offset = insn & 0xfff; + if (insn & 0x00800000) + addr += offset; + else + addr -= offset; + error = read_int(cookie, addr, &addr); + *new_pc = addr; + + return (error); + case 0x8: /* ldmxx reg, {..., pc} */ + case 0x9: + addr = fetch_reg(cookie, (insn >> 16) & 0xf); + nregs = (insn & 0x5555) + ((insn >> 1) & 0x5555); + nregs = (nregs & 0x3333) + ((nregs >> 2) & 0x3333); + nregs = (nregs + (nregs >> 4)) & 0x0f0f; + nregs = (nregs + (nregs >> 8)) & 0x001f; + switch ((insn >> 23) & 0x3) { + case 0x0: /* ldmda */ + addr = addr - 0; + break; + case 0x1: /* ldmia */ + addr = addr + 0 + ((nregs - 1) << 2); + break; + case 0x2: /* ldmdb */ + addr = addr - 4; + break; + case 0x3: /* ldmib */ + addr = addr + 4 + ((nregs - 1) << 2); + break; + } + error = read_int(cookie, addr, &addr); + *new_pc = addr; + + return (error); + default: + return (EINVAL); + } +} + #ifdef ARM_NEW_PMAP void set_stackptrs(int cpu) Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Mon Nov 2 16:43:26 2015 (r290272) +++ head/sys/arm/include/armreg.h Mon Nov 2 16:56:34 2015 (r290273) @@ -444,6 +444,12 @@ #define INSN_COND_MASK 0xf0000000 /* Condition mask */ #define INSN_COND_AL 0xe0000000 /* Always condition */ +/* ARM register defines */ +#define ARM_REG_SIZE 4 +#define ARM_REG_NUM_PC 15 +#define ARM_REG_NUM_LR 14 +#define ARM_REG_NUM_SP 13 + #define THUMB_INSN_SIZE 2 /* Some are 4 bytes. */ #endif /* !MACHINE_ARMREG_H */ Modified: head/sys/arm/include/db_machdep.h ============================================================================== --- head/sys/arm/include/db_machdep.h Mon Nov 2 16:43:26 2015 (r290272) +++ head/sys/arm/include/db_machdep.h Mon Nov 2 16:56:34 2015 (r290273) @@ -74,7 +74,7 @@ typedef int db_expr_t; #define inst_branch(ins) (((ins) & 0x0f000000) == 0x0a000000 || \ ((ins) & 0x0fdffff0) == 0x079ff100 || \ - ((ins) & 0x0cf0f000) == 0x0490f000 || \ + ((ins) & 0x0cd0f000) == 0x0490f000 || \ ((ins) & 0x0ffffff0) == 0x012fff30 || /* blx */ \ ((ins) & 0x0de0f000) == 0x0080f000) @@ -90,7 +90,7 @@ typedef int db_expr_t; int db_validate_address(vm_offset_t); -u_int branch_taken (u_int insn, u_int pc); +u_int branch_taken (u_int insn, db_addr_t pc); #ifdef __ARMEB__ #define BYTE_MSF (1) Modified: head/sys/arm/include/machdep.h ============================================================================== --- head/sys/arm/include/machdep.h Mon Nov 2 16:43:26 2015 (r290272) +++ head/sys/arm/include/machdep.h Mon Nov 2 16:56:34 2015 (r290273) @@ -43,4 +43,7 @@ void arm_generic_initclocks(void); void board_set_serial(uint64_t); void board_set_revision(uint32_t); +int arm_predict_branch(void *, u_int, register_t, register_t *, + u_int (*)(void*, int), u_int (*)(void*, vm_offset_t, u_int*)); + #endif /* !_MACHINE_MACHDEP_H_ */ Modified: head/sys/arm/include/proc.h ============================================================================== --- head/sys/arm/include/proc.h Mon Nov 2 16:43:26 2015 (r290272) +++ head/sys/arm/include/proc.h Mon Nov 2 16:56:34 2015 (r290273) @@ -51,6 +51,8 @@ struct mdthread { register_t md_spurflt_addr; /* (k) Spurious page fault address. */ int md_ptrace_instr; int md_ptrace_addr; + int md_ptrace_instr_alt; + int md_ptrace_addr_alt; register_t md_tp; void *md_ras_start; void *md_ras_end; From owner-svn-src-head@freebsd.org Mon Nov 2 17:02:46 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CD1CA24AA4; Mon, 2 Nov 2015 17:02:46 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::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 E04051184; Mon, 2 Nov 2015 17:02:45 +0000 (UTC) (envelope-from royger@gmail.com) Received: by wmll128 with SMTP id l128so66544920wml.0; Mon, 02 Nov 2015 09:02:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=r9G4cp+GKJmqKCjxm/XS+CVNhUwsUbjSwC690HnaU2M=; b=suSP377ZP0QJoZiGLtXiy3FFqE8s/cZVT4ZHTFlPrLQlDO4ZCsOz+VumRSqHr+iVCI Jxx1DFUc05pw5Xf1nrBaZiZntbXRIY9tIMgk4hfT2KaRYz4iH7oHHl1VzsEeg0/TEp2t LrfOt0nET5AbDakS1mjrrinvMeLpLCEQ52JSCsimn4+O+8WyFJC02spNfnLnW1SheRzc ws3kXqeGoNoj9AQWy8LD97go+O2ad26xAdGyujtIlJoHGliWs38//mNQS+O5M7n9650G iugQdp7qsRPCGUEZ5EX9/Og8Z78dw39ILst5DYEi8kR05VxRuhYeIqQY7NDc4nscrrxo /g3g== X-Received: by 10.28.138.140 with SMTP id m134mr14237283wmd.74.1446483764494; Mon, 02 Nov 2015 09:02:44 -0800 (PST) Received: from MacBook-Air-de-Roger.local (235.Red-79-152-22.dynamicIP.rima-tde.net. [79.152.22.235]) by smtp.gmail.com with ESMTPSA id e63sm19092584wma.7.2015.11.02.09.02.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Nov 2015 09:02:43 -0800 (PST) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Subject: Re: svn commit: r289834 - head/sys/x86/x86 To: Oliver Pinter References: <201510231539.t9NFdxPe018130@repo.freebsd.org> <562A564D.9080703@citrix.com> <562E1F8F.3010304@FreeBSD.org> <5632447B.1020402@FreeBSD.org> <56376567.9090100@FreeBSD.org> Cc: Adrian Chadd , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Message-ID: <56379731.7010702@FreeBSD.org> Date: Mon, 2 Nov 2015 18:02:41 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 17:02:46 -0000 El 02/11/15 a les 17.41, Oliver Pinter ha escrit: > Okay, the server survived a full buildworld + installer generation > with the new patch. Thanks for the heads up! I will wait a couple more days and then commit it. Roger. From owner-svn-src-head@freebsd.org Mon Nov 2 17:20:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 339C3A24F23; Mon, 2 Nov 2015 17:20:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id CEAAB1C85; Mon, 2 Nov 2015 17:20:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) 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 TAA08829; Mon, 02 Nov 2015 19:19:53 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ZtIlt-0001a1-Ff; Mon, 02 Nov 2015 19:19:53 +0200 Subject: Re: svn commit: r290245 - in head/sys/contrib/vchiq/interface: vchi vchiq_arm To: Adrian Chadd , Andrew Turner References: <201511012217.tA1MHdMJ047219@repo.freebsd.org> <20151102093603.0aebe7a8@bender.Home> Cc: Oleksandr Tymoshenko , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Andriy Gapon Message-ID: <56379B00.60905@FreeBSD.org> Date: Mon, 2 Nov 2015 19:18:56 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 17:20:04 -0000 On 02/11/2015 18:13, Adrian Chadd wrote: > The same reason we don't use it for dri, etc. > > The vendor driver isn't portable by any stretch. We could put it > there, but then we'd have to maintain the vendor changes on top of it > in subversion and I kinda dont want to think about how that'll work > out.. :) Same as, say, ZFS? -- Andriy Gapon From owner-svn-src-head@freebsd.org Mon Nov 2 18:19:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A17DFA24A92; Mon, 2 Nov 2015 18:19:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::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 64AE51901; Mon, 2 Nov 2015 18:19:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igpw7 with SMTP id w7so62912161igp.0; Mon, 02 Nov 2015 10:19:31 -0800 (PST) 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=UOFmFPSZiNA+GEg8WRKelskvFjVhs/C5V/MwxsyCn40=; b=lgYbp9ESZXwihxJgzN5OYc7hB0vaM5VCnaMV59OFc6aW9eUASm/os1MGcynqyNdA9d b/0onzikupNOt2u1T1d40x0rUdyseD3sw7aE8dNhMJGF8wIXCUU/L8vNx3VuilFH1rIn rFkHiC82aA+zNIe2plSHBt4HbCQVc3HK15dCZ3d4nIUQS2cJVt1uJK+vAaI+EgpFvrfg /mE1vs3EAAPNZ2xBuVmcW5oNjGYzvHXv2kdPbGe3S06hO9fad4jTHC1jxvX8RLwLEzQe D1IUSoWOTx3S2Vu8MZys9eiBF+cP9QwTOP1bI0gCwXj5kuD3yPBmVMSn03orTuJ+zHwC UFaw== MIME-Version: 1.0 X-Received: by 10.50.164.196 with SMTP id ys4mr13117943igb.37.1446488370928; Mon, 02 Nov 2015 10:19:30 -0800 (PST) Received: by 10.36.46.66 with HTTP; Mon, 2 Nov 2015 10:19:30 -0800 (PST) In-Reply-To: <56379B00.60905@FreeBSD.org> References: <201511012217.tA1MHdMJ047219@repo.freebsd.org> <20151102093603.0aebe7a8@bender.Home> <56379B00.60905@FreeBSD.org> Date: Mon, 2 Nov 2015 10:19:30 -0800 Message-ID: Subject: Re: svn commit: r290245 - in head/sys/contrib/vchiq/interface: vchi vchiq_arm From: Adrian Chadd To: Andriy Gapon Cc: Andrew Turner , Oleksandr Tymoshenko , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 18:19:31 -0000 On 2 November 2015 at 09:18, Andriy Gapon wrote: > On 02/11/2015 18:13, Adrian Chadd wrote: >> The same reason we don't use it for dri, etc. >> >> The vendor driver isn't portable by any stretch. We could put it >> there, but then we'd have to maintain the vendor changes on top of it >> in subversion and I kinda dont want to think about how that'll work >> out.. :) > > Same as, say, ZFS? Well, we're getting paid approximately $0 to try and keep this cleaner. :-) at some point yeah, we may do it the vendor branch way. -adrian From owner-svn-src-head@freebsd.org Mon Nov 2 19:38:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E13D0A24AAE; Mon, 2 Nov 2015 19:38:17 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD0841D59; Mon, 2 Nov 2015 19:38:17 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from [8.39.141.5] (helo=shaff-x1.dolby.net) by id.bluezbox.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZtKvg-0003bn-TY; Mon, 02 Nov 2015 11:38:09 -0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: svn commit: r290245 - in head/sys/contrib/vchiq/interface: vchi vchiq_arm From: Oleksandr Tymoshenko In-Reply-To: <20151102093603.0aebe7a8@bender.Home> Date: Mon, 2 Nov 2015 11:37:38 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201511012217.tA1MHdMJ047219@repo.freebsd.org> <20151102093603.0aebe7a8@bender.Home> To: Andrew Turner X-Mailer: Apple Mail (2.3096.5) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: > On Nov 2, 2015, at 1:36 AM, Andrew Turner wrote: > > On Sun, 1 Nov 2015 22:17:39 +0000 (UTC) > Oleksandr Tymoshenko wrote: > >> Author: gonzo >> Date: Sun Nov 1 22:17:39 2015 >> New Revision: 290245 >> URL: https://svnweb.freebsd.org/changeset/base/290245 >> >> Log: >> Synchronize with latest upstream VCHI code: >> >> - Add LIB_VERSION ioctl >> - Add CLOSE_DELIVERED ioctl >> - Bump code version >> >> Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5 > > Was there a reason we don't use the vendor-sys area for vchiq? [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 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] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 19:38:18 -0000 > On Nov 2, 2015, at 1:36 AM, Andrew Turner = wrote: >=20 > On Sun, 1 Nov 2015 22:17:39 +0000 (UTC) > Oleksandr Tymoshenko wrote: >=20 >> Author: gonzo >> Date: Sun Nov 1 22:17:39 2015 >> New Revision: 290245 >> URL: https://svnweb.freebsd.org/changeset/base/290245 >>=20 >> Log: >> Synchronize with latest upstream VCHI code: >>=20 >> - Add LIB_VERSION ioctl >> - Add CLOSE_DELIVERED ioctl >> - Bump code version >>=20 >> Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5 >=20 > Was there a reason we don't use the vendor-sys area for vchiq? What Adrian said: original code is not very portable and I have to go = through manual merge in my staging repo and only then merge to sys/ area=20= From owner-svn-src-head@freebsd.org Mon Nov 2 20:04:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13BD9A24F76; Mon, 2 Nov 2015 20:04:01 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE3251A21; Mon, 2 Nov 2015 20:04:00 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2K3xCT040924; Mon, 2 Nov 2015 20:03:59 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2K3xmP040918; Mon, 2 Nov 2015 20:03:59 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022003.tA2K3xmP040918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 20:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290275 - in head: lib/libdpv lib/libfigpar sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 20:04:01 -0000 Author: dteske Date: Mon Nov 2 20:03:59 2015 New Revision: 290275 URL: https://svnweb.freebsd.org/changeset/base/290275 Log: Make figpar(3) types/macros [more] unique (s/fp_/figpar_/gi) Modified: head/lib/libdpv/dialogrc.c head/lib/libdpv/dialogrc.h head/lib/libfigpar/figpar.3 head/lib/libfigpar/figpar.c head/lib/libfigpar/figpar.h head/sys/sys/param.h Modified: head/lib/libdpv/dialogrc.c ============================================================================== --- head/lib/libdpv/dialogrc.c Mon Nov 2 17:41:15 2015 (r290274) +++ head/lib/libdpv/dialogrc.c Mon Nov 2 20:03:59 2015 (r290275) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2015 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,58 +49,58 @@ char gauge_color[STR_BUFSIZE] = "47b"; / char separator[STR_BUFSIZE] = ""; /* Function prototypes */ -static int setattr(struct fp_config *, uint32_t, char *, char *); -static int setbool(struct fp_config *, uint32_t, char *, char *); -static int setnum(struct fp_config *, uint32_t, char *, char *); -static int setstr(struct fp_config *, uint32_t, char *, char *); +static int setattr(struct figpar_config *, uint32_t, char *, char *); +static int setbool(struct figpar_config *, uint32_t, char *, char *); +static int setnum(struct figpar_config *, uint32_t, char *, char *); +static int setstr(struct figpar_config *, uint32_t, char *, char *); /* * Anatomy of DIALOGRC (~/.dialogrc by default) * NOTE: Must appear after private function prototypes (above) * NB: Brace-initialization of union requires cast to *first* member of union */ -static struct fp_config dialogrc_config[] = { - /* TYPE Directive DEFAULT HANDLER */ - {FP_TYPE_INT, "aspect", {(void *)0}, &setnum}, - {FP_TYPE_STR, "separate_widget", {separator}, &setstr}, - {FP_TYPE_INT, "tab_len", {(void *)0}, &setnum}, - {FP_TYPE_BOOL, "visit_items", {(void *)0}, &setbool}, - {FP_TYPE_BOOL, "use_shadow", {(void *)1}, &setbool}, - {FP_TYPE_BOOL, "use_colors", {(void *)1}, &setbool}, - {FP_TYPE_STR, "screen_color", {NULL}, &setattr}, - {FP_TYPE_STR, "shadow_color", {NULL}, &setattr}, - {FP_TYPE_STR, "dialog_color", {NULL}, &setattr}, - {FP_TYPE_STR, "title_color", {NULL}, &setattr}, - {FP_TYPE_STR, "border_color", {NULL}, &setattr}, - {FP_TYPE_STR, "button_active_color", {NULL}, &setattr}, - {FP_TYPE_STR, "button_inactive_color", {NULL}, &setattr}, - {FP_TYPE_STR, "button_key_active_color", {NULL}, &setattr}, - {FP_TYPE_STR, "button_key_inactive_color", {NULL}, &setattr}, - {FP_TYPE_STR, "button_label_active_color", {NULL}, &setattr}, - {FP_TYPE_STR, "button_label_inactive_color",{NULL}, &setattr}, - {FP_TYPE_STR, "inputbox_color", {NULL}, &setattr}, - {FP_TYPE_STR, "inputbox_border_color", {NULL}, &setattr}, - {FP_TYPE_STR, "searchbox_color", {NULL}, &setattr}, - {FP_TYPE_STR, "searchbox_title_color", {NULL}, &setattr}, - {FP_TYPE_STR, "searchbox_border_color", {NULL}, &setattr}, - {FP_TYPE_STR, "position_indicator_color", {NULL}, &setattr}, - {FP_TYPE_STR, "menubox_color", {NULL}, &setattr}, - {FP_TYPE_STR, "menubox_border_color", {NULL}, &setattr}, - {FP_TYPE_STR, "item_color", {NULL}, &setattr}, - {FP_TYPE_STR, "item_selected_color", {NULL}, &setattr}, - {FP_TYPE_STR, "tag_color", {NULL}, &setattr}, - {FP_TYPE_STR, "tag_selected_color", {NULL}, &setattr}, - {FP_TYPE_STR, "tag_key_color", {NULL}, &setattr}, - {FP_TYPE_STR, "tag_key_selected_color", {NULL}, &setattr}, - {FP_TYPE_STR, "check_color", {NULL}, &setattr}, - {FP_TYPE_STR, "check_selected_color", {NULL}, &setattr}, - {FP_TYPE_STR, "uarrow_color", {NULL}, &setattr}, - {FP_TYPE_STR, "darrow_color", {NULL}, &setattr}, - {FP_TYPE_STR, "itemhelp_color", {NULL}, &setattr}, - {FP_TYPE_STR, "form_active_text_color", {NULL}, &setattr}, - {FP_TYPE_STR, "form_text_color", {NULL}, &setattr}, - {FP_TYPE_STR, "form_item_readonly_color", {NULL}, &setattr}, - {FP_TYPE_STR, "gauge_color", {gauge_color}, &setattr}, +static struct figpar_config dialogrc_config[] = { + /* TYPE DIRECTIVE DEFAULT HANDLER */ + {FIGPAR_TYPE_INT, "aspect", {(void *)0}, &setnum}, + {FIGPAR_TYPE_STR, "separate_widget", {separator}, &setstr}, + {FIGPAR_TYPE_INT, "tab_len", {(void *)0}, &setnum}, + {FIGPAR_TYPE_BOOL, "visit_items", {(void *)0}, &setbool}, + {FIGPAR_TYPE_BOOL, "use_shadow", {(void *)1}, &setbool}, + {FIGPAR_TYPE_BOOL, "use_colors", {(void *)1}, &setbool}, + {FIGPAR_TYPE_STR, "screen_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "shadow_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "dialog_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "title_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "border_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "button_active_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "button_inactive_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "button_key_active_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "button_key_inactive_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "button_label_active_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "button_label_inactive_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "inputbox_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "inputbox_border_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "searchbox_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "searchbox_title_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "searchbox_border_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "position_indicator_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "menubox_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "menubox_border_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "item_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "item_selected_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "tag_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "tag_selected_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "tag_key_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "tag_key_selected_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "check_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "check_selected_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "uarrow_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "darrow_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "itemhelp_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "form_active_text_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "form_text_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "form_item_readonly_color", {NULL}, &setattr}, + {FIGPAR_TYPE_STR, "gauge_color", {gauge_color}, &setattr}, {0, NULL, {0}, NULL} }; @@ -108,7 +108,7 @@ static struct fp_config dialogrc_config[ * figpar call-back for interpreting value as .dialogrc `Attribute' */ static int -setattr(struct fp_config *option, uint32_t line __unused, +setattr(struct figpar_config *option, uint32_t line __unused, char *directive __unused, char *value) { char *cp = value; @@ -204,7 +204,7 @@ write_attrbuf: * figpar call-back for interpreting value as .dialogrc `Boolean' */ static int -setbool(struct fp_config *option, uint32_t line __unused, +setbool(struct figpar_config *option, uint32_t line __unused, char *directive __unused, char *value) { @@ -227,7 +227,7 @@ setbool(struct fp_config *option, uint32 * figpar call-back for interpreting value as .dialogrc `Number' */ static int -setnum(struct fp_config *option, uint32_t line __unused, +setnum(struct figpar_config *option, uint32_t line __unused, char *directive __unused, char *value) { @@ -247,7 +247,7 @@ setnum(struct fp_config *option, uint32_ * figpar call-back for interpreting value as .dialogrc `String' */ static int -setstr(struct fp_config *option, uint32_t line __unused, +setstr(struct figpar_config *option, uint32_t line __unused, char *directive __unused, char *value) { size_t len; @@ -315,7 +315,8 @@ parse_dialogrc(void) } /* Process file (either $DIALOGRC if set, or `$HOME/.dialogrc') */ - res = parse_config(dialogrc_config, path, NULL, FP_BREAK_ON_EQUALS); + res = parse_config(dialogrc_config, + path, NULL, FIGPAR_BREAK_ON_EQUALS); /* Set some globals based on what we parsed */ use_shadow = dialogrc_config_option("use_shadow")->value.boolean; @@ -328,10 +329,10 @@ parse_dialogrc(void) /* * Return a pointer to the `.dialogrc' config option specific to `directive' or - * static fp_dummy_config (full of NULLs) if none found (see + * static figpar_dummy_config (full of NULLs) if none found (see * get_config_option(3); part of figpar(3)). */ -struct fp_config * +struct figpar_config * dialogrc_config_option(const char *directive) { return (get_config_option(dialogrc_config, directive)); Modified: head/lib/libdpv/dialogrc.h ============================================================================== --- head/lib/libdpv/dialogrc.h Mon Nov 2 17:41:15 2015 (r290274) +++ head/lib/libdpv/dialogrc.h Mon Nov 2 20:03:59 2015 (r290275) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2015 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,7 @@ extern char separator[]; __BEGIN_DECLS void dialogrc_free(void); int parse_dialogrc(void); -struct fp_config *dialogrc_config_option(const char *_directive); +struct figpar_config *dialogrc_config_option(const char *_directive); __END_DECLS #endif /* !_DIALOGRC_H_ */ Modified: head/lib/libfigpar/figpar.3 ============================================================================== --- head/lib/libfigpar/figpar.3 Mon Nov 2 17:41:15 2015 (r290274) +++ head/lib/libfigpar/figpar.3 Mon Nov 2 20:03:59 2015 (r290275) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 22, 2015 +.Dd Nov 2, 2015 .Dt FIGPAR 3 .Os .Sh NAME @@ -38,13 +38,13 @@ .In figpar.h .Ft int .Fo parse_config -.Fa "struct fp_config options[], const char *path" -.Fa "int \*[lp]*unknown\*[rp]\*[lp]struct fp_config *option, uint32_t line" +.Fa "struct figpar_config options[], const char *path" +.Fa "int \*[lp]*unknown\*[rp]\*[lp]struct figpar_config *option, uint32_t line" .Fa "char *directive, char *value\*[rp], uint8_t processing_options" .Fc -.Ft "struct fp_config *" +.Ft "struct figpar_config *" .Fo get_config_option -.Fa "struct fp_config options[], const char *directive" +.Fa "struct figpar_config options[], const char *directive" .Fc .In string_m.h .Ft int @@ -91,32 +91,32 @@ Configuration directives, types, and cal data structures defined in .In figpar.h : .Bd -literal -offset indent -struct fp_config { - enum fp_cfgtype type; /* value type */ - const char *directive; /* keyword */ - union fp_cfgvalue value; /* value */ +struct figpar_config { + enum figpar_cfgtype type; /* value type */ + const char *directive; /* keyword */ + union figpar_cfgvalue value; /* value */ /* Pointer to function used when directive is found */ - int (*action)(struct fp_config *option, uint32_t line, + int (*action)(struct figpar_config *option, uint32_t line, char *directive, char *value); }; -enum fp_cfgtype { - FP_TYPE_NONE = 0x0000, /* for directives with no value */ - FP_TYPE_BOOL = 0x0001, /* boolean */ - FP_TYPE_INT = 0x0002, /* signed 32 bit integer */ - FP_TYPE_UINT = 0x0004, /* unsigned 32 bit integer */ - FP_TYPE_STR = 0x0008, /* string pointer */ - FP_TYPE_STRARRAY = 0x0010, /* string array pointer */ - FP_TYPE_DATA1 = 0x0020, /* void data type-1 (whatever) */ - FP_TYPE_DATA2 = 0x0040, /* void data type-2 (whatever) */ - FP_TYPE_DATA3 = 0x0080, /* void data type-3 (whatever) */ - FP_TYPE_RESERVED1 = 0x0100, /* reserved data type-1 (future) */ - FP_TYPE_RESERVED2 = 0x0200, /* reserved data type-2 (future) */ - FP_TYPE_RESERVED3 = 0x0400, /* reserved data type-3 (future) */ +enum figpar_cfgtype { + FIGPAR_TYPE_NONE = 0x0000, /* directives with no value */ + FIGPAR_TYPE_BOOL = 0x0001, /* boolean */ + FIGPAR_TYPE_INT = 0x0002, /* signed 32 bit integer */ + FIGPAR_TYPE_UINT = 0x0004, /* unsigned 32 bit integer */ + FIGPAR_TYPE_STR = 0x0008, /* string pointer */ + FIGPAR_TYPE_STRARRAY = 0x0010, /* string array pointer */ + FIGPAR_TYPE_DATA1 = 0x0020, /* void data type-1 (open) */ + FIGPAR_TYPE_DATA2 = 0x0040, /* void data type-2 (open) */ + FIGPAR_TYPE_DATA3 = 0x0080, /* void data type-3 (open) */ + FIGPAR_TYPE_RESERVED1 = 0x0100, /* reserved data type-1 */ + FIGPAR_TYPE_RESERVED2 = 0x0200, /* reserved data type-2 */ + FIGPAR_TYPE_RESERVED3 = 0x0400, /* reserved data type-3 */ }; -union fp_cfgvalue { +union figpar_cfgvalue { void *data; /* Pointer to NUL-terminated string */ char *str; /* Pointer to NUL-terminated string */ char **strarray; /* Pointer to an array of strings */ @@ -133,26 +133,26 @@ argument to is a mask of bit fields which indicate various processing options. The possible flags are as follows: -.Bl -tag -width FP_BREAK_ON_SEMICOLON -.It Dv FP_BREAK_ON_EQUALS +.Bl -tag -width FIGPAR_BREAK_ON_SEMICOLON +.It Dv FIGPAR_BREAK_ON_EQUALS An equals sign .Pq Ql Li = is normally considered part of the directive. This flag enables terminating the directive at the equals sign. Also makes equals sign optional and transient. -.It Dv FP_BREAK_ON_SEMICOLON +.It Dv FIGPAR_BREAK_ON_SEMICOLON A semicolon .Pq Ql Li \; is normally considered part of the value. This flag enables terminating the value at the semicolon. Also allows multiple statements on a single line separated by semicolon. -.It Dv FP_CASE_SENSITIVE +.It Dv FIGPAR_CASE_SENSITIVE Normally directives are matched case insensitively using .Xr fnmatch 3 . This flag enables directive matching to be case sensitive. -.It Dv FP_REQUIRE_EQUALS +.It Dv FIGPAR_REQUIRE_EQUALS If a directive is not followed by an equals, processing is aborted. -.It Dv FP_STRICT_EQUALS +.It Dv FIGPAR_STRICT_EQUALS Equals must be part of the directive to be considered a delimiter between directive and value. .El @@ -163,14 +163,14 @@ struct array pointer can be NULL and eve .Fn unknown function argument. .Pp -The directive for each fp_config item in the +The directive for each figpar_config item in the .Fn parse_config options argument is matched against each parsed directive using .Xr fnmatch 3 until a match is found. If a match is found, the .Fn action -function for that fp_config directive is invoked with the line number, +function for that figpar_config directive is invoked with the line number, directive, and value. Otherwise if no match, the .Fn unknown @@ -192,11 +192,11 @@ or if no match a pointer to a static dum .Pq whose values are all zero or NULL . .Pp The use of -.Fa "struct fp_config" +.Fa "struct figpar_config" is entirely optional as-is the use of -.Fa "enum fp_cfgtype" +.Fa "enum figpar_cfgtype" or -.Fa "union fp_cfgvalue" . +.Fa "union figpar_cfgvalue" . For example, you could choose to pass a NULL pointer to .Fn parse_config for the first argument and then provide a simple Modified: head/lib/libfigpar/figpar.c ============================================================================== --- head/lib/libfigpar/figpar.c Mon Nov 2 17:41:15 2015 (r290274) +++ head/lib/libfigpar/figpar.c Mon Nov 2 20:03:59 2015 (r290275) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2014 Devin Teske + * Copyright (c) 2002-2015 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,24 +40,25 @@ __FBSDID("$FreeBSD$"); #include "figpar.h" #include "string_m.h" -struct fp_config fp_dummy_config = {0, NULL, {0}, NULL}; +struct figpar_config figpar_dummy_config = {0, NULL, {0}, NULL}; /* - * Search for config option (struct fp_config) in the array of config options, - * returning the struct whose directive matches the given parameter. If no - * match is found, a pointer to the static dummy array (above) is returned. + * Search for config option (struct figpar_config) in the array of config + * options, returning the struct whose directive matches the given parameter. + * If no match is found, a pointer to the static dummy array (above) is + * returned. * * This is to eliminate dependency on the index position of an item in the * array, since the index position is more apt to be changed as code grows. */ -struct fp_config * -get_config_option(struct fp_config options[], const char *directive) +struct figpar_config * +get_config_option(struct figpar_config options[], const char *directive) { uint32_t n; /* Check arguments */ if (options == NULL || directive == NULL) - return (&fp_dummy_config); + return (&figpar_dummy_config); /* Loop through the array, return the index of the first match */ for (n = 0; options[n].directive != NULL; n++) @@ -65,12 +66,12 @@ get_config_option(struct fp_config optio return (&(options[n])); /* Re-initialize the dummy variable in case it was written to */ - fp_dummy_config.directive = NULL; - fp_dummy_config.type = 0; - fp_dummy_config.action = NULL; - fp_dummy_config.value.u_num = 0; + figpar_dummy_config.directive = NULL; + figpar_dummy_config.type = 0; + figpar_dummy_config.action = NULL; + figpar_dummy_config.value.u_num = 0; - return (&fp_dummy_config); + return (&figpar_dummy_config); } /* @@ -84,9 +85,9 @@ get_config_option(struct fp_config optio * Returns zero on success; otherwise returns -1 and errno should be consulted. */ int -parse_config(struct fp_config options[], const char *path, - int (*unknown)(struct fp_config *option, uint32_t line, char *directive, - char *value), uint16_t processing_options) +parse_config(struct figpar_config options[], const char *path, + int (*unknown)(struct figpar_config *option, uint32_t line, + char *directive, char *value), uint16_t processing_options) { uint8_t bequals; uint8_t bsemicolon; @@ -119,11 +120,15 @@ parse_config(struct fp_config options[], return (-1); /* Processing options */ - bequals = (processing_options & FP_BREAK_ON_EQUALS) == 0 ? 0 : 1; - bsemicolon = (processing_options & FP_BREAK_ON_SEMICOLON) == 0 ? 0 : 1; - case_sensitive = (processing_options & FP_CASE_SENSITIVE) == 0 ? 0 : 1; - require_equals = (processing_options & FP_REQUIRE_EQUALS) == 0 ? 0 : 1; - strict_equals = (processing_options & FP_STRICT_EQUALS) == 0 ? 0 : 1; + bequals = (processing_options & FIGPAR_BREAK_ON_EQUALS) == 0 ? 0 : 1; + bsemicolon = + (processing_options & FIGPAR_BREAK_ON_SEMICOLON) == 0 ? 0 : 1; + case_sensitive = + (processing_options & FIGPAR_CASE_SENSITIVE) == 0 ? 0 : 1; + require_equals = + (processing_options & FIGPAR_REQUIRE_EQUALS) == 0 ? 0 : 1; + strict_equals = + (processing_options & FIGPAR_STRICT_EQUALS) == 0 ? 0 : 1; /* Initialize strings */ directive = value = 0; Modified: head/lib/libfigpar/figpar.h ============================================================================== --- head/lib/libfigpar/figpar.h Mon Nov 2 17:41:15 2015 (r290274) +++ head/lib/libfigpar/figpar.h Mon Nov 2 20:03:59 2015 (r290275) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2014 Devin Teske + * Copyright (c) 2002-2015 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,7 +34,7 @@ /* * Union for storing various types of data in a single common container. */ -union fp_cfgvalue { +union figpar_cfgvalue { void *data; /* Pointer to NUL-terminated string */ char *str; /* Pointer to NUL-terminated string */ char **strarray; /* Pointer to an array of strings */ @@ -46,53 +46,53 @@ union fp_cfgvalue { /* * Option types (based on above cfgvalue union) */ -enum fp_cfgtype { - FP_TYPE_NONE = 0x0000, /* for directives with no value */ - FP_TYPE_BOOL = 0x0001, /* boolean */ - FP_TYPE_INT = 0x0002, /* signed 32 bit integer */ - FP_TYPE_UINT = 0x0004, /* unsigned 32 bit integer */ - FP_TYPE_STR = 0x0008, /* string pointer */ - FP_TYPE_STRARRAY = 0x0010, /* string array pointer */ - FP_TYPE_DATA1 = 0x0020, /* void data type-1 (whatever) */ - FP_TYPE_DATA2 = 0x0040, /* void data type-2 (whatever) */ - FP_TYPE_DATA3 = 0x0080, /* void data type-3 (whatever) */ - FP_TYPE_RESERVED1 = 0x0100, /* reserved data type-1 (future) */ - FP_TYPE_RESERVED2 = 0x0200, /* reserved data type-2 (future) */ - FP_TYPE_RESERVED3 = 0x0400, /* reserved data type-3 (future) */ +enum figpar_cfgtype { + FIGPAR_TYPE_NONE = 0x0000, /* directives with no value */ + FIGPAR_TYPE_BOOL = 0x0001, /* boolean */ + FIGPAR_TYPE_INT = 0x0002, /* signed 32 bit integer */ + FIGPAR_TYPE_UINT = 0x0004, /* unsigned 32 bit integer */ + FIGPAR_TYPE_STR = 0x0008, /* string pointer */ + FIGPAR_TYPE_STRARRAY = 0x0010, /* string array pointer */ + FIGPAR_TYPE_DATA1 = 0x0020, /* void data type-1 (open) */ + FIGPAR_TYPE_DATA2 = 0x0040, /* void data type-2 (open) */ + FIGPAR_TYPE_DATA3 = 0x0080, /* void data type-3 (open) */ + FIGPAR_TYPE_RESERVED1 = 0x0100, /* reserved data type-1 */ + FIGPAR_TYPE_RESERVED2 = 0x0200, /* reserved data type-2 */ + FIGPAR_TYPE_RESERVED3 = 0x0400, /* reserved data type-3 */ }; /* * Options to parse_config() for processing_options bitmask */ -#define FP_BREAK_ON_EQUALS 0x0001 /* stop reading directive at `=' */ -#define FP_BREAK_ON_SEMICOLON 0x0002 /* `;' starts a new line */ -#define FP_CASE_SENSITIVE 0x0004 /* directives are case sensitive */ -#define FP_REQUIRE_EQUALS 0x0008 /* assignment directives only */ -#define FP_STRICT_EQUALS 0x0010 /* `=' must be part of directive */ +#define FIGPAR_BREAK_ON_EQUALS 0x0001 /* stop reading directive at `=' */ +#define FIGPAR_BREAK_ON_SEMICOLON 0x0002 /* `;' starts a new line */ +#define FIGPAR_CASE_SENSITIVE 0x0004 /* directives are case sensitive */ +#define FIGPAR_REQUIRE_EQUALS 0x0008 /* assignment directives only */ +#define FIGPAR_STRICT_EQUALS 0x0010 /* `=' must be part of directive */ /* * Anatomy of a config file option */ -struct fp_config { - enum fp_cfgtype type; /* Option value type */ +struct figpar_config { + enum figpar_cfgtype type; /* Option value type */ const char *directive; /* config file keyword */ - union fp_cfgvalue value; /* NB: set by action */ + union figpar_cfgvalue value; /* NB: set by action */ /* * Function pointer; action to be taken when the directive is found */ - int (*action)(struct fp_config *option, uint32_t line, char *directive, - char *value); + int (*action)(struct figpar_config *option, uint32_t line, + char *directive, char *value); }; -extern struct fp_config fp_dummy_config; +extern struct figpar_config figpar_dummy_config; __BEGIN_DECLS -int parse_config(struct fp_config _options[], +int parse_config(struct figpar_config _options[], const char *_path, - int (*_unknown)(struct fp_config *_option, + int (*_unknown)(struct figpar_config *_option, uint32_t _line, char *_directive, char *_value), uint16_t _processing_options); -struct fp_config *get_config_option(struct fp_config _options[], +struct figpar_config *get_config_option(struct figpar_config _options[], const char *_directive); __END_DECLS Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Nov 2 17:41:15 2015 (r290274) +++ head/sys/sys/param.h Mon Nov 2 20:03:59 2015 (r290275) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100085 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100086 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Mon Nov 2 21:21:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33CB7A24D4F; Mon, 2 Nov 2015 21:21:02 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1F42162E; Mon, 2 Nov 2015 21:21:01 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2LL182061421; Mon, 2 Nov 2015 21:21:01 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2LL1wG061420; Mon, 2 Nov 2015 21:21:01 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201511022121.tA2LL1wG061420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Mon, 2 Nov 2015 21:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290276 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 21:21:02 -0000 Author: rrs Date: Mon Nov 2 21:21:00 2015 New Revision: 290276 URL: https://svnweb.freebsd.org/changeset/base/290276 Log: Fix three flowtable bugs, a) one lookup issue, b) a two cleaner issue. MFC after: 3 days Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D4014 Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Mon Nov 2 20:03:59 2015 (r290275) +++ head/sys/net/flowtable.c Mon Nov 2 21:21:00 2015 (r290276) @@ -435,8 +435,7 @@ static int flow_stale(struct flowtable *ft, struct flentry *fle, int maxidle) { - if (((fle->f_rt->rt_flags & RTF_HOST) && - ((fle->f_rt->rt_flags & (RTF_UP)) != (RTF_UP))) || + if (((fle->f_rt->rt_flags & RTF_UP) == 0) || (fle->f_rt->rt_ifp == NULL) || !RT_LINK_IS_UP(fle->f_rt->rt_ifp) || (fle->f_lle->la_flags & LLE_VALID) == 0) @@ -477,7 +476,7 @@ flow_matches(struct flentry *fle, uint32 CRITICAL_ASSERT(curthread); /* Microoptimization for IPv4: don't use bcmp(). */ - if (((keylen == sizeof(uint32_t) && (fle->f_key[0] != key[0])) || + if (((keylen == sizeof(uint32_t) && (fle->f_key[0] == key[0])) || (bcmp(fle->f_key, key, keylen) == 0)) && fibnum == fle->f_fibnum && #ifdef FLOWTABLE_HASH_ALL @@ -818,8 +817,6 @@ flowtable_free_stale(struct flowtable *f critical_exit(); bit_clear(tmpmask, curbit); - tmpmask += (curbit / 8); - tmpsize -= (curbit / 8) * 8; bit_ffs(tmpmask, tmpsize, &curbit); } From owner-svn-src-head@freebsd.org Mon Nov 2 21:43:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83C29A253F6; Mon, 2 Nov 2015 21:43:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001: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 4FFC11B24; Mon, 2 Nov 2015 21:43:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igdg1 with SMTP id g1so67156540igd.1; Mon, 02 Nov 2015 13:43:40 -0800 (PST) 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=kWN42B0i8Y29Zzj246iyryxhO6Cizj59FKHxSAcNfL0=; b=KGi7+h7gncTARfqx0+ePf3037kMHOSAA+kJz3vgk+doKF1Xpuw0ViAp4WJ9pvQ5DAj V5A/rz5ZJHYNFA/VUOgaqEZSIdoxYEhT2hzJgiESjem9KfLC70CES6+Irn2ph9OOOHde pPOql2PFYvaBWRbuMClMYN4abZBiARtWB8Zzpk3E9Eg8sQjmId/qg3pKz0GnhTzpeO3K kS51erAeMoENQPWj7xRnV++2CrHgSPxqDVyG9sPs2Z7U6WRduILuIrv2HpDqp9dNifTn au3x8d1lRYcR7ZGrbtXFf6SxqdnqfKXQLMGO7mPO5j17lTXYVDn94XxBVsSCk7yqY/l4 INtA== MIME-Version: 1.0 X-Received: by 10.50.155.41 with SMTP id vt9mr13040987igb.22.1446500620767; Mon, 02 Nov 2015 13:43:40 -0800 (PST) Received: by 10.36.46.66 with HTTP; Mon, 2 Nov 2015 13:43:40 -0800 (PST) In-Reply-To: <20151029212554.799f76eb@kalimero.tijl.coosemans.org> References: <201510140210.t9E2A79H056595@repo.freebsd.org> <20151029212554.799f76eb@kalimero.tijl.coosemans.org> Date: Mon, 2 Nov 2015 13:43:40 -0800 Message-ID: Subject: Re: svn commit: r289279 - in head/sys: kern vm From: Adrian Chadd To: Tijl Coosemans Cc: Jeff Roberson , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 21:43:41 -0000 Hi, try this? adrian@victoria:~/work/freebsd/head-embedded/src/sys/kern % svn diff vfs_bio.c Index: vfs_bio.c =================================================================== --- vfs_bio.c (revision 290048) +++ vfs_bio.c (working copy) @@ -3623,6 +3623,13 @@ if (bp == NULL) { if (slpflag || slptimeo) return NULL; + /* + * Yield so the bufdaemon has a chance to run and + * clean some buffers; otherwise we'll get stuck in + * a tight loop with no sleeping; we'll wake up the + * buffer daemon but never give it a slice to run. + */ + kern_yield(PRI_USER); goto loop; } -a On 29 October 2015 at 13:25, Tijl Coosemans wrote: > On Wed, 14 Oct 2015 02:10:07 +0000 (UTC) Jeff Roberson wrote: >> Author: jeff >> Date: Wed Oct 14 02:10:07 2015 >> New Revision: 289279 >> URL: https://svnweb.freebsd.org/changeset/base/289279 >> >> Log: >> Parallelize the buffer cache and rewrite getnewbuf(). This results in a >> 8x performance improvement in a micro benchmark on a 4 socket machine. >> >> - Get buffer headers from a per-cpu uma cache that sits in from of the >> free queue. >> - Use a per-cpu quantum cache in vmem to eliminate contention for kva. >> - Use multiple clean queues according to buffer cache size to eliminate >> clean queue lock contention. >> - Introduce a bufspace daemon that attempts to prevent getnewbuf() callers >> from blocking or doing direct recycling. >> - Close some bufspace allocation races that could lead to endless >> recycling. >> - Further the transition to a more modern style of small functions grouped >> by prefix in order to improve growing complexity. > > I have an i386 system that locks up easily after this commit. Booting > into single user and running make installkernel triggers it consistently. > I haven't been able to reproduce it on amd64. Examining threads with > DDB shows that they are all at sched_switch (a few at fork_trampoline). > The only lock being held is Giant (by the interrupt handler for > ctrl+alt+esc I think). So it doesn't look like a dead lock. It's more > a sleeping beauty situation. All threads in the castle are sleeping and > there's no prince to wake them up. > > (kgdb) info thread > Id Target Id Frame > > These are from make installkernel: > > 72 Thread 100071 (PID=107: install) sched_switch (td=0xc667d000, > newtd=0xc6407000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 71 Thread 100070 (PID=81: make) sched_switch (td=0xc667d340, > newtd=0xc667d000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 70 Thread 100067 (PID=30: make) sched_switch (td=0xc667e000, > newtd=0xc667d340, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 69 Thread 100066 (PID=25: make) sched_switch (td=0xc667e340, > newtd=0xc667e000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > > Single user shell: > > 68 Thread 100065 (PID=17: sh) sched_switch (td=0xc6406000, > newtd=0xc667e340, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > > Kernel threads: > > 67 Thread 100063 (PID=16: vnlru) sched_switch (td=0xc6406680, > newtd=0xc6407340, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 66 Thread 100062 (PID=9: syncer) sched_switch (td=0xc64069c0, > newtd=0xc667d000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 65 Thread 100061 (PID=8: bufspacedaemon) sched_switch (td=0xc6407000, > newtd=0xc62dc000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 64 Thread 100060 (PID=7: bufdaemon) sched_switch (td=0xc6407340, > newtd=0xc6408000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 63 Thread 100068 (PID=7: bufdaemon//var worker) sched_switch ( > td=0xc667d9c0, newtd=0xc6407000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 62 Thread 100069 (PID=7: bufdaemon//usr worker) sched_switch ( > td=0xc667d680, newtd=0xc667d000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 61 Thread 100059 (PID=6: pagezero) sched_switch (td=0xc6407680, > newtd=0xc55ba680, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 60 Thread 100058 (PID=5: vmdaemon) sched_switch (td=0xc64079c0, > newtd=0xc6407340, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 59 Thread 100057 (PID=4: pagedaemon) sched_switch (td=0xc6408000, > newtd=0xc6407000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 58 Thread 100064 (PID=4: pagedaemon/uma) sched_switch (td=0xc6406340, > newtd=0xc55b9340, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 57 Thread 100050 (PID=15: acpi_cooling0) sched_switch (td=0xc62dc340, > newtd=0xc6407000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > .... > > Anything else you need to debug this? > From owner-svn-src-head@freebsd.org Mon Nov 2 22:13:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F3ECA25D91; Mon, 2 Nov 2015 22:13:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::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 1D3611058; Mon, 2 Nov 2015 22:13:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iody8 with SMTP id y8so1243411iod.1; Mon, 02 Nov 2015 14:13:30 -0800 (PST) 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=qTHLW3hT/l7HD22sacIB1dJtHEbqCRLrfNVmSuhydsw=; b=SYw1qmb0Gov7oFk9snU53ys4kE4Sxw1Oj5Ssp+VSD8ZMT5xfBVzmckabgYcq0pDj/m +G0z5e3PMxPnnLjtRwt8JHC84+1mpuImYrgRKZyigTXRSnZgNdZD0RhRLHqiqql/c233 DtK2DmT9God+SWYftZbNddpgR4V+LDpNlR2LbevcQPXk4iWvwYw2bA50nYj+DfRgAk6g eX4ZJ4HLgfmX7lY4TbHQuHaIh5Jn28TQGwS4CZpfpCkqKKJZViNCB7puoPsDT9zQhmaU avwMkVFId1o/oPhP8VLbKYfmmFeQEDbFwGUxY2tJ+k2zmXOAiMhw/Y3nLM68n35f+QKn y3Ew== MIME-Version: 1.0 X-Received: by 10.107.152.2 with SMTP id a2mr23866680ioe.123.1446502410558; Mon, 02 Nov 2015 14:13:30 -0800 (PST) Received: by 10.36.46.66 with HTTP; Mon, 2 Nov 2015 14:13:30 -0800 (PST) In-Reply-To: <20151029212554.799f76eb@kalimero.tijl.coosemans.org> References: <201510140210.t9E2A79H056595@repo.freebsd.org> <20151029212554.799f76eb@kalimero.tijl.coosemans.org> Date: Mon, 2 Nov 2015 14:13:30 -0800 Message-ID: Subject: Re: svn commit: r289279 - in head/sys: kern vm From: Adrian Chadd To: Tijl Coosemans Cc: Jeff Roberson , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:13:31 -0000 Hi Tijl, and others; Here's something that Jeff came up with that fixes my problem: adrian@victoria:~/work/freebsd/head-embedded/src % svn diff sys/kern/ Index: sys/kern/vfs_bio.c =================================================================== --- sys/kern/vfs_bio.c (revision 290048) +++ sys/kern/vfs_bio.c (working copy) @@ -2910,7 +2910,7 @@ } while(buf_scan(false) == 0); if (reserved) - bufspace_release(maxsize); + atomic_subtract_long(&bufspace, maxsize); if (bp != NULL) { bp->b_flags |= B_INVAL; brelse(bp); Would you/others please try this and see if it improves things? It improves things for me on these memory-starved MIPS boards. -a From owner-svn-src-head@freebsd.org Mon Nov 2 22:21:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C40E7A25EA9; Mon, 2 Nov 2015 22:21:03 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 880441337; Mon, 2 Nov 2015 22:21:03 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2ML2ZJ080401; Mon, 2 Nov 2015 22:21:02 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2ML2eN080400; Mon, 2 Nov 2015 22:21:02 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201511022221.tA2ML2eN080400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 2 Nov 2015 22:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290298 - head/lib/libedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:21:03 -0000 Author: brooks Date: Mon Nov 2 22:21:02 2015 New Revision: 290298 URL: https://svnweb.freebsd.org/changeset/base/290298 Log: The ops EL_SIGNAL, EL_EDITMODE, EL_UNBUFFERED, and EL_PREP_TERM all take an int, not an int*. Sponsored by: DARPA, AFRL Discovered with: CHERI Differential Revision: https://reviews.freebsd.org/D4071 Modified: head/lib/libedit/eln.c Modified: head/lib/libedit/eln.c ============================================================================== --- head/lib/libedit/eln.c Mon Nov 2 22:12:51 2015 (r290297) +++ head/lib/libedit/eln.c Mon Nov 2 22:21:02 2015 (r290298) @@ -325,11 +325,11 @@ el_get(EditLine *el, int op, ...) ret = el_wget(el, op, va_arg(ap, const char **)); break; - case EL_SIGNAL: /* int * */ + case EL_SIGNAL: /* int */ case EL_EDITMODE: case EL_UNBUFFERED: case EL_PREP_TERM: - ret = el_wget(el, op, va_arg(ap, int *)); + ret = el_wget(el, op, va_arg(ap, int)); break; case EL_GETTC: { From owner-svn-src-head@freebsd.org Mon Nov 2 22:25:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECF93A24028 for ; Mon, 2 Nov 2015 22:25:00 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-lf0-x22c.google.com (mail-lf0-x22c.google.com [IPv6:2a00:1450:4010:c07::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 7CB53197B for ; Mon, 2 Nov 2015 22:25:00 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: by lfbf136 with SMTP id f136so55343245lfb.0 for ; Mon, 02 Nov 2015 14:24:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clockworksquid.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=37LEEWI/rYKxWTokMKe/Dzj30G0++L8j3A1IZ+y3HsQ=; b=dh1ERGAR6sSl7Ut5U+S73MxUwlUiu3L370Mth7s89dEUkWGc1GKgfgxgon9NgEFhlq ZvqURz43ijj95u5CGUULUSipnI9+3zlPWT4jm+fOyZIwL4+oQIFNGKsbCAsCa5GE89QY 3yp+Wq7czfnIyjmk7XV7gxFc/0qwu7RnTnblc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=37LEEWI/rYKxWTokMKe/Dzj30G0++L8j3A1IZ+y3HsQ=; b=Kb1LaRXQkeYU5OBrBllht6r60Pf5gW/CmmohpO/5w9RmcgPMPhySGUa+pUOFz4+Edj JkFNYohLD3EQi/YRqOTql3ElSXShFSNOVm+Ww6bcVaFqp51UtTlLGWPxJJzKAP9yPFdX r7QVw70SxSqp4lprMb+/sYbeFDveVe5exrCeS6JhateKQhDMd1e0YVPEzYztA2MbfRBN 7bcBe1m9bp3HhrUqjyEs0uuyqVMw1BM8Lo64VhY4fqiR19sOzovJWjDde5JDtTByQMf8 AJYgWqcQTsYl7U62TiSdunBCoQuR3PpBkoZ3gWuHGO+2kZn0BWNmd099fy2O2p2Vlo+t TfeQ== X-Gm-Message-State: ALoCoQminG/tZirbKy4HDwNx5rDKGOU2arko1Ss6MtrVsa99LDf/1EoL63T/oE5/jnUD3qkNKaSK X-Received: by 10.112.119.133 with SMTP id ku5mr11174551lbb.1.1446503098632; Mon, 02 Nov 2015 14:24:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.205.34 with HTTP; Mon, 2 Nov 2015 14:24:39 -0800 (PST) In-Reply-To: <201511022121.tA2LL1wG061420@repo.freebsd.org> References: <201511022121.tA2LL1wG061420@repo.freebsd.org> From: Juli Mallett Date: Mon, 2 Nov 2015 14:24:39 -0800 Message-ID: Subject: Re: svn commit: r290276 - head/sys/net To: Randall Stewart Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:25:01 -0000 On Mon, Nov 2, 2015 at 1:21 PM, Randall Stewart wrote: > Author: rrs > Date: Mon Nov 2 21:21:00 2015 > New Revision: 290276 > URL: https://svnweb.freebsd.org/changeset/base/290276 > > Log: > Fix three flowtable bugs, a) one lookup issue, b) a two cleaner issue. > This commit message is not helpful, but the review is; it seems like the summary there might have been better for the commit message than naming the number of bugs. Should we assume the three hunks each fix a bug, or what? What if there were four hunks, or two? That kind of ambiguity and obscurity is especially confusing as time passes. From owner-svn-src-head@freebsd.org Mon Nov 2 22:49:40 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F312AA2482B; Mon, 2 Nov 2015 22:49:40 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B371F1F57; Mon, 2 Nov 2015 22:49:40 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2Mndvl089357; Mon, 2 Nov 2015 22:49:39 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MndaM089353; Mon, 2 Nov 2015 22:49:39 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201511022249.tA2MndaM089353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 2 Nov 2015 22:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290309 - in head/sys/arm: arm include xscale/ixp425 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:49:41 -0000 Author: ian Date: Mon Nov 2 22:49:39 2015 New Revision: 290309 URL: https://svnweb.freebsd.org/changeset/base/290309 Log: Eliminate the last dregs of the old global arm_root_dma_tag. In the old days, device drivers passed NULL for the parent tag when creating a new tag, and on arm platforms that resulted in a global tag representing overall platform constraints being substituted in the busdma code. Now all drivers use bus_get_dma_tag() and if there is a need to represent overall platform constraints they will be inherited from a tag supplied by nexus or some bus driver in the hierarchy. The only arm platforms still relying on the old global-tag scheme were some xscale boards with special PCI-bus constraints. This change provides those constraints through a tag supplied by the xscale PCI bus driver, and eliminates the few remaining references to the old global var. Reviewed by: cognet Modified: head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm/arm/busdma_machdep.c head/sys/arm/include/bus_dma.h head/sys/arm/xscale/ixp425/ixp425_pci.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Mon Nov 2 22:42:07 2015 (r290308) +++ head/sys/arm/arm/busdma_machdep-v6.c Mon Nov 2 22:49:39 2015 (r290309) @@ -473,11 +473,6 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_dma_tag_t newtag; int error = 0; -#if 0 - if (!parent) - parent = arm_root_dma_tag; -#endif - /* Basic sanity checking. */ KASSERT(boundary == 0 || powerof2(boundary), ("dma tag boundary %lu, must be a power of 2", boundary)); Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Mon Nov 2 22:42:07 2015 (r290308) +++ head/sys/arm/arm/busdma_machdep.c Mon Nov 2 22:49:39 2015 (r290309) @@ -224,9 +224,6 @@ static void free_bounce_page(bus_dma_tag static void bus_dmamap_sync_sl(struct sync_list *sl, bus_dmasync_op_t op, int bufaligned); -/* Default tag, as most drivers provide no parent tag. */ -bus_dma_tag_t arm_root_dma_tag; - /* * ---------------------------------------------------------------------------- * Begin block of code useful to transplant to other implementations. @@ -406,8 +403,6 @@ bus_dma_tag_create(bus_dma_tag_t parent, int error = 0; /* Return a NULL tag on failure */ *dmat = NULL; - if (!parent) - parent = arm_root_dma_tag; newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_BUSDMA, M_NOWAIT); if (newtag == NULL) { Modified: head/sys/arm/include/bus_dma.h ============================================================================== --- head/sys/arm/include/bus_dma.h Mon Nov 2 22:42:07 2015 (r290308) +++ head/sys/arm/include/bus_dma.h Mon Nov 2 22:49:39 2015 (r290309) @@ -94,8 +94,6 @@ struct arm32_dma_range { struct arm32_dma_range *bus_dma_get_range(void); int bus_dma_get_range_nb(void); -extern bus_dma_tag_t arm_root_dma_tag; - #endif /* _ARM32_BUS_DMA_PRIVATE */ #endif /* _ARM_BUS_DMA_H */ Modified: head/sys/arm/xscale/ixp425/ixp425_pci.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_pci.c Mon Nov 2 22:42:07 2015 (r290308) +++ head/sys/arm/xscale/ixp425/ixp425_pci.c Mon Nov 2 22:49:39 2015 (r290309) @@ -136,14 +136,6 @@ ixppcib_attach(device_t dev) NULL, NULL, &sc->sc_dmat)) panic("couldn't create the PCI dma tag !"); /* - * The PCI bus can only address 64MB. However, due to the way our - * implementation of busdma works, busdma can't tell if a device - * is a PCI device or not. So defaults to the PCI dma tag, which - * restrict the DMA'able memory to the first 64MB, and explicitely - * create less restrictive tags for non-PCI devices. - */ - arm_root_dma_tag = sc->sc_dmat; - /* * Initialize the bus space tags. */ ixp425_io_bs_init(&sc->sc_pci_iot, sc); @@ -361,6 +353,14 @@ ixppcib_release_resource(device_t bus, d return (ENXIO); } +static bus_dma_tag_t +ixppcib_get_dma_tag(device_t bus, device_t child) +{ + struct ixppcib_softc *sc = device_get_softc(bus); + + return (sc->sc_dmat); +} + static void ixppcib_conf_setup(struct ixppcib_softc *sc, int bus, int slot, int func, int reg) @@ -459,7 +459,7 @@ static device_method_t ixppcib_methods[] DEVMETHOD(bus_activate_resource, ixppcib_activate_resource), DEVMETHOD(bus_deactivate_resource, ixppcib_deactivate_resource), DEVMETHOD(bus_release_resource, ixppcib_release_resource), - /* DEVMETHOD(bus_get_dma_tag, ixppcib_get_dma_tag), */ + DEVMETHOD(bus_get_dma_tag, ixppcib_get_dma_tag), /* pcib interface */ DEVMETHOD(pcib_maxslots, ixppcib_maxslots), From owner-svn-src-head@freebsd.org Mon Nov 2 23:37:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0D40A2525F; Mon, 2 Nov 2015 23:37:20 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 727951F4A; Mon, 2 Nov 2015 23:37:20 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2NbJfl004681; Mon, 2 Nov 2015 23:37:19 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2NbJSh004677; Mon, 2 Nov 2015 23:37:19 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201511022337.tA2NbJSh004677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 2 Nov 2015 23:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290316 - in head/sys: arm64/arm64 powerpc/powerpc sparc64/sparc64 x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 23:37:20 -0000 Author: ian Date: Mon Nov 2 23:37:19 2015 New Revision: 290316 URL: https://svnweb.freebsd.org/changeset/base/290316 Log: Fix an alignment check that is wrong in half the busdma implementations. This will enable the elimination of a workaround in the USB driver that artifically allocates buffers twice as big as they need to be (which actually saves memory for very small buffers on the buggy platforms). When deciding how to allocate a dma buffer, armv4, armv6, mips, and x86/iommu all correctly check for the tag alignment <= maxsize as enabling simple uma/malloc based allocation. Powerpc, sparc64, x86/bounce, and arm64/bounce were all checking for alignment < maxsize; on those platforms when alignment was equal to the max size it would fall back to page-based allocators even for very small buffers. This change makes all platforms use the <= check. It should be noted that on all platforms other than arm[v6] and mips, this check is relying on undocumented behavior in malloc(9) that if you allocate a block of a given size it will be aligned to the next larger power-of-2 boundary. There is nothing in the malloc(9) man page that makes that explicit promise (but the busdma code has been relying on this behavior all along so I guess it works). Arm and mips code uses the allocator in kern/subr_busdma_buffalloc.c, which does explicitly implement this promise about size and alignment. Other platforms probably should switch to the aligned allocator. Modified: head/sys/arm64/arm64/busdma_bounce.c head/sys/powerpc/powerpc/busdma_machdep.c head/sys/sparc64/sparc64/bus_machdep.c head/sys/x86/x86/busdma_bounce.c Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Mon Nov 2 23:09:21 2015 (r290315) +++ head/sys/arm64/arm64/busdma_bounce.c Mon Nov 2 23:37:19 2015 (r290316) @@ -401,14 +401,14 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm /* * XXX: - * (dmat->alignment < dmat->maxsize) is just a quick hack; the exact + * (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact * alignment guarantees of malloc need to be nailed down, and the * code below should be rewritten to take that into account. * * In the meantime, we'll warn the user if malloc gets it wrong. */ if ((dmat->common.maxsize <= PAGE_SIZE) && - (dmat->common.alignment < dmat->common.maxsize) && + (dmat->common.alignment <= dmat->common.maxsize) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->common.maxsize, M_DEVBUF, mflags); Modified: head/sys/powerpc/powerpc/busdma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/busdma_machdep.c Mon Nov 2 23:09:21 2015 (r290315) +++ head/sys/powerpc/powerpc/busdma_machdep.c Mon Nov 2 23:37:19 2015 (r290316) @@ -514,14 +514,14 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi /* * XXX: - * (dmat->alignment < dmat->maxsize) is just a quick hack; the exact + * (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact * alignment guarantees of malloc need to be nailed down, and the * code below should be rewritten to take that into account. * * In the meantime, we'll warn the user if malloc gets it wrong. */ if ((dmat->maxsize <= PAGE_SIZE) && - (dmat->alignment < dmat->maxsize) && + (dmat->alignment <= dmat->maxsize) && dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); Modified: head/sys/sparc64/sparc64/bus_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/bus_machdep.c Mon Nov 2 23:09:21 2015 (r290315) +++ head/sys/sparc64/sparc64/bus_machdep.c Mon Nov 2 23:37:19 2015 (r290316) @@ -518,14 +518,14 @@ nexus_dmamem_alloc(bus_dma_tag_t dmat, v /* * XXX: - * (dmat->dt_alignment < dmat->dt_maxsize) is just a quick hack; the + * (dmat->dt_alignment <= dmat->dt_maxsize) is just a quick hack; the * exact alignment guarantees of malloc need to be nailed down, and * the code below should be rewritten to take that into account. * * In the meantime, we'll warn the user if malloc gets it wrong. */ if (dmat->dt_maxsize <= PAGE_SIZE && - dmat->dt_alignment < dmat->dt_maxsize) + dmat->dt_alignment <= dmat->dt_maxsize) *vaddr = malloc(dmat->dt_maxsize, M_DEVBUF, mflags); else { /* Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Mon Nov 2 23:09:21 2015 (r290315) +++ head/sys/x86/x86/busdma_bounce.c Mon Nov 2 23:37:19 2015 (r290316) @@ -398,14 +398,14 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm /* * XXX: - * (dmat->alignment < dmat->maxsize) is just a quick hack; the exact + * (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact * alignment guarantees of malloc need to be nailed down, and the * code below should be rewritten to take that into account. * * In the meantime, we'll warn the user if malloc gets it wrong. */ if ((dmat->common.maxsize <= PAGE_SIZE) && - (dmat->common.alignment < dmat->common.maxsize) && + (dmat->common.alignment <= dmat->common.maxsize) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->common.maxsize, M_DEVBUF, mflags); From owner-svn-src-head@freebsd.org Tue Nov 3 00:21:24 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E307A25C4B; Tue, 3 Nov 2015 00:21:24 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46B601774; Tue, 3 Nov 2015 00:21:24 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA30LNv5016277; Tue, 3 Nov 2015 00:21:23 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA30LNqc016276; Tue, 3 Nov 2015 00:21:23 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201511030021.tA30LNqc016276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 3 Nov 2015 00:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290317 - head/sys/powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 00:21:24 -0000 Author: jhibbits Date: Tue Nov 3 00:21:23 2015 New Revision: 290317 URL: https://svnweb.freebsd.org/changeset/base/290317 Log: Use the correct space (PCI addresses) for the I/O and memory ranges. PCIR_IOBASE/IOLIMIT/... all use PCI-space addresses, not host addresses. Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/pci_mpc85xx.c Mon Nov 2 23:37:19 2015 (r290316) +++ head/sys/powerpc/mpc85xx/pci_mpc85xx.c Tue Nov 3 00:21:23 2015 (r290317) @@ -782,9 +782,9 @@ fsl_pcib_decode_win(phandle_t node, stru sc->pci_sc.sc_range[i].host, sc->pci_sc.sc_range[i].size, sc->pci_sc.sc_range[i].pci); - sc->sc_ioport_start = sc->pci_sc.sc_range[i].host; - sc->sc_ioport_end = sc->pci_sc.sc_range[i].host + - sc->pci_sc.sc_range[i].size; + sc->sc_ioport_start = sc->pci_sc.sc_range[i].pci; + sc->sc_ioport_end = sc->pci_sc.sc_range[i].pci + + sc->pci_sc.sc_range[i].size - 1; sc->sc_ioport_alloc = 0x1000 + sc->pci_sc.sc_range[i].pci; break; case OFW_PCI_PHYS_HI_SPACE_MEM32: @@ -794,9 +794,9 @@ fsl_pcib_decode_win(phandle_t node, stru sc->pci_sc.sc_range[i].host, sc->pci_sc.sc_range[i].size, sc->pci_sc.sc_range[i].pci); - sc->sc_iomem_start = sc->pci_sc.sc_range[i].host; - sc->sc_iomem_end = sc->pci_sc.sc_range[i].host + - sc->pci_sc.sc_range[i].size; + sc->sc_iomem_start = sc->pci_sc.sc_range[i].pci; + sc->sc_iomem_end = sc->pci_sc.sc_range[i].pci + + sc->pci_sc.sc_range[i].size - 1; sc->sc_iomem_alloc = sc->pci_sc.sc_range[i].pci; break; default: From owner-svn-src-head@freebsd.org Tue Nov 3 00:46:08 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67242A25F3E; Tue, 3 Nov 2015 00:46:08 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B74910F8; Tue, 3 Nov 2015 00:46:08 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA30k7FI024843; Tue, 3 Nov 2015 00:46:07 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA30k7Ti024842; Tue, 3 Nov 2015 00:46:07 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201511030046.tA30k7Ti024842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Tue, 3 Nov 2015 00:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290318 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 00:46:08 -0000 Author: hrs Date: Tue Nov 3 00:46:06 2015 New Revision: 290318 URL: https://svnweb.freebsd.org/changeset/base/290318 Log: sdl->sdl_len in sockaddr_dl can be longer than sizeof(struct sockaddr_dl). Modified: head/lib/libc/net/getnameinfo.c Modified: head/lib/libc/net/getnameinfo.c ============================================================================== --- head/lib/libc/net/getnameinfo.c Tue Nov 3 00:21:23 2015 (r290317) +++ head/lib/libc/net/getnameinfo.c Tue Nov 3 00:46:06 2015 (r290318) @@ -122,7 +122,8 @@ getnameinfo(const struct sockaddr *sa, s afd = find_afd(sa->sa_family); if (afd == NULL) return (EAI_FAMILY); - if (sa->sa_family == PF_LOCAL) { + switch (sa->sa_family) { + case PF_LOCAL: /* * PF_LOCAL uses variable sa->sa_len depending on the * content length of sun_path. Require 1 byte in @@ -132,8 +133,17 @@ getnameinfo(const struct sockaddr *sa, s salen <= afd->a_socklen - sizeofmember(struct sockaddr_un, sun_path)) return (EAI_FAIL); - } else if (salen != afd->a_socklen) - return (EAI_FAIL); + break; + case PF_LINK: + if (salen <= afd->a_socklen - + sizeofmember(struct sockaddr_dl, sdl_data)) + return (EAI_FAIL); + break; + default: + if (salen != afd->a_socklen) + return (EAI_FAIL); + break; + } return ((*afd->a_func)(afd, sa, salen, host, hostlen, serv, servlen, flags)); From owner-svn-src-head@freebsd.org Tue Nov 3 00:54:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED5A7A24087; Tue, 3 Nov 2015 00:54:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D07214ED; Tue, 3 Nov 2015 00:54:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA30sEe3027658; Tue, 3 Nov 2015 00:54:14 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA30sEb5027657; Tue, 3 Nov 2015 00:54:14 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201511030054.tA30sEb5027657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 3 Nov 2015 00:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290319 - head/sys/powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 00:54:16 -0000 Author: jhibbits Date: Tue Nov 3 00:54:14 2015 New Revision: 290319 URL: https://svnweb.freebsd.org/changeset/base/290319 Log: Use 64-bit addresses for configuring inbound and outbound address windows. This allows using the full host and PCI ranges in the controller configuration. Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/pci_mpc85xx.c Tue Nov 3 00:46:06 2015 (r290318) +++ head/sys/powerpc/mpc85xx/pci_mpc85xx.c Tue Nov 3 00:54:14 2015 (r290319) @@ -129,11 +129,11 @@ static void fsl_pcib_cfgwrite(struct fsl u_int, uint32_t, int); static int fsl_pcib_decode_win(phandle_t, struct fsl_pcib_softc *); static void fsl_pcib_err_init(device_t); -static void fsl_pcib_inbound(struct fsl_pcib_softc *, int, int, u_long, - u_long, u_long); +static void fsl_pcib_inbound(struct fsl_pcib_softc *, int, int, uint64_t, + uint64_t, uint64_t); static int fsl_pcib_init(struct fsl_pcib_softc *, int, int); -static void fsl_pcib_outbound(struct fsl_pcib_softc *, int, int, u_long, - u_long, u_long); +static void fsl_pcib_outbound(struct fsl_pcib_softc *, int, int, uint64_t, + uint64_t, uint64_t); /* Forward declerations. */ static int fsl_pcib_attach(device_t); @@ -645,8 +645,8 @@ fsl_pcib_init(struct fsl_pcib_softc *sc, } static void -fsl_pcib_inbound(struct fsl_pcib_softc *sc, int wnd, int tgt, u_long start, - u_long size, u_long pci_start) +fsl_pcib_inbound(struct fsl_pcib_softc *sc, int wnd, int tgt, uint64_t start, + uint64_t size, uint64_t pci_start) { uint32_t attr, bar, tar; @@ -671,8 +671,8 @@ fsl_pcib_inbound(struct fsl_pcib_softc * } static void -fsl_pcib_outbound(struct fsl_pcib_softc *sc, int wnd, int res, u_long start, - u_long size, u_long pci_start) +fsl_pcib_outbound(struct fsl_pcib_softc *sc, int wnd, int res, uint64_t start, + uint64_t size, uint64_t pci_start) { uint32_t attr, bar, tar; From owner-svn-src-head@freebsd.org Tue Nov 3 03:29:36 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8A70A25C43; Tue, 3 Nov 2015 03:29:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B620A1815; Tue, 3 Nov 2015 03:29:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA33TZr5072271; Tue, 3 Nov 2015 03:29:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA33TZVv072270; Tue, 3 Nov 2015 03:29:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201511030329.tA33TZVv072270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 3 Nov 2015 03:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290320 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 03:29:37 -0000 Author: markj Date: Tue Nov 3 03:29:35 2015 New Revision: 290320 URL: https://svnweb.freebsd.org/changeset/base/290320 Log: Have elf_lookup() return an error if the specified non-weak symbol could not be found. Otherwise, relocations against such symbols will be silently ignored instead of causing an error to be raised. Reviewed by: kib MFC after: 1 week Modified: head/sys/kern/link_elf.c Modified: head/sys/kern/link_elf.c ============================================================================== --- head/sys/kern/link_elf.c Tue Nov 3 00:54:14 2015 (r290319) +++ head/sys/kern/link_elf.c Tue Nov 3 03:29:35 2015 (r290320) @@ -1594,6 +1594,10 @@ elf_lookup(linker_file_t lf, Elf_Size sy } addr = ((Elf_Addr)linker_file_lookup_symbol(lf, symbol, deps)); + if (addr == 0 && ELF_ST_BIND(sym->st_info) != STB_WEAK) { + *res = 0; + return (EINVAL); + } if (elf_set_find(&set_pcpu_list, addr, &start, &base)) addr = addr - start + base; From owner-svn-src-head@freebsd.org Tue Nov 3 04:51:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98DECA24BC8; Tue, 3 Nov 2015 04:51:00 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46A6219DE; Tue, 3 Nov 2015 04:51:00 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA34oxqI095745; Tue, 3 Nov 2015 04:50:59 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA34ow1T095741; Tue, 3 Nov 2015 04:50:58 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201511030450.tA34ow1T095741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 3 Nov 2015 04:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290321 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 04:51:00 -0000 Author: gonzo Date: Tue Nov 3 04:50:58 2015 New Revision: 290321 URL: https://svnweb.freebsd.org/changeset/base/290321 Log: Raspberry Pi firmware passes cache line size as a DTB parameter - Add cache-line-size paramter to vchiq node - Add cache_line_size DTB parameter referencing to .../vchiq/cache-line-size property Modified: head/sys/boot/fdt/dts/arm/bcm2835.dtsi head/sys/boot/fdt/dts/arm/bcm2836.dtsi head/sys/boot/fdt/dts/arm/rpi.dts head/sys/boot/fdt/dts/arm/rpi2.dts Modified: head/sys/boot/fdt/dts/arm/bcm2835.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/bcm2835.dtsi Tue Nov 3 03:29:35 2015 (r290320) +++ head/sys/boot/fdt/dts/arm/bcm2835.dtsi Tue Nov 3 04:50:58 2015 (r290321) @@ -474,11 +474,12 @@ reg-shift = <2>; }; - vchiq { + vchiq: vchiq { compatible = "broadcom,bcm2835-vchiq"; reg = <0xB800 0x50>; interrupts = <2>; interrupt-parent = <&intc>; + cache-line-size = <32>; }; usb { Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/bcm2836.dtsi Tue Nov 3 03:29:35 2015 (r290320) +++ head/sys/boot/fdt/dts/arm/bcm2836.dtsi Tue Nov 3 04:50:58 2015 (r290321) @@ -456,11 +456,12 @@ reg-shift = <2>; }; - vchiq { + vchiq: vchiq { compatible = "broadcom,bcm2835-vchiq"; reg = <0xB800 0x50>; interrupts = <2>; interrupt-parent = <&intc>; + cache-line-size = <32>; }; usb { Modified: head/sys/boot/fdt/dts/arm/rpi.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi.dts Tue Nov 3 03:29:35 2015 (r290320) +++ head/sys/boot/fdt/dts/arm/rpi.dts Tue Nov 3 04:50:58 2015 (r290321) @@ -389,4 +389,7 @@ stdout = "uart0"; }; + __overrides__ { + cache_line_size = <&vchiq>, "cache-line-size:0"; + }; }; Modified: head/sys/boot/fdt/dts/arm/rpi2.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi2.dts Tue Nov 3 03:29:35 2015 (r290320) +++ head/sys/boot/fdt/dts/arm/rpi2.dts Tue Nov 3 04:50:58 2015 (r290321) @@ -400,4 +400,7 @@ stdout = "uart0"; }; + __overrides__ { + cache_line_size = <&vchiq>, "cache-line-size:0"; + }; }; From owner-svn-src-head@freebsd.org Tue Nov 3 05:25:07 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2C07A2538E; Tue, 3 Nov 2015 05:25:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61C111B25; Tue, 3 Nov 2015 05:25:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA35P6re006724; Tue, 3 Nov 2015 05:25:06 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA35P6k2006721; Tue, 3 Nov 2015 05:25:06 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201511030525.tA35P6k2006721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 3 Nov 2015 05:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290322 - head/sys/contrib/vchiq/interface/vchiq_arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 05:25:07 -0000 Author: gonzo Date: Tue Nov 3 05:25:06 2015 New Revision: 290322 URL: https://svnweb.freebsd.org/changeset/base/290322 Log: Fix cache issues with bulk transfers - Use pmap_quick_enter_page/pmap_quick_remove_page to bounce non-cacheline aligned head and tail fragments - Switch from static fragment size to configurable one, newer firmware passes cache line size as cache_line_size DTB parameter. With these changes both RPi and RPi2 pass functinal part of vchiq_test Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_pagelist.h Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Tue Nov 3 04:50:58 2015 (r290321) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Tue Nov 3 05:25:06 2015 (r290322) @@ -65,6 +65,9 @@ MALLOC_DEFINE(M_VCPAGELIST, "vcpagelist" #define MAX_FRAGMENTS (VCHIQ_NUM_CURRENT_BULKS * 2) +int g_cache_line_size = 32; +static int g_fragment_size; + typedef struct vchiq_2835_state_struct { int inited; VCHIQ_ARM_STATE_T arm_state; @@ -77,8 +80,8 @@ vm_paddr_t g_slot_phys; bus_dma_tag_t bcm_slots_dma_tag; bus_dmamap_t bcm_slots_dma_map; -static FRAGMENTS_T *g_fragments_base; -static FRAGMENTS_T *g_free_fragments; +static char *g_fragments_base; +static char *g_free_fragments; struct semaphore g_free_fragments_sema; static DEFINE_SEMAPHORE(g_free_fragments_mutex); @@ -115,13 +118,13 @@ copyout_page(vm_page_t p, size_t offset, { uint8_t *dst; - dst = pmap_mapdev(VM_PAGE_TO_PHYS(p), PAGE_SIZE); + dst = (uint8_t*)pmap_quick_enter_page(p); if (!dst) return ENOMEM; memcpy(dst + offset, kaddr, size); - pmap_unmapdev((vm_offset_t)dst, PAGE_SIZE); + pmap_quick_remove_page((vm_offset_t)dst); return 0; } @@ -136,7 +139,8 @@ vchiq_platform_init(VCHIQ_STATE_T *state /* Allocate space for the channels in coherent memory */ g_slot_mem_size = PAGE_ALIGN(TOTAL_SLOTS * VCHIQ_SLOT_SIZE); - frag_mem_size = PAGE_ALIGN(sizeof(FRAGMENTS_T) * MAX_FRAGMENTS); + g_fragment_size = 2*g_cache_line_size; + frag_mem_size = PAGE_ALIGN(g_fragment_size * MAX_FRAGMENTS); err = bus_dma_tag_create( NULL, @@ -180,15 +184,15 @@ vchiq_platform_init(VCHIQ_STATE_T *state vchiq_slot_zero->platform_data[VCHIQ_PLATFORM_FRAGMENTS_COUNT_IDX] = MAX_FRAGMENTS; - g_fragments_base = (FRAGMENTS_T *)(g_slot_mem + g_slot_mem_size); + g_fragments_base = (char *)(g_slot_mem + g_slot_mem_size); g_slot_mem_size += frag_mem_size; g_free_fragments = g_fragments_base; for (i = 0; i < (MAX_FRAGMENTS - 1); i++) { - *(FRAGMENTS_T **)&g_fragments_base[i] = - &g_fragments_base[i + 1]; + *(char **)&g_fragments_base[i*g_fragment_size] = + &g_fragments_base[(i + 1)*g_fragment_size]; } - *(FRAGMENTS_T **)&g_fragments_base[i] = NULL; + *(char **)&g_fragments_base[i*g_fragment_size] = NULL; _sema_init(&g_free_fragments_sema, MAX_FRAGMENTS); if (vchiq_init_state(state, vchiq_slot_zero, 0/*slave*/) != @@ -452,7 +456,8 @@ create_pagelist(char __user *buf, size_t } vchiq_log_trace(vchiq_arm_log_level, - "create_pagelist - %x", (unsigned int)pagelist); + "create_pagelist - %x (%d bytes @%p)", (unsigned int)pagelist, count, buf); + if (!pagelist) return -ENOMEM; @@ -506,10 +511,10 @@ create_pagelist(char __user *buf, size_t /* Partial cache lines (fragments) require special measures */ if ((type == PAGELIST_READ) && - ((pagelist->offset & (CACHE_LINE_SIZE - 1)) || + ((pagelist->offset & (g_cache_line_size - 1)) || ((pagelist->offset + pagelist->length) & - (CACHE_LINE_SIZE - 1)))) { - FRAGMENTS_T *fragments; + (g_cache_line_size - 1)))) { + char *fragments; if (down_interruptible(&g_free_fragments_sema) != 0) { free(pagelist, M_VCPAGELIST); @@ -519,13 +524,13 @@ create_pagelist(char __user *buf, size_t WARN_ON(g_free_fragments == NULL); down(&g_free_fragments_mutex); - fragments = (FRAGMENTS_T *) g_free_fragments; + fragments = g_free_fragments; WARN_ON(fragments == NULL); - g_free_fragments = *(FRAGMENTS_T **) g_free_fragments; + g_free_fragments = *(char **) g_free_fragments; up(&g_free_fragments_mutex); pagelist->type = - PAGELIST_READ_WITH_FRAGMENTS + (fragments - - g_fragments_base); + PAGELIST_READ_WITH_FRAGMENTS + + (fragments - g_fragments_base)/g_fragment_size; } cpu_dcache_wbinv_range((vm_offset_t)buf, count); @@ -555,7 +560,7 @@ free_pagelist(BULKINFO_T *bi, int actual pagelist = bi->pagelist; vchiq_log_trace(vchiq_arm_log_level, - "free_pagelist - %x, %d", (unsigned int)pagelist, actual); + "free_pagelist - %x, %d (%lu bytes @%p)", (unsigned int)pagelist, actual, pagelist->length, bi->buf); num_pages = (pagelist->length + pagelist->offset + PAGE_SIZE - 1) / @@ -565,13 +570,13 @@ free_pagelist(BULKINFO_T *bi, int actual /* Deal with any partial cache lines (fragments) */ if (pagelist->type >= PAGELIST_READ_WITH_FRAGMENTS) { - FRAGMENTS_T *fragments = g_fragments_base + - (pagelist->type - PAGELIST_READ_WITH_FRAGMENTS); + char *fragments = g_fragments_base + + (pagelist->type - PAGELIST_READ_WITH_FRAGMENTS)*g_fragment_size; int head_bytes, tail_bytes; - head_bytes = (CACHE_LINE_SIZE - pagelist->offset) & - (CACHE_LINE_SIZE - 1); + head_bytes = (g_cache_line_size - pagelist->offset) & + (g_cache_line_size - 1); tail_bytes = (pagelist->offset + actual) & - (CACHE_LINE_SIZE - 1); + (g_cache_line_size - 1); if ((actual >= 0) && (head_bytes != 0)) { if (head_bytes > actual) @@ -579,7 +584,7 @@ free_pagelist(BULKINFO_T *bi, int actual copyout_page(pages[0], pagelist->offset, - fragments->headbuf, + fragments, head_bytes); } @@ -588,12 +593,12 @@ free_pagelist(BULKINFO_T *bi, int actual copyout_page(pages[num_pages-1], (((vm_offset_t)bi->buf + actual) % PAGE_SIZE) - tail_bytes, - fragments->tailbuf, + fragments + g_cache_line_size, tail_bytes); } down(&g_free_fragments_mutex); - *(FRAGMENTS_T **) fragments = g_free_fragments; + *(char **) fragments = g_free_fragments; g_free_fragments = fragments; up(&g_free_fragments_mutex); up(&g_free_fragments_sema); Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c Tue Nov 3 04:50:58 2015 (r290321) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c Tue Nov 3 05:25:06 2015 (r290322) @@ -88,6 +88,7 @@ void vchiq_exit(void); int vchiq_init(void); extern VCHIQ_STATE_T g_state; +extern int g_cache_line_size; static void bcm_vchiq_intr(void *arg) @@ -133,6 +134,8 @@ static int bcm_vchiq_attach(device_t dev) { struct bcm_vchiq_softc *sc = device_get_softc(dev); + phandle_t node; + pcell_t cell; int rid = 0; if (bcm_vchiq_sc != NULL) @@ -154,6 +157,10 @@ bcm_vchiq_attach(device_t dev) return (ENXIO); } + node = ofw_bus_get_node(dev); + if ((OF_getencprop(node, "cache-line-size", &cell, sizeof(cell))) > 0) + g_cache_line_size = cell; + vchiq_core_initialize(); /* Setup and enable the timer */ Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_pagelist.h ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_pagelist.h Tue Nov 3 04:50:58 2015 (r290321) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_pagelist.h Tue Nov 3 05:25:06 2015 (r290322) @@ -37,8 +37,6 @@ #ifndef PAGE_SIZE #define PAGE_SIZE 4096 #endif -#undef CACHE_LINE_SIZE -#define CACHE_LINE_SIZE 32 #define PAGELIST_WRITE 0 #define PAGELIST_READ 1 #define PAGELIST_READ_WITH_FRAGMENTS 2 @@ -51,9 +49,4 @@ typedef struct pagelist_struct { pages at consecutive addresses. */ } PAGELIST_T; -typedef struct fragments_struct { - char headbuf[CACHE_LINE_SIZE]; - char tailbuf[CACHE_LINE_SIZE]; -} FRAGMENTS_T; - #endif /* VCHIQ_PAGELIST_H */ From owner-svn-src-head@freebsd.org Tue Nov 3 07:45:24 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8CB5A24EFA; Tue, 3 Nov 2015 07:45:24 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::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 3CACE14B8; Tue, 3 Nov 2015 07:45:24 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by lfbf136 with SMTP id f136so8130082lfb.0; Mon, 02 Nov 2015 23:45:22 -0800 (PST) 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=5tH25XjvOUyj3CGuoiiMAODxEXxYDWHnLFx5g2RuzaQ=; b=sPCcS1OjMslqHIAKQMPYkkwrzPEFyYL66EFH9bU2EkUv8KVxCNwsBwowhwsAHtnoMG XRFhQqzaDNkHf8uVv+0S0U2y4waguIqKnBNomhlDxPotZz2sYN6c07kihhXLpYSnm81k L+56y/tUeh11NnL7W1OqdUHcobo52hX3G5PoAFr/g1CpGiiZ46Dxx200psK7MCG8Bchc tbqW8YX5n3zi1tNFyjVyF9Vn7t3WGM6dBLTm1NmYUSiSOtT7cle54PABNx4KzXGhGaYR gH353M9mCdIF08WfgLHh4o5JOQ3q85DsNmyEkvyJxRg5+SipLh27GQphyXy9wdrvNenC yNYg== MIME-Version: 1.0 X-Received: by 10.112.16.199 with SMTP id i7mr12293277lbd.105.1446536722391; Mon, 02 Nov 2015 23:45:22 -0800 (PST) Received: by 10.112.126.104 with HTTP; Mon, 2 Nov 2015 23:45:22 -0800 (PST) In-Reply-To: <1446394311.91534.236.camel@freebsd.org> References: <201510221638.t9MGc1cc053885@repo.freebsd.org> <56348FF8.3010602@gmail.com> <1446394311.91534.236.camel@freebsd.org> Date: Mon, 2 Nov 2015 23:45:22 -0800 Message-ID: Subject: Re: svn commit: r289759 - in head/sys/arm: arm include From: Jason Harmening To: Ian Lepore Cc: Ganbold Tsagaankhuu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 07:45:24 -0000 On Sun, Nov 1, 2015 at 8:11 AM, Ian Lepore wrote: > > It's almost certainly not related to sysinit ordering. This exception > is happening during mmc probing after interrupts are enabled. > > It appears that the problem is the faulting code is running on one of > the very early pre-allocated kernel stacks (perhaps in an interrupt > handler on an idle thread stack), and these stacks are not in memory > represented in the vm page arrays. The mmc code is using a 64-byte > buffer on the stack and mapping it for DMA. Normally that causes a > bounce for cacheline alignment, but unluckily in this case that buffer > on the stack just happened to be aligned to a cacheline boundary and a > multiple of the cacheline size, so no bounce. That causes the new sync > logic that is based on keeping vm_page_t pointers and offsets to get a > NULL pointer back from PHYS_TO_VM_PAGE when mapping, then it dies at > sync time trying to dereference that. It used to work because the sync > logic used to use the vaddr, not a page pointer. > > Michal was working on a patch yesterday. > > Ah, thanks for pointing that out Ian. I was left scratching my head (admittedly on the road and w/o easy access to the code) wondering what on earth would be trying to do DMA during SI_SUB_CPU. From owner-svn-src-head@freebsd.org Tue Nov 3 08:42:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0653DA25B60; Tue, 3 Nov 2015 08:42:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4B2E112E; Tue, 3 Nov 2015 08:42:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA38gh7b063265; Tue, 3 Nov 2015 08:42:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA38gh7W063264; Tue, 3 Nov 2015 08:42:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511030842.tA38gh7W063264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 3 Nov 2015 08:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290326 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 08:42:45 -0000 Author: hselasky Date: Tue Nov 3 08:42:43 2015 New Revision: 290326 URL: https://svnweb.freebsd.org/changeset/base/290326 Log: Relax the BUS_DMA_KEEP_PG_OFFSET requirement to allow optimising allocation of DMA bounce buffers. Discussed with: ian @ MFC after: 3 weeks Modified: head/sys/dev/usb/usb_busdma.c Modified: head/sys/dev/usb/usb_busdma.c ============================================================================== --- head/sys/dev/usb/usb_busdma.c Tue Nov 3 08:33:24 2015 (r290325) +++ head/sys/dev/usb/usb_busdma.c Tue Nov 3 08:42:43 2015 (r290326) @@ -443,9 +443,13 @@ usb_pc_common_mem_cb(void *arg, bus_dma_ pc->page_offset_buf = rem; pc->page_offset_end += rem; #ifdef USB_DEBUG - if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { + if (nseg > 1 && + ((segs->ds_addr + segs->ds_len) & (USB_PAGE_SIZE - 1)) != + ((segs + 1)->ds_addr & (USB_PAGE_SIZE - 1))) { /* - * This check verifies that the physical address is correct: + * This check verifies there is no page offset hole + * between the first and second segment. See the + * BUS_DMA_KEEP_PG_OFFSET flag. */ DPRINTFN(0, "Page offset was not preserved\n"); error = 1; From owner-svn-src-head@freebsd.org Tue Nov 3 08:52:07 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0732A25DB2; Tue, 3 Nov 2015 08:52:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79C13161A; Tue, 3 Nov 2015 08:52:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA38q639064212; Tue, 3 Nov 2015 08:52:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA38q6sa064210; Tue, 3 Nov 2015 08:52:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511030852.tA38q6sa064210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 3 Nov 2015 08:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290327 - in head/sys/dev/usb: . wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 08:52:07 -0000 Author: hselasky Date: Tue Nov 3 08:52:06 2015 New Revision: 290327 URL: https://svnweb.freebsd.org/changeset/base/290327 Log: Fix some clang compile warnings. MFC after: 1 week Modified: head/sys/dev/usb/usb_msctest.c head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Tue Nov 3 08:42:43 2015 (r290326) +++ head/sys/dev/usb/usb_msctest.c Tue Nov 3 08:52:06 2015 (r290327) @@ -549,7 +549,8 @@ bbb_command_start(struct bbb_transfer *s sc->cmd_len = cmd_len; memset(&sc->cbw->CBWCDB, 0, sizeof(sc->cbw->CBWCDB)); memcpy(&sc->cbw->CBWCDB, cmd_ptr, cmd_len); - DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, (char *)sc->cbw->CBWCDB, ":"); + DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, + (unsigned char *)sc->cbw->CBWCDB, ":"); mtx_lock(&sc->mtx); usbd_transfer_start(sc->xfer[sc->state]); @@ -580,7 +581,7 @@ bbb_raw_write(struct bbb_transfer *sc, c sc->error = 0; DPRINTFN(1, "BULK DATA = %*D\n", (int)data_len, - (const char *)data_ptr, ":"); + (const unsigned char *)data_ptr, ":"); mtx_lock(&sc->mtx); usbd_transfer_start(sc->xfer[0]); Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Tue Nov 3 08:42:43 2015 (r290326) +++ head/sys/dev/usb/wlan/if_zyd.c Tue Nov 3 08:52:06 2015 (r290327) @@ -703,14 +703,14 @@ zyd_intr_read_callback(struct usb_xfer * memcpy(rqp->odata, cmd->data, rqp->olen); DPRINTF(sc, ZYD_DEBUG_CMD, "command %p complete, data = %*D \n", - rqp, rqp->olen, (char *)rqp->odata, ":"); + rqp, rqp->olen, (unsigned char *)rqp->odata, ":"); wakeup(rqp); /* wakeup caller */ break; } if (rqp == NULL) { device_printf(sc->sc_dev, "unexpected IORD notification %*D\n", - datalen, cmd->data, ":"); + datalen, (unsigned char *)cmd->data, ":"); } break; } @@ -802,7 +802,7 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c cmd.code = htole16(code); memcpy(cmd.data, idata, ilen); DPRINTF(sc, ZYD_DEBUG_CMD, "sending cmd %p = %*D\n", - &rq, ilen, idata, ":"); + &rq, ilen, (unsigned char *)idata, ":"); rq.cmd = &cmd; rq.idata = idata; From owner-svn-src-head@freebsd.org Tue Nov 3 09:38:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FE10A1EAE8; Tue, 3 Nov 2015 09:38:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B6EB186D; Tue, 3 Nov 2015 09:38:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA39ceQ9077653; Tue, 3 Nov 2015 09:38:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA39cent077651; Tue, 3 Nov 2015 09:38:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511030938.tA39cent077651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 3 Nov 2015 09:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290328 - in head/sys/dev/usb: . wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 09:38:41 -0000 Author: hselasky Date: Tue Nov 3 09:38:39 2015 New Revision: 290328 URL: https://svnweb.freebsd.org/changeset/base/290328 Log: Revert r290327. The compiler warnings seems to be specific to clang v3.5 only. Modified: head/sys/dev/usb/usb_msctest.c head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Tue Nov 3 08:52:06 2015 (r290327) +++ head/sys/dev/usb/usb_msctest.c Tue Nov 3 09:38:39 2015 (r290328) @@ -549,8 +549,7 @@ bbb_command_start(struct bbb_transfer *s sc->cmd_len = cmd_len; memset(&sc->cbw->CBWCDB, 0, sizeof(sc->cbw->CBWCDB)); memcpy(&sc->cbw->CBWCDB, cmd_ptr, cmd_len); - DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, - (unsigned char *)sc->cbw->CBWCDB, ":"); + DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, (char *)sc->cbw->CBWCDB, ":"); mtx_lock(&sc->mtx); usbd_transfer_start(sc->xfer[sc->state]); @@ -581,7 +580,7 @@ bbb_raw_write(struct bbb_transfer *sc, c sc->error = 0; DPRINTFN(1, "BULK DATA = %*D\n", (int)data_len, - (const unsigned char *)data_ptr, ":"); + (const char *)data_ptr, ":"); mtx_lock(&sc->mtx); usbd_transfer_start(sc->xfer[0]); Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Tue Nov 3 08:52:06 2015 (r290327) +++ head/sys/dev/usb/wlan/if_zyd.c Tue Nov 3 09:38:39 2015 (r290328) @@ -703,14 +703,14 @@ zyd_intr_read_callback(struct usb_xfer * memcpy(rqp->odata, cmd->data, rqp->olen); DPRINTF(sc, ZYD_DEBUG_CMD, "command %p complete, data = %*D \n", - rqp, rqp->olen, (unsigned char *)rqp->odata, ":"); + rqp, rqp->olen, (char *)rqp->odata, ":"); wakeup(rqp); /* wakeup caller */ break; } if (rqp == NULL) { device_printf(sc->sc_dev, "unexpected IORD notification %*D\n", - datalen, (unsigned char *)cmd->data, ":"); + datalen, cmd->data, ":"); } break; } @@ -802,7 +802,7 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c cmd.code = htole16(code); memcpy(cmd.data, idata, ilen); DPRINTF(sc, ZYD_DEBUG_CMD, "sending cmd %p = %*D\n", - &rq, ilen, (unsigned char *)idata, ":"); + &rq, ilen, idata, ":"); rq.cmd = &cmd; rq.idata = idata; From owner-svn-src-head@freebsd.org Tue Nov 3 09:49:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24092A1EF87; Tue, 3 Nov 2015 09:49:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCE011FC6; Tue, 3 Nov 2015 09:49:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id CED091FE023; Tue, 3 Nov 2015 10:48:59 +0100 (CET) Subject: Re: svn commit: r290328 - in head/sys/dev/usb: . wlan To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511030938.tA39cent077651@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <56388376.7080903@selasky.org> Date: Tue, 3 Nov 2015 10:50:46 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201511030938.tA39cent077651@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 09:49:03 -0000 On 11/03/15 10:38, Hans Petter Selasky wrote: > Author: hselasky > Date: Tue Nov 3 09:38:39 2015 > New Revision: 290328 > URL: https://svnweb.freebsd.org/changeset/base/290328 > > Log: > Revert r290327. The compiler warnings seems to be specific to clang v3.5 only. > > > Modified: head/sys/dev/usb/wlan/if_zyd.c > ============================================================================== > --- head/sys/dev/usb/wlan/if_zyd.c Tue Nov 3 08:52:06 2015 (r290327) > +++ head/sys/dev/usb/wlan/if_zyd.c Tue Nov 3 09:38:39 2015 (r290328) > @@ -703,14 +703,14 @@ zyd_intr_read_callback(struct usb_xfer * > memcpy(rqp->odata, cmd->data, rqp->olen); > DPRINTF(sc, ZYD_DEBUG_CMD, > "command %p complete, data = %*D \n", > - rqp, rqp->olen, (unsigned char *)rqp->odata, ":"); > + rqp, rqp->olen, (char *)rqp->odata, ":"); Hi, There seems to be a difference in the clang compiler in ports and the one in base with regard to how it handles %*D and %6D. Adding WITHOUT_FORMAT_EXTENSIONS=YES to make resolves this compile error when using clang from ports however ... --HPS From owner-svn-src-head@freebsd.org Tue Nov 3 09:50:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A32CA23054; Tue, 3 Nov 2015 09:50:12 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A75E11A4; Tue, 3 Nov 2015 09:50:12 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA39oBQK080759; Tue, 3 Nov 2015 09:50:11 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA39oBwH080758; Tue, 3 Nov 2015 09:50:11 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201511030950.tA39oBwH080758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Tue, 3 Nov 2015 09:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290329 - head/usr.bin/bsdiff/bsdiff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 09:50:12 -0000 Author: ache Date: Tue Nov 3 09:50:10 2015 New Revision: 290329 URL: https://svnweb.freebsd.org/changeset/base/290329 Log: Use meaningful errno for ssize_t overflow in read(). Catch size_t overflow in malloc(). PR: 204230 MFC after: 1 week Modified: head/usr.bin/bsdiff/bsdiff/bsdiff.c Modified: head/usr.bin/bsdiff/bsdiff/bsdiff.c ============================================================================== --- head/usr.bin/bsdiff/bsdiff/bsdiff.c Tue Nov 3 09:38:39 2015 (r290328) +++ head/usr.bin/bsdiff/bsdiff/bsdiff.c Tue Nov 3 09:50:10 2015 (r290329) @@ -31,7 +31,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include +#include #include #include #include @@ -230,8 +233,16 @@ int main(int argc,char *argv[]) /* Allocate oldsize+1 bytes instead of oldsize bytes to ensure that we never try to malloc(0) and get a NULL pointer */ if(((fd=open(argv[1],O_RDONLY|O_BINARY,0))<0) || - ((oldsize=lseek(fd,0,SEEK_END))==-1) || - ((old=malloc(oldsize+1))==NULL) || + ((oldsize=lseek(fd,0,SEEK_END))==-1)) + err(1, "%s", argv[1]); + + if (oldsize > SSIZE_MAX || + (uintmax_t)oldsize >= SIZE_T_MAX / sizeof(off_t)) { + errno = EFBIG; + err(1, "%s", argv[1]); + } + + if (((old=malloc(oldsize+1))==NULL) || (lseek(fd,0,SEEK_SET)!=0) || (read(fd,old,oldsize)!=oldsize) || (close(fd)==-1)) err(1,"%s",argv[1]); @@ -246,8 +257,15 @@ int main(int argc,char *argv[]) /* Allocate newsize+1 bytes instead of newsize bytes to ensure that we never try to malloc(0) and get a NULL pointer */ if(((fd=open(argv[2],O_RDONLY|O_BINARY,0))<0) || - ((newsize=lseek(fd,0,SEEK_END))==-1) || - ((new=malloc(newsize+1))==NULL) || + ((newsize=lseek(fd,0,SEEK_END))==-1)) + err(1, "%s", argv[2]); + + if (newsize > SSIZE_MAX || (uintmax_t)newsize >= SIZE_T_MAX) { + errno = EFBIG; + err(1, "%s", argv[2]); + } + + if (((new=malloc(newsize+1))==NULL) || (lseek(fd,0,SEEK_SET)!=0) || (read(fd,new,newsize)!=newsize) || (close(fd)==-1)) err(1,"%s",argv[2]); From owner-svn-src-head@freebsd.org Tue Nov 3 10:21:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 729F9A23A78; Tue, 3 Nov 2015 10:21:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4989A12E3; Tue, 3 Nov 2015 10:21:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA3ALsg6092030; Tue, 3 Nov 2015 10:21:54 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA3ALrYK092025; Tue, 3 Nov 2015 10:21:53 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201511031021.tA3ALrYK092025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 3 Nov 2015 10:21:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290330 - in head: sbin/ipfw sys/netinet sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 10:21:55 -0000 Author: ae Date: Tue Nov 3 10:21:53 2015 New Revision: 290330 URL: https://svnweb.freebsd.org/changeset/base/290330 Log: Implement `ipfw internal olist` command to list named objects. Reviewed by: melifaro Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sys/netinet/ip_fw.h head/sys/netpfil/ipfw/ip_fw_private.h head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Tue Nov 3 09:50:10 2015 (r290329) +++ head/sbin/ipfw/ipfw2.c Tue Nov 3 10:21:53 2015 (r290330) @@ -4983,10 +4983,48 @@ ipfw_flush(int force) static struct _s_x intcmds[] = { { "talist", TOK_TALIST }, { "iflist", TOK_IFLIST }, + { "olist", TOK_OLIST }, { "vlist", TOK_VLIST }, { NULL, 0 } }; +static void +ipfw_list_objects(int ac, char *av[]) +{ + ipfw_obj_lheader req, *olh; + ipfw_obj_ntlv *ntlv; + size_t sz; + int i; + + memset(&req, 0, sizeof(req)); + sz = sizeof(req); + if (do_get3(IP_FW_DUMP_SRVOBJECTS, &req.opheader, &sz) != 0) + if (errno != ENOMEM) + return; + + sz = req.size; + if ((olh = calloc(1, sz)) == NULL) + return; + + olh->size = sz; + if (do_get3(IP_FW_DUMP_SRVOBJECTS, &olh->opheader, &sz) != 0) { + free(olh); + return; + } + + if (olh->count > 0) + printf("Objects list:\n"); + else + printf("There are no objects\n"); + ntlv = (ipfw_obj_ntlv *)(olh + 1); + for (i = 0; i < olh->count; i++) { + printf(" kidx: %4d\ttype: %2d\tname: %s\n", ntlv->idx, + ntlv->head.type, ntlv->name); + ntlv++; + } + free(olh); +} + void ipfw_internal_handler(int ac, char *av[]) { @@ -5005,6 +5043,9 @@ ipfw_internal_handler(int ac, char *av[] case TOK_TALIST: ipfw_list_ta(ac, av); break; + case TOK_OLIST: + ipfw_list_objects(ac, av); + break; case TOK_VLIST: ipfw_list_values(ac, av); break; Modified: head/sbin/ipfw/ipfw2.h ============================================================================== --- head/sbin/ipfw/ipfw2.h Tue Nov 3 09:50:10 2015 (r290329) +++ head/sbin/ipfw/ipfw2.h Tue Nov 3 10:21:53 2015 (r290330) @@ -227,6 +227,7 @@ enum tokens { TOK_LOCK, TOK_UNLOCK, TOK_VLIST, + TOK_OLIST, }; /* Modified: head/sys/netinet/ip_fw.h ============================================================================== --- head/sys/netinet/ip_fw.h Tue Nov 3 09:50:10 2015 (r290329) +++ head/sys/netinet/ip_fw.h Tue Nov 3 10:21:53 2015 (r290330) @@ -107,6 +107,7 @@ typedef struct _ip_fw3_opheader { #define IP_FW_NAT44_XGETLOG 115 /* Get log from NAT44 instance */ #define IP_FW_DUMP_SOPTCODES 116 /* Dump available sopts/versions */ +#define IP_FW_DUMP_SRVOBJECTS 117 /* Dump existing named objects */ /* * The kernel representation of ipfw rules is made of a list of Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Tue Nov 3 09:50:10 2015 (r290329) +++ head/sys/netpfil/ipfw/ip_fw_private.h Tue Nov 3 10:21:53 2015 (r290330) @@ -673,6 +673,7 @@ int ipfw_objhash_free_idx(struct namedob int ipfw_objhash_alloc_idx(void *n, uint16_t *pidx); void ipfw_objhash_set_funcs(struct namedobj_instance *ni, objhash_hash_f *hash_f, objhash_cmp_f *cmp_f); +void ipfw_export_obj_ntlv(struct named_object *no, ipfw_obj_ntlv *ntlv); void ipfw_init_obj_rewriter(void); void ipfw_destroy_obj_rewriter(void); void ipfw_add_obj_rewriter(struct opcode_obj_rewrite *rw, size_t count); Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Nov 3 09:50:10 2015 (r290329) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Nov 3 10:21:53 2015 (r290330) @@ -119,6 +119,8 @@ static int manage_sets(struct ip_fw_chai struct sockopt_data *sd); static int dump_soptcodes(struct ip_fw_chain *chain, ip_fw3_opheader *op3, struct sockopt_data *sd); +static int dump_srvobjects(struct ip_fw_chain *chain, ip_fw3_opheader *op3, + struct sockopt_data *sd); /* ctl3 handler data */ struct mtx ctl3_lock; @@ -146,6 +148,7 @@ static struct ipfw_sopt_handler scodes[] { IP_FW_SET_MOVE, 0, HDIR_SET, manage_sets }, { IP_FW_SET_ENABLE, 0, HDIR_SET, manage_sets }, { IP_FW_DUMP_SOPTCODES, 0, HDIR_GET, dump_soptcodes }, + { IP_FW_DUMP_SRVOBJECTS,0, HDIR_GET, dump_srvobjects }, }; static int @@ -1876,6 +1879,16 @@ struct dump_args { int rcounters; /* counters */ }; +void +ipfw_export_obj_ntlv(struct named_object *no, ipfw_obj_ntlv *ntlv) +{ + + ntlv->head.type = no->etlv; + ntlv->head.length = sizeof(*ntlv); + ntlv->idx = no->kidx; + strlcpy(ntlv->name, no->name, sizeof(ntlv->name)); +} + /* * Export named object info in instance @ni, identified by @kidx * to ipfw_obj_ntlv. TLV is allocated from @sd space. @@ -1896,11 +1909,7 @@ export_objhash_ntlv(struct namedobj_inst if (ntlv == NULL) return (ENOMEM); - ntlv->head.type = no->etlv; - ntlv->head.length = sizeof(*ntlv); - ntlv->idx = no->kidx; - strlcpy(ntlv->name, no->name, sizeof(ntlv->name)); - + ipfw_export_obj_ntlv(no, ntlv); return (0); } @@ -2803,6 +2812,54 @@ ipfw_del_obj_rewriter(struct opcode_obj_ return (0); } +static void +export_objhash_ntlv_internal(struct namedobj_instance *ni, + struct named_object *no, void *arg) +{ + struct sockopt_data *sd; + ipfw_obj_ntlv *ntlv; + + sd = (struct sockopt_data *)arg; + ntlv = (ipfw_obj_ntlv *)ipfw_get_sopt_space(sd, sizeof(*ntlv)); + if (ntlv == NULL) + return; + ipfw_export_obj_ntlv(no, ntlv); +} + +/* + * Lists all service objects. + * Data layout (v0)(current): + * Request: [ ipfw_obj_lheader ] size = ipfw_cfg_lheader.size + * Reply: [ ipfw_obj_lheader [ ipfw_obj_ntlv x N ] (optional) ] + * Returns 0 on success + */ +static int +dump_srvobjects(struct ip_fw_chain *chain, ip_fw3_opheader *op3, + struct sockopt_data *sd) +{ + ipfw_obj_lheader *hdr; + int count; + + hdr = (ipfw_obj_lheader *)ipfw_get_sopt_header(sd, sizeof(*hdr)); + if (hdr == NULL) + return (EINVAL); + + IPFW_UH_RLOCK(chain); + count = ipfw_objhash_count(CHAIN_TO_SRV(chain)); + hdr->size = sizeof(ipfw_obj_lheader) + count * sizeof(ipfw_obj_ntlv); + if (sd->valsize < hdr->size) { + IPFW_UH_RUNLOCK(chain); + return (ENOMEM); + } + hdr->count = count; + hdr->objsize = sizeof(ipfw_obj_ntlv); + if (count > 0) + ipfw_objhash_foreach(CHAIN_TO_SRV(chain), + export_objhash_ntlv_internal, sd); + IPFW_UH_RUNLOCK(chain); + return (0); +} + /* * Compares two sopt handlers (code, version and handler ptr). * Used both as qsort() and bsearch(). From owner-svn-src-head@freebsd.org Tue Nov 3 10:29:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B87BA23C4C; Tue, 3 Nov 2015 10:29:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D7B918CD; Tue, 3 Nov 2015 10:29:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA3ATl0Z092400; Tue, 3 Nov 2015 10:29:47 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA3ATkuD092396; Tue, 3 Nov 2015 10:29:46 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201511031029.tA3ATkuD092396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 3 Nov 2015 10:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290332 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 10:29:48 -0000 Author: ae Date: Tue Nov 3 10:29:46 2015 New Revision: 290332 URL: https://svnweb.freebsd.org/changeset/base/290332 Log: Add ipfw_check_object_name_generic() function to do basic checks for an object name correctness. Each type of object can do more strict checking in own implementation. Do such checks for tables in check_table_name(). Reviewed by: melifaro Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/ip_fw_private.h head/sys/netpfil/ipfw/ip_fw_sockopt.c head/sys/netpfil/ipfw/ip_fw_table.c head/sys/netpfil/ipfw/ip_fw_table.h Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Tue Nov 3 10:24:54 2015 (r290331) +++ head/sys/netpfil/ipfw/ip_fw_private.h Tue Nov 3 10:29:46 2015 (r290332) @@ -693,6 +693,7 @@ void update_opcode_kidx(ipfw_insn *cmd, int classify_opcode_kidx(ipfw_insn *cmd, uint16_t *puidx); void ipfw_init_srv(struct ip_fw_chain *ch); void ipfw_destroy_srv(struct ip_fw_chain *ch); +int ipfw_check_object_name_generic(const char *name); /* In ip_fw_table.c */ struct table_info; Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Nov 3 10:24:54 2015 (r290331) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Nov 3 10:29:46 2015 (r290332) @@ -2156,19 +2156,16 @@ cleanup: return (error); } -static int -check_object_name(ipfw_obj_ntlv *ntlv) +int +ipfw_check_object_name_generic(const char *name) { - int error; - - switch (ntlv->head.type) { - case IPFW_TLV_TBL_NAME: - error = ipfw_check_table_name(ntlv->name); - break; - default: - error = ENOTSUP; - } + int nsize; + nsize = sizeof(((ipfw_obj_ntlv *)0)->name); + if (strnlen(name, nsize) == nsize) + return (EINVAL); + if (name[0] == '\0') + return (EINVAL); return (0); } @@ -2483,7 +2480,7 @@ add_rules(struct ip_fw_chain *chain, ip_ if (ntlv->head.length != sizeof(ipfw_obj_ntlv)) return (EINVAL); - error = check_object_name(ntlv); + error = ipfw_check_object_name_generic(ntlv->name); if (error != 0) return (error); Modified: head/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table.c Tue Nov 3 10:24:54 2015 (r290331) +++ head/sys/netpfil/ipfw/ip_fw_table.c Tue Nov 3 10:29:46 2015 (r290332) @@ -115,6 +115,7 @@ static int dump_table_xentry(void *e, vo static int swap_tables(struct ip_fw_chain *ch, struct tid_info *a, struct tid_info *b); +static int check_table_name(const char *name); static int check_table_space(struct ip_fw_chain *ch, struct tableop_state *ts, struct table_config *tc, struct table_info *ti, uint32_t count); static int destroy_table(struct ip_fw_chain *ch, struct tid_info *ti); @@ -1794,7 +1795,7 @@ modify_table(struct ip_fw_chain *ch, ip_ * Check for null-terminated/zero-length strings/ */ tname = oh->ntlv.name; - if (ipfw_check_table_name(tname) != 0) + if (check_table_name(tname) != 0) return (EINVAL); objheader_to_ti(oh, &ti); @@ -1851,7 +1852,7 @@ create_table(struct ip_fw_chain *ch, ip_ */ tname = oh->ntlv.name; aname = i->algoname; - if (ipfw_check_table_name(tname) != 0 || + if (check_table_name(tname) != 0 || strnlen(aname, sizeof(i->algoname)) == sizeof(i->algoname)) return (EINVAL); @@ -2915,25 +2916,14 @@ static struct opcode_obj_rewrite opcodes * * Returns 0 if name is considered valid. */ -int -ipfw_check_table_name(char *name) +static int +check_table_name(const char *name) { - int nsize; - ipfw_obj_ntlv *ntlv = NULL; - - nsize = sizeof(ntlv->name); - - if (strnlen(name, nsize) == nsize) - return (EINVAL); - - if (name[0] == '\0') - return (EINVAL); /* * TODO: do some more complicated checks */ - - return (0); + return (ipfw_check_object_name_generic(name)); } /* @@ -2965,7 +2955,7 @@ find_name_tlv(void *tlvs, int len, uint1 if (ntlv->idx != uidx) continue; - if (ipfw_check_table_name(ntlv->name) != 0) + if (check_table_name(ntlv->name) != 0) return (NULL); return (ntlv); Modified: head/sys/netpfil/ipfw/ip_fw_table.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table.h Tue Nov 3 10:24:54 2015 (r290331) +++ head/sys/netpfil/ipfw/ip_fw_table.h Tue Nov 3 10:29:46 2015 (r290332) @@ -187,7 +187,6 @@ void ipfw_unref_rule_tables(struct ip_fw struct namedobj_instance *ipfw_get_table_objhash(struct ip_fw_chain *ch); /* utility functions */ -int ipfw_check_table_name(char *name); int ipfw_move_tables_sets(struct ip_fw_chain *ch, ipfw_range_tlv *rt, uint32_t new_set); void ipfw_swap_tables_sets(struct ip_fw_chain *ch, uint32_t old_set, From owner-svn-src-head@freebsd.org Tue Nov 3 10:34:27 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B72A6A23FC5; Tue, 3 Nov 2015 10:34:27 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68A1F1FC0; Tue, 3 Nov 2015 10:34:27 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA3AYQek095201; Tue, 3 Nov 2015 10:34:26 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA3AYQeE095199; Tue, 3 Nov 2015 10:34:26 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201511031034.tA3AYQeE095199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 3 Nov 2015 10:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290334 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 10:34:27 -0000 Author: ae Date: Tue Nov 3 10:34:26 2015 New Revision: 290334 URL: https://svnweb.freebsd.org/changeset/base/290334 Log: Eliminate any conditional increments of object_opcodes in the check_ipfw_rule_body() function. This function is intended to just determine that rule has some opcodes that can be rewrited. Then the ref_rule_objects() function will determine real number of rewritten opcodes using classify callback. Reviewed by: melifaro Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c head/sys/netpfil/ipfw/ip_fw_table.c Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Nov 3 10:32:27 2015 (r290333) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Nov 3 10:34:26 2015 (r290334) @@ -1605,10 +1605,9 @@ check_ipfw_rule_body(ipfw_insn *cmd, int case O_RECV: case O_XMIT: case O_VIA: - if (((ipfw_insn_if *)cmd)->name[0] == '\1') - ci->object_opcodes++; if (cmdlen != F_INSN_SIZE(ipfw_insn_if)) goto bad_size; + ci->object_opcodes++; break; case O_ALTQ: Modified: head/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table.c Tue Nov 3 10:32:27 2015 (r290333) +++ head/sys/netpfil/ipfw/ip_fw_table.c Tue Nov 3 10:34:26 2015 (r290334) @@ -3400,6 +3400,9 @@ ref_rule_objects(struct ip_fw_chain *ch, if (numnew != 0) error = create_objects_compat(ch, rule->cmd, oib, pidx, ti); + /* Calculate real number of dynamic objects */ + ci->object_opcodes = (uint16_t)(pidx - oib); + return (error); } @@ -3431,7 +3434,6 @@ ipfw_rewrite_rule_uidx(struct ip_fw_chai pidx_first = malloc(ci->object_opcodes * sizeof(struct obj_idx), M_IPFW, M_WAITOK | M_ZERO); - pidx_last = pidx_first + ci->object_opcodes; error = 0; type = 0; memset(&ti, 0, sizeof(ti)); @@ -3450,9 +3452,14 @@ ipfw_rewrite_rule_uidx(struct ip_fw_chai error = ref_rule_objects(chain, ci->krule, ci, pidx_first, &ti); if (error != 0) goto free; + /* + * Note that ref_rule_objects() might have updated ci->object_opcodes + * to reflect actual number of object opcodes. + */ /* Perform rule rewrite */ p = pidx_first; + pidx_last = pidx_first + ci->object_opcodes; for (p = pidx_first; p < pidx_last; p++) { cmd = ci->krule->cmd + p->off; update_opcode_kidx(cmd, p->kidx); From owner-svn-src-head@freebsd.org Tue Nov 3 12:37:59 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AE7AA236BF; Tue, 3 Nov 2015 12:37:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42B301CCD; Tue, 3 Nov 2015 12:37:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA3Cbwdj029782; Tue, 3 Nov 2015 12:37:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA3CbtCa029757; Tue, 3 Nov 2015 12:37:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511031237.tA3CbtCa029757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 3 Nov 2015 12:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290335 - in head/sys/compat/linuxkpi/common/include: asm linux net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 12:37:59 -0000 Author: hselasky Date: Tue Nov 3 12:37:55 2015 New Revision: 290335 URL: https://svnweb.freebsd.org/changeset/base/290335 Log: Make all the LinuxKPI include files compile standalone. Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/asm/byteorder.h head/sys/compat/linuxkpi/common/include/asm/types.h head/sys/compat/linuxkpi/common/include/linux/bitops.h head/sys/compat/linuxkpi/common/include/linux/cdev.h head/sys/compat/linuxkpi/common/include/linux/clocksource.h head/sys/compat/linuxkpi/common/include/linux/device.h head/sys/compat/linuxkpi/common/include/linux/idr.h head/sys/compat/linuxkpi/common/include/linux/if_arp.h head/sys/compat/linuxkpi/common/include/linux/if_vlan.h head/sys/compat/linuxkpi/common/include/linux/interrupt.h head/sys/compat/linuxkpi/common/include/linux/io.h head/sys/compat/linuxkpi/common/include/linux/jhash.h head/sys/compat/linuxkpi/common/include/linux/kobject.h head/sys/compat/linuxkpi/common/include/linux/kref.h head/sys/compat/linuxkpi/common/include/linux/module.h head/sys/compat/linuxkpi/common/include/linux/net.h head/sys/compat/linuxkpi/common/include/linux/notifier.h head/sys/compat/linuxkpi/common/include/linux/poll.h head/sys/compat/linuxkpi/common/include/linux/radix-tree.h head/sys/compat/linuxkpi/common/include/linux/rwlock.h head/sys/compat/linuxkpi/common/include/linux/sysfs.h head/sys/compat/linuxkpi/common/include/linux/usb.h head/sys/compat/linuxkpi/common/include/net/if_inet6.h head/sys/compat/linuxkpi/common/include/net/ipv6.h head/sys/compat/linuxkpi/common/include/net/netevent.h Modified: head/sys/compat/linuxkpi/common/include/asm/byteorder.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/byteorder.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/asm/byteorder.h Tue Nov 3 12:37:55 2015 (r290335) @@ -86,7 +86,7 @@ #define swab64 bswap64 static inline void -be16_add_cpu(u16 *var, u16 val) +be16_add_cpu(uint16_t *var, uint16_t val) { *var = cpu_to_be16(be16_to_cpu(*var) + val); } Modified: head/sys/compat/linuxkpi/common/include/asm/types.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/types.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/asm/types.h Tue Nov 3 12:37:55 2015 (r290335) @@ -33,6 +33,8 @@ #ifdef _KERNEL +#include + typedef uint8_t u8; typedef uint8_t __u8; typedef uint16_t u16; Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Nov 3 12:37:55 2015 (r290335) @@ -33,6 +33,7 @@ #include #include +#include #define BIT(nr) (1UL << (nr)) #ifdef __LP64__ Modified: head/sys/compat/linuxkpi/common/include/linux/cdev.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/cdev.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/cdev.h Tue Nov 3 12:37:55 2015 (r290335) @@ -32,6 +32,7 @@ #define _LINUX_CDEV_H_ #include +#include #include #include Modified: head/sys/compat/linuxkpi/common/include/linux/clocksource.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/clocksource.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/clocksource.h Tue Nov 3 12:37:55 2015 (r290335) @@ -31,6 +31,8 @@ #ifndef _LINUX_CLOCKSOURCE_H #define _LINUX_CLOCKSOURCE_H +#include + /* clocksource cycle base type */ typedef u64 cycle_t; Modified: head/sys/compat/linuxkpi/common/include/linux/device.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/device.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/device.h Tue Nov 3 12:37:55 2015 (r290335) @@ -33,6 +33,7 @@ #include #include +#include #include #include #include Modified: head/sys/compat/linuxkpi/common/include/linux/idr.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/idr.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/idr.h Tue Nov 3 12:37:55 2015 (r290335) @@ -31,7 +31,11 @@ #ifndef _LINUX_IDR_H_ #define _LINUX_IDR_H_ -#include +#include +#include +#include + +#include #define IDR_BITS 5 #define IDR_SIZE (1 << IDR_BITS) Modified: head/sys/compat/linuxkpi/common/include/linux/if_arp.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/if_arp.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/if_arp.h Tue Nov 3 12:37:55 2015 (r290335) @@ -30,6 +30,8 @@ */ #ifndef _LINUX_IF_ARP_H_ #define _LINUX_IF_ARP_H_ +#include +#include #include #include #endif /* _LINUX_IF_ARP_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/if_vlan.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/if_vlan.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/if_vlan.h Tue Nov 3 12:37:55 2015 (r290335) @@ -31,6 +31,7 @@ #ifndef _LINUX_IF_VLAN_H_ #define _LINUX_IF_VLAN_H_ +#include #include #include #include Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/interrupt.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/interrupt.h Tue Nov 3 12:37:55 2015 (r290335) @@ -61,7 +61,7 @@ _irq_rid(struct device *dev, int irq) return irq - dev->msix + 1; } -static void +static inline void _irq_handler(void *ent) { struct irq_ent *irqe; Modified: head/sys/compat/linuxkpi/common/include/linux/io.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/io.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/io.h Tue Nov 3 12:37:55 2015 (r290335) @@ -33,6 +33,7 @@ #include #include +#include static inline uint32_t __raw_readl(const volatile void *addr) Modified: head/sys/compat/linuxkpi/common/include/linux/jhash.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/jhash.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/jhash.h Tue Nov 3 12:37:55 2015 (r290335) @@ -1,6 +1,8 @@ #ifndef _LINUX_JHASH_H_ #define _LINUX_JHASH_H_ +#include + /* jhash.h: Jenkins hash support. * * Copyright (C) 1996 Bob Jenkins (bob_jenkins@burtleburtle.net) Modified: head/sys/compat/linuxkpi/common/include/linux/kobject.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kobject.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/kobject.h Tue Nov 3 12:37:55 2015 (r290335) @@ -59,6 +59,20 @@ struct kobject { extern struct kobject *mm_kobj; +struct attribute { + const char *name; + struct module *owner; + mode_t mode; +}; + +struct kobj_attribute { + struct attribute attr; + ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, + char *buf); + ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, + const char *buf, size_t count); +}; + static inline void kobject_init(struct kobject *kobj, struct kobj_type *ktype) { @@ -155,17 +169,4 @@ int kobject_set_name(struct kobject *kob int kobject_init_and_add(struct kobject *kobj, struct kobj_type *ktype, struct kobject *parent, const char *fmt, ...); -/* sysfs.h calles for 'kobject' which is defined here, - * so we need to add the include only after the 'kobject' def. - */ -#include - -struct kobj_attribute { - struct attribute attr; - ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, - char *buf); - ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, - const char *buf, size_t count); -}; - #endif /* _LINUX_KOBJECT_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/kref.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kref.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/kref.h Tue Nov 3 12:37:55 2015 (r290335) @@ -35,6 +35,7 @@ #include #include +#include #include struct kref { Modified: head/sys/compat/linuxkpi/common/include/linux/module.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/module.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/module.h Tue Nov 3 12:37:55 2015 (r290335) @@ -38,6 +38,7 @@ #include #include #include +#include #include #include Modified: head/sys/compat/linuxkpi/common/include/linux/net.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/net.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/net.h Tue Nov 3 12:37:55 2015 (r290335) @@ -31,9 +31,13 @@ #ifndef _LINUX_NET_H_ #define _LINUX_NET_H_ +#include +#include +#include #include #include #include +#include static inline int sock_create_kern(int family, int type, int proto, struct socket **res) Modified: head/sys/compat/linuxkpi/common/include/linux/notifier.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/notifier.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/notifier.h Tue Nov 3 12:37:55 2015 (r290335) @@ -31,6 +31,7 @@ #ifndef _LINUX_NOTIFIER_H_ #define _LINUX_NOTIFIER_H_ +#include #include /* Modified: head/sys/compat/linuxkpi/common/include/linux/poll.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/poll.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/poll.h Tue Nov 3 12:37:55 2015 (r290335) @@ -34,11 +34,14 @@ #include #include +#include +#include + typedef struct poll_table_struct { } poll_table; static inline void -poll_wait(struct file *filp, wait_queue_head_t *wait_address, poll_table *p) +poll_wait(struct linux_file *filp, wait_queue_head_t *wait_address, poll_table *p) { selrecord(curthread, &filp->f_selinfo); } Modified: head/sys/compat/linuxkpi/common/include/linux/radix-tree.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/radix-tree.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/radix-tree.h Tue Nov 3 12:37:55 2015 (r290335) @@ -31,6 +31,8 @@ #ifndef _LINUX_RADIX_TREE_H_ #define _LINUX_RADIX_TREE_H_ +#include + #define RADIX_TREE_MAP_SHIFT 6 #define RADIX_TREE_MAP_SIZE (1 << RADIX_TREE_MAP_SHIFT) #define RADIX_TREE_MAP_MASK (RADIX_TREE_MAP_SIZE - 1) Modified: head/sys/compat/linuxkpi/common/include/linux/rwlock.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/rwlock.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/rwlock.h Tue Nov 3 12:37:55 2015 (r290335) @@ -31,6 +31,7 @@ #ifndef _LINUX_RWLOCK_H_ #define _LINUX_RWLOCK_H_ +#include #include #include Modified: head/sys/compat/linuxkpi/common/include/linux/sysfs.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sysfs.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/sysfs.h Tue Nov 3 12:37:55 2015 (r290335) @@ -31,13 +31,11 @@ #ifndef _LINUX_SYSFS_H_ #define _LINUX_SYSFS_H_ +#include #include +#include -struct attribute { - const char *name; - struct module *owner; - mode_t mode; -}; +#include struct sysfs_ops { ssize_t (*show)(struct kobject *, struct attribute *, char *); Modified: head/sys/compat/linuxkpi/common/include/linux/usb.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/usb.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/linux/usb.h Tue Nov 3 12:37:55 2015 (r290335) @@ -28,6 +28,15 @@ #ifndef _USB_COMPAT_LINUX_H #define _USB_COMPAT_LINUX_H +#include +#include +#include +#include + +#include +#include +#include + struct usb_device; struct usb_interface; struct usb_driver; Modified: head/sys/compat/linuxkpi/common/include/net/if_inet6.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/net/if_inet6.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/net/if_inet6.h Tue Nov 3 12:37:55 2015 (r290335) @@ -31,6 +31,11 @@ #ifndef _NET_IF_INET6_H_ #define _NET_IF_INET6_H_ +#include +#include + +#include + static inline void ipv6_eth_mc_map(const struct in6_addr *addr, char *buf) { /* Modified: head/sys/compat/linuxkpi/common/include/net/ipv6.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/net/ipv6.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/net/ipv6.h Tue Nov 3 12:37:55 2015 (r290335) @@ -31,13 +31,14 @@ #ifndef _LINUX_NET_IPV6_H_ #define _LINUX_NET_IPV6_H_ -#include "opt_inet6.h" +#include +#include +#include #define ipv6_addr_loopback IN6_IS_ADDR_LOOPBACK #define ipv6_addr_copy(dst, src) \ memcpy((dst), (src), sizeof(struct in6_addr)) -#ifdef INET6 static inline void ipv6_ib_mc_map(const struct in6_addr *addr, const unsigned char *broadcast, char *buf) @@ -57,7 +58,6 @@ ipv6_ib_mc_map(const struct in6_addr *ad buf[9] = broadcast[9]; memcpy(&buf[10], &addr->s6_addr[6], 10); } -#endif static inline void __ipv6_addr_set_half(__be32 *addr, __be32 wh, __be32 wl) Modified: head/sys/compat/linuxkpi/common/include/net/netevent.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/net/netevent.h Tue Nov 3 10:34:26 2015 (r290334) +++ head/sys/compat/linuxkpi/common/include/net/netevent.h Tue Nov 3 12:37:55 2015 (r290335) @@ -31,7 +31,10 @@ #ifndef _LINUX_NET_NETEVENT_H_ #define _LINUX_NET_NETEVENT_H_ -#include +#include +#include + +#include enum netevent_notif_type { NETEVENT_NEIGH_UPDATE = 0, From owner-svn-src-head@freebsd.org Tue Nov 3 17:27:26 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 484A3A252A9; Tue, 3 Nov 2015 17:27:26 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08F31101A; Tue, 3 Nov 2015 17:27:25 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA3HRPEJ012863; Tue, 3 Nov 2015 17:27:25 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA3HRP76012862; Tue, 3 Nov 2015 17:27:25 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201511031727.tA3HRP76012862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Tue, 3 Nov 2015 17:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290336 - head/usr.bin/bsdiff/bsdiff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 17:27:26 -0000 Author: ache Date: Tue Nov 3 17:27:24 2015 New Revision: 290336 URL: https://svnweb.freebsd.org/changeset/base/290336 Log: Check for (old|new)size + 1 overflows off_t. PR: 204230 MFC after: 1 week Modified: head/usr.bin/bsdiff/bsdiff/bsdiff.c Modified: head/usr.bin/bsdiff/bsdiff/bsdiff.c ============================================================================== --- head/usr.bin/bsdiff/bsdiff/bsdiff.c Tue Nov 3 12:37:55 2015 (r290335) +++ head/usr.bin/bsdiff/bsdiff/bsdiff.c Tue Nov 3 17:27:24 2015 (r290336) @@ -237,7 +237,8 @@ int main(int argc,char *argv[]) err(1, "%s", argv[1]); if (oldsize > SSIZE_MAX || - (uintmax_t)oldsize >= SIZE_T_MAX / sizeof(off_t)) { + (uintmax_t)oldsize >= SIZE_T_MAX / sizeof(off_t) || + oldsize == OFF_MAX) { errno = EFBIG; err(1, "%s", argv[1]); } @@ -260,7 +261,8 @@ int main(int argc,char *argv[]) ((newsize=lseek(fd,0,SEEK_END))==-1)) err(1, "%s", argv[2]); - if (newsize > SSIZE_MAX || (uintmax_t)newsize >= SIZE_T_MAX) { + if (newsize > SSIZE_MAX || (uintmax_t)newsize >= SIZE_T_MAX || + newsize == OFF_MAX) { errno = EFBIG; err(1, "%s", argv[2]); } From owner-svn-src-head@freebsd.org Tue Nov 3 19:57:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0601DA259C4; Tue, 3 Nov 2015 19:57:14 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBE0C1BD9; Tue, 3 Nov 2015 19:57:13 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA3JvCpn058163; Tue, 3 Nov 2015 19:57:12 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA3JvCOS058161; Tue, 3 Nov 2015 19:57:12 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511031957.tA3JvCOS058161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 3 Nov 2015 19:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290337 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 19:57:14 -0000 Author: dteske Date: Tue Nov 3 19:57:12 2015 New Revision: 290337 URL: https://svnweb.freebsd.org/changeset/base/290337 Log: Add sysrc(8) support for "rc.conf.d" file(s) when given "-s name" to indicate service(8) script. While here, add "-l" option for listing the set of configuration file(s) considered (in order; separated by space). Also add "-L" for exploring all configuration files and "-E" to omit files that don't exist from operations. Differential Revision: https://reviews.freebsd.org/D3551 Reviewed by: allanjude MFC after: 1 week X-MFC-to: stable/10 Relnotes: yes Modified: head/usr.sbin/sysrc/sysrc head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Tue Nov 3 17:27:24 2015 (r290336) +++ head/usr.sbin/sysrc/sysrc Tue Nov 3 19:57:12 2015 (r290337) @@ -40,18 +40,23 @@ BSDCFG_SHARE="/usr/share/bsdconfig" # # Version information # -SYSRC_VERSION="6.5 Sep-1,2015" +SYSRC_VERSION="7.0 Sep-13,2015" # # Options # CHECK_ONLY= +DEFAULT= DELETE= DESCRIBE= +EXISTING_ONLY= IGNORE_UNKNOWNS= JAIL= +LIST_SERVICE_CONFS= +LIST_CONFS= QUIET= ROOTDIR= +SERVICE= SHOW_ALL= SHOW_EQUALS= SHOW_FILE= @@ -80,7 +85,8 @@ die() # usage() { - f_err "Usage: %s [OPTIONS] name[[+|-]=value] ...\n" "$pgm" + f_err "Usage: %s [OPTIONS] %s\n" "$pgm" \ + "{name[[+|-]=value] ... | -a | -A | -l | -L [name ...]}" f_err "Try \`%s --help' for more information.\n" "$pgm" die } @@ -95,6 +101,8 @@ help() local envfmt="\t%-17s%s\n" f_err "Usage: %s [OPTIONS] name[[+|-]=value] ...\n" "$pgm" + f_err "Usage: %s [OPTIONS] -a | -A\n" "$pgm" + f_err "Usage: %s [OPTIONS] -l | -L [name ...]\n" "$pgm" f_err "OPTIONS:\n" f_err "$optfmt" "-a" \ @@ -113,6 +121,8 @@ help() "Print query results as \`var=value' (useful for producing" f_err "$optfmt" "" \ "output to be fed back in). Ignored if \`-n' is specified." + f_err "$optfmt" "-E" \ + "Existing files only with \`-[lL]' or when changing a setting." f_err "$optfmt" "-f file" \ "Operate on the specified file(s) instead of rc_conf_files." f_err "$optfmt" "" \ @@ -129,12 +139,20 @@ help() "The jid or name of the jail to operate within (overrides" f_err "$optfmt" "" \ "\`-R dir'; requires jexec(8))." + f_err "$optfmt" "-l" \ + "List configuration files used at startup on stdout and exit." + f_err "$optfmt" "-L" \ + "List all configuration files including rc.conf.d entries." f_err "$optfmt" "-n" \ "Show only variable values, not their names." f_err "$optfmt" "-N" \ "Show only variable names, not their values." f_err "$optfmt" "-q" \ "Quiet. Disable verbose and hide certain errors." + f_err "$optfmt" "-s name" \ + "Process additional \`rc.conf.d' entries for service name." + f_err "$optfmt" "" \ + "Ignored if \`-f file' is given." f_err "$optfmt" "-R dir" \ "Operate within the root directory \`dir' rather than \`/'." f_err "$optfmt" "-v" \ @@ -245,27 +263,33 @@ unset arg # # Process command-line flags # -while getopts aAcdDef:Fhij:nNqR:vxX flag; do +while getopts aAcdDeEf:Fhij:lLnNqR:s:vxX flag; do case "$flag" in a) SHOW_ALL=${SHOW_ALL:-1} ;; A) SHOW_ALL=2 ;; c) CHECK_ONLY=1 ;; d) DESCRIBE=1 ;; - D) RC_CONFS= ;; + D) DEFAULT=1 RC_CONFS= ;; e) SHOW_EQUALS=1 ;; - f) RC_CONFS="$RC_CONFS${RC_CONFS:+ }$OPTARG" ;; + E) EXISTING_ONLY=1 ;; + f) DEFAULT= RC_CONFS="$RC_CONFS${RC_CONFS:+ }$OPTARG" ;; F) SHOW_FILE=1 ;; h) usage ;; # NOTREACHED i) IGNORE_UNKNOWNS=1 ;; j) [ "$OPTARG" ] || die "%s: Missing or null argument to \`-j' flag" "$pgm" JAIL="$OPTARG" ;; + l) LIST_CONFS=1 ;; + L) LIST_SERVICE_CONFS=1 ;; n) SHOW_NAME= ;; N) SHOW_VALUE= ;; q) QUIET=1 VERBOSE= ;; R) [ "$OPTARG" ] || die "%s: Missing or null argument to \`-R' flag" "$pgm" ROOTDIR="$OPTARG" ;; + s) [ "$OPTARG" ] || + die "%s: Missing or null argument to \`-s' flag" "$pgm" + SERVICE="$OPTARG" ;; v) VERBOSE=1 QUIET= ;; x) DELETE=${DELETE:-1} ;; X) DELETE=2 ;; @@ -275,6 +299,129 @@ done shift $(( $OPTIND - 1 )) # +# Process `-L' flag +# +if [ "$LIST_SERVICE_CONFS" ]; then + list= + + # + # List rc_conf_files if no service names given + # + files= + [ $# -eq 0 ] && files=$( f_sysrc_get rc_conf_files ) + for file in $files; do + if [ "$EXISTING_ONLY" ]; then + [ -e "$file" -a ! -d "$file" ] || continue + fi + case "$list" in + "$file"|*" $file"|"$file "*|*" $file "*) continue ;; + esac + list="$list $file" + done + list="${list# }" + if [ $# -eq 0 ]; then + if [ "$VERBOSE" ]; then + echo rc_conf_files: $list + elif [ "$SHOW_EQUALS" ]; then + echo "rc_conf_files=\"$list\"" + fi + fi + + # + # List rc.conf.d entries + # + retval=$SUCCESS + for service in ${*:-$( service -l )}; do + slist= + f_sysrc_service_configs $service files || retval=$? continue + for file in $files; do + if [ "$EXISTING_ONLY" ]; then + [ -e "$file" -a ! -d "$file" ] || continue + fi + if [ ! "$VERBOSE" -a ! "$SHOW_EQUALS" ]; then + case "$list" in + "$file"|*" $file"|"$file "*|*" $file "*) + continue ;; + esac + fi + slist="$slist $file" + done + slist="${slist# }" + if [ $# -gt 0 ]; then + [ "$slist" ] || retval=$? + fi + if [ "$VERBOSE" ]; then + [ "$slist" ] && echo "$service: $slist" + continue + elif [ "$SHOW_EQUALS" ]; then + [ "$slist" ] && echo "$service=\"$slist\"" + continue + fi + list="$list${slist:+ }$slist" + done + if [ ! "$VERBOSE" -a ! "$SHOW_EQUALS" ]; then + if [ $# -eq 0 -o ! "$QUIET" ]; then + list="${list# }" + [ "$list" ] && echo $list + fi + fi + + exit $retval +fi + +# +# Process `-s name' argument +# +if [ "$SERVICE" -a ! "${RC_CONFS+set}" ]; then + if f_sysrc_service_configs "$SERVICE" RC_CONFS; then + rc_conf_files=$( f_sysrc_get rc_conf_files ) + RC_CONFS="$rc_conf_files${RC_CONFS:+ }$RC_CONFS" + unset rc_conf_files + else + unset RC_CONFS + fi +fi + +# +# Process `-E' option flag +# +if [ "$EXISTING_ONLY" ]; then + # + # To get f_sysrc_*() to ignore missing rc_conf_files, we have to use + # RC_CONFS to override the unpreened value. If RC_CONFS already has a + # value (`-D', `-f file', `-s name', or inherited from parent), use it. + # Otherwise, include filtered contents of rc_conf_files. + # + RC_CONFS=$( + if [ "${RC_CONFS+set}" ]; then + set -- $RC_CONFS + else + set -- $( f_sysrc_get rc_conf_files ) + fi + while [ $# -gt 0 ]; do + [ -f "$1" ] && echo -n " $1" + shift + done + ) + RC_CONFS="${RC_CONFS# }" +fi + +# +# Process `-l' option flag +# +if [ "$LIST_CONFS" ]; then + [ $# -eq 0 ] || usage + if [ "$DEFAULT" ]; then + echo "$RC_DEFAULTS" + elif [ "${RC_CONFS+set}" ]; then + echo "$RC_CONFS" + else + f_sysrc_get rc_conf_files + fi + exit $SUCCESS +fi + +# # [More] Sanity checks (e.g., "sysrc --") # [ $# -eq 0 -a ! "$SHOW_ALL" ] && usage # NOTREACHED @@ -344,6 +491,10 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then $( [ "$SHOW_ALL" = "1" ] && echo \ -a ) $( [ "$SHOW_ALL" = "2" ] && echo \ -A ) ${CHECK_ONLY:+-c} + ${DEFAULT:+-D} + ${EXISTING_ONLY:+-E} + ${LIST_CONFS:+-l} + ${LIST_SERVICE_CONFS:+-L} ${DESCRIBE:+-d} ${SHOW_EQUALS:+-e} ${IGNORE_UNKNOWNS:+-i} @@ -351,6 +502,11 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then $( [ "$SHOW_VALUE" ] || echo \ -N ) $( [ "$SHOW_FILE" ] && echo \ -F ) " + if [ "$SERVICE" ]; then + escape "$SERVICE" _SERVICE + args="$args -s '$_SERVICE'" + unset _SERVICE + fi if [ "${RC_CONFS+set}" ]; then escape "$RC_CONFS" _RC_CONFS args="$args -f '$_RC_CONFS'" @@ -454,9 +610,10 @@ if [ "$SHOW_ALL" ]; then # IFS="$IFS|" EXCEPT="IFS|EXCEPT|PATH|RC_DEFAULTS|OPTIND|DESCRIBE|SEP" - EXCEPT="$EXCEPT|DELETE|SHOW_ALL|SHOW_EQUALS|SHOW_NAME" - EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|VERBOSE|RC_CONFS" - EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE|CHECK_ONLY" + EXCEPT="$EXCEPT|DELETE|SHOW_ALL|SHOW_EQUALS|SHOW_NAME|DEFAULT" + EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|VERBOSE|RC_CONFS|SERVICE" + EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE|CHECK_ONLY|EXISTING_ONLY" + EXCEPT="$EXCEPT|LIST_CONFS|LIST_SERVICE_CONFS" EXCEPT="$EXCEPT|f_sysrc_desc_awk|f_sysrc_delete_awk" # @@ -479,7 +636,13 @@ if [ "$SHOW_ALL" ]; then # explicit value, modifying the default behavior of # source_rc_confs(). # - [ "${RC_CONFS+set}" ] && rc_conf_files="$RC_CONFS" + if [ "${RC_CONFS+set}" ]; then + [ "$SHOW_ALL" = "1" -a "$SERVICE" -a \ + ! "$DEFAULT" ] || rc_conf_files= + rc_conf_files="$rc_conf_files $RC_CONFS" + rc_conf_files="${rc_conf_files# }" + rc_conf_files="${rc_conf_files% }" + fi source_rc_confs Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Tue Nov 3 17:27:24 2015 (r290336) +++ head/usr.sbin/sysrc/sysrc.8 Tue Nov 3 19:57:12 2015 (r290337) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2015 +.Dd September 12, 2015 .Dt SYSRC 8 .Os .Sh NAME @@ -32,16 +32,27 @@ .Nd safely edit system rc files .Sh SYNOPSIS .Nm -.Op Fl cdDeFhinNqvx +.Op Fl cdDeEFhinNqvx +.Op Fl s Ar name .Op Fl f Ar file .Op Fl j Ar jail | Fl R Ar dir .Ar name Ns Op Ns Oo +|- Oc Ns = Ns Ar value .Ar ... .Nm -.Op Fl cdDeFhinNqvx +.Op Fl cdDeEFhinNqvx +.Op Fl s Ar name .Op Fl f Ar file .Op Fl j Ar jail | Fl R Ar dir .Fl a | A +.Nm +.Op Fl E +.Op Fl s Ar name +.Op Fl f Ar file +.Fl l +.Nm +.Op Fl eEqv +.Fl L +.Op Ar name ... .Sh DESCRIPTION The .Nm @@ -81,6 +92,13 @@ Ignored if either or .Ql Fl F is specified. +.It Fl E +When given +.Sq Fl l +or +.Sq Fl L +to list configuration files, only list those that exist. +When changing a setting, prefer to modify existing files. .It Fl f Ar file Operate on the specified file(s) instead of the files obtained by reading the .Sq rc_conf_files @@ -105,6 +123,17 @@ or name of the .Ar jail to operate within .Pq overrides So Fl R Ar dir Sc ; requires Xr jexec 8 . +.It Fl l +List configuration files used at startup on stdout and exit. +.It Fl L +List all configuration files including rc.conf.d entries on stdout and exit. +Can be combined with +.Sq Fl v +or +.Sq Fl e +to show service names. +.Nm +exits with success if all named services are installed, failure otherwise. .It Fl n Show only variable values, not their names. .It Fl N @@ -112,11 +141,40 @@ Show only variable names, not their valu .It Fl q Quiet. Disable verbose and hide certain errors. +When combined with +.Sq Fl L +and one or more +.Li Ar name +arguments, provide only exit status and no output. .It Fl R Ar dir Operate within the root directory .Sq Ar dir rather than .Sq / . +.It Fl s Ar name +If an +.Li rc.d +script of +.Ar name +exists +.Po +in +.Dq /etc/rc.d +or +.Li local_startup +directories +.Pc , +process its +.Dq rc.conf.d +entries as potential overrides to +.Sq rc_conf_files . +See +.Xr rc.subr 8 +for additional information on +.Dq rc.conf.d . +Can be combined with +.Sq Fl l +to list configuration files used by service at startup. .It Fl v Verbose. Print the pathname of the specific @@ -336,6 +394,10 @@ and .It Pa /etc/defaults/rc.conf .It Pa /etc/rc.conf .It Pa /etc/rc.conf.local +.It Pa /etc/rc.conf.d/name +.It Pa /etc/rc.conf.d/name/* +.It Pa /usr/local/etc/rc.conf.d/name +.It Pa /usr/local/etc/rc.conf.d/name/* .El .Sh EXAMPLES Below are some simple examples of how @@ -397,6 +459,7 @@ cloned_interfaces+"alternate" .Sh SEE ALSO .Xr jls 1 , .Xr rc.conf 5 , +.Xr rc.subr 8 , .Xr jail 8 , .Xr jexec 8 , .Xr rc 8 , From owner-svn-src-head@freebsd.org Tue Nov 3 21:03:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 378A3A25966; Tue, 3 Nov 2015 21:03:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05CBD1C8F; Tue, 3 Nov 2015 21:03:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA3L3RMi078428; Tue, 3 Nov 2015 21:03:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA3L3R7N078427; Tue, 3 Nov 2015 21:03:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511032103.tA3L3R7N078427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 3 Nov 2015 21:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290338 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 21:03:28 -0000 Author: adrian Date: Tue Nov 3 21:03:26 2015 New Revision: 290338 URL: https://svnweb.freebsd.org/changeset/base/290338 Log: Remove this; it's also in sys/conf/files.mips. Modified: head/sys/mips/atheros/files.ar71xx Modified: head/sys/mips/atheros/files.ar71xx ============================================================================== --- head/sys/mips/atheros/files.ar71xx Tue Nov 3 19:57:12 2015 (r290337) +++ head/sys/mips/atheros/files.ar71xx Tue Nov 3 21:03:26 2015 (r290338) @@ -31,5 +31,3 @@ 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 From owner-svn-src-head@freebsd.org Tue Nov 3 21:11:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3B9AA25DE5; Tue, 3 Nov 2015 21:11:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92B2113C9; Tue, 3 Nov 2015 21:11:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA3LBUQU079383; Tue, 3 Nov 2015 21:11:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA3LBUpB079382; Tue, 3 Nov 2015 21:11:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511032111.tA3LBUpB079382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 3 Nov 2015 21:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290339 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 21:11:31 -0000 Author: adrian Date: Tue Nov 3 21:11:30 2015 New Revision: 290339 URL: https://svnweb.freebsd.org/changeset/base/290339 Log: ath(4) - don't try to free buffers / return an error if we've committed to transmit the buffer. ath_tx_start() may manipulate/reallocate the mbuf as part of the DMA code, so we can't expect the mbuf can be returned back to the caller. Now, the net80211 ifnet work changed the semantics slightly so if an error is returned here, the mbuf/reference is freed by the caller (here, it's net80211.) So, once we reach ath_tx_start(), we never return failure. If we fail then we still return OK and we free the mbuf/noderef ourselves, and we increment OERRORS. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Nov 3 21:03:26 2015 (r290338) +++ head/sys/dev/ath/if_ath.c Tue Nov 3 21:11:30 2015 (r290339) @@ -3320,6 +3320,9 @@ nextfrag: * * Note: if this fails, then the mbufs are freed but * not the node reference. + * + * So, we now have to free the node reference ourselves here + * and return OK up to the stack. */ next = m->m_nextpkt; if (ath_tx_start(sc, ni, bf, m)) { @@ -3336,7 +3339,14 @@ reclaim: */ ath_txfrag_cleanup(sc, &frags, ni); ATH_TXBUF_UNLOCK(sc); - retval = ENOBUFS; + + /* + * XXX: And free the node/return OK; ath_tx_start() may have + * modified the buffer. We currently have no way to + * signify that the mbuf was freed but there was an error. + */ + ieee80211_free_node(ni); + retval = 0; goto finish; } From owner-svn-src-head@freebsd.org Tue Nov 3 21:19:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6225AA24072; Tue, 3 Nov 2015 21:19:47 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FA491A52; Tue, 3 Nov 2015 21:19:47 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA3LJkbp081926; Tue, 3 Nov 2015 21:19:46 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA3LJk94081925; Tue, 3 Nov 2015 21:19:46 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511032119.tA3LJk94081925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 3 Nov 2015 21:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290340 - head/usr.sbin/bsdinstall/distfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 21:19:47 -0000 Author: dteske Date: Tue Nov 3 21:19:46 2015 New Revision: 290340 URL: https://svnweb.freebsd.org/changeset/base/290340 Log: Fix typo in error message Differential Revision: https://reviews.freebsd.org/D3997 Submitted by: git_johnko.ca (John Ko) MFC after: 3 days X-MFC-to: stable/10 stable/9 Modified: head/usr.sbin/bsdinstall/distfetch/distfetch.c Modified: head/usr.sbin/bsdinstall/distfetch/distfetch.c ============================================================================== --- head/usr.sbin/bsdinstall/distfetch/distfetch.c Tue Nov 3 21:11:30 2015 (r290339) +++ head/usr.sbin/bsdinstall/distfetch/distfetch.c Tue Nov 3 21:19:46 2015 (r290340) @@ -78,7 +78,7 @@ main(void) if (chdir(getenv("BSDINSTALL_DISTDIR")) != 0) { snprintf(error, sizeof(error), - "Could could change to directory %s: %s\n", + "Could not change to directory %s: %s\n", getenv("BSDINSTALL_DISTDIR"), strerror(errno)); dialog_msgbox("Error", error, 0, 0, TRUE); end_dialog(); From owner-svn-src-head@freebsd.org Tue Nov 3 22:23:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EE9CA24FF1; Tue, 3 Nov 2015 22:23:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BFD81CC5; Tue, 3 Nov 2015 22:23:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA3MN9Ou002061; Tue, 3 Nov 2015 22:23:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA3MN97n002060; Tue, 3 Nov 2015 22:23:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201511032223.tA3MN97n002060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 3 Nov 2015 22:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290345 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 22:23:10 -0000 Author: ae Date: Tue Nov 3 22:23:09 2015 New Revision: 290345 URL: https://svnweb.freebsd.org/changeset/base/290345 Log: Remove now obsolete KASSERT. Actually, object classify callbacks can skip some opcodes, that could be rewritten. We will deteremine real numbed of rewritten opcodes a bit later in this function. Reported by: David H. Wolfskill Modified: head/sys/netpfil/ipfw/ip_fw_table.c Modified: head/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table.c Tue Nov 3 22:06:24 2015 (r290344) +++ head/sys/netpfil/ipfw/ip_fw_table.c Tue Nov 3 22:23:09 2015 (r290345) @@ -3388,14 +3388,8 @@ ref_rule_objects(struct ip_fw_chain *ch, IPFW_UH_WUNLOCK(ch); return (error); } - IPFW_UH_WUNLOCK(ch); - found = pidx - oib; - KASSERT(found == ci->object_opcodes, - ("refcount inconsistency: found: %d total: %d", - found, ci->object_opcodes)); - /* Perform auto-creation for non-existing objects */ if (numnew != 0) error = create_objects_compat(ch, rule->cmd, oib, pidx, ti); From owner-svn-src-head@freebsd.org Wed Nov 4 04:02:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39429A25CB4; Wed, 4 Nov 2015 04:02:01 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F397D1275; Wed, 4 Nov 2015 04:02:00 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA441xr0099774; Wed, 4 Nov 2015 04:01:59 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA441xnN099773; Wed, 4 Nov 2015 04:01:59 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201511040401.tA441xnN099773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 4 Nov 2015 04:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290349 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 04:02:01 -0000 Author: gonzo Date: Wed Nov 4 04:01:59 2015 New Revision: 290349 URL: https://svnweb.freebsd.org/changeset/base/290349 Log: Revert r290243, it's vaid "illegal instruction" case DEX bit is set to 1 and exception raised whenever vectorized operation is attempted on the VFP implementation that does not support it (i.e. on Cortex A7) Modified: head/sys/arm/arm/vfp.c Modified: head/sys/arm/arm/vfp.c ============================================================================== --- head/sys/arm/arm/vfp.c Wed Nov 4 01:00:42 2015 (r290348) +++ head/sys/arm/arm/vfp.c Wed Nov 4 04:01:59 2015 (r290349) @@ -179,12 +179,12 @@ vfp_bounce(u_int addr, u_int insn, struc fpexc = fmrx(fpexc); if (fpexc & VFPEXC_EN) { /* Clear any exceptions */ - fmxr(fpexc, fpexc & ~(VFPEXC_EX | VFPEXC_DEX | VFPEXC_FP2V)); + fmxr(fpexc, fpexc & ~(VFPEXC_EX | VFPEXC_FP2V)); /* kill the process - we do not handle emulation */ critical_exit(); - if (fpexc & (VFPEXC_EX | VFPEXC_DEX)) { + if (fpexc & VFPEXC_EX) { /* We have an exception, signal a SIGFPE */ ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGFPE; From owner-svn-src-head@freebsd.org Wed Nov 4 05:38:09 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2E7FA25C28; Wed, 4 Nov 2015 05:38:09 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91EE6118C; Wed, 4 Nov 2015 05:38:09 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA45c8gG027506; Wed, 4 Nov 2015 05:38:08 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA45c8TT027505; Wed, 4 Nov 2015 05:38:08 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201511040538.tA45c8TT027505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 4 Nov 2015 05:38:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290350 - head/gnu/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 05:38:09 -0000 Author: rodrigc Date: Wed Nov 4 05:38:08 2015 New Revision: 290350 URL: https://svnweb.freebsd.org/changeset/base/290350 Log: Include "system.h" for isdir() prototype. Submitted by: bofh Differential Revision: https://reviews.freebsd.org/D2711 Modified: head/gnu/usr.bin/grep/savedir.c Modified: head/gnu/usr.bin/grep/savedir.c ============================================================================== --- head/gnu/usr.bin/grep/savedir.c Wed Nov 4 04:01:59 2015 (r290349) +++ head/gnu/usr.bin/grep/savedir.c Wed Nov 4 05:38:08 2015 (r290350) @@ -71,6 +71,7 @@ char *stpcpy (); #include #include "savedir.h" +#include "system.h" char *path; size_t pathlen; From owner-svn-src-head@freebsd.org Wed Nov 4 07:20:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19ADEA2605E; Wed, 4 Nov 2015 07:20:58 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF2D8156E; Wed, 4 Nov 2015 07:20:57 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA47KulL070033; Wed, 4 Nov 2015 07:20:56 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA47KtNS070025; Wed, 4 Nov 2015 07:20:55 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201511040720.tA47KtNS070025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 4 Nov 2015 07:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290351 - in head: . lib lib/libohash lib/libopenbsd share/mk usr.bin/m4 usr.bin/mandoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 07:20:58 -0000 Author: rodrigc Date: Wed Nov 4 07:20:55 2015 New Revision: 290351 URL: https://svnweb.freebsd.org/changeset/base/290351 Log: Rename libohash to libopenbsd. libopenbsd is an internal library which to bring in compatibility stuff from OpenBSD. This will allow us to bring in more OpenBSD utilities into the FreeBSD base system. We similarly use libnetbsd for bringing in stuff from NetBSD. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D4078 Added: head/lib/libopenbsd/ - copied from r290350, head/lib/libohash/ Deleted: head/lib/libohash/ Modified: head/Makefile.inc1 head/lib/Makefile head/lib/libopenbsd/Makefile head/share/mk/src.libnames.mk head/usr.bin/m4/Makefile head/usr.bin/m4/Makefile.depend head/usr.bin/mandoc/Makefile head/usr.bin/mandoc/Makefile.depend Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Nov 4 05:38:08 2015 (r290350) +++ head/Makefile.inc1 Wed Nov 4 07:20:55 2015 (r290351) @@ -1367,10 +1367,10 @@ _sed= usr.bin/sed .endif .if ${BOOTSTRAPPING} < 1000002 -_libohash= lib/libohash +_libopenbsd= lib/libopenbsd _m4= usr.bin/m4 -${_bt}-usr.bin/m4: ${_bt}-lib/libohash +${_bt}-usr.bin/m4: ${_bt}-lib/libopenbsd .endif .if ${BOOTSTRAPPING} < 1000026 @@ -1443,10 +1443,10 @@ _kerberos5_bootstrap_tools= \ .endif .if ${MK_MANDOCDB} != "no" -_libohash?= lib/libohash +_libopenbsd?= lib/libopenbsd _makewhatis= lib/libsqlite3 \ usr.bin/mandoc -${_bt}-usr.bin/mandoc: ${_bt}-lib/libohash ${_bt}-lib/libsqlite3 +${_bt}-usr.bin/mandoc: ${_bt}-lib/libopenbsd ${_bt}-lib/libsqlite3 .else _makewhatis=usr.bin/makewhatis .endif @@ -1469,7 +1469,7 @@ bootstrap-tools: .PHONY ${_awk} \ ${_cat} \ usr.bin/lorder \ - ${_libohash} \ + ${_libopenbsd} \ ${_makewhatis} \ usr.bin/rpcgen \ ${_sed} \ Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Wed Nov 4 05:38:08 2015 (r290350) +++ head/lib/Makefile Wed Nov 4 07:20:55 2015 (r290351) @@ -75,7 +75,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libnetgraph} \ ${_libngatm} \ libnv \ - libohash \ + libopenbsd \ libopie \ libpam \ libpcap \ Modified: head/lib/libopenbsd/Makefile ============================================================================== --- head/lib/libohash/Makefile Wed Nov 4 05:38:08 2015 (r290350) +++ head/lib/libopenbsd/Makefile Wed Nov 4 07:20:55 2015 (r290351) @@ -1,6 +1,6 @@ # $FreeBSD$ -LIB= ohash +LIB= openbsd SRCS= ohash.c INTERNALLIB= Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Nov 4 05:38:08 2015 (r290350) +++ head/share/mk/src.libnames.mk Wed Nov 4 07:20:55 2015 (r290351) @@ -39,7 +39,7 @@ _INTERNALLIBS= \ netbsd \ ntp \ ntpevent \ - ohash \ + openbsd \ opts \ parse \ readline \ @@ -313,8 +313,8 @@ LIBELFTC?= ${LIBELFTCDIR}/libelftc.a LIBREADLINEDIR= ${ROOTOBJDIR}/gnu/lib/libreadline/readline LIBREADLINE?= ${LIBREADLINEDIR}/libreadline.a -LIBOHASHDIR= ${ROOTOBJDIR}/lib/libohash -LIBOHASH?= ${LIBOHASHDIR}/libohash.a +LIBOPENBSDDIR= ${ROOTOBJDIR}/lib/libopenbsd +LIBOPENBSD?= ${LIBOPENBSDDIR}/libopenbsd.a LIBSMDIR= ${ROOTOBJDIR}/lib/libsm LIBSM?= ${LIBSMDIR}/libsm.a Modified: head/usr.bin/m4/Makefile ============================================================================== --- head/usr.bin/m4/Makefile Wed Nov 4 05:38:08 2015 (r290350) +++ head/usr.bin/m4/Makefile Wed Nov 4 07:20:55 2015 (r290351) @@ -7,8 +7,8 @@ .include PROG= m4 -CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/../../lib/libohash -LIBADD= y l m ohash +CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/../../lib/libopenbsd +LIBADD= y l m openbsd NO_WMISSING_VARIABLE_DECLARATIONS= Modified: head/usr.bin/m4/Makefile.depend ============================================================================== --- head/usr.bin/m4/Makefile.depend Wed Nov 4 05:38:08 2015 (r290350) +++ head/usr.bin/m4/Makefile.depend Wed Nov 4 07:20:55 2015 (r290351) @@ -9,7 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libohash \ + lib/libopenbsd \ lib/liby \ lib/msun \ usr.bin/lex/lib \ Modified: head/usr.bin/mandoc/Makefile ============================================================================== --- head/usr.bin/mandoc/Makefile Wed Nov 4 05:38:08 2015 (r290350) +++ head/usr.bin/mandoc/Makefile Wed Nov 4 07:20:55 2015 (r290351) @@ -82,8 +82,8 @@ SRCS+= ${DB_SRCS} WARNS?= 2 CFLAGS+= -DHAVE_CONFIG_H \ - -I${.CURDIR}/../../lib/libohash/ \ + -I${.CURDIR}/../../lib/libopenbsd/ \ -I${.CURDIR}/../../contrib/sqlite3 -LIBADD= ohash sqlite3 z +LIBADD= openbsd sqlite3 z .include Modified: head/usr.bin/mandoc/Makefile.depend ============================================================================== --- head/usr.bin/mandoc/Makefile.depend Wed Nov 4 05:38:08 2015 (r290350) +++ head/usr.bin/mandoc/Makefile.depend Wed Nov 4 07:20:55 2015 (r290351) @@ -9,7 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libohash \ + lib/libopenbsd \ lib/libsqlite3 \ lib/libthr \ lib/libz \ From owner-svn-src-head@freebsd.org Wed Nov 4 13:59:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C68C8A269CE; Wed, 4 Nov 2015 13:59:14 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90A9D1EF2; Wed, 4 Nov 2015 13:59:14 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4DxDBE027849; Wed, 4 Nov 2015 13:59:13 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4DxDaj027848; Wed, 4 Nov 2015 13:59:13 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511041359.tA4DxDaj027848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Wed, 4 Nov 2015 13:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290365 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 13:59:14 -0000 Author: ume Date: Wed Nov 4 13:59:13 2015 New Revision: 290365 URL: https://svnweb.freebsd.org/changeset/base/290365 Log: Restore an interface name field to left align. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Wed Nov 4 12:47:27 2015 (r290364) +++ head/usr.bin/netstat/if.c Wed Nov 4 13:59:13 2015 (r290365) @@ -337,10 +337,10 @@ intpr(void (*pfunc)(char *), int af) xname = name; if (Wflag) - xo_emit("{etk:name/%s}{e:flags/0x%x}{d:/%7.7s}", + xo_emit("{etk:name/%s}{e:flags/0x%x}{d:/%-7.7s}", name, ifa->ifa_flags, xname); else - xo_emit("{etk:name/%s}{e:flags/0x%x}{d:/%5.5s}", + xo_emit("{etk:name/%s}{e:flags/0x%x}{d:/%-5.5s}", name, ifa->ifa_flags, xname); #define IFA_MTU(ifa) (((struct if_data *)(ifa)->ifa_data)->ifi_mtu) From owner-svn-src-head@freebsd.org Wed Nov 4 14:47:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FF9FA262CC; Wed, 4 Nov 2015 14:47:12 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBC9F15E0; Wed, 4 Nov 2015 14:47:11 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4ElAbg044811; Wed, 4 Nov 2015 14:47:10 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4ElAwm044810; Wed, 4 Nov 2015 14:47:10 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511041447.tA4ElAwm044810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Wed, 4 Nov 2015 14:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290366 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 14:47:12 -0000 Author: ume Date: Wed Nov 4 14:47:10 2015 New Revision: 290366 URL: https://svnweb.freebsd.org/changeset/base/290366 Log: Mask an IPv6 network address. Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Wed Nov 4 13:59:13 2015 (r290365) +++ head/usr.bin/netstat/route.c Wed Nov 4 14:47:10 2015 (r290366) @@ -688,9 +688,10 @@ static const char * netname6(struct sockaddr_in6 *sa6, struct sockaddr_in6 *mask) { static char line[NI_MAXHOST + sizeof("/xxx") - 1]; + struct sockaddr_in6 addr; char nline[NI_MAXHOST]; u_char *p, *lim; - int masklen, illegal = 0; + int masklen, illegal = 0, i; if (mask) { p = (u_char *)&mask->sin6_addr; @@ -703,6 +704,12 @@ netname6(struct sockaddr_in6 *sa6, struc } if (illegal) xo_error("illegal prefixlen\n"); + + memcpy(&addr, sa6, sizeof(addr)); + for (i = 0; i < 16; ++i) + addr.sin6_addr.s6_addr[i] &= + mask->sin6_addr.s6_addr[i]; + sa6 = &addr; } else masklen = 128; From owner-svn-src-head@freebsd.org Wed Nov 4 14:57:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37564A26478; Wed, 4 Nov 2015 14:57:48 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D306C1BDB; Wed, 4 Nov 2015 14:57:47 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4EvkbO048271; Wed, 4 Nov 2015 14:57:46 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4EvkBs048270; Wed, 4 Nov 2015 14:57:46 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511041457.tA4EvkBs048270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Wed, 4 Nov 2015 14:57:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290367 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 14:57:48 -0000 Author: ume Date: Wed Nov 4 14:57:46 2015 New Revision: 290367 URL: https://svnweb.freebsd.org/changeset/base/290367 Log: Change to not truncate an interface name when -W option is specified. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Wed Nov 4 14:47:10 2015 (r290366) +++ head/usr.bin/netstat/if.c Wed Nov 4 14:57:46 2015 (r290367) @@ -271,7 +271,9 @@ intpr(void (*pfunc)(char *), int af) { struct ifaddrs *ifap, *ifa; struct ifmaddrs *ifmap, *ifma; - + u_int ifn_len_max = 5, ifn_len; + char ifn_hdr_fmt[14], ifn_bdy_fmt[41]; + if (interval) return sidewaysintpr(); @@ -280,12 +282,28 @@ intpr(void (*pfunc)(char *), int af) if (aflag && getifmaddrs(&ifmap) != 0) err(EX_OSERR, "getifmaddrs"); + if (Wflag) { + for (ifa = ifap; ifa; ifa = ifa->ifa_next) { + if (interface != NULL && + strcmp(ifa->ifa_name, interface) != 0) + continue; + if (af != AF_UNSPEC && ifa->ifa_addr->sa_family != af) + continue; + ifn_len = strlen(ifa->ifa_name); + if ((ifa->ifa_flags & IFF_UP) == 0) + ++ifn_len; + ifn_len_max = MAX(ifn_len_max, ifn_len); + } + } + snprintf(ifn_hdr_fmt, sizeof(ifn_hdr_fmt), "{T:/%%-%d.%ds}", + ifn_len_max, ifn_len_max); + snprintf(ifn_bdy_fmt, sizeof(ifn_bdy_fmt), + "{etk:name/%%s}{e:flags/0x%%x}{d:/%%-%d.%ds}", ifn_len_max, + ifn_len_max); + xo_open_list("interface"); if (!pfunc) { - if (Wflag) - xo_emit("{T:/%-7.7s}", "Name"); - else - xo_emit("{T:/%-5.5s}", "Name"); + xo_emit(ifn_hdr_fmt, "Name"); xo_emit(" {T:/%5.5s} {T:/%-13.13s} {T:/%-17.17s} {T:/%8.8s} " "{T:/%5.5s} {T:/%5.5s}", "Mtu", "Network", "Address", "Ipkts", "Ierrs", "Idrop"); @@ -336,12 +354,7 @@ intpr(void (*pfunc)(char *), int af) } else xname = name; - if (Wflag) - xo_emit("{etk:name/%s}{e:flags/0x%x}{d:/%-7.7s}", - name, ifa->ifa_flags, xname); - else - xo_emit("{etk:name/%s}{e:flags/0x%x}{d:/%-5.5s}", - name, ifa->ifa_flags, xname); + xo_emit(ifn_bdy_fmt, name, ifa->ifa_flags, xname); #define IFA_MTU(ifa) (((struct if_data *)(ifa)->ifa_data)->ifi_mtu) show_stat("lu", 6, "mtu", IFA_MTU(ifa), IFA_MTU(ifa), 0); From owner-svn-src-head@freebsd.org Wed Nov 4 15:05:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45AEBA26635; Wed, 4 Nov 2015 15:05:17 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10987104A; Wed, 4 Nov 2015 15:05:16 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4F5G7M051553; Wed, 4 Nov 2015 15:05:16 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4F5GGH051552; Wed, 4 Nov 2015 15:05:16 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511041505.tA4F5GGH051552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Wed, 4 Nov 2015 15:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290368 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 15:05:17 -0000 Author: ume Date: Wed Nov 4 15:05:15 2015 New Revision: 290368 URL: https://svnweb.freebsd.org/changeset/base/290368 Log: Unify AF_INET case and AF_INET6 case. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Wed Nov 4 14:57:46 2015 (r290367) +++ head/usr.bin/netstat/if.c Wed Nov 4 15:05:15 2015 (r290368) @@ -366,22 +366,9 @@ intpr(void (*pfunc)(char *), int af) xo_emit("{:address/%-15.15s} ", "none"); break; case AF_INET: - if (Wflag) { - xo_emit("{t:network/%-13s} ", - netname(ifa->ifa_addr, ifa->ifa_netmask)); - xo_emit("{t:address/%-17s} ", - routename(ifa->ifa_addr, numeric_addr)); - } else { - xo_emit("{t:network/%-13.13s} ", - netname(ifa->ifa_addr, ifa->ifa_netmask)); - xo_emit("{t:address/%-17.17s} ", - routename(ifa->ifa_addr, numeric_addr)); - } - - network = true; - break; #ifdef INET6 case AF_INET6: +#endif /* INET6 */ if (Wflag) { xo_emit("{t:network/%-13s} ", netname(ifa->ifa_addr, ifa->ifa_netmask)); @@ -396,7 +383,6 @@ intpr(void (*pfunc)(char *), int af) network = true; break; -#endif /* INET6 */ case AF_LINK: { struct sockaddr_dl *sdl; From owner-svn-src-head@freebsd.org Wed Nov 4 15:35:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE7C8A26B1F; Wed, 4 Nov 2015 15:35:23 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DC511E4A; Wed, 4 Nov 2015 15:35:23 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4FZMFV062151; Wed, 4 Nov 2015 15:35:22 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4FZMXB062149; Wed, 4 Nov 2015 15:35:22 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201511041535.tA4FZMXB062149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Wed, 4 Nov 2015 15:35:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290369 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 15:35:23 -0000 Author: skra Date: Wed Nov 4 15:35:22 2015 New Revision: 290369 URL: https://svnweb.freebsd.org/changeset/base/290369 Log: Fix comment about unpriviledged instructions. Now, it matches with current state after r289372. While here, do some style and comment cleanups. No functional changes. Approved by: kib (mentor) Modified: head/sys/arm/arm/trap-v6.c head/sys/arm/include/armreg.h Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Wed Nov 4 15:05:15 2015 (r290368) +++ head/sys/arm/arm/trap-v6.c Wed Nov 4 15:35:22 2015 (r290369) @@ -98,18 +98,18 @@ struct abort { * - Always fatal as we do not know what does it mean. * Imprecise External Abort: * - Always fatal, but can be handled somehow in the future. - * Now, due to PCIe buggy harware, ignored. + * Now, due to PCIe buggy hardware, ignored. * Precise External Abort: * - Always fatal, but who knows in the future??? * Debug Event: * - Special handling. * External Translation Abort (L1 & L2) - * - Always fatal as something is screwed up in page tables or harware. + * - Always fatal as something is screwed up in page tables or hardware. * Domain Fault (L1 & L2): * - Always fatal as we do not play game with domains. * Alignment Fault: - * - Everything should be aligned in kernel including user to kernel and - * vice versa data copying, so we ignore pcb_onfault, and it's always fatal. + * - Everything should be aligned in kernel with exception of user to kernel + * and vice versa data copying, so if pcb_onfault is not set, it's fatal. * We generate signal in case of abort from user mode. * Instruction cache maintenance: * - According to manual, this is translation fault during cache maintenance @@ -125,7 +125,7 @@ struct abort { * Translation Fault (L1 & L2): * - Standard fault mechanism is held including vm_fault(). * Permission Fault (L1 & L2): - * - Fast harware emulation of modify bits and in other cases, standard + * - Fast hardware emulation of modify bits and in other cases, standard * fault mechanism is held including vm_fault(). */ @@ -167,7 +167,6 @@ static const struct abort aborts[] = { {abort_fatal, "Undefined Code (0x40F)"} }; - static __inline void call_trapsignal(struct thread *td, int sig, int code, vm_offset_t addr) { @@ -195,7 +194,7 @@ call_trapsignal(struct thread *td, int s * * The imprecise means that we don't know where the abort happened, * thus FAR is undefined. The abort should not never fire, but hot - * plugging or accidental harware failure can be the cause of it. + * plugging or accidental hardware failure can be the cause of it. * If the abort happens, it can even be on different (thread) context. * Without any additional support, the abort is fatal, as we do not * know what really happened. @@ -214,7 +213,9 @@ call_trapsignal(struct thread *td, int s static __inline void abort_imprecise(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode) { - /* XXXX We can got imprecise abort as result of access + + /* + * XXX - We can got imprecise abort as result of access * to not-present PCI/PCIe configuration space. */ #if 0 @@ -245,6 +246,7 @@ static __inline void abort_debug(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode, u_int far) { + if (usermode) { struct thread *td; @@ -316,6 +318,18 @@ abort_handler(struct trapframe *tf, int return; } + /* + * ARM has a set of unprivileged load and store instructions + * (LDRT/LDRBT/STRT/STRBT ...) which are supposed to be used in other + * than user mode and OS should recognize their aborts and behave + * appropriately. However, there is no way how to do that reasonably + * in general unless we restrict the handling somehow. + * + * For now, these instructions are used only in copyin()/copyout() + * like functions where usermode buffers are checked in advance that + * they are not from KVA space. Thus, no action is needed here. + */ + #ifdef ARM_NEW_PMAP rv = pmap_fault(PCPU_GET(curpmap), far, fsr, idx, usermode); if (rv == 0) { @@ -330,7 +344,6 @@ abort_handler(struct trapframe *tf, int /* * Now, when we handled imprecise and debug aborts, the rest of * aborts should be really related to mapping. - * */ PCPU_INC(cnt.v_trap); @@ -417,7 +430,7 @@ abort_handler(struct trapframe *tf, int return; } - /* Handle remaining I cache aborts. */ + /* Handle remaining I-cache aborts. */ if (idx == FAULT_ICACHE) { if (abort_icache(tf, idx, fsr, far, prefetch, td, &ksig)) goto do_trapsignal; @@ -434,7 +447,7 @@ abort_handler(struct trapframe *tf, int * the MMU. */ - /* fusubailout is used by [fs]uswintr to avoid page faulting */ + /* fusubailout is used by [fs]uswintr to avoid page faulting. */ pcb = td->td_pcb; if (__predict_false(pcb->pcb_onfault == fusubailout)) { tf->tf_r0 = EFAULT; @@ -442,19 +455,6 @@ abort_handler(struct trapframe *tf, int return; } - /* - * QQQ: ARM has a set of unprivileged load and store instructions - * (LDRT/LDRBT/STRT/STRBT ...) which are supposed to be used - * in other than user mode and OS should recognize their - * aborts and behaved appropriately. However, there is no way - * how to do that reasonably in general unless we restrict - * the handling somehow. One way is to limit the handling for - * aborts which come from undefined mode only. - * - * Anyhow, we do not use these instructions and do not implement - * any special handling for them. - */ - va = trunc_page(far); if (va >= KERNBASE) { /* @@ -536,7 +536,7 @@ out: /* * abort_fatal() handles the following data aborts: - + * * FAULT_DEBUG - Debug Event * FAULT_ACCESS_xx - Acces Bit * FAULT_EA_PREC - Precise External Abort @@ -553,8 +553,8 @@ out: * Note: If 'l' is NULL, we assume we're dealing with a prefetch abort. */ static int -abort_fatal(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, - struct thread *td, struct ksig *ksig) +abort_fatal(struct trapframe *tf, u_int idx, u_int fsr, u_int far, + u_int prefetch, struct thread *td, struct ksig *ksig) { u_int usermode; const char *mode; @@ -609,13 +609,13 @@ abort_fatal(struct trapframe *tf, u_int * * FAULT_ALIGN - Alignment fault * - * Every memory access should be correctly aligned in kernel including - * user to kernel and vice versa data copying, so we ignore pcb_onfault, - * and it's always fatal. We generate a signal in case of abort from user mode. + * Everything should be aligned in kernel with exception of user to kernel + * and vice versa data copying, so if pcb_onfault is not set, it's fatal. + * We generate signal in case of abort from user mode. */ static int -abort_align(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, - struct thread *td, struct ksig *ksig) +abort_align(struct trapframe *tf, u_int idx, u_int fsr, u_int far, + u_int prefetch, struct thread *td, struct ksig *ksig) { u_int usermode; @@ -660,9 +660,10 @@ abort_align(struct trapframe *tf, u_int * should be held here including vm_fault() calling. */ static int -abort_icache(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, - struct thread *td, struct ksig *ksig) +abort_icache(struct trapframe *tf, u_int idx, u_int fsr, u_int far, + u_int prefetch, struct thread *td, struct ksig *ksig) { + abort_fatal(tf, idx, fsr, far, prefetch, td, ksig); return(0); } Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Wed Nov 4 15:05:15 2015 (r290368) +++ head/sys/arm/include/armreg.h Wed Nov 4 15:35:22 2015 (r290369) @@ -403,7 +403,7 @@ #define FAULT_PERM_L1 0x00D /* Permission Fault (L1) */ #define FAULT_EA_TRAN_L2 0x00E /* External Translation Abort (L2) */ #define FAULT_PERM_L2 0x00F /* Permission Fault (L2) */ -#define FAULT_TLB_CONFLICT 0x010 /* Permission Fault (L2) */ +#define FAULT_TLB_CONFLICT 0x010 /* TLB Conflict Abort */ #define FAULT_EA_IMPREC 0x016 /* Asynchronous External Abort */ #define FAULT_PE_IMPREC 0x018 /* Asynchronous Parity Error */ #define FAULT_PARITY 0x019 /* Parity Error */ From owner-svn-src-head@freebsd.org Wed Nov 4 16:59:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDE33A26D35; Wed, 4 Nov 2015 16:59:13 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4DCC121C; Wed, 4 Nov 2015 16:59:13 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4GxCi1090984; Wed, 4 Nov 2015 16:59:12 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4GxCUE090983; Wed, 4 Nov 2015 16:59:12 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511041659.tA4GxCUE090983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Wed, 4 Nov 2015 16:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290370 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 16:59:14 -0000 Author: ume Date: Wed Nov 4 16:59:12 2015 New Revision: 290370 URL: https://svnweb.freebsd.org/changeset/base/290370 Log: Simplify r290367 using asterisk for a field width and precision. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Wed Nov 4 15:35:22 2015 (r290369) +++ head/usr.bin/netstat/if.c Wed Nov 4 16:59:12 2015 (r290370) @@ -272,7 +272,6 @@ intpr(void (*pfunc)(char *), int af) struct ifaddrs *ifap, *ifa; struct ifmaddrs *ifmap, *ifma; u_int ifn_len_max = 5, ifn_len; - char ifn_hdr_fmt[14], ifn_bdy_fmt[41]; if (interval) return sidewaysintpr(); @@ -295,15 +294,10 @@ intpr(void (*pfunc)(char *), int af) ifn_len_max = MAX(ifn_len_max, ifn_len); } } - snprintf(ifn_hdr_fmt, sizeof(ifn_hdr_fmt), "{T:/%%-%d.%ds}", - ifn_len_max, ifn_len_max); - snprintf(ifn_bdy_fmt, sizeof(ifn_bdy_fmt), - "{etk:name/%%s}{e:flags/0x%%x}{d:/%%-%d.%ds}", ifn_len_max, - ifn_len_max); xo_open_list("interface"); if (!pfunc) { - xo_emit(ifn_hdr_fmt, "Name"); + xo_emit("{T:/%-*.*s}", ifn_len_max, ifn_len_max, "Name"); xo_emit(" {T:/%5.5s} {T:/%-13.13s} {T:/%-17.17s} {T:/%8.8s} " "{T:/%5.5s} {T:/%5.5s}", "Mtu", "Network", "Address", "Ipkts", "Ierrs", "Idrop"); @@ -354,7 +348,8 @@ intpr(void (*pfunc)(char *), int af) } else xname = name; - xo_emit(ifn_bdy_fmt, name, ifa->ifa_flags, xname); + xo_emit("{etk:name/%s}{e:flags/0x%x}{d:/%-*.*s}", + name, ifa->ifa_flags, ifn_len_max, ifn_len_max, xname); #define IFA_MTU(ifa) (((struct if_data *)(ifa)->ifa_data)->ifi_mtu) show_stat("lu", 6, "mtu", IFA_MTU(ifa), IFA_MTU(ifa), 0); From owner-svn-src-head@freebsd.org Wed Nov 4 19:05:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61CC9A2073E; Wed, 4 Nov 2015 19:05:06 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29BC01069; Wed, 4 Nov 2015 19:05:06 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4J55mj036082; Wed, 4 Nov 2015 19:05:05 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4J55WV036081; Wed, 4 Nov 2015 19:05:05 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511041905.tA4J55WV036081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Wed, 4 Nov 2015 19:05:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290371 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 19:05:06 -0000 Author: ume Date: Wed Nov 4 19:05:04 2015 New Revision: 290371 URL: https://svnweb.freebsd.org/changeset/base/290371 Log: Fix alignment of AF_LINK address. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Wed Nov 4 16:59:12 2015 (r290370) +++ head/usr.bin/netstat/if.c Wed Nov 4 19:05:04 2015 (r290371) @@ -391,8 +391,7 @@ intpr(void (*pfunc)(char *), int af) sdl->sdl_slen == 0) xo_emit("{P: }"); else - xo_emit("{:address/%*s}", - 32 - 3 * sdl->sdl_alen, + xo_emit("{:address/%-17.17s} ", routename(ifa->ifa_addr, 1)); link = true; break; From owner-svn-src-head@freebsd.org Wed Nov 4 19:09:44 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04E35A207DB; Wed, 4 Nov 2015 19:09:44 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C17101294; Wed, 4 Nov 2015 19:09:43 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4J9gRw036548; Wed, 4 Nov 2015 19:09:42 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4J9gIX036547; Wed, 4 Nov 2015 19:09:42 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511041909.tA4J9gIX036547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Wed, 4 Nov 2015 19:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290372 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 19:09:44 -0000 Author: ume Date: Wed Nov 4 19:09:42 2015 New Revision: 290372 URL: https://svnweb.freebsd.org/changeset/base/290372 Log: Since sa->sa_len doesn't match sizeof(struct sockaddr_dl), getnameinfo() fails against sockaddr_dl. This commit is workaround for this problem. Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Wed Nov 4 19:05:04 2015 (r290371) +++ head/usr.bin/netstat/route.c Wed Nov 4 19:09:42 2015 (r290372) @@ -527,6 +527,10 @@ routename(struct sockaddr *sa, int flags static char line[NI_MAXHOST]; int error, f; + /* XXX: sa->sa_len doesn't match sizeof(struct sockaddr_dl) */ + if (sa->sa_family == AF_LINK) + sa->sa_len = sizeof(struct sockaddr_dl); + f = (flags) ? NI_NUMERICHOST : 0; error = getnameinfo(sa, sa->sa_len, line, sizeof(line), NULL, 0, f); From owner-svn-src-head@freebsd.org Wed Nov 4 20:43:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C804A26546; Wed, 4 Nov 2015 20:43:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::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 ED0DF1173; Wed, 4 Nov 2015 20:43:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igvi2 with SMTP id i2so98273731igv.0; Wed, 04 Nov 2015 12:43:24 -0800 (PST) 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=H+zE/J03I9rn8Tndr+PLpWiuIXomxMA+FlYUjXvhvqI=; b=A8EfUSL8mLJjj+GCegUOwlOj7GPpEL7gXe6lt8tE0PV03DysabwhdpD0UeMNJ9cK6s C3DMOOEOrLtowMcEvm0mfbLO6baTXgKC052UhUOUrjoB36lP5/v/d+1KHTbkJIAukIE9 90h0j0X69PjpTXL71IFqI0S7PVILdOaFM5n8mLs1vLttDoAxax+HYgWbhFaoJLdS/c53 nve+OIiPnUH1mPlaoSZ8I78KsdhVHvcABZnGYvE1DICbzecU3lmukR4OojiWE23bE3KV 94S67UNP8XrICFXrcmsMwV8KMeXHo1DSet85kc+JpZF1AsL2ir6KTa2/Jg/yxA/6zWIi KCuA== MIME-Version: 1.0 X-Received: by 10.50.6.36 with SMTP id x4mr14897976igx.61.1446669804470; Wed, 04 Nov 2015 12:43:24 -0800 (PST) Received: by 10.36.46.66 with HTTP; Wed, 4 Nov 2015 12:43:24 -0800 (PST) In-Reply-To: References: <201510140210.t9E2A79H056595@repo.freebsd.org> <20151029212554.799f76eb@kalimero.tijl.coosemans.org> Date: Wed, 4 Nov 2015 12:43:24 -0800 Message-ID: Subject: Re: svn commit: r289279 - in head/sys: kern vm From: Adrian Chadd To: Tijl Coosemans Cc: Jeff Roberson , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 20:43:25 -0000 HI, FYI - this patch did fix my initial issue, but further work in multi-user mode caused it to still hang. I haven't diagnosed it yet; I just put back the yield call so bufdaemon could run. So yeah, we still have some work to do. It hit the same problem; stuck in a loop calling the path to wakeup bufdaemon, but then not sleeping on anything. -adrian On 2 November 2015 at 14:13, Adrian Chadd wrote: > Hi Tijl, and others; > > Here's something that Jeff came up with that fixes my problem: > > adrian@victoria:~/work/freebsd/head-embedded/src % svn diff sys/kern/ > Index: sys/kern/vfs_bio.c > =================================================================== > --- sys/kern/vfs_bio.c (revision 290048) > +++ sys/kern/vfs_bio.c (working copy) > @@ -2910,7 +2910,7 @@ > } while(buf_scan(false) == 0); > > if (reserved) > - bufspace_release(maxsize); > + atomic_subtract_long(&bufspace, maxsize); > if (bp != NULL) { > bp->b_flags |= B_INVAL; > brelse(bp); > > > Would you/others please try this and see if it improves things? It > improves things for me on these memory-starved MIPS boards. > > > > -a From owner-svn-src-head@freebsd.org Wed Nov 4 22:17:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37E6BA26565; Wed, 4 Nov 2015 22:17:31 +0000 (UTC) (envelope-from onwahe@gmail.com) 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 01C6F1AC4; Wed, 4 Nov 2015 22:17:31 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by igbdj2 with SMTP id dj2so46025980igb.1; Wed, 04 Nov 2015 14:17:30 -0800 (PST) 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=xbNLrnv4NOOZ4Mv+qx5NBBKiBPP85doN8xC/Fdi4xRI=; b=EAsDIs98mkpraO9Dq6UL0CA0pG4ydAbp+0EHRmPrMx9F5N+n61HEyHo1KGLF7pjFb0 UgS56sLkqwO+/4umnyeah1beEWDzfqdwy+/W2A/kfvXHOVPJUMRB8rQKGhpGp8Oe6Xvv tGAQcBhX5ZiePDbiPJx84EIvXsH2DtynnS+UHGrcHspDrXklr2JHZtz+7vpx/XvMMsdN EQfVa8j4ysQ9b6YntVi3v/SmqEICWIphjlwydIfBrOqrOUqYiggu9ne25ko+z11L+YIg ZN4RiWPVVPtkkt4AD7jau6tBp4E5ThWUZ2IT59vSmEWxgJKKyvul4lZuoEu2KwKFCNMt NgHg== MIME-Version: 1.0 X-Received: by 10.50.22.39 with SMTP id a7mr5990697igf.42.1446675450389; Wed, 04 Nov 2015 14:17:30 -0800 (PST) Received: by 10.64.173.228 with HTTP; Wed, 4 Nov 2015 14:17:30 -0800 (PST) In-Reply-To: References: <201510221638.t9MGc1cc053885@repo.freebsd.org> <56348FF8.3010602@gmail.com> <1446394311.91534.236.camel@freebsd.org> Date: Wed, 4 Nov 2015 23:17:30 +0100 Message-ID: Subject: Re: svn commit: r289759 - in head/sys/arm: arm include From: Svatopluk Kraus To: Jason Harmening Cc: Ian Lepore , Ganbold Tsagaankhuu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 22:17:31 -0000 On Tue, Nov 3, 2015 at 8:45 AM, Jason Harmening wrote: > > On Sun, Nov 1, 2015 at 8:11 AM, Ian Lepore wrote: >> >> >> It's almost certainly not related to sysinit ordering. This exception >> is happening during mmc probing after interrupts are enabled. >> >> It appears that the problem is the faulting code is running on one of >> the very early pre-allocated kernel stacks (perhaps in an interrupt >> handler on an idle thread stack), and these stacks are not in memory >> represented in the vm page arrays. The mmc code is using a 64-byte >> buffer on the stack and mapping it for DMA. Normally that causes a >> bounce for cacheline alignment, but unluckily in this case that buffer >> on the stack just happened to be aligned to a cacheline boundary and a >> multiple of the cacheline size, so no bounce. That causes the new sync >> logic that is based on keeping vm_page_t pointers and offsets to get a >> NULL pointer back from PHYS_TO_VM_PAGE when mapping, then it dies at >> sync time trying to dereference that. It used to work because the sync >> logic used to use the vaddr, not a page pointer. >> >> Michal was working on a patch yesterday. >> > > Ah, thanks for pointing that out Ian. I was left scratching my head > (admittedly on the road and w/o easy access to the code) wondering what on > earth would be trying to do DMA during SI_SUB_CPU. > Using of fictitious pages is not so easy here as in case pointed by kib@ where they are allocated and freed inside one function. For sync list sake, they must be allocated when a buffer is loaded and freed when is unloaded. Michal uses pmap_kextract() in case when KVA of buffer is not zero in his proof-of-concept patch: https://gist.github.com/strejda/d5ca3ed202427a2e0557 When KVA of buffer is not zero, temporary mapping is not used at all, so vm_page_t array is not needed too. IMO, buffer's physical address can be saved in sync list to be used when its KVA is not zero. Thus pmap_kextract() won't be called in dma_dcache_sync(). From owner-svn-src-head@freebsd.org Wed Nov 4 22:46:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76296A269D4; Wed, 4 Nov 2015 22:46:31 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4204415D5; Wed, 4 Nov 2015 22:46:31 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4MkUY1010552; Wed, 4 Nov 2015 22:46:30 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4MkUYU010551; Wed, 4 Nov 2015 22:46:30 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <201511042246.tA4MkUYU010551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Wed, 4 Nov 2015 22:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290373 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 22:46:31 -0000 Author: andreast Date: Wed Nov 4 22:46:30 2015 New Revision: 290373 URL: https://svnweb.freebsd.org/changeset/base/290373 Log: Add a compile time switch to distinguish between 7-bit and 8-bit I2C address usage. The comment in the code should explain the situation. Discussed with: ian@ Modified: head/sys/dev/ofw/ofw_iicbus.c Modified: head/sys/dev/ofw/ofw_iicbus.c ============================================================================== --- head/sys/dev/ofw/ofw_iicbus.c Wed Nov 4 19:09:42 2015 (r290372) +++ head/sys/dev/ofw/ofw_iicbus.c Wed Nov 4 22:46:30 2015 (r290373) @@ -148,10 +148,16 @@ ofw_iicbus_attach(device_t dev) if (dinfo == NULL) continue; /* - * OFW uses 7-bit I2C address format (see ePAPR), - * but system expect 8-bit. + * FreeBSD drivers expect I2C addresses to be expressed as + * 8-bit values. Apple OFW data contains 8-bit values, but + * Linux FDT data contains 7-bit values, so shift them up to + * 8-bit format. */ +#ifdef AIM + dinfo->opd_dinfo.addr = paddr; +#else dinfo->opd_dinfo.addr = paddr << 1; +#endif if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, child) != 0) { free(dinfo, M_DEVBUF); From owner-svn-src-head@freebsd.org Wed Nov 4 22:49:36 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CF32A26A4D; Wed, 4 Nov 2015 22:49:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E66061896; Wed, 4 Nov 2015 22:49:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4MnYpA010717; Wed, 4 Nov 2015 22:49:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4MnYrP010716; Wed, 4 Nov 2015 22:49:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511042249.tA4MnYrP010716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 4 Nov 2015 22:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290374 - head/sys/dev/filemon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 22:49:36 -0000 Author: bdrewery Date: Wed Nov 4 22:49:34 2015 New Revision: 290374 URL: https://svnweb.freebsd.org/changeset/base/290374 Log: Remove unneeded mutex.h include, missed in r287155. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/filemon/filemon.c Modified: head/sys/dev/filemon/filemon.c ============================================================================== --- head/sys/dev/filemon/filemon.c Wed Nov 4 22:46:30 2015 (r290373) +++ head/sys/dev/filemon/filemon.c Wed Nov 4 22:49:34 2015 (r290374) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-head@freebsd.org Wed Nov 4 23:52:21 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1378A26632; Wed, 4 Nov 2015 23:52:21 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 609A515CC; Wed, 4 Nov 2015 23:52:21 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4NqKZQ031883; Wed, 4 Nov 2015 23:52:20 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4NqKp5031879; Wed, 4 Nov 2015 23:52:20 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201511042352.tA4NqKp5031879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 4 Nov 2015 23:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290375 - head/lib/libopenbsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 23:52:21 -0000 Author: rodrigc Date: Wed Nov 4 23:52:19 2015 New Revision: 290375 URL: https://svnweb.freebsd.org/changeset/base/290375 Log: Import imsg from OpenBSD's libutil. imsg provides functions for communication between processes using sockets. imsg is used by programs in OpenBSD such as ypldap. Added: head/lib/libopenbsd/imsg-buffer.c (contents, props changed) head/lib/libopenbsd/imsg.c (contents, props changed) head/lib/libopenbsd/imsg.h (contents, props changed) head/lib/libopenbsd/imsg_init.3 (contents, props changed) Added: head/lib/libopenbsd/imsg-buffer.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libopenbsd/imsg-buffer.c Wed Nov 4 23:52:19 2015 (r290375) @@ -0,0 +1,309 @@ +/* $OpenBSD: imsg-buffer.c,v 1.7 2015/07/12 18:40:49 nicm Exp $ */ + +/* + * Copyright (c) 2003, 2004 Henning Brauer + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "imsg.h" + +int ibuf_realloc(struct ibuf *, size_t); +void ibuf_enqueue(struct msgbuf *, struct ibuf *); +void ibuf_dequeue(struct msgbuf *, struct ibuf *); + +struct ibuf * +ibuf_open(size_t len) +{ + struct ibuf *buf; + + if ((buf = calloc(1, sizeof(struct ibuf))) == NULL) + return (NULL); + if ((buf->buf = malloc(len)) == NULL) { + free(buf); + return (NULL); + } + buf->size = buf->max = len; + buf->fd = -1; + + return (buf); +} + +struct ibuf * +ibuf_dynamic(size_t len, size_t max) +{ + struct ibuf *buf; + + if (max < len) + return (NULL); + + if ((buf = ibuf_open(len)) == NULL) + return (NULL); + + if (max > 0) + buf->max = max; + + return (buf); +} + +int +ibuf_realloc(struct ibuf *buf, size_t len) +{ + u_char *b; + + /* on static buffers max is eq size and so the following fails */ + if (buf->wpos + len > buf->max) { + errno = ERANGE; + return (-1); + } + + b = realloc(buf->buf, buf->wpos + len); + if (b == NULL) + return (-1); + buf->buf = b; + buf->size = buf->wpos + len; + + return (0); +} + +int +ibuf_add(struct ibuf *buf, const void *data, size_t len) +{ + if (buf->wpos + len > buf->size) + if (ibuf_realloc(buf, len) == -1) + return (-1); + + memcpy(buf->buf + buf->wpos, data, len); + buf->wpos += len; + return (0); +} + +void * +ibuf_reserve(struct ibuf *buf, size_t len) +{ + void *b; + + if (buf->wpos + len > buf->size) + if (ibuf_realloc(buf, len) == -1) + return (NULL); + + b = buf->buf + buf->wpos; + buf->wpos += len; + return (b); +} + +void * +ibuf_seek(struct ibuf *buf, size_t pos, size_t len) +{ + /* only allowed to seek in already written parts */ + if (pos + len > buf->wpos) + return (NULL); + + return (buf->buf + pos); +} + +size_t +ibuf_size(struct ibuf *buf) +{ + return (buf->wpos); +} + +size_t +ibuf_left(struct ibuf *buf) +{ + return (buf->max - buf->wpos); +} + +void +ibuf_close(struct msgbuf *msgbuf, struct ibuf *buf) +{ + ibuf_enqueue(msgbuf, buf); +} + +int +ibuf_write(struct msgbuf *msgbuf) +{ + struct iovec iov[IOV_MAX]; + struct ibuf *buf; + unsigned int i = 0; + ssize_t n; + + memset(&iov, 0, sizeof(iov)); + TAILQ_FOREACH(buf, &msgbuf->bufs, entry) { + if (i >= IOV_MAX) + break; + iov[i].iov_base = buf->buf + buf->rpos; + iov[i].iov_len = buf->wpos - buf->rpos; + i++; + } + +again: + if ((n = writev(msgbuf->fd, iov, i)) == -1) { + if (errno == EINTR) + goto again; + if (errno == ENOBUFS) + errno = EAGAIN; + return (-1); + } + + if (n == 0) { /* connection closed */ + errno = 0; + return (0); + } + + msgbuf_drain(msgbuf, n); + + return (1); +} + +void +ibuf_free(struct ibuf *buf) +{ + free(buf->buf); + free(buf); +} + +void +msgbuf_init(struct msgbuf *msgbuf) +{ + msgbuf->queued = 0; + msgbuf->fd = -1; + TAILQ_INIT(&msgbuf->bufs); +} + +void +msgbuf_drain(struct msgbuf *msgbuf, size_t n) +{ + struct ibuf *buf, *next; + + for (buf = TAILQ_FIRST(&msgbuf->bufs); buf != NULL && n > 0; + buf = next) { + next = TAILQ_NEXT(buf, entry); + if (buf->rpos + n >= buf->wpos) { + n -= buf->wpos - buf->rpos; + ibuf_dequeue(msgbuf, buf); + } else { + buf->rpos += n; + n = 0; + } + } +} + +void +msgbuf_clear(struct msgbuf *msgbuf) +{ + struct ibuf *buf; + + while ((buf = TAILQ_FIRST(&msgbuf->bufs)) != NULL) + ibuf_dequeue(msgbuf, buf); +} + +int +msgbuf_write(struct msgbuf *msgbuf) +{ + struct iovec iov[IOV_MAX]; + struct ibuf *buf; + unsigned int i = 0; + ssize_t n; + struct msghdr msg; + struct cmsghdr *cmsg; + union { + struct cmsghdr hdr; + char buf[CMSG_SPACE(sizeof(int))]; + } cmsgbuf; + + memset(&iov, 0, sizeof(iov)); + memset(&msg, 0, sizeof(msg)); + memset(&cmsgbuf, 0, sizeof(cmsgbuf)); + TAILQ_FOREACH(buf, &msgbuf->bufs, entry) { + if (i >= IOV_MAX) + break; + iov[i].iov_base = buf->buf + buf->rpos; + iov[i].iov_len = buf->wpos - buf->rpos; + i++; + if (buf->fd != -1) + break; + } + + msg.msg_iov = iov; + msg.msg_iovlen = i; + + if (buf != NULL && buf->fd != -1) { + msg.msg_control = (caddr_t)&cmsgbuf.buf; + msg.msg_controllen = sizeof(cmsgbuf.buf); + cmsg = CMSG_FIRSTHDR(&msg); + cmsg->cmsg_len = CMSG_LEN(sizeof(int)); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + *(int *)CMSG_DATA(cmsg) = buf->fd; + } + +again: + if ((n = sendmsg(msgbuf->fd, &msg, 0)) == -1) { + if (errno == EINTR) + goto again; + if (errno == ENOBUFS) + errno = EAGAIN; + return (-1); + } + + if (n == 0) { /* connection closed */ + errno = 0; + return (0); + } + + /* + * assumption: fd got sent if sendmsg sent anything + * this works because fds are passed one at a time + */ + if (buf != NULL && buf->fd != -1) { + close(buf->fd); + buf->fd = -1; + } + + msgbuf_drain(msgbuf, n); + + return (1); +} + +void +ibuf_enqueue(struct msgbuf *msgbuf, struct ibuf *buf) +{ + TAILQ_INSERT_TAIL(&msgbuf->bufs, buf, entry); + msgbuf->queued++; +} + +void +ibuf_dequeue(struct msgbuf *msgbuf, struct ibuf *buf) +{ + TAILQ_REMOVE(&msgbuf->bufs, buf, entry); + + if (buf->fd != -1) + close(buf->fd); + + msgbuf->queued--; + ibuf_free(buf); +} Added: head/lib/libopenbsd/imsg.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libopenbsd/imsg.c Wed Nov 4 23:52:19 2015 (r290375) @@ -0,0 +1,307 @@ +/* $OpenBSD: imsg.c,v 1.10 2015/07/19 07:18:59 nicm Exp $ */ + +/* + * Copyright (c) 2003, 2004 Henning Brauer + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "imsg.h" + +int imsg_fd_overhead = 0; + +int imsg_get_fd(struct imsgbuf *); + +void +imsg_init(struct imsgbuf *ibuf, int fd) +{ + msgbuf_init(&ibuf->w); + memset(&ibuf->r, 0, sizeof(ibuf->r)); + ibuf->fd = fd; + ibuf->w.fd = fd; + ibuf->pid = getpid(); + TAILQ_INIT(&ibuf->fds); +} + +ssize_t +imsg_read(struct imsgbuf *ibuf) +{ + struct msghdr msg; + struct cmsghdr *cmsg; + union { + struct cmsghdr hdr; + char buf[CMSG_SPACE(sizeof(int) * 1)]; + } cmsgbuf; + struct iovec iov; + ssize_t n = -1; + int fd; + struct imsg_fd *ifd; + + memset(&msg, 0, sizeof(msg)); + memset(&cmsgbuf, 0, sizeof(cmsgbuf)); + + iov.iov_base = ibuf->r.buf + ibuf->r.wpos; + iov.iov_len = sizeof(ibuf->r.buf) - ibuf->r.wpos; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + msg.msg_control = &cmsgbuf.buf; + msg.msg_controllen = sizeof(cmsgbuf.buf); + + if ((ifd = calloc(1, sizeof(struct imsg_fd))) == NULL) + return (-1); + +again: + if (getdtablecount() + imsg_fd_overhead + + (CMSG_SPACE(sizeof(int))-CMSG_SPACE(0))/sizeof(int) + >= getdtablesize()) { + errno = EAGAIN; + free(ifd); + return (-1); + } + + if ((n = recvmsg(ibuf->fd, &msg, 0)) == -1) { + if (errno == EMSGSIZE) + goto fail; + if (errno != EINTR && errno != EAGAIN) + goto fail; + goto again; + } + + ibuf->r.wpos += n; + + for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; + cmsg = CMSG_NXTHDR(&msg, cmsg)) { + if (cmsg->cmsg_level == SOL_SOCKET && + cmsg->cmsg_type == SCM_RIGHTS) { + int i; + int j; + + /* + * We only accept one file descriptor. Due to C + * padding rules, our control buffer might contain + * more than one fd, and we must close them. + */ + j = ((char *)cmsg + cmsg->cmsg_len - + (char *)CMSG_DATA(cmsg)) / sizeof(int); + for (i = 0; i < j; i++) { + fd = ((int *)CMSG_DATA(cmsg))[i]; + if (ifd != NULL) { + ifd->fd = fd; + TAILQ_INSERT_TAIL(&ibuf->fds, ifd, + entry); + ifd = NULL; + } else + close(fd); + } + } + /* we do not handle other ctl data level */ + } + +fail: + if (ifd) + free(ifd); + return (n); +} + +ssize_t +imsg_get(struct imsgbuf *ibuf, struct imsg *imsg) +{ + size_t av, left, datalen; + + av = ibuf->r.wpos; + + if (IMSG_HEADER_SIZE > av) + return (0); + + memcpy(&imsg->hdr, ibuf->r.buf, sizeof(imsg->hdr)); + if (imsg->hdr.len < IMSG_HEADER_SIZE || + imsg->hdr.len > MAX_IMSGSIZE) { + errno = ERANGE; + return (-1); + } + if (imsg->hdr.len > av) + return (0); + datalen = imsg->hdr.len - IMSG_HEADER_SIZE; + ibuf->r.rptr = ibuf->r.buf + IMSG_HEADER_SIZE; + if (datalen == 0) + imsg->data = NULL; + else if ((imsg->data = malloc(datalen)) == NULL) + return (-1); + + if (imsg->hdr.flags & IMSGF_HASFD) + imsg->fd = imsg_get_fd(ibuf); + else + imsg->fd = -1; + + memcpy(imsg->data, ibuf->r.rptr, datalen); + + if (imsg->hdr.len < av) { + left = av - imsg->hdr.len; + memmove(&ibuf->r.buf, ibuf->r.buf + imsg->hdr.len, left); + ibuf->r.wpos = left; + } else + ibuf->r.wpos = 0; + + return (datalen + IMSG_HEADER_SIZE); +} + +int +imsg_compose(struct imsgbuf *ibuf, u_int32_t type, u_int32_t peerid, + pid_t pid, int fd, const void *data, u_int16_t datalen) +{ + struct ibuf *wbuf; + + if ((wbuf = imsg_create(ibuf, type, peerid, pid, datalen)) == NULL) + return (-1); + + if (imsg_add(wbuf, data, datalen) == -1) + return (-1); + + wbuf->fd = fd; + + imsg_close(ibuf, wbuf); + + return (1); +} + +int +imsg_composev(struct imsgbuf *ibuf, u_int32_t type, u_int32_t peerid, + pid_t pid, int fd, const struct iovec *iov, int iovcnt) +{ + struct ibuf *wbuf; + int i, datalen = 0; + + for (i = 0; i < iovcnt; i++) + datalen += iov[i].iov_len; + + if ((wbuf = imsg_create(ibuf, type, peerid, pid, datalen)) == NULL) + return (-1); + + for (i = 0; i < iovcnt; i++) + if (imsg_add(wbuf, iov[i].iov_base, iov[i].iov_len) == -1) + return (-1); + + wbuf->fd = fd; + + imsg_close(ibuf, wbuf); + + return (1); +} + +/* ARGSUSED */ +struct ibuf * +imsg_create(struct imsgbuf *ibuf, u_int32_t type, u_int32_t peerid, + pid_t pid, u_int16_t datalen) +{ + struct ibuf *wbuf; + struct imsg_hdr hdr; + + datalen += IMSG_HEADER_SIZE; + if (datalen > MAX_IMSGSIZE) { + errno = ERANGE; + return (NULL); + } + + hdr.type = type; + hdr.flags = 0; + hdr.peerid = peerid; + if ((hdr.pid = pid) == 0) + hdr.pid = ibuf->pid; + if ((wbuf = ibuf_dynamic(datalen, MAX_IMSGSIZE)) == NULL) { + return (NULL); + } + if (imsg_add(wbuf, &hdr, sizeof(hdr)) == -1) + return (NULL); + + return (wbuf); +} + +int +imsg_add(struct ibuf *msg, const void *data, u_int16_t datalen) +{ + if (datalen) + if (ibuf_add(msg, data, datalen) == -1) { + ibuf_free(msg); + return (-1); + } + return (datalen); +} + +void +imsg_close(struct imsgbuf *ibuf, struct ibuf *msg) +{ + struct imsg_hdr *hdr; + + hdr = (struct imsg_hdr *)msg->buf; + + hdr->flags &= ~IMSGF_HASFD; + if (msg->fd != -1) + hdr->flags |= IMSGF_HASFD; + + hdr->len = (u_int16_t)msg->wpos; + + ibuf_close(&ibuf->w, msg); +} + +void +imsg_free(struct imsg *imsg) +{ + free(imsg->data); +} + +int +imsg_get_fd(struct imsgbuf *ibuf) +{ + int fd; + struct imsg_fd *ifd; + + if ((ifd = TAILQ_FIRST(&ibuf->fds)) == NULL) + return (-1); + + fd = ifd->fd; + TAILQ_REMOVE(&ibuf->fds, ifd, entry); + free(ifd); + + return (fd); +} + +int +imsg_flush(struct imsgbuf *ibuf) +{ + while (ibuf->w.queued) + if (msgbuf_write(&ibuf->w) <= 0) + return (-1); + return (0); +} + +void +imsg_clear(struct imsgbuf *ibuf) +{ + int fd; + + msgbuf_clear(&ibuf->w); + while ((fd = imsg_get_fd(ibuf)) != -1) + close(fd); +} Added: head/lib/libopenbsd/imsg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libopenbsd/imsg.h Wed Nov 4 23:52:19 2015 (r290375) @@ -0,0 +1,114 @@ +/* $OpenBSD: imsg.h,v 1.3 2013/12/26 17:32:33 eric Exp $ */ + +/* + * Copyright (c) 2006, 2007 Pierre-Yves Ritschard + * Copyright (c) 2006, 2007, 2008 Reyk Floeter + * Copyright (c) 2003, 2004 Henning Brauer + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ + +#ifndef _IMSG_H_ +#define _IMSG_H_ + +#define IBUF_READ_SIZE 65535 +#define IMSG_HEADER_SIZE sizeof(struct imsg_hdr) +#define MAX_IMSGSIZE 16384 + +struct ibuf { + TAILQ_ENTRY(ibuf) entry; + u_char *buf; + size_t size; + size_t max; + size_t wpos; + size_t rpos; + int fd; +}; + +struct msgbuf { + TAILQ_HEAD(, ibuf) bufs; + u_int32_t queued; + int fd; +}; + +struct ibuf_read { + u_char buf[IBUF_READ_SIZE]; + u_char *rptr; + size_t wpos; +}; + +struct imsg_fd { + TAILQ_ENTRY(imsg_fd) entry; + int fd; +}; + +struct imsgbuf { + TAILQ_HEAD(, imsg_fd) fds; + struct ibuf_read r; + struct msgbuf w; + int fd; + pid_t pid; +}; + +#define IMSGF_HASFD 1 + +struct imsg_hdr { + u_int32_t type; + u_int16_t len; + u_int16_t flags; + u_int32_t peerid; + u_int32_t pid; +}; + +struct imsg { + struct imsg_hdr hdr; + int fd; + void *data; +}; + + +/* buffer.c */ +struct ibuf *ibuf_open(size_t); +struct ibuf *ibuf_dynamic(size_t, size_t); +int ibuf_add(struct ibuf *, const void *, size_t); +void *ibuf_reserve(struct ibuf *, size_t); +void *ibuf_seek(struct ibuf *, size_t, size_t); +size_t ibuf_size(struct ibuf *); +size_t ibuf_left(struct ibuf *); +void ibuf_close(struct msgbuf *, struct ibuf *); +int ibuf_write(struct msgbuf *); +void ibuf_free(struct ibuf *); +void msgbuf_init(struct msgbuf *); +void msgbuf_clear(struct msgbuf *); +int msgbuf_write(struct msgbuf *); +void msgbuf_drain(struct msgbuf *, size_t); + +/* imsg.c */ +void imsg_init(struct imsgbuf *, int); +ssize_t imsg_read(struct imsgbuf *); +ssize_t imsg_get(struct imsgbuf *, struct imsg *); +int imsg_compose(struct imsgbuf *, u_int32_t, u_int32_t, pid_t, + int, const void *, u_int16_t); +int imsg_composev(struct imsgbuf *, u_int32_t, u_int32_t, pid_t, + int, const struct iovec *, int); +struct ibuf *imsg_create(struct imsgbuf *, u_int32_t, u_int32_t, pid_t, + u_int16_t); +int imsg_add(struct ibuf *, const void *, u_int16_t); +void imsg_close(struct imsgbuf *, struct ibuf *); +void imsg_free(struct imsg *); +int imsg_flush(struct imsgbuf *); +void imsg_clear(struct imsgbuf *); + +#endif Added: head/lib/libopenbsd/imsg_init.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libopenbsd/imsg_init.3 Wed Nov 4 23:52:19 2015 (r290375) @@ -0,0 +1,549 @@ +.\" $OpenBSD: imsg_init.3,v 1.13 2015/07/11 16:23:59 deraadt Exp $ +.\" +.\" Copyright (c) 2010 Nicholas Marriott +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER +.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.\" $FreeBSD$ +.\" +.Dd $Mdocdate: July 11 2015 $ +.Dt IMSG_INIT 3 +.Os +.Sh NAME +.Nm imsg_init , +.Nm imsg_read , +.Nm imsg_get , +.Nm imsg_compose , +.Nm imsg_composev , +.Nm imsg_create , +.Nm imsg_add , +.Nm imsg_close , +.Nm imsg_free , +.Nm imsg_flush , +.Nm imsg_clear , +.Nm ibuf_open , +.Nm ibuf_dynamic , +.Nm ibuf_add , +.Nm ibuf_reserve , +.Nm ibuf_seek , +.Nm ibuf_size , +.Nm ibuf_left , +.Nm ibuf_close , +.Nm ibuf_write , +.Nm ibuf_free , +.Nm msgbuf_init , +.Nm msgbuf_clear , +.Nm msgbuf_write , +.Nm msgbuf_drain +.Nd IPC messaging functions +.Sh SYNOPSIS +.In sys/types.h +.In sys/queue.h +.In sys/uio.h +.In imsg.h +.Ft void +.Fn imsg_init "struct imsgbuf *ibuf" "int fd" +.Ft ssize_t +.Fn imsg_read "struct imsgbuf *ibuf" +.Ft ssize_t +.Fn imsg_get "struct imsgbuf *ibuf" "struct imsg *imsg" +.Ft int +.Fn imsg_compose "struct imsgbuf *ibuf" "u_int32_t type" "uint32_t peerid" \ + "pid_t pid" "int fd" "const void *data" "u_int16_t datalen" +.Ft int +.Fn imsg_composev "struct imsgbuf *ibuf" "u_int32_t type" "u_int32_t peerid" \ + "pid_t pid" "int fd" "const struct iovec *iov" "int iovcnt" +.Ft "struct ibuf *" +.Fn imsg_create "struct imsgbuf *ibuf" "u_int32_t type" "u_int32_t peerid" \ + "pid_t pid" "u_int16_t datalen" +.Ft int +.Fn imsg_add "struct ibuf *buf" "const void *data" "u_int16_t datalen" +.Ft void +.Fn imsg_close "struct imsgbuf *ibuf" "struct ibuf *msg" +.Ft void +.Fn imsg_free "struct imsg *imsg" +.Ft int +.Fn imsg_flush "struct imsgbuf *ibuf" +.Ft void +.Fn imsg_clear "struct imsgbuf *ibuf" +.Ft "struct ibuf *" +.Fn ibuf_open "size_t len" +.Ft "struct ibuf *" +.Fn ibuf_dynamic "size_t len" "size_t max" +.Ft int +.Fn ibuf_add "struct ibuf *buf" "const void *data" "size_t len" +.Ft "void *" +.Fn ibuf_reserve "struct ibuf *buf" "size_t len" +.Ft "void *" +.Fn ibuf_seek "struct ibuf *buf" "size_t pos" "size_t len" +.Ft size_t +.Fn ibuf_size "struct ibuf *buf" +.Ft size_t +.Fn ibuf_left "struct ibuf *buf" +.Ft void +.Fn ibuf_close "struct msgbuf *msgbuf" "struct ibuf *buf" +.Ft int +.Fn ibuf_write "struct msgbuf *msgbuf" +.Ft void +.Fn ibuf_free "struct ibuf *buf" +.Ft void +.Fn msgbuf_init "struct msgbuf *msgbuf" +.Ft void +.Fn msgbuf_clear "struct msgbuf *msgbuf" +.Ft int +.Fn msgbuf_write "struct msgbuf *msgbuf" +.Ft void +.Fn msgbuf_drain "struct msgbuf *msgbuf" "size_t n" +.Sh DESCRIPTION +The +.Nm imsg +functions provide a simple mechanism for communication between processes +using sockets. +Each transmitted message is guaranteed to be presented to the receiving program +whole. +They are commonly used in privilege separated processes, where processes with +different rights are required to cooperate. +.Pp +A program using these functions should be linked with +.Em -lutil . +.Pp +The basic +.Nm +structure is the +.Em imsgbuf , +which wraps a file descriptor and represents one side of a channel on which +messages are sent and received: +.Bd -literal -offset indent +struct imsgbuf { + TAILQ_HEAD(, imsg_fd) fds; + struct ibuf_read r; + struct msgbuf w; + int fd; + pid_t pid; +}; +.Ed +.Pp +.Fn imsg_init +is a routine which initializes +.Fa ibuf +as one side of a channel associated with +.Fa fd . +The file descriptor is used to send and receive messages, +but is not closed by any of the imsg functions. +An imsgbuf is initialized with the +.Em w +member as the output buffer queue, +.Em fd +with the file descriptor passed to +.Fn imsg_init +and the other members for internal use only. +.Pp +The +.Fn imsg_clear +function frees any data allocated as part of an imsgbuf. +.Pp +.Fn imsg_create , +.Fn imsg_add +and +.Fn imsg_close +are generic construction routines for messages that are to be sent using an +imsgbuf. +.Pp +.Fn imsg_create +creates a new message with header specified by +.Fa type , +.Fa peerid +and +.Fa pid . +A +.Fa pid +of zero uses the process ID returned by +.Xr getpid 2 +when +.Fa ibuf +was initialized. +In addition to this common imsg header, +.Fa datalen +bytes of space may be reserved for attaching to this imsg. +This space is populated using +.Fn imsg_add . +Additionally, the file descriptor +.Fa fd +may be passed over the socket to the other process. +If +.Fa fd +is given, it is closed in the sending program after the message is sent. +A value of \-1 indicates no file descriptor should be passed. +.Fn imsg_create +returns a pointer to a new message if it succeeds, NULL otherwise. +.Pp +.Fn imsg_add +appends to +.Fa imsg +.Fa len +bytes of ancillary data pointed to by +.Fa buf . +It returns +.Fa len +if it succeeds, \-1 otherwise. +.Pp +.Fn imsg_close +completes creation of +.Fa imsg +by adding it to +.Fa imsgbuf +output buffer. +.Pp +.Fn imsg_compose +is a routine which is used to quickly create and queue an imsg. +It takes the same parameters as the +.Fn imsg_create , +.Fn imsg_add +and +.Fn imsg_close +routines, +except that only one ancillary data buffer can be provided. +This routine returns 1 if it succeeds, \-1 otherwise. +.Pp +.Fn imsg_composev +is similar to +.Fn imsg_compose . +It takes the same parameters, except that the ancillary data buffer is specified +by +.Fa iovec . +.Pp +.Fn imsg_flush +is a function which calls +.Fn msgbuf_write +in a loop until all imsgs in the output buffer are sent. +It returns 0 if it succeeds, \-1 otherwise. +.Pp +The +.Fn imsg_read +routine reads pending data with +.Xr recvmsg 2 +and queues it as individual messages on +.Fa imsgbuf . +It returns the number of bytes read on success, or \-1 on error. +A return value of \-1 from +.Fn imsg_read +invalidates +.Fa imsgbuf , +and renders it suitable only for passing to +.Fn imsg_clear . +.Pp +.Fn imsg_get +fills in an individual imsg pending on +.Fa imsgbuf +into the structure pointed to by +.Fa imsg . +It returns the total size of the message, 0 if no messages are ready, or \-1 +for an error. +Received messages are returned as a +.Em struct imsg , +which must be freed by +.Fn imsg_free +when no longer required. +.Em struct imsg +has this form: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Nov 5 00:11:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7CB6A26D6F; Thu, 5 Nov 2015 00:11:04 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::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 2BD4F1E88; Thu, 5 Nov 2015 00:11:04 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by lfs39 with SMTP id 39so20444025lfs.3; Wed, 04 Nov 2015 16:11:02 -0800 (PST) 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=rXT0IGHUab14ykYIgqGCNe3RPJ277nWS/VeihUtT36s=; b=ZvmJmdA9w7O9WCDmWLvqjG/H1IB6serzX6gU09dWAeM+Jc5P4Ygr4+eQ2YDf9+4fV2 7LTCywS1XRaMh61l67oBBsAMfEc7IhklYosj5bPCeSFvA/rTv/mDJWE3lb7jMA4sMb9U f437tPeAOQnVt9TfalbzWj2MttYhEAo2aTvcXGNow/JzsJmsR56wcFhLEq2ypbILtLAQ CdYDj9T+Z2wNQnTl0cSilKRsGgGQcT2so9zm7g+V2fE6KbMHEXmAqm38x6y4qaVFZn9w avddnHy6r+M5mb3B17U3lYfVfuxRaFOgf/CXgBBRWDcvuS3WsVzfuSnmYupfB3woMSvl 958Q== MIME-Version: 1.0 X-Received: by 10.25.26.79 with SMTP id a76mr1080341lfa.109.1446682261916; Wed, 04 Nov 2015 16:11:01 -0800 (PST) Received: by 10.112.126.104 with HTTP; Wed, 4 Nov 2015 16:11:01 -0800 (PST) In-Reply-To: References: <201510221638.t9MGc1cc053885@repo.freebsd.org> <56348FF8.3010602@gmail.com> <1446394311.91534.236.camel@freebsd.org> Date: Wed, 4 Nov 2015 16:11:01 -0800 Message-ID: Subject: Re: svn commit: r289759 - in head/sys/arm: arm include From: Jason Harmening To: Svatopluk Kraus Cc: Ian Lepore , Ganbold Tsagaankhuu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 00:11:04 -0000 On Wed, Nov 4, 2015 at 2:17 PM, Svatopluk Kraus wrote: > On Tue, Nov 3, 2015 at 8:45 AM, Jason Harmening > wrote: > > > > On Sun, Nov 1, 2015 at 8:11 AM, Ian Lepore wrote: > >> > >> > >> It's almost certainly not related to sysinit ordering. This exception > >> is happening during mmc probing after interrupts are enabled. > >> > >> It appears that the problem is the faulting code is running on one of > >> the very early pre-allocated kernel stacks (perhaps in an interrupt > >> handler on an idle thread stack), and these stacks are not in memory > >> represented in the vm page arrays. The mmc code is using a 64-byte > >> buffer on the stack and mapping it for DMA. Normally that causes a > >> bounce for cacheline alignment, but unluckily in this case that buffer > >> on the stack just happened to be aligned to a cacheline boundary and a > >> multiple of the cacheline size, so no bounce. That causes the new sync > >> logic that is based on keeping vm_page_t pointers and offsets to get a > >> NULL pointer back from PHYS_TO_VM_PAGE when mapping, then it dies at > >> sync time trying to dereference that. It used to work because the sync > >> logic used to use the vaddr, not a page pointer. > >> > >> Michal was working on a patch yesterday. > >> > > > > Ah, thanks for pointing that out Ian. I was left scratching my head > > (admittedly on the road and w/o easy access to the code) wondering what > on > > earth would be trying to do DMA during SI_SUB_CPU. > > > > > Using of fictitious pages is not so easy here as in case pointed by > kib@ where they are allocated and freed inside one function. For sync > list sake, they must be allocated when a buffer is loaded and freed > when is unloaded. > > Michal uses pmap_kextract() in case when KVA of buffer is not zero in > his proof-of-concept patch: > https://gist.github.com/strejda/d5ca3ed202427a2e0557 > When KVA of buffer is not zero, temporary mapping is not used at all, > so vm_page_t array is not needed too. > > IMO, buffer's physical address can be saved in sync list to be used > when its KVA is not zero. Thus pmap_kextract() won't be called in > dma_dcache_sync(). > I like the idea of storing off the physical address. If you want to save space in the sync list, I think you can place busaddr and pages in a union, using vaddr == 0 to select which field to use. Some people frown upon use of unions, though. Any reason the panics on PHYS_TO_VM_PAGE in load_buffer() and load_phys() shouldn't be KASSERTs instead? From owner-svn-src-head@freebsd.org Thu Nov 5 00:21:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C726BA25123; Thu, 5 Nov 2015 00:21:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id AE997135D; Thu, 5 Nov 2015 00:21:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id A851911EF; Thu, 5 Nov 2015 00:21:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 458BB17508; Thu, 5 Nov 2015 00:21:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id TPasWr9YjGNG; Thu, 5 Nov 2015 00:21:37 +0000 (UTC) Subject: Re: svn commit: r290252 - in head: . etc/defaults etc/periodic/daily tools/build/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 8757117502 To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511020105.tA215YhV095725@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <563AA10C.6050009@FreeBSD.org> Date: Wed, 4 Nov 2015 16:21:32 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201511020105.tA215YhV095725@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 00:21:45 -0000 On 11/1/15 5:05 PM, Garrett Cooper wrote: > Author: ngie > Date: Mon Nov 2 01:05:34 2015 > New Revision: 290252 > URL: https://svnweb.freebsd.org/changeset/base/290252 > > Log: > Rename etc/periodic/daily/430.status-rwho to periodic/daily/430.status-uptime > > The command was checking local/remote system uptime, so rename the script to > match its function and to avoid confusion > > The controlling variable in /etc/periodic.conf has been renamed from > daily_status_rwho_enable to daily_status_uptime_enable. > > MFC after: 3 days > Reported by: Peter Jeremy > Relnotes: yes > Sponsored by: EMC / Isilon Storage Division > > Added: > head/etc/periodic/daily/430.status-uptime > - copied, changed from r290251, head/etc/periodic/daily/430.status-rwho > Deleted: > head/etc/periodic/daily/430.status-rwho > Modified: > head/ObsoleteFiles.inc > head/etc/defaults/periodic.conf > head/etc/periodic/daily/Makefile > head/tools/build/mk/OptionalObsoleteFiles.inc > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Mon Nov 2 00:42:31 2015 (r290251) > +++ head/ObsoleteFiles.inc Mon Nov 2 01:05:34 2015 (r290252) > @@ -38,6 +38,8 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20151101: 430.status-rwho was renamed to 430.status-uptime > +OLD_FILES+=etc/periodic/daily/430.status-rwho > # 20151030: OpenSSL 1.0.2d import > OLD_FILES+=usr/share/openssl/man/man3/CMS_set1_signer_certs.3.gz > OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_ctrl.3.gz > > Modified: head/etc/defaults/periodic.conf > ============================================================================== > --- head/etc/defaults/periodic.conf Mon Nov 2 00:42:31 2015 (r290251) > +++ head/etc/defaults/periodic.conf Mon Nov 2 01:05:34 2015 (r290252) > @@ -115,8 +115,8 @@ daily_status_network_enable="YES" # Ch > daily_status_network_usedns="YES" # DNS lookups are ok > daily_status_network_netstat_flags="-d" # netstat(1) flags > > -# 430.status-rwho > -daily_status_rwho_enable="YES" # Check system status > +# 430.status-uptime > +daily_status_uptime_enable="YES" # Check system uptime > This seems a bit gratuitous and against POLA. -- Regards, Bryan Drewery From owner-svn-src-head@freebsd.org Thu Nov 5 00:40:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABE21A2542D; Thu, 5 Nov 2015 00:40:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qg0-x230.google.com (mail-qg0-x230.google.com [IPv6:2607:f8b0:400d:c04::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 6567B1CBF; Thu, 5 Nov 2015 00:40:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qgad10 with SMTP id d10so54690642qga.3; Wed, 04 Nov 2015 16:40:00 -0800 (PST) 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=nqp+ZgSDYZqpAjCLu71RFtgCfk3PdxXy2M4eYnlWBI0=; b=WQbVK10lsrW4/PZanzSGOwIM+oq+V8TB68OtB1S7oi6hMWWYiU8GZiV2Pyd2VYBfqW MbEAP1gJOxM1/tYEO/wv4OFb35WzhDTf/KI/IjNC7jw5VmhQIYwAHoRkrGjkJZ/BM9rO 8zqU6cNsio3XqFxhEZaWt2ITHsbJlKh0+9JdGGbzD98D336auyxFII5zMRlw/b37aEf8 UhDQLTzUFgPLyUknBQ/xX338ZaxIGjffDobCxpRyrJFXneRZkKsTAM0H8lJ7XvkMmZd2 7OA0P9OIUVLQTL8QUKigDY1yChl0n1+EPyb8R5+199TLTJCfFUGxpeOMBaZLjKPzibhE BBzQ== MIME-Version: 1.0 X-Received: by 10.140.219.198 with SMTP id p189mr4891587qhb.80.1446684000361; Wed, 04 Nov 2015 16:40:00 -0800 (PST) Received: by 10.140.88.209 with HTTP; Wed, 4 Nov 2015 16:40:00 -0800 (PST) In-Reply-To: <563AA10C.6050009@FreeBSD.org> References: <201511020105.tA215YhV095725@repo.freebsd.org> <563AA10C.6050009@FreeBSD.org> Date: Wed, 4 Nov 2015 16:40:00 -0800 Message-ID: Subject: Re: svn commit: r290252 - in head: . etc/defaults etc/periodic/daily tools/build/mk From: NGie Cooper To: Bryan Drewery Cc: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 00:40:01 -0000 On Wed, Nov 4, 2015 at 4:21 PM, Bryan Drewery wrote: ... > This seems a bit gratuitous and against POLA. Unfortunately it was more POLA when the pediodic script was deleted after it was added to OptionalObsoleteFiles.inc in the last few months. I could add a backwards compatible variable when MFCing the change to avoid breaking POLA on stable/9 and stable/10 though. Thanks! -NGie From owner-svn-src-head@freebsd.org Thu Nov 5 01:29:49 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFD7AA25DCF; Thu, 5 Nov 2015 01:29:49 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9465D100F; Thu, 5 Nov 2015 01:29:49 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA51TmwN060974; Thu, 5 Nov 2015 01:29:48 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA51TmwA060973; Thu, 5 Nov 2015 01:29:48 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201511050129.tA51TmwA060973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 5 Nov 2015 01:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290377 - head/lib/libopenbsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 01:29:49 -0000 Author: rodrigc Date: Thu Nov 5 01:29:48 2015 New Revision: 290377 URL: https://svnweb.freebsd.org/changeset/base/290377 Log: Add README, similar to the one from libnetbsd. Added: head/lib/libopenbsd/README (contents, props changed) Added: head/lib/libopenbsd/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libopenbsd/README Thu Nov 5 01:29:48 2015 (r290377) @@ -0,0 +1,7 @@ +$FreeBSD$ + +libopenbsd is a thin compatibility layer intended to allow a limited +set of OpenBSD software to compile as part of the FreeBSD build with +little or no modifiction. It is built as a static library and not +installed for general use. Likewise, its header files are not +installed. From owner-svn-src-head@freebsd.org Thu Nov 5 01:54:40 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FB1DA2627F; Thu, 5 Nov 2015 01:54:40 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31BCC1CCC; Thu, 5 Nov 2015 01:54:40 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA51sddq070493; Thu, 5 Nov 2015 01:54:39 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA51sdtu070491; Thu, 5 Nov 2015 01:54:39 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201511050154.tA51sdtu070491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 5 Nov 2015 01:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290378 - in head/lib: libnetbsd libopenbsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 01:54:40 -0000 Author: rodrigc Date: Thu Nov 5 01:54:38 2015 New Revision: 290378 URL: https://svnweb.freebsd.org/changeset/base/290378 Log: Fix spelling error. Reported by: junovitch Modified: head/lib/libnetbsd/README head/lib/libopenbsd/README Modified: head/lib/libnetbsd/README ============================================================================== --- head/lib/libnetbsd/README Thu Nov 5 01:29:48 2015 (r290377) +++ head/lib/libnetbsd/README Thu Nov 5 01:54:38 2015 (r290378) @@ -2,6 +2,6 @@ $FreeBSD$ libnetbsd is a thin compatibility layer intended to allow a limited set of NetBSD software to compile as part of the FreeBSD build with -little or no modifiction. It is built as a static library and not +little or no modification. It is built as a static library and not installed for general use. Likewise, its header files are not installed. Modified: head/lib/libopenbsd/README ============================================================================== --- head/lib/libopenbsd/README Thu Nov 5 01:29:48 2015 (r290377) +++ head/lib/libopenbsd/README Thu Nov 5 01:54:38 2015 (r290378) @@ -2,6 +2,6 @@ $FreeBSD$ libopenbsd is a thin compatibility layer intended to allow a limited set of OpenBSD software to compile as part of the FreeBSD build with -little or no modifiction. It is built as a static library and not +little or no modification. It is built as a static library and not installed for general use. Likewise, its header files are not installed. From owner-svn-src-head@freebsd.org Thu Nov 5 02:09:49 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E398CA265B3; Thu, 5 Nov 2015 02:09:49 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE54814DA; Thu, 5 Nov 2015 02:09:49 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA529md9073538; Thu, 5 Nov 2015 02:09:48 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA529mI8073537; Thu, 5 Nov 2015 02:09:48 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201511050209.tA529mI8073537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Thu, 5 Nov 2015 02:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290379 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 02:09:50 -0000 Author: hiren Date: Thu Nov 5 02:09:48 2015 New Revision: 290379 URL: https://svnweb.freebsd.org/changeset/base/290379 Log: Improve the sysctl node name. X-MFC with: r290122 Sponsored by: Limelight Networks Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Thu Nov 5 01:54:38 2015 (r290378) +++ head/sys/netinet/tcp_input.c Thu Nov 5 02:09:48 2015 (r290379) @@ -149,7 +149,7 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop "Drop TCP packets with SYN+FIN set"); VNET_DEFINE(int, tcp_do_rfc6675_pipe) = 0; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_pipe, CTLFLAG_VNET | CTLFLAG_RW, +SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc6675_pipe, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_rfc6675_pipe), 0, "Use calculated pipe/in-flight bytes per RFC 6675"); From owner-svn-src-head@freebsd.org Thu Nov 5 03:13:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 317CAA25338; Thu, 5 Nov 2015 03:13:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F302612C4; Thu, 5 Nov 2015 03:13:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA53DBEG096261; Thu, 5 Nov 2015 03:13:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA53DB4m096260; Thu, 5 Nov 2015 03:13:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511050313.tA53DB4m096260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 5 Nov 2015 03:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290380 - head/sys/dev/flash X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 03:13:12 -0000 Author: adrian Date: Thu Nov 5 03:13:10 2015 New Revision: 290380 URL: https://svnweb.freebsd.org/changeset/base/290380 Log: Add support for s25fl256s. I /think/ it's a 32mb NOR flash part. This is submitted by a FreeBSD wifi user who has requested they not be named. Thankyou! Modified: head/sys/dev/flash/mx25l.c Modified: head/sys/dev/flash/mx25l.c ============================================================================== --- head/sys/dev/flash/mx25l.c Thu Nov 5 02:09:48 2015 (r290379) +++ head/sys/dev/flash/mx25l.c Thu Nov 5 03:13:10 2015 (r290380) @@ -107,6 +107,7 @@ struct mx25l_flash_ident flash_devices[] { "s25fl032", 0x01, 0x0215, 64 * 1024, 64, FL_NONE }, { "s25fl064", 0x01, 0x0216, 64 * 1024, 128, FL_NONE }, { "s25fl128", 0x01, 0x2018, 64 * 1024, 256, FL_NONE }, + { "s25fl256s", 0x01, 0x0219, 64 * 1024, 512, FL_NONE }, { "SST25VF032B", 0xbf, 0x254a, 64 * 1024, 64, FL_ERASE_4K | FL_ERASE_32K }, /* Winbond -- w25x "blocks" are 64K, "sectors" are 4KiB */ From owner-svn-src-head@freebsd.org Thu Nov 5 03:46:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F2B0A25A95; Thu, 5 Nov 2015 03:46:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67EE4155F; Thu, 5 Nov 2015 03:46:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA53ksP4006352; Thu, 5 Nov 2015 03:46:54 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA53ksw5006347; Thu, 5 Nov 2015 03:46:54 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201511050346.tA53ksw5006347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 5 Nov 2015 03:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290381 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 03:46:55 -0000 Author: gonzo Date: Thu Nov 5 03:46:54 2015 New Revision: 290381 URL: https://svnweb.freebsd.org/changeset/base/290381 Log: Refactor mailbox property API to make it usable for /dev/vcio driver: - Add bcm2835_mbox_property for generic property request, it accepts pointer to prepared property chan message and its size, forwards it to MBOX and copies result back - Make all bcm2835_mbox_XXX functions that use property channel go through bcm2835_mbox_property path. Do not accept device_t as an argument, it's not required: all DMA operatiosn should go through mbox device, and all API consumers should report errors on their side. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Thu Nov 5 03:13:10 2015 (r290380) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Thu Nov 5 03:46:54 2015 (r290381) @@ -81,7 +81,7 @@ bcm_fb_attach(device_t dev) { char bootargs[2048], *n, *p, *v; device_t fbd; - int fbswap; + int fbswap, err; phandle_t chosen; struct bcm2835_fb_config fb; struct bcmsc_softc *sc; @@ -89,11 +89,13 @@ bcm_fb_attach(device_t dev) sc = device_get_softc(dev); memset(&fb, 0, sizeof(fb)); - if (bcm2835_mbox_fb_get_w_h(dev, &fb) != 0) + if (bcm2835_mbox_fb_get_w_h(&fb) != 0) return (ENXIO); fb.bpp = FB_DEPTH; - if (bcm2835_mbox_fb_init(dev, &fb) != 0) + if ((err = bcm2835_mbox_fb_init(&fb)) != 0) { + device_printf(dev, "bcm2835_mbox_fb_init failed, err=%d\n", err); return (ENXIO); + } info = malloc(sizeof(struct fb_info), M_DEVBUF, M_WAITOK | M_ZERO); info->fb_name = device_get_nameunit(dev); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Thu Nov 5 03:13:10 2015 (r290380) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Thu Nov 5 03:46:54 2015 (r290381) @@ -360,230 +360,162 @@ bcm2835_mbox_err(device_t dev, bus_addr_ } int -bcm2835_mbox_set_power_state(device_t dev, uint32_t device_id, boolean_t on) +bcm2835_mbox_property(void *msg, size_t msg_size) { - struct msg_set_power_state *msg; + struct msg_set_power_state *buf; bus_dma_tag_t msg_tag; bus_dmamap_t msg_map; bus_addr_t msg_phys; uint32_t reg; device_t mbox; + int err; /* get mbox device */ mbox = devclass_get_device(devclass_find("mbox"), 0); - if (mbox == NULL) { - device_printf(dev, "can't find mbox\n"); + if (mbox == NULL) return (ENXIO); - } /* Allocate memory for the message */ - msg = bcm2835_mbox_init_dma(dev, sizeof(*msg), &msg_tag, &msg_map, + buf = bcm2835_mbox_init_dma(mbox, msg_size, &msg_tag, &msg_map, &msg_phys); - if (msg == NULL) + if (buf == NULL) return (ENOMEM); - memset(msg, 0, sizeof(*msg)); - msg->hdr.buf_size = sizeof(*msg); - msg->hdr.code = BCM2835_MBOX_CODE_REQ; - msg->tag_hdr.tag = BCM2835_MBOX_TAG_SET_POWER_STATE; - msg->tag_hdr.val_buf_size = sizeof(msg->body); - msg->tag_hdr.val_len = sizeof(msg->body.req); - msg->body.req.device_id = device_id; - msg->body.req.state = (on ? BCM2835_MBOX_POWER_ON : 0) | - BCM2835_MBOX_POWER_WAIT; - msg->end_tag = 0; + memcpy(buf, msg, msg_size); bus_dmamap_sync(msg_tag, msg_map, - BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); + BUS_DMASYNC_PREWRITE); MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_PROP, (uint32_t)msg_phys); MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, ®); + bus_dmamap_sync(msg_tag, msg_map, + BUS_DMASYNC_PREREAD); + + memcpy(msg, buf, msg_size); + + err = bcm2835_mbox_err(mbox, msg_phys, reg, + (struct bcm2835_mbox_hdr *)msg, msg_size); + bus_dmamap_unload(msg_tag, msg_map); - bus_dmamem_free(msg_tag, msg, msg_map); + bus_dmamem_free(msg_tag, buf, msg_map); bus_dma_tag_destroy(msg_tag); - return (0); + return (err); } int -bcm2835_mbox_get_clock_rate(device_t dev, uint32_t clock_id, uint32_t *hz) +bcm2835_mbox_set_power_state(uint32_t device_id, boolean_t on) { - struct msg_get_clock_rate *msg; - bus_dma_tag_t msg_tag; - bus_dmamap_t msg_map; - bus_addr_t msg_phys; - uint32_t reg; - device_t mbox; - - /* get mbox device */ - mbox = devclass_get_device(devclass_find("mbox"), 0); - if (mbox == NULL) { - device_printf(dev, "can't find mbox\n"); - return (ENXIO); - } - - /* Allocate memory for the message */ - msg = bcm2835_mbox_init_dma(dev, sizeof(*msg), &msg_tag, &msg_map, - &msg_phys); - if (msg == NULL) - return (ENOMEM); - - memset(msg, 0, sizeof(*msg)); - msg->hdr.buf_size = sizeof(*msg); - msg->hdr.code = BCM2835_MBOX_CODE_REQ; - msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_CLOCK_RATE; - msg->tag_hdr.val_buf_size = sizeof(msg->body); - msg->tag_hdr.val_len = sizeof(msg->body.req); - msg->body.req.clock_id = clock_id; - msg->end_tag = 0; - - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREWRITE); - MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_PROP, (uint32_t)msg_phys); - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTWRITE); + struct msg_set_power_state msg; + int err; - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREREAD); - MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, ®); - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTREAD); + memset(&msg, 0, sizeof(msg)); + msg.hdr.buf_size = sizeof(msg); + msg.hdr.code = BCM2835_MBOX_CODE_REQ; + msg.tag_hdr.tag = BCM2835_MBOX_TAG_SET_POWER_STATE; + msg.tag_hdr.val_buf_size = sizeof(msg.body); + msg.tag_hdr.val_len = sizeof(msg.body.req); + msg.body.req.device_id = device_id; + msg.body.req.state = (on ? BCM2835_MBOX_POWER_ON : 0) | + BCM2835_MBOX_POWER_WAIT; + msg.end_tag = 0; - *hz = msg->body.resp.rate_hz; + err = bcm2835_mbox_property(&msg, sizeof(msg)); - bus_dmamap_unload(msg_tag, msg_map); - bus_dmamem_free(msg_tag, msg, msg_map); - bus_dma_tag_destroy(msg_tag); - - return (0); + return (err); } int -bcm2835_mbox_fb_get_w_h(device_t dev, struct bcm2835_fb_config *fb) +bcm2835_mbox_get_clock_rate(uint32_t clock_id, uint32_t *hz) { - device_t mbox; + struct msg_get_clock_rate msg; int err; - bus_dma_tag_t msg_tag; - bus_dmamap_t msg_map; - bus_addr_t msg_phys; - struct msg_fb_get_w_h *msg; - uint32_t reg; - /* get mbox device */ - mbox = devclass_get_device(devclass_find("mbox"), 0); - if (mbox == NULL) { - device_printf(dev, "can't find mbox\n"); - return (ENXIO); - } + memset(&msg, 0, sizeof(msg)); + msg.hdr.buf_size = sizeof(msg); + msg.hdr.code = BCM2835_MBOX_CODE_REQ; + msg.tag_hdr.tag = BCM2835_MBOX_TAG_GET_CLOCK_RATE; + msg.tag_hdr.val_buf_size = sizeof(msg.body); + msg.tag_hdr.val_len = sizeof(msg.body.req); + msg.body.req.clock_id = clock_id; + msg.end_tag = 0; - /* Allocate memory for the message */ - msg = bcm2835_mbox_init_dma(dev, sizeof(*msg), &msg_tag, &msg_map, - &msg_phys); - if (msg == NULL) - return (ENOMEM); + err = bcm2835_mbox_property(&msg, sizeof(msg)); + *hz = msg.body.resp.rate_hz; - memset(msg, 0, sizeof(*msg)); - msg->hdr.buf_size = sizeof(*msg); - msg->hdr.code = BCM2835_MBOX_CODE_REQ; - BCM2835_MBOX_INIT_TAG(&msg->physical_w_h, GET_PHYSICAL_W_H); - msg->physical_w_h.tag_hdr.val_len = 0; - BCM2835_MBOX_INIT_TAG(&msg->virtual_w_h, GET_VIRTUAL_W_H); - msg->virtual_w_h.tag_hdr.val_len = 0; - BCM2835_MBOX_INIT_TAG(&msg->offset, GET_VIRTUAL_OFFSET); - msg->offset.tag_hdr.val_len = 0; - msg->end_tag = 0; + return (err); +} - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREWRITE); - MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_PROP, (uint32_t)msg_phys); - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTWRITE); +int +bcm2835_mbox_fb_get_w_h(struct bcm2835_fb_config *fb) +{ + int err; + struct msg_fb_get_w_h msg; - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREREAD); - MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, ®); - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTREAD); + memset(&msg, 0, sizeof(msg)); + msg.hdr.buf_size = sizeof(msg); + msg.hdr.code = BCM2835_MBOX_CODE_REQ; + BCM2835_MBOX_INIT_TAG(&msg.physical_w_h, GET_PHYSICAL_W_H); + msg.physical_w_h.tag_hdr.val_len = 0; + BCM2835_MBOX_INIT_TAG(&msg.virtual_w_h, GET_VIRTUAL_W_H); + msg.virtual_w_h.tag_hdr.val_len = 0; + BCM2835_MBOX_INIT_TAG(&msg.offset, GET_VIRTUAL_OFFSET); + msg.offset.tag_hdr.val_len = 0; + msg.end_tag = 0; - err = bcm2835_mbox_err(dev, msg_phys, reg, &msg->hdr, sizeof(*msg)); + err = bcm2835_mbox_property(&msg, sizeof(msg)); if (err == 0) { - fb->xres = msg->physical_w_h.body.resp.width; - fb->yres = msg->physical_w_h.body.resp.height; - fb->vxres = msg->virtual_w_h.body.resp.width; - fb->vyres = msg->virtual_w_h.body.resp.height; - fb->xoffset = msg->offset.body.resp.x; - fb->yoffset = msg->offset.body.resp.y; + fb->xres = msg.physical_w_h.body.resp.width; + fb->yres = msg.physical_w_h.body.resp.height; + fb->vxres = msg.virtual_w_h.body.resp.width; + fb->vyres = msg.virtual_w_h.body.resp.height; + fb->xoffset = msg.offset.body.resp.x; + fb->yoffset = msg.offset.body.resp.y; } - bus_dmamap_unload(msg_tag, msg_map); - bus_dmamem_free(msg_tag, msg, msg_map); - bus_dma_tag_destroy(msg_tag); - return (err); } int -bcm2835_mbox_fb_init(device_t dev, struct bcm2835_fb_config *fb) +bcm2835_mbox_fb_init(struct bcm2835_fb_config *fb) { - device_t mbox; int err; - bus_dma_tag_t msg_tag; - bus_dmamap_t msg_map; - bus_addr_t msg_phys; - struct msg_fb_setup *msg; - uint32_t reg; - - /* get mbox device */ - mbox = devclass_get_device(devclass_find("mbox"), 0); - if (mbox == NULL) { - device_printf(dev, "can't find mbox\n"); - return (ENXIO); - } - - /* Allocate memory for the message */ - msg = bcm2835_mbox_init_dma(dev, sizeof(*msg), &msg_tag, &msg_map, - &msg_phys); - if (msg == NULL) - return (ENOMEM); + struct msg_fb_setup msg; - memset(msg, 0, sizeof(*msg)); - msg->hdr.buf_size = sizeof(*msg); - msg->hdr.code = BCM2835_MBOX_CODE_REQ; - BCM2835_MBOX_INIT_TAG(&msg->physical_w_h, SET_PHYSICAL_W_H); - msg->physical_w_h.body.req.width = fb->xres; - msg->physical_w_h.body.req.height = fb->yres; - BCM2835_MBOX_INIT_TAG(&msg->virtual_w_h, SET_VIRTUAL_W_H); - msg->virtual_w_h.body.req.width = fb->vxres; - msg->virtual_w_h.body.req.height = fb->vyres; - BCM2835_MBOX_INIT_TAG(&msg->offset, GET_VIRTUAL_OFFSET); - msg->offset.body.req.x = fb->xoffset; - msg->offset.body.req.y = fb->yoffset; - BCM2835_MBOX_INIT_TAG(&msg->depth, SET_DEPTH); - msg->depth.body.req.bpp = fb->bpp; - BCM2835_MBOX_INIT_TAG(&msg->alpha, SET_ALPHA_MODE); - msg->alpha.body.req.alpha = BCM2835_MBOX_ALPHA_MODE_IGNORED; - BCM2835_MBOX_INIT_TAG(&msg->buffer, ALLOCATE_BUFFER); - msg->buffer.body.req.alignment = PAGE_SIZE; - BCM2835_MBOX_INIT_TAG(&msg->pitch, GET_PITCH); - msg->end_tag = 0; + memset(&msg, 0, sizeof(msg)); + msg.hdr.buf_size = sizeof(msg); + msg.hdr.code = BCM2835_MBOX_CODE_REQ; + BCM2835_MBOX_INIT_TAG(&msg.physical_w_h, SET_PHYSICAL_W_H); + msg.physical_w_h.body.req.width = fb->xres; + msg.physical_w_h.body.req.height = fb->yres; + BCM2835_MBOX_INIT_TAG(&msg.virtual_w_h, SET_VIRTUAL_W_H); + msg.virtual_w_h.body.req.width = fb->vxres; + msg.virtual_w_h.body.req.height = fb->vyres; + BCM2835_MBOX_INIT_TAG(&msg.offset, GET_VIRTUAL_OFFSET); + msg.offset.body.req.x = fb->xoffset; + msg.offset.body.req.y = fb->yoffset; + BCM2835_MBOX_INIT_TAG(&msg.depth, SET_DEPTH); + msg.depth.body.req.bpp = fb->bpp; + BCM2835_MBOX_INIT_TAG(&msg.alpha, SET_ALPHA_MODE); + msg.alpha.body.req.alpha = BCM2835_MBOX_ALPHA_MODE_IGNORED; + BCM2835_MBOX_INIT_TAG(&msg.buffer, ALLOCATE_BUFFER); + msg.buffer.body.req.alignment = PAGE_SIZE; + BCM2835_MBOX_INIT_TAG(&msg.pitch, GET_PITCH); + msg.end_tag = 0; - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREWRITE); - MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_PROP, (uint32_t)msg_phys); - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTWRITE); - - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREREAD); - MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, ®); - bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTREAD); - - err = bcm2835_mbox_err(dev, msg_phys, reg, &msg->hdr, sizeof(*msg)); + err = bcm2835_mbox_property(&msg, sizeof(msg)); if (err == 0) { - fb->xres = msg->physical_w_h.body.resp.width; - fb->yres = msg->physical_w_h.body.resp.height; - fb->vxres = msg->virtual_w_h.body.resp.width; - fb->vyres = msg->virtual_w_h.body.resp.height; - fb->xoffset = msg->offset.body.resp.x; - fb->yoffset = msg->offset.body.resp.y; - fb->pitch = msg->pitch.body.resp.pitch; - fb->base = VCBUS_TO_PHYS(msg->buffer.body.resp.fb_address); - fb->size = msg->buffer.body.resp.fb_size; + fb->xres = msg.physical_w_h.body.resp.width; + fb->yres = msg.physical_w_h.body.resp.height; + fb->vxres = msg.virtual_w_h.body.resp.width; + fb->vyres = msg.virtual_w_h.body.resp.height; + fb->xoffset = msg.offset.body.resp.x; + fb->yoffset = msg.offset.body.resp.y; + fb->pitch = msg.pitch.body.resp.pitch; + fb->base = VCBUS_TO_PHYS(msg.buffer.body.resp.fb_address); + fb->size = msg.buffer.body.resp.fb_size; } - bus_dmamap_unload(msg_tag, msg_map); - bus_dmamem_free(msg_tag, msg, msg_map); - bus_dma_tag_destroy(msg_tag); - return (err); } Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Thu Nov 5 03:13:10 2015 (r290380) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Thu Nov 5 03:46:54 2015 (r290381) @@ -106,7 +106,7 @@ struct msg_set_power_state { }; /* Sets the power state for a given device */ -int bcm2835_mbox_set_power_state(device_t, uint32_t, boolean_t); +int bcm2835_mbox_set_power_state(uint32_t, boolean_t); #define BCM2835_MBOX_CLOCK_ID_EMMC 0x00000001 #define BCM2835_MBOX_CLOCK_ID_UART 0x00000002 @@ -185,7 +185,7 @@ struct msg_get_min_clock_rate { uint32_t end_tag; }; -int bcm2835_mbox_get_clock_rate(device_t, uint32_t, uint32_t *); +int bcm2835_mbox_get_clock_rate(uint32_t, uint32_t *); #define BCM2835_MBOX_TURBO_ON 1 #define BCM2835_MBOX_TURBO_OFF 0 @@ -474,7 +474,7 @@ struct msg_fb_get_w_h { uint32_t end_tag; }; -int bcm2835_mbox_fb_get_w_h(device_t, struct bcm2835_fb_config *); +int bcm2835_mbox_fb_get_w_h(struct bcm2835_fb_config *); struct msg_fb_setup { struct bcm2835_mbox_hdr hdr; @@ -488,6 +488,8 @@ struct msg_fb_setup { uint32_t end_tag; }; -int bcm2835_mbox_fb_init(device_t, struct bcm2835_fb_config *); +int bcm2835_mbox_fb_init(struct bcm2835_fb_config *); + +int bcm2835_mbox_property(void *, size_t); #endif /* _BCM2835_MBOX_PROP_H_ */ Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Thu Nov 5 03:13:10 2015 (r290380) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Thu Nov 5 03:46:54 2015 (r290381) @@ -145,7 +145,7 @@ bcm_sdhci_attach(device_t dev) sc->sc_dev = dev; sc->sc_req = NULL; - err = bcm2835_mbox_set_power_state(dev, BCM2835_MBOX_POWER_ID_EMMC, + err = bcm2835_mbox_set_power_state(BCM2835_MBOX_POWER_ID_EMMC, TRUE); if (err != 0) { if (bootverbose) @@ -154,7 +154,7 @@ bcm_sdhci_attach(device_t dev) } default_freq = 0; - err = bcm2835_mbox_get_clock_rate(dev, BCM2835_MBOX_CLOCK_ID_EMMC, + err = bcm2835_mbox_get_clock_rate(BCM2835_MBOX_CLOCK_ID_EMMC, &default_freq); if (err == 0) { /* Convert to MHz */ Modified: head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c Thu Nov 5 03:13:10 2015 (r290380) +++ head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c Thu Nov 5 03:46:54 2015 (r290381) @@ -72,8 +72,12 @@ bcm283x_dwc_otg_probe(device_t dev) static int bcm283x_dwc_otg_attach(device_t dev) { + int err; + + err = bcm2835_mbox_set_power_state(BCM2835_MBOX_POWER_ID_USB_HCD, TRUE); + if (err) + device_printf(dev, "failed to set power state, err=%d\n", err); - bcm2835_mbox_set_power_state(dev, BCM2835_MBOX_POWER_ID_USB_HCD, TRUE); return (dwc_otg_attach(dev)); } From owner-svn-src-head@freebsd.org Thu Nov 5 04:16:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC082A2609C; Thu, 5 Nov 2015 04:16:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE42D108E; Thu, 5 Nov 2015 04:16:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA54G301015788; Thu, 5 Nov 2015 04:16:03 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA54G3wI015786; Thu, 5 Nov 2015 04:16:03 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201511050416.tA54G3wI015786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 5 Nov 2015 04:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290382 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 04:16:05 -0000 Author: gonzo Date: Thu Nov 5 04:16:03 2015 New Revision: 290382 URL: https://svnweb.freebsd.org/changeset/base/290382 Log: Add /dev/vcio, userland access point to VideoCore mailbox property channel It's required by some applications in raspberrypi-userland package Added: head/sys/arm/broadcom/bcm2835/bcm2835_vcio.c (contents, props changed) Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x Added: head/sys/arm/broadcom/bcm2835/bcm2835_vcio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2835_vcio.c Thu Nov 5 04:16:03 2015 (r290382) @@ -0,0 +1,122 @@ +/*- + * Copyright (c) 2015 Oleksandr Tymoshenko + * + * 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 + +MALLOC_DECLARE(M_VCIO); +MALLOC_DEFINE(M_VCIO, "vcio", "VCIO temporary buffers"); + +static struct cdev *sdev; +static d_ioctl_t vcio_ioctl; + +static struct cdevsw vcio_devsw = { + /* version */ .d_version = D_VERSION, + /* ioctl */ .d_ioctl = vcio_ioctl, +}; + +#define VCIO_IOC_MAGIC 100 +#define IOCTL_MBOX_PROPERTY _IOWR(VCIO_IOC_MAGIC, 0, char *) + +int +vcio_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int mode, + struct thread *td) +{ + int error; + void *ptr; + uint32_t size; + uint8_t *property; + + error = 0; + switch(cmd) { + case IOCTL_MBOX_PROPERTY: + memcpy (&ptr, arg, sizeof(ptr)); + error = copyin(ptr, &size, sizeof(size)); + + if (error != 0) + break; + property = malloc(size, M_VCIO, M_WAITOK); + if (property == NULL) { + error = ENOMEM; + break; + } + + error = copyin(ptr, property, size); + if (error) { + free(property, M_VCIO); + break; + } + + error = bcm2835_mbox_property(property, size); + if (error) { + free(property, M_VCIO); + break; + } + + error = copyout(property, ptr, size); + free(property, M_VCIO); + + break; + default: + error = EINVAL; + break; + } + return (error); +} + +static int +vcio_load(module_t mod, int cmd, void *arg) +{ + int err = 0; + + switch (cmd) { + case MOD_LOAD: + sdev = make_dev(&vcio_devsw, 0, UID_ROOT, GID_WHEEL, 0600, "vcio"); + break; + + case MOD_UNLOAD: + destroy_dev(sdev); + break; + + default: + err = EOPNOTSUPP; + break; + } + + return(err); +} + +DEV_MODULE(vcio, vcio_load, NULL); +MODULE_DEPEND(vcio, mbox, 1, 1, 1); Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm283x Thu Nov 5 03:46:54 2015 (r290381) +++ head/sys/arm/broadcom/bcm2835/files.bcm283x Thu Nov 5 04:16:03 2015 (r290382) @@ -12,6 +12,7 @@ arm/broadcom/bcm2835/bcm2835_machdep.c arm/broadcom/bcm2835/bcm2835_mbox.c standard arm/broadcom/bcm2835/bcm2835_sdhci.c optional sdhci arm/broadcom/bcm2835/bcm2835_spi.c optional bcm2835_spi +arm/broadcom/bcm2835/bcm2835_vcio.c standard arm/broadcom/bcm2835/bcm2835_wdog.c standard arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt From owner-svn-src-head@freebsd.org Thu Nov 5 07:26:35 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE412A269AB; Thu, 5 Nov 2015 07:26:34 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB2F4198C; Thu, 5 Nov 2015 07:26:34 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA57QXK9074222; Thu, 5 Nov 2015 07:26:33 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA57QXlu074213; Thu, 5 Nov 2015 07:26:33 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201511050726.tA57QXlu074213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 5 Nov 2015 07:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290383 - in head/sys: net netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 07:26:35 -0000 Author: gnn Date: Thu Nov 5 07:26:32 2015 New Revision: 290383 URL: https://svnweb.freebsd.org/changeset/base/290383 Log: Replace the fastforward path with tryforward which does not require a sysctl and will always be on. The former split between default and fast forwarding is removed by this commit while preserving the ability to use all network stack features. Differential Revision: https://reviews.freebsd.org/D4042 Reviewed by: ae, melifaro, olivier, rwatson MFC after: 1 month Sponsored by: Rubicon Communications (Netgate) Modified: head/sys/net/if_arcsubr.c head/sys/net/if_ethersubr.c head/sys/net/if_fddisubr.c head/sys/net/if_fwsubr.c head/sys/net/if_iso88025subr.c head/sys/netinet/in_var.h head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_input.c Modified: head/sys/net/if_arcsubr.c ============================================================================== --- head/sys/net/if_arcsubr.c Thu Nov 5 04:16:03 2015 (r290382) +++ head/sys/net/if_arcsubr.c Thu Nov 5 07:26:32 2015 (r290383) @@ -550,15 +550,11 @@ arc_input(struct ifnet *ifp, struct mbuf #ifdef INET case ARCTYPE_IP: m_adj(m, ARC_HDRNEWLEN); - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; case ARCTYPE_IP_OLD: m_adj(m, ARC_HDRLEN); - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu Nov 5 04:16:03 2015 (r290382) +++ head/sys/net/if_ethersubr.c Thu Nov 5 07:26:32 2015 (r290383) @@ -722,8 +722,6 @@ ether_demux(struct ifnet *ifp, struct mb switch (ether_type) { #ifdef INET case ETHERTYPE_IP: - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: head/sys/net/if_fddisubr.c ============================================================================== --- head/sys/net/if_fddisubr.c Thu Nov 5 04:16:03 2015 (r290382) +++ head/sys/net/if_fddisubr.c Thu Nov 5 07:26:32 2015 (r290383) @@ -429,8 +429,6 @@ fddi_input(ifp, m) switch (type) { #ifdef INET case ETHERTYPE_IP: - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: head/sys/net/if_fwsubr.c ============================================================================== --- head/sys/net/if_fwsubr.c Thu Nov 5 04:16:03 2015 (r290382) +++ head/sys/net/if_fwsubr.c Thu Nov 5 07:26:32 2015 (r290383) @@ -605,8 +605,6 @@ firewire_input(struct ifnet *ifp, struct switch (type) { #ifdef INET case ETHERTYPE_IP: - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: head/sys/net/if_iso88025subr.c ============================================================================== --- head/sys/net/if_iso88025subr.c Thu Nov 5 04:16:03 2015 (r290382) +++ head/sys/net/if_iso88025subr.c Thu Nov 5 07:26:32 2015 (r290383) @@ -519,8 +519,6 @@ iso88025_input(ifp, m) #ifdef INET case ETHERTYPE_IP: th->iso88025_shost[0] &= ~(TR_RII); - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: head/sys/netinet/in_var.h ============================================================================== --- head/sys/netinet/in_var.h Thu Nov 5 04:16:03 2015 (r290382) +++ head/sys/netinet/in_var.h Thu Nov 5 07:26:32 2015 (r290383) @@ -380,7 +380,7 @@ int in_scrubprefix(struct in_ifaddr *, u void ip_input(struct mbuf *); void ip_direct_input(struct mbuf *); void in_ifadown(struct ifaddr *ifa, int); -struct mbuf *ip_fastforward(struct mbuf *); +struct mbuf *ip_tryforward(struct mbuf *); void *in_domifattach(struct ifnet *); void in_domifdetach(struct ifnet *, void *); Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Thu Nov 5 04:16:03 2015 (r290382) +++ head/sys/netinet/ip_fastfwd.c Thu Nov 5 07:26:32 2015 (r290383) @@ -108,12 +108,6 @@ __FBSDID("$FreeBSD$"); #include -static VNET_DEFINE(int, ipfastforward_active); -#define V_ipfastforward_active VNET(ipfastforward_active) - -SYSCTL_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(ipfastforward_active), 0, "Enable fast IP forwarding"); - static struct sockaddr_in * ip_findroute(struct route *ro, struct in_addr dest, struct mbuf *m) { @@ -158,7 +152,7 @@ ip_findroute(struct route *ro, struct in * to ip_input for full processing. */ struct mbuf * -ip_fastforward(struct mbuf *m) +ip_tryforward(struct mbuf *m) { struct ip *ip; struct mbuf *m0 = NULL; @@ -166,119 +160,20 @@ ip_fastforward(struct mbuf *m) struct sockaddr_in *dst = NULL; struct ifnet *ifp; struct in_addr odest, dest; - uint16_t sum, ip_len, ip_off; + uint16_t ip_len, ip_off; int error = 0; - int hlen, mtu; + int mtu; struct m_tag *fwd_tag = NULL; /* * Are we active and forwarding packets? */ - if (!V_ipfastforward_active || !V_ipforwarding) - return m; M_ASSERTVALID(m); M_ASSERTPKTHDR(m); bzero(&ro, sizeof(ro)); - /* - * Step 1: check for packet drop conditions (and sanity checks) - */ - - /* - * Is entire packet big enough? - */ - if (m->m_pkthdr.len < sizeof(struct ip)) { - IPSTAT_INC(ips_tooshort); - goto drop; - } - - /* - * Is first mbuf large enough for ip header and is header present? - */ - if (m->m_len < sizeof (struct ip) && - (m = m_pullup(m, sizeof (struct ip))) == NULL) { - IPSTAT_INC(ips_toosmall); - return NULL; /* mbuf already free'd */ - } - - ip = mtod(m, struct ip *); - - /* - * Is it IPv4? - */ - if (ip->ip_v != IPVERSION) { - IPSTAT_INC(ips_badvers); - goto drop; - } - - /* - * Is IP header length correct and is it in first mbuf? - */ - hlen = ip->ip_hl << 2; - if (hlen < sizeof(struct ip)) { /* minimum header length */ - IPSTAT_INC(ips_badhlen); - goto drop; - } - if (hlen > m->m_len) { - if ((m = m_pullup(m, hlen)) == NULL) { - IPSTAT_INC(ips_badhlen); - return NULL; /* mbuf already free'd */ - } - ip = mtod(m, struct ip *); - } - - /* - * Checksum correct? - */ - if (m->m_pkthdr.csum_flags & CSUM_IP_CHECKED) - sum = !(m->m_pkthdr.csum_flags & CSUM_IP_VALID); - else { - if (hlen == sizeof(struct ip)) - sum = in_cksum_hdr(ip); - else - sum = in_cksum(m, hlen); - } - if (sum) { - IPSTAT_INC(ips_badsum); - goto drop; - } - - /* - * Remember that we have checked the IP header and found it valid. - */ - m->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID); - - ip_len = ntohs(ip->ip_len); - - /* - * Is IP length longer than packet we have got? - */ - if (m->m_pkthdr.len < ip_len) { - IPSTAT_INC(ips_tooshort); - goto drop; - } - - /* - * Is packet longer than IP header tells us? If yes, truncate packet. - */ - if (m->m_pkthdr.len > ip_len) { - if (m->m_len == m->m_pkthdr.len) { - m->m_len = ip_len; - m->m_pkthdr.len = ip_len; - } else - m_adj(m, ip_len - m->m_pkthdr.len); - } - - /* - * Is packet from or to 127/8? - */ - if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || - (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) { - IPSTAT_INC(ips_badaddr); - goto drop; - } #ifdef ALTQ /* @@ -289,12 +184,10 @@ ip_fastforward(struct mbuf *m) #endif /* - * Step 2: fallback conditions to normal ip_input path processing - */ - - /* * Only IP packets without options */ + ip = mtod(m, struct ip *); + if (ip->ip_hl != (sizeof(struct ip) >> 2)) { if (V_ip_doopts == 1) return m; Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Nov 5 04:16:03 2015 (r290382) +++ head/sys/netinet/ip_input.c Thu Nov 5 07:26:32 2015 (r290383) @@ -79,6 +79,8 @@ __FBSDID("$FreeBSD$"); #include #ifdef IPSEC #include +#include +#include #endif /* IPSEC */ #include @@ -500,12 +502,22 @@ tooshort: m_adj(m, ip_len - m->m_pkthdr.len); } + /* Try to forward the packet, but if we fail continue */ #ifdef IPSEC + /* For now we do not handle IPSEC in tryforward. */ + if (!key_havesp(IPSEC_DIR_INBOUND) && !key_havesp(IPSEC_DIR_OUTBOUND) && + (V_ipforwarding == 1)) + if (ip_tryforward(m) == NULL) + return; /* * Bypass packet filtering for packets previously handled by IPsec. */ if (ip_ipsec_filtertunnel(m)) goto passin; +#else + if (V_ipforwarding == 1) + if (ip_tryforward(m) == NULL) + return; #endif /* IPSEC */ /* From owner-svn-src-head@freebsd.org Thu Nov 5 07:43:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA4B3A26D3F; Thu, 5 Nov 2015 07:43:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ECFC10AE; Thu, 5 Nov 2015 07:43:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA57hFNq079836; Thu, 5 Nov 2015 07:43:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA57hFBJ079835; Thu, 5 Nov 2015 07:43:15 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511050743.tA57hFBJ079835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 5 Nov 2015 07:43:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290384 - head/contrib/libexecinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 07:43:16 -0000 Author: bapt Date: Thu Nov 5 07:43:15 2015 New Revision: 290384 URL: https://svnweb.freebsd.org/changeset/base/290384 Log: Fix typo in the function name Submitted by: Sascha Wildner Obtained from: DragonflyBSD Modified: head/contrib/libexecinfo/backtrace.3 Modified: head/contrib/libexecinfo/backtrace.3 ============================================================================== --- head/contrib/libexecinfo/backtrace.3 Thu Nov 5 07:26:32 2015 (r290383) +++ head/contrib/libexecinfo/backtrace.3 Thu Nov 5 07:43:15 2015 (r290384) @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 23, 2013 +.Dd November 3, 2015 .Dt BACKTRACE 3 .Os .Sh NAME @@ -47,7 +47,7 @@ .Ft "char **" .Fn backtrace_symbols_fmt "void * const *addrlist" "size_t len" "const char *fmt" .Ft int -.Fn backtrace_symbols_fmt_fd "void * const *addrlist" "size_t len" "const char *fmt" "int fd" +.Fn backtrace_symbols_fd_fmt "void * const *addrlist" "size_t len" "const char *fmt" "int fd" .Sh DESCRIPTION The .Fn backtrace @@ -106,7 +106,7 @@ with a format argument of The .Fn backtrace_symbols_fd and -.Fn backtrace_symbols_fmt_fd +.Fn backtrace_symbols_fd_fmt are similar to the non _fd named functions, only instead of returning an array or strings, they print a new-line separated array of strings in fd, and return From owner-svn-src-head@freebsd.org Thu Nov 5 09:07:54 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF84CA264CD; Thu, 5 Nov 2015 09:07:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADCF617A3; Thu, 5 Nov 2015 09:07:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA597rSu004882; Thu, 5 Nov 2015 09:07:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA597rLm004881; Thu, 5 Nov 2015 09:07:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511050907.tA597rLm004881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 5 Nov 2015 09:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290387 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 09:07:55 -0000 Author: mav Date: Thu Nov 5 09:07:53 2015 New Revision: 290387 URL: https://svnweb.freebsd.org/changeset/base/290387 Log: Extend mask of VMware virtual disks. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Nov 5 08:27:45 2015 (r290386) +++ head/sys/cam/scsi/scsi_da.c Thu Nov 5 09:07:53 2015 (r290387) @@ -368,7 +368,7 @@ static struct da_quirk_entry da_quirk_ta * VMware returns BUSY status when storage has transient * connectivity problems, so better wait. */ - {T_DIRECT, SIP_MEDIA_FIXED, "VMware", "Virtual disk", "*"}, + {T_DIRECT, SIP_MEDIA_FIXED, "VMware*", "*", "*"}, /*quirks*/ DA_Q_RETRY_BUSY }, /* USB mass storage devices supported by umass(4) */ From owner-svn-src-head@freebsd.org Thu Nov 5 10:19:27 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7A00A2730F; Thu, 5 Nov 2015 10:19:27 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pa0-x22a.google.com (mail-pa0-x22a.google.com [IPv6:2607:f8b0:400e: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 77C59163F; Thu, 5 Nov 2015 10:19:27 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by pasz6 with SMTP id z6so87002662pas.2; Thu, 05 Nov 2015 02:19:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:references:to:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=QZKpdJmAQyK0ehnHYpFBEqjZHafLcpImk2dF3d4QU8k=; b=cqg8kQh4ULk3X9RY7tbB1vfkJ7KSoCJQiARa5gGahV7Pku16WP5PBv/7wXMA/Lgzpd NqqabT/ifA3RdWqe8vY1rctJa1ti/gyc1jl9WiocNRSDaPqFV2msYMe9LY0Fy425GSM9 61E+lKltaq6BrFg/MI6hAve2FTKuqro3TEs9whN6kWNKnzt3USm2jVFHLbXJZ/zJVfHH BfUQMPzoeXX8Wm+cbqBggJSwL3hSQMhIWUNWgxbOEMK1EQU7666auXo4VYbYM0wy+REf cyXToYdU+xm9FMXV/I71Qhzmjb1o2dXoLxit+iLtlCbDsGKG3UPJclouxOUi0lkDa9gT Sq3w== X-Received: by 10.69.26.36 with SMTP id iv4mr8573038pbd.0.1446718767139; Thu, 05 Nov 2015 02:19:27 -0800 (PST) Received: from ?IPv6:2001:44b8:31ae:7b01:38a2:343d:295d:ce0? (2001-44b8-31ae-7b01-38a2-343d-295d-0ce0.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01:38a2:343d:295d:ce0]) by smtp.gmail.com with ESMTPSA id fk8sm7035545pab.33.2015.11.05.02.19.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Nov 2015 02:19:26 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r290387 - head/sys/cam/scsi References: <201511050907.tA597rLm004881@repo.freebsd.org> To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Kubilay Kocak Message-ID: <563B2D21.70203@FreeBSD.org> Date: Thu, 5 Nov 2015 21:19:13 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Thunderbird/42.0 MIME-Version: 1.0 In-Reply-To: <201511050907.tA597rLm004881@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 10:19:27 -0000 On 5/11/2015 8:07 PM, Alexander Motin wrote: > Author: mav > Date: Thu Nov 5 09:07:53 2015 > New Revision: 290387 > URL: https://svnweb.freebsd.org/changeset/base/290387 > > Log: > Extend mask of VMware virtual disks. > > Modified: > head/sys/cam/scsi/scsi_da.c > > Modified: head/sys/cam/scsi/scsi_da.c > ============================================================================== > --- head/sys/cam/scsi/scsi_da.c Thu Nov 5 08:27:45 2015 (r290386) > +++ head/sys/cam/scsi/scsi_da.c Thu Nov 5 09:07:53 2015 (r290387) > @@ -368,7 +368,7 @@ static struct da_quirk_entry da_quirk_ta > * VMware returns BUSY status when storage has transient > * connectivity problems, so better wait. > */ > - {T_DIRECT, SIP_MEDIA_FIXED, "VMware", "Virtual disk", "*"}, > + {T_DIRECT, SIP_MEDIA_FIXED, "VMware*", "*", "*"}, > /*quirks*/ DA_Q_RETRY_BUSY > }, > /* USB mass storage devices supported by umass(4) */ > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > Ooo, thank you! I forgot to test your patch :) From owner-svn-src-head@freebsd.org Thu Nov 5 10:58:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C20EFA27BF7; Thu, 5 Nov 2015 10:58:20 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8082A1FA6; Thu, 5 Nov 2015 10:58:20 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5AwJk6040300; Thu, 5 Nov 2015 10:58:19 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5AwJXt040299; Thu, 5 Nov 2015 10:58:19 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511051058.tA5AwJXt040299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Thu, 5 Nov 2015 10:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290388 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 10:58:20 -0000 Author: ume Date: Thu Nov 5 10:58:19 2015 New Revision: 290388 URL: https://svnweb.freebsd.org/changeset/base/290388 Log: Revert previous workaround. This problem was fixed by r290318. Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Thu Nov 5 09:07:53 2015 (r290387) +++ head/usr.bin/netstat/route.c Thu Nov 5 10:58:19 2015 (r290388) @@ -527,10 +527,6 @@ routename(struct sockaddr *sa, int flags static char line[NI_MAXHOST]; int error, f; - /* XXX: sa->sa_len doesn't match sizeof(struct sockaddr_dl) */ - if (sa->sa_family == AF_LINK) - sa->sa_len = sizeof(struct sockaddr_dl); - f = (flags) ? NI_NUMERICHOST : 0; error = getnameinfo(sa, sa->sa_len, line, sizeof(line), NULL, 0, f); From owner-svn-src-head@freebsd.org Thu Nov 5 11:02:30 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D451A27D89; Thu, 5 Nov 2015 11:02:30 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06BF614CE; Thu, 5 Nov 2015 11:02:29 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5B2Tm4043368; Thu, 5 Nov 2015 11:02:29 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5B2TXq043367; Thu, 5 Nov 2015 11:02:29 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511051102.tA5B2TXq043367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Thu, 5 Nov 2015 11:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290389 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 11:02:30 -0000 Author: ume Date: Thu Nov 5 11:02:28 2015 New Revision: 290389 URL: https://svnweb.freebsd.org/changeset/base/290389 Log: Use returned network name from getnetbyaddr() correctly. Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Thu Nov 5 10:58:19 2015 (r290388) +++ head/usr.bin/netstat/route.c Thu Nov 5 11:02:28 2015 (r290389) @@ -637,14 +637,13 @@ netname4(in_addr_t in, in_addr_t mask) trimdomain(cp, strlen(cp)); } } - inet_ntop(AF_INET, &in, nline, sizeof(line)); - if (cp != NULL) { - if (strcpy(cp, nline) != 0) - return (line); + if (cp != NULL) strlcpy(line, cp, sizeof(line)); - } else + else { + inet_ntop(AF_INET, &in, nline, sizeof(nline)); strlcpy(line, nline, sizeof(line)); - domask(line + strlen(line), i, ntohl(mask)); + domask(line + strlen(line), i, ntohl(mask)); + } return (line); } From owner-svn-src-head@freebsd.org Thu Nov 5 11:04:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28453A27E0A; Thu, 5 Nov 2015 11:04:45 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8D2E187F; Thu, 5 Nov 2015 11:04:44 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5B4iGi044240; Thu, 5 Nov 2015 11:04:44 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5B4iBv044239; Thu, 5 Nov 2015 11:04:44 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511051104.tA5B4iBv044239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Thu, 5 Nov 2015 11:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290390 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 11:04:45 -0000 Author: ume Date: Thu Nov 5 11:04:43 2015 New Revision: 290390 URL: https://svnweb.freebsd.org/changeset/base/290390 Log: Fix alignment of `Drop' header. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Thu Nov 5 11:02:28 2015 (r290389) +++ head/usr.bin/netstat/if.c Thu Nov 5 11:04:43 2015 (r290390) @@ -308,7 +308,7 @@ intpr(void (*pfunc)(char *), int af) xo_emit(" {T:/%10.10s}","Obytes"); xo_emit(" {T:/%5s}", "Coll"); if (dflag) - xo_emit(" {T:/%s}", "Drop"); + xo_emit(" {T:/%5.5s}", "Drop"); xo_emit("\n"); } From owner-svn-src-head@freebsd.org Thu Nov 5 11:06:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52155A27E7F; Thu, 5 Nov 2015 11:06:48 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10D4B19FA; Thu, 5 Nov 2015 11:06:47 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5B6leN044350; Thu, 5 Nov 2015 11:06:47 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5B6l1o044349; Thu, 5 Nov 2015 11:06:47 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511051106.tA5B6l1o044349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Thu, 5 Nov 2015 11:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290391 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 11:06:48 -0000 Author: ume Date: Thu Nov 5 11:06:46 2015 New Revision: 290391 URL: https://svnweb.freebsd.org/changeset/base/290391 Log: Give enough room for addresses when -W option is specified. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Thu Nov 5 11:04:43 2015 (r290390) +++ head/usr.bin/netstat/if.c Thu Nov 5 11:06:46 2015 (r290391) @@ -272,6 +272,7 @@ intpr(void (*pfunc)(char *), int af) struct ifaddrs *ifap, *ifa; struct ifmaddrs *ifmap, *ifma; u_int ifn_len_max = 5, ifn_len; + u_int has_ipv6 = 0, net_len = 13, addr_len = 17; if (interval) return sidewaysintpr(); @@ -292,15 +293,23 @@ intpr(void (*pfunc)(char *), int af) if ((ifa->ifa_flags & IFF_UP) == 0) ++ifn_len; ifn_len_max = MAX(ifn_len_max, ifn_len); + if (ifa->ifa_addr->sa_family == AF_INET6) + has_ipv6 = 1; } + if (has_ipv6) { + net_len = 24; + addr_len = 39; + } else + net_len = 18; } xo_open_list("interface"); if (!pfunc) { xo_emit("{T:/%-*.*s}", ifn_len_max, ifn_len_max, "Name"); - xo_emit(" {T:/%5.5s} {T:/%-13.13s} {T:/%-17.17s} {T:/%8.8s} " + xo_emit(" {T:/%5.5s} {T:/%-*.*s} {T:/%-*.*s} {T:/%8.8s} " "{T:/%5.5s} {T:/%5.5s}", - "Mtu", "Network", "Address", "Ipkts", "Ierrs", "Idrop"); + "Mtu", net_len, net_len, "Network", addr_len, addr_len, + "Address", "Ipkts", "Ierrs", "Idrop"); if (bflag) xo_emit(" {T:/%10.10s}","Ibytes"); xo_emit(" {T:/%8.8s} {T:/%5.5s}", "Opkts", "Oerrs"); @@ -357,22 +366,26 @@ intpr(void (*pfunc)(char *), int af) switch (ifa->ifa_addr->sa_family) { case AF_UNSPEC: - xo_emit("{:network/%-13.13s} ", "none"); - xo_emit("{:address/%-15.15s} ", "none"); + xo_emit("{:network/%-*.*s} ", net_len, net_len, + "none"); + xo_emit("{:address/%-*.*s} ", addr_len, addr_len, + "none"); break; case AF_INET: #ifdef INET6 case AF_INET6: #endif /* INET6 */ if (Wflag) { - xo_emit("{t:network/%-13s} ", + xo_emit("{t:network/%-*s} ", net_len, netname(ifa->ifa_addr, ifa->ifa_netmask)); - xo_emit("{t:address/%-17s} ", + xo_emit("{t:address/%-*s} ", addr_len, routename(ifa->ifa_addr, numeric_addr)); } else { - xo_emit("{t:network/%-13.13s} ", + xo_emit("{t:network/%-*.*s} ", + net_len, net_len, netname(ifa->ifa_addr, ifa->ifa_netmask)); - xo_emit("{t:address/%-17.17s} ", + xo_emit("{t:address/%-*.*s} ", + addr_len, addr_len, routename(ifa->ifa_addr, numeric_addr)); } @@ -385,14 +398,15 @@ intpr(void (*pfunc)(char *), int af) sdl = (struct sockaddr_dl *)ifa->ifa_addr; sprintf(linknum, "", sdl->sdl_index); - xo_emit("{t:network/%-13.13s} ", linknum); + xo_emit("{t:network/%-*.*s} ", net_len, net_len, + linknum); if (sdl->sdl_nlen == 0 && sdl->sdl_alen == 0 && sdl->sdl_slen == 0) xo_emit("{P: }"); else - xo_emit("{:address/%-17.17s} ", - routename(ifa->ifa_addr, 1)); + xo_emit("{:address/%-*.*s} ", addr_len, + addr_len, routename(ifa->ifa_addr, 1)); link = true; break; } From owner-svn-src-head@freebsd.org Thu Nov 5 11:58:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10BC0A2544E; Thu, 5 Nov 2015 11:58:58 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::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 CB432118D; Thu, 5 Nov 2015 11:58:57 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by ioll68 with SMTP id l68so87827950iol.3; Thu, 05 Nov 2015 03:58:57 -0800 (PST) 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=YtXEp8pRlq2OrhcpKgUy1zLQ/XQNMJgCK3sWkiFNFdE=; b=J1Y0mri+zCApblTsSEP7bJphF1eLYt7beTaLMOMkgc9rnJ/Hwh2flFIr7RiN1oVE9e p1E1EgyG10PUyWezsWR2JPvmNjz8KMQrcC6YTwii3hct/ChSrt9jRTpZQjZL0+RkW0RN N1Xqc9kWSwgRzRxVHHR5YN0I/eHUTNYT/wD60Rspi0809w8ArUnS/5LQL2HlPwpaBUHo ZJ6/oi6dGDA8wVcy7GH8jzOU6LMC64r88P7dx7ByXPG75oYc5eSGxNzfMCL5z9AhZR/Q I39LdopVHYDQF7gftbklPSkYAOCyG8cVBhhVj0Vdw1aHJz16YM4BmDJ9Z0bB6ozfGSiN UaEw== MIME-Version: 1.0 X-Received: by 10.107.3.79 with SMTP id 76mr9031895iod.30.1446724737301; Thu, 05 Nov 2015 03:58:57 -0800 (PST) Received: by 10.64.173.228 with HTTP; Thu, 5 Nov 2015 03:58:57 -0800 (PST) In-Reply-To: References: <201510221638.t9MGc1cc053885@repo.freebsd.org> <56348FF8.3010602@gmail.com> <1446394311.91534.236.camel@freebsd.org> Date: Thu, 5 Nov 2015 12:58:57 +0100 Message-ID: Subject: Re: svn commit: r289759 - in head/sys/arm: arm include From: Svatopluk Kraus To: Jason Harmening Cc: Ian Lepore , Ganbold Tsagaankhuu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 11:58:58 -0000 On Thu, Nov 5, 2015 at 1:11 AM, Jason Harmening wrote: > > On Wed, Nov 4, 2015 at 2:17 PM, Svatopluk Kraus wrote: >> >> On Tue, Nov 3, 2015 at 8:45 AM, Jason Harmening >> wrote: >> > >> > On Sun, Nov 1, 2015 at 8:11 AM, Ian Lepore wrote: >> >> >> >> >> >> It's almost certainly not related to sysinit ordering. This exception >> >> is happening during mmc probing after interrupts are enabled. >> >> >> >> It appears that the problem is the faulting code is running on one of >> >> the very early pre-allocated kernel stacks (perhaps in an interrupt >> >> handler on an idle thread stack), and these stacks are not in memory >> >> represented in the vm page arrays. The mmc code is using a 64-byte >> >> buffer on the stack and mapping it for DMA. Normally that causes a >> >> bounce for cacheline alignment, but unluckily in this case that buffer >> >> on the stack just happened to be aligned to a cacheline boundary and a >> >> multiple of the cacheline size, so no bounce. That causes the new sync >> >> logic that is based on keeping vm_page_t pointers and offsets to get a >> >> NULL pointer back from PHYS_TO_VM_PAGE when mapping, then it dies at >> >> sync time trying to dereference that. It used to work because the sync >> >> logic used to use the vaddr, not a page pointer. >> >> >> >> Michal was working on a patch yesterday. >> >> >> > >> > Ah, thanks for pointing that out Ian. I was left scratching my head >> > (admittedly on the road and w/o easy access to the code) wondering what >> > on >> > earth would be trying to do DMA during SI_SUB_CPU. >> > >> >> >> Using of fictitious pages is not so easy here as in case pointed by >> kib@ where they are allocated and freed inside one function. For sync >> list sake, they must be allocated when a buffer is loaded and freed >> when is unloaded. >> >> Michal uses pmap_kextract() in case when KVA of buffer is not zero in >> his proof-of-concept patch: >> https://gist.github.com/strejda/d5ca3ed202427a2e0557 >> When KVA of buffer is not zero, temporary mapping is not used at all, >> so vm_page_t array is not needed too. >> >> IMO, buffer's physical address can be saved in sync list to be used >> when its KVA is not zero. Thus pmap_kextract() won't be called in >> dma_dcache_sync(). > > > I like the idea of storing off the physical address. If you want to save > space in the sync list, I think you can place busaddr and pages in a union, > using vaddr == 0 to select which field to use. Some people frown upon use > of unions, though. > > Any reason the panics on PHYS_TO_VM_PAGE in load_buffer() and load_phys() > shouldn't be KASSERTs instead? KASSERTs are fine. I have looked at Michal's patch again and only KASSERT should be in load_phys() as such buffers are unmapped, temporary mapping must be used and so, they must be in vm_page_array. And maybe some inline function for getting PA from sync list would be nice too. I would like to review final patch if you are going to make it. And it would be nice if Ganbold will test it. Phabricator? From owner-svn-src-head@freebsd.org Thu Nov 5 14:33:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E75CA26A9E; Thu, 5 Nov 2015 14:33:48 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5F801BC1; Thu, 5 Nov 2015 14:33:47 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5EXkQi013938; Thu, 5 Nov 2015 14:33:46 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5EXkEw013935; Thu, 5 Nov 2015 14:33:46 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201511051433.tA5EXkEw013935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 5 Nov 2015 14:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290392 - in head/sys: x86/xen xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 14:33:48 -0000 Author: royger Date: Thu Nov 5 14:33:46 2015 New Revision: 290392 URL: https://svnweb.freebsd.org/changeset/base/290392 Log: xen/intr: fix the event channel enabled per-cpu mask Fix two issues with the current event channel code, first ENABLED_SETSIZE is not correctly defined and then using a BITSET to store the per-cpu masks is not portable to other arches, since on arm32 the event channel arrays shared with the hypervisor are of type uint64_t and not long. Partially restore the previous code but switch the bit operations to use the recently introduced xen_{set/clear/test}_bit versions. Reviewed by: Julien Grall Sponsored by: Citrix Systems R&D Differential Revision: https://reviews.freebsd.org/D4080 Modified: head/sys/x86/xen/xen_intr.c head/sys/xen/xen-os.h Modified: head/sys/x86/xen/xen_intr.c ============================================================================== --- head/sys/x86/xen/xen_intr.c Thu Nov 5 11:06:46 2015 (r290391) +++ head/sys/x86/xen/xen_intr.c Thu Nov 5 14:33:46 2015 (r290392) @@ -71,9 +71,6 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_XENINTR, "xen_intr", "Xen Interrupt Services"); -#define ENABLED_SETSIZE (sizeof(u_long) * 8) -BITSET_DEFINE(enabledbits, ENABLED_SETSIZE); - /** * Per-cpu event channel processing state. */ @@ -98,7 +95,7 @@ struct xen_intr_pcpu_data { * A bitmap of ports that can be serviced from this CPU. * A set bit means interrupt handling is enabled. */ - struct enabledbits evtchn_enabled; + u_long evtchn_enabled[sizeof(u_long) * 8]; }; /* @@ -215,7 +212,7 @@ evtchn_cpu_mask_port(u_int cpu, evtchn_p struct xen_intr_pcpu_data *pcpu; pcpu = DPCPU_ID_PTR(cpu, xen_intr_pcpu); - BIT_CLR_ATOMIC(ENABLED_SETSIZE, port, &pcpu->evtchn_enabled); + xen_clear_bit(port, pcpu->evtchn_enabled); } /** @@ -237,7 +234,7 @@ evtchn_cpu_unmask_port(u_int cpu, evtchn struct xen_intr_pcpu_data *pcpu; pcpu = DPCPU_ID_PTR(cpu, xen_intr_pcpu); - BIT_SET_ATOMIC(ENABLED_SETSIZE, port, &pcpu->evtchn_enabled); + xen_set_bit(port, pcpu->evtchn_enabled); } /** @@ -499,9 +496,14 @@ static inline u_long xen_intr_active_ports(struct xen_intr_pcpu_data *pcpu, shared_info_t *sh, u_int idx) { + + CTASSERT(sizeof(sh->evtchn_mask[0]) == sizeof(sh->evtchn_pending[0])); + CTASSERT(sizeof(sh->evtchn_mask[0]) == sizeof(pcpu->evtchn_enabled[0])); + CTASSERT(sizeof(sh->evtchn_mask) == sizeof(sh->evtchn_pending)); + CTASSERT(sizeof(sh->evtchn_mask) == sizeof(pcpu->evtchn_enabled)); return (sh->evtchn_pending[idx] & ~sh->evtchn_mask[idx] - & pcpu->evtchn_enabled.__bits[idx]); + & pcpu->evtchn_enabled[idx]); } /** @@ -637,10 +639,8 @@ xen_intr_init(void *dummy __unused) */ CPU_FOREACH(i) { pcpu = DPCPU_ID_PTR(i, xen_intr_pcpu); - if (i == 0) - BIT_FILL(ENABLED_SETSIZE, &pcpu->evtchn_enabled); - else - BIT_ZERO(ENABLED_SETSIZE, &pcpu->evtchn_enabled); + memset(pcpu->evtchn_enabled, i == 0 ? ~0 : 0, + sizeof(pcpu->evtchn_enabled)); xen_intr_intrcnt_add(i); } @@ -753,11 +753,8 @@ xen_intr_resume(struct pic *unused, bool struct xen_intr_pcpu_data *pcpu; pcpu = DPCPU_ID_PTR(i, xen_intr_pcpu); - - if (i == 0) - BIT_FILL(ENABLED_SETSIZE, &pcpu->evtchn_enabled); - else - BIT_ZERO(ENABLED_SETSIZE, &pcpu->evtchn_enabled); + memset(pcpu->evtchn_enabled, i == 0 ? ~0 : 0, + sizeof(pcpu->evtchn_enabled)); } /* Mask all event channels. */ @@ -1612,8 +1609,7 @@ xen_intr_dump_port(struct xenisrc *isrc) CPU_FOREACH(i) { pcpu = DPCPU_ID_PTR(i, xen_intr_pcpu); db_printf("cpu#%d: %d ", i, - BIT_ISSET(ENABLED_SETSIZE, isrc->xi_port, - &pcpu->evtchn_enabled)); + !!xen_test_bit(isrc->xi_port, pcpu->evtchn_enabled)); } db_printf("\n"); } Modified: head/sys/xen/xen-os.h ============================================================================== --- head/sys/xen/xen-os.h Thu Nov 5 11:06:46 2015 (r290391) +++ head/sys/xen/xen-os.h Thu Nov 5 14:33:46 2015 (r290392) @@ -112,6 +112,12 @@ xen_set_bit(int bit, volatile long *addr atomic_set_long(&addr[bit / NBPL], 1UL << (bit % NBPL)); } +static inline void +xen_clear_bit(int bit, volatile long *addr) +{ + atomic_clear_long(&addr[bit / NBPL], 1UL << (bit % NBPL)); +} + #undef NPBL /* From owner-svn-src-head@freebsd.org Thu Nov 5 14:37:18 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E995DA26B50; Thu, 5 Nov 2015 14:37:18 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5D471DA6; Thu, 5 Nov 2015 14:37:18 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5EbHhQ014995; Thu, 5 Nov 2015 14:37:17 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5EbHmo014994; Thu, 5 Nov 2015 14:37:17 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201511051437.tA5EbHmo014994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 5 Nov 2015 14:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290393 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 14:37:19 -0000 Author: royger Date: Thu Nov 5 14:37:17 2015 New Revision: 290393 URL: https://svnweb.freebsd.org/changeset/base/290393 Log: xen-netfront: remove unused header files Submitted by: Wei Liu Reviewed by: royger Sponsored by: Citrix Systems R&D Differential Revision: https://reviews.freebsd.org/D4079 Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Thu Nov 5 14:33:46 2015 (r290392) +++ head/sys/dev/xen/netfront/netfront.c Thu Nov 5 14:37:17 2015 (r290393) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include -#include #include #include #include @@ -40,22 +39,17 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include @@ -65,16 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include /* for DELAY */ -#include -#include -#include -#include - #include -#include - -#include #include #include From owner-svn-src-head@freebsd.org Thu Nov 5 14:55:59 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E76DA27018; Thu, 5 Nov 2015 14:55:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F48F18A2; Thu, 5 Nov 2015 14:55:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5EtwUU020582; Thu, 5 Nov 2015 14:55:58 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5EtwUc020580; Thu, 5 Nov 2015 14:55:58 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201511051455.tA5EtwUc020580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 5 Nov 2015 14:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290394 - in head: include sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 14:55:59 -0000 Author: pfg Date: Thu Nov 5 14:55:58 2015 New Revision: 290394 URL: https://svnweb.freebsd.org/changeset/base/290394 Log: Rename __sentinel to __null_sentinel GCC 5 uses a conflicting __sentinel definition in include/c++/bits/stl_algo.h Reported by: matteo Modified: head/include/unistd.h head/sys/sys/cdefs.h Modified: head/include/unistd.h ============================================================================== --- head/include/unistd.h Thu Nov 5 14:37:17 2015 (r290393) +++ head/include/unistd.h Thu Nov 5 14:55:58 2015 (r290394) @@ -327,9 +327,9 @@ int close(int); void closefrom(int); int dup(int); int dup2(int, int); -int execl(const char *, const char *, ...) __sentinel; +int execl(const char *, const char *, ...) __null_sentinel; int execle(const char *, const char *, ...); -int execlp(const char *, const char *, ...) __sentinel; +int execlp(const char *, const char *, ...) __null_sentinel; int execv(const char *, char * const *); int execve(const char *, char * const *, char * const *); int execvp(const char *, char * const *); Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Thu Nov 5 14:37:17 2015 (r290393) +++ head/sys/sys/cdefs.h Thu Nov 5 14:55:58 2015 (r290394) @@ -459,11 +459,11 @@ #endif #if __GNUC_PREREQ__(4, 0) -#define __sentinel __attribute__((__sentinel__)) +#define __null_sentinel __attribute__((__sentinel__)) #define __exported __attribute__((__visibility__("default"))) #define __hidden __attribute__((__visibility__("hidden"))) #else -#define __sentinel +#define __null_sentinel #define __exported #define __hidden #endif From owner-svn-src-head@freebsd.org Thu Nov 5 16:08:39 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E1B9A26007; Thu, 5 Nov 2015 16:08:39 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::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 F30B51E09; Thu, 5 Nov 2015 16:08:38 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by lfgh9 with SMTP id h9so59697124lfg.1; Thu, 05 Nov 2015 08:08:37 -0800 (PST) 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=FKEvlqPQ/PoYUBdN5MMFGZY+mjM1qQjs+i/Kz0126WE=; b=tDaAcT72qQ8rlUCNZk3RoKAg/Zf1j8Ba9h6rC5s64NrKrCAQPnpiZV7Xk8PCSh1aUM wQ/1dr7uphroL9gwA9v7Fo+7P99s7lBJQPP4asztabXLnJ+y1170Wu3byHCCMS8a8yf7 d6JSfNHhxSnYBBh/MUN6nFTBh1Gf/eOk9uloPGPvuJM81M8/8ExvaEO525+cTS1Eg/v6 oFlVJYxIaCx0F9Ri9ObnZuQDAON8s8ZuwftBukJECxWbx0L3qZgQxJLJfE0M1tujSibz Kpyf6jtCEddD9n+5bRmT/VLkY01sGHxrXcF5J1DJ3/1XULcwT2pu5gHPTdZYiZFDb73I 28xg== MIME-Version: 1.0 X-Received: by 10.25.161.16 with SMTP id k16mr2403833lfe.31.1446739716940; Thu, 05 Nov 2015 08:08:36 -0800 (PST) Received: by 10.112.126.104 with HTTP; Thu, 5 Nov 2015 08:08:36 -0800 (PST) In-Reply-To: References: <201510221638.t9MGc1cc053885@repo.freebsd.org> <56348FF8.3010602@gmail.com> <1446394311.91534.236.camel@freebsd.org> Date: Thu, 5 Nov 2015 08:08:36 -0800 Message-ID: Subject: Re: svn commit: r289759 - in head/sys/arm: arm include From: Jason Harmening To: Svatopluk Kraus Cc: Ian Lepore , Ganbold Tsagaankhuu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 16:08:39 -0000 Userspace buffers in load_buffer() also need temporary mappings, so it might be nice to keep the panic/KASSERT there for completeness. I don't see how anything coming from userspace would be outside vm_page_array though, so that is up to you and Michal. Since Michal's already made the initial patch, I think he should make the commit. That seems only right, plus I'm still busy trying to get everything set up at my new place. I'd like to be on the phabricator review, though. On Thu, Nov 5, 2015 at 3:58 AM, Svatopluk Kraus wrote: > On Thu, Nov 5, 2015 at 1:11 AM, Jason Harmening > wrote: > > > > On Wed, Nov 4, 2015 at 2:17 PM, Svatopluk Kraus > wrote: > >> > >> On Tue, Nov 3, 2015 at 8:45 AM, Jason Harmening > >> wrote: > >> > > >> > On Sun, Nov 1, 2015 at 8:11 AM, Ian Lepore wrote: > >> >> > >> >> > >> >> It's almost certainly not related to sysinit ordering. This > exception > >> >> is happening during mmc probing after interrupts are enabled. > >> >> > >> >> It appears that the problem is the faulting code is running on one of > >> >> the very early pre-allocated kernel stacks (perhaps in an interrupt > >> >> handler on an idle thread stack), and these stacks are not in memory > >> >> represented in the vm page arrays. The mmc code is using a 64-byte > >> >> buffer on the stack and mapping it for DMA. Normally that causes a > >> >> bounce for cacheline alignment, but unluckily in this case that > buffer > >> >> on the stack just happened to be aligned to a cacheline boundary and > a > >> >> multiple of the cacheline size, so no bounce. That causes the new > sync > >> >> logic that is based on keeping vm_page_t pointers and offsets to get > a > >> >> NULL pointer back from PHYS_TO_VM_PAGE when mapping, then it dies at > >> >> sync time trying to dereference that. It used to work because the > sync > >> >> logic used to use the vaddr, not a page pointer. > >> >> > >> >> Michal was working on a patch yesterday. > >> >> > >> > > >> > Ah, thanks for pointing that out Ian. I was left scratching my head > >> > (admittedly on the road and w/o easy access to the code) wondering > what > >> > on > >> > earth would be trying to do DMA during SI_SUB_CPU. > >> > > >> > >> > >> Using of fictitious pages is not so easy here as in case pointed by > >> kib@ where they are allocated and freed inside one function. For sync > >> list sake, they must be allocated when a buffer is loaded and freed > >> when is unloaded. > >> > >> Michal uses pmap_kextract() in case when KVA of buffer is not zero in > >> his proof-of-concept patch: > >> https://gist.github.com/strejda/d5ca3ed202427a2e0557 > >> When KVA of buffer is not zero, temporary mapping is not used at all, > >> so vm_page_t array is not needed too. > >> > >> IMO, buffer's physical address can be saved in sync list to be used > >> when its KVA is not zero. Thus pmap_kextract() won't be called in > >> dma_dcache_sync(). > > > > > > I like the idea of storing off the physical address. If you want to save > > space in the sync list, I think you can place busaddr and pages in a > union, > > using vaddr == 0 to select which field to use. Some people frown upon > use > > of unions, though. > > > > Any reason the panics on PHYS_TO_VM_PAGE in load_buffer() and load_phys() > > shouldn't be KASSERTs instead? > > > KASSERTs are fine. I have looked at Michal's patch again and only > KASSERT should be in load_phys() as such buffers are unmapped, > temporary mapping must be used and so, they must be in vm_page_array. > And maybe some inline function for getting PA from sync list would be > nice too. I would like to review final patch if you are going to make > it. And it would be nice if Ganbold will test it. Phabricator? > From owner-svn-src-head@freebsd.org Thu Nov 5 16:55:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D349EA26B99; Thu, 5 Nov 2015 16:55:28 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A4741AD5; Thu, 5 Nov 2015 16:55:28 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5GtRw9056384; Thu, 5 Nov 2015 16:55:27 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5GtRZ2056382; Thu, 5 Nov 2015 16:55:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201511051655.tA5GtRZ2056382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 5 Nov 2015 16:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290397 - in head/sys: cddl/contrib/opensolaris/common/atomic/aarch64 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 16:55:28 -0000 Author: andrew Date: Thu Nov 5 16:55:27 2015 New Revision: 290397 URL: https://svnweb.freebsd.org/changeset/base/290397 Log: Fix the open solaris atomic functions on arm64. Without this we may use the wrong value in the comparison, leading to incorrectly setting the new value. This has been observed in the ZFS code. Without this we can lose track of the reference count in a zrlock object. We should move to use the generic atomic functions, however as this has been observed I would prefer to have this working, then move to the generic functions. PR: 204037 Sponsored by: ABT Systems Ltd Added: head/sys/cddl/contrib/opensolaris/common/atomic/aarch64/ head/sys/cddl/contrib/opensolaris/common/atomic/aarch64/opensolaris_atomic.S Modified: head/sys/conf/files.arm64 Added: head/sys/cddl/contrib/opensolaris/common/atomic/aarch64/opensolaris_atomic.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/common/atomic/aarch64/opensolaris_atomic.S Thu Nov 5 16:55:27 2015 (r290397) @@ -0,0 +1,87 @@ +/*- + * Copyright (C) 2015 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +/* + * uint64_t atomic_add_64_nv(volatile uint64_t *target, int64_t delta) + */ +ENTRY(atomic_add_64_nv) +1: ldxr x2, [x0] /* Load *target */ + add x2, x2, x1 /* x2 = x2 + delta */ + stxr w3, x2, [x0] /* Store *target */ + cbnz w3, 1b /* Check if the store succeeded */ + mov x0, x2 /* Return the new value */ + ret +END(atomic_add_64_nv) + +/* + * uint32_t + * atomic_cas_32(volatile uint32_t *target, uint32_t cmp, uint32_t newval) + */ +ENTRY(atomic_cas_32) +1: ldxr w3, [x0] /* Load *target */ + cmp w3, w1 /* Does *targe == cmp? */ + b.ne 2f /* If not exit */ + stxr w4, w2, [x0] /* Store newval to *target */ + cbnz w4, 1b /* Check if the store succeeded */ +2: mov w0, w3 /* Return the old value */ + ret +END(atomic_cas_32) + +/* + * uint64_t + * atomic_cas_64(volatile uint64_t *target, uint64_t cmp, uint64_t newval) + */ +ENTRY(atomic_cas_64) +1: ldxr x3, [x0] /* Load *target */ + cmp x3, x1 /* Does *targe == cmp? */ + b.ne 2f /* If not exit */ + stxr w4, x2, [x0] /* Store newval to *target */ + cbnz w4, 1b /* Check if the store succeeded */ +2: mov x0, x3 /* Return the old value */ + ret +END(atomic_cas_64) + +/* + * uint8_t atomic_or_8_nv(volatile uint8_t *target, uint8_t value) + */ +ENTRY(atomic_or_8_nv) +1: ldxrb w2, [x0] /* Load *target */ + orr w2, w2, w1 /* x2 = x2 | delta */ + stxrb w3, w2, [x0] /* Store *target */ + cbnz w3, 1b /* Check if the store succeeded */ + mov w0, w2 /* Return the new value */ + ret +END(atomic_or_8_nv) + +ENTRY(membar_producer) + dmb ish + ret +END(membar_producer) + Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Nov 5 16:50:09 2015 (r290396) +++ head/sys/conf/files.arm64 Thu Nov 5 16:55:27 2015 (r290397) @@ -88,7 +88,7 @@ libkern/flsl.c standard libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard -cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs | dtrace compile-with "${CDDL_C}" +cddl/contrib/opensolaris/common/atomic/aarch64/opensolaris_atomic.S optional zfs | dtrace compile-with "${CDDL_C}" cddl/dev/dtrace/aarch64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/aarch64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/aarch64/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" From owner-svn-src-head@freebsd.org Thu Nov 5 17:00:39 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8054AA26CAA; Thu, 5 Nov 2015 17:00:39 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B8611CF2; Thu, 5 Nov 2015 17:00:39 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5H0cwt056677; Thu, 5 Nov 2015 17:00:38 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5H0c9G056676; Thu, 5 Nov 2015 17:00:38 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201511051700.tA5H0c9G056676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 5 Nov 2015 17:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290398 - head/lib/libedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 17:00:39 -0000 Author: brooks Date: Thu Nov 5 17:00:38 2015 New Revision: 290398 URL: https://svnweb.freebsd.org/changeset/base/290398 Log: Revert r290298. Per discussion on tech-userlevel@netbsd.org this change was incorrect. Modified: head/lib/libedit/eln.c Modified: head/lib/libedit/eln.c ============================================================================== --- head/lib/libedit/eln.c Thu Nov 5 16:55:27 2015 (r290397) +++ head/lib/libedit/eln.c Thu Nov 5 17:00:38 2015 (r290398) @@ -325,11 +325,11 @@ el_get(EditLine *el, int op, ...) ret = el_wget(el, op, va_arg(ap, const char **)); break; - case EL_SIGNAL: /* int */ + case EL_SIGNAL: /* int * */ case EL_EDITMODE: case EL_UNBUFFERED: case EL_PREP_TERM: - ret = el_wget(el, op, va_arg(ap, int)); + ret = el_wget(el, op, va_arg(ap, int *)); break; case EL_GETTC: { From owner-svn-src-head@freebsd.org Thu Nov 5 17:00:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C90F9A26CD6; Thu, 5 Nov 2015 17:00:43 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FD0D1D1C; Thu, 5 Nov 2015 17:00:43 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5H0gaS056729; Thu, 5 Nov 2015 17:00:42 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5H0gOX056728; Thu, 5 Nov 2015 17:00:42 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511051700.tA5H0gOX056728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 5 Nov 2015 17:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290399 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 17:00:43 -0000 Author: smh Date: Thu Nov 5 17:00:42 2015 New Revision: 290399 URL: https://svnweb.freebsd.org/changeset/base/290399 Log: Allow zfs_recover to be changed at runtime MFC after: 1 week Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c 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 Thu Nov 5 17:00:38 2015 (r290398) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Nov 5 17:00:42 2015 (r290399) @@ -255,7 +255,7 @@ int zfs_flags = 0; */ boolean_t zfs_recover = B_FALSE; SYSCTL_DECL(_vfs_zfs); -SYSCTL_INT(_vfs_zfs, OID_AUTO, recover, CTLFLAG_RDTUN, &zfs_recover, 0, +SYSCTL_INT(_vfs_zfs, OID_AUTO, recover, CTLFLAG_RWTUN, &zfs_recover, 0, "Try to recover from otherwise-fatal errors."); static int From owner-svn-src-head@freebsd.org Thu Nov 5 17:04:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FCCEA26F45; Thu, 5 Nov 2015 17:04:19 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57FCA14D6; Thu, 5 Nov 2015 17:04:19 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5H4IG8059729; Thu, 5 Nov 2015 17:04:18 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5H4I68059728; Thu, 5 Nov 2015 17:04:18 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201511051704.tA5H4I68059728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 5 Nov 2015 17:04:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290400 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 17:04:19 -0000 Author: asomers Date: Thu Nov 5 17:04:18 2015 New Revision: 290400 URL: https://svnweb.freebsd.org/changeset/base/290400 Log: Update authors' contact info and fix grammar bugs. MFC after: 2 weeks Sponsored by: Spectra Logic Modified: head/share/man/man4/xnb.4 Modified: head/share/man/man4/xnb.4 ============================================================================== --- head/share/man/man4/xnb.4 Thu Nov 5 17:00:42 2015 (r290399) +++ head/share/man/man4/xnb.4 Thu Nov 5 17:04:18 2015 (r290400) @@ -57,12 +57,12 @@ will run on Domain 0 and the netfront dr However, it is also possible to run .Nm on a guest domain. -It may be bridged or routed to provide the netfront's +It may be bridged or routed to provide the netfront domain access to other guest domains or to a physical network. .Pp In most respects, the .Nm -device appears to the OS as an other Ethernet device. +device appears to the OS as any other Ethernet device. It can be configured at runtime entirely with .Xr ifconfig 8 . In particular, it supports MAC changing, arbitrary MTU sizes, checksum @@ -101,9 +101,8 @@ device driver first appeared in The .Nm driver was written by -.An Alan Somers Aq Mt alans@spectralogic.com -and -.An John Suykerbuyk Aq Mt johns@spectralogic.com . +.An Alan Somers Aq Mt asomers@FreeBSD.org +and John Suykerbuyk. .Sh CAVEATS Packets sent through Xennet pass over shared memory, so the protocol includes no form of link-layer checksum or CRC. From owner-svn-src-head@freebsd.org Thu Nov 5 17:12:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FF9CA271A3; Thu, 5 Nov 2015 17:12:43 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17C591C64; Thu, 5 Nov 2015 17:12:43 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5HCgSD062459; Thu, 5 Nov 2015 17:12:42 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5HCgdv062458; Thu, 5 Nov 2015 17:12:42 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511051712.tA5HCgdv062458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 5 Nov 2015 17:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290401 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 17:12:43 -0000 Author: smh Date: Thu Nov 5 17:12:41 2015 New Revision: 290401 URL: https://svnweb.freebsd.org/changeset/base/290401 Log: Provide information about bad DVA Provide information about which vdev has an issue with a bad DVA. MFC after: 1 week Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c 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 Thu Nov 5 17:04:18 2015 (r290400) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Nov 5 17:12:41 2015 (r290401) @@ -1835,7 +1835,13 @@ dva_get_dsize_sync(spa_t *spa, const dva ASSERT(spa_config_held(spa, SCL_ALL, RW_READER) != 0); if (asize != 0 && spa->spa_deflate) { - vdev_t *vd = vdev_lookup_top(spa, DVA_GET_VDEV(dva)); + uint64_t vdev = DVA_GET_VDEV(dva); + vdev_t *vd = vdev_lookup_top(spa, vdev); + if (vd == NULL) { + zfs_panic_recover( + "dva_get_dsize_sync(): bad DVA %llu:%llu", + (u_longlong_t)vdev, (u_longlong_t)asize); + } dsize = (asize >> SPA_MINBLOCKSHIFT) * vd->vdev_deflate_ratio; } From owner-svn-src-head@freebsd.org Thu Nov 5 17:21:51 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC0CAA272EF for ; Thu, 5 Nov 2015 17:21:51 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FFA311CC for ; Thu, 5 Nov 2015 17:21:51 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Thu, 5 Nov 2015 17:22:17 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id tA5HLhw6049038; Thu, 5 Nov 2015 10:21:43 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1446744103.91534.399.camel@freebsd.org> Subject: Re: svn commit: r289759 - in head/sys/arm: arm include From: Ian Lepore To: Jason Harmening , Svatopluk Kraus Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 05 Nov 2015 10:21:43 -0700 In-Reply-To: References: <201510221638.t9MGc1cc053885@repo.freebsd.org> <56348FF8.3010602@gmail.com> <1446394311.91534.236.camel@freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 17:21:51 -0000 Just as an FYI for you guys, since we're all splashing around in busdma code lately.... The things on my near-term (next several weeks) to-do list for busdma are: Add "small bounce" support to help reduce the bounce preallocation overhead for handling bounces due to cacheline alignment. Almost all arm and mips bounces are triggered by cache alignment restrictions and involve buffers smaller than a page (usually 256 bytes or less), and we currently allocate full pages for bouncing. Instead we can use the same small-buffer uma pools that are used for bus_dmamem_alloc(). The armv6 busdma implementation can be shared by armv4, armv6, and mips. The only thing blocking this right now is the small-bounce stuff; armv4 and mips boards often have only 32-128MB of ram, and they can't afford the bounce-page allocation overhead of the current armv6 implementation. Once the small-bounce support is in place, we can use this implementation for all these platforms (and basically for any platform that comes along that has a similar requirement for software -assisted cache coherency for DMA). -- Ian On Thu, 2015-11-05 at 08:08 -0800, Jason Harmening wrote: > Userspace buffers in load_buffer() also need temporary mappings, so > it > might be nice to keep the panic/KASSERT there for completeness. I > don't > see how anything coming from userspace would be outside > vm_page_array > though, so that is up to you and Michal. > > Since Michal's already made the initial patch, I think he should make > the > commit. That seems only right, plus I'm still busy trying to get > everything set up at my new place. I'd like to be on the phabricator > review, though. > > On Thu, Nov 5, 2015 at 3:58 AM, Svatopluk Kraus > wrote: > > > On Thu, Nov 5, 2015 at 1:11 AM, Jason Harmening > > wrote: > > > > > > On Wed, Nov 4, 2015 at 2:17 PM, Svatopluk Kraus > > > > > wrote: > > > > > > > > On Tue, Nov 3, 2015 at 8:45 AM, Jason Harmening > > > > wrote: > > > > > > > > > > On Sun, Nov 1, 2015 at 8:11 AM, Ian Lepore > > > > > wrote: > > > > > > > > > > > > > > > > > > It's almost certainly not related to sysinit ordering. > > > > > > This > > exception > > > > > > is happening during mmc probing after interrupts are > > > > > > enabled. > > > > > > > > > > > > It appears that the problem is the faulting code is running > > > > > > on one of > > > > > > the very early pre-allocated kernel stacks (perhaps in an > > > > > > interrupt > > > > > > handler on an idle thread stack), and these stacks are not > > > > > > in memory > > > > > > represented in the vm page arrays. The mmc code is using a > > > > > > 64-byte > > > > > > buffer on the stack and mapping it for DMA. Normally that > > > > > > causes a > > > > > > bounce for cacheline alignment, but unluckily in this case > > > > > > that > > buffer > > > > > > on the stack just happened to be aligned to a cacheline > > > > > > boundary and > > a > > > > > > multiple of the cacheline size, so no bounce. That causes > > > > > > the new > > sync > > > > > > logic that is based on keeping vm_page_t pointers and > > > > > > offsets to get > > a > > > > > > NULL pointer back from PHYS_TO_VM_PAGE when mapping, then > > > > > > it dies at > > > > > > sync time trying to dereference that. It used to work > > > > > > because the > > sync > > > > > > logic used to use the vaddr, not a page pointer. > > > > > > > > > > > > Michal was working on a patch yesterday. > > > > > > > > > > > > > > > > Ah, thanks for pointing that out Ian. I was left scratching > > > > > my head > > > > > (admittedly on the road and w/o easy access to the code) > > > > > wondering > > what > > > > > on > > > > > earth would be trying to do DMA during SI_SUB_CPU. > > > > > > > > > > > > > > > > > Using of fictitious pages is not so easy here as in case > > > > pointed by > > > > kib@ where they are allocated and freed inside one function. > > > > For sync > > > > list sake, they must be allocated when a buffer is loaded and > > > > freed > > > > when is unloaded. > > > > > > > > Michal uses pmap_kextract() in case when KVA of buffer is not > > > > zero in > > > > his proof-of-concept patch: > > > > https://gist.github.com/strejda/d5ca3ed202427a2e0557 > > > > When KVA of buffer is not zero, temporary mapping is not used > > > > at all, > > > > so vm_page_t array is not needed too. > > > > > > > > IMO, buffer's physical address can be saved in sync list to be > > > > used > > > > when its KVA is not zero. Thus pmap_kextract() won't be called > > > > in > > > > dma_dcache_sync(). > > > > > > > > > I like the idea of storing off the physical address. If you want > > > to save > > > space in the sync list, I think you can place busaddr and pages > > > in a > > union, > > > using vaddr == 0 to select which field to use. Some people frown > > > upon > > use > > > of unions, though. > > > > > > Any reason the panics on PHYS_TO_VM_PAGE in load_buffer() and > > > load_phys() > > > shouldn't be KASSERTs instead? > > > > > > KASSERTs are fine. I have looked at Michal's patch again and only > > KASSERT should be in load_phys() as such buffers are unmapped, > > temporary mapping must be used and so, they must be in > > vm_page_array. > > And maybe some inline function for getting PA from sync list would > > be > > nice too. I would like to review final patch if you are going to > > make > > it. And it would be nice if Ganbold will test it. Phabricator? > > From owner-svn-src-head@freebsd.org Thu Nov 5 17:23:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01793A2741B; Thu, 5 Nov 2015 17:23:04 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDD471529; Thu, 5 Nov 2015 17:23:03 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5HN2Kp065531; Thu, 5 Nov 2015 17:23:02 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5HN24j065530; Thu, 5 Nov 2015 17:23:02 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511051723.tA5HN24j065530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 5 Nov 2015 17:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290403 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 17:23:04 -0000 Author: smh Date: Thu Nov 5 17:23:02 2015 New Revision: 290403 URL: https://svnweb.freebsd.org/changeset/base/290403 Log: Add MTU support to carp interfaces MFC after: 2 weeks Sponsored by: Multiplay Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Thu Nov 5 17:19:08 2015 (r290402) +++ head/sys/netinet/ip_carp.c Thu Nov 5 17:23:02 2015 (r290403) @@ -1769,6 +1769,13 @@ carp_ioctl(struct ifreq *ifr, u_long cmd } break; } + case SIOCSIFMTU: + if (ifr->ifr_mtu > ETHERMTU_JUMBO) { + error = EINVAL; + } else { + ifp->if_mtu = ifr->ifr_mtu; + } + break; default: error = EINVAL; } From owner-svn-src-head@freebsd.org Thu Nov 5 17:26:57 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA631A274FD; Thu, 5 Nov 2015 17:26:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 903941893; Thu, 5 Nov 2015 17:26:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5HQuFu065686; Thu, 5 Nov 2015 17:26:56 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5HQugN065685; Thu, 5 Nov 2015 17:26:56 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201511051726.tA5HQugN065685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 5 Nov 2015 17:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290404 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 17:26:57 -0000 Author: trasz Date: Thu Nov 5 17:26:56 2015 New Revision: 290404 URL: https://svnweb.freebsd.org/changeset/base/290404 Log: Fix markup in rctl(8) - the 'rule' or 'filter' arguments are not optional. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Thu Nov 5 17:23:02 2015 (r290403) +++ head/usr.bin/rctl/rctl.8 Thu Nov 5 17:26:56 2015 (r290404) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2015 +.Dd November 5, 2015 .Dt RCTL 8 .Os .Sh NAME @@ -38,19 +38,19 @@ .Op Ar filter .Nm .Fl a -.Op Ar rule +.Ar rule .Nm .Fl l .Op Fl h .Op Fl n -.Op Ar filter +.Ar filter .Nm .Fl r -.Op Ar filter +.Ar filter .Nm .Fl u .Op Fl h -.Op Ar filter +.Ar filter .Pp .Nm requires the kernel to be compiled with: From owner-svn-src-head@freebsd.org Thu Nov 5 17:37:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DDF4A2768F; Thu, 5 Nov 2015 17:37:16 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20BF61D22; Thu, 5 Nov 2015 17:37:16 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5HbF1u068499; Thu, 5 Nov 2015 17:37:15 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5HbFkh068498; Thu, 5 Nov 2015 17:37:15 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201511051737.tA5HbFkh068498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Thu, 5 Nov 2015 17:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290405 - head/etc/periodic/security X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 17:37:16 -0000 Author: lidl Date: Thu Nov 5 17:37:14 2015 New Revision: 290405 URL: https://svnweb.freebsd.org/changeset/base/290405 Log: Restrict 520.pfdenied to only list rules that blocked traffic. Before this change, the 520.pfdenied script listed all rules that matched /^block/ in the rule. Restrict the printed output to only those rules that result in packets being dropped. PR: conf/187224 Approved by: rpaulo (mentor) Differential Revision: https://reviews.freebsd.org/D4068 Modified: head/etc/periodic/security/520.pfdenied Modified: head/etc/periodic/security/520.pfdenied ============================================================================== --- head/etc/periodic/security/520.pfdenied Thu Nov 5 17:26:56 2015 (r290404) +++ head/etc/periodic/security/520.pfdenied Thu Nov 5 17:37:14 2015 (r290405) @@ -44,7 +44,7 @@ rc=0 if check_yesno_period security_status_pfdenied_enable then TMP=`mktemp -t security` - if pfctl -sr -v 2>/dev/null | nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); print buf$0;} }' > ${TMP}; then + if pfctl -sr -v 2>/dev/null | nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); if ($5 > 0) print buf$0;} }' > ${TMP}; then check_diff new_only pf ${TMP} "${host} pf denied packets:" fi rc=$? From owner-svn-src-head@freebsd.org Thu Nov 5 17:37:36 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCA82A276D6; Thu, 5 Nov 2015 17:37:36 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EEE01ED4; Thu, 5 Nov 2015 17:37:36 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5HbZDa068567; Thu, 5 Nov 2015 17:37:35 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5HbZXu068566; Thu, 5 Nov 2015 17:37:35 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511051737.tA5HbZXu068566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 5 Nov 2015 17:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290406 - head/sys/geom/eli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 17:37:36 -0000 Author: smh Date: Thu Nov 5 17:37:35 2015 New Revision: 290406 URL: https://svnweb.freebsd.org/changeset/base/290406 Log: Fix g_eli error loss conditions * Ensure that error information isn't lost. * Log the error code in all cases. * Don't overwrite bio_completed set to 0 from the error condition. MFC after: 2 weeks Sponsored by: Multiplay Modified: head/sys/geom/eli/g_eli.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Thu Nov 5 17:37:14 2015 (r290405) +++ head/sys/geom/eli/g_eli.c Thu Nov 5 17:37:35 2015 (r290406) @@ -195,7 +195,7 @@ g_eli_read_done(struct bio *bp) G_ELI_LOGREQ(2, bp, "Request done."); pbp = bp->bio_parent; - if (pbp->bio_error == 0) + if (pbp->bio_error == 0 && bp->bio_error != 0) pbp->bio_error = bp->bio_error; g_destroy_bio(bp); /* @@ -206,7 +206,8 @@ g_eli_read_done(struct bio *bp) return; sc = pbp->bio_to->geom->softc; if (pbp->bio_error != 0) { - G_ELI_LOGREQ(0, pbp, "%s() failed", __func__); + G_ELI_LOGREQ(0, pbp, "%s() failed (error=%d)", __func__, + pbp->bio_error); pbp->bio_completed = 0; if (pbp->bio_driver2 != NULL) { free(pbp->bio_driver2, M_ELI); @@ -235,10 +236,8 @@ g_eli_write_done(struct bio *bp) G_ELI_LOGREQ(2, bp, "Request done."); pbp = bp->bio_parent; - if (pbp->bio_error == 0) { - if (bp->bio_error != 0) - pbp->bio_error = bp->bio_error; - } + if (pbp->bio_error == 0 && bp->bio_error != 0) + pbp->bio_error = bp->bio_error; g_destroy_bio(bp); /* * Do we have all sectors already? @@ -249,14 +248,15 @@ g_eli_write_done(struct bio *bp) free(pbp->bio_driver2, M_ELI); pbp->bio_driver2 = NULL; if (pbp->bio_error != 0) { - G_ELI_LOGREQ(0, pbp, "Crypto WRITE request failed (error=%d).", + G_ELI_LOGREQ(0, pbp, "%s() failed (error=%d)", __func__, pbp->bio_error); pbp->bio_completed = 0; - } + } else + pbp->bio_completed = pbp->bio_length; + /* * Write is finished, send it up. */ - pbp->bio_completed = pbp->bio_length; sc = pbp->bio_to->geom->softc; g_io_deliver(pbp, pbp->bio_error); atomic_subtract_int(&sc->sc_inflight, 1); From owner-svn-src-head@freebsd.org Thu Nov 5 17:58:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EB58A27A84; Thu, 5 Nov 2015 17:58:20 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D8861A7F; Thu, 5 Nov 2015 17:58:20 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5HwJdY074322; Thu, 5 Nov 2015 17:58:19 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5HwIJc074315; Thu, 5 Nov 2015 17:58:18 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201511051758.tA5HwIJc074315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 5 Nov 2015 17:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290407 - in head/sys/dev: iwi otus usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 17:58:20 -0000 Author: avos Date: Thu Nov 5 17:58:18 2015 New Revision: 290407 URL: https://svnweb.freebsd.org/changeset/base/290407 Log: net80211: WME callback cleanup in various drivers Since r288350, ic_wme_task() is called via ieee80211_runtask(), so, any additional deferring from the driver side is not needed. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4072 Modified: head/sys/dev/iwi/if_iwi.c head/sys/dev/iwi/if_iwivar.h head/sys/dev/otus/if_otus.c head/sys/dev/otus/if_otusreg.h head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_rumvar.h head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Thu Nov 5 17:37:35 2015 (r290406) +++ head/sys/dev/iwi/if_iwi.c Thu Nov 5 17:58:18 2015 (r290407) @@ -155,7 +155,6 @@ static void iwi_media_status(struct ifne static int iwi_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void iwi_wme_init(struct iwi_softc *); static int iwi_wme_setparams(struct iwi_softc *); -static void iwi_update_wme(void *, int); static int iwi_wme_update(struct ieee80211com *); static uint16_t iwi_read_prom_word(struct iwi_softc *, uint8_t); static void iwi_frame_intr(struct iwi_softc *, struct iwi_rx_data *, int, @@ -286,7 +285,6 @@ iwi_attach(device_t dev) TASK_INIT(&sc->sc_radiofftask, 0, iwi_radio_off, sc); TASK_INIT(&sc->sc_restarttask, 0, iwi_restart, sc); TASK_INIT(&sc->sc_disassoctask, 0, iwi_disassoc, sc); - TASK_INIT(&sc->sc_wmetask, 0, iwi_update_wme, sc); TASK_INIT(&sc->sc_monitortask, 0, iwi_monitor_scan, sc); callout_init_mtx(&sc->sc_wdtimer, &sc->sc_mtx, 0); @@ -1060,22 +1058,12 @@ iwi_wme_setparams(struct iwi_softc *sc) #undef IWI_USEC #undef IWI_EXP2 -static void -iwi_update_wme(void *arg, int npending) -{ - struct iwi_softc *sc = arg; - IWI_LOCK_DECL; - - IWI_LOCK(sc); - (void) iwi_wme_setparams(sc); - IWI_UNLOCK(sc); -} - static int iwi_wme_update(struct ieee80211com *ic) { struct iwi_softc *sc = ic->ic_softc; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + IWI_LOCK_DECL; /* * We may be called to update the WME parameters in @@ -1085,8 +1073,11 @@ iwi_wme_update(struct ieee80211com *ic) * to the adapter as part of the work iwi_auth_and_assoc * does. */ - if (vap->iv_state == IEEE80211_S_RUN) - ieee80211_runtask(ic, &sc->sc_wmetask); + if (vap->iv_state == IEEE80211_S_RUN) { + IWI_LOCK(sc); + iwi_wme_setparams(sc); + IWI_UNLOCK(sc); + } return (0); } Modified: head/sys/dev/iwi/if_iwivar.h ============================================================================== --- head/sys/dev/iwi/if_iwivar.h Thu Nov 5 17:37:35 2015 (r290406) +++ head/sys/dev/iwi/if_iwivar.h Thu Nov 5 17:58:18 2015 (r290407) @@ -192,7 +192,6 @@ struct iwi_softc { struct task sc_radiofftask; /* radio off processing */ struct task sc_restarttask; /* restart adapter processing */ struct task sc_disassoctask; - struct task sc_wmetask; /* set wme parameters */ struct task sc_monitortask; unsigned int sc_running : 1, /* initialized */ Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Thu Nov 5 17:37:35 2015 (r290406) +++ head/sys/dev/otus/if_otus.c Thu Nov 5 17:58:18 2015 (r290407) @@ -155,7 +155,6 @@ static void otus_free_txcmd(struct otus_ void otus_next_scan(void *, int); static void otus_tx_task(void *, int pending); -static void otus_wme_update_task(void *, int pending); void otus_do_async(struct otus_softc *, void (*)(struct otus_softc *, void *), void *, int); int otus_newstate(struct ieee80211vap *, enum ieee80211_state, @@ -177,8 +176,9 @@ static int otus_tx(struct otus_softc *, const struct ieee80211_bpf_params *); int otus_ioctl(struct ifnet *, u_long, caddr_t); int otus_set_multi(struct otus_softc *); -static void otus_updateedca(struct otus_softc *sc); -static void otus_updateslot(struct otus_softc *sc); +static int otus_updateedca(struct ieee80211com *); +static void otus_updateedca_locked(struct otus_softc *); +static void otus_updateslot(struct otus_softc *); int otus_init_mac(struct otus_softc *); uint32_t otus_phy_get_def(struct otus_softc *, uint32_t); int otus_set_board_values(struct otus_softc *, @@ -300,7 +300,6 @@ otus_attach(device_t self) TIMEOUT_TASK_INIT(taskqueue_thread, &sc->scan_to, 0, otus_next_scan, sc); TIMEOUT_TASK_INIT(taskqueue_thread, &sc->calib_to, 0, otus_calibrate_to, sc); TASK_INIT(&sc->tx_task, 0, otus_tx_task, sc); - TASK_INIT(&sc->wme_update_task, 0, otus_wme_update_task, sc); mbufq_init(&sc->sc_snd, ifqmaxlen); iface_index = 0; @@ -345,7 +344,6 @@ otus_detach(device_t self) taskqueue_drain_timeout(taskqueue_thread, &sc->scan_to); taskqueue_drain_timeout(taskqueue_thread, &sc->calib_to); taskqueue_drain(taskqueue_thread, &sc->tx_task); - taskqueue_drain(taskqueue_thread, &sc->wme_update_task); otus_close_pipes(sc); #if 0 @@ -590,44 +588,6 @@ otus_set_channel(struct ieee80211com *ic OTUS_UNLOCK(sc); } -static void -otus_wme_update_task(void *arg, int pending) -{ - struct otus_softc *sc = arg; - - OTUS_LOCK(sc); - /* - * XXX TODO: take temporary copy of EDCA information - * when scheduling this so we have a more time-correct view - * of things. - */ - otus_updateedca(sc); - OTUS_UNLOCK(sc); -} - -static void -otus_wme_schedule_update(struct otus_softc *sc) -{ - - taskqueue_enqueue(taskqueue_thread, &sc->wme_update_task); -} - -/* - * This is called by net80211 in RX packet context, so we - * can't sleep here. - * - * TODO: have net80211 schedule an update itself for its - * own internal taskqueue. - */ -static int -otus_wme_update(struct ieee80211com *ic) -{ - struct otus_softc *sc = ic->ic_softc; - - otus_wme_schedule_update(sc); - return (0); -} - static int otus_ampdu_enable(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap) { @@ -811,7 +771,7 @@ otus_attachhook(struct otus_softc *sc) ic->ic_transmit = otus_transmit; ic->ic_update_chw = otus_update_chw; ic->ic_ampdu_enable = otus_ampdu_enable; - ic->ic_wme.wme_update = otus_wme_update; + ic->ic_wme.wme_update = otus_updateedca; ic->ic_newassoc = otus_newassoc; ic->ic_node_alloc = otus_node_alloc; @@ -2383,8 +2343,25 @@ otus_set_multi(struct otus_softc *sc) return (r); } +static int +otus_updateedca(struct ieee80211com *ic) +{ + struct otus_softc *sc = ic->ic_softc; + + OTUS_LOCK(sc); + /* + * XXX TODO: take temporary copy of EDCA information + * when scheduling this so we have a more time-correct view + * of things. + * XXX TODO: this can be done on the net80211 level + */ + otus_updateedca_locked(sc); + OTUS_UNLOCK(sc); + return (0); +} + static void -otus_updateedca(struct otus_softc *sc) +otus_updateedca_locked(struct otus_softc *sc) { #define EXP2(val) ((1 << (val)) - 1) #define AIFS(val) ((val) * 9 + 10) @@ -2508,7 +2485,7 @@ otus_init_mac(struct otus_softc *sc) return error; /* Set default EDCA parameters. */ - otus_updateedca(sc); + otus_updateedca_locked(sc); return 0; } @@ -3185,7 +3162,6 @@ otus_stop(struct otus_softc *sc) taskqueue_drain_timeout(taskqueue_thread, &sc->scan_to); taskqueue_drain_timeout(taskqueue_thread, &sc->calib_to); taskqueue_drain(taskqueue_thread, &sc->tx_task); - taskqueue_drain(taskqueue_thread, &sc->wme_update_task); OTUS_LOCK(sc); sc->sc_running = 0; Modified: head/sys/dev/otus/if_otusreg.h ============================================================================== --- head/sys/dev/otus/if_otusreg.h Thu Nov 5 17:37:35 2015 (r290406) +++ head/sys/dev/otus/if_otusreg.h Thu Nov 5 17:58:18 2015 (r290407) @@ -1009,7 +1009,6 @@ struct otus_softc { struct ieee80211_channel *sc_curchan; struct task tx_task; - struct task wme_update_task; struct timeout_task scan_to; struct timeout_task calib_to; Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Thu Nov 5 17:37:35 2015 (r290406) +++ head/sys/dev/usb/wlan/if_rum.c Thu Nov 5 17:58:18 2015 (r290407) @@ -216,8 +216,6 @@ static void rum_get_tsf(struct rum_soft static void rum_update_slot_cb(struct rum_softc *, union sec_param *, uint8_t); static void rum_update_slot(struct ieee80211com *); -static void rum_wme_update_cb(struct rum_softc *, - union sec_param *, uint8_t); static int rum_wme_update(struct ieee80211com *); static void rum_set_bssid(struct rum_softc *, const uint8_t *); static void rum_set_macaddr(struct rum_softc *, const uint8_t *); @@ -2083,14 +2081,15 @@ rum_update_slot(struct ieee80211com *ic) rum_cmd_sleepable(ic->ic_softc, NULL, 0, 0, rum_update_slot_cb); } -static void -rum_wme_update_cb(struct rum_softc *sc, union sec_param *data, uint8_t rvp_id) +static int +rum_wme_update(struct ieee80211com *ic) { - struct ieee80211com *ic = &sc->sc_ic; const struct wmeParams *chanp = ic->ic_wme.wme_chanParams.cap_wmeParams; + struct rum_softc *sc = ic->ic_softc; int error = 0; + RUM_LOCK(sc); error = rum_write(sc, RT2573_AIFSN_CSR, chanp[WME_AC_VO].wmep_aifsn << 12 | chanp[WME_AC_VI].wmep_aifsn << 8 | @@ -2125,21 +2124,14 @@ rum_wme_update_cb(struct rum_softc *sc, memcpy(sc->wme_params, chanp, sizeof(*chanp) * WME_NUM_AC); - return; - print_err: - device_printf(sc->sc_dev, "%s: WME update failed, error %d\n", - __func__, error); -} - -static int -rum_wme_update(struct ieee80211com *ic) -{ - struct rum_softc *sc = ic->ic_softc; - - rum_cmd_sleepable(sc, NULL, 0, 0, rum_wme_update_cb); + RUM_UNLOCK(sc); + if (error != 0) { + device_printf(sc->sc_dev, "%s: WME update failed, error %d\n", + __func__, error); + } - return (0); + return (error); } static void Modified: head/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_rumvar.h Thu Nov 5 17:37:35 2015 (r290406) +++ head/sys/dev/usb/wlan/if_rumvar.h Thu Nov 5 17:58:18 2015 (r290407) @@ -73,7 +73,6 @@ typedef STAILQ_HEAD(, rum_tx_data) rum_t union sec_param { struct ieee80211_key key; - struct wmeParams wme_params[WME_NUM_AC]; uint8_t macaddr[IEEE80211_ADDR_LEN]; struct ieee80211vap *vap; }; Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Thu Nov 5 17:37:35 2015 (r290406) +++ head/sys/dev/usb/wlan/if_run.c Thu Nov 5 17:58:18 2015 (r290407) @@ -381,7 +381,6 @@ static struct ieee80211_node *run_node_a static int run_media_change(struct ifnet *); static int run_newstate(struct ieee80211vap *, enum ieee80211_state, int); static int run_wme_update(struct ieee80211com *); -static void run_wme_update_cb(void *); static void run_key_set_cb(void *); static int run_key_set(struct ieee80211vap *, struct ieee80211_key *); static void run_key_delete_cb(void *); @@ -2174,19 +2173,16 @@ run_newstate(struct ieee80211vap *vap, e return(rvp->newstate(vap, nstate, arg)); } -/* ARGSUSED */ -static void -run_wme_update_cb(void *arg) +static int +run_wme_update(struct ieee80211com *ic) { - struct ieee80211com *ic = arg; struct run_softc *sc = ic->ic_softc; const struct wmeParams *ac = ic->ic_wme.wme_chanParams.cap_wmeParams; int aci, error = 0; - RUN_LOCK_ASSERT(sc, MA_OWNED); - /* update MAC TX configuration registers */ + RUN_LOCK(sc); for (aci = 0; aci < WME_NUM_AC; aci++) { error = run_write(sc, RT2860_EDCA_AC_CFG(aci), ac[aci].wmep_logcwmax << 16 | @@ -2224,33 +2220,11 @@ run_wme_update_cb(void *arg) ac[WME_AC_VI].wmep_txopLimit); err: + RUN_UNLOCK(sc); if (error) DPRINTF("WME update failed\n"); - return; -} - -static int -run_wme_update(struct ieee80211com *ic) -{ - struct run_softc *sc = ic->ic_softc; - - /* sometime called wothout lock */ - if (mtx_owned(&ic->ic_comlock.mtx)) { - uint32_t i = RUN_CMDQ_GET(&sc->cmdq_store); - DPRINTF("cmdq_store=%d\n", i); - sc->cmdq[i].func = run_wme_update_cb; - sc->cmdq[i].arg0 = ic; - ieee80211_runtask(ic, &sc->cmdq_task); - return (0); - } - - RUN_LOCK(sc); - run_wme_update_cb(ic); - RUN_UNLOCK(sc); - - /* return whatever, upper layer doesn't care anyway */ - return (0); + return (error); } static void From owner-svn-src-head@freebsd.org Thu Nov 5 18:15:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D39B5A27DAC; Thu, 5 Nov 2015 18:15:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id BC9D914B0; Thu, 5 Nov 2015 18:15:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id B58931142; Thu, 5 Nov 2015 18:15:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 6415715E7C; Thu, 5 Nov 2015 18:15:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id joqZFuBSqjfd; Thu, 5 Nov 2015 18:15:56 +0000 (UTC) Subject: Re: svn commit: r290252 - in head: . etc/defaults etc/periodic/daily tools/build/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com B233F15E71 To: NGie Cooper References: <201511020105.tA215YhV095725@repo.freebsd.org> <563AA10C.6050009@FreeBSD.org> Cc: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Organization: FreeBSD Message-ID: <563B9CDB.6010501@FreeBSD.org> Date: Thu, 5 Nov 2015 10:15:55 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 18:15:58 -0000 On 11/4/15 4:40 PM, NGie Cooper wrote: > On Wed, Nov 4, 2015 at 4:21 PM, Bryan Drewery wrote: > > ... > >> This seems a bit gratuitous and against POLA. > > Unfortunately it was more POLA when the pediodic script was deleted > after it was added to OptionalObsoleteFiles.inc in the last few > months. > > I could add a backwards compatible variable when MFCing the change to > avoid breaking POLA on stable/9 and stable/10 though. I think a backwards compat var on head should be done as well. This periodic script came into the tree in least 1997. -- Regards, Bryan Drewery From owner-svn-src-head@freebsd.org Thu Nov 5 18:45:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1898DA262AC; Thu, 5 Nov 2015 18:45:28 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-lf0-x233.google.com (mail-lf0-x233.google.com [IPv6:2a00:1450:4010:c07::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 98B2712AD; Thu, 5 Nov 2015 18:45:27 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by lfbn126 with SMTP id n126so62153064lfb.2; Thu, 05 Nov 2015 10:45:25 -0800 (PST) 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=n7gawgRYdYCYyhe7wI6eEjypIvSwGx7ZPNokRHE1r5c=; b=K6pCnWSivAN62V57hXmbAR5ZY1o/ngjZv8Bmr29xwRbY0FBeoGW5AiFg7eZsUVYOKQ g7ZEbHn5vYxQfLfja54Nn8gOirbUG5C6wjC/J33S2yuVeN4XtnwioRxHTEIxZHEfZCiG H+Be0yu6t1Fg+IiBicOVN0mf5ZQ1s4LARqJ3EBu1n94+5aAKqca9N+Z1muz22PEIBqV/ RuAmeyC3vSuPsfG8Cefp8t2+lZP1XMVjQNFVDm4bgeEE4+UlQYXT5VAk93jjrwZcQXtj hcS1JMw/NbFyAfMI54zCYELYRIdofrWc/3oKR+8rc7Hd/Cjcm0EpMVLo5kfTgcCOZZgU A8oQ== MIME-Version: 1.0 X-Received: by 10.25.26.79 with SMTP id a76mr2602082lfa.109.1446749125449; Thu, 05 Nov 2015 10:45:25 -0800 (PST) Received: by 10.112.126.104 with HTTP; Thu, 5 Nov 2015 10:45:25 -0800 (PST) In-Reply-To: <1446744103.91534.399.camel@freebsd.org> References: <201510221638.t9MGc1cc053885@repo.freebsd.org> <56348FF8.3010602@gmail.com> <1446394311.91534.236.camel@freebsd.org> <1446744103.91534.399.camel@freebsd.org> Date: Thu, 5 Nov 2015 10:45:25 -0800 Message-ID: Subject: Re: svn commit: r289759 - in head/sys/arm: arm include From: Jason Harmening To: Ian Lepore Cc: Svatopluk Kraus , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 18:45:28 -0000 On Thu, Nov 5, 2015 at 9:21 AM, Ian Lepore wrote: > Just as an FYI for you guys, since we're all splashing around in busdma > code lately.... The things on my near-term (next several weeks) to-do > list for busdma are: > > Add "small bounce" support to help reduce the bounce preallocation > overhead for handling bounces due to cacheline alignment. Almost all > arm and mips bounces are triggered by cache alignment restrictions and > involve buffers smaller than a page (usually 256 bytes or less), and we > currently allocate full pages for bouncing. Instead we can use the > same small-buffer uma pools that are used for bus_dmamem_alloc(). > I like that. Along similar (but definitely not the same) lines, I had a suggestion in https://reviews.freebsd.org/D888 to coalesce bounce buffers, similar to how addseg already coalesces adjacent segments. Would something like that help here (in addition to small-bounce) to cut down on bounce buffer overhead, when the total buffer size is still a page or larger? > > The armv6 busdma implementation can be shared by armv4, armv6, and > mips. The only thing blocking this right now is the small-bounce > stuff; armv4 and mips boards often have only 32-128MB of ram, and they > can't afford the bounce-page allocation overhead of the current armv6 > implementation. Once the small-bounce support is in place, we can use > this implementation for all these platforms (and basically for any > platform that comes along that has a similar requirement for software > -assisted cache coherency for DMA). > Do you plan to merge armv6 and mips soonish? If so, then https://reviews.freebsd.org/D3986 can go away. That will also fix the problems mips busdma has with the cacheline copies in sync_buf() not being threadsafe. Code duplication in busdma is a huge pain right now. It seems like we have 3 broad classes of busdma support: bounce/coherent, bounce/non-coherent, and iommu. bounce/coherent could probably share all the same code. You might need a light dusting of platform-specific code (e.g. powerpc issues a sync instruction at the end of bus_dmamap_sync), but otherwise it should be the same. bounce/noncoherent could share the same code, as long as you define a set of macros or inline funcs that abstract the cache maintenance. That'll already be needed to cover the cache differences between armv4, armv6, and mips anyway. iommu is always going to be hardware-specific and need its own implementation for each kind of iommu. Then there's some logic that could probably be shared everywhere: a lot of the bus_dmamem_alloc()/bufalloc code strikes me as falling into that category. You might need MD wrappers that call MI helper functions, so for example the MD code can decide whether BUS_DMA_COHERENT means VM_MEMATTR_UNCACHEABLE, or whether allocated buffers really need to be physically contiguous (not needed for iommu). On top of all that, it makes sense to generalize the vtable approach already used for x86 and arm64. In a lot of cases the vtable would just point to the common bounce/coherent or bounce/noncoherent functions, or in some cases lightweight MD wrappers around those. Then for example it would be easy to add bounce/noncoherent support for arm64 if we end up needing it, and somewhat easier to add arm/mips/ppc iommu support. I'm definitely not suggesting you do all that stuff right now, just throwing ideas out there :) > > -- Ian > > On Thu, 2015-11-05 at 08:08 -0800, Jason Harmening wrote: > > Userspace buffers in load_buffer() also need temporary mappings, so > > it > > might be nice to keep the panic/KASSERT there for completeness. I > > don't > > see how anything coming from userspace would be outside > > vm_page_array > > though, so that is up to you and Michal. > > > > Since Michal's already made the initial patch, I think he should make > > the > > commit. That seems only right, plus I'm still busy trying to get > > everything set up at my new place. I'd like to be on the phabricator > > review, though. > > > > On Thu, Nov 5, 2015 at 3:58 AM, Svatopluk Kraus > > wrote: > > > > > On Thu, Nov 5, 2015 at 1:11 AM, Jason Harmening > > > wrote: > > > > > > > > On Wed, Nov 4, 2015 at 2:17 PM, Svatopluk Kraus > > > > > > > wrote: > > > > > > > > > > On Tue, Nov 3, 2015 at 8:45 AM, Jason Harmening > > > > > wrote: > > > > > > > > > > > > On Sun, Nov 1, 2015 at 8:11 AM, Ian Lepore > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > It's almost certainly not related to sysinit ordering. > > > > > > > This > > > exception > > > > > > > is happening during mmc probing after interrupts are > > > > > > > enabled. > > > > > > > > > > > > > > It appears that the problem is the faulting code is running > > > > > > > on one of > > > > > > > the very early pre-allocated kernel stacks (perhaps in an > > > > > > > interrupt > > > > > > > handler on an idle thread stack), and these stacks are not > > > > > > > in memory > > > > > > > represented in the vm page arrays. The mmc code is using a > > > > > > > 64-byte > > > > > > > buffer on the stack and mapping it for DMA. Normally that > > > > > > > causes a > > > > > > > bounce for cacheline alignment, but unluckily in this case > > > > > > > that > > > buffer > > > > > > > on the stack just happened to be aligned to a cacheline > > > > > > > boundary and > > > a > > > > > > > multiple of the cacheline size, so no bounce. That causes > > > > > > > the new > > > sync > > > > > > > logic that is based on keeping vm_page_t pointers and > > > > > > > offsets to get > > > a > > > > > > > NULL pointer back from PHYS_TO_VM_PAGE when mapping, then > > > > > > > it dies at > > > > > > > sync time trying to dereference that. It used to work > > > > > > > because the > > > sync > > > > > > > logic used to use the vaddr, not a page pointer. > > > > > > > > > > > > > > Michal was working on a patch yesterday. > > > > > > > > > > > > > > > > > > > Ah, thanks for pointing that out Ian. I was left scratching > > > > > > my head > > > > > > (admittedly on the road and w/o easy access to the code) > > > > > > wondering > > > what > > > > > > on > > > > > > earth would be trying to do DMA during SI_SUB_CPU. > > > > > > > > > > > > > > > > > > > > > Using of fictitious pages is not so easy here as in case > > > > > pointed by > > > > > kib@ where they are allocated and freed inside one function. > > > > > For sync > > > > > list sake, they must be allocated when a buffer is loaded and > > > > > freed > > > > > when is unloaded. > > > > > > > > > > Michal uses pmap_kextract() in case when KVA of buffer is not > > > > > zero in > > > > > his proof-of-concept patch: > > > > > https://gist.github.com/strejda/d5ca3ed202427a2e0557 > > > > > When KVA of buffer is not zero, temporary mapping is not used > > > > > at all, > > > > > so vm_page_t array is not needed too. > > > > > > > > > > IMO, buffer's physical address can be saved in sync list to be > > > > > used > > > > > when its KVA is not zero. Thus pmap_kextract() won't be called > > > > > in > > > > > dma_dcache_sync(). > > > > > > > > > > > > I like the idea of storing off the physical address. If you want > > > > to save > > > > space in the sync list, I think you can place busaddr and pages > > > > in a > > > union, > > > > using vaddr == 0 to select which field to use. Some people frown > > > > upon > > > use > > > > of unions, though. > > > > > > > > Any reason the panics on PHYS_TO_VM_PAGE in load_buffer() and > > > > load_phys() > > > > shouldn't be KASSERTs instead? > > > > > > > > > KASSERTs are fine. I have looked at Michal's patch again and only > > > KASSERT should be in load_phys() as such buffers are unmapped, > > > temporary mapping must be used and so, they must be in > > > vm_page_array. > > > And maybe some inline function for getting PA from sync list would > > > be > > > nice too. I would like to review final patch if you are going to > > > make > > > it. And it would be nice if Ganbold will test it. Phabricator? > > > > From owner-svn-src-head@freebsd.org Thu Nov 5 19:15:40 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB0A1A26900; Thu, 5 Nov 2015 19:15:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87979142B; Thu, 5 Nov 2015 19:15:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5JFd12097104; Thu, 5 Nov 2015 19:15:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5JFd6M097103; Thu, 5 Nov 2015 19:15:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201511051915.tA5JFd6M097103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 5 Nov 2015 19:15:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290408 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 19:15:40 -0000 Author: trasz Date: Thu Nov 5 19:15:39 2015 New Revision: 290408 URL: https://svnweb.freebsd.org/changeset/base/290408 Log: Make rctl(8) use more reasonable buffer size for retrieving the rules. Reviewed by: mjg@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Thu Nov 5 17:58:18 2015 (r290407) +++ head/usr.bin/rctl/rctl.c Thu Nov 5 19:15:39 2015 (r290408) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -#define RCTL_DEFAULT_BUFSIZE 4096 +#define RCTL_DEFAULT_BUFSIZE 128 * 1024 static id_t parse_user(const char *s) From owner-svn-src-head@freebsd.org Thu Nov 5 19:17:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1E87A269EB; Thu, 5 Nov 2015 19:17:00 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 BAB30164C; Thu, 5 Nov 2015 19:17:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D39CDB9BA; Thu, 5 Nov 2015 14:16:59 -0500 (EST) From: John Baldwin To: Oleksandr Tymoshenko Cc: Andrew Turner , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290245 - in head/sys/contrib/vchiq/interface: vchi vchiq_arm Date: Thu, 05 Nov 2015 10:49:24 -0800 Message-ID: <4544430.IVoCLBVNIY@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: <201511012217.tA1MHdMJ047219@repo.freebsd.org> <20151102093603.0aebe7a8@bender.Home> 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, 05 Nov 2015 14:16:59 -0500 (EST) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 19:17:01 -0000 On Monday, November 02, 2015 11:37:38 AM Oleksandr Tymoshenko wrote: > > > On Nov 2, 2015, at 1:36 AM, Andrew Turner wrote: > > > > On Sun, 1 Nov 2015 22:17:39 +0000 (UTC) > > Oleksandr Tymoshenko wrote: > > > >> Author: gonzo > >> Date: Sun Nov 1 22:17:39 2015 > >> New Revision: 290245 > >> URL: https://svnweb.freebsd.org/changeset/base/290245 > >> > >> Log: > >> Synchronize with latest upstream VCHI code: > >> > >> - Add LIB_VERSION ioctl > >> - Add CLOSE_DELIVERED ioctl > >> - Bump code version > >> > >> Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5 > > > > Was there a reason we don't use the vendor-sys area for vchiq? > > What Adrian said: original code is not very portable and I have to go through manual merge in my staging repo and only then merge to sys/ area One benefit of keeping a corresponding area in vendor-sys in sync is it makes it easier for other folks to pick this up in the future if need be. Noting the upstream version in each update is probably equivalent in functionality, though it is not how we do it in the rest of the tree. Also, Adrian, most of us do a lot of this work (FreeBSD) as volunteers. Even if some of us work on some of it for ${WORK} we work on other bits in our spare time for $0 as well, so that's a lame cop out. Part of the reason we do this in our spare time is because it's a chance to do things "right", not just quick hacks to satisfy a business-deadline at ${WORK} (to paraphrase gibbs@). -- John Baldwin From owner-svn-src-head@freebsd.org Thu Nov 5 19:21:37 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10A8AA26BE0; Thu, 5 Nov 2015 19:21:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::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 D5A611C6F; Thu, 5 Nov 2015 19:21:36 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igdg1 with SMTP id g1so19526165igd.1; Thu, 05 Nov 2015 11:21:36 -0800 (PST) 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=NtjwE4R/N3mDw+zsylkHQdyTLZ0uQu8UhsoxC6YIbjo=; b=m0LlBPQPyNHXy4YsxX7FYTXYF6xiF0zvH2o7t9Hg+ePXk1S0QnqTjcGGehUSE3aB6u LFpjmqQ8A5vZmCC0E2rvodie7LpcReUU8aUZxifiEPjqQxnFad3nNeaQNdJLs8kyUpfr 764PbXE4cGCMW0etnQOV4U+YN23trq2TPQ/YOzhp5vIRYdaFWJrVpXMTAWvZjxQJMlxb x+eM+nqhRK5pNmq1BIrzHey2JXzdKwwjFEkoAAEokESRfxwU0lMr51IYoDAduXSPfl4q wZed6PWUu86Y0tPBRJn1pJVh2zG2qsXPr9u5I7kvQtXbV19GsuzMSpi8mYcGpebpGtMJ sXMQ== MIME-Version: 1.0 X-Received: by 10.50.155.41 with SMTP id vt9mr4914985igb.22.1446751296161; Thu, 05 Nov 2015 11:21:36 -0800 (PST) Received: by 10.36.217.196 with HTTP; Thu, 5 Nov 2015 11:21:36 -0800 (PST) In-Reply-To: <4544430.IVoCLBVNIY@ralph.baldwin.cx> References: <201511012217.tA1MHdMJ047219@repo.freebsd.org> <20151102093603.0aebe7a8@bender.Home> <4544430.IVoCLBVNIY@ralph.baldwin.cx> Date: Thu, 5 Nov 2015 11:21:36 -0800 Message-ID: Subject: Re: svn commit: r290245 - in head/sys/contrib/vchiq/interface: vchi vchiq_arm From: Adrian Chadd To: John Baldwin Cc: Oleksandr Tymoshenko , Andrew Turner , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 19:21:37 -0000 On 5 November 2015 at 10:49, John Baldwin wrote: > On Monday, November 02, 2015 11:37:38 AM Oleksandr Tymoshenko wrote: >> >> > On Nov 2, 2015, at 1:36 AM, Andrew Turner wrote: >> > >> > On Sun, 1 Nov 2015 22:17:39 +0000 (UTC) >> > Oleksandr Tymoshenko wrote: >> > >> >> Author: gonzo >> >> Date: Sun Nov 1 22:17:39 2015 >> >> New Revision: 290245 >> >> URL: https://svnweb.freebsd.org/changeset/base/290245 >> >> >> >> Log: >> >> Synchronize with latest upstream VCHI code: >> >> >> >> - Add LIB_VERSION ioctl >> >> - Add CLOSE_DELIVERED ioctl >> >> - Bump code version >> >> >> >> Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5 >> > >> > Was there a reason we don't use the vendor-sys area for vchiq? >> >> What Adrian said: original code is not very portable and I have to go through manual merge in my staging repo and only then merge to sys/ area > > One benefit of keeping a corresponding area in vendor-sys in sync is it > makes it easier for other folks to pick this up in the future if need be. > > Noting the upstream version in each update is probably equivalent in > functionality, though it is not how we do it in the rest of the tree. > > Also, Adrian, most of us do a lot of this work (FreeBSD) as volunteers. Even > if some of us work on some of it for ${WORK} we work on other bits in our > spare time for $0 as well, so that's a lame cop out. Part of the reason we > do this in our spare time is because it's a chance to do things "right", not > just quick hacks to satisfy a business-deadline at ${WORK} (to paraphrase > gibbs@). Sure, but that's a case by case basis. This is definitely not the only example of code which we don't maintain as vendor imports because of the sheer amount of changes being done. At some point gonzo@, I or someone may end up taking the videocore stuff and re-porting with to minimize diffs. Same as the dri code - it's not in vendor. Same as (IIRC) the scsi drivers; same as the intel ethernet drivers, etc, etc. The vendor stuff seems to work fine with userland code that requires minimal changes. I'd love for that to change, but porting linux code doesn't always give us that opportunity. :) -adrian From owner-svn-src-head@freebsd.org Thu Nov 5 19:52:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEE0DA272DF; Thu, 5 Nov 2015 19:52:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6D791CD2; Thu, 5 Nov 2015 19:52:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5JqIR2008367; Thu, 5 Nov 2015 19:52:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5JqI38008366; Thu, 5 Nov 2015 19:52:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511051952.tA5JqI38008366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2015 19:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290409 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 19:52:20 -0000 Author: jhb Date: Thu Nov 5 19:52:18 2015 New Revision: 290409 URL: https://svnweb.freebsd.org/changeset/base/290409 Log: Start a cleanup of the MAINTAINERS file. This adds an "OLD" line at the top of the list. Any entries in the list that are still below this line after December 5th will be removed. Approved by: core Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Thu Nov 5 19:15:39 2015 (r290408) +++ head/MAINTAINERS Thu Nov 5 19:52:18 2015 (r290409) @@ -26,6 +26,7 @@ sub-system. subsystem login notes ----------------------------- +---- OLD ---- kqueue jmg Pre-commit review requested. Documentation Required. libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. From owner-svn-src-head@freebsd.org Thu Nov 5 20:06:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CE20A2755B; Thu, 5 Nov 2015 20:06:47 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB18614F1; Thu, 5 Nov 2015 20:06:46 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id tA5JuMWU006254 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 5 Nov 2015 11:56:22 -0800 Subject: Re: svn commit: r290373 - head/sys/dev/ofw To: Andreas Tobler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511042246.tA4MkUYU010551@repo.freebsd.org> From: Nathan Whitehorn Message-ID: <563BB466.8020801@freebsd.org> Date: Thu, 5 Nov 2015 11:56:22 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201511042246.tA4MkUYU010551@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVYkb0F5Bf3CxdZS5Zi7xjYJQzxJygrW9lXOBOAoKHfWZsOSsFxD7+Ut6aluPqYnMVGXp8VTp+VytaD+KAqu2oGXt6a8oxJ+ifk= X-Sonic-ID: C;PtzUSfeD5RGJs70U9jFv0A== M;0EcxSveD5RGJs70U9jFv0A== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 20:06:47 -0000 I'm not sure this is the best way to do this: we have AIM systems that use FDT, for example. Can we make it a quirk in the host-bus driver? Or do a run-time check to see if the root node has MacRISC in its compatible property? -Nathan On 11/04/15 14:46, Andreas Tobler wrote: > Author: andreast > Date: Wed Nov 4 22:46:30 2015 > New Revision: 290373 > URL: https://svnweb.freebsd.org/changeset/base/290373 > > Log: > Add a compile time switch to distinguish between 7-bit and 8-bit I2C address > usage. The comment in the code should explain the situation. > > Discussed with: ian@ > > Modified: > head/sys/dev/ofw/ofw_iicbus.c > > Modified: head/sys/dev/ofw/ofw_iicbus.c > ============================================================================== > --- head/sys/dev/ofw/ofw_iicbus.c Wed Nov 4 19:09:42 2015 (r290372) > +++ head/sys/dev/ofw/ofw_iicbus.c Wed Nov 4 22:46:30 2015 (r290373) > @@ -148,10 +148,16 @@ ofw_iicbus_attach(device_t dev) > if (dinfo == NULL) > continue; > /* > - * OFW uses 7-bit I2C address format (see ePAPR), > - * but system expect 8-bit. > + * FreeBSD drivers expect I2C addresses to be expressed as > + * 8-bit values. Apple OFW data contains 8-bit values, but > + * Linux FDT data contains 7-bit values, so shift them up to > + * 8-bit format. > */ > +#ifdef AIM > + dinfo->opd_dinfo.addr = paddr; > +#else > dinfo->opd_dinfo.addr = paddr << 1; > +#endif > if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, child) != > 0) { > free(dinfo, M_DEVBUF); > From owner-svn-src-head@freebsd.org Thu Nov 5 20:24:57 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7947A278B1; Thu, 5 Nov 2015 20:24:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A7AA1009; Thu, 5 Nov 2015 20:24:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5KOuoo018124; Thu, 5 Nov 2015 20:24:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5KOunt018123; Thu, 5 Nov 2015 20:24:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511052024.tA5KOunt018123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2015 20:24:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290412 - head/usr.sbin/pciconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 20:24:57 -0000 Author: jhb Date: Thu Nov 5 20:24:56 2015 New Revision: 290412 URL: https://svnweb.freebsd.org/changeset/base/290412 Log: Note if relaxed ordering or no snoop is enabled for each PCI-express device. MFC after: 1 week Modified: head/usr.sbin/pciconf/cap.c Modified: head/usr.sbin/pciconf/cap.c ============================================================================== --- head/usr.sbin/pciconf/cap.c Thu Nov 5 20:21:43 2015 (r290411) +++ head/usr.sbin/pciconf/cap.c Thu Nov 5 20:24:56 2015 (r290412) @@ -460,6 +460,10 @@ cap_express(int fd, struct pci_conf *p, MAX_PAYLOAD(cap & PCIEM_CAP_MAX_PAYLOAD)); if ((cap & PCIEM_CAP_FLR) != 0) printf(" FLR"); + if (ctl & PCIEM_CTL_RELAXED_ORD_ENABLE) + printf(" RO"); + if (ctl & PCIEM_CTL_NOSNOOP_ENABLE) + printf(" NS"); cap = read_config(fd, &p->pc_sel, ptr + PCIER_LINK_CAP, 4); sta = read_config(fd, &p->pc_sel, ptr + PCIER_LINK_STA, 2); printf(" link x%d(x%d)", (sta & PCIEM_LINK_STA_WIDTH) >> 4, From owner-svn-src-head@freebsd.org Thu Nov 5 20:26:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76E3BA2793A for ; Thu, 5 Nov 2015 20:26:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-x230.google.com (mail-qg0-x230.google.com [IPv6:2607:f8b0:400d:c04::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 2C3C11231 for ; Thu, 5 Nov 2015 20:26:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qgad10 with SMTP id d10so76122751qga.3 for ; Thu, 05 Nov 2015 12:26:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp_com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=LZd7pAF+PYqwegtj3xOAtFqLXNlXNX+pk3NvU+QP4oo=; b=0flbw9FYhQ/nZtgW63pFHKdNOGpcc5mO2267bJ7OKGSmZIeLEI00znyEjeLgRy4gtf y7t3NFYo0kewiZwtfngLletDCOhr9yVqCSd6nT7bzeGIVCdLUDhtJh7sRA8ek2TRZhUz rBp2XySP6lQDuqX33y+253FYPqUrcU7KqA//JNCYe7MHc2fyd5Pbg4JhwMkFurwhR7f0 TKm2rAcNiAkG6kTsf/2VHl0YPqjP7ZbO+XNxejnW0s3LvYpEJ8SSR3iXWtw5keQrQKCc YjABzItX2jY1i8xqXrrAmcpDUdL2ajhS75wnjrq4HktZbGLQjjdtrY8FPr9PA1BtFrHO cHiw== 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:date :message-id:subject:from:to:cc:content-type; bh=LZd7pAF+PYqwegtj3xOAtFqLXNlXNX+pk3NvU+QP4oo=; b=CQSRnrc0wQhx6aj8nWO81w1G36XsYckWhzi26Y6oDXaRYDZXMISJJlVtjHnW5m9MqH sEqTzRTwxk/xh2pyBPmg4VCaugSjkhMXrsfJINaojpjqELb7+7UiHR7PMQ1/1EwUfQkW khHoPEf4wPWX0uiptwSGJSFmUcNClA9YKd42EH0gSO+/wDFumpSzhZgAAkjkUq8cuC/+ 2gFFdwZKEV7xOV6uJQYS/MHE35+8m4b5Aa2ZjO7EdalFzYOWyfoMVjMKvAAeldhurUNY gaBwGwFQV+9NXAg5TgY+E8I5FVkP2LmoQoWgSa4BSrlYg12JViMCj6qcc9/ohrOAUTBZ O5vg== X-Gm-Message-State: ALoCoQnZM9KQMhOxDGArZyry8MtfZ3B6Auk5TQpjdWKQQARfnR3sPfmdXfCX+8D/mKOYlgibmusM MIME-Version: 1.0 X-Received: by 10.140.19.13 with SMTP id 13mr9512344qgg.97.1446755190190; Thu, 05 Nov 2015 12:26:30 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.140.104.226 with HTTP; Thu, 5 Nov 2015 12:26:30 -0800 (PST) X-Originating-IP: [2601:280:4900:3700:1c53:4baf:e617:68c6] In-Reply-To: <563BB466.8020801@freebsd.org> References: <201511042246.tA4MkUYU010551@repo.freebsd.org> <563BB466.8020801@freebsd.org> Date: Thu, 5 Nov 2015 13:26:30 -0700 X-Google-Sender-Auth: vL9ewDSDIunjE9IE0PUVKVCxvNY Message-ID: Subject: Re: svn commit: r290373 - head/sys/dev/ofw From: Warner Losh To: Nathan Whitehorn Cc: Andreas Tobler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 20:26:31 -0000 I'd suggested that this be driven off a global quirk like u_int fdt_quirks; #define FDT_QUIRK_8BIT_IIC_ADDR 1 ... if (fdt_quirks & FDT_QUIRK_8BIT_IIC_ADDR) dinfo->opd_dinfo.addr = paddr; else dinfo->opd_dinfo.addr = paddr << 1; And the platform code, whatever that means, would set it when it "knows" this is the case. Warner On Thu, Nov 5, 2015 at 12:56 PM, Nathan Whitehorn wrote: > I'm not sure this is the best way to do this: we have AIM systems that use > FDT, for example. Can we make it a quirk in the host-bus driver? Or do a > run-time check to see if the root node has MacRISC in its compatible > property? > -Nathan > > On 11/04/15 14:46, Andreas Tobler wrote: > >> Author: andreast >> Date: Wed Nov 4 22:46:30 2015 >> New Revision: 290373 >> URL: https://svnweb.freebsd.org/changeset/base/290373 >> >> Log: >> Add a compile time switch to distinguish between 7-bit and 8-bit I2C >> address >> usage. The comment in the code should explain the situation. >> Discussed with: ian@ >> >> Modified: >> head/sys/dev/ofw/ofw_iicbus.c >> >> Modified: head/sys/dev/ofw/ofw_iicbus.c >> >> ============================================================================== >> --- head/sys/dev/ofw/ofw_iicbus.c Wed Nov 4 19:09:42 2015 >> (r290372) >> +++ head/sys/dev/ofw/ofw_iicbus.c Wed Nov 4 22:46:30 2015 >> (r290373) >> @@ -148,10 +148,16 @@ ofw_iicbus_attach(device_t dev) >> if (dinfo == NULL) >> continue; >> /* >> - * OFW uses 7-bit I2C address format (see ePAPR), >> - * but system expect 8-bit. >> + * FreeBSD drivers expect I2C addresses to be expressed as >> + * 8-bit values. Apple OFW data contains 8-bit values, >> but >> + * Linux FDT data contains 7-bit values, so shift them up >> to >> + * 8-bit format. >> */ >> +#ifdef AIM >> + dinfo->opd_dinfo.addr = paddr; >> +#else >> dinfo->opd_dinfo.addr = paddr << 1; >> +#endif >> if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, child) >> != >> 0) { >> free(dinfo, M_DEVBUF); >> >> > > From owner-svn-src-head@freebsd.org Thu Nov 5 21:24:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C87DEA27847; Thu, 5 Nov 2015 21:24:43 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.breitband.ch (smtp.breitband.ch [157.161.12.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C8611DCD; Thu, 5 Nov 2015 21:24:43 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPS id 954B7D791E; Thu, 5 Nov 2015 22:24:33 +0100 (CET) Subject: Re: svn commit: r290373 - head/sys/dev/ofw To: Warner Losh , Nathan Whitehorn References: <201511042246.tA4MkUYU010551@repo.freebsd.org> <563BB466.8020801@freebsd.org> Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Andreas Tobler Message-ID: <563BC911.5060804@FreeBSD.org> Date: Thu, 5 Nov 2015 22:24:33 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.73 on 127.0.1.1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 21:24:43 -0000 Hi Nathan, Warner, first, I had the feeling that I have to provide a fast solution which makes PowerMacs usable again. I am aware that the committed version doesn't win a prize. Also, I didn't know that we have AIM & FDT, Nathan which one? On 05.11.15 21:26, Warner Losh wrote: > I'd suggested that this be driven off a global quirk like > > u_int fdt_quirks; > #define FDT_QUIRK_8BIT_IIC_ADDR 1 > ... In openfirm.h? > if (fdt_quirks & FDT_QUIRK_8BIT_IIC_ADDR) > dinfo->opd_dinfo.addr = paddr; > else > dinfo->opd_dinfo.addr = paddr << 1; > > And the platform code, whatever that means, would set it when it "knows" > this is the case. If I get that right, I'd have to set the fdt_quirk in each I2C parent, like kiic.c and smu.c? > On Thu, Nov 5, 2015 at 12:56 PM, Nathan Whitehorn > > wrote: > > I'm not sure this is the best way to do this: we have AIM systems > that use FDT, for example. Can we make it a quirk in the host-bus > driver? Or do a run-time check to see if the root node has MacRISC > in its compatible property? The 'compatible property' approach would be limited/isolated to one file (ofw_iicbus.c) in comparison to the quirk approach where I'd have to adapt at least (known now) four files. I can go either way, just my thoughts. Andreas From owner-svn-src-head@freebsd.org Thu Nov 5 21:26:08 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2160A278CA; Thu, 5 Nov 2015 21:26:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B291F86; Thu, 5 Nov 2015 21:26:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5LQ6g7036252; Thu, 5 Nov 2015 21:26:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5LQ6pw036247; Thu, 5 Nov 2015 21:26:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511052126.tA5LQ6pw036247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2015 21:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290414 - in head: share/man/man9 sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 21:26:08 -0000 Author: jhb Date: Thu Nov 5 21:26:06 2015 New Revision: 290414 URL: https://svnweb.freebsd.org/changeset/base/290414 Log: Add helper routines for PCI device drivers to read, write, and modify PCI-Express capability registers (that is, PCI config registers in the standard PCI config space belonging to the PCI-Express capability register set). Note that all of the current PCI-e registers are either 16 or 32-bits, so only widths of 2 or 4 bytes are supported. Reviewed by: imp MFC after: 1 week Sponsored by: Chelsio Differential Revision: https://reviews.freebsd.org/D4088 Modified: head/share/man/man9/Makefile head/share/man/man9/pci.9 head/sys/dev/pci/pci.c head/sys/dev/pci/pcivar.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Nov 5 21:22:23 2015 (r290413) +++ head/share/man/man9/Makefile Thu Nov 5 21:26:06 2015 (r290414) @@ -1290,7 +1290,10 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_save_state.9 \ pci.9 pci_set_powerstate.9 \ pci.9 pci_set_max_read_req.9 \ - pci.9 pci_write_config.9 + pci.9 pci_write_config.9 \ + pci.9 pcie_adjust_config.9 \ + pci.9 pcie_read_config.9 \ + pci.9 pcie_write_config.9 \ MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \ pci_iov_schema.9 pci_iov_schema_add_bool.9 \ pci_iov_schema.9 pci_iov_schema_add_string.9 \ Modified: head/share/man/man9/pci.9 ============================================================================== --- head/share/man/man9/pci.9 Thu Nov 5 21:22:23 2015 (r290413) +++ head/share/man/man9/pci.9 Thu Nov 5 21:26:06 2015 (r290414) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2015 +.Dd November 5, 2015 .Dt PCI 9 .Os .Sh NAME @@ -58,7 +58,10 @@ .Nm pci_save_state , .Nm pci_set_max_read_req , .Nm pci_set_powerstate , -.Nm pci_write_config +.Nm pci_write_config , +.Nm pcie_adjust_config , +.Nm pcie_read_config , +.Nm pcie_write_config .Nd PCI bus interface .Sh SYNOPSIS .In sys/bus.h @@ -118,6 +121,18 @@ .Fn pci_set_powerstate "device_t dev" "int state" .Ft void .Fn pci_write_config "device_t dev" "int reg" "uint32_t val" "int width" +.Ft uint32_t +.Fo pcie_adjust_config +.Fa "device_t dev" +.Fa "int reg" +.Fa "uint32_t mask" +.Fa "uint32_t val" +.Fa "int width" +.Fc +.Ft uint32_t +.Fn pcie_read_config "device_t dev" "int reg" "int width" +.Ft void +.Fn pcie_write_config "device_t dev" "int reg" "uint32_t val" "int width" .In dev/pci/pci_iov.h .Ft int .Fn pci_iov_attach "device_t dev" "nvlist_t *pf_schema" "nvlist_t *vf_schema" @@ -159,6 +174,48 @@ with .Fa width specifying the size of the access. .Pp +The +.Fn pcie_adjust_config +function is used to modify the value of a register in the PCI-express +capability register set of device +.Fa dev . +The offset +.Fa reg +specifies a relative offset in the register set with +.Fa width +specifying the size of the access. +The new value of the register is computed by modifying bits set in +.Fa mask +to the value in +.Fa val . +Any bits not specified in +.Fa mask +are preserved. +The previous value of the register is returned. +.Pp +The +.Fn pcie_read_config +function is used to read the value of a register in the PCI-express +capability register set of device +.Fa dev . +The offset +.Fa reg +specifies a relative offset in the register set with +.Fa width +specifying the size of the access. +.Pp +The +.Fn pcie_write_config +function is used to write the value +.Fa val +to a register in the PCI-express capability register set of device +.Fa dev . +The offset +.Fa reg +specifies a relative offset in the register set with +.Fa width +specifying the size of the access. +.Pp .Em NOTE : Device drivers should only use these functions for functionality that is not available via another Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Thu Nov 5 21:22:23 2015 (r290413) +++ head/sys/dev/pci/pci.c Thu Nov 5 21:26:06 2015 (r290414) @@ -1917,6 +1917,63 @@ pci_set_max_read_req(device_t dev, int s return (size); } +uint32_t +pcie_read_config(device_t dev, int reg, int width) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + int cap; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) { + if (width == 2) + return (0xffff); + return (0xffffffff); + } + + return (pci_read_config(dev, cap + reg, width)); +} + +void +pcie_write_config(device_t dev, int reg, uint32_t value, int width) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + int cap; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) + return; + pci_write_config(dev, cap + reg, value, width); +} + +/* + * Adjusts a PCI-e capability register by clearing the bits in mask + * and setting the bits in (value & mask). Bits not set in mask are + * not adjusted. + * + * Returns the old value on success or all ones on failure. + */ +uint32_t +pcie_adjust_config(device_t dev, int reg, uint32_t mask, uint32_t value, + int width) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + uint32_t old, new; + int cap; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) { + if (width == 2) + return (0xffff); + return (0xffffffff); + } + + old = pci_read_config(dev, cap + reg, width); + new = old & ~mask; + new |= (value & mask); + pci_write_config(dev, cap + reg, new, width); + return (old); +} + /* * Support for MSI message signalled interrupts. */ Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Thu Nov 5 21:22:23 2015 (r290413) +++ head/sys/dev/pci/pcivar.h Thu Nov 5 21:26:06 2015 (r290414) @@ -551,6 +551,10 @@ int pci_get_max_read_req(device_t dev); void pci_restore_state(device_t dev); void pci_save_state(device_t dev); int pci_set_max_read_req(device_t dev, int size); +uint32_t pcie_read_config(device_t dev, int reg, int width); +void pcie_write_config(device_t dev, int reg, uint32_t value, int width); +uint32_t pcie_adjust_config(device_t dev, int reg, uint32_t mask, + uint32_t value, int width); #ifdef BUS_SPACE_MAXADDR From owner-svn-src-head@freebsd.org Thu Nov 5 21:27:27 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23EDBA2791C; Thu, 5 Nov 2015 21:27:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 009A81143; Thu, 5 Nov 2015 21:27:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5LRQqP036337; Thu, 5 Nov 2015 21:27:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5LRPV8036332; Thu, 5 Nov 2015 21:27:25 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511052127.tA5LRPV8036332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2015 21:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290415 - in head: share/man/man9 sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 21:27:27 -0000 Author: jhb Date: Thu Nov 5 21:27:25 2015 New Revision: 290415 URL: https://svnweb.freebsd.org/changeset/base/290415 Log: Add a new helper function for PCI devices to locate the upstream PCI-express root port of a given PCI device. Reviewed by: kib, imp MFC after: 1 week Sponsored by: Chelsio Differential Revision: https://reviews.freebsd.org/D4089 Modified: head/share/man/man9/Makefile head/share/man/man9/pci.9 head/sys/dev/pci/pci.c head/sys/dev/pci/pcivar.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Nov 5 21:26:06 2015 (r290414) +++ head/share/man/man9/Makefile Thu Nov 5 21:27:25 2015 (r290415) @@ -1274,6 +1274,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_find_device.9 \ pci.9 pci_find_extcap.9 \ pci.9 pci_find_htcap.9 \ + pci.9 pci_find_pcie_root_port.9 \ pci.9 pci_get_max_read_req.9 \ pci.9 pci_get_powerstate.9 \ pci.9 pci_get_vpd_ident.9 \ Modified: head/share/man/man9/pci.9 ============================================================================== --- head/share/man/man9/pci.9 Thu Nov 5 21:26:06 2015 (r290414) +++ head/share/man/man9/pci.9 Thu Nov 5 21:27:25 2015 (r290415) @@ -42,6 +42,7 @@ .Nm pci_find_device , .Nm pci_find_extcap , .Nm pci_find_htcap , +.Nm pci_find_pcie_root_port , .Nm pci_get_max_read_req , .Nm pci_get_powerstate , .Nm pci_get_vpd_ident , @@ -91,6 +92,8 @@ .Fn pci_find_extcap "device_t dev" "int capability" "int *capreg" .Ft int .Fn pci_find_htcap "device_t dev" "int capability" "int *capreg" +.Ft device_t +.Fn pci_find_pcie_root_port "device_t dev" .Ft int .Fn pci_get_max_read_req "device_t dev" .Ft int @@ -338,6 +341,16 @@ If the capability is not found or the de returns an error. .Pp The +.Fn pci_find_pcie_root_port +function walks up the PCI device hierarchy to locate the PCI-express root +port upstream of +.Fa dev . +If a root port is not found, +.Fn pci_find_pcie_root_port +returns +.Dv NULL . +.Pp +The .Fn pci_get_vpd_ident function is used to fetch a device's Vital Product Data .Pq VPD Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Thu Nov 5 21:26:06 2015 (r290414) +++ head/sys/dev/pci/pci.c Thu Nov 5 21:27:25 2015 (r290415) @@ -5431,3 +5431,44 @@ pci_get_rid_method(device_t dev, device_ return (PCIB_GET_RID(device_get_parent(dev), child)); } + +/* Find the upstream port of a given PCI device in a root complex. */ +device_t +pci_find_pcie_root_port(device_t dev) +{ + struct pci_devinfo *dinfo; + devclass_t pci_class; + device_t pcib, bus; + + pci_class = devclass_find("pci"); + KASSERT(device_get_devclass(device_get_parent(dev)) == pci_class, + ("%s: non-pci device %s", __func__, device_get_nameunit(dev))); + + /* + * Walk the bridge hierarchy until we find a PCI-e root + * port or a non-PCI device. + */ + for (;;) { + bus = device_get_parent(dev); + KASSERT(bus != NULL, ("%s: null parent of %s", __func__, + device_get_nameunit(dev))); + + pcib = device_get_parent(bus); + KASSERT(pcib != NULL, ("%s: null bridge of %s", __func__, + device_get_nameunit(bus))); + + /* + * pcib's parent must be a PCI bus for this to be a + * PCI-PCI bridge. + */ + if (device_get_devclass(device_get_parent(pcib)) != pci_class) + return (NULL); + + dinfo = device_get_ivars(pcib); + if (dinfo->cfg.pcie.pcie_location != 0 && + dinfo->cfg.pcie.pcie_type == PCIEM_TYPE_ROOT_PORT) + return (pcib); + + dev = pcib; + } +} Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Thu Nov 5 21:26:06 2015 (r290414) +++ head/sys/dev/pci/pcivar.h Thu Nov 5 21:27:25 2015 (r290415) @@ -547,6 +547,7 @@ int pci_msix_device_blacklisted(device_t void pci_ht_map_msi(device_t dev, uint64_t addr); +device_t pci_find_pcie_root_port(device_t dev); int pci_get_max_read_req(device_t dev); void pci_restore_state(device_t dev); void pci_save_state(device_t dev); From owner-svn-src-head@freebsd.org Thu Nov 5 21:33:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 496CFA27A6B; Thu, 5 Nov 2015 21:33:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E598D15B1; Thu, 5 Nov 2015 21:33:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5LXFQD039094; Thu, 5 Nov 2015 21:33:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5LXF0n039093; Thu, 5 Nov 2015 21:33:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511052133.tA5LXF0n039093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2015 21:33:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290416 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 21:33:17 -0000 Author: jhb Date: Thu Nov 5 21:33:15 2015 New Revision: 290416 URL: https://svnweb.freebsd.org/changeset/base/290416 Log: Chelsio T5 chips do not properly echo the No Snoop and Relaxed Ordering attributes when replying to a TLP from a Root Port. As a workaround, disable No Snoop and Relaxed Ordering in the Root Port of each T5 adapter during attach so that CPU-initiated requests do not contain these flags. Note that this affects CPU-initiated requests to all devices under this root port. Reviewed by: np MFC after: 1 week Sponsored by: Chelsio Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Nov 5 21:27:25 2015 (r290415) +++ head/sys/dev/cxgbe/t4_main.c Thu Nov 5 21:33:15 2015 (r290416) @@ -573,6 +573,33 @@ t5_probe(device_t dev) return (ENXIO); } +static void +t5_attribute_workaround(device_t dev) +{ + device_t root_port; + uint32_t v; + + /* + * The T5 chips do not properly echo the No Snoop and Relaxed + * Ordering attributes when replying to a TLP from a Root + * Port. As a workaround, find the parent Root Port and + * disable No Snoop and Relaxed Ordering. Note that this + * affects all devices under this root port. + */ + root_port = pci_find_pcie_root_port(dev); + if (root_port == NULL) { + device_printf(dev, "Unable to find parent root port\n"); + return; + } + + v = pcie_adjust_config(root_port, PCIER_DEVICE_CTL, + PCIEM_CTL_RELAXED_ORD_ENABLE | PCIEM_CTL_NOSNOOP_ENABLE, 0, 2); + if ((v & (PCIEM_CTL_RELAXED_ORD_ENABLE | PCIEM_CTL_NOSNOOP_ENABLE)) != + 0) + device_printf(dev, "Disabled No Snoop/Relaxed Ordering on %s\n", + device_get_nameunit(root_port)); +} + static int t4_attach(device_t dev) { @@ -591,6 +618,8 @@ t4_attach(device_t dev) sc->dev = dev; TUNABLE_INT_FETCH("hw.cxgbe.debug_flags", &sc->debug_flags); + if ((pci_get_device(dev) & 0xff00) == 0x5400) + t5_attribute_workaround(dev); pci_enable_busmaster(dev); if (pci_find_cap(dev, PCIY_EXPRESS, &i) == 0) { uint32_t v; From owner-svn-src-head@freebsd.org Thu Nov 5 21:47:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A666A27DF8; Thu, 5 Nov 2015 21:47:43 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C7761E87; Thu, 5 Nov 2015 21:47:42 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (airbears2-136-152-142-56.airbears2.berkeley.edu [136.152.142.56]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id tA5Lle7X010642 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 5 Nov 2015 13:47:40 -0800 Subject: Re: svn commit: r290373 - head/sys/dev/ofw To: Andreas Tobler , Warner Losh References: <201511042246.tA4MkUYU010551@repo.freebsd.org> <563BB466.8020801@freebsd.org> <563BC911.5060804@FreeBSD.org> Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Nathan Whitehorn Message-ID: <563BCE7C.9020900@freebsd.org> Date: Thu, 5 Nov 2015 13:47:40 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <563BC911.5060804@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVYZh7CwlGPDEcrQbRvLR0UeAcLmpte41TQANxQTAAJ2r3K6xzjcJOTA08lF4KvUFQKIxl3y2wooszmmVY/HBHo8/+lA7E/wgbI= X-Sonic-ID: C;lsI21gaE5RGfU70U9jFv0A== M;ynFs1gaE5RGfU70U9jFv0A== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 21:47:43 -0000 On 11/05/15 13:24, Andreas Tobler wrote: > Hi Nathan, Warner, > > first, I had the feeling that I have to provide a fast solution which > makes PowerMacs usable again. I am aware that the committed version > doesn't win a prize. Thank you! > Also, I didn't know that we have AIM & FDT, Nathan which one? PS3 and POWER8 systems are AIM+FDT. Neither of these have I2C busses in their FDTs, so the impact is low for now, but it makes me a little nervous. > On 05.11.15 21:26, Warner Losh wrote: >> I'd suggested that this be driven off a global quirk like >> >> u_int fdt_quirks; >> #define FDT_QUIRK_8BIT_IIC_ADDR 1 >> ... > > In openfirm.h? I'd really prefer an explicit platform check in ofw_iicbus.c for this by looking at the compatible property of the root node. If this ever comes up on another system, we can modify it, but I think it won't. -Nathan > >> if (fdt_quirks & FDT_QUIRK_8BIT_IIC_ADDR) >> dinfo->opd_dinfo.addr = paddr; >> else >> dinfo->opd_dinfo.addr = paddr << 1; >> >> And the platform code, whatever that means, would set it when it "knows" >> this is the case. > > If I get that right, I'd have to set the fdt_quirk in each I2C parent, > like kiic.c and smu.c? > >> On Thu, Nov 5, 2015 at 12:56 PM, Nathan Whitehorn >> > wrote: >> >> I'm not sure this is the best way to do this: we have AIM systems >> that use FDT, for example. Can we make it a quirk in the host-bus >> driver? Or do a run-time check to see if the root node has MacRISC >> in its compatible property? > > The 'compatible property' approach would be limited/isolated to one > file (ofw_iicbus.c) in comparison to the quirk approach where I'd have > to adapt at least (known now) four files. > > I can go either way, just my thoughts. > > Andreas > From owner-svn-src-head@freebsd.org Thu Nov 5 21:48:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D57A9A27E55; Thu, 5 Nov 2015 21:48:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8873A101C; Thu, 5 Nov 2015 21:48:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5LmCAt042188; Thu, 5 Nov 2015 21:48:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5LmCNg042187; Thu, 5 Nov 2015 21:48:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201511052148.tA5LmCNg042187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 5 Nov 2015 21:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290417 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 21:48:13 -0000 Author: imp Date: Thu Nov 5 21:48:12 2015 New Revision: 290417 URL: https://svnweb.freebsd.org/changeset/base/290417 Log: Fix CC being wrong during install* targets. Move CROSS_TOOLS stuff to top of file (before bsd.compiler.mk) so that decisions made by bsd.compiler.mk can properly affect the defaults in src.opts.mk. Move that to after bsd.compiler.mk. Add a comment about why we include bsd.compiler.mk here despite the fact that src.opts.mk currently does too. Also remove bsd.arch.inc.mk that's been OBE. Differential Revision: https://reviews.freebsd.org/D4087 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 5 21:33:15 2015 (r290416) +++ head/Makefile.inc1 Thu Nov 5 21:48:12 2015 (r290417) @@ -48,9 +48,15 @@ .error "Both TARGET and TARGET_ARCH must be defined." .endif -.include "share/mk/src.opts.mk" -.include -.include +# Cross toolchain changes must be in effect before bsd.compiler.mk +# so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. +.if defined(CROSS_TOOLCHAIN) +LOCALBASE?= /usr/local +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" +CROSSENV+=CROSS_TOOLCHAIN="${CROSS_TOOLCHAIN}" +.endif +.include # don't depend on src.opts.mk doing it +.include "share/mk/src.opts.mk" # We must do lib/ and libexec/ before bin/ in case of a mid-install error to # keep the users system reasonably usable. For static->dynamic root upgrades, @@ -254,7 +260,7 @@ INSTALLTMP!= /usr/bin/mktemp -d -u -t in BOOTSTRAPPING?= 0 # Common environment for world related stages -CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ +CROSSENV+= MAKEOBJDIRPREFIX=${OBJTREE} \ MACHINE_ARCH=${TARGET_ARCH} \ MACHINE=${TARGET} \ CPUTYPE=${TARGET_CPUTYPE} @@ -329,10 +335,6 @@ HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MT HMAKE+= PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT .endif -.if defined(CROSS_TOOLCHAIN) -LOCALBASE?= /usr/local -.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" -.endif .if defined(CROSS_TOOLCHAIN_PREFIX) CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} @@ -369,7 +371,7 @@ X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${ X${BINUTIL}?= ${${BINUTIL}} .endif .endfor -WMAKEENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \ +CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \ DEPFLAGS="${DEPFLAGS}" \ CPP="${XCPP} ${XCFLAGS}" \ AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \ From owner-svn-src-head@freebsd.org Thu Nov 5 21:50:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88E9DA27EE6; Thu, 5 Nov 2015 21:50:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5512D121A; Thu, 5 Nov 2015 21:50:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5LoBVt042307; Thu, 5 Nov 2015 21:50:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5LoBgU042306; Thu, 5 Nov 2015 21:50:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201511052150.tA5LoBgU042306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 5 Nov 2015 21:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290418 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 21:50:12 -0000 Author: imp Date: Thu Nov 5 21:50:11 2015 New Revision: 290418 URL: https://svnweb.freebsd.org/changeset/base/290418 Log: make is hard, so definitely move it. Still mulling moving vs deleting the rest of mine. Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Thu Nov 5 21:48:12 2015 (r290417) +++ head/MAINTAINERS Thu Nov 5 21:50:11 2015 (r290418) @@ -26,6 +26,7 @@ sub-system. subsystem login notes ----------------------------- +share/mk imp, bapt, bdrewery, emaste, sjg Make is hard. ---- OLD ---- kqueue jmg Pre-commit review requested. Documentation Required. libc/posix1e rwatson Pre-commit review requested. @@ -71,7 +72,6 @@ net80211 adrian Pre-commit review reques nvi peter Try not to break it. libz peter Try not to break it. groff ru Recommends pre-commit review. -share/mk imp, bapt, bdrewery, emaste, sjg Make is hard. ipfw ipfw Pre-commit review preferred. send to ipfw@freebsd.org drm rnoland Just keep me informed of changes, try not to break it. unifdef(1) fanf Pre-commit review requested. From owner-svn-src-head@freebsd.org Thu Nov 5 21:54:37 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61A66A2602E; Thu, 5 Nov 2015 21:54:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 125E61649; Thu, 5 Nov 2015 21:54:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5LsauZ045003; Thu, 5 Nov 2015 21:54:36 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5LsaF8045002; Thu, 5 Nov 2015 21:54:36 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511052154.tA5LsaF8045002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 5 Nov 2015 21:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290419 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 21:54:37 -0000 Author: adrian Date: Thu Nov 5 21:54:35 2015 New Revision: 290419 URL: https://svnweb.freebsd.org/changeset/base/290419 Log: Add wifi bits. Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Thu Nov 5 21:50:11 2015 (r290418) +++ head/MAINTAINERS Thu Nov 5 21:54:35 2015 (r290419) @@ -27,6 +27,12 @@ sub-system. subsystem login notes ----------------------------- share/mk imp, bapt, bdrewery, emaste, sjg Make is hard. +ath(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org +net80211 adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org +iwn(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org +iwm(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org +otus(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org +dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org ---- OLD ---- kqueue jmg Pre-commit review requested. Documentation Required. libc/posix1e rwatson Pre-commit review requested. @@ -36,7 +42,6 @@ MAC Framework rwatson Pre-commit review MAC Modules rwatson Pre-commit review requested. contrib/openbsm rwatson Pre-commit review requested. sys/security/audit rwatson Pre-commit review requested. -ath(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org ahc(4) gibbs Pre-commit review requested. ahd(4) gibbs Pre-commit review requested. pci bus imp,jhb Pre-commit review requested. @@ -68,7 +73,6 @@ procfs des Pre-commit review requested. linprocfs des Pre-commit review requested. lpr gad Pre-commit review requested, particularly for lpd/recvjob.c and lpd/printjob.c. -net80211 adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org nvi peter Try not to break it. libz peter Try not to break it. groff ru Recommends pre-commit review. From owner-svn-src-head@freebsd.org Thu Nov 5 22:03:21 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF2AAA263CF; Thu, 5 Nov 2015 22:03:21 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9918A1FA5; Thu, 5 Nov 2015 22:03:21 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5M3KKB047888; Thu, 5 Nov 2015 22:03:20 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5M3KiF047887; Thu, 5 Nov 2015 22:03:20 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201511052203.tA5M3KiF047887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Thu, 5 Nov 2015 22:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290420 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:03:21 -0000 Author: cognet Date: Thu Nov 5 22:03:20 2015 New Revision: 290420 URL: https://svnweb.freebsd.org/changeset/base/290420 Log: Make at91_pmc probe any at91 pmc device we support, not just at91rm9200. MFC after: 1 week Modified: head/sys/arm/at91/at91_pmc.c Modified: head/sys/arm/at91/at91_pmc.c ============================================================================== --- head/sys/arm/at91/at91_pmc.c Thu Nov 5 21:54:35 2015 (r290419) +++ head/sys/arm/at91/at91_pmc.c Thu Nov 5 22:03:20 2015 (r290420) @@ -661,7 +661,10 @@ static int at91_pmc_probe(device_t dev) { #ifdef FDT - if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-pmc")) + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-pmc") && + !ofw_bus_is_compatible(dev, "atmel,at91sam9260-pmc") && + !ofw_bus_is_compatible(dev, "atmel,at91sam9g45-pmc") && + !ofw_bus_is_compatible(dev, "atmel,at91sam9x5-pmc")) return (ENXIO); #endif device_set_desc(dev, "PMC"); From owner-svn-src-head@freebsd.org Thu Nov 5 22:03:29 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 657A8A263FA; Thu, 5 Nov 2015 22:03:29 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EAB11129; Thu, 5 Nov 2015 22:03:29 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5M3Sfh047938; Thu, 5 Nov 2015 22:03:28 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5M3S29047937; Thu, 5 Nov 2015 22:03:28 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201511052203.tA5M3S29047937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Thu, 5 Nov 2015 22:03:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290421 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:03:29 -0000 Author: jmg Date: Thu Nov 5 22:03:27 2015 New Revision: 290421 URL: https://svnweb.freebsd.org/changeset/base/290421 Log: I'm still maintaining these... Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Thu Nov 5 22:03:20 2015 (r290420) +++ head/MAINTAINERS Thu Nov 5 22:03:27 2015 (r290421) @@ -26,6 +26,8 @@ sub-system. subsystem login notes ----------------------------- +opencrypto jmg Pre-commit review requested. Documentation Required. +kqueue jmg Pre-commit review requested. Documentation Required. share/mk imp, bapt, bdrewery, emaste, sjg Make is hard. ath(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org net80211 adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org @@ -34,7 +36,6 @@ iwm(4) adrian Pre-commit review request otus(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org ---- OLD ---- -kqueue jmg Pre-commit review requested. Documentation Required. libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. UFS EAs rwatson Pre-commit review requested. @@ -139,4 +140,3 @@ release/release.sh gjb Pre-commit review requested. nanobsd imp Pre-commit review requested for coordination. vmm(4) neel,grehan Pre-commit review requested. -opencrypto jmg Pre-commit review requested. Documentation Required. From owner-svn-src-head@freebsd.org Thu Nov 5 22:03:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AC8FA26436; Thu, 5 Nov 2015 22:03:43 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 471011280; Thu, 5 Nov 2015 22:03:43 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5M3gmn047991; Thu, 5 Nov 2015 22:03:42 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5M3gFZ047990; Thu, 5 Nov 2015 22:03:42 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201511052203.tA5M3gFZ047990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Thu, 5 Nov 2015 22:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290422 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:03:43 -0000 Author: cognet Date: Thu Nov 5 22:03:42 2015 New Revision: 290422 URL: https://svnweb.freebsd.org/changeset/base/290422 Log: Make if_macb work with FDT. Modified: head/sys/arm/at91/if_macb.c Modified: head/sys/arm/at91/if_macb.c ============================================================================== --- head/sys/arm/at91/if_macb.c Thu Nov 5 22:03:27 2015 (r290421) +++ head/sys/arm/at91/if_macb.c Thu Nov 5 22:03:42 2015 (r290422) @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -72,6 +74,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + /* "device miibus" required. See GENERIC if you get errors here. */ #include "miibus_if.h" @@ -1196,6 +1204,11 @@ macbioctl(struct ifnet * ifp, u_long cmd static int macb_probe(device_t dev) { +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "cdns,at32ap7000-macb")) + return (ENXIO); +#endif + device_set_desc(dev, "macb"); return (0); } @@ -1546,7 +1559,11 @@ static driver_t macb_driver = { }; +#ifdef FDT +DRIVER_MODULE(macb, simplebus, macb_driver, macb_devclass, NULL, NULL); +#else DRIVER_MODULE(macb, atmelarm, macb_driver, macb_devclass, 0, 0); +#endif DRIVER_MODULE(miibus, macb, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(macb, miibus, 1, 1, 1); MODULE_DEPEND(macb, ether, 1, 1, 1); From owner-svn-src-head@freebsd.org Thu Nov 5 22:09:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7145FA264D9; Thu, 5 Nov 2015 22:09:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2406114E9; Thu, 5 Nov 2015 22:09:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5M90qr048189; Thu, 5 Nov 2015 22:09:00 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5M90Qd048188; Thu, 5 Nov 2015 22:09:00 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511052209.tA5M90Qd048188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 5 Nov 2015 22:09:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290423 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:09:01 -0000 Author: bdrewery Date: Thu Nov 5 22:09:00 2015 New Revision: 290423 URL: https://svnweb.freebsd.org/changeset/base/290423 Log: Allow 'make buildenv' to default to the caller's shell by using SHELL. Also pass BUILDENV=1 into the sub-shell to allow modifying PS1 in .profile such as: if [ -n "${BUILDENV}" ]; then PS1="(buildenv) ${PS1}" fi SHELL defaults to 'sh' in share/mk/sys.mk, but is typically passed down by the shell invoking make as well. Rather than forcing all 'buildenv' users to use plain /bin/sh, let them use their favorite shell. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Discussed with: imp Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 5 22:03:42 2015 (r290422) +++ head/Makefile.inc1 Thu Nov 5 22:09:00 2015 (r290423) @@ -27,7 +27,7 @@ # when NO_ROOT is set. (default: ${DESTDIR}/METALOG) # TARGET="machine" to crossbuild world for a different machine type # TARGET_ARCH= may be required when a TARGET supports multiple endians -# BUILDENV_SHELL= shell to launch for the buildenv target (def:/bin/sh) +# BUILDENV_SHELL= shell to launch for the buildenv target (def:${SHELL}) # WORLD_FLAGS= additional flags to pass to make(1) during buildworld # KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel # SUBDIR_OVERRIDE="list of dirs" to build rather than everything. @@ -145,7 +145,7 @@ CLEANDIR= cleandir LOCAL_TOOL_DIRS?= -BUILDENV_SHELL?=/bin/sh +BUILDENV_SHELL?=${SHELL} SVN?= /usr/local/bin/svn SVNFLAGS?= -r HEAD @@ -783,7 +783,7 @@ buildenvvars: .endif buildenv: @echo Entering world for ${TARGET_ARCH}:${TARGET} - @cd ${.CURDIR} && env ${WMAKEENV} ${BUILDENV_SHELL} || true + @cd ${.CURDIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} || true TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32} toolchain: ${TOOLCHAIN_TGTS} From owner-svn-src-head@freebsd.org Thu Nov 5 22:28:33 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31C0FA2682E; Thu, 5 Nov 2015 22:28:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9A291E5A; Thu, 5 Nov 2015 22:28:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5MSVkC054025; Thu, 5 Nov 2015 22:28:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5MSVCn054022; Thu, 5 Nov 2015 22:28:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511052228.tA5MSVCn054022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 5 Nov 2015 22:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290424 - in head: . share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:28:33 -0000 Author: bdrewery Date: Thu Nov 5 22:28:31 2015 New Revision: 290424 URL: https://svnweb.freebsd.org/changeset/base/290424 Log: Allow 'make buildenv' to work anywhere in the src tree. Sponsored by: EMC / Isilon Storage Division Added: head/share/mk/src.init.mk (contents, props changed) Modified: head/Makefile.inc1 head/share/mk/local.init.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 5 22:09:00 2015 (r290423) +++ head/Makefile.inc1 Thu Nov 5 22:28:31 2015 (r290424) @@ -773,7 +773,7 @@ buildworld_epilogue: # modification of the current environment's PATH. In addition, we need # to quote multiword values. # -buildenvvars: +buildenvvars: .PHONY @echo ${WMAKEENV:Q} ${.MAKE.EXPORTED:@v@$v=\"${$v}\"@} .if ${.TARGETS:Mbuildenv} @@ -781,9 +781,11 @@ buildenvvars: .error The buildenv target is incompatible with -j .endif .endif -buildenv: +BUILDENV_DIR?= ${.CURDIR} +buildenv: .PHONY @echo Entering world for ${TARGET_ARCH}:${TARGET} - @cd ${.CURDIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} || true + @cd ${BUILDENV_DIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} \ + || true TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32} toolchain: ${TOOLCHAIN_TGTS} Modified: head/share/mk/local.init.mk ============================================================================== --- head/share/mk/local.init.mk Thu Nov 5 22:09:00 2015 (r290423) +++ head/share/mk/local.init.mk Thu Nov 5 22:28:31 2015 (r290424) @@ -38,3 +38,5 @@ CPP= ${HOST_CPP} HOST_CFLAGS+= -DHOSTPROG CFLAGS+= ${HOST_CFLAGS} .endif + +.-include "src.init.mk" Added: head/share/mk/src.init.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/src.init.mk Thu Nov 5 22:28:31 2015 (r290424) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.if !target(____) +____: + +.if !target(buildenv) +buildenv: .PHONY + @env BUILDENV_DIR=${.CURDIR} ${MAKE} -C ${SRCTOP} buildenv +.endif + +.endif # !target(____) From owner-svn-src-head@freebsd.org Thu Nov 5 22:36:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADDF1A26B05; Thu, 5 Nov 2015 22:36:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78D281510; Thu, 5 Nov 2015 22:36:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5Ma9Qr057042; Thu, 5 Nov 2015 22:36:09 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5Ma9S1057041; Thu, 5 Nov 2015 22:36:09 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201511052236.tA5Ma9S1057041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 5 Nov 2015 22:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290425 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:36:10 -0000 Author: jkim Date: Thu Nov 5 22:36:09 2015 New Revision: 290425 URL: https://svnweb.freebsd.org/changeset/base/290425 Log: OpenSSL is still maintained by us. Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Thu Nov 5 22:28:31 2015 (r290424) +++ head/MAINTAINERS Thu Nov 5 22:36:09 2015 (r290425) @@ -35,6 +35,7 @@ iwn(4) adrian Pre-commit review request iwm(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org otus(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org +openssl benl,jkim Pre-commit review requested. ---- OLD ---- libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. @@ -108,7 +109,6 @@ linux emul emulation Please discuss chan bs{diff,patch} cperciva Pre-commit review requested. portsnap cperciva Pre-commit review requested. freebsd-update cperciva Pre-commit review requested. -openssl benl,jkim Pre-commit review requested. sys/dev/usb hselasky If in doubt, ask. sys/dev/sound/usb hselasky If in doubt, ask. sys/compat/linuxkpi hselasky If in doubt, ask. From owner-svn-src-head@freebsd.org Thu Nov 5 22:42:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6C21A26CCE; Thu, 5 Nov 2015 22:42:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A13A1A5E; Thu, 5 Nov 2015 22:42:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5MgepN059828; Thu, 5 Nov 2015 22:42:40 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5MgeSN059827; Thu, 5 Nov 2015 22:42:40 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511052242.tA5MgeSN059827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 5 Nov 2015 22:42:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290426 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:42:41 -0000 Author: bdrewery Date: Thu Nov 5 22:42:40 2015 New Revision: 290426 URL: https://svnweb.freebsd.org/changeset/base/290426 Log: Correct a comment which appears to be mistakingly mechanically changed in r265420. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Thu Nov 5 22:36:09 2015 (r290425) +++ head/share/mk/bsd.own.mk Thu Nov 5 22:42:40 2015 (r290426) @@ -1,6 +1,6 @@ # $FreeBSD$ # -# The include file set common variables for owner, +# The include file set common variables for owner, # group, mode, and directories. Defaults are in brackets. # # From owner-svn-src-head@freebsd.org Thu Nov 5 22:43:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 862C0A26D37; Thu, 5 Nov 2015 22:43:31 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.breitband.ch (smtp.breitband.ch [157.161.12.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D05A1BDE; Thu, 5 Nov 2015 22:43:30 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPS id AE1BAD88D6; Thu, 5 Nov 2015 23:43:27 +0100 (CET) Subject: Re: svn commit: r290373 - head/sys/dev/ofw To: Nathan Whitehorn , Warner Losh , Ian Lepore References: <201511042246.tA4MkUYU010551@repo.freebsd.org> <563BB466.8020801@freebsd.org> <563BC911.5060804@FreeBSD.org> <563BCE7C.9020900@freebsd.org> Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Andreas Tobler Message-ID: <563BDB8F.8090504@FreeBSD.org> Date: Thu, 5 Nov 2015 23:43:27 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <563BCE7C.9020900@freebsd.org> Content-Type: multipart/mixed; boundary="------------010507070301090902050103" X-Scanned-By: MIMEDefang 2.73 on 127.0.1.1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:43:31 -0000 This is a multi-part message in MIME format. --------------010507070301090902050103 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 05.11.15 22:47, Nathan Whitehorn wrote: > On 11/05/15 13:24, Andreas Tobler wrote: >> Hi Nathan, Warner, >> >> first, I had the feeling that I have to provide a fast solution which >> makes PowerMacs usable again. I am aware that the committed version >> doesn't win a prize. > > Thank you! > >> Also, I didn't know that we have AIM & FDT, Nathan which one? > > PS3 and POWER8 systems are AIM+FDT. Neither of these have I2C busses in > their FDTs, so the impact is low for now, but it makes me a little nervous. Ah, maybe I have luck to convince my son to handover the PS3 to me. He has a PS4 too... About the POWER8, well, far away from my budget..... >> On 05.11.15 21:26, Warner Losh wrote: >>> I'd suggested that this be driven off a global quirk like >>> >>> u_int fdt_quirks; >>> #define FDT_QUIRK_8BIT_IIC_ADDR 1 >>> ... >> >> In openfirm.h? > > I'd really prefer an explicit platform check in ofw_iicbus.c for this by > looking at the compatible property of the root node. If this ever comes > up on another system, we can modify it, but I think it won't. Attached a working proposal. It does work with the Apple 8-bit I2C addresses and the fan regulation works. But I need a kind soul to test this on an arm board with Linux based FDT I2C devices which have 7-bit addresses. Ian? Thanks in advance, Andreas >>> if (fdt_quirks & FDT_QUIRK_8BIT_IIC_ADDR) >>> dinfo->opd_dinfo.addr = paddr; >>> else >>> dinfo->opd_dinfo.addr = paddr << 1; >>> >>> And the platform code, whatever that means, would set it when it "knows" >>> this is the case. >> >> If I get that right, I'd have to set the fdt_quirk in each I2C parent, >> like kiic.c and smu.c? >> >>> On Thu, Nov 5, 2015 at 12:56 PM, Nathan Whitehorn >>> > wrote: >>> >>> I'm not sure this is the best way to do this: we have AIM systems >>> that use FDT, for example. Can we make it a quirk in the host-bus >>> driver? Or do a run-time check to see if the root node has MacRISC >>> in its compatible property? >> >> The 'compatible property' approach would be limited/isolated to one >> file (ofw_iicbus.c) in comparison to the quirk approach where I'd have >> to adapt at least (known now) four files. >> >> I can go either way, just my thoughts. --------------010507070301090902050103 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="ofw_iicbus.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ofw_iicbus.diff" SW5kZXg6IHN5cy9kZXYvb2Z3L29md19paWNidXMuYwo9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMv ZGV2L29mdy9vZndfaWljYnVzLmMJKHJldmlzaW9uIDI5MDM3MykKKysrIHN5cy9kZXYvb2Z3 L29md19paWNidXMuYwkod29ya2luZyBjb3B5KQpAQCAtMTAxLDkgKzEwMSwxMyBAQAogewog CXN0cnVjdCBpaWNidXNfc29mdGMgKnNjID0gSUlDQlVTX1NPRlRDKGRldik7CiAJc3RydWN0 IG9md19paWNidXNfZGV2aW5mbyAqZGluZm87Ci0JcGhhbmRsZV90IGNoaWxkLCBub2RlOwor CXBoYW5kbGVfdCBjaGlsZCwgbm9kZSwgcm9vdDsKIAlwY2VsbF90IGZyZXEsIHBhZGRyOwog CWRldmljZV90IGNoaWxkZGV2OworCXNzaXplX3QgY29tcGF0bGVuOworCWNoYXIgY29tcGF0 WzI1NV07CisJY2hhciAqY3Vyc3RyOworCXVfaW50IGlpY19hZGRyXzhiaXQgPSAwOwogCiAJ c2MtPmRldiA9IGRldjsKIAltdHhfaW5pdCgmc2MtPmxvY2ssICJpaWNidXMiLCBOVUxMLCBN VFhfREVGKTsKQEAgLTEyNSw2ICsxMjksMjEgQEAKIAlidXNfZW51bWVyYXRlX2hpbnRlZF9j aGlsZHJlbihkZXYpOwogCiAJLyoKKwkgKiBDaGVjayBpZiB3ZSdyZSBydW5uaW5nIG9uIGEg UG93ZXJNYWMsIG5lZWRlZCBmb3IgdGhlIEkyQworCSAqIGFkZHJlc3MgYmVsb3cuCisJICov CisJcm9vdCA9IE9GX3BlZXIoMCk7CisJY29tcGF0bGVuID0gT0ZfZ2V0cHJvcChyb290LCAi Y29tcGF0aWJsZSIsIGNvbXBhdCwKKwkJCQlzaXplb2YoY29tcGF0KSk7CisJaWYgKGNvbXBh dGxlbiAhPSAtMSkgeworCSAgICBmb3IgKGN1cnN0ciA9IGNvbXBhdDsgY3Vyc3RyIDwgY29t cGF0ICsgY29tcGF0bGVuOworCQljdXJzdHIgKz0gc3RybGVuKGN1cnN0cikgKyAxKSB7CisJ CWlmIChzdHJuY21wKGN1cnN0ciwgIk1hY1JJU0MiLCA3KSA9PSAwKQorCQkgICAgaWljX2Fk ZHJfOGJpdCA9IDE7CisJICAgIH0KKwl9CisKKwkvKgogCSAqIEF0dGFjaCB0aG9zZSBjaGls ZHJlbiByZXByZXNlbnRlZCBpbiB0aGUgZGV2aWNlIHRyZWUuCiAJICovCiAJZm9yIChjaGls ZCA9IE9GX2NoaWxkKG5vZGUpOyBjaGlsZCAhPSAwOyBjaGlsZCA9IE9GX3BlZXIoY2hpbGQp KSB7CkBAIC0xNTMsMTEgKzE3MiwxMSBAQAogCQkgKiBMaW51eCBGRFQgZGF0YSBjb250YWlu cyA3LWJpdCB2YWx1ZXMsIHNvIHNoaWZ0IHRoZW0gdXAgdG8KIAkJICogOC1iaXQgZm9ybWF0 LgogCQkgKi8KLSNpZmRlZiBBSU0KLQkJZGluZm8tPm9wZF9kaW5mby5hZGRyID0gcGFkZHI7 Ci0jZWxzZQotCQlkaW5mby0+b3BkX2RpbmZvLmFkZHIgPSBwYWRkciA8PCAxOwotI2VuZGlm CisJCWlmIChpaWNfYWRkcl84Yml0KQorCQkgICAgZGluZm8tPm9wZF9kaW5mby5hZGRyID0g cGFkZHI7CisJCWVsc2UKKwkJICAgIGRpbmZvLT5vcGRfZGluZm8uYWRkciA9IHBhZGRyIDw8 IDE7CisKIAkJaWYgKG9md19idXNfZ2VuX3NldHVwX2RldmluZm8oJmRpbmZvLT5vcGRfb2Jk aW5mbywgY2hpbGQpICE9CiAJCSAgICAwKSB7CiAJCQlmcmVlKGRpbmZvLCBNX0RFVkJVRik7 Cg== --------------010507070301090902050103-- From owner-svn-src-head@freebsd.org Thu Nov 5 22:44:37 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E79B9A26DC8; Thu, 5 Nov 2015 22:44:37 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFE7E1D54; Thu, 5 Nov 2015 22:44:37 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5MiaZZ059972; Thu, 5 Nov 2015 22:44:36 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5Miaq2059971; Thu, 5 Nov 2015 22:44:36 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201511052244.tA5Miaq2059971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 5 Nov 2015 22:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290427 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:44:38 -0000 Author: avos Date: Thu Nov 5 22:44:36 2015 New Revision: 290427 URL: https://svnweb.freebsd.org/changeset/base/290427 Log: iwn(4): various simple fixes - Fix mbuf leaks in iwn_raw_xmit() and iwn_xmit_task() (regression since r288178). - Check IWN_FLAG_RUNNING flag under lock. - Remove m->m_pkthdr.rcvif initialization (fixed in r283994). - Enclose some values in return statements into parentheses. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4069 Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Nov 5 22:42:40 2015 (r290426) +++ head/sys/dev/iwn/if_iwn.c Thu Nov 5 22:44:36 2015 (r290427) @@ -4852,6 +4852,7 @@ iwn_xmit_task(void *arg0, int pending) if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); ieee80211_free_node(ni); + m_freem(m); } } @@ -4872,16 +4873,13 @@ iwn_raw_xmit(struct ieee80211_node *ni, DPRINTF(sc, IWN_DEBUG_XMIT | IWN_DEBUG_TRACE, "->%s begin\n", __func__); + IWN_LOCK(sc); if ((sc->sc_flags & IWN_FLAG_RUNNING) == 0) { m_freem(m); - return ENETDOWN; + IWN_UNLOCK(sc); + return (ENETDOWN); } - /* XXX? net80211 doesn't set this on xmit'ed raw frames? */ - m->m_pkthdr.rcvif = (void *) ni; - - IWN_LOCK(sc); - /* queue frame if we have to */ if (sc->sc_beacon_wait) { if (iwn_xmit_queue_enqueue(sc, m) != 0) { @@ -4909,12 +4907,14 @@ iwn_raw_xmit(struct ieee80211_node *ni, } if (error == 0) sc->sc_tx_timer = 5; + else + m_freem(m); IWN_UNLOCK(sc); DPRINTF(sc, IWN_DEBUG_TRACE | IWN_DEBUG_XMIT, "->%s: end\n",__func__); - return error; + return (error); } /* From owner-svn-src-head@freebsd.org Thu Nov 5 22:50:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50D02A26F3B; Thu, 5 Nov 2015 22:50:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DAF4113F; Thu, 5 Nov 2015 22:50:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5MoMU5060207; Thu, 5 Nov 2015 22:50:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5MoMOk060206; Thu, 5 Nov 2015 22:50:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511052250.tA5MoMOk060206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 5 Nov 2015 22:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290428 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:50:23 -0000 Author: adrian Date: Thu Nov 5 22:50:21 2015 New Revision: 290428 URL: https://svnweb.freebsd.org/changeset/base/290428 Log: remove \, it confuses things. Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Nov 5 22:44:36 2015 (r290427) +++ head/share/man/man9/Makefile Thu Nov 5 22:50:21 2015 (r290428) @@ -1294,7 +1294,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_write_config.9 \ pci.9 pcie_adjust_config.9 \ pci.9 pcie_read_config.9 \ - pci.9 pcie_write_config.9 \ + pci.9 pcie_write_config.9 MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \ pci_iov_schema.9 pci_iov_schema_add_bool.9 \ pci_iov_schema.9 pci_iov_schema_add_string.9 \ From owner-svn-src-head@freebsd.org Thu Nov 5 22:53:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69DDCA2709B; Thu, 5 Nov 2015 22:53:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com [IPv6:2607:f8b0:400d:c09::22e]) (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 28B4B1510; Thu, 5 Nov 2015 22:53:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkcl124 with SMTP id l124so38835721qkc.3; Thu, 05 Nov 2015 14:53:55 -0800 (PST) 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=1ZQNkRy+7YKcOCJHVUPYjm1VxqUIAJLtAW35qgibjTc=; b=ojIBoltz3A52joSiy+ERiLpqbMm27jKxf8oYCsncwxDbPiGxNo7/3Flm6sKN4BQmoh gDBQY7hNoJ2gdhF8EwolFn96t0bJdKmBjpoynqbv9gQ/z4Wh0KtGDeY4cirlV0EIpD1R 1Dgt4M5qvTrZjFAgd6sSsXN7G/otBy3Jh+/rt9sSVm1RxlGRanvr3//N06i/9pwA2hB0 NECbBgd4VS6+e4jsZKHb2Aw8R4jWIFU3yKAwNrertb4VWDX+I3RGPCRIy8/hNKvoUy8Q Z/Vzo3QGS348lmrEH2Ay7qG/92cckqj1AmugjBreySWkBx7WYXXZCPNwTUbIoJ2phOyZ wydA== MIME-Version: 1.0 X-Received: by 10.55.212.89 with SMTP id l86mr10153219qki.64.1446764035262; Thu, 05 Nov 2015 14:53:55 -0800 (PST) Received: by 10.140.88.209 with HTTP; Thu, 5 Nov 2015 14:53:55 -0800 (PST) In-Reply-To: <201511052250.tA5MoMOk060206@repo.freebsd.org> References: <201511052250.tA5MoMOk060206@repo.freebsd.org> Date: Thu, 5 Nov 2015 14:53:55 -0800 Message-ID: Subject: Re: svn commit: r290428 - head/share/man/man9 From: NGie Cooper To: Adrian Chadd Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:53:56 -0000 On Thu, Nov 5, 2015 at 2:50 PM, Adrian Chadd wrote: > Author: adrian > Date: Thu Nov 5 22:50:21 2015 > New Revision: 290428 > URL: https://svnweb.freebsd.org/changeset/base/290428 > > Log: > remove \, it confuses things. "breaks installworld" might have been a better description.. From owner-svn-src-head@freebsd.org Thu Nov 5 23:10:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC87AA273F3; Thu, 5 Nov 2015 23:10:06 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by mx1.freebsd.org (Postfix) with ESMTP id E61621DD1; Thu, 5 Nov 2015 23:10:05 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp118-210-152-215.lns20.adl6.internode.on.net (HELO midget.dons.net.au) ([118.210.152.215]) by ipmail06.adl2.internode.on.net with ESMTP; 06 Nov 2015 09:37:18 +1030 Received: from [10.0.2.26] ([10.0.2.26]) (authenticated bits=0) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPSA id tA5N7H5H022233 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 Nov 2015 09:37:17 +1030 (CST) (envelope-from darius@dons.net.au) Subject: Re: svn commit: r290428 - head/share/man/man9 Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Content-Type: text/plain; charset=us-ascii From: "O'Connor, Daniel" In-Reply-To: <201511052250.tA5MoMOk060206@repo.freebsd.org> Date: Fri, 6 Nov 2015 09:37:17 +1030 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <84180B50-DEE2-454F-BD8E-C7F1B97CD301@dons.net.au> References: <201511052250.tA5MoMOk060206@repo.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.3096.5) X-Spam-Score: -2.9 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.75 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 23:10:07 -0000 Presumably the intent was to have an extra line after the \ so diffs are = reduced for future additions. > On 6 Nov 2015, at 09:20, Adrian Chadd wrote: >=20 > Author: adrian > Date: Thu Nov 5 22:50:21 2015 > New Revision: 290428 > URL: https://svnweb.freebsd.org/changeset/base/290428 >=20 > Log: > remove \, it confuses things. >=20 > Modified: > head/share/man/man9/Makefile >=20 > Modified: head/share/man/man9/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/share/man/man9/Makefile Thu Nov 5 22:44:36 2015 = (r290427) > +++ head/share/man/man9/Makefile Thu Nov 5 22:50:21 2015 = (r290428) > @@ -1294,7 +1294,7 @@ MLINKS+=3Dpci.9 pci_alloc_msi.9 \ > pci.9 pci_write_config.9 \ > pci.9 pcie_adjust_config.9 \ > pci.9 pcie_read_config.9 \ > - pci.9 pcie_write_config.9 \ > + pci.9 pcie_write_config.9 > MLINKS+=3Dpci_iov_schema.9 pci_iov_schema_alloc_node.9 \ > pci_iov_schema.9 pci_iov_schema_add_bool.9 \ > pci_iov_schema.9 pci_iov_schema_add_string.9 \ > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-svn-src-head@freebsd.org Thu Nov 5 23:12:24 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BA02A27507; Thu, 5 Nov 2015 23:12:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67BF01132; Thu, 5 Nov 2015 23:12:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5NCNdW069032; Thu, 5 Nov 2015 23:12:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5NCNPl069030; Thu, 5 Nov 2015 23:12:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511052312.tA5NCNPl069030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2015 23:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290429 - in head: share/man/man4 sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 23:12:24 -0000 Author: jhb Date: Thu Nov 5 23:12:23 2015 New Revision: 290429 URL: https://svnweb.freebsd.org/changeset/base/290429 Log: When dumping an rman in DDB, include the RID of each resource. Submitted by: Ravi Pokala (rpokala@panasas.com) Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D4086 Modified: head/share/man/man4/ddb.4 head/sys/kern/subr_rman.c Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Thu Nov 5 22:50:21 2015 (r290428) +++ head/share/man/man4/ddb.4 Thu Nov 5 23:12:23 2015 (r290429) @@ -60,7 +60,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 16, 2015 +.Dd November 5, 2015 .Dt DDB 4 .Os .Sh NAME @@ -560,8 +560,8 @@ The same as "show pcpu", but for every C .Pp .It Ic show Cm allrman Show information related with resource management, including -interrupt request lines, DMA request lines, I/O ports and I/O memory -addresses. +interrupt request lines, DMA request lines, I/O ports, I/O memory +addresses, and Resource IDs. .\" .Pp .It Ic show Cm apic Modified: head/sys/kern/subr_rman.c ============================================================================== --- head/sys/kern/subr_rman.c Thu Nov 5 22:50:21 2015 (r290428) +++ head/sys/kern/subr_rman.c Thu Nov 5 23:12:23 2015 (r290429) @@ -1051,7 +1051,8 @@ dump_rman(struct rman *rm) devname = "nomatch"; } else devname = NULL; - db_printf(" 0x%lx-0x%lx ", r->r_start, r->r_end); + db_printf(" 0x%lx-0x%lx (RID=%d) ", + r->r_start, r->r_end, r->r_rid); if (devname != NULL) db_printf("(%s)\n", devname); else From owner-svn-src-head@freebsd.org Thu Nov 5 23:25:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB641A27695 for ; Thu, 5 Nov 2015 23:25:16 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1C0E187F for ; Thu, 5 Nov 2015 23:25:16 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Thu, 5 Nov 2015 23:24:09 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id tA5NP80L049542; Thu, 5 Nov 2015 16:25:08 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1446765908.91534.404.camel@freebsd.org> Subject: Re: svn commit: r290373 - head/sys/dev/ofw From: Ian Lepore To: Andreas Tobler , Nathan Whitehorn , Warner Losh Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Thu, 05 Nov 2015 16:25:08 -0700 In-Reply-To: <563BDB8F.8090504@FreeBSD.org> References: <201511042246.tA4MkUYU010551@repo.freebsd.org> <563BB466.8020801@freebsd.org> <563BC911.5060804@FreeBSD.org> <563BCE7C.9020900@freebsd.org> <563BDB8F.8090504@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 23:25:17 -0000 On Thu, 2015-11-05 at 23:43 +0100, Andreas Tobler wrote: > On 05.11.15 22:47, Nathan Whitehorn wrote: > > On 11/05/15 13:24, Andreas Tobler wrote: > > > Hi Nathan, Warner, > > > > > > first, I had the feeling that I have to provide a fast solution > > > which > > > makes PowerMacs usable again. I am aware that the committed > > > version > > > doesn't win a prize. > > > > Thank you! > > > > > Also, I didn't know that we have AIM & FDT, Nathan which one? > > > > PS3 and POWER8 systems are AIM+FDT. Neither of these have I2C > > busses in > > their FDTs, so the impact is low for now, but it makes me a little > > nervous. > > Ah, maybe I have luck to convince my son to handover the PS3 to me. > He > has a PS4 too... > > About the POWER8, well, far away from my budget..... > > > > On 05.11.15 21:26, Warner Losh wrote: > > > > I'd suggested that this be driven off a global quirk like > > > > > > > > u_int fdt_quirks; > > > > #define FDT_QUIRK_8BIT_IIC_ADDR 1 > > > > ... > > > > > > In openfirm.h? > > > > I'd really prefer an explicit platform check in ofw_iicbus.c for > > this by > > looking at the compatible property of the root node. If this ever > > comes > > up on another system, we can modify it, but I think it won't. > > Attached a working proposal. > It does work with the Apple 8-bit I2C addresses and the fan > regulation > works. > > But I need a kind soul to test this on an arm board with Linux based > FDT > I2C devices which have 7-bit addresses. > > Ian? > Yeah, that looks good to me (strange that we have no helper function that can do all that compatible stuff given a node handle instead of a device_t). -- Ian > Thanks in advance, > Andreas > > > > > if (fdt_quirks & FDT_QUIRK_8BIT_IIC_ADDR) > > > > dinfo->opd_dinfo.addr = paddr; > > > > else > > > > dinfo->opd_dinfo.addr = paddr << 1; > > > > > > > > And the platform code, whatever that means, would set it when > > > > it "knows" > > > > this is the case. > > > > > > If I get that right, I'd have to set the fdt_quirk in each I2C > > > parent, > > > like kiic.c and smu.c? > > > > > > > On Thu, Nov 5, 2015 at 12:56 PM, Nathan Whitehorn > > > > > wrote: > > > > > > > > I'm not sure this is the best way to do this: we have AIM > > > > systems > > > > that use FDT, for example. Can we make it a quirk in the > > > > host-bus > > > > driver? Or do a run-time check to see if the root node has > > > > MacRISC > > > > in its compatible property? > > > > > > The 'compatible property' approach would be limited/isolated to > > > one > > > file (ofw_iicbus.c) in comparison to the quirk approach where I'd > > > have > > > to adapt at least (known now) four files. > > > > > > I can go either way, just my thoughts. > > From owner-svn-src-head@freebsd.org Thu Nov 5 23:28:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E02F3A27756 for ; Thu, 5 Nov 2015 23:28:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5F7C1CFE for ; Thu, 5 Nov 2015 23:28:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Thu, 5 Nov 2015 23:28:54 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id tA5NSO5O049554; Thu, 5 Nov 2015 16:28:25 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1446766105.91534.407.camel@freebsd.org> Subject: Re: svn commit: r290428 - head/share/man/man9 From: Ian Lepore To: "O'Connor, Daniel" , Adrian Chadd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 05 Nov 2015 16:28:25 -0700 In-Reply-To: <84180B50-DEE2-454F-BD8E-C7F1B97CD301@dons.net.au> References: <201511052250.tA5MoMOk060206@repo.freebsd.org> <84180B50-DEE2-454F-BD8E-C7F1B97CD301@dons.net.au> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 23:28:29 -0000 On Fri, 2015-11-06 at 09:37 +1030, O'Connor, Daniel wrote: > Presumably the intent was to have an extra line after the \ so diffs > are reduced for future additions. > Yeah. I wish we did that pretty much universally wherever lists of things appear (SRCS and OBJS lists in makefiles, a trailing comma on ar ray and enum init lists in C, etc). -- Ian > > On 6 Nov 2015, at 09:20, Adrian Chadd wrote: > > > > Author: adrian > > Date: Thu Nov 5 22:50:21 2015 > > New Revision: 290428 > > URL: https://svnweb.freebsd.org/changeset/base/290428 > > > > Log: > > remove \, it confuses things. > > > > Modified: > > head/share/man/man9/Makefile > > > > Modified: head/share/man/man9/Makefile > > =================================================================== > > =========== > > --- head/share/man/man9/Makefile Thu Nov 5 22:44:36 2015 > > (r290427) > > +++ head/share/man/man9/Makefile Thu Nov 5 22:50:21 2015 > > (r290428) > > @@ -1294,7 +1294,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ > > pci.9 pci_write_config.9 \ > > pci.9 pcie_adjust_config.9 \ > > pci.9 pcie_read_config.9 \ > > - pci.9 pcie_write_config.9 \ > > + pci.9 pcie_write_config.9 > > MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \ > > pci_iov_schema.9 pci_iov_schema_add_bool.9 \ > > pci_iov_schema.9 pci_iov_schema_add_string.9 \ > > _______________________________________________ > > svn-src-all@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-all > > To unsubscribe, send any mail to " > > svn-src-all-unsubscribe@freebsd.org" > > -- > Daniel O'Connor > "The nice thing about standards is that there > are so many of them to choose from." > -- Andrew Tanenbaum > GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C > > > From owner-svn-src-head@freebsd.org Thu Nov 5 23:28:50 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F7BCA27796; Thu, 5 Nov 2015 23:28:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D71A1E5B; Thu, 5 Nov 2015 23:28:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5NSnHM072095; Thu, 5 Nov 2015 23:28:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5NSnaN072094; Thu, 5 Nov 2015 23:28:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201511052328.tA5NSnaN072094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 5 Nov 2015 23:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290430 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 23:28:50 -0000 Author: gjb Date: Thu Nov 5 23:28:48 2015 New Revision: 290430 URL: https://svnweb.freebsd.org/changeset/base/290430 Log: Update MAINTAINERS file to reflect re (gjb) wants to review changes to release.sh Sponsored by: The FreeBSD Foundation Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Thu Nov 5 23:12:23 2015 (r290429) +++ head/MAINTAINERS Thu Nov 5 23:28:48 2015 (r290430) @@ -36,6 +36,8 @@ iwm(4) adrian Pre-commit review request otus(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org openssl benl,jkim Pre-commit review requested. +release/release.sh gjb,re Pre-commit review and regression tests + requested. ---- OLD ---- libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. @@ -136,7 +138,5 @@ sh(1) jilles Pre-commit review request nvme(4) jimharris Pre-commit review requested. nvd(4) jimharris Pre-commit review requested. nvmecontrol(8) jimharris Pre-commit review requested. -release/release.sh gjb Pre-commit review and regression tests - requested. nanobsd imp Pre-commit review requested for coordination. vmm(4) neel,grehan Pre-commit review requested. From owner-svn-src-head@freebsd.org Thu Nov 5 23:29:39 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C2AAA277ED; Thu, 5 Nov 2015 23:29:39 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 3593A1FBF; Thu, 5 Nov 2015 23:29:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4729AB97D; Thu, 5 Nov 2015 18:29:38 -0500 (EST) From: John Baldwin To: "O'Connor, Daniel" Cc: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290428 - head/share/man/man9 Date: Thu, 05 Nov 2015 15:29:32 -0800 Message-ID: <2767138.2E5KqmzryD@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <84180B50-DEE2-454F-BD8E-C7F1B97CD301@dons.net.au> References: <201511052250.tA5MoMOk060206@repo.freebsd.org> <84180B50-DEE2-454F-BD8E-C7F1B97CD301@dons.net.au> 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, 05 Nov 2015 18:29:38 -0500 (EST) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 23:29:39 -0000 On Friday, November 06, 2015 09:37:17 AM O'Connor, Daniel wrote: > Presumably the intent was to have an extra line after the \ so diffs are reduced for future additions. No, it was just a copy and paste bug. :( Thanks for fixing it Adrian. > > On 6 Nov 2015, at 09:20, Adrian Chadd wrote: > > > > Author: adrian > > Date: Thu Nov 5 22:50:21 2015 > > New Revision: 290428 > > URL: https://svnweb.freebsd.org/changeset/base/290428 > > > > Log: > > remove \, it confuses things. > > > > Modified: > > head/share/man/man9/Makefile > > > > Modified: head/share/man/man9/Makefile > > ============================================================================== > > --- head/share/man/man9/Makefile Thu Nov 5 22:44:36 2015 (r290427) > > +++ head/share/man/man9/Makefile Thu Nov 5 22:50:21 2015 (r290428) > > @@ -1294,7 +1294,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ > > pci.9 pci_write_config.9 \ > > pci.9 pcie_adjust_config.9 \ > > pci.9 pcie_read_config.9 \ > > - pci.9 pcie_write_config.9 \ > > + pci.9 pcie_write_config.9 > > MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \ > > pci_iov_schema.9 pci_iov_schema_add_bool.9 \ > > pci_iov_schema.9 pci_iov_schema_add_string.9 \ > > _______________________________________________ > > svn-src-all@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-all > > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > -- > Daniel O'Connor > "The nice thing about standards is that there > are so many of them to choose from." > -- Andrew Tanenbaum > GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C > > -- John Baldwin From owner-svn-src-head@freebsd.org Thu Nov 5 23:35:59 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ED40A27A90; Thu, 5 Nov 2015 23:35:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6396D1847; Thu, 5 Nov 2015 23:35:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 5C2D518D1; Thu, 5 Nov 2015 23:35:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 08E0E16476; Thu, 5 Nov 2015 23:35:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id M_q4Q21a0lRl; Thu, 5 Nov 2015 23:35:56 +0000 (UTC) Subject: Re: svn commit: r290428 - head/share/man/man9 DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 1E9211646D To: Ian Lepore , "O'Connor, Daniel" , Adrian Chadd References: <201511052250.tA5MoMOk060206@repo.freebsd.org> <84180B50-DEE2-454F-BD8E-C7F1B97CD301@dons.net.au> <1446766105.91534.407.camel@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <563BE7E2.4020402@FreeBSD.org> Date: Thu, 5 Nov 2015 15:36:02 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1446766105.91534.407.camel@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4gDnCo78qDEc5euttFEHe23GFLqTC54Q3" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 23:35:59 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4gDnCo78qDEc5euttFEHe23GFLqTC54Q3 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 11/5/2015 3:28 PM, Ian Lepore wrote: > On Fri, 2015-11-06 at 09:37 +1030, O'Connor, Daniel wrote: >> Presumably the intent was to have an extra line after the \ so diffs >> are reduced for future additions. >> >=20 > Yeah. I wish we did that pretty much universally wherever lists of > things appear (SRCS and OBJS lists in makefiles, a trailing comma on ar= > ray and enum init lists in C, etc). >=20 Me too. It leads to bugs like this though when an empty line does not follow. We've done this pattern at work but I avoid doing so here. >=20 >>> On 6 Nov 2015, at 09:20, Adrian Chadd wrote: >>> >>> Author: adrian >>> Date: Thu Nov 5 22:50:21 2015 >>> New Revision: 290428 >>> URL: https://svnweb.freebsd.org/changeset/base/290428 >>> >>> Log: >>> remove \, it confuses things. >>> >>> Modified: >>> head/share/man/man9/Makefile >>> >>> Modified: head/share/man/man9/Makefile >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- head/share/man/man9/Makefile Thu Nov 5 22:44:36 2015=09 >>> (r290427) >>> +++ head/share/man/man9/Makefile Thu Nov 5 22:50:21 2015=09 >>> (r290428) >>> @@ -1294,7 +1294,7 @@ MLINKS+=3Dpci.9 pci_alloc_msi.9 \ >>> pci.9 pci_write_config.9 \ >>> pci.9 pcie_adjust_config.9 \ >>> pci.9 pcie_read_config.9 \ >>> - pci.9 pcie_write_config.9 \ >>> + pci.9 pcie_write_config.9 >>> MLINKS+=3Dpci_iov_schema.9 pci_iov_schema_alloc_node.9 \ >>> pci_iov_schema.9 pci_iov_schema_add_bool.9 \ >>> pci_iov_schema.9 pci_iov_schema_add_string.9 \ --=20 Regards, Bryan Drewery --4gDnCo78qDEc5euttFEHe23GFLqTC54Q3 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 iQEcBAEBAgAGBQJWO+fiAAoJEDXXcbtuRpfPiAMH/R1EEsMnFXqT0iGFYhmkJg3Z HvKN4ZBfBqfwQdZXTxT1tLBo2vRFlx3cjfeczp42Nze5tFlc/8WpQLXAiMZ2cgJW 0tLOTgjKwpn4jYMJKVJ/IfebY+aqosxaCy56ynMmxZKB9XyFROfkLwOojlO3AQYl XyWbLkmGhkZasgJJ64OvYdZgaZ/Q6QvTYlxHb8H/yvVMXi/7phuM1DfkXpEJnb/X mWuWKryeVA/mRzjbH4BA8wCWBpt/doQ8XNk/6AFV7lxvOG+PANh/ukrsXQFIUyuS CKIQE+kob1ToehsPvnGQzFAg1pDop0Uhf2IhMjZ8YizoXOrJSLsy4ywWJ4OyBpY= =SRrx -----END PGP SIGNATURE----- --4gDnCo78qDEc5euttFEHe23GFLqTC54Q3-- From owner-svn-src-head@freebsd.org Fri Nov 6 00:06:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7621AA252A0; Fri, 6 Nov 2015 00:06:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DF4B14D1; Fri, 6 Nov 2015 00:06:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA606Aq2083526; Fri, 6 Nov 2015 00:06:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA606Ajr083525; Fri, 6 Nov 2015 00:06:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511060006.tA606Ajr083525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 6 Nov 2015 00:06:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290431 - head/usr.bin/svn/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 00:06:11 -0000 Author: bdrewery Date: Fri Nov 6 00:06:10 2015 New Revision: 290431 URL: https://svnweb.freebsd.org/changeset/base/290431 Log: Add SUBDIR_PARALLEL. None of these libraries depend on each other. Submitted by: Jia-Shiun Li MFC after: 2 weeks Modified: head/usr.bin/svn/lib/Makefile Modified: head/usr.bin/svn/lib/Makefile ============================================================================== --- head/usr.bin/svn/lib/Makefile Thu Nov 5 23:28:48 2015 (r290430) +++ head/usr.bin/svn/lib/Makefile Fri Nov 6 00:06:10 2015 (r290431) @@ -4,5 +4,6 @@ SUBDIR= libapr libapr_util libserf \ libsvn_client libsvn_delta libsvn_diff libsvn_fs libsvn_fs_fs \ libsvn_fs_util libsvn_fs_x libsvn_ra libsvn_ra_local libsvn_ra_serf \ libsvn_ra_svn libsvn_repos libsvn_subr libsvn_wc +SUBDIR_PARALLEL= .include From owner-svn-src-head@freebsd.org Fri Nov 6 03:09:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68761A273D4; Fri, 6 Nov 2015 03:09:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A145111E; Fri, 6 Nov 2015 03:09:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA639RJk035095; Fri, 6 Nov 2015 03:09:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA639R38035094; Fri, 6 Nov 2015 03:09:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511060309.tA639R38035094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 6 Nov 2015 03:09:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290432 - head/sys/dev/otus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 03:09:28 -0000 Author: adrian Date: Fri Nov 6 03:09:26 2015 New Revision: 290432 URL: https://svnweb.freebsd.org/changeset/base/290432 Log: otus(4) - add flags for RX filter, configuration and sniffer. Obtained from: Linux carl9170 Modified: head/sys/dev/otus/if_otusreg.h Modified: head/sys/dev/otus/if_otusreg.h ============================================================================== --- head/sys/dev/otus/if_otusreg.h Fri Nov 6 00:06:10 2015 (r290431) +++ head/sys/dev/otus/if_otusreg.h Fri Nov 6 03:09:26 2015 (r290432) @@ -59,6 +59,8 @@ #define AR_MAC_REG_RX_PE_DELAY (AR_MAC_REG_BASE + 0x64c) #define AR_MAC_REG_DYNAMIC_SIFS_ACK (AR_MAC_REG_BASE + 0x658) #define AR_MAC_REG_SNIFFER (AR_MAC_REG_BASE + 0x674) +#define AR_MAC_SNIFFER_DEFAULTS 0x02000000 +#define AR_MAC_SNIFFER_ENABLE_PROMISC 0x1 #define AR_MAC_REG_ENCRYPTION (AR_MAC_REG_BASE + 0x678) #define AR_MAC_REG_MISC_680 (AR_MAC_REG_BASE + 0x680) #define AR_MAC_REG_FRAMETYPE_FILTER (AR_MAC_REG_BASE + 0x68c) @@ -69,6 +71,11 @@ #define AR_MAC_REG_BUSY_EXT (AR_MAC_REG_BASE + 0x6ec) #define AR_MAC_REG_SLOT_TIME (AR_MAC_REG_BASE + 0x6f0) #define AR_MAC_REG_CAM_MODE (AR_MAC_REG_BASE + 0x700) +#define AR_MAC_CAM_DEFAULTS (0xf << 24) +#define AR_MAC_CAM_IBSS 0xe0 +#define AR_MAC_CAM_AP 0xa1 +#define AR_MAC_CAM_STA 0x2 +#define AR_MAC_CAM_AP_WDS 0x3 #define AR_MAC_REG_AC0_CW (AR_MAC_REG_BASE + 0xb00) #define AR_MAC_REG_AC1_CW (AR_MAC_REG_BASE + 0xb04) #define AR_MAC_REG_AC2_CW (AR_MAC_REG_BASE + 0xb08) @@ -86,6 +93,12 @@ #define AR_MAC_REG_AMPDU_FACTOR (AR_MAC_REG_BASE + 0xb9c) #define AR_MAC_REG_FCS_SELECT (AR_MAC_REG_BASE + 0xbb0) #define AR_MAC_REG_RX_CONTROL (AR_MAC_REG_BASE + 0xc40) +#define AR_MAC_RX_CTRL_DEAGG 0x1 +#define AR_MAC_RX_CTRL_SHORT_FILTER 0x2 +#define AR_MAC_RX_CTRL_SA_DA_SEARCH 0x20 +#define AR_MAC_RX_CTRL_PASS_TO_HOST (1 << 28) +#define AR_MAC_RX_CTRL_ACK_IN_SNIFFER (1 << 30) + #define AR_MAC_REG_AMPDU_RX_THRESH (AR_MAC_REG_BASE + 0xc50) #define AR_MAC_REG_OFDM_PHY_ERRORS (AR_MAC_REG_BASE + 0xcb4) #define AR_MAC_REG_CCK_PHY_ERRORS (AR_MAC_REG_BASE + 0xcb8) From owner-svn-src-head@freebsd.org Fri Nov 6 04:45:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8B93A2622E; Fri, 6 Nov 2015 04:45:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B973812B1; Fri, 6 Nov 2015 04:45:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA64jU7O063315; Fri, 6 Nov 2015 04:45:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA64jUjj063307; Fri, 6 Nov 2015 04:45:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511060445.tA64jUjj063307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 6 Nov 2015 04:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290433 - in head: share/mk sys/conf tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 04:45:32 -0000 Author: bdrewery Date: Fri Nov 6 04:45:29 2015 New Revision: 290433 URL: https://svnweb.freebsd.org/changeset/base/290433 Log: Add a FAST_DEPEND option, off by default, which speeds up the build significantly. This speeds up buildworld by 16% on my system and buildkernel by 35%. Rather than calling mkdep(1), which is just a wrapper around 'cc -E', use the modern -MD -MT -MF flags to gather and generate dependencies during compilation. This flag was introduced in GCC "a long time ago", in GCC 3.0, and is also supported by Clang. (It appears that ICC also supports this but I do not have access to test it). This avoids running the preprocessor *twice* for every build, in both 'make depend' and 'make all'. This is especially noticeable when using ccache since it does not cache preprocessor results from mkdep(1) / 'cc -E', but still speeds up compilation with the -MD flags. For 'make depend' a tree-walk is still done to ensure that all DPSRCS are generated when expected, and that beforedepend/afterdepend and _EXTRADEPEND are all still respected. In time this may change but for now I've been conservative. The time for a tree-walk with -j combined with SUBDIR_PARALLEL is not significant. For example, it takes about 9 seconds with -j15 to walk all of src/ for 'make depend' now on my system. A .depend file is still generated with the various rules that apply to the final target, or custom rules. Otherwise there are now per-built-object-file .depend files, such as .depend.filename.o. These are included directly by make rather than populating .depend with a loop and .depend lines, which only added overhead to the now almost-NOP 'make depend' phase. Before this I experimented with having mkdep(1) called in parallel per-file. While this improved the kernel and lib/libc 'make depend' phase, it resulted in slower build times overall. The -M flags are removed from CFLAGS when linking since they have no effect. Enabling this by default, for src or out-of-src, can be done once more testing has been done, such as a ports exp-run, and with more compilers. The system I used for testing was: WITNESS Build options: -j20 WITH_LLDB=yes WITH_DEBUG_FILES=yes WITH_FAST_DEPEND=yes DISK: ZFS 3-way mirror with very slow disks using SSD l2arc/log. The arc was fully populated with src tree files. RAM: 76GiB CPU: Intel(R) Xeon(R) CPU L5520 @2.27GHz 2 package(s) x 4 core(s) x 2 SMT threads = hw.ncpu=16 buildworld: x buildworld-before + buildworld-fastdep +-------------------------------------------------------------------------------+ |+ | |+ | |+ xx x| | |_MA___|| |A | +-------------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 3 3744.13 3794.31 3752.25 3763.5633 26.935139 + 3 3153.34 3155.16 3154.2 3154.2333 0.91045776 Difference at 95.0% confidence -609.33 +/- 43.1943 -16.1902% +/- 1.1477% (Student's t, pooled s = 19.0569) buildkernel: x buildkernel-before + buildkernel-fastdep +-------------------------------------------------------------------------------+ |+ x | |++ xx| | A|| |A| | +-------------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 3 571.57 573.94 571.79 572.43333 1.3094401 + 3 369.12 370.57 369.3 369.66333 0.79033748 Difference at 95.0% confidence -202.77 +/- 2.45131 -35.4225% +/- 0.428227% (Student's t, pooled s = 1.0815) Sponsored by: EMC / Isilon Storage Division MFC after: 3 weeks Relnotes: yes Added: head/tools/build/options/WITH_FAST_DEPEND (contents, props changed) Modified: head/share/mk/bsd.dep.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.opts.mk head/share/mk/bsd.prog.mk head/sys/conf/kern.opts.mk head/sys/conf/kern.post.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Fri Nov 6 03:09:26 2015 (r290432) +++ head/share/mk/bsd.dep.mk Fri Nov 6 04:45:29 2015 (r290433) @@ -54,6 +54,18 @@ MKDEPCMD?= CC='${CC} ${DEPFLAGS}' mkdep MKDEPCMD?= mkdep .endif DEPENDFILE?= .depend +DEPENDFILES= ${DEPENDFILE} +.if ${MK_FAST_DEPEND} == "yes" +DEPENDFILES+= ${DEPENDFILE}.* +DEPEND_CFLAGS+= -MD -MP -MF${DEPENDFILE}.${.TARGET} +DEPEND_CFLAGS+= -MT${.TARGET} +CFLAGS+= ${DEPEND_CFLAGS} +DEPENDOBJS+= ${OBJS} ${POBJS} ${SOBJS} +.for __obj in ${DEPENDOBJS:O:u} +.sinclude "${DEPENDFILE}.${__obj}" +DEPENDFILES_OBJS+= ${DEPENDFILE}.${__obj} +.endfor +.endif # ${MK_FAST_DEPEND} == "yes" # Keep `tags' here, before SRCS are mangled below for `depend'. .if !target(tags) && defined(SRCS) && !defined(NO_TAGS) @@ -161,7 +173,7 @@ afterdepend: beforedepend depend: beforedepend ${DEPENDFILE} afterdepend # Tell bmake not to look for generated files via .PATH -.NOPATH: ${DEPENDFILE} +.NOPATH: ${DEPENDFILE} ${DEPENDFILES_OBJS} # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags. @@ -172,6 +184,7 @@ MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} DPSRCS+= ${SRCS} ${DEPENDFILE}: ${DPSRCS} +.if ${MK_FAST_DEPEND} == "no" rm -f ${DEPENDFILE} .if !empty(DPSRCS:M*.[cS]) ${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \ @@ -182,7 +195,11 @@ ${DEPENDFILE}: ${DPSRCS} ${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \ ${MKDEP_CXXFLAGS} \ ${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cpp} ${.ALLSRC:M*.cxx} +.else .endif +.else + : > ${.TARGET} +.endif # ${MK_FAST_DEPEND} == "no" .if target(_EXTRADEPEND) _EXTRADEPEND: .USE ${DEPENDFILE}: _EXTRADEPEND @@ -207,12 +224,12 @@ afterdepend: cleandepend: .if defined(SRCS) .if ${CTAGS:T} == "gtags" - rm -f ${DEPENDFILE} GPATH GRTAGS GSYMS GTAGS + rm -f ${DEPENDFILES} GPATH GRTAGS GSYMS GTAGS .if defined(HTML) rm -rf HTML .endif .else - rm -f ${DEPENDFILE} tags + rm -f ${DEPENDFILES} tags .endif .endif .endif Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Nov 6 03:09:26 2015 (r290432) +++ head/share/mk/bsd.lib.mk Fri Nov 6 04:45:29 2015 (r290433) @@ -305,10 +305,12 @@ all: _manpages .endif _EXTRADEPEND: +.if ${MK_FAST_DEPEND} == "no" @TMP=_depend$$$$; \ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.So:/' < ${DEPENDFILE} \ > $$TMP; \ mv $$TMP ${DEPENDFILE} +.endif .if !defined(NO_EXTRADEPEND) && defined(SHLIB_NAME) .if defined(DPADD) && !empty(DPADD) echo ${SHLIB_NAME_FULL}: ${DPADD} >> ${DEPENDFILE} Modified: head/share/mk/bsd.opts.mk ============================================================================== --- head/share/mk/bsd.opts.mk Fri Nov 6 03:09:26 2015 (r290432) +++ head/share/mk/bsd.opts.mk Fri Nov 6 04:45:29 2015 (r290433) @@ -66,6 +66,7 @@ __DEFAULT_YES_OPTIONS = \ WARNS __DEFAULT_NO_OPTIONS = \ + FAST_DEPEND \ CTF \ DEBUG_FILES \ INSTALL_AS_USER \ Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Fri Nov 6 03:09:26 2015 (r290432) +++ head/share/mk/bsd.prog.mk Fri Nov 6 04:45:29 2015 (r290433) @@ -82,9 +82,9 @@ ${PROG_FULL}: beforelinking .endif ${PROG_FULL}: ${OBJS} .if defined(PROG_CXX) - ${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} + ${CXX} ${CXXFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .else - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} + ${CC} ${CFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif .if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} @@ -112,9 +112,9 @@ ${PROG_FULL}: beforelinking .endif ${PROG_FULL}: ${OBJS} .if defined(PROG_CXX) - ${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} + ${CXX} ${CXXFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .else - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} + ${CC} ${CFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif .if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Fri Nov 6 03:09:26 2015 (r290432) +++ head/sys/conf/kern.opts.mk Fri Nov 6 04:45:29 2015 (r290433) @@ -45,6 +45,7 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ EISA \ + FAST_DEPEND \ NAND \ OFED Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Fri Nov 6 03:09:26 2015 (r290432) +++ head/sys/conf/kern.post.mk Fri Nov 6 04:45:29 2015 (r290433) @@ -198,18 +198,37 @@ kernel-depend: .depend SRCS= assym.s vnode_if.h ${BEFORE_DEPEND} ${CFILES} \ ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ ${MFILES:T:S/.m$/.h/} +DEPENDFILES= .depend +.if ${MK_FAST_DEPEND} == "yes" +DEPENDFILES+= .depend.* +DEPEND_CFLAGS+= -MD -MP -MF.depend.${.TARGET} +DEPEND_CFLAGS+= -MT${.TARGET} +CFLAGS+= ${DEPEND_CFLAGS} +DEPENDOBJS+= ${SYSTEM_OBJS} +.for __obj in ${DEPENDOBJS:O:u} +.sinclude ".depend.${__obj}" +DEPENDFILES_OBJS+= .depend.${__obj} +.endfor +.endif # ${MK_FAST_DEPEND} == "yes" + +.NOPATH: .depend ${DEPENDFILES_OBJS} + .depend: .PRECIOUS ${SRCS} - rm -f .newdep +.if ${MK_FAST_DEPEND} == "no" + rm -f ${.TARGET}.tmp ${MAKE} -V CFILES_NOCDDL -V SYSTEM_CFILES -V GEN_CFILES | \ - MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${CFLAGS} + CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${CFLAGS} ${MAKE} -V CFILES_CDDL | \ - MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${ZFS_CFLAGS} ${FBT_CFLAGS} ${DTRACE_CFLAGS} + CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_CFLAGS} \ + ${FBT_CFLAGS} ${DTRACE_CFLAGS} ${MAKE} -V SFILES_NOCDDL | \ - MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ASM_CFLAGS} + CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${ASM_CFLAGS} ${MAKE} -V SFILES_CDDL | \ - MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ZFS_ASM_CFLAGS} - rm -f .depend - mv .newdep .depend + CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_ASM_CFLAGS} + mv ${.TARGET}.tmp ${.TARGET} +.else + : > ${.TARGET} +.endif _ILINKS= machine .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" @@ -237,8 +256,8 @@ ${_ILINKS}: ln -s $$path ${.TARGET} # .depend needs include links so we remove them only together. -kernel-cleandepend: - rm -f .depend ${_ILINKS} +kernel-cleandepend: .PHONY + rm -f ${DEPENDFILES} ${_ILINKS} kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } Added: head/tools/build/options/WITH_FAST_DEPEND ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_FAST_DEPEND Fri Nov 6 04:45:29 2015 (r290433) @@ -0,0 +1,7 @@ +.\" $FreeBSD$ +Set to generate +.Sy .depend +files in the build during compilation instead of the +historial +.Xr mkdep 1 +call during the "make depend" phase. From owner-svn-src-head@freebsd.org Fri Nov 6 04:56:54 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C985A26414; Fri, 6 Nov 2015 04:56:54 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0228B1867; Fri, 6 Nov 2015 04:56:53 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA64uqRu066314; Fri, 6 Nov 2015 04:56:52 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA64uqj3066313; Fri, 6 Nov 2015 04:56:52 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201511060456.tA64uqj3066313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Nov 2015 04:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290434 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 04:56:54 -0000 Author: jhibbits Date: Fri Nov 6 04:56:52 2015 New Revision: 290434 URL: https://svnweb.freebsd.org/changeset/base/290434 Log: Write 2- and 4-byte aligned values as single writes in ddb(4) On the mpc85xx SoC family, writes to any part of a word in the CCSR affect the full word. This prevents single-byte writes from taking the desired effect. Code copied directly from ARM. Modified: head/sys/powerpc/powerpc/db_interface.c Modified: head/sys/powerpc/powerpc/db_interface.c ============================================================================== --- head/sys/powerpc/powerpc/db_interface.c Fri Nov 6 04:45:29 2015 (r290433) +++ head/sys/powerpc/powerpc/db_interface.c Fri Nov 6 04:56:52 2015 (r290434) @@ -67,8 +67,14 @@ db_write_bytes(vm_offset_t addr, size_t dst = (char *)addr; cnt = size; - while (cnt-- > 0) - *dst++ = *data++; + if (size == 4 && (addr & 3) == 0 && ((uintptr_t)data & 3) == 0) + *((int*)dst) = *((int*)data); + else + if (size == 2 && (addr & 1) == 0 && ((uintptr_t)data & 1) == 0) + *((short*)dst) = *((short*)data); + else + while (cnt-- > 0) + *dst++ = *data++; kdb_cpu_sync_icache((void *)addr, size); } (void)kdb_jmpbuf(prev_jb); From owner-svn-src-head@freebsd.org Fri Nov 6 04:59:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 209ABA26473; Fri, 6 Nov 2015 04:59:10 +0000 (UTC) (envelope-from trtrmitya@gmail.com) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com [IPv6:2a00:1450:4010:c04::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 977DE19D9; Fri, 6 Nov 2015 04:59:09 +0000 (UTC) (envelope-from trtrmitya@gmail.com) Received: by lbbkw15 with SMTP id kw15so44142818lbb.0; Thu, 05 Nov 2015 20:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=kNZaOXedk9+06WHPw1l8PH51IgmpBYQxIHsIvtkwhvs=; b=PwFCZWEq7KfB5o8N5U5Yxu5dBYt2Rduk1dLatWvC8PtIyzAtRGDGtfSPWOcdTXtAgH DvSwiTHDfOHkHXbWkA0Ue12xi6BD6ddnUFdrQM+6Tg7Fy65//75sVXlhMl5QlCrmQWNd P7Ty2L66BwpfKmYITonB5BGgHo57VOX7BNVrlTuGgEUrbT4hUjn5kjppwTcA0pb9GKMK AUoK8XKv+wmg9GfnutHAaZNyvPOpFWBwNHtS51mgFV2Y86ysEZRDAAsSsZrHORIFe3u5 AylEZOOUM8pkvkmB0O1EO60A913LzRV3lvY34l+6nNbhJw7mGnuLv1yVb5QnS7wsJK7c fSbA== X-Received: by 10.112.161.168 with SMTP id xt8mr5742758lbb.88.1446785947726; Thu, 05 Nov 2015 20:59:07 -0800 (PST) Received: from [10.0.1.3] (broadband-5-228-251-240.nationalcablenetworks.ru. [5.228.251.240]) by smtp.gmail.com with ESMTPSA id g39sm1028804lfi.27.2015.11.05.20.59.06 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Nov 2015 20:59:06 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options From: Dmitry Sivachenko In-Reply-To: <201511060445.tA64jUjj063307@repo.freebsd.org> Date: Fri, 6 Nov 2015 07:59:05 +0300 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <6E5C148B-50AE-4035-9A59-69EE4ED4538C@gmail.com> References: <201511060445.tA64jUjj063307@repo.freebsd.org> To: Bryan Drewery X-Mailer: Apple Mail (2.3096.5) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 04:59:10 -0000 > On 06 Nov 2015, at 07:45, Bryan Drewery wrote: >=20 > Author: bdrewery > Date: Fri Nov 6 04:45:29 2015 > New Revision: 290433 > URL: https://svnweb.freebsd.org/changeset/base/290433 >=20 > Log: > Add a FAST_DEPEND option, off by default, which speeds up the build = significantly. >=20 Well, if it just a speedup, what is the reason to introduce a new option = for that? From owner-svn-src-head@freebsd.org Fri Nov 6 05:00:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B498A264D7; Fri, 6 Nov 2015 05:00:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 77B141B55; Fri, 6 Nov 2015 05:00:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 708CC1E09; Fri, 6 Nov 2015 05:00:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 18111168FA; Fri, 6 Nov 2015 05:00:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id mhjRxPc-QTLR; Fri, 6 Nov 2015 05:00:17 +0000 (UTC) Subject: Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 35743168F2 To: Dmitry Sivachenko References: <201511060445.tA64jUjj063307@repo.freebsd.org> <6E5C148B-50AE-4035-9A59-69EE4ED4538C@gmail.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Organization: FreeBSD Message-ID: <563C33DE.3070106@FreeBSD.org> Date: Thu, 5 Nov 2015 21:00:14 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <6E5C148B-50AE-4035-9A59-69EE4ED4538C@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 05:00:20 -0000 On 11/5/15 8:59 PM, Dmitry Sivachenko wrote: > >> On 06 Nov 2015, at 07:45, Bryan Drewery wrote: >> >> Author: bdrewery >> Date: Fri Nov 6 04:45:29 2015 >> New Revision: 290433 >> URL: https://svnweb.freebsd.org/changeset/base/290433 >> >> Log: >> Add a FAST_DEPEND option, off by default, which speeds up the build significantly. >> > > > Well, if it just a speedup, what is the reason to introduce a new option for that? > "Enabling this by default, for src or out-of-src, can be done once more testing has been done, such as a ports exp-run, and with more compilers." -- Regards, Bryan Drewery From owner-svn-src-head@freebsd.org Fri Nov 6 05:28:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AD59A26968; Fri, 6 Nov 2015 05:28:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A843145B; Fri, 6 Nov 2015 05:28:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA65S92Q074773; Fri, 6 Nov 2015 05:28:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA65S9d5074772; Fri, 6 Nov 2015 05:28:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511060528.tA65S9d5074772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 6 Nov 2015 05:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290435 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 05:28:10 -0000 Author: bdrewery Date: Fri Nov 6 05:28:08 2015 New Revision: 290435 URL: https://svnweb.freebsd.org/changeset/base/290435 Log: Don't allow environment-set options to bleed into src.conf.5 generation. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Fri Nov 6 04:56:52 2015 (r290434) +++ head/tools/build/options/makeman Fri Nov 6 05:28:08 2015 (r290435) @@ -33,7 +33,7 @@ show_options() ALL_TARGETS=$(echo $(${make} targets | tail -n +2)) rm -f $t/settings for target in ${ALL_TARGETS} ; do - ${make} showconfig \ + env -i ${make} showconfig \ SRC_ENV_CONF=/dev/null SRCCONF=/dev/null \ __MAKE_CONF=/dev/null \ TARGET_ARCH=${target#*/} TARGET=${target%/*} | @@ -97,7 +97,7 @@ show() exit 1 ;; esac - ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \ + env -i ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \ SRCCONF=/dev/null | while read var _ val ; do opt=${var#MK_} From owner-svn-src-head@freebsd.org Fri Nov 6 05:32:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7A2CA26A74; Fri, 6 Nov 2015 05:32:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93CA718F7; Fri, 6 Nov 2015 05:32:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA65WIXY075548; Fri, 6 Nov 2015 05:32:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA65WIop075547; Fri, 6 Nov 2015 05:32:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511060532.tA65WIop075547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 6 Nov 2015 05:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290436 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 05:32:19 -0000 Author: bdrewery Date: Fri Nov 6 05:32:18 2015 New Revision: 290436 URL: https://svnweb.freebsd.org/changeset/base/290436 Log: Regenerate for WITH_FAST_DEPEND in r290433. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Nov 6 05:28:08 2015 (r290435) +++ head/share/man/man5/src.conf.5 Fri Nov 6 05:32:18 2015 (r290436) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 287942 2015-09-17 22:04:46Z bdrewery +.\" from FreeBSD: head/tools/build/options/makeman 290435 2015-11-06 05:28:08Z bdrewery .\" $FreeBSD$ -.Dd September 18, 2015 +.Dd November 5, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -484,6 +484,14 @@ arm64/aarch64. .\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to .Pa /usr/share/examples/ . +.It Va WITH_FAST_DEPEND +.\" from FreeBSD: head/tools/build/options/WITH_FAST_DEPEND 290433 2015-11-06 04:45:29Z bdrewery +Set to generate +.Sy .depend +files in the build during compilation instead of the +historial +.Xr mkdep 1 +call during the "make depend" phase. .It Va WITHOUT_FDT .\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru Set to not build Flattened Device Tree support as part of the base system. From owner-svn-src-head@freebsd.org Fri Nov 6 05:52:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFDC6A28A1E; Fri, 6 Nov 2015 05:52:14 +0000 (UTC) (envelope-from trtrmitya@gmail.com) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 569FF17DC; Fri, 6 Nov 2015 05:52:14 +0000 (UTC) (envelope-from trtrmitya@gmail.com) Received: by lbblt2 with SMTP id lt2so31570319lbb.3; Thu, 05 Nov 2015 21:52:12 -0800 (PST) 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=GSyk1EhpgD35VncAHo5yu7FB73hGRERVdiRs/0k15EA=; b=cLIgUfd2SywL0hUMM/AfFWJKQtkRCGNGz3l9ybInIaHG27bx/Rsf0P3bn15HWXTYTs sFNxbyEFVNSci7ZtKh1PAV1CvaDw9U0p/G57HYXl7Y9K2bN2lV+lgPHY4vwTFGHnGGAx csm3ySz+jfgdBPnkU5iLS4c9DPN4FTCPIQsvF0N6un23TuNdr7AOED3UydKuo03vhtdb 8ur3LCnK4123wMAfW2kOZW/g0sfAEz21YHn0LZP9hrxPiwIdbFvKlCXtuBtf/FmULLR+ uAfSUl6a/6FIlpQiGenLuJ0KKBbuLqJ8hsj+YfqF5TonykrZ5DSjykZ16ILIA0RJtxPs Vg3g== X-Received: by 10.112.119.133 with SMTP id ku5mr5766637lbb.1.1446789131974; Thu, 05 Nov 2015 21:52:11 -0800 (PST) Received: from [10.70.178.34] ([213.87.128.26]) by smtp.gmail.com with ESMTPSA id bn6sm1467890lbc.10.2015.11.05.21.52.10 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Nov 2015 21:52:10 -0800 (PST) References: <201511060445.tA64jUjj063307@repo.freebsd.org> <6E5C148B-50AE-4035-9A59-69EE4ED4538C@gmail.com> <563C33DE.3070106@FreeBSD.org> Mime-Version: 1.0 (1.0) In-Reply-To: <563C33DE.3070106@FreeBSD.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable Message-Id: Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Mailer: iPhone Mail (13B143) From: Dmitry Sivachenko Subject: Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options Date: Fri, 6 Nov 2015 08:52:06 +0300 To: Bryan Drewery X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 05:52:14 -0000 > 6 =CE=CF=D1=C2. 2015 =C7., =D7 8:00, Bryan Drewery =CE= =C1=D0=C9=D3=C1=CC(=C1): >=20 >> On 11/5/15 8:59 PM, Dmitry Sivachenko wrote: >>=20 >>> On 06 Nov 2015, at 07:45, Bryan Drewery wrote: >>>=20 >>> Author: bdrewery >>> Date: Fri Nov 6 04:45:29 2015 >>> New Revision: 290433 >>> URL: https://svnweb.freebsd.org/changeset/base/290433 >>>=20 >>> Log: >>> Add a FAST_DEPEND option, off by default, which speeds up the build sign= ificantly. >>=20 >>=20 >> Well, if it just a speedup, what is the reason to introduce a new option f= or that? >=20 > "Enabling this by default, for src or out-of-src, can be done once more > testing has been done, such as a ports exp-run, and with more compilers." Well, this is what -current is for. Just let it settle longer before MFC. From owner-svn-src-head@freebsd.org Fri Nov 6 05:36:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A5E8A27C2A; Fri, 6 Nov 2015 05:36:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::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 0AF421059; Fri, 6 Nov 2015 05:36:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pasz6 with SMTP id z6so115222709pas.2; Thu, 05 Nov 2015 21:36:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Pp2piS1kF6BZsHIj3LhYnzbIcFk+rns2kxXa4pcxSrg=; b=TpGGoHL4JGwX8K1Gstidg/c//uYBV6tyEH1Ny9d5T7RXt7ca8oxpFJpQuygyLuvxJV y9unNpZ7reAMs61odYpq1epHDTCFaRkYGXwaq8sPIuW4+6QUQpHc0O1itO4dewev50VG FSN+WYftzD8/rq5ZJayvgOvRE4nWKAasxa3LZaihXApYbfAQIxLTynvOXwK2TPERMtIs iXduW8a3sXFf46IzRS3Q5oTL9bm8VmN1elREDUIURg9FYCosFqwufKAL5GcRb66dg9ak Nv2PdEZlklLGxJglusjtAnvX77TsChtOvc2XLcyuuK3eMM/XnrFqvfA79dkLZHGMdW6C cG7Q== X-Received: by 10.67.5.2 with SMTP id ci2mr3485966pad.47.1446788173323; Thu, 05 Nov 2015 21:36:13 -0800 (PST) Received: from [100.213.87.41] ([172.56.17.183]) by smtp.gmail.com with ESMTPSA id si10sm11255096pab.15.2015.11.05.21.36.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Nov 2015 21:36:12 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r290435 - head/tools/build/options From: Garrett Cooper X-Mailer: iPhone Mail (13B143) In-Reply-To: <201511060528.tA65S9d5074772@repo.freebsd.org> Date: Thu, 5 Nov 2015 21:36:11 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201511060528.tA65S9d5074772@repo.freebsd.org> To: Bryan Drewery X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 05:36:14 -0000 Thank you > On Nov 5, 2015, at 21:28, Bryan Drewery wrote: >=20 > Author: bdrewery > Date: Fri Nov 6 05:28:08 2015 > New Revision: 290435 > URL: https://svnweb.freebsd.org/changeset/base/290435 >=20 > Log: > Don't allow environment-set options to bleed into src.conf.5 generation. >=20 > MFC after: 2 weeks > Sponsored by: EMC / Isilon Storage Division >=20 > Modified: > head/tools/build/options/makeman >=20 > Modified: head/tools/build/options/makeman > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=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/tools/build/options/makeman Fri Nov 6 04:56:52 2015 (r2904= 34) > +++ head/tools/build/options/makeman Fri Nov 6 05:28:08 2015 (r2904= 35) > @@ -33,7 +33,7 @@ show_options() > ALL_TARGETS=3D$(echo $(${make} targets | tail -n +2)) > rm -f $t/settings > for target in ${ALL_TARGETS} ; do > - ${make} showconfig \ > + env -i ${make} showconfig \ > SRC_ENV_CONF=3D/dev/null SRCCONF=3D/dev/null \ > __MAKE_CONF=3D/dev/null \ > TARGET_ARCH=3D${target#*/} TARGET=3D${target%/*} | > @@ -97,7 +97,7 @@ show() > exit 1 > ;; > esac > - ${make} .MAKE.MODE=3Dnormal "$@" showconfig __MAKE_CONF=3D/dev/null \= > + env -i ${make} .MAKE.MODE=3Dnormal "$@" showconfig __MAKE_CONF=3D/dev= /null \ > SRCCONF=3D/dev/null | > while read var _ val ; do > opt=3D${var#MK_} >=20 From owner-svn-src-head@freebsd.org Fri Nov 6 08:43:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D74DA2748B; Fri, 6 Nov 2015 08:43:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68BC918AF; Fri, 6 Nov 2015 08:43:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA68hCvM032307; Fri, 6 Nov 2015 08:43:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA68hCov032306; Fri, 6 Nov 2015 08:43:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511060843.tA68hCov032306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 6 Nov 2015 08:43:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290437 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 08:43:13 -0000 Author: ngie Date: Fri Nov 6 08:43:12 2015 New Revision: 290437 URL: https://svnweb.freebsd.org/changeset/base/290437 Log: Fix compiling netstat after r290367 by substituting sys/types.h for sys/param.h, as sys/param.h defines the MAX(..) macro Reported by: O. Hartmann Pointyhat to: ume Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Fri Nov 6 05:32:18 2015 (r290436) +++ head/usr.bin/netstat/if.c Fri Nov 6 08:43:12 2015 (r290437) @@ -37,7 +37,7 @@ static char sccsid[] = "@(#)if.c 8.3 (Be #include __FBSDID("$FreeBSD$"); -#include +#include #include #include #include From owner-svn-src-head@freebsd.org Fri Nov 6 10:25:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1650EA2752B; Fri, 6 Nov 2015 10:25:43 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pa0-x234.google.com (mail-pa0-x234.google.com [IPv6:2607:f8b0:400e:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D83B2138C; Fri, 6 Nov 2015 10:25:42 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by pabfh17 with SMTP id fh17so119152584pab.0; Fri, 06 Nov 2015 02:25:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:references:to:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=RiFgqpHY1JdMuTXfYUwGRvMAXlLl10BsVz4hw8S9Z6g=; b=xdMhHJZVNx/s+FgQ4M84neQZud06wR/A79vj2xJXrz/ojIbhjL/t0HK/IaVibzEa4p mJs8tMarQ6qn0YLRJe6tU4iTNm1WCwra7V44FwqFPhWOX+Qjbf+qiHImb5w+/Kfu4qCb Qdz94avGNsUUCpI7Q76s2h08JrAO1dL2ifaXu72ynHdM/hm8QPjM3BlgmIbUC9IcIWQM Tb0ooXZ0LsFws8rLwnGv3qqkelNwiHXYnR9XBU0uloXoAsz/cvnKFaUSPQpjydFJLjDA epX7aHjAjFDHseLoWEd341jr0wIHFWZjDfFpQngfojrUv+f2hj0YaCXcftH+NW1reLXo wT9g== X-Received: by 10.68.249.33 with SMTP id yr1mr16995194pbc.94.1446805542467; Fri, 06 Nov 2015 02:25:42 -0800 (PST) Received: from ?IPv6:2001:44b8:31ae:7b01:24b2:4122:9f12:3ce6? (2001-44b8-31ae-7b01-24b2-4122-9f12-3ce6.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01:24b2:4122:9f12:3ce6]) by smtp.gmail.com with ESMTPSA id hq1sm13179271pbb.43.2015.11.06.02.25.38 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 06 Nov 2015 02:25:42 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options References: <201511060445.tA64jUjj063307@repo.freebsd.org> <6E5C148B-50AE-4035-9A59-69EE4ED4538C@gmail.com> <563C33DE.3070106@FreeBSD.org> To: Dmitry Sivachenko , Bryan Drewery Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: Kubilay Kocak Message-ID: <563C8018.7000701@FreeBSD.org> Date: Fri, 6 Nov 2015 21:25:28 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Thunderbird/42.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 10:25:43 -0000 On 6/11/2015 4:52 PM, Dmitry Sivachenko wrote: > > >> 6 ミスミセム紹ア. 2015 ミウ., ミイ 8:00, Bryan Drewery ミスミーミソミクムミーミサ(ミー): >> >>> On 11/5/15 8:59 PM, Dmitry Sivachenko wrote: >>> >>>> On 06 Nov 2015, at 07:45, Bryan Drewery wrote: >>>> >>>> Author: bdrewery >>>> Date: Fri Nov 6 04:45:29 2015 >>>> New Revision: 290433 >>>> URL: https://svnweb.freebsd.org/changeset/base/290433 >>>> >>>> Log: >>>> Add a FAST_DEPEND option, off by default, which speeds up the build significantly. >>> >>> >>> Well, if it just a speedup, what is the reason to introduce a new option for that? >> >> "Enabling this by default, for src or out-of-src, can be done once more >> testing has been done, such as a ports exp-run, and with more compilers." > > > Well, this is what -current is for. Just let it settle longer before MFC. > Having an option in the first instance is also quite considerate, as it ensures that this work doesn't block/frustrate people dogfooding CURRENT if it ends up having issues that can't quickly be fixed without a revert. From owner-svn-src-head@freebsd.org Fri Nov 6 11:17:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CC1FA27288; Fri, 6 Nov 2015 11:17:25 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 191B51E8F; Fri, 6 Nov 2015 11:17:25 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6BHOEO078168; Fri, 6 Nov 2015 11:17:24 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6BHOvP078167; Fri, 6 Nov 2015 11:17:24 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201511061117.tA6BHOvP078167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 6 Nov 2015 11:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290438 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 11:17:25 -0000 Author: avos Date: Fri Nov 6 11:17:23 2015 New Revision: 290438 URL: https://svnweb.freebsd.org/changeset/base/290438 Log: ifconfig: fix padding for ' scan' command output (S:N and beacon interval fields). Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4085 Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Fri Nov 6 08:43:12 2015 (r290437) +++ head/sbin/ifconfig/ifieee80211.c Fri Nov 6 11:17:23 2015 (r290438) @@ -3185,7 +3185,7 @@ list_scan(int s) getchaninfo(s); ssidmax = verbose ? IEEE80211_NWID_LEN - 1 : 14; - printf("%-*.*s %-17.17s %4s %4s %-7s %3s %4s\n" + printf("%-*.*s %-17.17s %4s %4s %-7s %3s %4s\n" , ssidmax, ssidmax, "SSID/MESH ID" , "BSSID" , "CHAN" @@ -3208,7 +3208,7 @@ list_scan(int s) idp = vp; idlen = sr->isr_ssid_len; } - printf("%-*.*s %s %3d %3dM %3d:%-3d %3d %-4.4s" + printf("%-*.*s %s %3d %3dM %4d:%-4d %4d %-4.4s" , ssidmax , copy_essid(ssid, ssidmax, idp, idlen) , ssid From owner-svn-src-head@freebsd.org Fri Nov 6 11:29:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5ABEA2763D; Fri, 6 Nov 2015 11:29:25 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A13401867; Fri, 6 Nov 2015 11:29:25 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6BTO7f081088; Fri, 6 Nov 2015 11:29:24 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6BTOiB081087; Fri, 6 Nov 2015 11:29:24 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201511061129.tA6BTOiB081087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 6 Nov 2015 11:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290439 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 11:29:25 -0000 Author: avos Date: Fri Nov 6 11:29:24 2015 New Revision: 290439 URL: https://svnweb.freebsd.org/changeset/base/290439 Log: urtwn(4): simplify urtwn_tsf_sync_enable(). - Drop TSF initialization; device can discover it without our help. - Do not touch R92C_BCN_CTRL_EN_BCN bit in STA mode. - Add 'static' keyword for function definition. Tested with RTL8188EU, STA mode. Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3801 Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Fri Nov 6 11:17:23 2015 (r290438) +++ head/sys/dev/usb/wlan/if_urtwn.c Fri Nov 6 11:29:24 2015 (r290439) @@ -1473,32 +1473,11 @@ urtwn_ra_init(struct urtwn_softc *sc) return (0); } -void +static void urtwn_tsf_sync_enable(struct urtwn_softc *sc) { - struct ieee80211com *ic = &sc->sc_ic; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct ieee80211_node *ni = vap->iv_bss; - - uint64_t tsf; - - /* Enable TSF synchronization. */ urtwn_write_1(sc, R92C_BCN_CTRL, urtwn_read_1(sc, R92C_BCN_CTRL) & ~R92C_BCN_CTRL_DIS_TSF_UDT0); - - urtwn_write_1(sc, R92C_BCN_CTRL, - urtwn_read_1(sc, R92C_BCN_CTRL) & ~R92C_BCN_CTRL_EN_BCN); - - /* Set initial TSF. */ - memcpy(&tsf, ni->ni_tstamp.data, 8); - tsf = le64toh(tsf); - tsf = tsf - (tsf % (vap->iv_bss->ni_intval * IEEE80211_DUR_TU)); - tsf -= IEEE80211_DUR_TU; - urtwn_write_4(sc, R92C_TSFTR + 0, tsf); - urtwn_write_4(sc, R92C_TSFTR + 4, tsf >> 32); - - urtwn_write_1(sc, R92C_BCN_CTRL, - urtwn_read_1(sc, R92C_BCN_CTRL) | R92C_BCN_CTRL_EN_BCN); } static void From owner-svn-src-head@freebsd.org Fri Nov 6 12:02:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FBB2A27456; Fri, 6 Nov 2015 12:02:25 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BC981EE5; Fri, 6 Nov 2015 12:02:25 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6C2OHQ092982; Fri, 6 Nov 2015 12:02:24 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6C2OsM092981; Fri, 6 Nov 2015 12:02:24 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511061202.tA6C2OsM092981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 6 Nov 2015 12:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290440 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 12:02:25 -0000 Author: smh Date: Fri Nov 6 12:02:24 2015 New Revision: 290440 URL: https://svnweb.freebsd.org/changeset/base/290440 Log: Correct posix_openpt reference in pty(3) MFC after: 1 week Sponsored by: Multiplay Modified: head/lib/libutil/pty.3 Modified: head/lib/libutil/pty.3 ============================================================================== --- head/lib/libutil/pty.3 Fri Nov 6 11:29:24 2015 (r290439) +++ head/lib/libutil/pty.3 Fri Nov 6 12:02:24 2015 (r290440) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" " -.Dd December 29, 1996 +.Dd November 11, 2015 .Dt PTY 3 .Os .Sh NAME @@ -120,7 +120,7 @@ function may fail and set the global var .Dv errno for any of the errors specified for the .Xr grantpt 3 , -.Xr posix_openpt 3 , +.Xr posix_openpt 2 , .Xr ptsname 3 , and .Xr unlockpt 3 From owner-svn-src-head@freebsd.org Fri Nov 6 12:54:29 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35F25A264F4; Fri, 6 Nov 2015 12:54:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE1441E04; Fri, 6 Nov 2015 12:54:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6CsRE8007973; Fri, 6 Nov 2015 12:54:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6CsR3q007971; Fri, 6 Nov 2015 12:54:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511061254.tA6CsR3q007971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Nov 2015 12:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290441 - head/sys/dev/usb/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 12:54:29 -0000 Author: hselasky Date: Fri Nov 6 12:54:27 2015 New Revision: 290441 URL: https://svnweb.freebsd.org/changeset/base/290441 Log: Fix for unaligned IP-header. The mbuf length fields must be set before m_adj() is called else m_adj() will not always adjust the mbuf and an unaligned read exception can trigger inside the network stack. This can happen on platforms where unaligned reads are not supported. Adjust a length check to include the 2-byte ethernet alignment while at it. MFC after: 3 days Modified: head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/net/if_urndis.c Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Fri Nov 6 12:02:24 2015 (r290440) +++ head/sys/dev/usb/net/if_cdce.c Fri Nov 6 12:54:27 2015 (r290441) @@ -1535,6 +1535,7 @@ cdce_ncm_bulk_read_callback(struct usb_x /* check if we have a buffer */ if (m) { + m->m_len = m->m_pkthdr.len = temp + ETHER_ALIGN; m_adj(m, ETHER_ALIGN); usbd_copy_out(pc, offset, m->m_data, temp); Modified: head/sys/dev/usb/net/if_urndis.c ============================================================================== --- head/sys/dev/usb/net/if_urndis.c Fri Nov 6 12:02:24 2015 (r290440) +++ head/sys/dev/usb/net/if_urndis.c Fri Nov 6 12:54:27 2015 (r290441) @@ -884,7 +884,7 @@ urndis_bulk_read_callback(struct usb_xfe DPRINTF("invalid ethernet size " "%u < %u\n", msg.rm_datalen, (unsigned)sizeof(struct ether_header)); goto tr_setup; - } else if (msg.rm_datalen > (uint32_t)MCLBYTES) { + } else if (msg.rm_datalen > (uint32_t)(MCLBYTES - ETHER_ALIGN)) { if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); DPRINTF("invalid ethernet size " "%u > %u\n", @@ -898,6 +898,7 @@ urndis_bulk_read_callback(struct usb_xfe /* check if we have a buffer */ if (m != NULL) { + m->m_len = m->m_pkthdr.len = msg.rm_datalen + ETHER_ALIGN; m_adj(m, ETHER_ALIGN); usbd_copy_out(pc, offset + msg.rm_dataoffset + From owner-svn-src-head@freebsd.org Fri Nov 6 13:08:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2742A2676D; Fri, 6 Nov 2015 13:08:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D0D91525; Fri, 6 Nov 2015 13:08:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6D8G0G011367; Fri, 6 Nov 2015 13:08:16 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6D8Gvx011364; Fri, 6 Nov 2015 13:08:16 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201511061308.tA6D8Gvx011364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 6 Nov 2015 13:08:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290442 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 13:08:17 -0000 Author: tuexen Date: Fri Nov 6 13:08:16 2015 New Revision: 290442 URL: https://svnweb.freebsd.org/changeset/base/290442 Log: Fix typos in field names of struct sctp_extrcvinfo. Provide defines to allow applications to compile. Thanks to Jens Hoelscher for making me aware of the typos. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_uio.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Fri Nov 6 12:54:27 2015 (r290441) +++ head/sys/netinet/sctp_indata.c Fri Nov 6 13:08:16 2015 (r290442) @@ -223,7 +223,7 @@ sctp_build_ctl_nchunk(struct sctp_inpcb } seinfo = (struct sctp_extrcvinfo *)sinfo; if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVNXTINFO) && - (seinfo->sreinfo_next_flags & SCTP_NEXT_MSG_AVAIL)) { + (seinfo->serinfo_next_flags & SCTP_NEXT_MSG_AVAIL)) { provide_nxt = 1; len += CMSG_SPACE(sizeof(struct sctp_rcvinfo)); } else { @@ -276,20 +276,20 @@ sctp_build_ctl_nchunk(struct sctp_inpcb cmh->cmsg_len = CMSG_LEN(sizeof(struct sctp_nxtinfo)); cmh->cmsg_type = SCTP_NXTINFO; nxtinfo = (struct sctp_nxtinfo *)CMSG_DATA(cmh); - nxtinfo->nxt_sid = seinfo->sreinfo_next_stream; + nxtinfo->nxt_sid = seinfo->serinfo_next_stream; nxtinfo->nxt_flags = 0; - if (seinfo->sreinfo_next_flags & SCTP_NEXT_MSG_IS_UNORDERED) { + if (seinfo->serinfo_next_flags & SCTP_NEXT_MSG_IS_UNORDERED) { nxtinfo->nxt_flags |= SCTP_UNORDERED; } - if (seinfo->sreinfo_next_flags & SCTP_NEXT_MSG_IS_NOTIFICATION) { + if (seinfo->serinfo_next_flags & SCTP_NEXT_MSG_IS_NOTIFICATION) { nxtinfo->nxt_flags |= SCTP_NOTIFICATION; } - if (seinfo->sreinfo_next_flags & SCTP_NEXT_MSG_ISCOMPLETE) { + if (seinfo->serinfo_next_flags & SCTP_NEXT_MSG_ISCOMPLETE) { nxtinfo->nxt_flags |= SCTP_COMPLETE; } - nxtinfo->nxt_ppid = seinfo->sreinfo_next_ppid; - nxtinfo->nxt_length = seinfo->sreinfo_next_length; - nxtinfo->nxt_assoc_id = seinfo->sreinfo_next_aid; + nxtinfo->nxt_ppid = seinfo->serinfo_next_ppid; + nxtinfo->nxt_length = seinfo->serinfo_next_length; + nxtinfo->nxt_assoc_id = seinfo->serinfo_next_aid; cmh = (struct cmsghdr *)((caddr_t)cmh + CMSG_SPACE(sizeof(struct sctp_nxtinfo))); SCTP_BUF_LEN(ret) += CMSG_SPACE(sizeof(struct sctp_nxtinfo)); } Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Fri Nov 6 12:54:27 2015 (r290441) +++ head/sys/netinet/sctp_uio.h Fri Nov 6 13:08:16 2015 (r290442) @@ -138,16 +138,22 @@ struct sctp_extrcvinfo { uint32_t sinfo_tsn; uint32_t sinfo_cumtsn; sctp_assoc_t sinfo_assoc_id; - uint16_t sreinfo_next_flags; - uint16_t sreinfo_next_stream; - uint32_t sreinfo_next_aid; - uint32_t sreinfo_next_length; - uint32_t sreinfo_next_ppid; + uint16_t serinfo_next_flags; + uint16_t serinfo_next_stream; + uint32_t serinfo_next_aid; + uint32_t serinfo_next_length; + uint32_t serinfo_next_ppid; uint16_t sinfo_keynumber; uint16_t sinfo_keynumber_valid; uint8_t __reserve_pad[SCTP_ALIGN_RESV_PAD_SHORT]; }; +#define sreinfo_next_flags serinfo_next_flags +#define sreinfo_next_stream serinfo_next_stream +#define sreinfo_next_aid serinfo_next_aid +#define sreinfo_next_length serinfo_next_length +#define sreinfo_next_ppid serinfo_next_ppid + struct sctp_sndinfo { uint16_t snd_sid; uint16_t snd_flags; Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Fri Nov 6 12:54:27 2015 (r290441) +++ head/sys/netinet/sctputil.c Fri Nov 6 13:08:16 2015 (r290442) @@ -5654,20 +5654,20 @@ found_one: s_extra = (struct sctp_extrcvinfo *)sinfo; if ((nxt) && (nxt->length)) { - s_extra->sreinfo_next_flags = SCTP_NEXT_MSG_AVAIL; + s_extra->serinfo_next_flags = SCTP_NEXT_MSG_AVAIL; if (nxt->sinfo_flags & SCTP_UNORDERED) { - s_extra->sreinfo_next_flags |= SCTP_NEXT_MSG_IS_UNORDERED; + s_extra->serinfo_next_flags |= SCTP_NEXT_MSG_IS_UNORDERED; } if (nxt->spec_flags & M_NOTIFICATION) { - s_extra->sreinfo_next_flags |= SCTP_NEXT_MSG_IS_NOTIFICATION; + s_extra->serinfo_next_flags |= SCTP_NEXT_MSG_IS_NOTIFICATION; } - s_extra->sreinfo_next_aid = nxt->sinfo_assoc_id; - s_extra->sreinfo_next_length = nxt->length; - s_extra->sreinfo_next_ppid = nxt->sinfo_ppid; - s_extra->sreinfo_next_stream = nxt->sinfo_stream; + s_extra->serinfo_next_aid = nxt->sinfo_assoc_id; + s_extra->serinfo_next_length = nxt->length; + s_extra->serinfo_next_ppid = nxt->sinfo_ppid; + s_extra->serinfo_next_stream = nxt->sinfo_stream; if (nxt->tail_mbuf != NULL) { if (nxt->end_added) { - s_extra->sreinfo_next_flags |= SCTP_NEXT_MSG_ISCOMPLETE; + s_extra->serinfo_next_flags |= SCTP_NEXT_MSG_ISCOMPLETE; } } } else { @@ -5678,11 +5678,11 @@ found_one: * :-D */ nxt = NULL; - s_extra->sreinfo_next_flags = SCTP_NO_NEXT_MSG; - s_extra->sreinfo_next_aid = 0; - s_extra->sreinfo_next_length = 0; - s_extra->sreinfo_next_ppid = 0; - s_extra->sreinfo_next_stream = 0; + s_extra->serinfo_next_flags = SCTP_NO_NEXT_MSG; + s_extra->serinfo_next_aid = 0; + s_extra->serinfo_next_length = 0; + s_extra->serinfo_next_ppid = 0; + s_extra->serinfo_next_stream = 0; } } /* @@ -6165,7 +6165,7 @@ out: struct sctp_extrcvinfo *s_extra; s_extra = (struct sctp_extrcvinfo *)sinfo; - s_extra->sreinfo_next_flags = SCTP_NO_NEXT_MSG; + s_extra->serinfo_next_flags = SCTP_NO_NEXT_MSG; } if (hold_rlock == 1) { SCTP_INP_READ_UNLOCK(inp); From owner-svn-src-head@freebsd.org Fri Nov 6 14:00:27 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57E2FA283B4; Fri, 6 Nov 2015 14:00:27 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2373D1EF4; Fri, 6 Nov 2015 14:00:27 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6E0QjP025735; Fri, 6 Nov 2015 14:00:26 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6E0Q4K025734; Fri, 6 Nov 2015 14:00:26 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201511061400.tA6E0Q4K025734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 6 Nov 2015 14:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290444 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 14:00:27 -0000 Author: tuexen Date: Fri Nov 6 14:00:26 2015 New Revision: 290444 URL: https://svnweb.freebsd.org/changeset/base/290444 Log: The field sinfo_timetolive should have been sinfo_pr_value. Thanks to Jens Hoelscher for making me aware of the bug. MFC after: 1 week Modified: head/sys/netinet/sctp_uio.h Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Fri Nov 6 13:34:55 2015 (r290443) +++ head/sys/netinet/sctp_uio.h Fri Nov 6 14:00:26 2015 (r290444) @@ -134,7 +134,7 @@ struct sctp_extrcvinfo { uint16_t sinfo_flags; uint32_t sinfo_ppid; uint32_t sinfo_context; - uint32_t sinfo_timetolive; + uint32_t sinfo_timetolive; /* should have been sinfo_pr_value */ uint32_t sinfo_tsn; uint32_t sinfo_cumtsn; sctp_assoc_t sinfo_assoc_id; @@ -148,6 +148,7 @@ struct sctp_extrcvinfo { uint8_t __reserve_pad[SCTP_ALIGN_RESV_PAD_SHORT]; }; +#define sinfo_pr_value sinfo_timetolive #define sreinfo_next_flags serinfo_next_flags #define sreinfo_next_stream serinfo_next_stream #define sreinfo_next_aid serinfo_next_aid From owner-svn-src-head@freebsd.org Fri Nov 6 14:29:26 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3246A287EB; Fri, 6 Nov 2015 14:29:26 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FB411C95; Fri, 6 Nov 2015 14:29:26 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6ETP7v034161; Fri, 6 Nov 2015 14:29:25 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6ETPQb034160; Fri, 6 Nov 2015 14:29:25 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511061429.tA6ETPQb034160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Fri, 6 Nov 2015 14:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290445 - head/contrib/libxo/libxo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 14:29:26 -0000 Author: ume Date: Fri Nov 6 14:29:25 2015 New Revision: 290445 URL: https://svnweb.freebsd.org/changeset/base/290445 Log: The field modifier for trimming whitespace is not `q' but `t'. Modified: head/contrib/libxo/libxo/xo_format.5 Modified: head/contrib/libxo/libxo/xo_format.5 ============================================================================== --- head/contrib/libxo/libxo/xo_format.5 Fri Nov 6 14:00:26 2015 (r290444) +++ head/contrib/libxo/libxo/xo_format.5 Fri Nov 6 14:29:25 2015 (r290445) @@ -7,7 +7,7 @@ .\" # LICENSE. .\" # Phil Shafer, July 2014 .\" -.Dd December 4, 2014 +.Dd November 6, 2015 .Dt LIBXO 3 .Os .Sh NAME @@ -367,7 +367,7 @@ particular output styles: .It l "leaf-list " "Field is a leaf-list, a list of leaf values" .It n "no-quotes " "Do not quote the field when using JSON style" .It q "quotes " "Quote the field when using JSON style" -.It q "trim " "Trim leading and trailing whitespace" +.It t "trim " "Trim leading and trailing whitespace" .It w "white space " "A blank ("" "") is appended after the label" .El .Pp From owner-svn-src-head@freebsd.org Fri Nov 6 14:35:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C869FA289C4; Fri, 6 Nov 2015 14:35:23 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9664211AB; Fri, 6 Nov 2015 14:35:23 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6EZMDj037077; Fri, 6 Nov 2015 14:35:22 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6EZMTb037076; Fri, 6 Nov 2015 14:35:22 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511061435.tA6EZMTb037076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Fri, 6 Nov 2015 14:35:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290446 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 14:35:23 -0000 Author: ume Date: Fri Nov 6 14:35:22 2015 New Revision: 290446 URL: https://svnweb.freebsd.org/changeset/base/290446 Log: - Fix alignment for padding link address. - Trim whitespace of link address. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Fri Nov 6 14:29:25 2015 (r290445) +++ head/usr.bin/netstat/if.c Fri Nov 6 14:35:22 2015 (r290446) @@ -403,9 +403,9 @@ intpr(void (*pfunc)(char *), int af) if (sdl->sdl_nlen == 0 && sdl->sdl_alen == 0 && sdl->sdl_slen == 0) - xo_emit("{P: }"); + xo_emit("{P:/%*s} ", addr_len, ""); else - xo_emit("{:address/%-*.*s} ", addr_len, + xo_emit("{t:address/%-*.*s} ", addr_len, addr_len, routename(ifa->ifa_addr, 1)); link = true; break; From owner-svn-src-head@freebsd.org Fri Nov 6 14:36:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28358A28A04; Fri, 6 Nov 2015 14:36:23 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E72DF131A; Fri, 6 Nov 2015 14:36:22 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6EaMPN037152; Fri, 6 Nov 2015 14:36:22 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6EaM4L037151; Fri, 6 Nov 2015 14:36:22 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201511061436.tA6EaM4L037151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 6 Nov 2015 14:36:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290447 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 14:36:23 -0000 Author: andrew Date: Fri Nov 6 14:36:21 2015 New Revision: 290447 URL: https://svnweb.freebsd.org/changeset/base/290447 Log: Mark the arm64 nexus devices to be attached early. This allows multipass to work correctly. Without it the pass quickly moves to the final pass before the nexus device attaches. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/nexus.c Modified: head/sys/arm64/arm64/nexus.c ============================================================================== --- head/sys/arm64/arm64/nexus.c Fri Nov 6 14:35:22 2015 (r290446) +++ head/sys/arm64/arm64/nexus.c Fri Nov 6 14:36:21 2015 (r290447) @@ -134,13 +134,11 @@ static device_method_t nexus_methods[] = { 0, 0 } }; -static devclass_t nexus_devclass; static driver_t nexus_driver = { "nexus", nexus_methods, 1 /* no softc */ }; -DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); static int nexus_attach(device_t dev) @@ -380,7 +378,8 @@ DEFINE_CLASS_1(nexus, nexus_fdt_driver, #undef nexus_baseclasses static devclass_t nexus_fdt_devclass; -DRIVER_MODULE(nexus_fdt, root, nexus_fdt_driver, nexus_fdt_devclass, 0, 0); +EARLY_DRIVER_MODULE(nexus_fdt, root, nexus_fdt_driver, nexus_fdt_devclass, + 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_FIRST); static int nexus_fdt_probe(device_t dev) @@ -433,7 +432,8 @@ DEFINE_CLASS_1(nexus, nexus_acpi_driver, #undef nexus_baseclasses static devclass_t nexus_acpi_devclass; -DRIVER_MODULE(nexus_acpi, root, nexus_acpi_driver, nexus_acpi_devclass, 0, 0); +EARLY_DRIVER_MODULE(nexus_acpi, root, nexus_acpi_driver, nexus_acpi_devclass, + 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_FIRST); static int nexus_acpi_probe(device_t dev) From owner-svn-src-head@freebsd.org Fri Nov 6 14:40:52 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EF43A28ABA; Fri, 6 Nov 2015 14:40:52 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44D5615BA; Fri, 6 Nov 2015 14:40:52 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6EepaF037343; Fri, 6 Nov 2015 14:40:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6EepHs037342; Fri, 6 Nov 2015 14:40:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201511061440.tA6EepHs037342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 6 Nov 2015 14:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290448 - head/sys/dev/vnic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 14:40:52 -0000 Author: andrew Date: Fri Nov 6 14:40:51 2015 New Revision: 290448 URL: https://svnweb.freebsd.org/changeset/base/290448 Log: Mark the thunder_mdio_fdt driver as early, the bgx needs it to exist so it can find the network phy. Sponsored by: ABT Systems Ltd Modified: head/sys/dev/vnic/thunder_mdio_fdt.c Modified: head/sys/dev/vnic/thunder_mdio_fdt.c ============================================================================== --- head/sys/dev/vnic/thunder_mdio_fdt.c Fri Nov 6 14:36:21 2015 (r290447) +++ head/sys/dev/vnic/thunder_mdio_fdt.c Fri Nov 6 14:40:51 2015 (r290448) @@ -58,8 +58,8 @@ DEFINE_CLASS_1(thunder_mdio, thunder_mdi static devclass_t thunder_mdio_fdt_devclass; -DRIVER_MODULE(thunder_mdio, ofwbus, thunder_mdio_fdt_driver, - thunder_mdio_fdt_devclass, 0, 0); +EARLY_DRIVER_MODULE(thunder_mdio, ofwbus, thunder_mdio_fdt_driver, + thunder_mdio_fdt_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); static int thunder_mdio_fdt_probe(device_t dev) From owner-svn-src-head@freebsd.org Fri Nov 6 14:50:24 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A532A28C51; Fri, 6 Nov 2015 14:50:24 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5031A1B07; Fri, 6 Nov 2015 14:50:24 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6EoNsG040123; Fri, 6 Nov 2015 14:50:23 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6EoNmG040122; Fri, 6 Nov 2015 14:50:23 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511061450.tA6EoNmG040122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Fri, 6 Nov 2015 14:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290449 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 14:50:24 -0000 Author: ume Date: Fri Nov 6 14:50:23 2015 New Revision: 290449 URL: https://svnweb.freebsd.org/changeset/base/290449 Log: Do not truncate addresses when printing in encoded format. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Fri Nov 6 14:40:51 2015 (r290448) +++ head/usr.bin/netstat/if.c Fri Nov 6 14:50:23 2015 (r290449) @@ -324,6 +324,7 @@ intpr(void (*pfunc)(char *), int af) for (ifa = ifap; ifa; ifa = ifa->ifa_next) { bool network = false, link = false; char *name, *xname, buf[IFNAMSIZ+1]; + const char *nn, *rn; if (interface != NULL && strcmp(ifa->ifa_name, interface) != 0) continue; @@ -375,18 +376,18 @@ intpr(void (*pfunc)(char *), int af) #ifdef INET6 case AF_INET6: #endif /* INET6 */ + nn = netname(ifa->ifa_addr, ifa->ifa_netmask); + rn = routename(ifa->ifa_addr, numeric_addr); if (Wflag) { - xo_emit("{t:network/%-*s} ", net_len, - netname(ifa->ifa_addr, ifa->ifa_netmask)); - xo_emit("{t:address/%-*s} ", addr_len, - routename(ifa->ifa_addr, numeric_addr)); + xo_emit("{et:network/%s}{d:/%-*s} ", + nn, net_len, nn); + xo_emit("{et:address/%s}{d:/%-*s} ", + rn, addr_len, rn); } else { - xo_emit("{t:network/%-*.*s} ", - net_len, net_len, - netname(ifa->ifa_addr, ifa->ifa_netmask)); - xo_emit("{t:address/%-*.*s} ", - addr_len, addr_len, - routename(ifa->ifa_addr, numeric_addr)); + xo_emit("{et:network/%s}{d:/%-*.*s} ", + nn, net_len, net_len, nn); + xo_emit("{et:address/%s}{d:/%-*.*s} ", + rn, addr_len, addr_len, rn); } network = true; From owner-svn-src-head@freebsd.org Fri Nov 6 15:33:29 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57515A27542; Fri, 6 Nov 2015 15:33:29 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FE951296; Fri, 6 Nov 2015 15:33:29 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6FXShZ054397; Fri, 6 Nov 2015 15:33:28 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6FXSmq054394; Fri, 6 Nov 2015 15:33:28 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511061533.tA6FXSmq054394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 6 Nov 2015 15:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290450 - in head: sbin/ifconfig share/man/man4 sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 15:33:29 -0000 Author: smh Date: Fri Nov 6 15:33:27 2015 New Revision: 290450 URL: https://svnweb.freebsd.org/changeset/base/290450 Log: Add sysctl to control LACP strict compliance default Add net.link.lagg.lacp.default_strict_mode which defines the default value for LACP strict compliance for created lagg devices. Also: * Add lacp_strict option to ifconfig(8). * Fix lagg(4) creation examples. * Minor style(9) fix. MFC after: 1 week Modified: head/sbin/ifconfig/ifconfig.8 head/share/man/man4/lagg.4 head/sys/net/ieee8023ad_lacp.c Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Fri Nov 6 14:50:23 2015 (r290449) +++ head/sbin/ifconfig/ifconfig.8 Fri Nov 6 15:33:27 2015 (r290450) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd Aug 12, 2015 +.Dd November 6, 2015 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2400,6 +2400,21 @@ which are shifted by the number of this Enable lacp fast-timeout on the interface. .It Cm -lacp_fast_timeout Disable lacp fast-timeout on the interface. +.It Cm lacp_strict +Enable lacp strict compliance on the interface. +The default value can be set via the +.Va net.link.lagg.lacp.default_strict_mode +.Xr sysctl 8 +variable. +.Li 0 +means +.Dq disabled +and +.Li 1 +means +.Dq enabled . +.It Cm -lacp_strict +Disable lacp strict compliance on the interface. .El .Pp The following parameters are specific to IP tunnel interfaces, Modified: head/share/man/man4/lagg.4 ============================================================================== --- head/share/man/man4/lagg.4 Fri Nov 6 14:50:23 2015 (r290449) +++ head/share/man/man4/lagg.4 Fri Nov 6 15:33:27 2015 (r290450) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2014 +.Dd November 6, 2015 .Dt LAGG 4 .Os .Sh NAME @@ -156,6 +156,7 @@ Gigabit Ethernet interfaces: .Bd -literal -offset indent # ifconfig bge0 up # ifconfig bge1 up +# ifconfig lagg0 create # ifconfig lagg0 laggproto lacp laggport bge0 laggport bge1 \e 192.168.1.1 netmask 255.255.255.0 .Ed @@ -168,6 +169,7 @@ device will be used: # ifconfig em0 up # ifconfig ath0 ether 00:11:22:33:44:55 # ifconfig create wlan0 wlandev ath0 ssid my_net up +# ifconfig lagg0 create # ifconfig lagg0 laggproto failover laggport em0 laggport wlan0 \e 192.168.1.1 netmask 255.255.255.0 .Ed Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Fri Nov 6 14:50:23 2015 (r290449) +++ head/sys/net/ieee8023ad_lacp.c Fri Nov 6 15:33:27 2015 (r290450) @@ -196,6 +196,11 @@ SYSCTL_NODE(_net_link_lagg, OID_AUTO, la SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, debug, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(lacp_debug), 0, "Enable LACP debug logging (1=debug, 2=trace)"); +static VNET_DEFINE(int, lacp_default_strict_mode) = 1; +SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, default_strict_mode, CTLFLAG_RWTUN, + &VNET_NAME(lacp_default_strict_mode), 0, + "LACP strict protocol compliance default"); + #define LACP_DPRINTF(a) if (V_lacp_debug & 0x01) { lacp_dprintf a ; } #define LACP_TRACE(a) if (V_lacp_debug & 0x02) { lacp_dprintf(a,"%s\n",__func__); } #define LACP_TPRINTF(a) if (V_lacp_debug & 0x04) { lacp_dprintf a ; } @@ -765,7 +770,7 @@ lacp_attach(struct lagg_softc *sc) lsc->lsc_hashkey = m_ether_tcpip_hash_init(); lsc->lsc_active_aggregator = NULL; - lsc->lsc_strict_mode = 1; + lsc->lsc_strict_mode = VNET(lacp_default_strict_mode); LACP_LOCK_INIT(lsc); TAILQ_INIT(&lsc->lsc_aggregators); LIST_INIT(&lsc->lsc_ports); @@ -1702,7 +1707,7 @@ lacp_sm_rx_record_default(struct lacp_po if (lp->lp_lsc->lsc_strict_mode) lp->lp_partner = lacp_partner_admin_strict; else - lp->lp_partner = lacp_partner_admin_optimistic;; + lp->lp_partner = lacp_partner_admin_optimistic; lp->lp_state |= LACP_STATE_DEFAULTED; lacp_sm_ptx_update_timeout(lp, oldpstate); } From owner-svn-src-head@freebsd.org Fri Nov 6 15:39:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7EC9A2769E; Fri, 6 Nov 2015 15:39:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x230.google.com (mail-pa0-x230.google.com [IPv6:2607:f8b0:400e:c03::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 A98CF186B; Fri, 6 Nov 2015 15:39:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacdm15 with SMTP id dm15so101882231pac.3; Fri, 06 Nov 2015 07:39:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=mVzRtxaF+z61FYKEYpLGHr+kbpzQe1vs5b8Tly1luNQ=; b=YLA7yvn+IMTAq3V5jzlBbmu4XouTkUlbOd1lX070GHVeG+1UcnIPmeENCPmv19LxzZ pkJQDQiYhdIJn+RbAtoTvC4yaPzEsdXFYp5n3n9lRiYHVV46LnjnzrPEj2ckgMUpzbC/ FqHvkQQGLtGB2R3sy95O/DZoJYSIrPAOmJbTbcBZxtqUPFzw6S9NHxvfvkNUDhmOtPiG zYY2AAO/KkbHL4ziXvjaX5YIu5OZ3nprAu0cLMPi1BkWQ9h4JIKciVdlbLFVXh3Z0pQj g8lOl9dT2czBBC2Dga1fBPX5Oh3m8EkDTlnqb7DHjltWg+W10tm8zilabiJIlTDdUkO/ 5BYQ== X-Received: by 10.66.218.2 with SMTP id pc2mr18519178pac.112.1446824346209; Fri, 06 Nov 2015 07:39:06 -0800 (PST) Received: from [192.168.20.11] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id ha3sm771098pbb.28.2015.11.06.07.39.05 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Nov 2015 07:39:05 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r290445 - head/contrib/libxo/libxo From: Garrett Cooper X-Mailer: iPhone Mail (13B143) In-Reply-To: <201511061429.tA6ETPQb034160@repo.freebsd.org> Date: Fri, 6 Nov 2015 07:39:04 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, phil@juniper.net, marcel@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <8A650CBE-9B94-4808-BC81-8731B9BCC01C@gmail.com> References: <201511061429.tA6ETPQb034160@repo.freebsd.org> To: Hajimu UMEMOTO X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 15:39:06 -0000 Hi Umemoto-san, > On Nov 6, 2015, at 06:29, Hajimu UMEMOTO wrote: > > Author: ume > Date: Fri Nov 6 14:29:25 2015 > New Revision: 290445 > URL: https://svnweb.freebsd.org/changeset/base/290445 > > Log: > The field modifier for trimming whitespace > is not `q' but `t'. Could you please submit this change upstream to the libxo github project? Thanks :)! -NGie From owner-svn-src-head@freebsd.org Fri Nov 6 15:47:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E7BDA27901; Fri, 6 Nov 2015 15:47:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e: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 4CE831D5A; Fri, 6 Nov 2015 15:47:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacdm15 with SMTP id dm15so102065155pac.3; Fri, 06 Nov 2015 07:47:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=aOzoFLdVYv5Uvqd6Xt0BPbrzcE2y0L8esS/YRMlokDw=; b=IAlBlJS2gVR3RnQqQbzxsMZGnJLrnMcvFaweLDdr7z1ru3g0yV1HcXt4+1Y9gJE3C9 dcq4DC5pHQK7NgyTesHf5ky9aySf+wFsTIjgsDZKeh7jZwObsJfCW40tQIL9vPIMukxm /8KhC3YbwLVH2e9ObU76L7w0JkbafYAIE/c/HiYdj5ZxWahqVPp/FU+nqrq3v8dCZIdP IL0p6cGSaWXe92AZPuBaY/O4+BVXNSkkwQ06EB81MFwng5MLr20CYga5fssBBOMTf2uD 8Cu1wBNIi5MaieVNBr6gsK6Ne445dhwCGtim1wBKP6djFFjzyBob4roZFycrZvhTz7n2 9e6w== X-Received: by 10.66.227.197 with SMTP id sc5mr18801941pac.157.1446824833959; Fri, 06 Nov 2015 07:47:13 -0800 (PST) Received: from [192.168.20.11] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id d2sm778845pat.24.2015.11.06.07.47.13 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Nov 2015 07:47:13 -0800 (PST) Content-Type: text/plain; charset=iso-2022-jp Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options From: Garrett Cooper X-Mailer: iPhone Mail (13B143) In-Reply-To: <563C8018.7000701@FreeBSD.org> Date: Fri, 6 Nov 2015 07:47:12 -0800 Cc: Dmitry Sivachenko , Bryan Drewery , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201511060445.tA64jUjj063307@repo.freebsd.org> <6E5C148B-50AE-4035-9A59-69EE4ED4538C@gmail.com> <563C33DE.3070106@FreeBSD.org> <563C8018.7000701@FreeBSD.org> To: koobs@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 15:47:14 -0000 > On Nov 6, 2015, at 02:25, Kubilay Kocak wrote: >=20 >> On 6/11/2015 4:52 PM, Dmitry Sivachenko wrote: >>=20 >>=20 >>>> 6 =1B$B'_'`'q'R=1B(B. 2015 =1B$B'T=1B(B., =1B$B'S=1B(B 8:00, Bryan Drew= ery =1B$B'_'Q'a'Z'c'Q']=1B(B(=1B$B'Q=1B(B): >>>>=20 >>>>> On 11/5/15 8:59 PM, Dmitry Sivachenko wrote: >>>>>=20 >>>>> On 06 Nov 2015, at 07:45, Bryan Drewery wrote: >>>>>=20 >>>>> Author: bdrewery >>>>> Date: Fri Nov 6 04:45:29 2015 >>>>> New Revision: 290433 >>>>> URL: https://svnweb.freebsd.org/changeset/base/290433 >>>>>=20 >>>>> Log: >>>>> Add a FAST_DEPEND option, off by default, which speeds up the build si= gnificantly. >>>>=20 >>>>=20 >>>> Well, if it just a speedup, what is the reason to introduce a new optio= n for that? >>>=20 >>> "Enabling this by default, for src or out-of-src, can be done once more >>> testing has been done, such as a ports exp-run, and with more compilers.= " >>=20 >>=20 >> Well, this is what -current is for. Just let it settle longer before MFC.= >=20 > Having an option in the first instance is also quite considerate, as it > ensures that this work doesn't block/frustrate people dogfooding CURRENT > if it ends up having issues that can't quickly be fixed without a revert. Being Jenkins being bogged down/broken recently and "make tinderbox", etc be= ing broken, it's harder to track when things break unless you do careful ins= pection (speaking of which, this reminds me that I need to setup Jenkins at w= ork to emulate jenkins.freebsd.org). I definitely appreciate knobs like this= because it gives folks the ability to toggle things on/off if issues are fo= und, either specific to their use case or not. This change (for instance), might cause grief with an older/different versio= n of gcc. Thanks, -NGie= From owner-svn-src-head@freebsd.org Fri Nov 6 15:48:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4405A27989; Fri, 6 Nov 2015 15:48:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::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 861611EDA; Fri, 6 Nov 2015 15:48:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by padhx2 with SMTP id hx2so118168629pad.1; Fri, 06 Nov 2015 07:48:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nV+LNDb5u/QNrrRCccYT+e3FrnZ/05vKekqDkMl0XmU=; b=b3yShkovER8syQRS+K+47xeWD3GHCS8MYUghb6cPADm1i0BReIxkaeGq9Kx6q3ixsZ 8vq8t66Ij0lKeECN7PNuYc4nM0WJNljXlU3OaRDYS/0qlIvu2gTS1pQUAJhELSn/UkhL mAb0QPlUjCsmhN7c34p1wOg6/0dtEi6zjmZL3VOlvwvMZb1w9nxWIUunyaGv3rVkGyys Mspe0BbyBSOAq5MEVc4DJucCQCQdOcPJjhgT41WZrOTx4A/izeEsIKMP5YLpYaMGRIMx 43jb1G67Scgl5aXcLHY+6aOuhawnZU6d3keCInMY/TZWFIQbX5Bp0Juxk1Q7C3IJG76o +Owg== X-Received: by 10.68.161.194 with SMTP id xu2mr18854071pbb.86.1446824886186; Fri, 06 Nov 2015 07:48:06 -0800 (PST) Received: from ?IPv6:2601:601:800:126d:6df0:ac8e:a185:36f3? ([2601:601:800:126d:6df0:ac8e:a185:36f3]) by smtp.gmail.com with ESMTPSA id yg2sm757963pbb.79.2015.11.06.07.48.05 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Nov 2015 07:48:05 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options From: Garrett Cooper X-Mailer: iPhone Mail (13B143) In-Reply-To: <201511060445.tA64jUjj063307@repo.freebsd.org> Date: Fri, 6 Nov 2015 07:48:05 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <0EEA85E1-58EC-4F8B-A3E7-D6EE3031A2B3@gmail.com> References: <201511060445.tA64jUjj063307@repo.freebsd.org> To: Bryan Drewery X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 15:48:06 -0000 > On Nov 5, 2015, at 20:45, Bryan Drewery wrote: > > Author: bdrewery > Date: Fri Nov 6 04:45:29 2015 > New Revision: 290433 > URL: https://svnweb.freebsd.org/changeset/base/290433 Should this be announced on current? From owner-svn-src-head@freebsd.org Fri Nov 6 16:26:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DAF2A2861E; Fri, 6 Nov 2015 16:26:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC6511D68; Fri, 6 Nov 2015 16:26:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6GQ9nQ070109; Fri, 6 Nov 2015 16:26:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6GQ9kn070108; Fri, 6 Nov 2015 16:26:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201511061626.tA6GQ9kn070108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 6 Nov 2015 16:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290451 - head/tools/tools/zfsboottest X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 16:26:11 -0000 Author: avg Date: Fri Nov 6 16:26:09 2015 New Revision: 290451 URL: https://svnweb.freebsd.org/changeset/base/290451 Log: zfsboottest: build as a 32 bit application For better emulation of the actual zfs boot code. MFC after: 8 days Modified: head/tools/tools/zfsboottest/Makefile Modified: head/tools/tools/zfsboottest/Makefile ============================================================================== --- head/tools/tools/zfsboottest/Makefile Fri Nov 6 15:33:27 2015 (r290450) +++ head/tools/tools/zfsboottest/Makefile Fri Nov 6 16:26:09 2015 (r290451) @@ -16,6 +16,7 @@ CFLAGS= -O1 \ -I. \ -fdiagnostics-show-option \ -W -Wextra -Wno-sign-compare -Wno-unused-parameter +CFLAGS+=-m32 LDADD+= -lmd .if ${MACHINE_CPUARCH} == "amd64" From owner-svn-src-head@freebsd.org Fri Nov 6 16:27:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84D29A286C0; Fri, 6 Nov 2015 16:27:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7771083; Fri, 6 Nov 2015 16:27:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6GRM5P070195; Fri, 6 Nov 2015 16:27:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6GRMNC070194; Fri, 6 Nov 2015 16:27:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201511061627.tA6GRMNC070194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 6 Nov 2015 16:27:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290452 - head/tools/tools/zfsboottest X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 16:27:23 -0000 Author: avg Date: Fri Nov 6 16:27:22 2015 New Revision: 290452 URL: https://svnweb.freebsd.org/changeset/base/290452 Log: zfsboottest: catch up with r241289, call zfs_spa_init() for all found pools MFC after: 8 days Modified: head/tools/tools/zfsboottest/zfsboottest.c Modified: head/tools/tools/zfsboottest/zfsboottest.c ============================================================================== --- head/tools/tools/zfsboottest/zfsboottest.c Fri Nov 6 16:26:09 2015 (r290451) +++ head/tools/tools/zfsboottest/zfsboottest.c Fri Nov 6 16:27:22 2015 (r290452) @@ -136,19 +136,21 @@ main(int argc, char** argv) } } + STAILQ_FOREACH(spa, &zfs_pools, spa_link) { + if (zfs_spa_init(spa)) { + fprintf(stderr, "can't init pool %s\n", spa->spa_name); + exit(1); + } + } + + spa_all_status(); + spa = STAILQ_FIRST(&zfs_pools); if (spa == NULL) { fprintf(stderr, "no pools\n"); exit(1); } - if (zfs_spa_init(spa)) { - fprintf(stderr, "can't init pool\n"); - exit(1); - } - - spa_all_status(); - #if 0 uint64_t rootobj; if (zfs_get_root(spa, &rootobj)) { From owner-svn-src-head@freebsd.org Fri Nov 6 16:43:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D32EA28BB6; Fri, 6 Nov 2015 16:43:23 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 481111CB9; Fri, 6 Nov 2015 16:43:23 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6GhMaZ075694; Fri, 6 Nov 2015 16:43:22 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6GhMZu075693; Fri, 6 Nov 2015 16:43:22 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201511061643.tA6GhMZu075693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 6 Nov 2015 16:43:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290453 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 16:43:23 -0000 Author: jilles Date: Fri Nov 6 16:43:22 2015 New Revision: 290453 URL: https://svnweb.freebsd.org/changeset/base/290453 Log: I still maintain sh(1). Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Fri Nov 6 16:27:22 2015 (r290452) +++ head/MAINTAINERS Fri Nov 6 16:43:22 2015 (r290453) @@ -38,6 +38,9 @@ dev/usb/wlan adrian Pre-commit review re openssl benl,jkim Pre-commit review requested. release/release.sh gjb,re Pre-commit review and regression tests requested. +sh(1) jilles Pre-commit review requested. This also applies + to kill(1), printf(1) and test(1) which are + compiled in as builtins. ---- OLD ---- libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. @@ -132,9 +135,6 @@ isci(4) jimharris Pre-commit review req cmx daniel@roe.ch Pre-commit review preferred. filemon obrien Pre-commit review preferred. sysdoc trhodes Pre-commit review preferred. -sh(1) jilles Pre-commit review requested. This also applies - to kill(1), printf(1) and test(1) which are - compiled in as builtins. nvme(4) jimharris Pre-commit review requested. nvd(4) jimharris Pre-commit review requested. nvmecontrol(8) jimharris Pre-commit review requested. From owner-svn-src-head@freebsd.org Fri Nov 6 16:54:18 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF9ADA28FA6; Fri, 6 Nov 2015 16:54:18 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B547E1ACC; Fri, 6 Nov 2015 16:54:18 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6GsH1t078831; Fri, 6 Nov 2015 16:54:17 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6GsHwG078830; Fri, 6 Nov 2015 16:54:17 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201511061654.tA6GsHwG078830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Fri, 6 Nov 2015 16:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290455 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 16:54:19 -0000 Author: jimharris Date: Fri Nov 6 16:54:17 2015 New Revision: 290455 URL: https://svnweb.freebsd.org/changeset/base/290455 Log: I am still maintaining iscsi, nvme, nvd and nvmecontrol. Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Fri Nov 6 16:48:33 2015 (r290454) +++ head/MAINTAINERS Fri Nov 6 16:54:17 2015 (r290455) @@ -41,6 +41,10 @@ release/release.sh gjb,re Pre-commit rev sh(1) jilles Pre-commit review requested. This also applies to kill(1), printf(1) and test(1) which are compiled in as builtins. +isci(4) jimharris Pre-commit review requested. +nvme(4) jimharris Pre-commit review requested. +nvd(4) jimharris Pre-commit review requested. +nvmecontrol(8) jimharris Pre-commit review requested. ---- OLD ---- libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. @@ -131,12 +135,8 @@ usr.sbin/zic edwin Heads-up appreciat lib/libc/stdtime edwin Heads-up appreciated, since parts of this code is maintained by a third party source. sbin/routed bms Pre-commit review; notify vendor at rhyolite.com -isci(4) jimharris Pre-commit review requested. cmx daniel@roe.ch Pre-commit review preferred. filemon obrien Pre-commit review preferred. sysdoc trhodes Pre-commit review preferred. -nvme(4) jimharris Pre-commit review requested. -nvd(4) jimharris Pre-commit review requested. -nvmecontrol(8) jimharris Pre-commit review requested. nanobsd imp Pre-commit review requested for coordination. vmm(4) neel,grehan Pre-commit review requested. From owner-svn-src-head@freebsd.org Fri Nov 6 16:56:40 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BFF3A2614E; Fri, 6 Nov 2015 16:56:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6698E1FB7; Fri, 6 Nov 2015 16:56:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 6021E1E56; Fri, 6 Nov 2015 16:56:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 1C26E1292E; Fri, 6 Nov 2015 16:56:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id IVi6Luejq2zn; Fri, 6 Nov 2015 16:56:37 +0000 (UTC) Subject: Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 85C3B12923 To: Garrett Cooper References: <201511060445.tA64jUjj063307@repo.freebsd.org> <0EEA85E1-58EC-4F8B-A3E7-D6EE3031A2B3@gmail.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Organization: FreeBSD Message-ID: <563CDBC2.2090909@FreeBSD.org> Date: Fri, 6 Nov 2015 08:56:34 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <0EEA85E1-58EC-4F8B-A3E7-D6EE3031A2B3@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 16:56:40 -0000 On 11/6/15 7:48 AM, Garrett Cooper wrote: > >> On Nov 5, 2015, at 20:45, Bryan Drewery wrote: >> >> Author: bdrewery >> Date: Fri Nov 6 04:45:29 2015 >> New Revision: 290433 >> URL: https://svnweb.freebsd.org/changeset/base/290433 > > Should this be announced on current? > I am going to send a CFT once I get ccache in. Once I am confident no one is impacted by it on head I will enable it by default for src builds. Out of src builds are still a different story. I'll have a better idea once I can make sure nothing breaks in a ports exp-run. Also, GCC 3.0 brought in this flag, I expect everything in-tree to work fine. If someone has ICC access I would appreciate them testing this too. -- Regards, Bryan Drewery From owner-svn-src-head@freebsd.org Fri Nov 6 17:12:34 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEF1CA26842; Fri, 6 Nov 2015 17:12:34 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F9DA1FD9; Fri, 6 Nov 2015 17:12:34 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6HCXoK085060; Fri, 6 Nov 2015 17:12:33 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6HCX7f085057; Fri, 6 Nov 2015 17:12:33 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201511061712.tA6HCX7f085057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Fri, 6 Nov 2015 17:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290457 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 17:12:34 -0000 Author: skra Date: Fri Nov 6 17:12:33 2015 New Revision: 290457 URL: https://svnweb.freebsd.org/changeset/base/290457 Log: Make interrupt dispatching MP safe. Use GPU interrupt bit in per-core interrupt status register to process shared interrupts only if the bit is active and only on core to which they are routed. Reviewed by: imp, loos Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D3723 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_intr.c head/sys/arm/broadcom/bcm2835/bcm2836.c head/sys/arm/broadcom/bcm2835/bcm2836.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_intr.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_intr.c Fri Nov 6 16:57:23 2015 (r290456) +++ head/sys/arm/broadcom/bcm2835/bcm2835_intr.c Fri Nov 6 17:12:33 2015 (r290457) @@ -163,7 +163,9 @@ arm_get_next_irq(int last_irq) irq = 0; #ifdef SOC_BCM2836 - if ((ret = bcm2836_get_next_irq(irq)) >= 0) + if ((ret = bcm2836_get_next_irq(irq)) < 0) + return (-1); + if (ret != BCM2836_GPU_IRQ) return (ret + BANK3_START); #endif Modified: head/sys/arm/broadcom/bcm2835/bcm2836.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2836.c Fri Nov 6 16:57:23 2015 (r290456) +++ head/sys/arm/broadcom/bcm2835/bcm2836.c Fri Nov 6 17:12:33 2015 (r290457) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #define ARM_LOCAL_INT_TIMER(n) (0x40 + (n) * 4) #define ARM_LOCAL_INT_MAILBOX(n) (0x50 + (n) * 4) #define ARM_LOCAL_INT_PENDING(n) (0x60 + (n) * 4) -#define INT_PENDING_MASK 0x01f +#define INT_PENDING_MASK 0x011f #define MAILBOX0_IRQ 4 #define MAILBOX0_IRQEN (1 << 0) Modified: head/sys/arm/broadcom/bcm2835/bcm2836.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2836.h Fri Nov 6 16:57:23 2015 (r290456) +++ head/sys/arm/broadcom/bcm2835/bcm2836.h Fri Nov 6 17:12:33 2015 (r290457) @@ -30,6 +30,8 @@ #ifndef _BCM2815_BCM2836_H #define _BCM2815_BCM2836_H +#define BCM2836_GPU_IRQ 8 + int bcm2836_get_next_irq(int); void bcm2836_mask_irq(uintptr_t); void bcm2836_unmask_irq(uintptr_t); From owner-svn-src-head@freebsd.org Fri Nov 6 17:29:22 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4633A26D9B; Fri, 6 Nov 2015 17:29:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B2E119B3; Fri, 6 Nov 2015 17:29:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6HTL2J088167; Fri, 6 Nov 2015 17:29:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6HTLAA088166; Fri, 6 Nov 2015 17:29:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511061729.tA6HTLAA088166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 6 Nov 2015 17:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290458 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 17:29:22 -0000 Author: mav Date: Fri Nov 6 17:29:21 2015 New Revision: 290458 URL: https://svnweb.freebsd.org/changeset/base/290458 Log: Add two more KASSERTs. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Fri Nov 6 17:12:33 2015 (r290457) +++ head/sys/cam/ctl/ctl.c Fri Nov 6 17:29:21 2015 (r290458) @@ -11042,7 +11042,15 @@ ctl_check_for_blockage(struct ctl_lun *l return (CTL_ACTION_BLOCK); pending_entry = ctl_get_cmd_entry(&pending_io->scsiio, NULL); + KASSERT(pending_entry->seridx < CTL_SERIDX_COUNT, + ("%s: Invalid seridx %d for pending CDB %02x %02x @ %p", + __func__, pending_entry->seridx, pending_io->scsiio.cdb[0], + pending_io->scsiio.cdb[1], pending_io)); ooa_entry = ctl_get_cmd_entry(&ooa_io->scsiio, NULL); + KASSERT(ooa_entry->seridx < CTL_SERIDX_COUNT, + ("%s: Invalid seridx %d for ooa CDB %02x %02x @ %p", + __func__, ooa_entry->seridx, ooa_io->scsiio.cdb[0], + ooa_io->scsiio.cdb[1], ooa_io)); serialize_row = ctl_serialize_table[ooa_entry->seridx]; From owner-svn-src-head@freebsd.org Fri Nov 6 17:29:52 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AD86A26DFD; Fri, 6 Nov 2015 17:29:52 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 445DC1B10; Fri, 6 Nov 2015 17:29:52 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6HTpb5088226; Fri, 6 Nov 2015 17:29:51 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6HTpeQ088225; Fri, 6 Nov 2015 17:29:51 GMT (envelope-from des@FreeBSD.org) Message-Id: <201511061729.tA6HTpeQ088225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 6 Nov 2015 17:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290459 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 17:29:52 -0000 Author: des Date: Fri Nov 6 17:29:51 2015 New Revision: 290459 URL: https://svnweb.freebsd.org/changeset/base/290459 Log: Refresh my entries Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Fri Nov 6 17:29:21 2015 (r290458) +++ head/MAINTAINERS Fri Nov 6 17:29:51 2015 (r290459) @@ -45,6 +45,13 @@ isci(4) jimharris Pre-commit review req nvme(4) jimharris Pre-commit review requested. nvd(4) jimharris Pre-commit review requested. nvmecontrol(8) jimharris Pre-commit review requested. +libfetch des Advance notification requested. +fetch des Advance notification requested. +libpam des Pre-commit review requested. +openssh des Pre-commit review requested. +pseudofs des Pre-commit review requested. +procfs des Pre-commit review requested. +linprocfs des Pre-commit review requested. ---- OLD ---- libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. @@ -75,13 +82,6 @@ etc/mail gshapiro Pre-commit review requ Keep in sync with -STABLE. etc/sendmail gshapiro Pre-commit review requested. Keep in sync with -STABLE. -libfetch des Advance notification requested. -fetch des Advance notification requested. -libpam des Pre-commit review requested. -openssh des Pre-commit review requested. -pseudofs des Pre-commit review requested. -procfs des Pre-commit review requested. -linprocfs des Pre-commit review requested. lpr gad Pre-commit review requested, particularly for lpd/recvjob.c and lpd/printjob.c. nvi peter Try not to break it. From owner-svn-src-head@freebsd.org Fri Nov 6 17:39:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98773A27095; Fri, 6 Nov 2015 17:39:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FB5C1156; Fri, 6 Nov 2015 17:39:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6HdIDS091247; Fri, 6 Nov 2015 17:39:18 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6HdItd091243; Fri, 6 Nov 2015 17:39:18 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201511061739.tA6HdItd091243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 6 Nov 2015 17:39:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290460 - in head/secure: lib/libcrypto lib/libssl usr.bin/openssl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 17:39:19 -0000 Author: jkim Date: Fri Nov 6 17:39:17 2015 New Revision: 290460 URL: https://svnweb.freebsd.org/changeset/base/290460 Log: Clean up OpenSSL makefiles. Modified: head/secure/lib/libcrypto/Makefile head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libssl/Makefile head/secure/usr.bin/openssl/Makefile Modified: head/secure/lib/libcrypto/Makefile ============================================================================== --- head/secure/lib/libcrypto/Makefile Fri Nov 6 17:29:51 2015 (r290459) +++ head/secure/lib/libcrypto/Makefile Fri Nov 6 17:39:17 2015 (r290460) @@ -14,12 +14,12 @@ NO_LINT= .if exists(Makefile.man) .include "Makefile.man" .endif +.include "Makefile.inc" + .if defined(NOTYET) MAN+= config.5 des_modes.7 .endif -.include "Makefile.inc" - # base sources SRCS= cpt_err.c cryptlib.c cversion.c ex_data.c mem.c mem_dbg.c o_dir.c \ o_fips.c o_init.c o_str.c o_time.c uid.c @@ -380,6 +380,8 @@ INCSDIR= ${INCLUDEDIR}/openssl CSTD= gnu89 +CFLAGS+= -I${.OBJDIR} +CFLAGS+= -I${LCRYPTO_SRC}/crypto CFLAGS+= -I${LCRYPTO_SRC}/crypto/asn1 CFLAGS+= -I${LCRYPTO_SRC}/crypto/evp CFLAGS+= -I${LCRYPTO_SRC}/crypto/modes @@ -391,32 +393,32 @@ AFLAGS+= --noexecstack ACFLAGS+= -Wa,--noexecstack .endif +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +OPENSSLCONF_H= opensslconf-x86.h +.else +OPENSSLCONF_H= opensslconf-${MACHINE_CPUARCH}.h +.endif + CLEANFILES= buildinf.h opensslconf.h -buildinf.h: ${.CURDIR}/Makefile +buildinf.h: Makefile ( echo "#ifndef MK1MF_BUILD"; \ echo " /* auto-generated by util/mkbuildinf.pl for crypto/cversion.c */"; \ echo " #define CFLAGS \"compiler: ${COMPILER_TYPE}\""; \ echo " #define PLATFORM \"platform: FreeBSD-${MACHINE_ARCH}\""; \ echo "#endif" ) > ${.TARGET} -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" -opensslconf.h: opensslconf-x86.h -.else -opensslconf.h: opensslconf-${MACHINE_CPUARCH}.h -.endif - ${CP} ${.ALLSRC} ${.TARGET} +opensslconf.h: ${OPENSSLCONF_H} + ${CP} ${.IMPSRC} ${.TARGET} .include .if ${MACHINE_CPUARCH} == "amd64" -.PATH: ${.CURDIR}/amd64 -.elif ${MACHINE_CPUARCH} == "i386" -.PATH: ${.CURDIR}/i386 +_bn_asmpath= ${LCRYPTO_SRC}/crypto/bn/asm .endif -.if ${MACHINE_CPUARCH} == "amd64" -_bn_asmpath= ${LCRYPTO_SRC}/crypto/bn/asm +.if exists(${.CURDIR}/${MACHINE_CPUARCH}) +.PATH: ${.CURDIR}/${MACHINE_CPUARCH} .endif .PATH: ${LCRYPTO_SRC}/crypto \ Modified: head/secure/lib/libcrypto/Makefile.inc ============================================================================== --- head/secure/lib/libcrypto/Makefile.inc Fri Nov 6 17:29:51 2015 (r290459) +++ head/secure/lib/libcrypto/Makefile.inc Fri Nov 6 17:39:17 2015 (r290460) @@ -7,10 +7,10 @@ OPENSSL_VER= 1.0.2d OPENSSL_DATE= 2015-07-09 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl -LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc +LCRYPTO_DOC= ${LCRYPTO_SRC}/doc +CFLAGS+= -I${LCRYPTO_SRC} CFLAGS+= -DTERMIOS -DANSI_SOURCE -CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto -I${.OBJDIR} CFLAGS+= -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H .include Modified: head/secure/lib/libssl/Makefile ============================================================================== --- head/secure/lib/libssl/Makefile Fri Nov 6 17:29:51 2015 (r290459) +++ head/secure/lib/libssl/Makefile Fri Nov 6 17:39:17 2015 (r290460) @@ -23,6 +23,8 @@ INCSDIR=${INCLUDEDIR}/openssl LIBADD= crypto +CFLAGS+= -I${LCRYPTO_SRC}/crypto + .include .PATH: ${LCRYPTO_SRC}/ssl \ Modified: head/secure/usr.bin/openssl/Makefile ============================================================================== --- head/secure/usr.bin/openssl/Makefile Fri Nov 6 17:29:51 2015 (r290459) +++ head/secure/usr.bin/openssl/Makefile Fri Nov 6 17:39:17 2015 (r290460) @@ -9,7 +9,7 @@ LIBADD= ssl crypto .endif .include "../../lib/libcrypto/Makefile.inc" -CFLAGS+=-DMONOLITH -I${.CURDIR} +CFLAGS+= -DMONOLITH SRCS+= app_rand.c apps.c asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c \ dgst.c dh.c dhparam.c dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c \ From owner-svn-src-head@freebsd.org Fri Nov 6 18:24:50 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F139A27F01; Fri, 6 Nov 2015 18:24:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5448010A1; Fri, 6 Nov 2015 18:24:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6IOnPM010318; Fri, 6 Nov 2015 18:24:49 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6IOnNN010317; Fri, 6 Nov 2015 18:24:49 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201511061824.tA6IOnNN010317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 6 Nov 2015 18:24:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290461 - head/secure/lib/libcrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 18:24:50 -0000 Author: jkim Date: Fri Nov 6 18:24:49 2015 New Revision: 290461 URL: https://svnweb.freebsd.org/changeset/base/290461 Log: Fix a typo. I did not mean it, really. Modified: head/secure/lib/libcrypto/Makefile Modified: head/secure/lib/libcrypto/Makefile ============================================================================== --- head/secure/lib/libcrypto/Makefile Fri Nov 6 17:39:17 2015 (r290460) +++ head/secure/lib/libcrypto/Makefile Fri Nov 6 18:24:49 2015 (r290461) @@ -409,7 +409,7 @@ buildinf.h: Makefile echo "#endif" ) > ${.TARGET} opensslconf.h: ${OPENSSLCONF_H} - ${CP} ${.IMPSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} .include From owner-svn-src-head@freebsd.org Fri Nov 6 18:50:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE9D4A28394; Fri, 6 Nov 2015 18:50:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88DDC1CFB; Fri, 6 Nov 2015 18:50:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6Io1bo016400; Fri, 6 Nov 2015 18:50:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6Io1AW016398; Fri, 6 Nov 2015 18:50:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511061850.tA6Io1AW016398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 6 Nov 2015 18:50:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290462 - head/sys/cam/ata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 18:50:02 -0000 Author: mav Date: Fri Nov 6 18:50:01 2015 New Revision: 290462 URL: https://svnweb.freebsd.org/changeset/base/290462 Log: Removed unused malloc types. Submitted by: Dmitry Luhtionov MFC after: 1 week Modified: head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_pmp.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Fri Nov 6 18:24:49 2015 (r290461) +++ head/sys/cam/ata/ata_da.c Fri Nov 6 18:50:01 2015 (r290462) @@ -631,8 +631,6 @@ static struct periph_driver adadriver = PERIPHDRIVER_DECLARE(ada, adadriver); -static MALLOC_DEFINE(M_ATADA, "ata_da", "ata_da buffers"); - static int adaopen(struct disk *dp) { Modified: head/sys/cam/ata/ata_pmp.c ============================================================================== --- head/sys/cam/ata/ata_pmp.c Fri Nov 6 18:24:49 2015 (r290461) +++ head/sys/cam/ata/ata_pmp.c Fri Nov 6 18:50:01 2015 (r290462) @@ -155,8 +155,6 @@ static struct periph_driver pmpdriver = PERIPHDRIVER_DECLARE(pmp, pmpdriver); -static MALLOC_DEFINE(M_ATPMP, "ata_pmp", "ata_pmp buffers"); - static void pmpinit(void) { From owner-svn-src-head@freebsd.org Fri Nov 6 19:05:59 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C1E4A2871F; Fri, 6 Nov 2015 19:05:59 +0000 (UTC) (envelope-from phil@juniper.net) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0118.outbound.protection.outlook.com [157.56.111.118]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C36E184C; Fri, 6 Nov 2015 19:05:57 +0000 (UTC) (envelope-from phil@juniper.net) Received: from CO2PR05CA022.namprd05.prod.outlook.com (10.141.241.150) by BN1PR05MB058.namprd05.prod.outlook.com (10.255.202.145) with Microsoft SMTP Server (TLS) id 15.1.312.18; Fri, 6 Nov 2015 18:51:05 +0000 Received: from BY2FFO11FD031.protection.gbl (2a01:111:f400:7c0c::116) by CO2PR05CA022.outlook.office365.com (2a01:111:e400:1429::22) with Microsoft SMTP Server (TLS) id 15.1.318.15 via Frontend Transport; Fri, 6 Nov 2015 18:51:05 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.17) smtp.mailfrom=juniper.net; freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.17 as permitted sender) Received: from p-emfe01a-sac.jnpr.net (66.129.239.17) by BY2FFO11FD031.mail.protection.outlook.com (10.1.14.196) with Microsoft SMTP Server (TLS) id 15.1.325.5 via Frontend Transport; Fri, 6 Nov 2015 18:51:04 +0000 Received: from magenta.juniper.net (172.17.27.123) by p-emfe01a-sac.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Fri, 6 Nov 2015 10:50:45 -0800 Received: from idle.juniper.net (idleski.juniper.net [172.25.4.26]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id tA6IohD97351; Fri, 6 Nov 2015 10:50:43 -0800 (PST) (envelope-from phil@juniper.net) Received: from idle.juniper.net (localhost [127.0.0.1]) by idle.juniper.net (8.14.4/8.14.3) with ESMTP id tA6Imh8M094212; Fri, 6 Nov 2015 13:48:43 -0500 (EST) (envelope-from phil@idle.juniper.net) Message-ID: <201511061848.tA6Imh8M094212@idle.juniper.net> To: Garrett Cooper CC: Hajimu UMEMOTO , , , , Subject: Re: svn commit: r290445 - head/contrib/libxo/libxo In-Reply-To: <8A650CBE-9B94-4808-BC81-8731B9BCC01C@gmail.com> Date: Fri, 6 Nov 2015 13:48:42 -0500 From: Phil Shafer MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD031; 1:AVQB1gr8+K+J9HxgGv/z0yEJLcyPP0PQG9uXsDnsa/YSLd3dpY6LxHxR7STJVOGAOt998cbNmCpseNGi6viKRlFvSDGRTIrAqorQaCYrMpS4f5mJD+XakPep1d78ha2limNcBSnhQr7kMe4cplQf2WqpRTyi721hy8JOYR/WiZhb5v9ymtJksFESY/h7RxAudbtc3FQA6E3s0GAWKgmrR2B9DfF8vcoTyJV0k6C3CYafTBeQDoCjtCHQ5NXMAwSz7Nb0v6xuNCU/dBqCe2EYRsDkls8GUl73OS8usov+fZOrsG+ww0m3V33kxWGi04mF654WkeFl9TrTeNDureIjPZ8+W8A2mF9KSezp7SdGkxJtLgLMBa1l90XxG4MK0v1J X-Forefront-Antispam-Report: CIP:66.129.239.17; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(199003)(189002)(164054003)(92566002)(5007970100001)(110136002)(48376002)(97736004)(5001960100002)(87936001)(50466002)(5008740100001)(77096005)(86362001)(69596002)(81156007)(2950100001)(558084003)(47776003)(6806005)(189998001)(105596002)(50986999)(76506005)(5003600100002)(11100500001)(1411001)(54356999)(53416004)(5003940100001)(106466001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR05MB058; H:p-emfe01a-sac.jnpr.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1PR05MB058; 2:roj0+z0VWhRz5jPhQ9N6SY6Oboi6H7NFwbAJV0zax/D14m+YCuFeBVindHn7IpTGEGBynklUP8u9snlMfa9qe6fzGwwkHnUM78i6vdl+vpG9PdmYgwDOLcSGNcjipYkHxFjUlgqLZFIGWpJtM2AHMSIueNV/OvTIr/Deg7TNseQ=; 3:ycCnApJbjm/avojjJTmMgSPjJ29zMG+SLvRhrvD2cx2Bb+25MEiyv2xfsy4DU5RF5Fx0o4a6JQgPBukzV4A2DGhGvUikWtIVyvAJFF7oRQgSfDczTXhhuxaCaD8iB6iDE1Z3OF6UUernSWVvv16meUpgT4i6WY7iuTFLwUPo5GeQm68BUWHdh+uXRwaEHlSwiwjFD/1MYlJMGM6d3bJqsadRCmFbf8GL4q7xLSpAiro=; 25:+9f3uv7uCk4xiBgwVRJMHnq/iAHFyhrB1010jDKXnUPtKnPQE1kl043pU0ncVAiGI2xi/uZv9ghGHFsuS/ZFHCHgIesHs8TKN7ROX0zevBXb8/JsPFSldVB65QhHCS86H5iQc2mwWi/YTm0Kh0BWL+my0cViA8Hvez8gs9bM5rFaConkSn8GcG1nzZxdccwMyMvDICtocVqDa8tYEh6ZQ2TsLDiLTrwiHHA/Fl1AhVxPuHdnY2ERgZH2r1mlq77L4Rhe+hiWUGGv4EaDZ8e33g== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR05MB058; X-Microsoft-Exchange-Diagnostics: 1; BN1PR05MB058; 20:w0FHlnBvnANJscfC0zbZQUaQpIVyn6bmhFw8ALu5u5btGstwlW52EDLc1jhpjeAUrweW9KCEa22YS7E6GrBOqIScR/hC9pl9MGGdZs3CRW/P9fhHY5jNYlsBQYZd8Z1I5P2k5PvGZAFg1Ie5C5TfRBjoosQTLW8ashlkNauZ68D1x8EhMeWRbuyFEGnT1j+Y4L/JYqOoKMSl4BRJk1UK+WgnF4WgCrS5pu8OAriOIjzFljv9wVj7pO7llk8VXhJ4f1+0BlmfXQUZNLnk0klco7eA3b0p0anYwRmF+r0rJWjZOSU9LjZIcC2jaisKs5TlxDoRB6frbVlgZ4HxGWPUSfQX6zwt0RJopEx2xf23RU+HVKm3wFCPWscilV5EondNuJOilkwHLnbdJB5E0EXgszSiDRrtEf1siygSo85xAx/el2Bq6RihS6tUpiXrOWCVtEhLbZ2HN/ZkwTr2lltRnpOlGTlNXonSjYmzMGdQBRdNJlmQ4dXqDVP3fCp7h/CB; 4:yr9mNEJpAPxaQGiWxEwaJrQlvSDDfujM9FZGUeWQldigfTGmB/4pywWlWH4BmiKU/C70VqoAUhoi+vuBrDbpdUKM2Vj6cuC/6w94NCWlQIjwknu0WGHG0YuczRx4CXt2FAjOHfl36yPJP1eIwrr+0kZdIG+drqIqpTcxuNJ/wRasOcs90hNNFFVUPFphwXzNcujqP7xnCWRp105wrTIF6Vu2o+pIygYv4T0EqowV5GljSQsf4JB5c67H2un77HZSwQv/E2TczeRqHw1xVAuBacwcyJPKhG9seS9lFrGux/Cxf6G1bA0Mu6oTSdBs2+NzCuT8/lIwWkYBZazHov6J2zOV3YsXPJdmZgRzgcdofzUhqdYLs7OwBtSlhbSb7MQm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001); SRVR:BN1PR05MB058; BCL:0; PCL:0; RULEID:; SRVR:BN1PR05MB058; X-Forefront-PRVS: 07521929C1 X-Microsoft-Exchange-Diagnostics: 1; BN1PR05MB058; 23:L7vLQHYBZZAP0ydSvW4tL6m8ytCJFBlz4vWg2Dl/IV9jZNcDVUqDxexYzuJU9KwftaM1LITLk/Nb8b9viIen4/ZiXXlpeYQt0ZVIsK5SgE6Z4/d4nMup/TRy5WtHuCY1ooX+g/InNVVveZNX6F7Wp2NVrVgHW9pJoU68pnC5bkYGqSSvpJwIssN2KJ8J9f+UkwmoO9nSvglhlb7xEw3RfPt2KM9wb2uRp5qpg1n502uSzym8Bs6J0QV5TCYa00e4bqvEsQ4xpIG6qCAQjOs+5/VgHBdXV5/nK3GqaTZ3xp7eG/kHM6Gh+SXULYyov3GNTfLHX9E3pWtxqbYEZtBQhBmclTHGjgGSnYr9oFcHKtjIDwib27/XoXyttyowdTXPRFiWue3Uioyt2bd9LDu5o3D6T92zg/vkX9jbagKh3Bv7JN33LU7HTzigTx5GjJbQbX58tYlfvrx5vW/13UxYdUJNuKgzl0k5nEwK2qKNJvUWgZPbLcl3V5yPtTjH6Uhi83w7Pcv8AD1+xMhlL+oNG0q2aixeCICH4DEiIW2ZfC6gdtp7PdBDmZR73TXbAQX7Y8qPKaUoFY8ELhnpDfHU1cPNqQop+XOZMjgOXaywoyvDqFyBYwXZqki8BoiCNZ0yk+M1JbOHUYcRROq+SUzIYMDZ9Fp4V5CmOJrzVE05Mnl8a6m2833qSJHGWhVfOZ2dACU3gwmHUI5yWBcwBuuXSIbkDNR4QHrKLFvtlWnwYOpCwdHQpAN7gxiFY1+C8ki9NXrR/SomdhWA5QSEsnCajjxP8dx6lPmyfQ4Bctx5uyLiMEFwBmCjjLumu4vQAZZcgfG3tcTyVw/HgfwzyDuZc0sgw4QHPtNtBEOsHvfcWFfw+VkvZtS5qHf1Bw5y4TBIHqFKidfvCtfNSTkhkUJykDBoH0UE7AouH2xekJoBTfk= X-Microsoft-Exchange-Diagnostics: 1; BN1PR05MB058; 5:2xMrZi7ca4C0mwYaAN/oBa4K7OgBvfae1Bx6Yvn7EJ/DwVLHuKpkONqo84kcAffxAueYVhMwqKXdyCAjsVKhFY/r5KMhvObeyvZS5hvRmzUUZHg70e/LLMu1f8+NrFz7LJuMt2TMu/maQlFZwulySw==; 24:wBBcV30zzGFcY5NQa8QMutigaK9LQsG6Cv1apB2QIOYYjTxCNJW4g6LadOMLzjvsRnB3Os677GhwnpDvuSGQozWEMWY8AqJEbghnCNblZgU=; 20:A4E2Fax3UYvJTgtC7DvMdmyTIM5TXgujeDOhJOnKRj2ScgfKGyFJdLDZEeNlGuNm84KZeIYt5Jx4FQgXa4YTMA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2015 18:51:04.9344 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.17]; Helo=[p-emfe01a-sac.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR05MB058 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 19:05:59 -0000 Garrett Cooper writes: >> The field modifier for trimming whitespace >> is not `q' but `t'. > >Could you please submit this change upstream to the libxo github project? Got it (d907e99..e263360 in 'develop' branch). Thanks, Phil From owner-svn-src-head@freebsd.org Fri Nov 6 19:18:22 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44226A28A39; Fri, 6 Nov 2015 19:18:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FFFD1FD9; Fri, 6 Nov 2015 19:18:21 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6JILhH025058; Fri, 6 Nov 2015 19:18:21 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6JILbL025057; Fri, 6 Nov 2015 19:18:21 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201511061918.tA6JILbL025057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 6 Nov 2015 19:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290463 - head/sbin/savecore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 19:18:22 -0000 Author: asomers Date: Fri Nov 6 19:18:20 2015 New Revision: 290463 URL: https://svnweb.freebsd.org/changeset/base/290463 Log: Always check the return value of lseek. This is a follow-up to r289845, which only fixed one occurence of CID 1009429. Coverity CID: 1009429 Reviewed by: markj MFC after: 2 weeks X-MFC-With: r289845 Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D4096 Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Fri Nov 6 18:50:01 2015 (r290462) +++ head/sbin/savecore/savecore.c Fri Nov 6 19:18:20 2015 (r290463) @@ -491,9 +491,8 @@ DoFile(const char *savedir, const char * } lasthd = mediasize - sectorsize; - lseek(fd, lasthd, SEEK_SET); - error = read(fd, &kdhl, sizeof kdhl); - if (error != sizeof kdhl) { + if (lseek(fd, lasthd, SEEK_SET) != lasthd || + read(fd, &kdhl, sizeof(kdhl)) != sizeof(kdhl)) { syslog(LOG_ERR, "error reading last dump header at offset %lld in %s: %m", (long long)lasthd, device); @@ -569,9 +568,8 @@ DoFile(const char *savedir, const char * } dumpsize = dtoh64(kdhl.dumplength); firsthd = lasthd - dumpsize - sizeof kdhf; - lseek(fd, firsthd, SEEK_SET); - error = read(fd, &kdhf, sizeof kdhf); - if (error != sizeof kdhf) { + if (lseek(fd, firsthd, SEEK_SET) != firsthd || + read(fd, &kdhf, sizeof(kdhf)) != sizeof(kdhf)) { syslog(LOG_ERR, "error reading first dump header at offset %lld in %s: %m", (long long)firsthd, device); From owner-svn-src-head@freebsd.org Fri Nov 6 20:12:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA0D0A283C1; Fri, 6 Nov 2015 20:12:32 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 726C41FA5; Fri, 6 Nov 2015 20:12:32 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6KCV3P042274; Fri, 6 Nov 2015 20:12:31 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6KCVrX042273; Fri, 6 Nov 2015 20:12:31 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201511062012.tA6KCVrX042273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Fri, 6 Nov 2015 20:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290465 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 20:12:32 -0000 Author: cognet Date: Fri Nov 6 20:12:31 2015 New Revision: 290465 URL: https://svnweb.freebsd.org/changeset/base/290465 Log: Include opt_platform.h to get FDT defined. Modified: head/sys/arm/ti/ti_common.c Modified: head/sys/arm/ti/ti_common.c ============================================================================== --- head/sys/arm/ti/ti_common.c Fri Nov 6 20:10:54 2015 (r290464) +++ head/sys/arm/ti/ti_common.c Fri Nov 6 20:12:31 2015 (r290465) @@ -29,6 +29,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); From owner-svn-src-head@freebsd.org Fri Nov 6 20:43:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 275F9A28AEB for ; Fri, 6 Nov 2015 20:43:02 +0000 (UTC) (envelope-from Cheng.Cui@netapp.com) Received: from mx142.netapp.com (mx142.netapp.com [216.240.21.19]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (Client CN "mx142.netapp.com", Issuer "Symantec Class 3 Secure Server CA - G4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD5AB153A; Fri, 6 Nov 2015 20:43:01 +0000 (UTC) (envelope-from Cheng.Cui@netapp.com) X-IronPort-AV: E=Sophos;i="5.20,253,1444719600"; d="scan'208";a="75513271" Received: from hioexcmbx04-prd.hq.netapp.com ([10.122.105.37]) by mx142-out.netapp.com with ESMTP; 06 Nov 2015 12:41:50 -0800 Received: from HIOEXCMBX03-PRD.hq.netapp.com (10.122.105.36) by hioexcmbx04-prd.hq.netapp.com (10.122.105.37) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Fri, 6 Nov 2015 12:41:50 -0800 Received: from HIOEXCMBX03-PRD.hq.netapp.com ([::1]) by hioexcmbx03-prd.hq.netapp.com ([fe80::25cc:26bf:f7e1:4fa2%21]) with mapi id 15.00.1104.000; Fri, 6 Nov 2015 12:41:50 -0800 From: "Cui, Cheng" To: "hselasky@FreeBSD.org" CC: "svn-src-head@freebsd.org" Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys Thread-Topic: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys Thread-Index: AQHRGNOPgMCVBieqOEmj6yi33iX1QQ== Date: Fri, 6 Nov 2015 20:41:49 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.1878.6) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.122.56.79] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 20:43:02 -0000 Hello Hans, This is Cheng Cui. I am reading the CURRENT FreeBSD code in tcp_output.c, a= nd find this question regarding your change in revision 271946. https://svnweb.freebsd.org/base/head/sys/netinet/tcp_output.c?r1=3D271946&r= 2=3D271945&pathrev=3D271946 trim data "len" under TSO: 885 /* 886 * Prevent the last segment from being 887 * fractional unless the send sockbuf can be 888 * emptied: 889 */ 890 max_len =3D (tp->t_maxopd - optlen); 891 if ((off + len) < sbavail(&so->so_snd)) { <= =3D=3D 892 moff =3D len % max_len; 893 if (moff !=3D 0) { 894 len -=3D moff; 895 sendalot =3D 1; 896 } 897 } Is there a specific reason that it should skip trimming the data "len" unde= r the condition of "(off + len) =3D=3D sbavail(&so->so_snd)" in TSO? Becaus= e I am wondering if we can trim the data "len" directly without checking th= e "(off + len)" condition. Thanks, --Cheng Cui NetApp Scale Out Networking From owner-svn-src-head@freebsd.org Fri Nov 6 20:45:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65DCBA28BEA; Fri, 6 Nov 2015 20:45:20 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3465817CA; Fri, 6 Nov 2015 20:45:20 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6KjJqB051457; Fri, 6 Nov 2015 20:45:19 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6KjJw6051456; Fri, 6 Nov 2015 20:45:19 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511062045.tA6KjJw6051456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 6 Nov 2015 20:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290466 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 20:45:20 -0000 Author: smh Date: Fri Nov 6 20:45:19 2015 New Revision: 290466 URL: https://svnweb.freebsd.org/changeset/base/290466 Log: Switch zfs_panic_recover to panic for bad DVA As reported by Coverity a null pointer de-reference panic would be triggered when zfs_recover was set so switch to straight panic as it can never be recovered. Reported by: Coverity Scan MFC after: 1 X-MFC-With: r290401 Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c 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 Nov 6 20:12:31 2015 (r290465) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Nov 6 20:45:19 2015 (r290466) @@ -1838,7 +1838,7 @@ dva_get_dsize_sync(spa_t *spa, const dva uint64_t vdev = DVA_GET_VDEV(dva); vdev_t *vd = vdev_lookup_top(spa, vdev); if (vd == NULL) { - zfs_panic_recover( + panic( "dva_get_dsize_sync(): bad DVA %llu:%llu", (u_longlong_t)vdev, (u_longlong_t)asize); } From owner-svn-src-head@freebsd.org Fri Nov 6 20:48:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 171A9A28C3B for ; Fri, 6 Nov 2015 20:48:00 +0000 (UTC) (envelope-from Cheng.Cui@netapp.com) Received: from mx142.netapp.com (mx142.netapp.com [216.240.21.19]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (Client CN "mx142.netapp.com", Issuer "Symantec Class 3 Secure Server CA - G4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C41A3196F; Fri, 6 Nov 2015 20:47:59 +0000 (UTC) (envelope-from Cheng.Cui@netapp.com) X-IronPort-AV: E=Sophos;i="5.20,253,1444719600"; d="scan'208";a="75513763" Received: from hioexcmbx05-prd.hq.netapp.com ([10.122.105.38]) by mx142-out.netapp.com with ESMTP; 06 Nov 2015 12:46:58 -0800 Received: from HIOEXCMBX03-PRD.hq.netapp.com (10.122.105.36) by hioexcmbx05-prd.hq.netapp.com (10.122.105.38) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Fri, 6 Nov 2015 12:46:58 -0800 Received: from HIOEXCMBX03-PRD.hq.netapp.com ([::1]) by hioexcmbx03-prd.hq.netapp.com ([fe80::25cc:26bf:f7e1:4fa2%21]) with mapi id 15.00.1104.000; Fri, 6 Nov 2015 12:46:58 -0800 From: "Cui, Cheng" To: "hselasky@FreeBSD.org" CC: "svn-src-head@freebsd.org" Subject: question about trimning data "len" conditions in TSO in tcp_output.c Thread-Topic: question about trimning data "len" conditions in TSO in tcp_output.c Thread-Index: AQHRGNRH3ZqdnMKQ9kSAjiggGnHKag== Date: Fri, 6 Nov 2015 20:46:57 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.1878.6) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.122.56.79] Content-Type: text/plain; charset="us-ascii" Content-ID: <6D86BB6871FC8B4A8131E4992257578B@hq.netapp.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 20:48:00 -0000 Hello Hans, Sorry if my previous email does not reach you because of a bad subject. This is Cheng Cui. I am reading the CURRENT FreeBSD code in tcp_output.c, a= nd find this question regarding your change in revision 271946. https://svnweb.freebsd.org/base/head/sys/netinet/tcp_output.c?r1=3D271946&r= 2=3D271945&pathrev=3D271946 trim data "len" under TSO: 885 /* 886 * Prevent the last segment from being 887 * fractional unless the send sockbuf can be 888 * emptied: 889 */ 890 max_len =3D (tp->t_maxopd - optlen); 891 if ((off + len) < sbavail(&so->so_snd)) { <= =3D=3D 892 moff =3D len % max_len; 893 if (moff !=3D 0) { 894 len -=3D moff; 895 sendalot =3D 1; 896 } 897 } Is there a specific reason that it should skip trimming the data "len" unde= r the condition of "(off + len) =3D=3D sbavail(&so->so_snd)" in TSO? Becaus= e I am wondering if we can trim the data "len" directly without checking th= e "(off + len)" condition. Thanks, --Cheng Cui NetApp Scale Out Networking From owner-svn-src-head@freebsd.org Fri Nov 6 20:50:39 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1285A28CA2; Fri, 6 Nov 2015 20:50:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8B9D41A44; Fri, 6 Nov 2015 20:50:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 82B7A1A5F; Fri, 6 Nov 2015 20:50:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 41C9812E9F; Fri, 6 Nov 2015 20:50:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id ZW6VByjd0S4S; Fri, 6 Nov 2015 20:50:37 +0000 (UTC) Subject: Re: svn commit: r290417 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com BA21012E98 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511052148.tA5LmCNg042187@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <563D12A1.20104@FreeBSD.org> Date: Fri, 6 Nov 2015 12:50:41 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201511052148.tA5LmCNg042187@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7lMVXlmfGSNfDovMq6DKHGfNhm3wI2SF3" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 20:50:39 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7lMVXlmfGSNfDovMq6DKHGfNhm3wI2SF3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/5/2015 1:48 PM, Warner Losh wrote: > Author: imp > Date: Thu Nov 5 21:48:12 2015 > New Revision: 290417 > URL: https://svnweb.freebsd.org/changeset/base/290417 >=20 > Log: > Fix CC being wrong during install* targets. > =20 This most likely fixes the "installworld fails with ccache, mk/bsd.compiler.mk unable to determine compiler" issue as well described in PRs 173914 and 203107. --=20 Regards, Bryan Drewery --7lMVXlmfGSNfDovMq6DKHGfNhm3wI2SF3 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 iQEcBAEBAgAGBQJWPRKhAAoJEDXXcbtuRpfPBCMH/i7gLJVWW0+B1juYCzhXATjG /iC/viqxEK5F450vVoWetpqvsqS2LYEXn4IqUhcHltk1+yhmpISN7CDAqKNyjVLY ewUwYM0Dy4oF75VBx/BTUufZGKy9UAJMMjbLL0Fh0aLv3IbfpVvOXXbkuTATFxBx 9C62Wk781dMM5BYv0k/sY8s1HVdxhr+Obql4ZQA31/WUHwE502VbN7Lk16dtv23Y Pijae83tCl3qdAeeXQMKPJQh/hTm+6JeLhwAhs8Yt1QmS46pmWnlq/7wbGdE7JLm TIH9cfnUYAw8FPKnckAM+kFVB2ZbUDgs1+OWkO9/TVoENBouzxo2u0by2FnlSAU= =eHPC -----END PGP SIGNATURE----- --7lMVXlmfGSNfDovMq6DKHGfNhm3wI2SF3-- From owner-svn-src-head@freebsd.org Fri Nov 6 21:08:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12682A28F7B; Fri, 6 Nov 2015 21:08:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E6D5012EC; Fri, 6 Nov 2015 21:08:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id DDF791E46; Fri, 6 Nov 2015 21:08:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 951FD12EE4; Fri, 6 Nov 2015 21:08:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id wcEaVN-ftL5P; Fri, 6 Nov 2015 21:08:05 +0000 (UTC) Subject: Re: svn commit: r290437 - head/usr.bin/netstat DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com B92EB12EDA To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511060843.tA68hCov032306@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <563D16BB.6060908@FreeBSD.org> Date: Fri, 6 Nov 2015 13:08:11 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201511060843.tA68hCov032306@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oXOUQBpAl8nQAOnkbtaTJp6r0A6EM8F5c" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 21:08:13 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oXOUQBpAl8nQAOnkbtaTJp6r0A6EM8F5c Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/6/2015 12:43 AM, Garrett Cooper wrote: > Author: ngie > Date: Fri Nov 6 08:43:12 2015 > New Revision: 290437 > URL: https://svnweb.freebsd.org/changeset/base/290437 >=20 > Log: > Fix compiling netstat after r290367 by substituting sys/types.h for > sys/param.h, as sys/param.h defines the MAX(..) macro > =20 > Reported by: O. Hartmann > Pointyhat to: ume >=20 > Modified: > head/usr.bin/netstat/if.c >=20 > Modified: head/usr.bin/netstat/if.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/usr.bin/netstat/if.c Fri Nov 6 05:32:18 2015 (r290436) > +++ head/usr.bin/netstat/if.c Fri Nov 6 08:43:12 2015 (r290437) > @@ -37,7 +37,7 @@ static char sccsid[] =3D "@(#)if.c 8.3 (Be > #include > __FBSDID("$FreeBSD$"); > =20 > -#include > +#include > #include > #include > #include >=20 This is strange, it was building fine for days, and builds fine for me locally with reverting this change. While this may be proper, how is this a 'fix compiling' and a 'pointyhat'? --=20 Regards, Bryan Drewery --oXOUQBpAl8nQAOnkbtaTJp6r0A6EM8F5c 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 iQEcBAEBAgAGBQJWPRa7AAoJEDXXcbtuRpfPCnUIAL4xrL2sp53jnNoPPu6qMUPS TFbjUMOBdCBIkSSY8t/5zY+J4lkqVJfKSgWM4MjH2YScI6RznVB8yXbp0bHf5e8d Jh3MCuQV2neygQD+Q8lZv8OCiqI4YGNOl72MiXw454wvRgbOREF3o+cPkkNN+SAN /JNZCFxrjJ40cCeQiVvU8NcAvQ+VNtB85PAPyi08+oIOuokkUPkoogzV6AsIZ3r5 l4OktDkIANJAr8MICEkfzG5gxT4lUlIEiOwtDlFhP2tpzgix/DuvdfcEBqSMxSDP 46BYOcXhnpmQ5g+k9Qqg74simYjE4F1pPDF+FkbNOhBxrEpzLE/u2+Zmen8FOmw= =L35k -----END PGP SIGNATURE----- --oXOUQBpAl8nQAOnkbtaTJp6r0A6EM8F5c-- From owner-svn-src-head@freebsd.org Fri Nov 6 21:14:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1DE2A280D8 for ; Fri, 6 Nov 2015 21:14:23 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A4AA182F for ; Fri, 6 Nov 2015 21:14:23 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 522F91FE023; Fri, 6 Nov 2015 22:14:20 +0100 (CET) Subject: Re: question about trimning data "len" conditions in TSO in tcp_output.c To: "Cui, Cheng" References: Cc: "svn-src-head@freebsd.org" From: Hans Petter Selasky Message-ID: <563D1892.3050406@selasky.org> Date: Fri, 6 Nov 2015 22:16:02 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 21:14:23 -0000 On 11/06/15 21:46, Cui, Cheng wrote: > Hello Hans, > > Sorry if my previous email does not reach you because of a bad subject. > > This is Cheng Cui. I am reading the CURRENT FreeBSD code in tcp_output.c, and find this question regarding your change in revision 271946. > https://svnweb.freebsd.org/base/head/sys/netinet/tcp_output.c?r1=271946&r2=271945&pathrev=271946 > > trim data "len" under TSO: > > 885 /* > 886 * Prevent the last segment from being > 887 * fractional unless the send sockbuf can be > 888 * emptied: > 889 */ > 890 max_len = (tp->t_maxopd - optlen); > 891 if ((off + len) < sbavail(&so->so_snd)) { <== > 892 moff = len % max_len; > 893 if (moff != 0) { > 894 len -= moff; > 895 sendalot = 1; > 896 } > 897 } > > Is there a specific reason that it should skip trimming the data "len" under the condition of "(off + len) == sbavail(&so->so_snd)" in TSO? > Because I am wondering if we can trim the data "len" directly without checking the "(off + len)" condition. Hi Cheng, I believe the reason is to avoid looping one more time outputting a single packet containing the remainder of the available data, with regard to max_len. How did you envision the removal of this check would influence the generated packet sequence? --HPS > > Thanks, > --Cheng Cui > NetApp Scale Out Networking > > From owner-svn-src-head@freebsd.org Fri Nov 6 21:49:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F31B4A28529; Fri, 6 Nov 2015 21:49:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF8D612D0; Fri, 6 Nov 2015 21:49:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6LnHKk068571; Fri, 6 Nov 2015 21:49:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6LnHf3068570; Fri, 6 Nov 2015 21:49:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511062149.tA6LnHf3068570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 6 Nov 2015 21:49:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290467 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 21:49:19 -0000 Author: bdrewery Date: Fri Nov 6 21:49:17 2015 New Revision: 290467 URL: https://svnweb.freebsd.org/changeset/base/290467 Log: The 'buildenv' target can safely be ran with '+'. Modified: head/share/mk/src.init.mk Modified: head/share/mk/src.init.mk ============================================================================== --- head/share/mk/src.init.mk Fri Nov 6 20:45:19 2015 (r290466) +++ head/share/mk/src.init.mk Fri Nov 6 21:49:17 2015 (r290467) @@ -5,7 +5,7 @@ ____: .if !target(buildenv) buildenv: .PHONY - @env BUILDENV_DIR=${.CURDIR} ${MAKE} -C ${SRCTOP} buildenv + ${_+_}@env BUILDENV_DIR=${.CURDIR} ${MAKE} -C ${SRCTOP} buildenv .endif .endif # !target(____) From owner-svn-src-head@freebsd.org Fri Nov 6 21:57:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00B12A28785 for ; Fri, 6 Nov 2015 21:57:52 +0000 (UTC) (envelope-from Cheng.Cui@netapp.com) Received: from mx143.netapp.com (mx143.netapp.com [216.240.21.24]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (Client CN "mx143.netapp.com", Issuer "Symantec Class 3 Secure Server CA - G4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B067B18A6 for ; Fri, 6 Nov 2015 21:57:52 +0000 (UTC) (envelope-from Cheng.Cui@netapp.com) X-IronPort-AV: E=Sophos;i="5.20,254,1444719600"; d="scan'208";a="77154156" Received: from hioexcmbx06-prd.hq.netapp.com ([10.122.105.39]) by mx143-out.netapp.com with ESMTP; 06 Nov 2015 13:56:44 -0800 Received: from HIOEXCMBX03-PRD.hq.netapp.com (10.122.105.36) by hioexcmbx06-prd.hq.netapp.com (10.122.105.39) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Fri, 6 Nov 2015 13:56:43 -0800 Received: from HIOEXCMBX03-PRD.hq.netapp.com ([::1]) by hioexcmbx03-prd.hq.netapp.com ([fe80::25cc:26bf:f7e1:4fa2%21]) with mapi id 15.00.1104.000; Fri, 6 Nov 2015 13:56:43 -0800 From: "Cui, Cheng" To: Hans Petter Selasky CC: "Cui, Cheng" , "svn-src-head@freebsd.org" Subject: Re: question about trimning data "len" conditions in TSO in tcp_output.c Thread-Topic: question about trimning data "len" conditions in TSO in tcp_output.c Thread-Index: AQHRGNRH3ZqdnMKQ9kSAjiggGnHKap6QBSEAgAALXQA= Date: Fri, 6 Nov 2015 21:56:43 +0000 Message-ID: References: <563D1892.3050406@selasky.org> In-Reply-To: <563D1892.3050406@selasky.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.1878.6) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.122.56.79] Content-Type: text/plain; charset="Windows-1252" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 21:57:53 -0000 On Nov 6, 2015, at 4:16 PM, Hans Petter Selasky wrote: > On 11/06/15 21:46, Cui, Cheng wrote: >> Hello Hans, >>=20 >> Sorry if my previous email does not reach you because of a bad subject. >>=20 >> This is Cheng Cui. I am reading the CURRENT FreeBSD code in tcp_output.c= , and find this question regarding your change in revision 271946. >> https://svnweb.freebsd.org/base/head/sys/netinet/tcp_output.c?r1=3D27194= 6&r2=3D271945&pathrev=3D271946 >>=20 >> trim data "len" under TSO: >>=20 >> 885 /* >> 886 * Prevent the last segment from being >> 887 * fractional unless the send sockbuf can be >> 888 * emptied: >> 889 */ >> 890 max_len =3D (tp->t_maxopd - optlen); >> 891 if ((off + len) < sbavail(&so->so_snd)) { = <=3D=3D >> 892 moff =3D len % max_len; >> 893 if (moff !=3D 0) { >> 894 len -=3D moff; >> 895 sendalot =3D 1; >> 896 } >> 897 } >>=20 >> Is there a specific reason that it should skip trimming the data "len" u= nder the condition of "(off + len) =3D=3D sbavail(&so->so_snd)" in TSO? > > Because I am wondering if we can trim the data "len" directly without c= hecking the "(off + len)" condition. >=20 > Hi Cheng, >=20 > I believe the reason is to avoid looping one more time outputting a singl= e packet containing the remainder of the available data, with regard to max= _len. How did you envision the removal of this check would influence the ge= nerated packet sequence? >=20 > --HPS >=20 Hi Hans, I may be wrong but my assumption is that the remainder of the available dat= a may be larger than one single packet. Suppose max_len=3D=3D1500, sb_acc=3D=3D3001, off=3D=3D2, and (off+len)=3D= =3D3001. In this case, the current code will not trim the "len" and let it = go directly to the NIC. I think it skips the Nagle's algorithm. As len=3D= =3D2999, the last packet is 1499, it is supposed to be held until all outst= anding data are ACKed, but it has been sent out. Cheng From owner-svn-src-head@freebsd.org Fri Nov 6 22:07:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 768C1A2898E; Fri, 6 Nov 2015 22:07:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 616A21D8C; Fri, 6 Nov 2015 22:07:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 5882A18A6; Fri, 6 Nov 2015 22:07:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 0F39512044; Fri, 6 Nov 2015 22:07:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id b4WcNBJH-CE8; Fri, 6 Nov 2015 22:07:14 +0000 (UTC) Subject: Re: svn commit: r290423 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com D2D7F1203E To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511052209.tA5M90Qd048188@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <563D2496.8050707@FreeBSD.org> Date: Fri, 6 Nov 2015 14:07:18 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201511052209.tA5M90Qd048188@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kkb6I0bjWOJsFpCCrdlcjIdGB8GldfR0W" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 22:07:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kkb6I0bjWOJsFpCCrdlcjIdGB8GldfR0W Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/5/2015 2:09 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Nov 5 22:09:00 2015 > New Revision: 290423 > URL: https://svnweb.freebsd.org/changeset/base/290423 >=20 > Log: > Allow 'make buildenv' to default to the caller's shell by using SHELL= =2E Sigh. ZSH does really stupid things. All of these variables are basically forced to be some internal value and cannot be overridden: CPUTYPE MACHTYPE OSTYPE VENDOR TMPPREFIX TIMEFMT WATCHFMT LISTMAX KEYTIMEOUT LOGCHECK MAILCHECK This means CPUTYPE=3D has no affect in buildenv and you end up with the host's value there, which breaks compiling. =46rom ZSH (not buildenv): # env|grep CPUTYPE # echo $CPUTYPE amd64 # env -i /usr/local/bin/zsh -c env|grep CPUTYPE # env -i CPUTYPE=3Dfoo /usr/local/bin/zsh -c env|grep CPUTYPE CPUTYPE=3Damd64 --=20 Regards, Bryan Drewery --kkb6I0bjWOJsFpCCrdlcjIdGB8GldfR0W 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 iQEcBAEBAgAGBQJWPSSXAAoJEDXXcbtuRpfPGrsH/2+oWMSf2CqXpoND/nwJZQqm 3Q4lzANtI6jG81F652uI9jZmon7CWDsEaF70WqHTVQUPmJwl9hQYJ4ySKgBFF/s7 mZ63+pcJjw1WsVVdI1W0doQEd3yBOEb6E4Uw9HEVPmCJ/ihomtnAwLAcajlryyXW b3vQp6TAaiBPEOsW5wamH6R8z9vJU1I2/mlYIVrZHtA1I6dF79KJLVAQjQY7ngac YG627ow49Zr9/OLfp1HLNUoK5pSLPy370tHyCiGBKKncLJmUPxHd3yP2YEyRmh12 N/LQOUnoJndxBJ7KbPZH2RJ1IVTvZaZ3PRpnV82mdFawClVIc/uTc2Pfvyl4cjg= =6ycP -----END PGP SIGNATURE----- --kkb6I0bjWOJsFpCCrdlcjIdGB8GldfR0W-- From owner-svn-src-head@freebsd.org Fri Nov 6 22:08:07 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43560A289DF; Fri, 6 Nov 2015 22:08:07 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 096261EE8; Fri, 6 Nov 2015 22:08:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6M86hT074268; Fri, 6 Nov 2015 22:08:06 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6M86Al074267; Fri, 6 Nov 2015 22:08:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201511062208.tA6M86Al074267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 6 Nov 2015 22:08:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290468 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 22:08:07 -0000 Author: tuexen Date: Fri Nov 6 22:08:05 2015 New Revision: 290468 URL: https://svnweb.freebsd.org/changeset/base/290468 Log: Use the correct length. The wrong one was too large. MFC after: 3 days Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Fri Nov 6 21:49:17 2015 (r290467) +++ head/sys/netinet/sctp_indata.c Fri Nov 6 22:08:05 2015 (r290468) @@ -225,7 +225,7 @@ sctp_build_ctl_nchunk(struct sctp_inpcb if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVNXTINFO) && (seinfo->serinfo_next_flags & SCTP_NEXT_MSG_AVAIL)) { provide_nxt = 1; - len += CMSG_SPACE(sizeof(struct sctp_rcvinfo)); + len += CMSG_SPACE(sizeof(struct sctp_nxtinfo)); } else { provide_nxt = 0; } From owner-svn-src-head@freebsd.org Fri Nov 6 22:24:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC07EA28C54; Fri, 6 Nov 2015 22:24:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79B9817B3; Fri, 6 Nov 2015 22:24:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6MOfX6079719; Fri, 6 Nov 2015 22:24:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6MOfjS079718; Fri, 6 Nov 2015 22:24:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201511062224.tA6MOfjS079718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 6 Nov 2015 22:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290470 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 22:24:42 -0000 Author: dim Date: Fri Nov 6 22:24:41 2015 New Revision: 290470 URL: https://svnweb.freebsd.org/changeset/base/290470 Log: Add maintainer entries for llvm, lldb, compiler-rt, libc++ and libcxxrt. Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Fri Nov 6 22:22:37 2015 (r290469) +++ head/MAINTAINERS Fri Nov 6 22:24:41 2015 (r290470) @@ -52,6 +52,11 @@ openssh des Pre-commit review requested pseudofs des Pre-commit review requested. procfs des Pre-commit review requested. linprocfs des Pre-commit review requested. +contrib/compiler-rt dim Pre-commit review preferred. +contrib/libc++ dim Pre-commit review preferred. +contrib/libcxxrt dim Pre-commit review preferred. +contrib/llvm dim Pre-commit review preferred. +contrib/llvm/tools/lldb emaste Pre-commit review preferred. ---- OLD ---- libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. From owner-svn-src-head@freebsd.org Fri Nov 6 22:37:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB5BBA28DB4 for ; Fri, 6 Nov 2015 22:37:55 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E8D41C0F for ; Fri, 6 Nov 2015 22:37:55 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 2DEAF1FE023; Fri, 6 Nov 2015 23:37:52 +0100 (CET) Subject: Re: question about trimning data "len" conditions in TSO in tcp_output.c To: "Cui, Cheng" References: <563D1892.3050406@selasky.org> Cc: "svn-src-head@freebsd.org" From: Hans Petter Selasky Message-ID: <563D2C26.2070300@selasky.org> Date: Fri, 6 Nov 2015 23:39:34 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 22:37:55 -0000 On 11/06/15 22:56, Cui, Cheng wrote: > On Nov 6, 2015, at 4:16 PM, Hans Petter Selasky wrote: > >> On 11/06/15 21:46, Cui, Cheng wrote: >>> Hello Hans, >>> >>> Sorry if my previous email does not reach you because of a bad subject. >>> >>> This is Cheng Cui. I am reading the CURRENT FreeBSD code in tcp_output.c, and find this question regarding your change in revision 271946. >>> https://svnweb.freebsd.org/base/head/sys/netinet/tcp_output.c?r1=271946&r2=271945&pathrev=271946 >>> >>> trim data "len" under TSO: >>> >>> 885 /* >>> 886 * Prevent the last segment from being >>> 887 * fractional unless the send sockbuf can be >>> 888 * emptied: >>> 889 */ >>> 890 max_len = (tp->t_maxopd - optlen); >>> 891 if ((off + len) < sbavail(&so->so_snd)) { <== >>> 892 moff = len % max_len; >>> 893 if (moff != 0) { >>> 894 len -= moff; >>> 895 sendalot = 1; >>> 896 } >>> 897 } >>> >>> Is there a specific reason that it should skip trimming the data "len" under the condition of "(off + len) == sbavail(&so->so_snd)" in TSO? >>> Because I am wondering if we can trim the data "len" directly without checking the "(off + len)" condition. >> >> Hi Cheng, >> >> I believe the reason is to avoid looping one more time outputting a single packet containing the remainder of the available data, with regard to max_len. > How did you envision the removal of this check would influence the generated packet sequence? >> >> --HPS >> > Hi Hans, > > I may be wrong but my assumption is that the remainder of the available data may be larger than one single packet. > > Suppose max_len==1500, sb_acc==3001, off==2, and (off+len)==3001. In this case, the current code will not trim the "len" > and let it go directly to the NIC. I think it skips the Nagle's algorithm. As len==2999, the last packet is 1499, > it is supposed to be held until all outstanding data are ACKed, but it has been sent out. Hi Cheng, That is correct. Nagle's algorithm is not active when "(off+len) == sb_acc". Anyhow, the check for "(off+len) == sb_acc" does not go away. It has to be put before sendalot = 1 to avoid sending the so-called "small packet" in the next iteration. Possibly you will need to add a check for TCP nodelay being active, which disable Nagle's algorithm. Have you done any tests removing this check? --HPS From owner-svn-src-head@freebsd.org Fri Nov 6 23:07:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2691A274B1; Fri, 6 Nov 2015 23:07:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 822CA1B46; Fri, 6 Nov 2015 23:07:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6N7iNB091301; Fri, 6 Nov 2015 23:07:44 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6N7iYa091296; Fri, 6 Nov 2015 23:07:44 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511062307.tA6N7iYa091296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 6 Nov 2015 23:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290471 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 23:07:46 -0000 Author: adrian Date: Fri Nov 6 23:07:43 2015 New Revision: 290471 URL: https://svnweb.freebsd.org/changeset/base/290471 Log: [netinet6]: Create a new IPv6 netisr which expects the frames to have been verified. This is required for fragments and encapsulated data (eg tunneling) to be redistributed to the RSS bucket based on the eventual IPv6 header and protocol (TCP, UDP, etc) header. * Add an mbuf tag with the state of IPv6 options parsing before the frame is queued into the direct dispatch handler; * Continue processing and complete the frame reception in the correct RSS bucket / netisr context. Testing results are in the phabricator review. Differential Revision: https://reviews.freebsd.org/D3563 Submitted by: Tiwei Bie Modified: head/sys/netinet6/frag6.c head/sys/netinet6/in6.h head/sys/netinet6/in6_rss.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_var.h Modified: head/sys/netinet6/frag6.c ============================================================================== --- head/sys/netinet6/frag6.c Fri Nov 6 22:24:41 2015 (r290470) +++ head/sys/netinet6/frag6.c Fri Nov 6 23:07:43 2015 (r290471) @@ -32,6 +32,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_rss.h" + #include #include #include @@ -46,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -159,6 +162,11 @@ frag6_input(struct mbuf **mp, int *offp, int fragoff, frgpartlen; /* must be larger than u_int16_t */ struct ifnet *dstifp; u_int8_t ecn, ecn0; +#ifdef RSS + struct m_tag *mtag; + struct ip6_direct_ctx *ip6dc; +#endif + #if 0 char ip6buf[INET6_ADDRSTRLEN]; #endif @@ -577,9 +585,31 @@ insert: m->m_pkthdr.len = plen; } +#ifdef RSS + mtag = m_tag_alloc(MTAG_ABI_IPV6, IPV6_TAG_DIRECT, sizeof(*ip6dc), + M_NOWAIT); + if (mtag == NULL) + goto dropfrag; + + ip6dc = (struct ip6_direct_ctx *)(mtag + 1); + ip6dc->ip6dc_nxt = nxt; + ip6dc->ip6dc_off = offset; + + m_tag_prepend(m, mtag); +#endif + + IP6Q_UNLOCK(); IP6STAT_INC(ip6s_reassembled); in6_ifstat_inc(dstifp, ifs6_reass_ok); +#ifdef RSS + /* + * Queue/dispatch for reprocessing. + */ + netisr_dispatch(NETISR_IPV6_DIRECT, m); + return IPPROTO_DONE; +#endif + /* * Tell launch routine the next header */ @@ -587,7 +617,6 @@ insert: *mp = m; *offp = offset; - IP6Q_UNLOCK(); return nxt; dropfrag: Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Fri Nov 6 22:24:41 2015 (r290470) +++ head/sys/netinet6/in6.h Fri Nov 6 23:07:43 2015 (r290471) @@ -382,6 +382,11 @@ struct route_in6 { }; #endif +#ifdef _KERNEL +#define MTAG_ABI_IPV6 1444287380 /* IPv6 ABI */ +#define IPV6_TAG_DIRECT 0 /* direct-dispatch IPv6 */ +#endif /* _KERNEL */ + /* * Options for use with [gs]etsockopt at the IPV6 level. * First word of comment is data type; bool is stored in int. Modified: head/sys/netinet6/in6_rss.c ============================================================================== --- head/sys/netinet6/in6_rss.c Fri Nov 6 22:24:41 2015 (r290470) +++ head/sys/netinet6/in6_rss.c Fri Nov 6 23:07:43 2015 (r290471) @@ -172,6 +172,7 @@ rss_mbuf_software_hash_v6(const struct m uint32_t *hashtype) { const struct ip6_hdr *ip6; + const struct ip6_frag *ip6f; const struct tcphdr *th; const struct udphdr *uh; uint32_t flowtype; @@ -222,6 +223,26 @@ rss_mbuf_software_hash_v6(const struct m } /* + * Ignore the fragment header if this is an "atomic" fragment + * (offset and m bit set to 0) + */ + if (proto == IPPROTO_FRAGMENT) { + if (m->m_len < off + sizeof(struct ip6_frag)) { + RSS_DEBUG("short fragment frame?\n"); + return (-1); + } + ip6f = (const struct ip6_frag *)((c_caddr_t)ip6 + off); + if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) { + off = ip6_lasthdr(m, off, proto, &nxt); + if (off < 0) { + RSS_DEBUG("invalid extension header\n"); + return (-1); + } + proto = nxt; + } + } + + /* * If the mbuf flowid/flowtype matches the packet type, * and we don't support the 4-tuple version of the given protocol, * then signal to the owner that it can trust the flowid/flowtype Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Fri Nov 6 22:24:41 2015 (r290470) +++ head/sys/netinet6/ip6_input.c Fri Nov 6 23:07:43 2015 (r290471) @@ -144,6 +144,17 @@ static struct netisr_handler ip6_nh = { #endif }; +#ifdef RSS +static struct netisr_handler ip6_direct_nh = { + .nh_name = "ip6_direct", + .nh_handler = ip6_direct_input, + .nh_proto = NETISR_IPV6_DIRECT, + .nh_m2cpuid = rss_soft_m2cpuid_v6, + .nh_policy = NETISR_POLICY_CPU, + .nh_dispatch = NETISR_DISPATCH_HYBRID, +}; +#endif + VNET_DECLARE(struct callout, in6_tmpaddrtimer_ch); #define V_in6_tmpaddrtimer_ch VNET(in6_tmpaddrtimer_ch) @@ -222,6 +233,9 @@ ip6_init(void) } netisr_register(&ip6_nh); +#ifdef RSS + netisr_register(&ip6_direct_nh); +#endif } /* @@ -403,6 +417,66 @@ out: return (1); } +#ifdef RSS +/* + * IPv6 direct input routine. + * + * This is called when reinjecting completed fragments where + * all of the previous checking and book-keeping has been done. + */ +void +ip6_direct_input(struct mbuf *m) +{ + int off, nxt; + int nest; + struct m_tag *mtag; + struct ip6_direct_ctx *ip6dc; + + mtag = m_tag_locate(m, MTAG_ABI_IPV6, IPV6_TAG_DIRECT, NULL); + KASSERT(mtag != NULL, ("Reinjected packet w/o direct ctx tag!")); + + ip6dc = (struct ip6_direct_ctx *)(mtag + 1); + nxt = ip6dc->ip6dc_nxt; + off = ip6dc->ip6dc_off; + + nest = 0; + + m_tag_delete(m, mtag); + + while (nxt != IPPROTO_DONE) { + if (V_ip6_hdrnestlimit && (++nest > V_ip6_hdrnestlimit)) { + IP6STAT_INC(ip6s_toomanyhdr); + goto bad; + } + + /* + * protection against faulty packet - there should be + * more sanity checks in header chain processing. + */ + if (m->m_pkthdr.len < off) { + IP6STAT_INC(ip6s_tooshort); + in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); + goto bad; + } + +#ifdef IPSEC + /* + * enforce IPsec policy checking if we are seeing last header. + * note that we do not visit this with protocols with pcb layer + * code - like udp/tcp/raw ip. + */ + if (ip6_ipsec_input(m, nxt)) + goto bad; +#endif /* IPSEC */ + + nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &off, nxt); + } + return; +bad: + m_freem(m); +} +#endif + void ip6_input(struct mbuf *m) { @@ -713,6 +787,13 @@ passin: nxt = ip6->ip6_nxt; /* + * Use mbuf flags to propagate Router Alert option to + * ICMPv6 layer, as hop-by-hop options have been stripped. + */ + if (rtalert != ~0) + m->m_flags |= M_RTALERT_MLD; + + /* * Check that the amount of data in the buffers * is as at least much as the IPv6 header would have us expect. * Trim mbufs if longer than we expect. @@ -809,13 +890,6 @@ passin: goto bad; #endif /* IPSEC */ - /* - * Use mbuf flags to propagate Router Alert option to - * ICMPv6 layer, as hop-by-hop options have been stripped. - */ - if (nxt == IPPROTO_ICMPV6 && rtalert != ~0) - m->m_flags |= M_RTALERT_MLD; - nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &off, nxt); } return; Modified: head/sys/netinet6/ip6_var.h ============================================================================== --- head/sys/netinet6/ip6_var.h Fri Nov 6 22:24:41 2015 (r290470) +++ head/sys/netinet6/ip6_var.h Fri Nov 6 23:07:43 2015 (r290471) @@ -99,6 +99,14 @@ struct ip6asfrag { #define IP6_REASS_MBUF(ip6af) (*(struct mbuf **)&((ip6af)->ip6af_m)) /* + * IP6 reinjecting structure. + */ +struct ip6_direct_ctx { + uint32_t ip6dc_nxt; /* next header to process */ + uint32_t ip6dc_off; /* offset to next header */ +}; + +/* * Structure attached to inpcb.in6p_moptions and * passed to ip6_output when IPv6 multicast options are in use. * This structure is lazy-allocated. @@ -353,6 +361,7 @@ int ip6proto_register(short); int ip6proto_unregister(short); void ip6_input(struct mbuf *); +void ip6_direct_input(struct mbuf *); void ip6_freepcbopts(struct ip6_pktopts *); int ip6_unknown_opt(u_int8_t *, struct mbuf *, int); From owner-svn-src-head@freebsd.org Fri Nov 6 23:17:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 748FBA277AD; Fri, 6 Nov 2015 23:17:01 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F2D81FF8; Fri, 6 Nov 2015 23:17:01 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6NH0kS094181; Fri, 6 Nov 2015 23:17:00 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6NH0OU094180; Fri, 6 Nov 2015 23:17:00 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201511062317.tA6NH0OU094180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Fri, 6 Nov 2015 23:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290472 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 23:17:01 -0000 Author: skra Date: Fri Nov 6 23:17:00 2015 New Revision: 290472 URL: https://svnweb.freebsd.org/changeset/base/290472 Log: Set correct code for signal in abort_align() routine. Remove superfluous printf() and both unnecessary and obsolete comments. Approved by: kib (mentor) Modified: head/sys/arm/arm/trap-v6.c Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Fri Nov 6 23:07:43 2015 (r290471) +++ head/sys/arm/arm/trap-v6.c Fri Nov 6 23:17:00 2015 (r290472) @@ -620,26 +620,17 @@ abort_align(struct trapframe *tf, u_int u_int usermode; usermode = TRAPF_USERMODE(tf); - - /* - * Alignment faults are always fatal if they occur in any but user mode. - * - * XXX The old trap code handles pcb fault even for alignment traps. - * Unfortunately, we don't known why and if is this need. - */ if (!usermode) { if (td->td_intr_nesting_level == 0 && td != NULL && td->td_pcb->pcb_onfault != NULL) { - printf("%s: Got alignment fault with pcb_onfault set" - ", please report this issue\n", __func__); - tf->tf_r0 = EFAULT;; + tf->tf_r0 = EFAULT; tf->tf_pc = (int)td->td_pcb->pcb_onfault; return (0); } abort_fatal(tf, idx, fsr, far, prefetch, td, ksig); } /* Deliver a bus error signal to the process */ - ksig->code = 0; + ksig->code = BUS_ADRALN; ksig->sig = SIGBUS; ksig->addr = far; return (1); From owner-svn-src-head@freebsd.org Sat Nov 7 00:18:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DE73A283D7; Sat, 7 Nov 2015 00:18:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03CF51796; Sat, 7 Nov 2015 00:18:15 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA70IFVC011680; Sat, 7 Nov 2015 00:18:15 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA70IF19011678; Sat, 7 Nov 2015 00:18:15 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201511070018.tA70IF19011678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 7 Nov 2015 00:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290473 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 00:18:16 -0000 Author: mjg Date: Sat Nov 7 00:18:14 2015 New Revision: 290473 URL: https://svnweb.freebsd.org/changeset/base/290473 Log: fd: implement kern.proc.nfds sysctl Intended purpose is to provide an equivalent of OpenBSD's getdtablecount syscall for the compat library.. Modified: head/sys/kern/kern_descrip.c head/sys/sys/sysctl.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Nov 6 23:17:00 2015 (r290472) +++ head/sys/kern/kern_descrip.c Sat Nov 7 00:18:14 2015 (r290473) @@ -3157,6 +3157,30 @@ filedesc_to_leader_alloc(struct filedesc return (fdtol); } +static int +sysctl_kern_proc_nfds(SYSCTL_HANDLER_ARGS) +{ + struct filedesc *fdp; + int i, count, slots; + + if (*(int *)arg1 != 0) + return (EINVAL); + + fdp = curproc->p_fd; + count = 0; + FILEDESC_SLOCK(fdp); + slots = NDSLOTS(fdp->fd_lastfile + 1); + for (i = 0; i < slots; i++) + count += bitcountl(fdp->fd_map[i]); + FILEDESC_SUNLOCK(fdp); + + return (SYSCTL_OUT(req, &count, sizeof(count))); +} + +static SYSCTL_NODE(_kern_proc, KERN_PROC_NFDS, nfds, + CTLFLAG_RD|CTLFLAG_MPSAFE, sysctl_kern_proc_nfds, + "Number of open file descriptors"); + /* * Get file structures globally. */ Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Fri Nov 6 23:17:00 2015 (r290472) +++ head/sys/sys/sysctl.h Sat Nov 7 00:18:14 2015 (r290473) @@ -703,6 +703,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e #define KERN_PROC_OSREL 40 /* osreldate for process binary */ #define KERN_PROC_SIGTRAMP 41 /* signal trampoline location */ #define KERN_PROC_CWD 42 /* process current working directory */ +#define KERN_PROC_NFDS 43 /* number of open file descriptors */ /* * KERN_IPC identifiers From owner-svn-src-head@freebsd.org Sat Nov 7 00:51:52 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93CC7A28A93; Sat, 7 Nov 2015 00:51:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57D131C30; Sat, 7 Nov 2015 00:51:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA70ppVg023946; Sat, 7 Nov 2015 00:51:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA70pp7Z023945; Sat, 7 Nov 2015 00:51:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511070051.tA70pp7Z023945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 7 Nov 2015 00:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290474 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 00:51:52 -0000 Author: adrian Date: Sat Nov 7 00:51:51 2015 New Revision: 290474 URL: https://svnweb.freebsd.org/changeset/base/290474 Log: ath(4) - reflect whether this is a full or fast channel change. It's no longer "outdoor." Modified: head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sat Nov 7 00:18:14 2015 (r290473) +++ head/sys/dev/ath/if_athvar.h Sat Nov 7 00:51:51 2015 (r290474) @@ -1035,8 +1035,8 @@ void ath_intr(void *); */ #define ath_hal_detach(_ah) \ ((*(_ah)->ah_detach)((_ah))) -#define ath_hal_reset(_ah, _opmode, _chan, _outdoor, _pstatus) \ - ((*(_ah)->ah_reset)((_ah), (_opmode), (_chan), (_outdoor), (_pstatus))) +#define ath_hal_reset(_ah, _opmode, _chan, _fullreset, _pstatus) \ + ((*(_ah)->ah_reset)((_ah), (_opmode), (_chan), (_fullreset), (_pstatus))) #define ath_hal_macversion(_ah) \ (((_ah)->ah_macVersion << 4) | ((_ah)->ah_macRev)) #define ath_hal_getratetable(_ah, _mode) \ From owner-svn-src-head@freebsd.org Sat Nov 7 00:56:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7158A28B03; Sat, 7 Nov 2015 00:56:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id BF1781F00; Sat, 7 Nov 2015 00:56:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id B8CBF1D65; Sat, 7 Nov 2015 00:56:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 7A89B1231F; Sat, 7 Nov 2015 00:56:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id yklVOvOek8RO; Sat, 7 Nov 2015 00:56:42 +0000 (UTC) Subject: Re: svn commit: r290417 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 2FF451231A To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511052148.tA5LmCNg042187@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <563D4C4E.2050209@FreeBSD.org> Date: Fri, 6 Nov 2015 16:56:46 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201511052148.tA5LmCNg042187@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hV1GCsQx5IOReIVG5M6SfH6QHvDLxqncb" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 00:56:45 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hV1GCsQx5IOReIVG5M6SfH6QHvDLxqncb Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/5/2015 1:48 PM, Warner Losh wrote: > -.include "share/mk/src.opts.mk" > -.include > -.include Fun fact, src.opts.mk is already including bsd.compiler.mk so it being here is redundant (since r263953 removed direct checks in COMPILER_TYPE/VERSION). > +# Cross toolchain changes must be in effect before bsd.compiler.mk > +# so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. > +.if defined(CROSS_TOOLCHAIN) > +LOCALBASE?=3D /usr/local > +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" > +CROSSENV+=3DCROSS_TOOLCHAIN=3D"${CROSS_TOOLCHAIN}" > +.endif > +.include # don't depend on src.opts.mk doing it > +.include "share/mk/src.opts.mk"=09 --=20 Regards, Bryan Drewery --hV1GCsQx5IOReIVG5M6SfH6QHvDLxqncb 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 iQEcBAEBAgAGBQJWPUxOAAoJEDXXcbtuRpfPwRgH/jrxkY7iMOOKjRHsnEkCeGCd KV+lWPTDfPmiUn7IUWYY/uHYy2wHd5oxlOjp2FOsBHxW9ZUlqAtv6wYoSkwURz0X +glVnQwRwPbnDbEckCNUAa1YIpe4JkQfWJOiLYAk8+NpPYlLqshI/WGmgIWfZGul 2YrdJPaXJP5HhQBu16LfGvZ6dvSf31B9OhWj0y37D4RLDsXlenLpARKLUy/funSE f4XQDo03BAwdTMFa4ZRNDeumiTpM0oU4kkzbZN3gfvw/xe7fjYEeYdHVEgxTvuXJ kz02BEYdMTWvaPPEINJhgQOVbAUf/WH7iD8QYXTbDpcgT06BgGoqP8jHNT24ajM= =WtpU -----END PGP SIGNATURE----- --hV1GCsQx5IOReIVG5M6SfH6QHvDLxqncb-- From owner-svn-src-head@freebsd.org Sat Nov 7 01:00:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C64BA28B82; Sat, 7 Nov 2015 01:00:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 441911131; Sat, 7 Nov 2015 01:00:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 3DAB51EF7; Sat, 7 Nov 2015 01:00:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id F001D1232E; Sat, 7 Nov 2015 01:00:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id tunz_5T0uFkJ; Sat, 7 Nov 2015 01:00:46 +0000 (UTC) Subject: Re: svn commit: r290417 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com E522912326 To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511052148.tA5LmCNg042187@repo.freebsd.org> <563D4C4E.2050209@FreeBSD.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <563D4D44.10109@FreeBSD.org> Date: Fri, 6 Nov 2015 17:00:52 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <563D4C4E.2050209@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G7xMdQ8uaMP6tmxOKvSEB828DgsvOqcDj" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 01:00:53 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --G7xMdQ8uaMP6tmxOKvSEB828DgsvOqcDj Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/6/2015 4:56 PM, Bryan Drewery wrote: > On 11/5/2015 1:48 PM, Warner Losh wrote: >> -.include "share/mk/src.opts.mk" >> -.include >> -.include >=20 > Fun fact, src.opts.mk is already including bsd.compiler.mk so it being > here is redundant (since r263953 removed direct checks in > COMPILER_TYPE/VERSION). >=20 >> +# Cross toolchain changes must be in effect before bsd.compiler.mk >> +# so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. >> +.if defined(CROSS_TOOLCHAIN) >> +LOCALBASE?=3D /usr/local >> +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" >> +CROSSENV+=3DCROSS_TOOLCHAIN=3D"${CROSS_TOOLCHAIN}" >> +.endif >> +.include # don't depend on src.opts.mk doing it That explains this comment. It was obscure to me. >> +.include "share/mk/src.opts.mk"=09 >=20 >=20 --=20 Regards, Bryan Drewery --G7xMdQ8uaMP6tmxOKvSEB828DgsvOqcDj 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 iQEcBAEBAgAGBQJWPU1EAAoJEDXXcbtuRpfPfX0H/R/PrNpDUkr86UMRhxCHWFK0 1MJQeEZ3DVDDITUfNEQas32uqFqvuzZCfh5d1WotaQXoGHxW1d6Oan8Ez5gtY+03 SMfDHTtBqGR5mF4jHxPApmu6YY4OGL4WuRGrymOZlYN3PDIA8VjZYFg3QfKm2Z07 R44cASlH6/J9vsMggWCMeNfqOQPq0i+uXwg4M1QbW81jDGdKZ5jK2j8w2DfKuZdT tj3tLXatPJd66fYH2DljZDV08e1CRYEhMczrrVcOaxwDsON20cNGegCIBb1o7PFN yJtLfkJif2IyF15nB9+KL09NIKqUGT8hjCN76hBu+IszC8rW4tZN/fiZu1qwA1A= =U8nt -----END PGP SIGNATURE----- --G7xMdQ8uaMP6tmxOKvSEB828DgsvOqcDj-- From owner-svn-src-head@freebsd.org Sat Nov 7 01:43:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36DA9A25621; Sat, 7 Nov 2015 01:43:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE7E71D8E; Sat, 7 Nov 2015 01:43:02 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA71h2TF038237; Sat, 7 Nov 2015 01:43:02 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA71h13k038232; Sat, 7 Nov 2015 01:43:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201511070143.tA71h13k038232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 7 Nov 2015 01:43:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290475 - in head: share/man/man9 sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 01:43:03 -0000 Author: cem Date: Sat Nov 7 01:43:01 2015 New Revision: 290475 URL: https://svnweb.freebsd.org/changeset/base/290475 Log: Round out SYSCTL macros to the full set of fixed-width types Add S8, S16, S32, and U32 types; add SYSCTL*() macros for them, as well as for the existing 64-bit types. (While SYSCTL*QUAD and UQUAD macros already exist, they do not take the same sort of 'val' parameter that the other macros do.) Clean up the documented "types" in the sysctl.9 document. (These are macros and thus not real types, but the manual page documents intent.) The sysctl_add_oid(9) arg2 has been bumped from intptr_t to intmax_t to accommodate 64-bit types on 32-bit pointer architectures. This is just the kernel support piece; the userspace sysctl(1) support will follow in a later patch. Submitted by: Ravi Pokala Reviewed by: cem Relnotes: no Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D4091 Modified: head/share/man/man9/Makefile head/share/man/man9/sysctl.9 head/share/man/man9/sysctl_add_oid.9 head/sys/kern/kern_sysctl.c head/sys/sys/sysctl.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Sat Nov 7 00:51:51 2015 (r290474) +++ head/share/man/man9/Makefile Sat Nov 7 01:43:01 2015 (r290475) @@ -1631,10 +1631,16 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_ADD_PROC.9 \ sysctl.9 SYSCTL_ADD_QUAD.9 \ sysctl.9 SYSCTL_ADD_ROOT_NODE.9 \ + sysctl.9 SYSCTL_ADD_S8.9 \ + sysctl.9 SYSCTL_ADD_S16.9 \ + sysctl.9 SYSCTL_ADD_S32.9 \ + sysctl.9 SYSCTL_ADD_S64.9 \ sysctl.9 SYSCTL_ADD_STRING.9 \ sysctl.9 SYSCTL_ADD_STRUCT.9 \ sysctl.9 SYSCTL_ADD_U8.9 \ sysctl.9 SYSCTL_ADD_U16.9 \ + sysctl.9 SYSCTL_ADD_U32.9 \ + sysctl.9 SYSCTL_ADD_U64.9 \ sysctl.9 SYSCTL_ADD_UAUTO.9 \ sysctl.9 SYSCTL_ADD_UINT.9 \ sysctl.9 SYSCTL_ADD_ULONG.9 \ @@ -1650,10 +1656,16 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_PROC.9 \ sysctl.9 SYSCTL_QUAD.9 \ sysctl.9 SYSCTL_ROOT_NODE.9 \ + sysctl.9 SYSCTL_S8.9 \ + sysctl.9 SYSCTL_S16.9 \ + sysctl.9 SYSCTL_S32.9 \ + sysctl.9 SYSCTL_S64.9 \ sysctl.9 SYSCTL_STRING.9 \ sysctl.9 SYSCTL_STRUCT.9 \ sysctl.9 SYSCTL_U8.9 \ sysctl.9 SYSCTL_U16.9 \ + sysctl.9 SYSCTL_U32.9 \ + sysctl.9 SYSCTL_U64.9 \ sysctl.9 SYSCTL_UINT.9 \ sysctl.9 SYSCTL_ULONG.9 \ sysctl.9 SYSCTL_UQUAD.9 Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Sat Nov 7 00:51:51 2015 (r290474) +++ head/share/man/man9/sysctl.9 Sat Nov 7 01:43:01 2015 (r290475) @@ -37,10 +37,16 @@ .Nm SYSCTL_ADD_PROC , .Nm SYSCTL_ADD_QUAD , .Nm SYSCTL_ADD_ROOT_NODE , +.Nm SYSCTL_ADD_S8 , +.Nm SYSCTL_ADD_S16 , +.Nm SYSCTL_ADD_S32 , +.Nm SYSCTL_ADD_S64 , .Nm SYSCTL_ADD_STRING , .Nm SYSCTL_ADD_STRUCT , .Nm SYSCTL_ADD_U8 , .Nm SYSCTL_ADD_U16 , +.Nm SYSCTL_ADD_U32 , +.Nm SYSCTL_ADD_U64 , .Nm SYSCTL_ADD_UAUTO , .Nm SYSCTL_ADD_UINT , .Nm SYSCTL_ADD_ULONG , @@ -56,10 +62,16 @@ .Nm SYSCTL_PROC , .Nm SYSCTL_QUAD , .Nm SYSCTL_ROOT_NODE , +.Nm SYSCTL_S8 , +.Nm SYSCTL_S16 , +.Nm SYSCTL_S32 , +.Nm SYSCTL_S64 , .Nm SYSCTL_STRING , .Nm SYSCTL_STRUCT , .Nm SYSCTL_U8 , .Nm SYSCTL_U16 , +.Nm SYSCTL_U32 , +.Nm SYSCTL_U64 , .Nm SYSCTL_UINT , .Nm SYSCTL_ULONG , .Nm SYSCTL_UQUAD @@ -76,7 +88,7 @@ .Fa "const char *name" .Fa "int ctlflags" .Fa "int *ptr" -.Fa "intptr_t val" +.Fa "int val" .Fa "const char *descr" .Fc .Ft struct sysctl_oid * @@ -131,7 +143,7 @@ .Fa "int number" .Fa "const char *name" .Fa "int ctlflags" -.Fa "quad_t *ptr" +.Fa "int64_t *ptr" .Fa "const char *descr" .Fc .Ft struct sysctl_oid * @@ -144,6 +156,50 @@ .Fa "const char *descr" .Fc .Ft struct sysctl_oid * +.Fo SYSCTL_ADD_S8 +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "int8_t *ptr" +.Fa "int8_t val" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * +.Fo SYSCTL_ADD_S16 +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "int16_t *ptr" +.Fa "int16_t val" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * +.Fo SYSCTL_ADD_S32 +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "int32_t *ptr" +.Fa "int32_t val" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * +.Fo SYSCTL_ADD_S64 +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "int64_t *ptr" +.Fa "int64_t val" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * .Fo SYSCTL_ADD_STRING .Fa "struct sysctl_ctx_list *ctx" .Fa "struct sysctl_oid_list *parent" @@ -172,8 +228,8 @@ .Fa "int number" .Fa "const char *name" .Fa "int ctlflags" -.Fa "unsigned int *ptr" -.Fa "intptr_t val" +.Fa "uint8_t *ptr" +.Fa "uint8_t val" .Fa "const char *descr" .Fc .Ft struct sysctl_oid * @@ -183,8 +239,30 @@ .Fa "int number" .Fa "const char *name" .Fa "int ctlflags" -.Fa "unsigned int *ptr" -.Fa "intptr_t val" +.Fa "uint16_t *ptr" +.Fa "uint16_t val" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * +.Fo SYSCTL_ADD_U32 +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "uint32_t *ptr" +.Fa "uint32_t val" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * +.Fo SYSCTL_ADD_U64 +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "uint64_t *ptr" +.Fa "uint64_t val" .Fa "const char *descr" .Fc .Ft struct sysctl_oid * @@ -195,7 +273,7 @@ .Fa "const char *name" .Fa "int ctlflags" .Fa "unsigned int *ptr" -.Fa "intptr_t val" +.Fa "unsigned int val" .Fa "const char *descr" .Fc .Ft struct sysctl_oid * @@ -215,7 +293,7 @@ .Fa "int number" .Fa "const char *name" .Fa "int ctlflags" -.Fa "u_quad_t *ptr" +.Fa "uint64_t *ptr" .Fa "const char *descr" .Fc .Ft struct sysctl_oid * @@ -251,11 +329,17 @@ .Fn SYSCTL_OPAQUE parent number name ctlflags ptr len format descr .Fn SYSCTL_PROC parent number name ctlflags arg1 arg2 handler format descr .Fn SYSCTL_QUAD parent number name ctlflags ptr val descr +.Fn SYSCTL_ROOT_NODE number name ctlflags handler descr +.Fn SYSCTL_S8 parent number name ctlflags ptr val descr +.Fn SYSCTL_S16 parent number name ctlflags ptr val descr +.Fn SYSCTL_S32 parent number name ctlflags ptr val descr +.Fn SYSCTL_S64 parent number name ctlflags ptr val descr .Fn SYSCTL_STRING parent number name ctlflags arg len descr .Fn SYSCTL_STRUCT parent number name ctlflags ptr struct_type descr -.Fn SYSCTL_ROOT_NODE number name ctlflags handler descr .Fn SYSCTL_U8 parent number name ctlflags ptr val descr .Fn SYSCTL_U16 parent number name ctlflags ptr val descr +.Fn SYSCTL_U32 parent number name ctlflags ptr val descr +.Fn SYSCTL_U64 parent number name ctlflags ptr val descr .Fn SYSCTL_UINT parent number name ctlflags ptr val descr .Fn SYSCTL_ULONG parent number name ctlflags ptr val descr .Fn SYSCTL_UQUAD parent number name ctlflags ptr val descr @@ -439,10 +523,16 @@ Static sysctls are declared using one of .Fn SYSCTL_PROC , .Fn SYSCTL_QUAD , .Fn SYSCTL_ROOT_NODE , +.Fn SYSCTL_S8 , +.Fn SYSCTL_S16 , +.Fn SYSCTL_S32 , +.Fn SYSCTL_S64 , .Fn SYSCTL_STRING , .Fn SYSCTL_STRUCT , .Fn SYSCTL_U8 , .Fn SYSCTL_U16 , +.Fn SYSCTL_U32 , +.Fn SYSCTL_U64 , .Fn SYSCTL_UINT , .Fn SYSCTL_ULONG or @@ -457,10 +547,16 @@ Dynamic nodes are created using one of t .Fn SYSCTL_ADD_PROC , .Fn SYSCTL_ADD_QUAD , .Fn SYSCTL_ADD_ROOT_NODE , +.Fn SYSCTL_ADD_S8 , +.Fn SYSCTL_ADD_S16 , +.Fn SYSCTL_ADD_S32 , +.Fn SYSCTL_ADD_S64 , .Fn SYSCTL_ADD_STRING , .Fn SYSCTL_ADD_STRUCT , .Fn SYSCTL_ADD_U8 , .Fn SYSCTL_ADD_U16 , +.Fn SYSCTL_ADD_U32 , +.Fn SYSCTL_ADD_U64 , .Fn SYSCTL_ADD_UAUTO , .Fn SYSCTL_ADD_UINT , .Fn SYSCTL_ADD_ULONG , @@ -484,6 +580,12 @@ This is a node intended to be a parent f This is a signed integer. .It Dv CTLTYPE_STRING This is a nul-terminated string stored in a character array. +.It Dv CTLTYPE_S8 +This is an 8-bit signed integer. +.It Dv CTLTYPE_S16 +This is a 16-bit signed integer. +.It Dv CTLTYPE_S32 +This is a 32-bit signed integer. .It Dv CTLTYPE_S64 This is a 64-bit signed integer. .It Dv CTLTYPE_OPAQUE @@ -495,14 +597,16 @@ Alias for This is an 8-bit unsigned integer. .It Dv CTLTYPE_U16 This is a 16-bit unsigned integer. +.It Dv CTLTYPE_U32 +This is a 32-bit unsigned integer. +.It Dv CTLTYPE_U64 +This is a 64-bit unsigned integer. .It Dv CTLTYPE_UINT This is an unsigned integer. .It Dv CTLTYPE_LONG This is a signed long. .It Dv CTLTYPE_ULONG This is an unsigned long. -.It Dv CTLTYPE_U64 -This is a 64-bit unsigned integer. .El .Pp All sysctl types except for new node declarations require one of the following Modified: head/share/man/man9/sysctl_add_oid.9 ============================================================================== --- head/share/man/man9/sysctl_add_oid.9 Sat Nov 7 00:51:51 2015 (r290474) +++ head/share/man/man9/sysctl_add_oid.9 Sat Nov 7 01:43:01 2015 (r290475) @@ -47,7 +47,7 @@ .Fa "const char *name" .Fa "int kind" .Fa "void *arg1" -.Fa "intptr_t arg2" +.Fa "intmax_t arg2" .Fa "int (*handler) (SYSCTL_HANDLER_ARGS)" .Fa "const char *format" .Fa "const char *descr" Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Sat Nov 7 00:51:51 2015 (r290474) +++ head/sys/kern/kern_sysctl.c Sat Nov 7 01:43:01 2015 (r290475) @@ -643,7 +643,7 @@ sysctl_remove_oid_locked(struct sysctl_o */ struct sysctl_oid * sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, - int number, const char *name, int kind, void *arg1, intptr_t arg2, + int number, const char *name, int kind, void *arg1, intmax_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), const char *fmt, const char *descr) { struct sysctl_oid *oidp; @@ -1192,6 +1192,38 @@ sysctl_handle_16(SYSCTL_HANDLER_ARGS) } /* + * Handle an int32_t, signed or unsigned. + * Two cases: + * a variable: point arg1 at it. + * a constant: pass it in arg2. + */ + +int +sysctl_handle_32(SYSCTL_HANDLER_ARGS) +{ + int32_t tmpout; + int error = 0; + + /* + * Attempt to get a coherent snapshot by making a copy of the data. + */ + if (arg1) + tmpout = *(int32_t *)arg1; + else + tmpout = arg2; + error = SYSCTL_OUT(req, &tmpout, sizeof(tmpout)); + + if (error || !req->newptr) + return (error); + + if (!arg1) + error = EPERM; + else + error = SYSCTL_IN(req, arg1, sizeof(tmpout)); + return (error); +} + +/* * Handle an int, signed or unsigned. * Two cases: * a variable: point arg1 at it. Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Sat Nov 7 00:51:51 2015 (r290474) +++ head/sys/sys/sysctl.h Sat Nov 7 01:43:01 2015 (r290475) @@ -75,6 +75,10 @@ struct ctlname { #define CTLTYPE_U64 9 /* name describes an unsigned 64-bit number */ #define CTLTYPE_U8 0xa /* name describes an unsigned 8-bit number */ #define CTLTYPE_U16 0xb /* name describes an unsigned 16-bit number */ +#define CTLTYPE_S8 0xc /* name describes a signed 8-bit number */ +#define CTLTYPE_S16 0xd /* name describes a signed 16-bit number */ +#define CTLTYPE_S32 0xe /* name describes a signed 32-bit number */ +#define CTLTYPE_U32 0xf /* name describes an unsigned 32-bit number */ #define CTLFLAG_RD 0x80000000 /* Allow reads of variable */ #define CTLFLAG_WR 0x40000000 /* Allow writes to the variable */ @@ -192,10 +196,11 @@ struct sysctl_oid { int sysctl_handle_8(SYSCTL_HANDLER_ARGS); int sysctl_handle_16(SYSCTL_HANDLER_ARGS); +int sysctl_handle_32(SYSCTL_HANDLER_ARGS); +int sysctl_handle_64(SYSCTL_HANDLER_ARGS); int sysctl_handle_int(SYSCTL_HANDLER_ARGS); int sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS); int sysctl_handle_long(SYSCTL_HANDLER_ARGS); -int sysctl_handle_64(SYSCTL_HANDLER_ARGS); int sysctl_handle_string(SYSCTL_HANDLER_ARGS); int sysctl_handle_opaque(SYSCTL_HANDLER_ARGS); int sysctl_handle_counter_u64(SYSCTL_HANDLER_ARGS); @@ -323,6 +328,26 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e __arg, len, sysctl_handle_string, "A", __DESCR(descr)); \ }) +/* Oid for a signed 8-bit int. If ptr is NULL, val is returned. */ +#define SYSCTL_NULL_S8_PTR ((unsigned *)NULL) +#define SYSCTL_S8(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_S8 | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_8, "C", descr); \ + CTASSERT((((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S8) && \ + sizeof(int8_t) == sizeof(*(ptr))) + +#define SYSCTL_ADD_S8(ctx, parent, nbr, name, access, ptr, val, descr) \ +({ \ + int8_t *__ptr = (ptr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S8); \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_S8 | CTLFLAG_MPSAFE | (access), \ + __ptr, val, sysctl_handle_8, "C", __DESCR(descr)); \ +}) + /* Oid for an unsigned 8-bit int. If ptr is NULL, val is returned. */ #define SYSCTL_NULL_U8_PTR ((unsigned *)NULL) #define SYSCTL_U8(parent, nbr, name, access, ptr, val, descr) \ @@ -343,6 +368,26 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e __ptr, val, sysctl_handle_8, "CU", __DESCR(descr)); \ }) +/* Oid for a signed 16-bit int. If ptr is NULL, val is returned. */ +#define SYSCTL_NULL_S16_PTR ((unsigned *)NULL) +#define SYSCTL_S16(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_S16 | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_16, "S", descr); \ + CTASSERT((((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S16) && \ + sizeof(int16_t) == sizeof(*(ptr))) + +#define SYSCTL_ADD_S16(ctx, parent, nbr, name, access, ptr, val, descr) \ +({ \ + int16_t *__ptr = (ptr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S16); \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_S16 | CTLFLAG_MPSAFE | (access), \ + __ptr, val, sysctl_handle_16, "S", __DESCR(descr)); \ +}) + /* Oid for an unsigned 16-bit int. If ptr is NULL, val is returned. */ #define SYSCTL_NULL_U16_PTR ((unsigned *)NULL) #define SYSCTL_U16(parent, nbr, name, access, ptr, val, descr) \ @@ -355,7 +400,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e #define SYSCTL_ADD_U16(ctx, parent, nbr, name, access, ptr, val, descr) \ ({ \ - uint16_t *__ptr = (ptr); \ + uint16_t *__ptr = (ptr); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U16); \ sysctl_add_oid(ctx, parent, nbr, name, \ @@ -363,6 +408,86 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e __ptr, val, sysctl_handle_16, "SU", __DESCR(descr)); \ }) +/* Oid for a signed 32-bit int. If ptr is NULL, val is returned. */ +#define SYSCTL_NULL_S32_PTR ((unsigned *)NULL) +#define SYSCTL_S32(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_S32 | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_32, "I", descr); \ + CTASSERT((((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S32) && \ + sizeof(int32_t) == sizeof(*(ptr))) + +#define SYSCTL_ADD_S32(ctx, parent, nbr, name, access, ptr, val, descr) \ +({ \ + int32_t *__ptr = (ptr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S32); \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_S32 | CTLFLAG_MPSAFE | (access), \ + __ptr, val, sysctl_handle_32, "I", __DESCR(descr)); \ +}) + +/* Oid for an unsigned 32-bit int. If ptr is NULL, val is returned. */ +#define SYSCTL_NULL_U32_PTR ((unsigned *)NULL) +#define SYSCTL_U32(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_U32 | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_32, "IU", descr); \ + CTASSERT((((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U32) && \ + sizeof(uint32_t) == sizeof(*(ptr))) + +#define SYSCTL_ADD_U32(ctx, parent, nbr, name, access, ptr, val, descr) \ +({ \ + uint32_t *__ptr = (ptr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U32); \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_U32 | CTLFLAG_MPSAFE | (access), \ + __ptr, val, sysctl_handle_32, "IU", __DESCR(descr)); \ +}) + +/* Oid for a signed 64-bit int. If ptr is NULL, val is returned. */ +#define SYSCTL_NULL_S64_PTR ((unsigned *)NULL) +#define SYSCTL_S64(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_S64 | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_64, "Q", descr); \ + CTASSERT((((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64) && \ + sizeof(int64_t) == sizeof(*(ptr))) + +#define SYSCTL_ADD_S64(ctx, parent, nbr, name, access, ptr, val, descr) \ +({ \ + int64_t *__ptr = (ptr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64); \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_S64 | CTLFLAG_MPSAFE | (access), \ + __ptr, val, sysctl_handle_64, "Q", __DESCR(descr)); \ +}) + +/* Oid for an unsigned 64-bit int. If ptr is NULL, val is returned. */ +#define SYSCTL_NULL_U64_PTR ((unsigned *)NULL) +#define SYSCTL_U64(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_64, "QU", descr); \ + CTASSERT((((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U64) && \ + sizeof(uint64_t) == sizeof(*(ptr))) + +#define SYSCTL_ADD_U64(ctx, parent, nbr, name, access, ptr, val, descr) \ +({ \ + uint64_t *__ptr = (ptr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U64); \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \ + __ptr, val, sysctl_handle_64, "QU", __DESCR(descr)); \ +}) + /* Oid for an int. If ptr is SYSCTL_NULL_INT_PTR, val is returned. */ #define SYSCTL_NULL_INT_PTR ((int *)NULL) #define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \ From owner-svn-src-head@freebsd.org Sat Nov 7 01:56:33 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8AD7A25901; Sat, 7 Nov 2015 01:56:33 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75F581353; Sat, 7 Nov 2015 01:56:33 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA71uWqo041299; Sat, 7 Nov 2015 01:56:32 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA71uW99041298; Sat, 7 Nov 2015 01:56:32 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201511070156.tA71uW99041298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 7 Nov 2015 01:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290476 - head/sbin/sysctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 01:56:33 -0000 Author: cem Date: Sat Nov 7 01:56:32 2015 New Revision: 290476 URL: https://svnweb.freebsd.org/changeset/base/290476 Log: Follow-up to r290475: Add sysctl(8) support for added types Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Sat Nov 7 01:43:01 2015 (r290475) +++ head/sbin/sysctl/sysctl.c Sat Nov 7 01:56:32 2015 (r290476) @@ -86,29 +86,40 @@ static int strIKtoi(const char *, char * static int ctl_sign[CTLTYPE+1] = { [CTLTYPE_INT] = 1, [CTLTYPE_LONG] = 1, + [CTLTYPE_S8] = 1, + [CTLTYPE_S16] = 1, + [CTLTYPE_S32] = 1, [CTLTYPE_S64] = 1, }; static int ctl_size[CTLTYPE+1] = { - [CTLTYPE_U8] = sizeof(uint8_t), - [CTLTYPE_U16] = sizeof(uint16_t), [CTLTYPE_INT] = sizeof(int), [CTLTYPE_UINT] = sizeof(u_int), [CTLTYPE_LONG] = sizeof(long), [CTLTYPE_ULONG] = sizeof(u_long), + [CTLTYPE_S8] = sizeof(int8_t), + [CTLTYPE_S16] = sizeof(int16_t), + [CTLTYPE_S32] = sizeof(int32_t), [CTLTYPE_S64] = sizeof(int64_t), + [CTLTYPE_U8] = sizeof(uint8_t), + [CTLTYPE_U16] = sizeof(uint16_t), + [CTLTYPE_U32] = sizeof(uint32_t), [CTLTYPE_U64] = sizeof(uint64_t), }; static const char *ctl_typename[CTLTYPE+1] = { - [CTLTYPE_U8] = "uint8_t", - [CTLTYPE_U16] = "uint16_t", [CTLTYPE_INT] = "integer", [CTLTYPE_UINT] = "unsigned integer", [CTLTYPE_LONG] = "long integer", [CTLTYPE_ULONG] = "unsigned long", - [CTLTYPE_S64] = "int64_t", + [CTLTYPE_U8] = "uint8_t", + [CTLTYPE_U16] = "uint16_t", + [CTLTYPE_U32] = "uint16_t", [CTLTYPE_U64] = "uint64_t", + [CTLTYPE_S8] = "int8_t", + [CTLTYPE_S16] = "int16_t", + [CTLTYPE_S32] = "int32_t", + [CTLTYPE_S64] = "int64_t", }; static void @@ -225,8 +236,12 @@ parse(const char *string, int lineno) int len, i, j; const void *newval; const char *newvalstr = NULL; + int8_t i8val; uint8_t u8val; + int16_t i16val; uint16_t u16val; + int32_t i32val; + uint32_t u32val; int intval; unsigned int uintval; long longval; @@ -328,13 +343,17 @@ parse(const char *string, int lineno) } switch (kind & CTLTYPE) { - case CTLTYPE_U8: - case CTLTYPE_U16: case CTLTYPE_INT: case CTLTYPE_UINT: case CTLTYPE_LONG: case CTLTYPE_ULONG: + case CTLTYPE_S8: + case CTLTYPE_S16: + case CTLTYPE_S32: case CTLTYPE_S64: + case CTLTYPE_U8: + case CTLTYPE_U16: + case CTLTYPE_U32: case CTLTYPE_U64: if (strlen(newvalstr) == 0) { warnx("empty numeric value"); @@ -353,17 +372,6 @@ parse(const char *string, int lineno) errno = 0; switch (kind & CTLTYPE) { - case CTLTYPE_U8: - u8val = (uint8_t)strtoul(newvalstr, &endptr, 0); - newval = &u8val; - newsize = sizeof(u8val); - break; - case CTLTYPE_U16: - u16val = (uint16_t)strtoul(newvalstr, &endptr, - 0); - newval = &u16val; - newsize = sizeof(u16val); - break; case CTLTYPE_INT: if (strncmp(fmt, "IK", 2) == 0) intval = strIKtoi(newvalstr, &endptr, fmt); @@ -391,11 +399,45 @@ parse(const char *string, int lineno) case CTLTYPE_STRING: newval = newvalstr; break; + case CTLTYPE_S8: + i8val = (int8_t)strtol(newvalstr, &endptr, 0); + newval = &i8val; + newsize = sizeof(i8val); + break; + case CTLTYPE_S16: + i16val = (int16_t)strtol(newvalstr, &endptr, + 0); + newval = &i16val; + newsize = sizeof(i16val); + break; + case CTLTYPE_S32: + i32val = (int32_t)strtol(newvalstr, &endptr, + 0); + newval = &i32val; + newsize = sizeof(i32val); + break; case CTLTYPE_S64: i64val = strtoimax(newvalstr, &endptr, 0); newval = &i64val; newsize = sizeof(i64val); break; + case CTLTYPE_U8: + u8val = (uint8_t)strtoul(newvalstr, &endptr, 0); + newval = &u8val; + newsize = sizeof(u8val); + break; + case CTLTYPE_U16: + u16val = (uint16_t)strtoul(newvalstr, &endptr, + 0); + newval = &u16val; + newsize = sizeof(u16val); + break; + case CTLTYPE_U32: + u32val = (uint32_t)strtoul(newvalstr, &endptr, + 0); + newval = &u32val; + newsize = sizeof(u32val); + break; case CTLTYPE_U64: u64val = strtoumax(newvalstr, &endptr, 0); newval = &u64val; @@ -909,13 +951,17 @@ show_var(int *oid, int nlen) free(oval); return (0); - case CTLTYPE_U8: - case CTLTYPE_U16: case CTLTYPE_INT: case CTLTYPE_UINT: case CTLTYPE_LONG: case CTLTYPE_ULONG: + case CTLTYPE_S8: + case CTLTYPE_S16: + case CTLTYPE_S32: case CTLTYPE_S64: + case CTLTYPE_U8: + case CTLTYPE_U16: + case CTLTYPE_U32: case CTLTYPE_U64: if (!nflag) printf("%s%s", name, sep); @@ -923,14 +969,6 @@ show_var(int *oid, int nlen) sep1 = ""; while (len >= intlen) { switch (kind & CTLTYPE) { - case CTLTYPE_U8: - umv = *(uint8_t *)p; - mv = *(int8_t *)p; - break; - case CTLTYPE_U16: - umv = *(uint16_t *)p; - mv = *(int16_t *)p; - break; case CTLTYPE_INT: case CTLTYPE_UINT: umv = *(u_int *)p; @@ -941,6 +979,21 @@ show_var(int *oid, int nlen) umv = *(u_long *)p; mv = *(long *)p; break; + case CTLTYPE_S8: + case CTLTYPE_U8: + umv = *(uint8_t *)p; + mv = *(int8_t *)p; + break; + case CTLTYPE_S16: + case CTLTYPE_U16: + umv = *(uint16_t *)p; + mv = *(int16_t *)p; + break; + case CTLTYPE_S32: + case CTLTYPE_U32: + umv = *(uint32_t *)p; + mv = *(int32_t *)p; + break; case CTLTYPE_S64: case CTLTYPE_U64: umv = *(uint64_t *)p; From owner-svn-src-head@freebsd.org Sat Nov 7 01:58:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 175BCA2595F; Sat, 7 Nov 2015 01:58:19 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4F92152B; Sat, 7 Nov 2015 01:58:18 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA71wHaE041426; Sat, 7 Nov 2015 01:58:17 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA71wHXe041425; Sat, 7 Nov 2015 01:58:17 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201511070158.tA71wHXe041425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 7 Nov 2015 01:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290477 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 01:58:19 -0000 Author: cem Date: Sat Nov 7 01:58:17 2015 New Revision: 290477 URL: https://svnweb.freebsd.org/changeset/base/290477 Log: Another follow-up to r290475: Bump .Dd in sysctl_add_oid.9 Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man9/sysctl_add_oid.9 Modified: head/share/man/man9/sysctl_add_oid.9 ============================================================================== --- head/share/man/man9/sysctl_add_oid.9 Sat Nov 7 01:56:32 2015 (r290476) +++ head/share/man/man9/sysctl_add_oid.9 Sat Nov 7 01:58:17 2015 (r290477) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 28, 2014 +.Dd November 6, 2015 .Dt SYSCTL_ADD_OID 9 .Os .Sh NAME From owner-svn-src-head@freebsd.org Sat Nov 7 01:58:24 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD615A25998; Sat, 7 Nov 2015 01:58:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58B5F15FA; Sat, 7 Nov 2015 01:58:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA71wNW4041474; Sat, 7 Nov 2015 01:58:23 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA71wNsF041473; Sat, 7 Nov 2015 01:58:23 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511070158.tA71wNsF041473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 01:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290478 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 01:58:24 -0000 Author: bapt Date: Sat Nov 7 01:58:23 2015 New Revision: 290478 URL: https://svnweb.freebsd.org/changeset/base/290478 Log: Improve soelim(1) manpages Submitted by: Sascha Wildner Modified: head/usr.bin/soelim/soelim.1 Modified: head/usr.bin/soelim/soelim.1 ============================================================================== --- head/usr.bin/soelim/soelim.1 Sat Nov 7 01:58:17 2015 (r290477) +++ head/usr.bin/soelim/soelim.1 Sat Nov 7 01:58:23 2015 (r290478) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 1, 2015 +.Dd November 7, 2015 .Dt SOELIM 1 .Os .Sh NAME @@ -34,43 +34,48 @@ .Nm .Op Fl Crtv .Op Fl I Ar dir -.Op Ar files ... +.Op Ar .Sh DESCRIPTION +The .Nm -reads -.Ar files -lines by lines. +utility +reads the specified files or the standard input and performs the textual +inclusion implied by the +.Xr nroff 1 +directives of the form: .Pp -If a line starts by: +.Dl \&.so anotherfile +.Pp +If a line starts with: .Dq .so anotherfile -it replace the line by processing +it replaces the line by processing .Dq anotherfile . Otherwise the line is printed to stdout. .Bl -tag -width "-I dir" .It Fl C Recognise .Em .so -when not followed by a space character. +when it is not followed by a space character. .It Fl r -Compatibility with GNU groff's +Compatibility with groff's .Xr soelim 1 (does nothing). .It Fl t -Compatibility with GNU groff's +Compatibility with groff's .Xr soelim 1 (does nothing). .It Fl v -Compatibility with GNU groff's +Compatibility with groff's .Xr soelim 1 (does nothing). .It Fl I Ar dir -This option specify directories where +This option specifies directories where .Nm searches for files (both those on the command line and those named in .Dq .so directive.) -This options may be specified multiple times. The directories will be searched -in the order specified. +This option may be specified multiple times. +The directories will be searched in the order specified. .El .Pp The files are always searched first in the current directory. From owner-svn-src-head@freebsd.org Sat Nov 7 02:03:08 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21346A25B52; Sat, 7 Nov 2015 02:03:08 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D51141B3D; Sat, 7 Nov 2015 02:03:07 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7236pp044108; Sat, 7 Nov 2015 02:03:06 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7236Wr044107; Sat, 7 Nov 2015 02:03:06 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201511070203.tA7236Wr044107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 7 Nov 2015 02:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290479 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 02:03:08 -0000 Author: cem Date: Sat Nov 7 02:03:06 2015 New Revision: 290479 URL: https://svnweb.freebsd.org/changeset/base/290479 Log: Final follow-up to r290475: Bump __FreeBSD_version Because we changed sysctl_add_oid(9) ABI, which surely breaks ABI compatibility for out-of-tree modules. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Nov 7 01:58:23 2015 (r290478) +++ head/sys/sys/param.h Sat Nov 7 02:03:06 2015 (r290479) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100086 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100087 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Sat Nov 7 02:18:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0E61A25E7F; Sat, 7 Nov 2015 02:18:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FAC0109B; Sat, 7 Nov 2015 02:18:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA72IJtV047106; Sat, 7 Nov 2015 02:18:19 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA72IJFC047104; Sat, 7 Nov 2015 02:18:19 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511070218.tA72IJFC047104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 02:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290480 - head/bin/rm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 02:18:20 -0000 Author: bapt Date: Sat Nov 7 02:18:19 2015 New Revision: 290480 URL: https://svnweb.freebsd.org/changeset/base/290480 Log: Protecting against rm -rf / is now POSIXLY_CORRECT per posix 1003.1 edition 2013. No need anymore to disable the protection if one set the POXILY_CORRECT environment variable. Reviewed by: imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D4092 Modified: head/bin/rm/rm.1 head/bin/rm/rm.c Modified: head/bin/rm/rm.1 ============================================================================== --- head/bin/rm/rm.1 Sat Nov 7 02:03:06 2015 (r290479) +++ head/bin/rm/rm.1 Sat Nov 7 02:18:19 2015 (r290480) @@ -32,7 +32,7 @@ .\" @(#)rm.1 8.5 (Berkeley) 12/5/94 .\" $FreeBSD$ .\" -.Dd April 25, 2013 +.Dd November 7, 2015 .Dt RM 1 .Os .Sh NAME @@ -234,7 +234,7 @@ not the standard error output. The .Nm command conforms to -.St -p1003.2 . +.St -p1003.1-2013 . .Pp The simplified .Nm unlink Modified: head/bin/rm/rm.c ============================================================================== --- head/bin/rm/rm.c Sat Nov 7 02:03:06 2015 (r290479) +++ head/bin/rm/rm.c Sat Nov 7 02:18:19 2015 (r290480) @@ -155,8 +155,7 @@ main(int argc, char *argv[]) } checkdot(argv); - if (getenv("POSIXLY_CORRECT") == NULL) - checkslash(argv); + checkslash(argv); uid = geteuid(); (void)signal(SIGINFO, siginfo); From owner-svn-src-head@freebsd.org Sat Nov 7 03:59:26 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 529AFA27F0A; Sat, 7 Nov 2015 03:59:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::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 2D3BA192C; Sat, 7 Nov 2015 03:59:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbhv6 with SMTP id hv6so47929098igb.0; Fri, 06 Nov 2015 19:59:25 -0800 (PST) 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=dgExjZvIKMPp+Y9MpK//xXXaqb9Hxrv6oY/v6VWEYUk=; b=yZ0ouLvVzFksaxF5GJ7JjS7Xsys2zuqrlb+EtNXLMsffKKcd7woyEq9xSeQWPGmMMs 5YFUcgBf8Tc3ovQtVQHDCWCFh0pWwtJw+UHKSN8mJky9//w24Cfu+R7+h17VIA1ek1q3 NAa9d9Yjq+55mCUHufcNIkyZd0Y2GgrfiWOmzr8SKv/WFFlqGRFZRlFVXuBc5gRCnCHI 7NQ6U9fvh46E5a8JHO6xkDX+xo+hxmCQzZt0vlt7DDWSJYSQI3fQoEBDaEJRDO4bNPFk Eqn7ou8KTZ4vhB5ge41VGtKa3UrNj3eKwpBjPh4CyHwreqOkGe4MCJtH2H6ZmYYcTLli f0CA== MIME-Version: 1.0 X-Received: by 10.50.155.41 with SMTP id vt9mr11588024igb.22.1446868765595; Fri, 06 Nov 2015 19:59:25 -0800 (PST) Received: by 10.36.217.196 with HTTP; Fri, 6 Nov 2015 19:59:25 -0800 (PST) In-Reply-To: References: <201510140210.t9E2A79H056595@repo.freebsd.org> <20151029212554.799f76eb@kalimero.tijl.coosemans.org> Date: Fri, 6 Nov 2015 19:59:25 -0800 Message-ID: Subject: Re: svn commit: r289279 - in head/sys: kern vm From: Adrian Chadd To: Tijl Coosemans Cc: Jeff Roberson , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 03:59:26 -0000 hiya, Just bringing this to peoples attention again - the same issue (buf exhaustion, stuck in a loop trying to wake things up) exists. I'm going to commit the sched_yield() change with a big comment about why it's here and that it needs further investigation. That way things are stable again enough to use whilst this gets debugged. Thanks! -adrian On 4 November 2015 at 12:43, Adrian Chadd wrote: > HI, > > FYI - this patch did fix my initial issue, but further work in > multi-user mode caused it to still hang. I haven't diagnosed it yet; I > just put back the yield call so bufdaemon could run. > > So yeah, we still have some work to do. It hit the same problem; stuck > in a loop calling the path to wakeup bufdaemon, but then not sleeping > on anything. > > > > -adrian > > > On 2 November 2015 at 14:13, Adrian Chadd wrote: >> Hi Tijl, and others; >> >> Here's something that Jeff came up with that fixes my problem: >> >> adrian@victoria:~/work/freebsd/head-embedded/src % svn diff sys/kern/ >> Index: sys/kern/vfs_bio.c >> =================================================================== >> --- sys/kern/vfs_bio.c (revision 290048) >> +++ sys/kern/vfs_bio.c (working copy) >> @@ -2910,7 +2910,7 @@ >> } while(buf_scan(false) == 0); >> >> if (reserved) >> - bufspace_release(maxsize); >> + atomic_subtract_long(&bufspace, maxsize); >> if (bp != NULL) { >> bp->b_flags |= B_INVAL; >> brelse(bp); >> >> >> Would you/others please try this and see if it improves things? It >> improves things for me on these memory-starved MIPS boards. >> >> >> >> -a From owner-svn-src-head@freebsd.org Sat Nov 7 04:04:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6741A280F9; Sat, 7 Nov 2015 04:04:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B13931CBD; Sat, 7 Nov 2015 04:04:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7440Ds080850; Sat, 7 Nov 2015 04:04:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7440RE080849; Sat, 7 Nov 2015 04:04:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511070404.tA7440RE080849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 7 Nov 2015 04:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290481 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 04:04:02 -0000 Author: adrian Date: Sat Nov 7 04:04:00 2015 New Revision: 290481 URL: https://svnweb.freebsd.org/changeset/base/290481 Log: Add a sched_yield() to work around low memory conditions in the current code. Things seem to get stuck in low memory conditions where no bufs are available, the reclamation path is called to wakeup the daemon, but no sleeping is done. Because of this, we are stuck in a tight loop in the current process and never run said reclamation path. This was introduced in r289279 . This is only a temporary workaround to restore system usefulness until the more permanent solutions can be found. Tested: * Carambola2, 64MB (and 32MB by manual config.) Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sat Nov 7 02:18:19 2015 (r290480) +++ head/sys/kern/vfs_bio.c Sat Nov 7 04:04:00 2015 (r290481) @@ -3622,6 +3622,23 @@ loop: if (bp == NULL) { if (slpflag || slptimeo) return NULL; + /* + * XXX This is here until the sleep path is diagnosed + * enough to work under very low memory conditions. + * + * There's an issue on low memory, 4BSD+non-preempt + * systems (eg MIPS routers with 32MB RAM) where buffer + * exhaustion occurs without sleeping for buffer + * reclaimation. This just sticks in a loop and + * constantly attempts to allocate a buffer, which + * hits exhaustion and tries to wakeup bufdaemon. + * This never happens because we never yield. + * + * The real solution is to identify and fix these cases + * so we aren't effectively busy-waiting in a loop + * until the reclaimation path has cycles to run. + */ + kern_yield(PRI_USER); goto loop; } From owner-svn-src-head@freebsd.org Sat Nov 7 04:46:35 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2443A287F9; Sat, 7 Nov 2015 04:46:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A26E61ED6; Sat, 7 Nov 2015 04:46:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA74kY4o097055; Sat, 7 Nov 2015 04:46:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA74kYTt097054; Sat, 7 Nov 2015 04:46:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201511070446.tA74kYTt097054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 7 Nov 2015 04:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290482 - head/sys/arm64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 04:46:36 -0000 Author: emaste Date: Sat Nov 7 04:46:34 2015 New Revision: 290482 URL: https://svnweb.freebsd.org/changeset/base/290482 Log: arm64: add igb(4) to GENERIC We have em(4) in GENERIC already and so also supporting the related igb(4) makes sense. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Sat Nov 7 04:04:00 2015 (r290481) +++ head/sys/arm64/conf/GENERIC Sat Nov 7 04:46:34 2015 (r290482) @@ -101,6 +101,7 @@ device pci # Ethernet NICs device vnic # Cavium ThunderX NIC device em # Intel PRO/1000 Gigabit Ethernet Family +device igb # Intel PRO/1000 PCIE Server Gigabit Family device mii device miibus # MII bus support From owner-svn-src-head@freebsd.org Sat Nov 7 04:49:40 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 621CAA28885; Sat, 7 Nov 2015 04:49:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C6D81112; Sat, 7 Nov 2015 04:49:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA74ndHb097188; Sat, 7 Nov 2015 04:49:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA74ndWV097187; Sat, 7 Nov 2015 04:49:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201511070449.tA74ndWV097187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 7 Nov 2015 04:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290483 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 04:49:40 -0000 Author: emaste Date: Sat Nov 7 04:49:39 2015 New Revision: 290483 URL: https://svnweb.freebsd.org/changeset/base/290483 Log: arm64: build em(4) and igb(4) modules Sponsored by: The FreeBSD Foundation Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Nov 7 04:46:34 2015 (r290482) +++ head/sys/modules/Makefile Sat Nov 7 04:49:39 2015 (r290483) @@ -504,6 +504,11 @@ _cxgb= cxgb .endif .endif +.if ${MACHINE_CPUARCH} == "aarch64" +_em= em +_igb= igb +.endif + .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _agp= agp _an= an From owner-svn-src-head@freebsd.org Sat Nov 7 05:08:05 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1FE7A28B02; Sat, 7 Nov 2015 05:08:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com [IPv6:2607:f8b0:400d:c09::22e]) (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 A76241933; Sat, 7 Nov 2015 05:08:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkas77 with SMTP id s77so49360998qka.0; Fri, 06 Nov 2015 21:08:04 -0800 (PST) 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=AgPe+VvxtfLPpz5QcTLNahXHIj+bsLtPagtHAnEYMt8=; b=mp2l6FFMlCGqQlLnqwq+Mg4f3ZPNd/igrW2/Oh8BtgoX7caNfhO4WkGDa8JuhLSru1 K+7Ft2u3hKWY5rC0sQj3+jCZI9EAbDsXZmtQc4W6uW9hQnqVJohceYnSRBf0VLMUSZYY cgw6Kzp3oGQOMxA8Lho0yoz8u0yeKTZTh9Vld4kziGOlyIXuynRGfFHyDFNbJpZDbKcf KMz3kh8SwQfy4/NAuqgo3rEBlN2oJIUkEUxIQQIJyI5JqrhOGO3e5xKPz8cPWrmWdoLG lKzeFEppIKc5kFhHbUO2GIuunqnU1LwgaCOX8NEHEppqy/InVIq+xaGf8JBch+LDTjYk gN1w== MIME-Version: 1.0 X-Received: by 10.55.23.170 with SMTP id 42mr17015875qkx.42.1446872883865; Fri, 06 Nov 2015 21:08:03 -0800 (PST) Received: by 10.140.88.209 with HTTP; Fri, 6 Nov 2015 21:08:03 -0800 (PST) In-Reply-To: <201511070446.tA74kYTt097054@repo.freebsd.org> References: <201511070446.tA74kYTt097054@repo.freebsd.org> Date: Fri, 6 Nov 2015 21:08:03 -0800 Message-ID: Subject: Re: svn commit: r290482 - head/sys/arm64/conf From: NGie Cooper To: Ed Maste Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 05:08:05 -0000 On Fri, Nov 6, 2015 at 8:46 PM, Ed Maste wrote: > Author: emaste > Date: Sat Nov 7 04:46:34 2015 > New Revision: 290482 > URL: https://svnweb.freebsd.org/changeset/base/290482 > > Log: > arm64: add igb(4) to GENERIC > > We have em(4) in GENERIC already and so also supporting the related > igb(4) makes sense. Seems a bit odd that igb couldn't be enabled across the board... From owner-svn-src-head@freebsd.org Sat Nov 7 08:37:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2B6CA2899E; Sat, 7 Nov 2015 08:37:23 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::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 79CCB1B39; Sat, 7 Nov 2015 08:37:23 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by iody8 with SMTP id y8so144247012iod.1; Sat, 07 Nov 2015 00:37:23 -0800 (PST) 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=4mqB2pu+lbvD0IoL6AXvhzc61kW9+CI5s/NVFE4ZjSc=; b=Q9UORXMOfq10VwhlAj5Y5caJNix4bJTg17Bbm9vsm2AnNl3FFZq1w5csHoW8WHfWep 5rRYVUhUR0PR+odHJMUqCx3TB2Z6jNEbvK9ZsxMzN1t01otNQMKHuJ2AHItMaJKHI/gi nbw8+b5qBg6Xa/bjR36JEVyiAhe9/F6FsJ2/enI9acJQ+48Bo6YShh6mw9347IoDoR/b JbTv81hBlLFv1mph5X0EBsnxCXjxm3G0ro1fJtONXfOao9uDW/FawpG9rm3PohSi5zxm D7xfQmGTwOY1T+dLt4PRIyrxtWWORVCoJP36cqON15oadWq3ndzPG440hzGHdRySVA/9 FOww== MIME-Version: 1.0 X-Received: by 10.107.31.138 with SMTP id f132mr19192543iof.84.1446885442946; Sat, 07 Nov 2015 00:37:22 -0800 (PST) Received: by 10.64.173.228 with HTTP; Sat, 7 Nov 2015 00:37:22 -0800 (PST) In-Reply-To: <201511070143.tA71h13k038232@repo.freebsd.org> References: <201511070143.tA71h13k038232@repo.freebsd.org> Date: Sat, 7 Nov 2015 09:37:22 +0100 Message-ID: Subject: Re: svn commit: r290475 - in head: share/man/man9 sys/kern sys/sys From: Svatopluk Kraus To: "Conrad E. Meyer" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 08:37:23 -0000 You broke buildkernel. The following patch helps: diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 950e712..a34c890 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -37,6 +37,7 @@ #define _SYS_SYSCTL_H_ #include +#include struct thread; /* @@ -949,7 +950,7 @@ extern char kern_ident[]; /* Dynamic oid handling */ struct sysctl_oid *sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, int nbr, const char *name, int kind, - void *arg1, intptr_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), + void *arg1, intmax_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), const char *fmt, const char *descr); int sysctl_remove_name(struct sysctl_oid *parent, const char *name, int del, int recurse); On Sat, Nov 7, 2015 at 2:43 AM, Conrad E. Meyer wrote: > Author: cem > Date: Sat Nov 7 01:43:01 2015 > New Revision: 290475 > URL: https://svnweb.freebsd.org/changeset/base/290475 > > Log: > Round out SYSCTL macros to the full set of fixed-width types > > Add S8, S16, S32, and U32 types; add SYSCTL*() macros for them, as well > as for the existing 64-bit types. (While SYSCTL*QUAD and UQUAD macros > already exist, they do not take the same sort of 'val' parameter that > the other macros do.) > > Clean up the documented "types" in the sysctl.9 document. (These are > macros and thus not real types, but the manual page documents intent.) > > The sysctl_add_oid(9) arg2 has been bumped from intptr_t to intmax_t to > accommodate 64-bit types on 32-bit pointer architectures. > > This is just the kernel support piece; the userspace sysctl(1) support > will follow in a later patch. > > Submitted by: Ravi Pokala > Reviewed by: cem > Relnotes: no > Sponsored by: Panasas > Differential Revision: https://reviews.freebsd.org/D4091 > > Modified: > head/share/man/man9/Makefile > head/share/man/man9/sysctl.9 > head/share/man/man9/sysctl_add_oid.9 > head/sys/kern/kern_sysctl.c > head/sys/sys/sysctl.h > > Modified: head/share/man/man9/Makefile > ============================================================================== > --- head/share/man/man9/Makefile Sat Nov 7 00:51:51 2015 (r290474) > +++ head/share/man/man9/Makefile Sat Nov 7 01:43:01 2015 (r290475) > @@ -1631,10 +1631,16 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ > sysctl.9 SYSCTL_ADD_PROC.9 \ > sysctl.9 SYSCTL_ADD_QUAD.9 \ > sysctl.9 SYSCTL_ADD_ROOT_NODE.9 \ > + sysctl.9 SYSCTL_ADD_S8.9 \ > + sysctl.9 SYSCTL_ADD_S16.9 \ > + sysctl.9 SYSCTL_ADD_S32.9 \ > + sysctl.9 SYSCTL_ADD_S64.9 \ > sysctl.9 SYSCTL_ADD_STRING.9 \ > sysctl.9 SYSCTL_ADD_STRUCT.9 \ > sysctl.9 SYSCTL_ADD_U8.9 \ > sysctl.9 SYSCTL_ADD_U16.9 \ > + sysctl.9 SYSCTL_ADD_U32.9 \ > + sysctl.9 SYSCTL_ADD_U64.9 \ > sysctl.9 SYSCTL_ADD_UAUTO.9 \ > sysctl.9 SYSCTL_ADD_UINT.9 \ > sysctl.9 SYSCTL_ADD_ULONG.9 \ > @@ -1650,10 +1656,16 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ > sysctl.9 SYSCTL_PROC.9 \ > sysctl.9 SYSCTL_QUAD.9 \ > sysctl.9 SYSCTL_ROOT_NODE.9 \ > + sysctl.9 SYSCTL_S8.9 \ > + sysctl.9 SYSCTL_S16.9 \ > + sysctl.9 SYSCTL_S32.9 \ > + sysctl.9 SYSCTL_S64.9 \ > sysctl.9 SYSCTL_STRING.9 \ > sysctl.9 SYSCTL_STRUCT.9 \ > sysctl.9 SYSCTL_U8.9 \ > sysctl.9 SYSCTL_U16.9 \ > + sysctl.9 SYSCTL_U32.9 \ > + sysctl.9 SYSCTL_U64.9 \ > sysctl.9 SYSCTL_UINT.9 \ > sysctl.9 SYSCTL_ULONG.9 \ > sysctl.9 SYSCTL_UQUAD.9 > > Modified: head/share/man/man9/sysctl.9 > ============================================================================== > --- head/share/man/man9/sysctl.9 Sat Nov 7 00:51:51 2015 (r290474) > +++ head/share/man/man9/sysctl.9 Sat Nov 7 01:43:01 2015 (r290475) > @@ -37,10 +37,16 @@ > .Nm SYSCTL_ADD_PROC , > .Nm SYSCTL_ADD_QUAD , > .Nm SYSCTL_ADD_ROOT_NODE , > +.Nm SYSCTL_ADD_S8 , > +.Nm SYSCTL_ADD_S16 , > +.Nm SYSCTL_ADD_S32 , > +.Nm SYSCTL_ADD_S64 , > .Nm SYSCTL_ADD_STRING , > .Nm SYSCTL_ADD_STRUCT , > .Nm SYSCTL_ADD_U8 , > .Nm SYSCTL_ADD_U16 , > +.Nm SYSCTL_ADD_U32 , > +.Nm SYSCTL_ADD_U64 , > .Nm SYSCTL_ADD_UAUTO , > .Nm SYSCTL_ADD_UINT , > .Nm SYSCTL_ADD_ULONG , > @@ -56,10 +62,16 @@ > .Nm SYSCTL_PROC , > .Nm SYSCTL_QUAD , > .Nm SYSCTL_ROOT_NODE , > +.Nm SYSCTL_S8 , > +.Nm SYSCTL_S16 , > +.Nm SYSCTL_S32 , > +.Nm SYSCTL_S64 , > .Nm SYSCTL_STRING , > .Nm SYSCTL_STRUCT , > .Nm SYSCTL_U8 , > .Nm SYSCTL_U16 , > +.Nm SYSCTL_U32 , > +.Nm SYSCTL_U64 , > .Nm SYSCTL_UINT , > .Nm SYSCTL_ULONG , > .Nm SYSCTL_UQUAD > @@ -76,7 +88,7 @@ > .Fa "const char *name" > .Fa "int ctlflags" > .Fa "int *ptr" > -.Fa "intptr_t val" > +.Fa "int val" > .Fa "const char *descr" > .Fc > .Ft struct sysctl_oid * > @@ -131,7 +143,7 @@ > .Fa "int number" > .Fa "const char *name" > .Fa "int ctlflags" > -.Fa "quad_t *ptr" > +.Fa "int64_t *ptr" > .Fa "const char *descr" > .Fc > .Ft struct sysctl_oid * > @@ -144,6 +156,50 @@ > .Fa "const char *descr" > .Fc > .Ft struct sysctl_oid * > +.Fo SYSCTL_ADD_S8 > +.Fa "struct sysctl_ctx_list *ctx" > +.Fa "struct sysctl_oid_list *parent" > +.Fa "int number" > +.Fa "const char *name" > +.Fa "int ctlflags" > +.Fa "int8_t *ptr" > +.Fa "int8_t val" > +.Fa "const char *descr" > +.Fc > +.Ft struct sysctl_oid * > +.Fo SYSCTL_ADD_S16 > +.Fa "struct sysctl_ctx_list *ctx" > +.Fa "struct sysctl_oid_list *parent" > +.Fa "int number" > +.Fa "const char *name" > +.Fa "int ctlflags" > +.Fa "int16_t *ptr" > +.Fa "int16_t val" > +.Fa "const char *descr" > +.Fc > +.Ft struct sysctl_oid * > +.Fo SYSCTL_ADD_S32 > +.Fa "struct sysctl_ctx_list *ctx" > +.Fa "struct sysctl_oid_list *parent" > +.Fa "int number" > +.Fa "const char *name" > +.Fa "int ctlflags" > +.Fa "int32_t *ptr" > +.Fa "int32_t val" > +.Fa "const char *descr" > +.Fc > +.Ft struct sysctl_oid * > +.Fo SYSCTL_ADD_S64 > +.Fa "struct sysctl_ctx_list *ctx" > +.Fa "struct sysctl_oid_list *parent" > +.Fa "int number" > +.Fa "const char *name" > +.Fa "int ctlflags" > +.Fa "int64_t *ptr" > +.Fa "int64_t val" > +.Fa "const char *descr" > +.Fc > +.Ft struct sysctl_oid * > .Fo SYSCTL_ADD_STRING > .Fa "struct sysctl_ctx_list *ctx" > .Fa "struct sysctl_oid_list *parent" > @@ -172,8 +228,8 @@ > .Fa "int number" > .Fa "const char *name" > .Fa "int ctlflags" > -.Fa "unsigned int *ptr" > -.Fa "intptr_t val" > +.Fa "uint8_t *ptr" > +.Fa "uint8_t val" > .Fa "const char *descr" > .Fc > .Ft struct sysctl_oid * > @@ -183,8 +239,30 @@ > .Fa "int number" > .Fa "const char *name" > .Fa "int ctlflags" > -.Fa "unsigned int *ptr" > -.Fa "intptr_t val" > +.Fa "uint16_t *ptr" > +.Fa "uint16_t val" > +.Fa "const char *descr" > +.Fc > +.Ft struct sysctl_oid * > +.Fo SYSCTL_ADD_U32 > +.Fa "struct sysctl_ctx_list *ctx" > +.Fa "struct sysctl_oid_list *parent" > +.Fa "int number" > +.Fa "const char *name" > +.Fa "int ctlflags" > +.Fa "uint32_t *ptr" > +.Fa "uint32_t val" > +.Fa "const char *descr" > +.Fc > +.Ft struct sysctl_oid * > +.Fo SYSCTL_ADD_U64 > +.Fa "struct sysctl_ctx_list *ctx" > +.Fa "struct sysctl_oid_list *parent" > +.Fa "int number" > +.Fa "const char *name" > +.Fa "int ctlflags" > +.Fa "uint64_t *ptr" > +.Fa "uint64_t val" > .Fa "const char *descr" > .Fc > .Ft struct sysctl_oid * > @@ -195,7 +273,7 @@ > .Fa "const char *name" > .Fa "int ctlflags" > .Fa "unsigned int *ptr" > -.Fa "intptr_t val" > +.Fa "unsigned int val" > .Fa "const char *descr" > .Fc > .Ft struct sysctl_oid * > @@ -215,7 +293,7 @@ > .Fa "int number" > .Fa "const char *name" > .Fa "int ctlflags" > -.Fa "u_quad_t *ptr" > +.Fa "uint64_t *ptr" > .Fa "const char *descr" > .Fc > .Ft struct sysctl_oid * > @@ -251,11 +329,17 @@ > .Fn SYSCTL_OPAQUE parent number name ctlflags ptr len format descr > .Fn SYSCTL_PROC parent number name ctlflags arg1 arg2 handler format descr > .Fn SYSCTL_QUAD parent number name ctlflags ptr val descr > +.Fn SYSCTL_ROOT_NODE number name ctlflags handler descr > +.Fn SYSCTL_S8 parent number name ctlflags ptr val descr > +.Fn SYSCTL_S16 parent number name ctlflags ptr val descr > +.Fn SYSCTL_S32 parent number name ctlflags ptr val descr > +.Fn SYSCTL_S64 parent number name ctlflags ptr val descr > .Fn SYSCTL_STRING parent number name ctlflags arg len descr > .Fn SYSCTL_STRUCT parent number name ctlflags ptr struct_type descr > -.Fn SYSCTL_ROOT_NODE number name ctlflags handler descr > .Fn SYSCTL_U8 parent number name ctlflags ptr val descr > .Fn SYSCTL_U16 parent number name ctlflags ptr val descr > +.Fn SYSCTL_U32 parent number name ctlflags ptr val descr > +.Fn SYSCTL_U64 parent number name ctlflags ptr val descr > .Fn SYSCTL_UINT parent number name ctlflags ptr val descr > .Fn SYSCTL_ULONG parent number name ctlflags ptr val descr > .Fn SYSCTL_UQUAD parent number name ctlflags ptr val descr > @@ -439,10 +523,16 @@ Static sysctls are declared using one of > .Fn SYSCTL_PROC , > .Fn SYSCTL_QUAD , > .Fn SYSCTL_ROOT_NODE , > +.Fn SYSCTL_S8 , > +.Fn SYSCTL_S16 , > +.Fn SYSCTL_S32 , > +.Fn SYSCTL_S64 , > .Fn SYSCTL_STRING , > .Fn SYSCTL_STRUCT , > .Fn SYSCTL_U8 , > .Fn SYSCTL_U16 , > +.Fn SYSCTL_U32 , > +.Fn SYSCTL_U64 , > .Fn SYSCTL_UINT , > .Fn SYSCTL_ULONG > or > @@ -457,10 +547,16 @@ Dynamic nodes are created using one of t > .Fn SYSCTL_ADD_PROC , > .Fn SYSCTL_ADD_QUAD , > .Fn SYSCTL_ADD_ROOT_NODE , > +.Fn SYSCTL_ADD_S8 , > +.Fn SYSCTL_ADD_S16 , > +.Fn SYSCTL_ADD_S32 , > +.Fn SYSCTL_ADD_S64 , > .Fn SYSCTL_ADD_STRING , > .Fn SYSCTL_ADD_STRUCT , > .Fn SYSCTL_ADD_U8 , > .Fn SYSCTL_ADD_U16 , > +.Fn SYSCTL_ADD_U32 , > +.Fn SYSCTL_ADD_U64 , > .Fn SYSCTL_ADD_UAUTO , > .Fn SYSCTL_ADD_UINT , > .Fn SYSCTL_ADD_ULONG , > @@ -484,6 +580,12 @@ This is a node intended to be a parent f > This is a signed integer. > .It Dv CTLTYPE_STRING > This is a nul-terminated string stored in a character array. > +.It Dv CTLTYPE_S8 > +This is an 8-bit signed integer. > +.It Dv CTLTYPE_S16 > +This is a 16-bit signed integer. > +.It Dv CTLTYPE_S32 > +This is a 32-bit signed integer. > .It Dv CTLTYPE_S64 > This is a 64-bit signed integer. > .It Dv CTLTYPE_OPAQUE > @@ -495,14 +597,16 @@ Alias for > This is an 8-bit unsigned integer. > .It Dv CTLTYPE_U16 > This is a 16-bit unsigned integer. > +.It Dv CTLTYPE_U32 > +This is a 32-bit unsigned integer. > +.It Dv CTLTYPE_U64 > +This is a 64-bit unsigned integer. > .It Dv CTLTYPE_UINT > This is an unsigned integer. > .It Dv CTLTYPE_LONG > This is a signed long. > .It Dv CTLTYPE_ULONG > This is an unsigned long. > -.It Dv CTLTYPE_U64 > -This is a 64-bit unsigned integer. > .El > .Pp > All sysctl types except for new node declarations require one of the following > > Modified: head/share/man/man9/sysctl_add_oid.9 > ============================================================================== > --- head/share/man/man9/sysctl_add_oid.9 Sat Nov 7 00:51:51 2015 (r290474) > +++ head/share/man/man9/sysctl_add_oid.9 Sat Nov 7 01:43:01 2015 (r290475) > @@ -47,7 +47,7 @@ > .Fa "const char *name" > .Fa "int kind" > .Fa "void *arg1" > -.Fa "intptr_t arg2" > +.Fa "intmax_t arg2" > .Fa "int (*handler) (SYSCTL_HANDLER_ARGS)" > .Fa "const char *format" > .Fa "const char *descr" > > Modified: head/sys/kern/kern_sysctl.c > ============================================================================== > --- head/sys/kern/kern_sysctl.c Sat Nov 7 00:51:51 2015 (r290474) > +++ head/sys/kern/kern_sysctl.c Sat Nov 7 01:43:01 2015 (r290475) > @@ -643,7 +643,7 @@ sysctl_remove_oid_locked(struct sysctl_o > */ > struct sysctl_oid * > sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, > - int number, const char *name, int kind, void *arg1, intptr_t arg2, > + int number, const char *name, int kind, void *arg1, intmax_t arg2, > int (*handler)(SYSCTL_HANDLER_ARGS), const char *fmt, const char *descr) > { > struct sysctl_oid *oidp; > @@ -1192,6 +1192,38 @@ sysctl_handle_16(SYSCTL_HANDLER_ARGS) > } > > /* > + * Handle an int32_t, signed or unsigned. > + * Two cases: > + * a variable: point arg1 at it. > + * a constant: pass it in arg2. > + */ > + > +int > +sysctl_handle_32(SYSCTL_HANDLER_ARGS) > +{ > + int32_t tmpout; > + int error = 0; > + > + /* > + * Attempt to get a coherent snapshot by making a copy of the data. > + */ > + if (arg1) > + tmpout = *(int32_t *)arg1; > + else > + tmpout = arg2; > + error = SYSCTL_OUT(req, &tmpout, sizeof(tmpout)); > + > + if (error || !req->newptr) > + return (error); > + > + if (!arg1) > + error = EPERM; > + else > + error = SYSCTL_IN(req, arg1, sizeof(tmpout)); > + return (error); > +} > + > +/* > * Handle an int, signed or unsigned. > * Two cases: > * a variable: point arg1 at it. > > Modified: head/sys/sys/sysctl.h > ============================================================================== > --- head/sys/sys/sysctl.h Sat Nov 7 00:51:51 2015 (r290474) > +++ head/sys/sys/sysctl.h Sat Nov 7 01:43:01 2015 (r290475) > @@ -75,6 +75,10 @@ struct ctlname { > #define CTLTYPE_U64 9 /* name describes an unsigned 64-bit number */ > #define CTLTYPE_U8 0xa /* name describes an unsigned 8-bit number */ > #define CTLTYPE_U16 0xb /* name describes an unsigned 16-bit number */ > +#define CTLTYPE_S8 0xc /* name describes a signed 8-bit number */ > +#define CTLTYPE_S16 0xd /* name describes a signed 16-bit number */ > +#define CTLTYPE_S32 0xe /* name describes a signed 32-bit number */ > +#define CTLTYPE_U32 0xf /* name describes an unsigned 32-bit number */ > > #define CTLFLAG_RD 0x80000000 /* Allow reads of variable */ > #define CTLFLAG_WR 0x40000000 /* Allow writes to the variable */ > @@ -192,10 +196,11 @@ struct sysctl_oid { > > int sysctl_handle_8(SYSCTL_HANDLER_ARGS); > int sysctl_handle_16(SYSCTL_HANDLER_ARGS); > +int sysctl_handle_32(SYSCTL_HANDLER_ARGS); > +int sysctl_handle_64(SYSCTL_HANDLER_ARGS); > int sysctl_handle_int(SYSCTL_HANDLER_ARGS); > int sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS); > int sysctl_handle_long(SYSCTL_HANDLER_ARGS); > -int sysctl_handle_64(SYSCTL_HANDLER_ARGS); > int sysctl_handle_string(SYSCTL_HANDLER_ARGS); > int sysctl_handle_opaque(SYSCTL_HANDLER_ARGS); > int sysctl_handle_counter_u64(SYSCTL_HANDLER_ARGS); > @@ -323,6 +328,26 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e > __arg, len, sysctl_handle_string, "A", __DESCR(descr)); \ > }) > > +/* Oid for a signed 8-bit int. If ptr is NULL, val is returned. */ > +#define SYSCTL_NULL_S8_PTR ((unsigned *)NULL) > +#define SYSCTL_S8(parent, nbr, name, access, ptr, val, descr) \ > + SYSCTL_OID(parent, nbr, name, \ > + CTLTYPE_S8 | CTLFLAG_MPSAFE | (access), \ > + ptr, val, sysctl_handle_8, "C", descr); \ > + CTASSERT((((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S8) && \ > + sizeof(int8_t) == sizeof(*(ptr))) > + > +#define SYSCTL_ADD_S8(ctx, parent, nbr, name, access, ptr, val, descr) \ > +({ \ > + int8_t *__ptr = (ptr); \ > + CTASSERT(((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S8); \ > + sysctl_add_oid(ctx, parent, nbr, name, \ > + CTLTYPE_S8 | CTLFLAG_MPSAFE | (access), \ > + __ptr, val, sysctl_handle_8, "C", __DESCR(descr)); \ > +}) > + > /* Oid for an unsigned 8-bit int. If ptr is NULL, val is returned. */ > #define SYSCTL_NULL_U8_PTR ((unsigned *)NULL) > #define SYSCTL_U8(parent, nbr, name, access, ptr, val, descr) \ > @@ -343,6 +368,26 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e > __ptr, val, sysctl_handle_8, "CU", __DESCR(descr)); \ > }) > > +/* Oid for a signed 16-bit int. If ptr is NULL, val is returned. */ > +#define SYSCTL_NULL_S16_PTR ((unsigned *)NULL) > +#define SYSCTL_S16(parent, nbr, name, access, ptr, val, descr) \ > + SYSCTL_OID(parent, nbr, name, \ > + CTLTYPE_S16 | CTLFLAG_MPSAFE | (access), \ > + ptr, val, sysctl_handle_16, "S", descr); \ > + CTASSERT((((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S16) && \ > + sizeof(int16_t) == sizeof(*(ptr))) > + > +#define SYSCTL_ADD_S16(ctx, parent, nbr, name, access, ptr, val, descr) \ > +({ \ > + int16_t *__ptr = (ptr); \ > + CTASSERT(((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S16); \ > + sysctl_add_oid(ctx, parent, nbr, name, \ > + CTLTYPE_S16 | CTLFLAG_MPSAFE | (access), \ > + __ptr, val, sysctl_handle_16, "S", __DESCR(descr)); \ > +}) > + > /* Oid for an unsigned 16-bit int. If ptr is NULL, val is returned. */ > #define SYSCTL_NULL_U16_PTR ((unsigned *)NULL) > #define SYSCTL_U16(parent, nbr, name, access, ptr, val, descr) \ > @@ -355,7 +400,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e > > #define SYSCTL_ADD_U16(ctx, parent, nbr, name, access, ptr, val, descr) \ > ({ \ > - uint16_t *__ptr = (ptr); \ > + uint16_t *__ptr = (ptr); \ > CTASSERT(((access) & CTLTYPE) == 0 || \ > ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U16); \ > sysctl_add_oid(ctx, parent, nbr, name, \ > @@ -363,6 +408,86 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e > __ptr, val, sysctl_handle_16, "SU", __DESCR(descr)); \ > }) > > +/* Oid for a signed 32-bit int. If ptr is NULL, val is returned. */ > +#define SYSCTL_NULL_S32_PTR ((unsigned *)NULL) > +#define SYSCTL_S32(parent, nbr, name, access, ptr, val, descr) \ > + SYSCTL_OID(parent, nbr, name, \ > + CTLTYPE_S32 | CTLFLAG_MPSAFE | (access), \ > + ptr, val, sysctl_handle_32, "I", descr); \ > + CTASSERT((((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S32) && \ > + sizeof(int32_t) == sizeof(*(ptr))) > + > +#define SYSCTL_ADD_S32(ctx, parent, nbr, name, access, ptr, val, descr) \ > +({ \ > + int32_t *__ptr = (ptr); \ > + CTASSERT(((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S32); \ > + sysctl_add_oid(ctx, parent, nbr, name, \ > + CTLTYPE_S32 | CTLFLAG_MPSAFE | (access), \ > + __ptr, val, sysctl_handle_32, "I", __DESCR(descr)); \ > +}) > + > +/* Oid for an unsigned 32-bit int. If ptr is NULL, val is returned. */ > +#define SYSCTL_NULL_U32_PTR ((unsigned *)NULL) > +#define SYSCTL_U32(parent, nbr, name, access, ptr, val, descr) \ > + SYSCTL_OID(parent, nbr, name, \ > + CTLTYPE_U32 | CTLFLAG_MPSAFE | (access), \ > + ptr, val, sysctl_handle_32, "IU", descr); \ > + CTASSERT((((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U32) && \ > + sizeof(uint32_t) == sizeof(*(ptr))) > + > +#define SYSCTL_ADD_U32(ctx, parent, nbr, name, access, ptr, val, descr) \ > +({ \ > + uint32_t *__ptr = (ptr); \ > + CTASSERT(((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U32); \ > + sysctl_add_oid(ctx, parent, nbr, name, \ > + CTLTYPE_U32 | CTLFLAG_MPSAFE | (access), \ > + __ptr, val, sysctl_handle_32, "IU", __DESCR(descr)); \ > +}) > + > +/* Oid for a signed 64-bit int. If ptr is NULL, val is returned. */ > +#define SYSCTL_NULL_S64_PTR ((unsigned *)NULL) > +#define SYSCTL_S64(parent, nbr, name, access, ptr, val, descr) \ > + SYSCTL_OID(parent, nbr, name, \ > + CTLTYPE_S64 | CTLFLAG_MPSAFE | (access), \ > + ptr, val, sysctl_handle_64, "Q", descr); \ > + CTASSERT((((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64) && \ > + sizeof(int64_t) == sizeof(*(ptr))) > + > +#define SYSCTL_ADD_S64(ctx, parent, nbr, name, access, ptr, val, descr) \ > +({ \ > + int64_t *__ptr = (ptr); \ > + CTASSERT(((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64); \ > + sysctl_add_oid(ctx, parent, nbr, name, \ > + CTLTYPE_S64 | CTLFLAG_MPSAFE | (access), \ > + __ptr, val, sysctl_handle_64, "Q", __DESCR(descr)); \ > +}) > + > +/* Oid for an unsigned 64-bit int. If ptr is NULL, val is returned. */ > +#define SYSCTL_NULL_U64_PTR ((unsigned *)NULL) > +#define SYSCTL_U64(parent, nbr, name, access, ptr, val, descr) \ > + SYSCTL_OID(parent, nbr, name, \ > + CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \ > + ptr, val, sysctl_handle_64, "QU", descr); \ > + CTASSERT((((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U64) && \ > + sizeof(uint64_t) == sizeof(*(ptr))) > + > +#define SYSCTL_ADD_U64(ctx, parent, nbr, name, access, ptr, val, descr) \ > +({ \ > + uint64_t *__ptr = (ptr); \ > + CTASSERT(((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U64); \ > + sysctl_add_oid(ctx, parent, nbr, name, \ > + CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \ > + __ptr, val, sysctl_handle_64, "QU", __DESCR(descr)); \ > +}) > + > /* Oid for an int. If ptr is SYSCTL_NULL_INT_PTR, val is returned. */ > #define SYSCTL_NULL_INT_PTR ((int *)NULL) > #define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \ > From owner-svn-src-head@freebsd.org Sat Nov 7 08:41:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97CC9A28A14; Sat, 7 Nov 2015 08:41:04 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-yk0-x22e.google.com (mail-yk0-x22e.google.com [IPv6:2607:f8b0:4002:c07::22e]) (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 563ED1D12; Sat, 7 Nov 2015 08:41:04 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by ykek133 with SMTP id k133so208307923yke.2; Sat, 07 Nov 2015 00:41:03 -0800 (PST) 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=y8Bkel94aqL1OVI6jgmjNM48S2vMEZ3AQWdXYg6ce+E=; b=JELBDW7YAASd3ZwmGTHOMkm/yOtK2osX90qOlpMpi11UKhCkzulcZw/xr02vxzAorS MRCRnm8q4vtJL33GazVe30elJ60dufJ1eFacZXEto/FSPQbswuk6WEbjFXRDQVDPFk/q 7/0DaI5Xo/WByLEwSzyuZ5H9xEiAZyY91+5eCjm0CCMdfmI4ZxILw0ME+UEGyDC2AhVq BS9OSrgQHv/knhgg9dCYjO8t5QW3bzwgfI7ctnKdCUzOZ5XXqTnxCvfGxg/NfYOtDV/w dpZad6RJDW1hEh5Ds8lgdMEhetB7DCgwuJ3xtGM2gBQu+ohMe3CqkFW6i1Zn01BDJ+ZB l4Uw== MIME-Version: 1.0 X-Received: by 10.129.0.8 with SMTP id 8mr3840188ywa.81.1446885663467; Sat, 07 Nov 2015 00:41:03 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.37.95.9 with HTTP; Sat, 7 Nov 2015 00:41:03 -0800 (PST) In-Reply-To: <201511060445.tA64jUjj063307@repo.freebsd.org> References: <201511060445.tA64jUjj063307@repo.freebsd.org> Date: Sat, 7 Nov 2015 00:41:03 -0800 X-Google-Sender-Auth: e2_2_fb7AOvoXY7xdsJHVFhyH78 Message-ID: Subject: Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options From: Craig Rodrigues To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 08:41:04 -0000 On Thu, Nov 5, 2015 at 8:45 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Fri Nov 6 04:45:29 2015 > New Revision: 290433 > URL: https://svnweb.freebsd.org/changeset/base/290433 > > Log: > Add a FAST_DEPEND option, off by default, which speeds up the build > significantly. > > Enabling this by default, for src or out-of-src, can be done once more > testing > has been done, such as a ports exp-run, and with more compilers. > I put WITH_FAST_DEPEND="yes" in make.conf for these builds: https://jenkins.freebsd.org/job/FreeBSD_HEAD https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc4.9 https://jenkins.freebsd.org/job/FreeBSD_HEAD_sparc64 For the FreeBSD_HEAD_sparc64 build, there is a weird failure on bootstrap: https://jenkins.freebsd.org/job/FreeBSD_HEAD_sparc64/1311/console If you put these entries in make.conf: TARGET=sparc64 WITH_FAST_DEPEND=yes and do: make -j 4 buildworld __MAKE_CONF=make.conf That seems to trigger it. Can you take a look? -- Craig From owner-svn-src-head@freebsd.org Sat Nov 7 09:42:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C023A26F83; Sat, 7 Nov 2015 09:42:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 4C9F414C8; Sat, 7 Nov 2015 09:42:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) 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 mail107.syd.optusnet.com.au (Postfix) with ESMTPS id EA9FED45112; Sat, 7 Nov 2015 20:42:01 +1100 (AEDT) Date: Sat, 7 Nov 2015 20:42:01 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Conrad E. Meyer" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290475 - in head: share/man/man9 sys/kern sys/sys In-Reply-To: <201511070143.tA71h13k038232@repo.freebsd.org> Message-ID: <20151107182254.O1020@besplex.bde.org> References: <201511070143.tA71h13k038232@repo.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=cK4dyQqN c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=1bltlNy1fvD_v7oC0FsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 09:42:12 -0000 On Sat, 7 Nov 2015, Conrad E. Meyer wrote: > Log: > Round out SYSCTL macros to the full set of fixed-width types > > Add S8, S16, S32, and U32 types; add SYSCTL*() macros for them, as well > as for the existing 64-bit types. (While SYSCTL*QUAD and UQUAD macros > already exist, they do not take the same sort of 'val' parameter that > the other macros do.) Actually, the *QUAD macros do take a 'val' parameter (that didn't work), except for the dynamic _ADD forms. SYSCTL_ADD_INT() also takes this parameter. It works there, but is even less useful than for SYSCTL_INT() (it is always possibly to point to a variable). SYSCTL_ADD_LONG() is most inconsistent. It could take a 'val' parameter that would work like for SYSCTL_ADD_INT(), but is like SYSCTL_ADD_QUAD() and doesn't. > Clean up the documented "types" in the sysctl.9 document. (These are > macros and thus not real types, but the manual page documents intent.) > > The sysctl_add_oid(9) arg2 has been bumped from intptr_t to intmax_t to > accommodate 64-bit types on 32-bit pointer architectures. This arg is handled poorly in many places. This is a large ABI change. arg2 is rarely used for scalar sysctls so its use for 64-bit types should be disallowed for all cases instead of fixed or allowed for more cases. Support for 'val' was already left out for the ADD*QUAD macros, perhaps because stronger type checking in these macros made its brokenness more obvious. This arg is not very useful, but was made available at essentially no cost to save a few bytes. Its cost was negative since there was a spare variable in the oid struct that could be repurposed without too many type hacks (it should really be void *, but was intptr_t to represent both void * and small integers). Now its costs are thousands of bytes on 32-bit systems by expanding all oid structs, and larger type hacks. I can't actually find any use of arg2 for a pointer. In most cases where it is really needed, it is a small integer giving a size. sysctl_handle_opaque() is such a case. > This is just the kernel support piece; the userspace sysctl(1) support > will follow in a later patch. You mean sysctl(8). There is also sysctl(3). Both have type info, with too much duplication and too many abstract types in sysctl(3) where the raw C types are of interest. The lists of sysctls in sysctl(3) and sysctl(8) are almost useless since they are so incomplete, but they are in a nicer format than other lists. Bruce From owner-svn-src-head@freebsd.org Sat Nov 7 10:25:44 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59D94A27722; Sat, 7 Nov 2015 10:25:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1B7F61333; Sat, 7 Nov 2015 10:25:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) 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 mail106.syd.optusnet.com.au (Postfix) with ESMTPS id D351A3C192F; Sat, 7 Nov 2015 21:25:32 +1100 (AEDT) Date: Sat, 7 Nov 2015 21:25:32 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Svatopluk Kraus cc: "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290475 - in head: share/man/man9 sys/kern sys/sys In-Reply-To: Message-ID: <20151107205927.P1514@besplex.bde.org> References: <201511070143.tA71h13k038232@repo.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=cK4dyQqN c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=-FrttOG-O2tG-sEUMfgA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 10:25:44 -0000 On Sat, 7 Nov 2015, Svatopluk Kraus wrote: > You broke buildkernel. The following patch helps: > > diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h > index 950e712..a34c890 100644 > --- a/sys/sys/sysctl.h > +++ b/sys/sys/sysctl.h > @@ -37,6 +37,7 @@ > #define _SYS_SYSCTL_H_ > > #include > +#include > > struct thread; > /* This adds namespace pollution. It shouldn't be needed. is standard namespace pollution in . (It has a bogus comment there describing only one thing that it is for.) This pollution is already in dnv.h, nv.h and racct.h. > @@ -949,7 +950,7 @@ extern char kern_ident[]; > /* Dynamic oid handling */ > struct sysctl_oid *sysctl_add_oid(struct sysctl_ctx_list *clist, > struct sysctl_oid_list *parent, int nbr, const char *name, int kind, > - void *arg1, intptr_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), > + void *arg1, intmax_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), > const char *fmt, const char *descr); > int sysctl_remove_name(struct sysctl_oid *parent, const char *name, int del, > int recurse); Apparently the original change wasn't tested on 32-bit arches. I put intptr_t in long ago, since it was more needed and less magic than intmax_t. This was obfuscated by moving it to and including that in various places. intmax_t is still only in which is much larger. It and uintmax_t should be together with intptr_t. That is more polluting in theory but less in practice. doesn't declare much else directly, but includes for the most important types (fixed-width ones). It mainly declares least-width and fast-width types directly. These should be used in most cases where fixed-width types are now used, especially in kernels, but their usability is shown by them almost never being used. Bruce From owner-svn-src-head@freebsd.org Sat Nov 7 11:12:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC13BA2708C; Sat, 7 Nov 2015 11:12:02 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF7E11970; Sat, 7 Nov 2015 11:12:02 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7BC1rg008212; Sat, 7 Nov 2015 11:12:01 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7BC1X6008205; Sat, 7 Nov 2015 11:12:01 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201511071112.tA7BC1X6008205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 7 Nov 2015 11:12:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290486 - in head/sys: net netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 11:12:03 -0000 Author: melifaro Date: Sat Nov 7 11:12:00 2015 New Revision: 290486 URL: https://svnweb.freebsd.org/changeset/base/290486 Log: Unify setting lladdr for AF_INET[6]. Modified: head/sys/net/if_llatbl.c head/sys/net/if_llatbl.h head/sys/netinet/if_ether.c head/sys/netinet/in.c head/sys/netinet6/in6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Sat Nov 7 11:08:19 2015 (r290485) +++ head/sys/net/if_llatbl.c Sat Nov 7 11:12:00 2015 (r290486) @@ -277,6 +277,15 @@ lltable_drop_entry_queue(struct llentry return (pkts_dropped); } +void +lltable_set_entry_addr(struct ifnet *ifp, struct llentry *lle, + const char *lladdr) +{ + + bcopy(lladdr, &lle->ll_addr, ifp->if_addrlen); + lle->la_flags |= LLE_VALID; +} + /* * * Performes generic cleanup routines and frees lle. Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Sat Nov 7 11:08:19 2015 (r290485) +++ head/sys/net/if_llatbl.h Sat Nov 7 11:12:00 2015 (r290486) @@ -207,6 +207,8 @@ struct llentry *llentry_alloc(struct if /* helper functions */ size_t lltable_drop_entry_queue(struct llentry *); +void lltable_set_entry_addr(struct ifnet *ifp, struct llentry *lle, + const char *lladdr); struct llentry *lltable_alloc_entry(struct lltable *llt, u_int flags, const struct sockaddr *l4addr); Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sat Nov 7 11:08:19 2015 (r290485) +++ head/sys/netinet/if_ether.c Sat Nov 7 11:12:00 2015 (r290486) @@ -141,8 +141,6 @@ static void in_arpinput(struct mbuf *); static void arp_check_update_lle(struct arphdr *ah, struct in_addr isaddr, struct ifnet *ifp, int bridged, struct llentry *la); -static void arp_update_lle(struct arphdr *ah, struct ifnet *ifp, - struct llentry *la); static void arp_mark_lle_reachable(struct llentry *la); @@ -820,7 +818,7 @@ match: la = lltable_alloc_entry(LLTABLE(ifp), 0, dst); if (la == NULL) goto drop; - arp_update_lle(ah, ifp, la); + lltable_set_entry_addr(ifp, la, ar_sha(ah)); IF_AFDATA_WLOCK(ifp); LLE_WLOCK(la); @@ -1038,7 +1036,7 @@ arp_check_update_lle(struct arphdr *ah, } /* Update data */ - arp_update_lle(ah, ifp, la); + lltable_set_entry_addr(ifp, la, ar_sha(ah)); IF_AFDATA_WUNLOCK(ifp); LLE_REMREF(la); @@ -1070,17 +1068,6 @@ arp_check_update_lle(struct arphdr *ah, LLE_WUNLOCK(la); } -/* - * Updates @la fields used by fast path code. - */ -static void -arp_update_lle(struct arphdr *ah, struct ifnet *ifp, struct llentry *la) -{ - - memcpy(&la->ll_addr, ar_sha(ah), ifp->if_addrlen); - la->la_flags |= LLE_VALID; -} - static void arp_mark_lle_reachable(struct llentry *la) { Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sat Nov 7 11:08:19 2015 (r290485) +++ head/sys/netinet/in.c Sat Nov 7 11:12:00 2015 (r290486) @@ -1258,8 +1258,8 @@ in_lltable_alloc(struct lltable *llt, u_ } lle->la_flags = flags; if ((flags & LLE_IFADDR) == LLE_IFADDR) { - bcopy(IF_LLADDR(ifp), &lle->ll_addr, ifp->if_addrlen); - lle->la_flags |= (LLE_VALID | LLE_STATIC); + lltable_set_entry_addr(ifp, lle, IF_LLADDR(ifp)); + lle->la_flags |= LLE_STATIC; } return (lle); Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Sat Nov 7 11:08:19 2015 (r290485) +++ head/sys/netinet6/in6.c Sat Nov 7 11:12:00 2015 (r290486) @@ -2261,8 +2261,8 @@ in6_lltable_alloc(struct lltable *llt, u } lle->la_flags = flags; if ((flags & LLE_IFADDR) == LLE_IFADDR) { - bcopy(IF_LLADDR(ifp), &lle->ll_addr, ifp->if_addrlen); - lle->la_flags |= (LLE_VALID | LLE_STATIC); + lltable_set_entry_addr(ifp, lle, IF_LLADDR(ifp)); + lle->la_flags |= LLE_STATIC; } if ((lle->la_flags & LLE_STATIC) != 0) Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sat Nov 7 11:08:19 2015 (r290485) +++ head/sys/netinet6/nd6.c Sat Nov 7 11:12:00 2015 (r290486) @@ -1738,10 +1738,8 @@ nd6_cache_lladdr(struct ifnet *ifp, stru * Since we already know all the data for the new entry, * fill it before insertion. */ - if (lladdr != NULL) { - bcopy(lladdr, &ln->ll_addr, ifp->if_addrlen); - ln->la_flags |= LLE_VALID; - } + if (lladdr != NULL) + lltable_set_entry_addr(ifp, ln, lladdr); IF_AFDATA_WLOCK(ifp); LLE_WLOCK(ln); /* Prefer any existing lle over newly-created one */ @@ -1799,8 +1797,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru * Record source link-layer address * XXX is it dependent to ifp->if_type? */ - bcopy(lladdr, &ln->ll_addr, ifp->if_addrlen); - ln->la_flags |= LLE_VALID; + lltable_set_entry_addr(ifp, ln, lladdr); nd6_llinfo_setstate(ln, ND6_LLINFO_STALE); EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED); Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Sat Nov 7 11:08:19 2015 (r290485) +++ head/sys/netinet6/nd6_nbr.c Sat Nov 7 11:12:00 2015 (r290486) @@ -765,8 +765,7 @@ nd6_na_input(struct mbuf *m, int off, in /* * Record link-layer address, and update the state. */ - bcopy(lladdr, &ln->ll_addr, ifp->if_addrlen); - ln->la_flags |= LLE_VALID; + lltable_set_entry_addr(ifp, ln, lladdr); EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED); if (is_solicited) nd6_llinfo_setstate(ln, ND6_LLINFO_REACHABLE); @@ -832,8 +831,7 @@ nd6_na_input(struct mbuf *m, int off, in * Update link-local address, if any. */ if (lladdr != NULL) { - bcopy(lladdr, &ln->ll_addr, ifp->if_addrlen); - ln->la_flags |= LLE_VALID; + lltable_set_entry_addr(ifp, ln, lladdr); EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED); } From owner-svn-src-head@freebsd.org Sat Nov 7 11:18:40 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9596EA272EC; Sat, 7 Nov 2015 11:18:40 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B1251DCD; Sat, 7 Nov 2015 11:18:40 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 405B31FE023; Sat, 7 Nov 2015 12:18:38 +0100 (CET) Subject: Re: svn commit: r290475 - in head: share/man/man9 sys/kern sys/sys To: Svatopluk Kraus , "Conrad E. Meyer" References: <201511070143.tA71h13k038232@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <563DDE73.6030307@selasky.org> Date: Sat, 7 Nov 2015 12:20:19 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 11:18:40 -0000 On 11/07/15 09:37, Svatopluk Kraus wrote: > +#define SYSCTL_NULL_U64_PTR ((unsigned *)NULL) Hi Conrad, All the NULL macros must have correct type according to the size-check asserts. Else they won't have any purpose: #define SYSCTL_NULL_U64_PTR ((uint64_t *)NULL) #define SYSCTL_NULL_S64_PTR ((int64_t *)NULL) #define SYSCTL_NULL_U8_PTR ((uint8_t *)NULL) #define SYSCTL_NULL_S8_PTR ((int8_t *)NULL) And so one. Can you fix this? --HPS From owner-svn-src-head@freebsd.org Sat Nov 7 11:21:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E4ADA2746D; Sat, 7 Nov 2015 11:21:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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 282931126; Sat, 7 Nov 2015 11:21:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tA7BLohH082923 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 7 Nov 2015 13:21:50 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tA7BLohH082923 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tA7BLneh082922; Sat, 7 Nov 2015 13:21:49 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 7 Nov 2015 13:21:49 +0200 From: Konstantin Belousov To: Bruce Evans Cc: Svatopluk Kraus , "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290475 - in head: share/man/man9 sys/kern sys/sys Message-ID: <20151107112149.GV2257@kib.kiev.ua> References: <201511070143.tA71h13k038232@repo.freebsd.org> <20151107205927.P1514@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151107205927.P1514@besplex.bde.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 11:21:56 -0000 On Sat, Nov 07, 2015 at 09:25:32PM +1100, Bruce Evans wrote: > On Sat, 7 Nov 2015, Svatopluk Kraus wrote: > > > You broke buildkernel. The following patch helps: > > > > diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h > > index 950e712..a34c890 100644 > > --- a/sys/sys/sysctl.h > > +++ b/sys/sys/sysctl.h > > @@ -37,6 +37,7 @@ > > #define _SYS_SYSCTL_H_ > > > > #include > > +#include > > > > struct thread; > > /* > > This adds namespace pollution. It shouldn't be needed. > is standard namespace pollution in . (It has a bogus > comment there describing only one thing that it is for.) > > This pollution is already in dnv.h, nv.h and racct.h. > > > @@ -949,7 +950,7 @@ extern char kern_ident[]; > > /* Dynamic oid handling */ > > struct sysctl_oid *sysctl_add_oid(struct sysctl_ctx_list *clist, > > struct sysctl_oid_list *parent, int nbr, const char *name, int kind, > > - void *arg1, intptr_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), > > + void *arg1, intmax_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), > > const char *fmt, const char *descr); > > int sysctl_remove_name(struct sysctl_oid *parent, const char *name, int del, > > int recurse); > > Apparently the original change wasn't tested on 32-bit arches. > > I put intptr_t in long ago, since it was more needed and > less magic than intmax_t. This was obfuscated by moving it to > and including that in various places. intmax_t is > still only in which is much larger. It and uintmax_t > should be together with intptr_t. That is more polluting in theory > but less in practice. > > doesn't declare much else directly, but includes > for the most important types (fixed-width ones). It > mainly declares least-width and fast-width types directly. These > should be used in most cases where fixed-width types are now used, > especially in kernels, but their usability is shown by them almost > never being used. In other words, do you suggest the following change to fix the compilation ? diff --git a/sys/sys/_stdint.h b/sys/sys/_stdint.h index d0f9249..a0fe0ad 100644 --- a/sys/sys/_stdint.h +++ b/sys/sys/_stdint.h @@ -78,5 +78,13 @@ typedef __intptr_t intptr_t; typedef __uintptr_t uintptr_t; #define _UINTPTR_T_DECLARED #endif +#ifndef _INTMAX_T_DECLARED +typedef __intmax_t intmax_t; +#define _INTMAX_T_DECLARED +#endif +#ifndef _UINTMAX_T_DECLARED +typedef __uintmax_t uintmax_t; +#define _UINTMAX_T_DECLARED +#endif #endif /* !_SYS__STDINT_H_ */ diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h index 762e879..ec3698b 100644 --- a/sys/sys/stdint.h +++ b/sys/sys/stdint.h @@ -55,15 +55,6 @@ typedef __uint_fast16_t uint_fast16_t; typedef __uint_fast32_t uint_fast32_t; typedef __uint_fast64_t uint_fast64_t; -#ifndef _INTMAX_T_DECLARED -typedef __intmax_t intmax_t; -#define _INTMAX_T_DECLARED -#endif -#ifndef _UINTMAX_T_DECLARED -typedef __uintmax_t uintmax_t; -#define _UINTMAX_T_DECLARED -#endif - /* GNU and Darwin define this and people seem to think it's portable */ #if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX) #define __WORDSIZE 64 diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 950e712..f3e2d68 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -949,7 +949,7 @@ extern char kern_ident[]; /* Dynamic oid handling */ struct sysctl_oid *sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, int nbr, const char *name, int kind, - void *arg1, intptr_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), + void *arg1, intmax_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), const char *fmt, const char *descr); int sysctl_remove_name(struct sysctl_oid *parent, const char *name, int del, int recurse); From owner-svn-src-head@freebsd.org Sat Nov 7 11:40:37 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F697A277DB; Sat, 7 Nov 2015 11:40:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC21B1B3E; Sat, 7 Nov 2015 11:40:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7BeZTi014593; Sat, 7 Nov 2015 11:40:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7BeZ01014590; Sat, 7 Nov 2015 11:40:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511071140.tA7BeZ01014590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 7 Nov 2015 11:40:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290489 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 11:40:37 -0000 Author: hselasky Date: Sat Nov 7 11:40:35 2015 New Revision: 290489 URL: https://svnweb.freebsd.org/changeset/base/290489 Log: Add helper function to check if a USB page cache buffer is properly aligned to reduce the use of bounce buffers in PIO mode. MFC after: 1 week Modified: head/sys/dev/usb/usb_busdma.c head/sys/dev/usb/usb_busdma.h Modified: head/sys/dev/usb/usb_busdma.c ============================================================================== --- head/sys/dev/usb/usb_busdma.c Sat Nov 7 11:28:25 2015 (r290488) +++ head/sys/dev/usb/usb_busdma.c Sat Nov 7 11:40:35 2015 (r290489) @@ -134,6 +134,35 @@ usbd_get_page(struct usb_page_cache *pc, } /*------------------------------------------------------------------------* + * usb_pc_buffer_is_aligned - verify alignment + * + * This function is used to check if a page cache buffer is properly + * aligned to reduce the use of bounce buffers in PIO mode. + *------------------------------------------------------------------------*/ +uint8_t +usb_pc_buffer_is_aligned(struct usb_page_cache *pc, usb_frlength_t offset, + usb_frlength_t len, usb_frlength_t mask) +{ + struct usb_page_search buf_res; + + while (len != 0) { + + usbd_get_page(pc, offset, &buf_res); + + if (buf_res.length > len) + buf_res.length = len; + if (USB_P2U(buf_res.buffer) & mask) + return (0); + if (buf_res.length & mask) + return (0); + + offset += buf_res.length; + len -= buf_res.length; + } + return (1); +} + +/*------------------------------------------------------------------------* * usbd_copy_in - copy directly to DMA-able memory *------------------------------------------------------------------------*/ void Modified: head/sys/dev/usb/usb_busdma.h ============================================================================== --- head/sys/dev/usb/usb_busdma.h Sat Nov 7 11:28:25 2015 (r290488) +++ head/sys/dev/usb/usb_busdma.h Sat Nov 7 11:40:35 2015 (r290489) @@ -159,5 +159,8 @@ void usb_pc_cpu_flush(struct usb_page_ca void usb_pc_cpu_invalidate(struct usb_page_cache *pc); void usb_pc_dmamap_destroy(struct usb_page_cache *pc); void usb_pc_free_mem(struct usb_page_cache *pc); +uint8_t usb_pc_buffer_is_aligned(struct usb_page_cache *pc, + usb_frlength_t offset, usb_frlength_t len, + usb_frlength_t mask); #endif /* _USB_BUSDMA_H_ */ From owner-svn-src-head@freebsd.org Sat Nov 7 12:11:08 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06DA6A28540; Sat, 7 Nov 2015 12:11:08 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id C016C1E15; Sat, 7 Nov 2015 12:11:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) 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 7B5BC782F4D; Sat, 7 Nov 2015 23:11:03 +1100 (AEDT) Date: Sat, 7 Nov 2015 23:11:03 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Bruce Evans , Svatopluk Kraus , "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290475 - in head: share/man/man9 sys/kern sys/sys In-Reply-To: <20151107112149.GV2257@kib.kiev.ua> Message-ID: <20151107225124.T1837@besplex.bde.org> References: <201511070143.tA71h13k038232@repo.freebsd.org> <20151107205927.P1514@besplex.bde.org> <20151107112149.GV2257@kib.kiev.ua> 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=R6/+YolX c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=JnTl4vF33SiiERkyM90A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 12:11:08 -0000 On Sat, 7 Nov 2015, Konstantin Belousov wrote: > On Sat, Nov 07, 2015 at 09:25:32PM +1100, Bruce Evans wrote: >> ... >> I put intptr_t in long ago, since it was more needed and >> less magic than intmax_t. This was obfuscated by moving it to >> and including that in various places. intmax_t is >> still only in which is much larger. It and uintmax_t >> should be together with intptr_t. That is more polluting in theory >> but less in practice. > > In other words, do you suggest the following change to fix the compilation ? > > diff --git a/sys/sys/_stdint.h b/sys/sys/_stdint.h > index d0f9249..a0fe0ad 100644 > --- a/sys/sys/_stdint.h > +++ b/sys/sys/_stdint.h > @@ -78,5 +78,13 @@ typedef __intptr_t intptr_t; > typedef __uintptr_t uintptr_t; > #define _UINTPTR_T_DECLARED > #endif > +#ifndef _INTMAX_T_DECLARED > +typedef __intmax_t intmax_t; > +#define _INTMAX_T_DECLARED > +#endif > +#ifndef _UINTMAX_T_DECLARED > +typedef __uintmax_t uintmax_t; > +#define _UINTMAX_T_DECLARED > +#endif > > #endif /* !_SYS__STDINT_H_ */ > ... Yes, but some source file is apparently not including . It is probably trying to be too smart and only including . This bug was detected as a side effect of growing a dependency on . The most exotic type used in is counter_u64_t. The magic for getting this defined without much namespace pollution seems to be that it is only used in a macro that is only used by source files that include . Macros often work like that. Here intmax_t is always needed since it is in an unconditional declaration. Bruce From owner-svn-src-head@freebsd.org Sat Nov 7 12:15:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B850A2867B; Sat, 7 Nov 2015 12:15:04 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 344F21187; Sat, 7 Nov 2015 12:15:04 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7CF3JP026282; Sat, 7 Nov 2015 12:15:03 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7CF3vm026280; Sat, 7 Nov 2015 12:15:03 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <201511071215.tA7CF3vm026280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Sat, 7 Nov 2015 12:15:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290491 - in head/sys/netgraph/bluetooth: hci socket X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 12:15:04 -0000 Author: takawata Date: Sat Nov 7 12:15:02 2015 New Revision: 290491 URL: https://svnweb.freebsd.org/changeset/base/290491 Log: Fix encryption error handling. Close l2cap connection on encryption error. Modified: head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c Modified: head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c Sat Nov 7 12:11:17 2015 (r290490) +++ head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c Sat Nov 7 12:15:02 2015 (r290491) @@ -913,17 +913,17 @@ encryption_change(ng_hci_unit_p unit, st ng_hci_encryption_change_ep *ep = NULL; ng_hci_unit_con_p con = NULL; int error = 0; + u_int16_t h; NG_HCI_M_PULLUP(event, sizeof(*ep)); if (event == NULL) return (ENOBUFS); ep = mtod(event, ng_hci_encryption_change_ep *); + h = NG_HCI_CON_HANDLE(le16toh(ep->con_handle)); + con = ng_hci_con_by_handle(unit, h); if (ep->status == 0) { - u_int16_t h = NG_HCI_CON_HANDLE(le16toh(ep->con_handle)); - - con = ng_hci_con_by_handle(unit, h); if (con == NULL) { NG_HCI_ALERT( "%s: %s - invalid connection handle=%d\n", @@ -940,12 +940,14 @@ encryption_change(ng_hci_unit_p unit, st con->encryption_mode = NG_HCI_ENCRYPTION_MODE_P2P; else con->encryption_mode = NG_HCI_ENCRYPTION_MODE_NONE; - ng_hci_lp_enc_change(con, ep->encryption_enable); } else NG_HCI_ERR( "%s: %s - failed to change encryption mode, status=%d\n", __func__, NG_NODE_NAME(unit->node), ep->status); + /*Anyway, propagete encryption status to upper layer*/ + ng_hci_lp_enc_change(con, con->encryption_mode); + NG_FREE_M(event); return (error); Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c ============================================================================== --- head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c Sat Nov 7 12:11:17 2015 (r290490) +++ head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c Sat Nov 7 12:15:02 2015 (r290491) @@ -467,6 +467,7 @@ ng_btsocket_l2cap_process_l2ca_con_req_r (pcb->idtype == NG_L2CAP_L2CA_IDTYPE_SMP)){ pcb->encryption = op->encryption; pcb->cid = op->lcid; if(pcb->need_encrypt && !(pcb->encryption)){ + ng_btsocket_l2cap_timeout(pcb); pcb->state = NG_BTSOCKET_L2CAP_W4_ENC_CHANGE; }else{ pcb->state = NG_BTSOCKET_L2CAP_OPEN; @@ -713,6 +714,7 @@ static int ng_btsocket_l2cap_process_l2c pcb->encryption = op->result; if(pcb->need_encrypt){ + ng_btsocket_l2cap_untimeout(pcb); if(pcb->state != NG_BTSOCKET_L2CAP_W4_ENC_CHANGE){ NG_BTSOCKET_L2CAP_WARN("%s: Invalid pcb status %d", __func__, pcb->state); @@ -721,6 +723,7 @@ static int ng_btsocket_l2cap_process_l2c soisconnected(pcb->so); }else{ pcb->so->so_error = EPERM; + ng_btsocket_l2cap_send_l2ca_discon_req(0, pcb); pcb->state = NG_BTSOCKET_L2CAP_CLOSED; soisdisconnected(pcb->so); } @@ -2844,6 +2847,7 @@ ng_btsocket_l2cap_process_timeout(void * switch (pcb->state) { case NG_BTSOCKET_L2CAP_CONNECTING: case NG_BTSOCKET_L2CAP_CONFIGURING: + case NG_BTSOCKET_L2CAP_W4_ENC_CHANGE: /* Send disconnect request with "zero" token */ if (pcb->cid != 0) ng_btsocket_l2cap_send_l2ca_discon_req(0, pcb); From owner-svn-src-head@freebsd.org Sat Nov 7 12:30:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D74EA28B96; Sat, 7 Nov 2015 12:30:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDABA1BBE; Sat, 7 Nov 2015 12:30:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7CUiv9029348; Sat, 7 Nov 2015 12:30:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7CUhQs029346; Sat, 7 Nov 2015 12:30:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511071230.tA7CUhQs029346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 7 Nov 2015 12:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290492 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 12:30:45 -0000 Author: kib Date: Sat Nov 7 12:30:43 2015 New Revision: 290492 URL: https://svnweb.freebsd.org/changeset/base/290492 Log: Move intmax_t and uintmax_t type declarations to sys/_stdint.h to give it an exposure needed for use in sys/sysctl.h. Suggested by: bde Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/sys/_stdint.h head/sys/sys/stdint.h Modified: head/sys/sys/_stdint.h ============================================================================== --- head/sys/sys/_stdint.h Sat Nov 7 12:15:02 2015 (r290491) +++ head/sys/sys/_stdint.h Sat Nov 7 12:30:43 2015 (r290492) @@ -78,5 +78,13 @@ typedef __intptr_t intptr_t; typedef __uintptr_t uintptr_t; #define _UINTPTR_T_DECLARED #endif +#ifndef _INTMAX_T_DECLARED +typedef __intmax_t intmax_t; +#define _INTMAX_T_DECLARED +#endif +#ifndef _UINTMAX_T_DECLARED +typedef __uintmax_t uintmax_t; +#define _UINTMAX_T_DECLARED +#endif #endif /* !_SYS__STDINT_H_ */ Modified: head/sys/sys/stdint.h ============================================================================== --- head/sys/sys/stdint.h Sat Nov 7 12:15:02 2015 (r290491) +++ head/sys/sys/stdint.h Sat Nov 7 12:30:43 2015 (r290492) @@ -55,15 +55,6 @@ typedef __uint_fast16_t uint_fast16_t; typedef __uint_fast32_t uint_fast32_t; typedef __uint_fast64_t uint_fast64_t; -#ifndef _INTMAX_T_DECLARED -typedef __intmax_t intmax_t; -#define _INTMAX_T_DECLARED -#endif -#ifndef _UINTMAX_T_DECLARED -typedef __uintmax_t uintmax_t; -#define _UINTMAX_T_DECLARED -#endif - /* GNU and Darwin define this and people seem to think it's portable */ #if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX) #define __WORDSIZE 64 From owner-svn-src-head@freebsd.org Sat Nov 7 12:33:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02D99A28CF8; Sat, 7 Nov 2015 12:33:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C16061E46; Sat, 7 Nov 2015 12:33:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7CXUlx032031; Sat, 7 Nov 2015 12:33:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7CXUKP032030; Sat, 7 Nov 2015 12:33:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511071233.tA7CXUKP032030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 7 Nov 2015 12:33:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290493 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 12:33:32 -0000 Author: kib Date: Sat Nov 7 12:33:30 2015 New Revision: 290493 URL: https://svnweb.freebsd.org/changeset/base/290493 Log: Correct the argument type in the sysctl_add_oid(9) prototype. On ILP32 machines, intptr_t and intmax_t are different types. Submitted by: skra Modified: head/sys/sys/sysctl.h Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Sat Nov 7 12:30:43 2015 (r290492) +++ head/sys/sys/sysctl.h Sat Nov 7 12:33:30 2015 (r290493) @@ -949,7 +949,7 @@ extern char kern_ident[]; /* Dynamic oid handling */ struct sysctl_oid *sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, int nbr, const char *name, int kind, - void *arg1, intptr_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), + void *arg1, intmax_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), const char *fmt, const char *descr); int sysctl_remove_name(struct sysctl_oid *parent, const char *name, int del, int recurse); From owner-svn-src-head@freebsd.org Sat Nov 7 12:43:38 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD854A28009; Sat, 7 Nov 2015 12:43:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 329D215CA; Sat, 7 Nov 2015 12:43:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7Chb8P034993; Sat, 7 Nov 2015 12:43:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7Chaai034980; Sat, 7 Nov 2015 12:43:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511071243.tA7Chaai034980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 12:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290494 - in head: . contrib/ipfilter contrib/llvm/lib/Target/Sparc/AsmParser contrib/llvm/lib/Target/Sparc/Disassembler contrib/llvm/lib/Target/Sparc/InstPrinter contrib/netbsd-tests/l... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 12:43:38 -0000 Author: bapt Date: Sat Nov 7 12:43:35 2015 New Revision: 290494 URL: https://svnweb.freebsd.org/changeset/base/290494 Log: Improve collation string and locales support Merge collation support from Illumos and DragonflyBSD. Locales are now generated with the new localedef(1) tool from CLDR POSIX files. The generated files are now identified as "BSD 1.0" format. The libc now only read "BSD 1.0" locales definitions, all other version will be set to "C" The localedef(1) tool has been imported from Illumos and modified to use tree(3) instead of the CDDL avl(3) A set of tool created by edwin@ and extended by marino@ for dragonfly has been added to be able to generate locales and the Makefiles from the vanilla CLDR unicode databases + a universal UTF-8 charmap (by marino@) Update the locales to unicode v27 Given our regex(3) does not support multibyte (yet) it has been forced to always use locale C Remove now unused colldef(1) and mklocale(1) Finish implementing the numeric BSD extension for ctypes The number of supported locales has grown from 175 to 250 locales. Among the new locales: 6 Arabic locales (AE EG JO MA QA SA), Different variations of spanish locales. Added new 3 components locales for mn_Cyrl_MN, sr_Cyrl_RS sr_Latn_RS, zh_Hans_CN, zh_Hant_HK and zh_Hant_TW. Some aliases has been for 2 components version when possible. Thanks: Garrett D'Amore (Illumos) who made sure all his work was done under BSD license!, Edwin Groothuis (edwin@) for the work he made on tools to be able to generate locales definition usable in freebsd sources out of vanilla CLDR definitions, John Marino (DragonflyBSD) who first merge the Illumos work into Dragonfly and spent hours tracking down bugs. Added: - copied unchanged from r290491, projects/collation/share/colldef/af_ZA.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/am_ET.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/ar_SA.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/be_BY.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/ca_AD.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/cs_CZ.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/da_DK.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/el_GR.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/en_US.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/es_MX.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/et_EE.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/fi_FI.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/he_IL.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/hi_IN.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/hr_HR.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/hu_HU.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/hy_AM.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/is_IS.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/ja_JP.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/kk_Cyrl_KZ.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/ko_KR.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/lt_LT.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/lv_LV.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/nb_NO.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/pl_PL.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/ro_RO.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/ru_RU.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/se_NO.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/sk_SK.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/sl_SI.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/sv_SE.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/tr_TR.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/uk_UA.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/zh_Hans_CN.UTF-8.src - copied unchanged from r290491, projects/collation/share/colldef/zh_Hant_TW.UTF-8.src head/share/ctypedef/ - copied from r290491, projects/collation/share/ctypedef/ head/share/locale-links/ - copied from r290491, projects/collation/share/locale-links/ - copied unchanged from r290491, projects/collation/share/monetdef/ar_AE.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/ar_EG.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/ar_JO.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/ar_MA.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/ar_QA.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/ar_SA.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/da_DK.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/de_AT.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/monetdef/en_AU.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/en_CA.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/en_GB.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/monetdef/en_GB.US-ASCII.src - copied unchanged from r290491, projects/collation/share/monetdef/en_IE.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/monetdef/en_NZ.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/en_PH.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/en_SG.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/en_US.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/en_ZA.ISO8859-1.src - copied unchanged from r290491, projects/collation/share/monetdef/en_ZA.US-ASCII.src - copied unchanged from r290491, projects/collation/share/monetdef/en_ZA.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/es_AR.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/es_CR.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/es_MX.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/fr_CA.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/fr_CH.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/monetdef/fr_CH.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/hi_IN.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/hr_HR.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/hu_HU.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/is_IS.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/it_CH.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/ja_JP.SJIS.src - copied unchanged from r290491, projects/collation/share/monetdef/kk_Cyrl_KZ.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/lv_LV.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/mn_Cyrl_MN.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/nb_NO.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/monetdef/nb_NO.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/nl_BE.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/monetdef/nl_NL.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/monetdef/nn_NO.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/monetdef/pt_BR.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/ro_RO.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/se_NO.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/sk_SK.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/sl_SI.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/sr_Latn_RS.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/sv_FI.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/monetdef/sv_FI.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/sv_SE.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/monetdef/sv_SE.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/tr_TR.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/zh_Hans_CN.GB2312.src - copied unchanged from r290491, projects/collation/share/monetdef/zh_Hans_CN.GBK.src - copied unchanged from r290491, projects/collation/share/monetdef/zh_Hans_CN.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/zh_Hans_CN.eucCN.src - copied unchanged from r290491, projects/collation/share/monetdef/zh_Hant_HK.UTF-8.src - copied unchanged from r290491, projects/collation/share/monetdef/zh_Hant_TW.Big5.src - copied unchanged from r290491, projects/collation/share/monetdef/zh_Hant_TW.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/ar_SA.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/cs_CZ.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/de_DE.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/en_US.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/es_MX.ISO8859-1.src - copied unchanged from r290491, projects/collation/share/msgdef/es_MX.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/et_EE.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/eu_ES.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/fi_FI.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/msgdef/fi_FI.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/fr_FR.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/hi_IN.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/hu_HU.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/is_IS.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/msgdef/is_IS.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/it_IT.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/msgdef/it_IT.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/kk_Cyrl_KZ.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/lt_LT.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/mn_Cyrl_MN.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/nb_NO.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/nl_NL.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/nn_NO.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/pl_PL.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/pt_PT.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/msgdef/pt_PT.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/ro_RO.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/se_NO.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/sk_SK.ISO8859-2.src - copied unchanged from r290491, projects/collation/share/msgdef/sk_SK.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/sl_SI.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/sr_Cyrl_RS.ISO8859-5.src - copied unchanged from r290491, projects/collation/share/msgdef/sr_Latn_RS.ISO8859-2.src - copied unchanged from r290491, projects/collation/share/msgdef/sr_Latn_RS.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/sv_SE.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/tr_TR.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/zh_Hans_CN.GB2312.src - copied unchanged from r290491, projects/collation/share/msgdef/zh_Hans_CN.GBK.src - copied unchanged from r290491, projects/collation/share/msgdef/zh_Hans_CN.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/zh_Hant_HK.Big5HKSCS.src - copied unchanged from r290491, projects/collation/share/msgdef/zh_Hant_HK.UTF-8.src - copied unchanged from r290491, projects/collation/share/msgdef/zh_Hant_TW.Big5.src - copied unchanged from r290491, projects/collation/share/msgdef/zh_Hant_TW.UTF-8.src - copied unchanged from r290491, projects/collation/share/numericdef/ar_SA.UTF-8.src - copied unchanged from r290491, projects/collation/share/numericdef/en_US.UTF-8.src - copied unchanged from r290491, projects/collation/share/numericdef/en_ZA.US-ASCII.src - copied unchanged from r290491, projects/collation/share/numericdef/fr_CH.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/numericdef/fr_CH.UTF-8.src - copied unchanged from r290491, projects/collation/share/numericdef/hi_IN.UTF-8.src - copied unchanged from r290491, projects/collation/share/numericdef/hy_AM.UTF-8.src - copied unchanged from r290491, projects/collation/share/numericdef/it_CH.UTF-8.src - copied unchanged from r290491, projects/collation/share/numericdef/ru_RU.CP866.src - copied unchanged from r290491, projects/collation/share/numericdef/sr_Latn_RS.UTF-8.src - copied unchanged from r290491, projects/collation/share/numericdef/tr_TR.UTF-8.src - copied unchanged from r290491, projects/collation/share/numericdef/uk_UA.ISO8859-5.src - copied unchanged from r290491, projects/collation/share/numericdef/uk_UA.UTF-8.src - copied unchanged from r290491, projects/collation/share/numericdef/zh_Hans_CN.GB2312.src - copied unchanged from r290491, projects/collation/share/numericdef/zh_Hans_CN.eucCN.src - copied unchanged from r290491, projects/collation/share/numericdef/zh_Hant_TW.Big5.src - copied unchanged from r290491, projects/collation/share/timedef/af_ZA.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/ar_JO.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/ar_MA.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/ar_SA.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/ca_IT.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/ca_IT.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/da_DK.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/de_AT.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/de_DE.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/en_CA.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/en_GB.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/en_HK.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/en_IE.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/en_PH.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/en_SG.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/en_US.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/en_ZA.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/es_AR.ISO8859-1.src - copied unchanged from r290491, projects/collation/share/timedef/es_CR.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/es_ES.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/es_MX.ISO8859-1.src - copied unchanged from r290491, projects/collation/share/timedef/es_MX.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/eu_ES.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/fi_FI.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/fr_BE.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/fr_BE.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/fr_CA.ISO8859-1.src - copied unchanged from r290491, projects/collation/share/timedef/fr_CA.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/fr_CH.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/fr_CH.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/fr_FR.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/hi_IN.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/is_IS.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/it_CH.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/it_CH.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/it_IT.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/kk_Cyrl_KZ.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/mn_Cyrl_MN.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/nb_NO.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/nl_BE.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/nl_NL.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/nn_NO.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/pt_PT.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/se_FI.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/se_NO.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/sr_Cyrl_RS.ISO8859-5.src - copied unchanged from r290491, projects/collation/share/timedef/sr_Latn_RS.ISO8859-2.src - copied unchanged from r290491, projects/collation/share/timedef/sr_Latn_RS.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/sv_FI.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/sv_FI.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/sv_SE.ISO8859-15.src - copied unchanged from r290491, projects/collation/share/timedef/zh_Hans_CN.GB2312.src - copied unchanged from r290491, projects/collation/share/timedef/zh_Hans_CN.GBK.src - copied unchanged from r290491, projects/collation/share/timedef/zh_Hans_CN.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/zh_Hans_CN.eucCN.src - copied unchanged from r290491, projects/collation/share/timedef/zh_Hant_HK.Big5HKSCS.src - copied unchanged from r290491, projects/collation/share/timedef/zh_Hant_HK.UTF-8.src - copied unchanged from r290491, projects/collation/share/timedef/zh_Hant_TW.Big5.src - copied unchanged from r290491, projects/collation/share/timedef/zh_Hant_TW.UTF-8.src head/tools/tools/locale/ - copied from r290491, projects/collation/tools/tools/locale/ head/usr.bin/localedef/ - copied from r290491, projects/collation/usr.bin/localedef/ Directory Properties: head/share/colldef/af_ZA.UTF-8.src (props changed) head/share/colldef/am_ET.UTF-8.src (props changed) head/share/colldef/ar_SA.UTF-8.src (props changed) head/share/colldef/be_BY.UTF-8.src (props changed) head/share/colldef/ca_AD.UTF-8.src (props changed) head/share/colldef/cs_CZ.UTF-8.src (props changed) head/share/colldef/da_DK.UTF-8.src (props changed) head/share/colldef/el_GR.UTF-8.src (props changed) head/share/colldef/en_US.UTF-8.src (props changed) head/share/colldef/es_MX.UTF-8.src (props changed) head/share/colldef/et_EE.UTF-8.src (props changed) head/share/colldef/fi_FI.UTF-8.src (props changed) head/share/colldef/he_IL.UTF-8.src (props changed) head/share/colldef/hi_IN.UTF-8.src (props changed) head/share/colldef/hr_HR.UTF-8.src (props changed) head/share/colldef/hu_HU.UTF-8.src (props changed) head/share/colldef/hy_AM.UTF-8.src (props changed) head/share/colldef/is_IS.UTF-8.src (props changed) head/share/colldef/ja_JP.UTF-8.src (props changed) head/share/colldef/kk_Cyrl_KZ.UTF-8.src (props changed) head/share/colldef/ko_KR.UTF-8.src (props changed) head/share/colldef/lt_LT.UTF-8.src (props changed) head/share/colldef/lv_LV.UTF-8.src (props changed) head/share/colldef/nb_NO.UTF-8.src (props changed) head/share/colldef/pl_PL.UTF-8.src (props changed) head/share/colldef/ro_RO.UTF-8.src (props changed) head/share/colldef/ru_RU.UTF-8.src (props changed) head/share/colldef/se_NO.UTF-8.src (props changed) head/share/colldef/sk_SK.UTF-8.src (props changed) head/share/colldef/sl_SI.UTF-8.src (props changed) head/share/colldef/sv_SE.UTF-8.src (props changed) head/share/colldef/tr_TR.UTF-8.src (props changed) head/share/colldef/uk_UA.UTF-8.src (props changed) head/share/colldef/zh_Hans_CN.UTF-8.src (props changed) head/share/colldef/zh_Hant_TW.UTF-8.src (props changed) head/share/monetdef/ar_AE.UTF-8.src (props changed) head/share/monetdef/ar_EG.UTF-8.src (props changed) head/share/monetdef/ar_JO.UTF-8.src (props changed) head/share/monetdef/ar_MA.UTF-8.src (props changed) head/share/monetdef/ar_QA.UTF-8.src (props changed) head/share/monetdef/ar_SA.UTF-8.src (props changed) head/share/monetdef/da_DK.UTF-8.src (props changed) head/share/monetdef/de_AT.ISO8859-15.src (props changed) head/share/monetdef/en_AU.UTF-8.src (props changed) head/share/monetdef/en_CA.UTF-8.src (props changed) head/share/monetdef/en_GB.ISO8859-15.src (props changed) head/share/monetdef/en_GB.US-ASCII.src (props changed) head/share/monetdef/en_IE.ISO8859-15.src (props changed) head/share/monetdef/en_NZ.UTF-8.src (props changed) head/share/monetdef/en_PH.UTF-8.src (props changed) head/share/monetdef/en_SG.UTF-8.src (props changed) head/share/monetdef/en_US.UTF-8.src (props changed) head/share/monetdef/en_ZA.ISO8859-1.src (props changed) head/share/monetdef/en_ZA.US-ASCII.src (props changed) head/share/monetdef/en_ZA.UTF-8.src (props changed) head/share/monetdef/es_AR.UTF-8.src (props changed) head/share/monetdef/es_CR.UTF-8.src (props changed) head/share/monetdef/es_MX.UTF-8.src (props changed) head/share/monetdef/fr_CA.UTF-8.src (props changed) head/share/monetdef/fr_CH.ISO8859-15.src (props changed) head/share/monetdef/fr_CH.UTF-8.src (props changed) head/share/monetdef/hi_IN.UTF-8.src (props changed) head/share/monetdef/hr_HR.UTF-8.src (props changed) head/share/monetdef/hu_HU.UTF-8.src (props changed) head/share/monetdef/is_IS.UTF-8.src (props changed) head/share/monetdef/it_CH.UTF-8.src (props changed) head/share/monetdef/ja_JP.SJIS.src (props changed) head/share/monetdef/kk_Cyrl_KZ.UTF-8.src (props changed) head/share/monetdef/lv_LV.UTF-8.src (props changed) head/share/monetdef/mn_Cyrl_MN.UTF-8.src (props changed) head/share/monetdef/nb_NO.ISO8859-15.src (props changed) head/share/monetdef/nb_NO.UTF-8.src (props changed) head/share/monetdef/nl_BE.ISO8859-15.src (props changed) head/share/monetdef/nl_NL.ISO8859-15.src (props changed) head/share/monetdef/nn_NO.ISO8859-15.src (props changed) head/share/monetdef/pt_BR.UTF-8.src (props changed) head/share/monetdef/ro_RO.UTF-8.src (props changed) head/share/monetdef/se_NO.UTF-8.src (props changed) head/share/monetdef/sk_SK.UTF-8.src (props changed) head/share/monetdef/sl_SI.UTF-8.src (props changed) head/share/monetdef/sr_Latn_RS.UTF-8.src (props changed) head/share/monetdef/sv_FI.ISO8859-15.src (props changed) head/share/monetdef/sv_FI.UTF-8.src (props changed) head/share/monetdef/sv_SE.ISO8859-15.src (props changed) head/share/monetdef/sv_SE.UTF-8.src (props changed) head/share/monetdef/tr_TR.UTF-8.src (props changed) head/share/monetdef/zh_Hans_CN.GB2312.src (props changed) head/share/monetdef/zh_Hans_CN.GBK.src (props changed) head/share/monetdef/zh_Hans_CN.UTF-8.src (props changed) head/share/monetdef/zh_Hans_CN.eucCN.src (props changed) head/share/monetdef/zh_Hant_HK.UTF-8.src (props changed) head/share/monetdef/zh_Hant_TW.Big5.src (props changed) head/share/monetdef/zh_Hant_TW.UTF-8.src (props changed) head/share/msgdef/ar_SA.UTF-8.src (props changed) head/share/msgdef/cs_CZ.UTF-8.src (props changed) head/share/msgdef/de_DE.UTF-8.src (props changed) head/share/msgdef/en_US.UTF-8.src (props changed) head/share/msgdef/es_MX.ISO8859-1.src (props changed) head/share/msgdef/es_MX.UTF-8.src (props changed) head/share/msgdef/et_EE.UTF-8.src (props changed) head/share/msgdef/eu_ES.UTF-8.src (props changed) head/share/msgdef/fi_FI.ISO8859-15.src (props changed) head/share/msgdef/fi_FI.UTF-8.src (props changed) head/share/msgdef/fr_FR.UTF-8.src (props changed) head/share/msgdef/hi_IN.UTF-8.src (props changed) head/share/msgdef/hu_HU.UTF-8.src (props changed) head/share/msgdef/is_IS.ISO8859-15.src (props changed) head/share/msgdef/is_IS.UTF-8.src (props changed) head/share/msgdef/it_IT.ISO8859-15.src (props changed) head/share/msgdef/it_IT.UTF-8.src (props changed) head/share/msgdef/kk_Cyrl_KZ.UTF-8.src (props changed) head/share/msgdef/lt_LT.UTF-8.src (props changed) head/share/msgdef/mn_Cyrl_MN.UTF-8.src (props changed) head/share/msgdef/nb_NO.UTF-8.src (props changed) head/share/msgdef/nl_NL.UTF-8.src (props changed) head/share/msgdef/nn_NO.UTF-8.src (props changed) head/share/msgdef/pl_PL.UTF-8.src (props changed) head/share/msgdef/pt_PT.ISO8859-15.src (props changed) head/share/msgdef/pt_PT.UTF-8.src (props changed) head/share/msgdef/ro_RO.UTF-8.src (props changed) head/share/msgdef/se_NO.UTF-8.src (props changed) head/share/msgdef/sk_SK.ISO8859-2.src (props changed) head/share/msgdef/sk_SK.UTF-8.src (props changed) head/share/msgdef/sl_SI.UTF-8.src (props changed) head/share/msgdef/sr_Cyrl_RS.ISO8859-5.src (props changed) head/share/msgdef/sr_Latn_RS.ISO8859-2.src (props changed) head/share/msgdef/sr_Latn_RS.UTF-8.src (props changed) head/share/msgdef/sv_SE.UTF-8.src (props changed) head/share/msgdef/tr_TR.UTF-8.src (props changed) head/share/msgdef/zh_Hans_CN.GB2312.src (props changed) head/share/msgdef/zh_Hans_CN.GBK.src (props changed) head/share/msgdef/zh_Hans_CN.UTF-8.src (props changed) head/share/msgdef/zh_Hant_HK.Big5HKSCS.src (props changed) head/share/msgdef/zh_Hant_HK.UTF-8.src (props changed) head/share/msgdef/zh_Hant_TW.Big5.src (props changed) head/share/msgdef/zh_Hant_TW.UTF-8.src (props changed) head/share/numericdef/ar_SA.UTF-8.src (props changed) head/share/numericdef/en_US.UTF-8.src (props changed) head/share/numericdef/en_ZA.US-ASCII.src (props changed) head/share/numericdef/fr_CH.ISO8859-15.src (props changed) head/share/numericdef/fr_CH.UTF-8.src (props changed) head/share/numericdef/hi_IN.UTF-8.src (props changed) head/share/numericdef/hy_AM.UTF-8.src (props changed) head/share/numericdef/it_CH.UTF-8.src (props changed) head/share/numericdef/ru_RU.CP866.src (props changed) head/share/numericdef/sr_Latn_RS.UTF-8.src (props changed) head/share/numericdef/tr_TR.UTF-8.src (props changed) head/share/numericdef/uk_UA.ISO8859-5.src (props changed) head/share/numericdef/uk_UA.UTF-8.src (props changed) head/share/numericdef/zh_Hans_CN.GB2312.src (props changed) head/share/numericdef/zh_Hans_CN.eucCN.src (props changed) head/share/numericdef/zh_Hant_TW.Big5.src (props changed) head/share/timedef/af_ZA.UTF-8.src (props changed) head/share/timedef/ar_JO.UTF-8.src (props changed) head/share/timedef/ar_MA.UTF-8.src (props changed) head/share/timedef/ar_SA.UTF-8.src (props changed) head/share/timedef/ca_IT.ISO8859-15.src (props changed) head/share/timedef/ca_IT.UTF-8.src (props changed) head/share/timedef/da_DK.ISO8859-15.src (props changed) head/share/timedef/de_AT.ISO8859-15.src (props changed) head/share/timedef/de_DE.ISO8859-15.src (props changed) head/share/timedef/en_CA.UTF-8.src (props changed) head/share/timedef/en_GB.UTF-8.src (props changed) head/share/timedef/en_HK.UTF-8.src (props changed) head/share/timedef/en_IE.UTF-8.src (props changed) head/share/timedef/en_PH.UTF-8.src (props changed) head/share/timedef/en_SG.UTF-8.src (props changed) head/share/timedef/en_US.UTF-8.src (props changed) head/share/timedef/en_ZA.UTF-8.src (props changed) head/share/timedef/es_AR.ISO8859-1.src (props changed) head/share/timedef/es_CR.UTF-8.src (props changed) head/share/timedef/es_ES.ISO8859-15.src (props changed) head/share/timedef/es_MX.ISO8859-1.src (props changed) head/share/timedef/es_MX.UTF-8.src (props changed) head/share/timedef/eu_ES.UTF-8.src (props changed) head/share/timedef/fi_FI.ISO8859-15.src (props changed) head/share/timedef/fr_BE.ISO8859-15.src (props changed) head/share/timedef/fr_BE.UTF-8.src (props changed) head/share/timedef/fr_CA.ISO8859-1.src (props changed) head/share/timedef/fr_CA.UTF-8.src (props changed) head/share/timedef/fr_CH.ISO8859-15.src (props changed) head/share/timedef/fr_CH.UTF-8.src (props changed) head/share/timedef/fr_FR.ISO8859-15.src (props changed) head/share/timedef/hi_IN.UTF-8.src (props changed) head/share/timedef/is_IS.ISO8859-15.src (props changed) head/share/timedef/it_CH.ISO8859-15.src (props changed) head/share/timedef/it_CH.UTF-8.src (props changed) head/share/timedef/it_IT.ISO8859-15.src (props changed) head/share/timedef/kk_Cyrl_KZ.UTF-8.src (props changed) head/share/timedef/mn_Cyrl_MN.UTF-8.src (props changed) head/share/timedef/nb_NO.ISO8859-15.src (props changed) head/share/timedef/nl_BE.UTF-8.src (props changed) head/share/timedef/nl_NL.UTF-8.src (props changed) head/share/timedef/nn_NO.ISO8859-15.src (props changed) head/share/timedef/pt_PT.ISO8859-15.src (props changed) head/share/timedef/se_FI.UTF-8.src (props changed) head/share/timedef/se_NO.UTF-8.src (props changed) head/share/timedef/sr_Cyrl_RS.ISO8859-5.src (props changed) head/share/timedef/sr_Latn_RS.ISO8859-2.src (props changed) head/share/timedef/sr_Latn_RS.UTF-8.src (props changed) head/share/timedef/sv_FI.ISO8859-15.src (props changed) head/share/timedef/sv_FI.UTF-8.src (props changed) head/share/timedef/sv_SE.ISO8859-15.src (props changed) head/share/timedef/zh_Hans_CN.GB2312.src (props changed) head/share/timedef/zh_Hans_CN.GBK.src (props changed) head/share/timedef/zh_Hans_CN.UTF-8.src (props changed) head/share/timedef/zh_Hans_CN.eucCN.src (props changed) head/share/timedef/zh_Hant_HK.Big5HKSCS.src (props changed) head/share/timedef/zh_Hant_HK.UTF-8.src (props changed) head/share/timedef/zh_Hant_TW.Big5.src (props changed) head/share/timedef/zh_Hant_TW.UTF-8.src (props changed) Replaced: - copied unchanged from r290491, projects/collation/share/monetdef/sk_SK.ISO8859-2.src - copied unchanged from r290491, projects/collation/share/monetdef/sl_SI.ISO8859-2.src - copied unchanged from r290491, projects/collation/share/numericdef/uk_UA.KOI8-U.src - copied unchanged from r290491, projects/collation/share/timedef/de_DE.UTF-8.src Directory Properties: head/share/monetdef/sk_SK.ISO8859-2.src (props changed) head/share/monetdef/sl_SI.ISO8859-2.src (props changed) head/share/numericdef/uk_UA.KOI8-U.src (props changed) head/share/timedef/de_DE.UTF-8.src (props changed) Deleted: head/lib/libc/locale/ascii.c head/share/colldef/README head/share/colldef/be_BY.CP1131.src head/share/colldef/be_BY.CP1251.src head/share/colldef/be_BY.ISO8859-5.src head/share/colldef/bg_BG.CP1251.src head/share/colldef/ca_ES.ISO8859-1.src head/share/colldef/ca_ES.ISO8859-15.src head/share/colldef/cs_CZ.ISO8859-2.src head/share/colldef/de_DE.ISO8859-1.src head/share/colldef/de_DE.ISO8859-15.src head/share/colldef/el_GR.ISO8859-7.src head/share/colldef/en_DK.example head/share/colldef/es_ES.ISO8859-1.src head/share/colldef/es_ES.ISO8859-15.src head/share/colldef/et_EE.ISO8859-15.src head/share/colldef/hi_IN.ISCII-DEV.src head/share/colldef/hr_HR.ISO8859-2.src head/share/colldef/hy_AM.ARMSCII-8.src head/share/colldef/is_IS.ISO8859-1.src head/share/colldef/is_IS.ISO8859-15.src head/share/colldef/kk_KZ.PT154.src head/share/colldef/la_LN.ISO8859-1.src head/share/colldef/la_LN.ISO8859-13.src head/share/colldef/la_LN.ISO8859-15.src head/share/colldef/la_LN.ISO8859-2.src head/share/colldef/la_LN.ISO8859-4.src head/share/colldef/la_LN.US-ASCII.src head/share/colldef/lt_LT.ISO8859-4.src head/share/colldef/map.ARMSCII-8 head/share/colldef/map.CP1131 head/share/colldef/map.CP1251 head/share/colldef/map.CP866 head/share/colldef/map.ISCII-DEV head/share/colldef/map.ISO8859-1 head/share/colldef/map.ISO8859-13 head/share/colldef/map.ISO8859-15 head/share/colldef/map.ISO8859-2 head/share/colldef/map.ISO8859-4 head/share/colldef/map.ISO8859-5 head/share/colldef/map.ISO8859-7 head/share/colldef/map.ISO8859-9 head/share/colldef/map.KOI8-R head/share/colldef/map.KOI8-U head/share/colldef/map.PT154 head/share/colldef/no_NO.ISO8859-1.src head/share/colldef/no_NO.ISO8859-15.src head/share/colldef/pl_PL.ISO8859-2.src head/share/colldef/ru_RU.CP1251.src head/share/colldef/ru_RU.CP866.src head/share/colldef/ru_RU.ISO8859-5.src head/share/colldef/ru_RU.KOI8-R.src head/share/colldef/sl_SI.ISO8859-2.src head/share/colldef/sr_YU.ISO8859-5.src head/share/colldef/sv_SE.ISO8859-1.src head/share/colldef/sv_SE.ISO8859-15.src head/share/colldef/tr_TR.ISO8859-9.src head/share/colldef/uk_UA.CP1251.src head/share/colldef/uk_UA.ISO8859-5.src head/share/colldef/uk_UA.KOI8-U.src head/share/mklocale/ head/share/monetdef/Makefile.depend head/share/monetdef/af_ZA.ISO8859-1.src head/share/monetdef/ca_ES.ISO8859-1.src head/share/monetdef/ca_ES.UTF-8.src head/share/monetdef/da_DK.ISO8859-1.src head/share/monetdef/de_AT.ISO8859-1.src head/share/monetdef/de_CH.ISO8859-1.src head/share/monetdef/de_DE.ISO8859-1.src head/share/monetdef/de_DE.UTF-8.src head/share/monetdef/el_GR.ISO8859-7.src head/share/monetdef/el_GR.UTF-8.src head/share/monetdef/en_AU.ISO8859-1.src head/share/monetdef/en_CA.ISO8859-1.src head/share/monetdef/en_GB.ISO8859-1.src head/share/monetdef/en_NZ.ISO8859-1.src head/share/monetdef/en_US.ISO8859-1.src head/share/monetdef/es_ES.ISO8859-1.src head/share/monetdef/es_ES.UTF-8.src head/share/monetdef/et_EE.ISO8859-15.src head/share/monetdef/fi_FI.ISO8859-1.src head/share/monetdef/fi_FI.UTF-8.src head/share/monetdef/fr_BE.ISO8859-1.src head/share/monetdef/fr_BE.UTF-8.src head/share/monetdef/fr_FR.ISO8859-1.src head/share/monetdef/fr_FR.UTF-8.src head/share/monetdef/hr_HR.ISO8859-2.src head/share/monetdef/is_IS.ISO8859-1.src head/share/monetdef/it_IT.ISO8859-1.src head/share/monetdef/it_IT.UTF-8.src head/share/monetdef/kk_KZ.PT154.src head/share/monetdef/kk_KZ.UTF-8.src head/share/monetdef/lt_LT.ISO8859-13.src head/share/monetdef/mn_MN.UTF-8.src head/share/monetdef/nl_BE.ISO8859-1.src head/share/monetdef/nl_BE.UTF-8.src head/share/monetdef/nl_NL.ISO8859-1.src head/share/monetdef/no_NO.ISO8859-1.src head/share/monetdef/pt_BR.ISO8859-1.src head/share/monetdef/pt_PT.ISO8859-1.src head/share/monetdef/pt_PT.ISO8859-15.src head/share/monetdef/pt_PT.UTF-8.src head/share/monetdef/ro_RO.ISO8859-2.src head/share/monetdef/sr_YU.ISO8859-2.src head/share/monetdef/sr_YU.ISO8859-5.src head/share/monetdef/sr_YU.UTF-8.src head/share/monetdef/sv_SE.ISO8859-1.src head/share/monetdef/zh_CN.GB18030.src head/share/monetdef/zh_CN.GB2312.src head/share/monetdef/zh_CN.UTF-8.src head/share/monetdef/zh_CN.eucCN.src head/share/monetdef/zh_HK.UTF-8.src head/share/monetdef/zh_TW.Big5.src head/share/msgdef/Makefile.depend head/share/msgdef/af_ZA.ISO8859-1.src head/share/msgdef/ca_ES.ISO8859-1.src head/share/msgdef/cs_CZ.ISO8859-2.src head/share/msgdef/da_DK.ISO8859-1.src head/share/msgdef/de_DE.ISO8859-1.src head/share/msgdef/en_CA.ISO8859-1.src head/share/msgdef/en_GB.ISO8859-1.src head/share/msgdef/en_US.ISO8859-1.src head/share/msgdef/es_ES.ISO8859-1.src head/share/msgdef/et_EE.ISO8859-15.src head/share/msgdef/eu_ES.ISO8859-1.src head/share/msgdef/fi_FI.ISO8859-1.src head/share/msgdef/fr_BE.ISO8859-1.src head/share/msgdef/fr_CH.ISO8859-1.src head/share/msgdef/fr_FR.ISO8859-1.src head/share/msgdef/hr_HR.ISO8859-2.src head/share/msgdef/hu_HU.ISO8859-2.src head/share/msgdef/is_IS.ISO8859-1.src head/share/msgdef/it_IT.ISO8859-1.src head/share/msgdef/kk_KZ.PT154.src head/share/msgdef/kk_KZ.UTF-8.src head/share/msgdef/lt_LT.ISO8859-13.src head/share/msgdef/mn_MN.UTF-8.src head/share/msgdef/nl_NL.ISO8859-1.src head/share/msgdef/no_NO.ISO8859-1.src head/share/msgdef/pl_PL.ISO8859-2.src head/share/msgdef/pt_PT.ISO8859-1.src head/share/msgdef/ro_RO.ISO8859-2.src head/share/msgdef/sl_SI.ISO8859-2.src head/share/msgdef/sr_YU.ISO8859-2.src head/share/msgdef/sr_YU.ISO8859-5.src head/share/msgdef/sr_YU.UTF-8.src head/share/msgdef/sv_SE.ISO8859-1.src head/share/msgdef/zh_CN.GB18030.src head/share/msgdef/zh_CN.GB2312.src head/share/msgdef/zh_CN.UTF-8.src head/share/msgdef/zh_CN.eucCN.src head/share/msgdef/zh_TW.Big5.src head/share/msgdef/zh_TW.UTF-8.src head/share/numericdef/Makefile.depend head/share/numericdef/af_ZA.ISO8859-1.src head/share/numericdef/am_ET.UTF-8.src head/share/numericdef/be_BY.CP1251.src head/share/numericdef/bg_BG.CP1251.src head/share/numericdef/ca_ES.ISO8859-1.src head/share/numericdef/cs_CZ.ISO8859-2.src head/share/numericdef/da_DK.ISO8859-1.src head/share/numericdef/de_CH.ISO8859-1.src head/share/numericdef/de_DE.ISO8859-1.src head/share/numericdef/el_GR.ISO8859-7.src head/share/numericdef/en_US.ISO8859-1.src head/share/numericdef/es_ES.ISO8859-1.src head/share/numericdef/et_EE.ISO8859-15.src head/share/numericdef/eu_ES.ISO8859-1.src head/share/numericdef/fi_FI.ISO8859-1.src head/share/numericdef/fr_BE.ISO8859-1.src head/share/numericdef/fr_FR.ISO8859-1.src head/share/numericdef/hi_IN.ISCII-DEV.src head/share/numericdef/hr_HR.ISO8859-2.src head/share/numericdef/hu_HU.ISO8859-2.src head/share/numericdef/hy_AM.ARMSCII-8.src head/share/numericdef/is_IS.ISO8859-1.src head/share/numericdef/it_IT.ISO8859-1.src head/share/numericdef/ja_JP.eucJP.src head/share/numericdef/kk_KZ.PT154.src head/share/numericdef/ko_KR.eucKR.src head/share/numericdef/lt_LT.ISO8859-13.src head/share/numericdef/mn_MN.UTF-8.src head/share/numericdef/nl_NL.ISO8859-1.src head/share/numericdef/no_NO.ISO8859-1.src head/share/numericdef/pl_PL.ISO8859-2.src head/share/numericdef/pt_BR.ISO8859-1.src head/share/numericdef/pt_PT.ISO8859-1.src head/share/numericdef/ro_RO.ISO8859-2.src head/share/numericdef/ru_RU.KOI8-R.src head/share/numericdef/sk_SK.ISO8859-2.src head/share/numericdef/sl_SI.ISO8859-2.src head/share/numericdef/sr_YU.ISO8859-2.src head/share/numericdef/sr_YU.ISO8859-5.src head/share/numericdef/sv_SE.ISO8859-1.src head/share/numericdef/tr_TR.ISO8859-9.src head/share/numericdef/zh_CN.eucCN.src head/share/timedef/Makefile.depend head/share/timedef/ca_ES.ISO8859-1.src head/share/timedef/ca_ES.UTF-8.src head/share/timedef/da_DK.ISO8859-1.src head/share/timedef/de_AT.ISO8859-1.src head/share/timedef/de_DE.ISO8859-1.src head/share/timedef/en_GB.ISO8859-1.src head/share/timedef/en_US.ISO8859-1.src head/share/timedef/es_ES.ISO8859-1.src head/share/timedef/eu_ES.ISO8859-1.src head/share/timedef/fi_FI.ISO8859-1.src head/share/timedef/fr_FR.ISO8859-1.src head/share/timedef/is_IS.ISO8859-1.src head/share/timedef/it_IT.ISO8859-1.src head/share/timedef/kk_KZ.PT154.src head/share/timedef/kk_KZ.UTF-8.src head/share/timedef/la_LN.ISO8859-1.src head/share/timedef/lt_LT.ISO8859-4.src head/share/timedef/mn_MN.UTF-8.src head/share/timedef/nb_NO.ISO8859-1.src head/share/timedef/nl_NL.ISO8859-1.src head/share/timedef/nn_NO.ISO8859-1.src head/share/timedef/pt_PT.ISO8859-1.src head/share/timedef/sr_YU.ISO8859-2.src head/share/timedef/sr_YU.ISO8859-5.src head/share/timedef/sr_YU.UTF-8.src head/share/timedef/sv_SE.ISO8859-1.src head/share/timedef/zh_CN.GB18030.src head/share/timedef/zh_CN.GB2312.src head/share/timedef/zh_CN.UTF-8.src head/share/timedef/zh_CN.eucCN.src head/share/timedef/zh_TW.Big5.src head/share/timedef/zh_TW.UTF-8.src head/usr.bin/colldef/ head/usr.bin/mklocale/ Modified: head/Makefile.inc1 head/ObsoleteFiles.inc head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c head/etc/mtree/BSD.usr.dist head/include/_ctype.h head/include/ctype.h head/include/limits.h head/include/wctype.h head/include/xlocale/_ctype.h head/lib/libc/locale/Makefile.inc head/lib/libc/locale/big5.c head/lib/libc/locale/collate.c head/lib/libc/locale/collate.h head/lib/libc/locale/collcmp.c head/lib/libc/locale/euc.c head/lib/libc/locale/gb18030.c head/lib/libc/locale/gb2312.c head/lib/libc/locale/gbk.c head/lib/libc/locale/isctype.c head/lib/libc/locale/iswctype.c head/lib/libc/locale/mblocal.h head/lib/libc/locale/mbsnrtowcs.c head/lib/libc/locale/mskanji.c head/lib/libc/locale/nl_langinfo.c head/lib/libc/locale/none.c head/lib/libc/locale/rune.c head/lib/libc/locale/setrunelocale.c head/lib/libc/locale/table.c head/lib/libc/locale/utf8.c head/lib/libc/locale/wcsnrtombs.c head/lib/libc/locale/wctype.c head/lib/libc/string/strcoll.c head/lib/libc/string/strxfrm.c head/lib/libc/string/wcscoll.c head/lib/libc/string/wcsxfrm.c head/share/Makefile head/share/colldef/Makefile head/share/mk/src.libnames.mk head/share/monetdef/Makefile head/share/monetdef/am_ET.UTF-8.src (contents, props changed) head/share/monetdef/be_BY.CP1131.src (contents, props changed) head/share/monetdef/be_BY.CP1251.src (contents, props changed) head/share/monetdef/be_BY.ISO8859-5.src (contents, props changed) head/share/monetdef/be_BY.UTF-8.src (contents, props changed) head/share/monetdef/bg_BG.CP1251.src (contents, props changed) head/share/monetdef/bg_BG.UTF-8.src (contents, props changed) head/share/monetdef/cs_CZ.ISO8859-2.src (contents, props changed) head/share/monetdef/cs_CZ.UTF-8.src (contents, props changed) head/share/monetdef/de_AT.UTF-8.src (contents, props changed) head/share/monetdef/en_GB.UTF-8.src (contents, props changed) head/share/monetdef/en_IE.UTF-8.src (contents, props changed) head/share/monetdef/fr_CA.ISO8859-1.src (contents, props changed) head/share/monetdef/he_IL.UTF-8.src (contents, props changed) head/share/monetdef/hi_IN.ISCII-DEV.src (contents, props changed) head/share/monetdef/hu_HU.ISO8859-2.src (contents, props changed) head/share/monetdef/hy_AM.ARMSCII-8.src (contents, props changed) head/share/monetdef/hy_AM.UTF-8.src (contents, props changed) head/share/monetdef/ja_JP.UTF-8.src (contents, props changed) head/share/monetdef/ja_JP.eucJP.src (contents, props changed) head/share/monetdef/ko_KR.UTF-8.src (contents, props changed) head/share/monetdef/ko_KR.eucKR.src (contents, props changed) head/share/monetdef/lv_LV.ISO8859-13.src (contents, props changed) head/share/monetdef/nl_NL.UTF-8.src (contents, props changed) head/share/monetdef/pl_PL.ISO8859-2.src (contents, props changed) head/share/monetdef/pl_PL.UTF-8.src (contents, props changed) head/share/monetdef/ru_RU.CP1251.src (contents, props changed) head/share/monetdef/ru_RU.CP866.src (contents, props changed) head/share/monetdef/ru_RU.ISO8859-5.src (contents, props changed) head/share/monetdef/ru_RU.KOI8-R.src (contents, props changed) head/share/monetdef/ru_RU.UTF-8.src (contents, props changed) head/share/monetdef/tr_TR.ISO8859-9.src (contents, props changed) head/share/monetdef/uk_UA.CP1251.src (contents, props changed) head/share/monetdef/uk_UA.ISO8859-5.src (contents, props changed) head/share/monetdef/uk_UA.KOI8-U.src (contents, props changed) head/share/monetdef/uk_UA.UTF-8.src (contents, props changed) head/share/msgdef/Makefile head/share/msgdef/am_ET.UTF-8.src (contents, props changed) head/share/msgdef/be_BY.CP1131.src (contents, props changed) head/share/msgdef/be_BY.CP1251.src (contents, props changed) head/share/msgdef/be_BY.ISO8859-5.src (contents, props changed) head/share/msgdef/be_BY.UTF-8.src (contents, props changed) head/share/msgdef/bg_BG.CP1251.src (contents, props changed) head/share/msgdef/bg_BG.UTF-8.src (contents, props changed) head/share/msgdef/el_GR.ISO8859-7.src (contents, props changed) head/share/msgdef/el_GR.UTF-8.src (contents, props changed) head/share/msgdef/he_IL.UTF-8.src (contents, props changed) head/share/msgdef/hi_IN.ISCII-DEV.src (contents, props changed) head/share/msgdef/hy_AM.ARMSCII-8.src (contents, props changed) head/share/msgdef/hy_AM.UTF-8.src (contents, props changed) head/share/msgdef/ja_JP.SJIS.src (contents, props changed) head/share/msgdef/ja_JP.UTF-8.src (contents, props changed) head/share/msgdef/ja_JP.eucJP.src (contents, props changed) head/share/msgdef/ko_KR.UTF-8.src (contents, props changed) head/share/msgdef/ko_KR.eucKR.src (contents, props changed) head/share/msgdef/lv_LV.ISO8859-13.src (contents, props changed) head/share/msgdef/lv_LV.UTF-8.src (contents, props changed) head/share/msgdef/ru_RU.CP1251.src (contents, props changed) head/share/msgdef/ru_RU.CP866.src (contents, props changed) head/share/msgdef/ru_RU.ISO8859-5.src (contents, props changed) head/share/msgdef/ru_RU.KOI8-R.src (contents, props changed) head/share/msgdef/ru_RU.UTF-8.src (contents, props changed) head/share/msgdef/tr_TR.ISO8859-9.src (contents, props changed) head/share/msgdef/uk_UA.CP1251.src (contents, props changed) head/share/msgdef/uk_UA.ISO8859-5.src (contents, props changed) head/share/msgdef/uk_UA.KOI8-U.src (contents, props changed) head/share/msgdef/uk_UA.UTF-8.src (contents, props changed) head/share/numericdef/Makefile head/share/timedef/Makefile head/share/timedef/am_ET.UTF-8.src (contents, props changed) head/share/timedef/be_BY.CP1131.src (contents, props changed) head/share/timedef/be_BY.CP1251.src (contents, props changed) head/share/timedef/be_BY.ISO8859-5.src (contents, props changed) head/share/timedef/be_BY.UTF-8.src (contents, props changed) head/share/timedef/bg_BG.CP1251.src (contents, props changed) head/share/timedef/bg_BG.UTF-8.src (contents, props changed) head/share/timedef/cs_CZ.ISO8859-2.src (contents, props changed) head/share/timedef/cs_CZ.UTF-8.src (contents, props changed) head/share/timedef/da_DK.UTF-8.src (contents, props changed) head/share/timedef/de_AT.UTF-8.src (contents, props changed) head/share/timedef/el_GR.ISO8859-7.src (contents, props changed) head/share/timedef/el_GR.UTF-8.src (contents, props changed) head/share/timedef/es_ES.UTF-8.src (contents, props changed) head/share/timedef/et_EE.ISO8859-15.src (contents, props changed) head/share/timedef/et_EE.UTF-8.src (contents, props changed) head/share/timedef/fi_FI.UTF-8.src (contents, props changed) head/share/timedef/fr_FR.UTF-8.src (contents, props changed) head/share/timedef/he_IL.UTF-8.src (contents, props changed) head/share/timedef/hi_IN.ISCII-DEV.src (contents, props changed) head/share/timedef/hr_HR.ISO8859-2.src (contents, props changed) head/share/timedef/hr_HR.UTF-8.src (contents, props changed) head/share/timedef/hu_HU.ISO8859-2.src (contents, props changed) head/share/timedef/hu_HU.UTF-8.src (contents, props changed) head/share/timedef/hy_AM.ARMSCII-8.src (contents, props changed) head/share/timedef/hy_AM.UTF-8.src (contents, props changed) head/share/timedef/is_IS.UTF-8.src (contents, props changed) head/share/timedef/it_IT.UTF-8.src (contents, props changed) head/share/timedef/ja_JP.SJIS.src (contents, props changed) head/share/timedef/ja_JP.UTF-8.src (contents, props changed) head/share/timedef/ja_JP.eucJP.src (contents, props changed) head/share/timedef/ko_KR.UTF-8.src (contents, props changed) head/share/timedef/ko_KR.eucKR.src (contents, props changed) head/share/timedef/lt_LT.ISO8859-13.src (contents, props changed) head/share/timedef/lt_LT.UTF-8.src (contents, props changed) head/share/timedef/lv_LV.ISO8859-13.src (contents, props changed) head/share/timedef/lv_LV.UTF-8.src (contents, props changed) head/share/timedef/nb_NO.UTF-8.src (contents, props changed) head/share/timedef/nn_NO.UTF-8.src (contents, props changed) head/share/timedef/pl_PL.ISO8859-2.src (contents, props changed) head/share/timedef/pl_PL.UTF-8.src (contents, props changed) head/share/timedef/pt_BR.ISO8859-1.src (contents, props changed) head/share/timedef/pt_BR.UTF-8.src (contents, props changed) head/share/timedef/pt_PT.UTF-8.src (contents, props changed) head/share/timedef/ro_RO.ISO8859-2.src (contents, props changed) head/share/timedef/ro_RO.UTF-8.src (contents, props changed) head/share/timedef/ru_RU.CP1251.src (contents, props changed) head/share/timedef/ru_RU.CP866.src (contents, props changed) head/share/timedef/ru_RU.ISO8859-5.src (contents, props changed) head/share/timedef/ru_RU.KOI8-R.src (contents, props changed) head/share/timedef/ru_RU.UTF-8.src (contents, props changed) head/share/timedef/sk_SK.ISO8859-2.src (contents, props changed) head/share/timedef/sk_SK.UTF-8.src (contents, props changed) head/share/timedef/sl_SI.ISO8859-2.src (contents, props changed) head/share/timedef/sl_SI.UTF-8.src (contents, props changed) head/share/timedef/sv_SE.UTF-8.src (contents, props changed) head/share/timedef/tr_TR.ISO8859-9.src (contents, props changed) head/share/timedef/tr_TR.UTF-8.src (contents, props changed) head/share/timedef/uk_UA.CP1251.src (contents, props changed) head/share/timedef/uk_UA.ISO8859-5.src (contents, props changed) head/share/timedef/uk_UA.KOI8-U.src (contents, props changed) head/share/timedef/uk_UA.UTF-8.src (contents, props changed) head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/Makefile Directory Properties: head/ (props changed) head/MAINTAINERS (props changed) head/cddl/ (props changed) head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/contrib/apr/ (props changed) head/contrib/binutils/ (props changed) head/contrib/bmake/ (props changed) head/contrib/compiler-rt/ (props changed) head/contrib/dma/ (props changed) head/contrib/dtc/ (props changed) head/contrib/elftoolchain/ (props changed) head/contrib/elftoolchain/ar/ (props changed) head/contrib/elftoolchain/brandelf/ (props changed) head/contrib/elftoolchain/elfdump/ (props changed) head/contrib/expat/ (props changed) head/contrib/file/ (props changed) head/contrib/gcc/ (props changed) head/contrib/gdb/ (props changed) head/contrib/groff/ (props changed) head/contrib/ipfilter/ (props changed) head/contrib/ipfilter/ml_ipl.c (props changed) head/contrib/ipfilter/mlfk_ipl.c (props changed) head/contrib/ipfilter/mlh_rule.c (props changed) head/contrib/ipfilter/mli_ipl.c (props changed) head/contrib/ipfilter/mln_ipl.c (props changed) head/contrib/ipfilter/mls_ipl.c (props changed) head/contrib/libarchive/ (props changed) head/contrib/libarchive/libarchive/ (props changed) head/contrib/libc++/ (props changed) head/contrib/libcxxrt/ (props changed) head/contrib/libexecinfo/ (props changed) head/contrib/libucl/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp (props changed) head/contrib/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp (props changed) head/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp (props changed) head/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.h (props changed) head/contrib/llvm/projects/libunwind/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) head/contrib/llvm/tools/llvm-dwarfdump/ (props changed) head/contrib/llvm/tools/llvm-lto/ (props changed) head/contrib/mdocml/ (props changed) head/contrib/ncurses/ (props changed) head/contrib/netcat/ (props changed) head/contrib/ntp/ (props changed) head/contrib/openpam/ (props changed) head/contrib/pf/ (props changed) head/contrib/sendmail/ (props changed) head/contrib/serf/ (props changed) head/contrib/sqlite3/ (props changed) head/contrib/subversion/ (props changed) head/contrib/tcpdump/ (props changed) head/contrib/top/ (props changed) head/contrib/tzcode/stdtime/ (props changed) head/contrib/tzdata/ (props changed) head/contrib/unbound/ (props changed) head/contrib/wpa/ (props changed) head/crypto/openssh/ (props changed) head/crypto/openssl/ (props changed) head/gnu/lib/ (props changed) head/gnu/usr.bin/binutils/ (props changed) head/gnu/usr.bin/cc/cc_tools/ (props changed) head/gnu/usr.bin/gdb/ (props changed) head/include/ (props changed) head/lib/libc/ (props changed) head/lib/libc/stdtime/ (props changed) head/lib/libutil/ (props changed) head/lib/libvmmapi/ (props changed) head/lib/libz/ (props changed) head/sbin/ (props changed) head/sbin/dumpon/ (props changed) head/sbin/ipfw/ (props changed) head/share/ (props changed) head/share/ctypedef/be_BY.CP1131.src (props changed) head/share/ctypedef/ca_IT.ISO8859-15.src (props changed) head/share/ctypedef/el_GR.ISO8859-7.src (props changed) head/share/ctypedef/en_GB.ISO8859-15.src (props changed) head/share/ctypedef/en_US.UTF-8.src (props changed) head/share/ctypedef/hi_IN.ISCII-DEV.src (props changed) head/share/ctypedef/hy_AM.ARMSCII-8.src (props changed) head/share/ctypedef/ja_JP.SJIS.src (props changed) head/share/ctypedef/ko_KR.eucKR.src (props changed) head/share/ctypedef/uk_UA.CP1251.src (props changed) head/share/ctypedef/zh_Hans_CN.GB18030.src (props changed) head/share/ctypedef/zh_Hant_HK.Big5HKSCS.src (props changed) head/share/man/man4/ (props changed) head/share/zoneinfo/ (props changed) head/sys/ (props changed) head/sys/amd64/include/vmm.h (props changed) head/sys/amd64/include/vmm_dev.h (props changed) head/sys/amd64/include/xen/ (props changed) head/sys/amd64/vmm/ (props changed) head/sys/boot/ (props changed) head/sys/boot/powerpc/kboot/ (props changed) head/sys/boot/powerpc/ofw/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) head/sys/conf/ (props changed) head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/ipfilter/ (props changed) head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c (props changed) head/sys/dev/hyperv/ (props changed) head/sys/modules/hyperv/ (props changed) head/targets/ (props changed) head/usr.bin/calendar/ (props changed) head/usr.bin/mkimg/ (props changed) head/usr.bin/procstat/ (props changed) head/usr.sbin/bhyve/ (props changed) head/usr.sbin/bhyvectl/ (props changed) head/usr.sbin/bhyveload/ (props changed) head/usr.sbin/jail/ (props changed) head/usr.sbin/ndiscvt/ (props changed) head/usr.sbin/rtadvctl/ (props changed) head/usr.sbin/rtadvd/ (props changed) head/usr.sbin/rtsold/ (props changed) head/usr.sbin/zic/ (props changed) Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Nov 7 12:33:30 2015 (r290493) +++ head/Makefile.inc1 Sat Nov 7 12:43:35 2015 (r290494) @@ -1486,7 +1486,8 @@ bootstrap-tools: .PHONY usr.sbin/config \ ${_crunch} \ ${_nmtree} \ - ${_vtfontcvt} + ${_vtfontcvt} \ + usr.bin/localedef ${_bt}-${_tool}: .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Nov 7 12:33:30 2015 (r290493) +++ head/ObsoleteFiles.inc Sat Nov 7 12:43:35 2015 (r290494) @@ -38,6 +38,65 @@ # xargs -n1 | sort | uniq -d; # done +# 20151107: String collation improvements +OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_COLLATE +OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_CTYPE +OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_MESSAGES +OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_MONETARY +OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_NUMERIC +OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_TIME +OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_COLLATE +OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_CTYPE +OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_MESSAGES +OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_MONETARY +OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_NUMERIC +OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_TIME +OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_COLLATE +OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_CTYPE +OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_TIME +OLD_FILES+=usr/share/locale/la_LN.ISO8859-13/LC_COLLATE +OLD_FILES+=usr/share/locale/la_LN.ISO8859-13/LC_CTYPE +OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_COLLATE +OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_CTYPE +OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_TIME +OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_COLLATE +OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_CTYPE +OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_TIME +OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_COLLATE +OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_CTYPE +OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_TIME +OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_COLLATE +OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_CTYPE +OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_TIME +OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_COLLATE +OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_CTYPE +OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_MESSAGES +OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_MONETARY +OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_NUMERIC +OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_TIME +OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_COLLATE +OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_CTYPE +OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_MESSAGES +OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_MONETARY +OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_NUMERIC +OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_TIME +OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_COLLATE +OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_CTYPE +OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_MESSAGES +OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_MONETARY +OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_NUMERIC +OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_TIME +OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_COLLATE +OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_CTYPE +OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_MESSAGES +OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_MONETARY +OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_NUMERIC +OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_TIME +OLD_FILES+=usr/share/locale/UTF-8/LC_CTYPE +OLD_FILES+=usr/bin/colldef +OLD_FILES+=usr/share/man/man1/colldef.1.gz +OLD_FILES+=usr/bin/mklocale +OLD_FILES+=usr/share/man/man1/mklocale.1.gz # 20151101: added missing _test suffix on multiple tests in lib/libc OLD_FILES+=usr/tests/lib/libc/c063/faccessat OLD_FILES+=usr/tests/lib/libc/c063/fchmodat Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Sat Nov 7 12:33:30 2015 (r290493) +++ head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Sat Nov 7 12:43:35 2015 (r290494) @@ -87,7 +87,11 @@ static struct test { 0x5B, 0x01, 0x7F, 0x5D, 0x5B, 0x80, 0x07FF, 0x5D, 0x5B, 0x0800, 0xFFFF, 0x5D, 0x5B, 0x10000, 0x10FFFF, 0x5D, 0x0A }, +#ifdef __FreeBSD__ + { 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, +#else { 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, +#endif 1, 1, -1, -1, 1, 1, -1, -1, 1, -1 }, -1 Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Sat Nov 7 12:33:30 2015 (r290493) +++ head/etc/mtree/BSD.usr.dist Sat Nov 7 12:43:35 2015 (r290494) @@ -505,14 +505,22 @@ .. .. locale - UTF-8 - .. af_ZA.ISO8859-1 .. - af_ZA.ISO8859-15 - .. af_ZA.UTF-8 .. + ar_AE.UTF-8 + .. + ar_EG.UTF-8 + .. + ar_JO.UTF-8 + .. + ar_MA.UTF-8 + .. + ar_QA.UTF-8 + .. + ar_SA.UTF-8 + .. am_ET.UTF-8 .. be_BY.CP1131 @@ -527,27 +535,19 @@ .. bg_BG.UTF-8 .. - ca_AD.ISO8859-1 - .. ca_AD.ISO8859-15 .. - ca_AD.UTF-8 - .. - ca_ES.ISO8859-1 - .. ca_ES.ISO8859-15 .. - ca_ES.UTF-8 - .. - ca_FR.ISO8859-1 - .. ca_FR.ISO8859-15 .. - ca_FR.UTF-8 + ca_IT.ISO8859-15 + .. + ca_AD.UTF-8 .. - ca_IT.ISO8859-1 + ca_ES.UTF-8 .. - ca_IT.ISO8859-15 + ca_FR.UTF-8 .. ca_IT.UTF-8 .. @@ -555,26 +555,18 @@ .. cs_CZ.UTF-8 .. - da_DK.ISO8859-1 - .. da_DK.ISO8859-15 .. da_DK.UTF-8 .. - de_AT.ISO8859-1 - .. de_AT.ISO8859-15 .. de_AT.UTF-8 .. - de_CH.ISO8859-1 - .. de_CH.ISO8859-15 .. de_CH.UTF-8 .. - de_DE.ISO8859-1 - .. de_DE.ISO8859-15 .. de_DE.UTF-8 @@ -585,88 +577,92 @@ .. en_AU.ISO8859-1 .. - en_AU.ISO8859-15 - .. en_AU.US-ASCII .. en_AU.UTF-8 .. en_CA.ISO8859-1 .. - en_CA.ISO8859-15 - .. en_CA.US-ASCII .. en_CA.UTF-8 .. - en_GB.ISO8859-1 - .. en_GB.ISO8859-15 .. en_GB.US-ASCII .. en_GB.UTF-8 .. + en_HK.ISO8859-1 + .. + en_HK.UTF-8 + .. + en_IE.ISO8859-15 + .. en_IE.UTF-8 .. en_NZ.ISO8859-1 .. - en_NZ.ISO8859-15 - .. en_NZ.US-ASCII .. en_NZ.UTF-8 .. - en_US.ISO8859-1 + en_PH.UTF-8 .. - en_US.ISO8859-15 + en_SG.ISO8859-1 + .. + en_SG.UTF-8 + .. + en_US.ISO8859-1 .. en_US.US-ASCII .. en_US.UTF-8 .. - es_ES.ISO8859-1 + en_ZA.ISO8859-1 + .. + en_ZA.US-ASCII + .. + en_ZA.UTF-8 + .. + es_AR.ISO8859-1 + .. + es_AR.UTF-8 + .. + es_CR.UTF-8 .. es_ES.ISO8859-15 .. es_ES.UTF-8 .. + es_MX.ISO8859-1 + .. + es_MX.UTF-8 + .. et_EE.ISO8859-15 .. et_EE.UTF-8 .. - eu_ES.ISO8859-1 - .. eu_ES.ISO8859-15 .. eu_ES.UTF-8 .. - fi_FI.ISO8859-1 - .. fi_FI.ISO8859-15 .. fi_FI.UTF-8 .. - fr_BE.ISO8859-1 - .. fr_BE.ISO8859-15 .. fr_BE.UTF-8 .. fr_CA.ISO8859-1 .. - fr_CA.ISO8859-15 - .. fr_CA.UTF-8 .. - fr_CH.ISO8859-1 - .. fr_CH.ISO8859-15 .. fr_CH.UTF-8 .. - fr_FR.ISO8859-1 - .. fr_FR.ISO8859-15 .. fr_FR.UTF-8 @@ -675,6 +671,8 @@ .. hi_IN.ISCII-DEV .. + hi_IN.UTF-8 + .. hr_HR.ISO8859-2 .. hr_HR.UTF-8 @@ -687,20 +685,14 @@ .. hy_AM.UTF-8 .. - is_IS.ISO8859-1 - .. is_IS.ISO8859-15 .. is_IS.UTF-8 .. - it_CH.ISO8859-1 - .. it_CH.ISO8859-15 .. it_CH.UTF-8 .. - it_IT.ISO8859-1 - .. it_IT.ISO8859-15 .. it_IT.UTF-8 @@ -713,70 +705,38 @@ .. kk_Cyrl_KZ.UTF-8 .. - kk_KZ.PT154 - .. - kk_KZ.UTF-8 - .. ko_KR.CP949 .. ko_KR.UTF-8 .. ko_KR.eucKR .. - la_LN.ISO8859-1 - .. - la_LN.ISO8859-13 - .. - la_LN.ISO8859-15 - .. - la_LN.ISO8859-2 - .. - la_LN.ISO8859-4 - .. - la_LN.US-ASCII - .. lt_LT.ISO8859-13 .. - lt_LT.ISO8859-4 - .. lt_LT.UTF-8 .. lv_LV.ISO8859-13 .. lv_LV.UTF-8 .. - mn_MN.UTF-8 - .. - nb_NO.ISO8859-1 + mn_Cyrl_MN.UTF-8 .. nb_NO.ISO8859-15 .. nb_NO.UTF-8 .. - nl_BE.ISO8859-1 - .. nl_BE.ISO8859-15 .. nl_BE.UTF-8 .. - nl_NL.ISO8859-1 - .. nl_NL.ISO8859-15 .. nl_NL.UTF-8 .. - nn_NO.ISO8859-1 - .. nn_NO.ISO8859-15 .. nn_NO.UTF-8 .. - no_NO.ISO8859-1 - .. - no_NO.ISO8859-15 - .. - no_NO.UTF-8 - .. pl_PL.ISO8859-2 .. pl_PL.UTF-8 @@ -785,8 +745,6 @@ .. pt_BR.UTF-8 .. - pt_PT.ISO8859-1 - .. pt_PT.ISO8859-15 .. pt_PT.UTF-8 @@ -805,6 +763,10 @@ .. ru_RU.UTF-8 .. + se_FI.UTF-8 + .. + se_NO.UTF-8 + .. sk_SK.ISO8859-2 .. sk_SK.UTF-8 @@ -813,13 +775,17 @@ .. sl_SI.UTF-8 .. - sr_YU.ISO8859-2 + sr_Cyrl_RS.ISO8859-5 .. - sr_YU.ISO8859-5 + sr_Cyrl_RS.UTF-8 .. - sr_YU.UTF-8 + sr_Latn_RS.ISO8859-2 .. - sv_SE.ISO8859-1 + sr_Latn_RS.UTF-8 + .. + sv_FI.ISO8859-15 + .. + sv_FI.UTF-8 .. sv_SE.ISO8859-15 .. @@ -837,23 +803,23 @@ .. uk_UA.UTF-8 .. - zh_CN.GB18030 + zh_Hans_CN.GB18030 .. - zh_CN.GB2312 + zh_Hans_CN.GB2312 .. - zh_CN.GBK + zh_Hans_CN.GBK .. - zh_CN.UTF-8 + zh_Hans_CN.UTF-8 .. - zh_CN.eucCN + zh_Hans_CN.eucCN .. - zh_HK.Big5HKSCS + zh_Hant_HK.Big5HKSCS .. - zh_HK.UTF-8 + zh_Hant_HK.UTF-8 .. - zh_TW.Big5 + zh_Hant_TW.Big5 .. - zh_TW.UTF-8 + zh_Hant_TW.UTF-8 .. .. man Modified: head/include/_ctype.h ============================================================================== --- head/include/_ctype.h Sat Nov 7 12:33:30 2015 (r290493) +++ head/include/_ctype.h Sat Nov 7 12:43:35 2015 (r290494) @@ -59,6 +59,7 @@ #define _CTYPE_I 0x00080000L /* Ideogram */ #define _CTYPE_T 0x00100000L /* Special */ #define _CTYPE_Q 0x00200000L /* Phonogram */ +#define _CTYPE_N 0x00400000L /* Number (superset of digit) */ #define _CTYPE_SW0 0x20000000L /* 0 width character */ #define _CTYPE_SW1 0x40000000L /* 1 width character */ #define _CTYPE_SW2 0x80000000L /* 2 width character */ Modified: head/include/ctype.h ============================================================================== --- head/include/ctype.h Sat Nov 7 12:33:30 2015 (r290493) +++ head/include/ctype.h Sat Nov 7 12:43:35 2015 (r290494) @@ -85,17 +85,17 @@ int isspecial(int); __END_DECLS #ifndef __cplusplus -#define isalnum(c) __sbistype((c), _CTYPE_A|_CTYPE_D) +#define isalnum(c) __sbistype((c), _CTYPE_A|_CTYPE_D|_CTYPE_N) #define isalpha(c) __sbistype((c), _CTYPE_A) #define iscntrl(c) __sbistype((c), _CTYPE_C) -#define isdigit(c) __isctype((c), _CTYPE_D) /* ANSI -- locale independent */ +#define isdigit(c) __sbistype((c), _CTYPE_D) #define isgraph(c) __sbistype((c), _CTYPE_G) #define islower(c) __sbistype((c), _CTYPE_L) #define isprint(c) __sbistype((c), _CTYPE_R) #define ispunct(c) __sbistype((c), _CTYPE_P) #define isspace(c) __sbistype((c), _CTYPE_S) #define isupper(c) __sbistype((c), _CTYPE_U) -#define isxdigit(c) __isctype((c), _CTYPE_X) /* ANSI -- locale independent */ +#define isxdigit(c) __sbistype((c), _CTYPE_X) #define tolower(c) __sbtolower(c) #define toupper(c) __sbtoupper(c) #endif /* !__cplusplus */ @@ -126,7 +126,7 @@ __END_DECLS #define digittoint(c) __sbmaskrune((c), 0xFF) #define ishexnumber(c) __sbistype((c), _CTYPE_X) #define isideogram(c) __sbistype((c), _CTYPE_I) -#define isnumber(c) __sbistype((c), _CTYPE_D) +#define isnumber(c) __sbistype((c), _CTYPE_D|_CTYPE_N) #define isphonogram(c) __sbistype((c), _CTYPE_Q) #define isrune(c) __sbistype((c), 0xFFFFFF00L) #define isspecial(c) __sbistype((c), _CTYPE_T) Modified: head/include/limits.h ============================================================================== --- head/include/limits.h Sat Nov 7 12:33:30 2015 (r290493) +++ head/include/limits.h Sat Nov 7 12:43:35 2015 (r290494) @@ -63,7 +63,7 @@ #define BC_DIM_MAX 2048 /* max array elements in bc(1) */ #define BC_SCALE_MAX 99 /* max scale value in bc(1) */ #define BC_STRING_MAX 1000 /* max const string length in bc(1) */ -#define COLL_WEIGHTS_MAX 0 /* max weights for order keyword */ +#define COLL_WEIGHTS_MAX 10 /* max weights for order keyword */ #define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */ #define LINE_MAX 2048 /* max bytes in an input line */ #define RE_DUP_MAX 255 /* max RE's in interval notation */ Modified: head/include/wctype.h ============================================================================== --- head/include/wctype.h Sat Nov 7 12:33:30 2015 (r290493) +++ head/include/wctype.h Sat Nov 7 12:43:35 2015 (r290494) @@ -95,27 +95,27 @@ wint_t nextwctype(wint_t, wctype_t); __END_DECLS #ifndef __cplusplus -#define iswalnum(wc) __istype((wc), _CTYPE_A|_CTYPE_D) +#define iswalnum(wc) __istype((wc), _CTYPE_A|_CTYPE_D|_CTYPE_N) #define iswalpha(wc) __istype((wc), _CTYPE_A) #define iswblank(wc) __istype((wc), _CTYPE_B) #define iswcntrl(wc) __istype((wc), _CTYPE_C) #define iswctype(wc, charclass) __istype((wc), (charclass)) -#define iswdigit(wc) __isctype((wc), _CTYPE_D) +#define iswdigit(wc) __istype((wc), _CTYPE_D) #define iswgraph(wc) __istype((wc), _CTYPE_G) #define iswlower(wc) __istype((wc), _CTYPE_L) #define iswprint(wc) __istype((wc), _CTYPE_R) #define iswpunct(wc) __istype((wc), _CTYPE_P) #define iswspace(wc) __istype((wc), _CTYPE_S) #define iswupper(wc) __istype((wc), _CTYPE_U) -#define iswxdigit(wc) __isctype((wc), _CTYPE_X) +#define iswxdigit(wc) __istype((wc), _CTYPE_X) #define towlower(wc) __tolower(wc) #define towupper(wc) __toupper(wc) #if __BSD_VISIBLE #define iswascii(wc) (((wc) & ~0x7F) == 0) -#define iswhexnumber(wc) __istype((wc), _CTYPE_X) +#define iswhexnumber(wc) __istype((wc), _CTYPE_X) /* alias of iswxdigit */ #define iswideogram(wc) __istype((wc), _CTYPE_I) -#define iswnumber(wc) __istype((wc), _CTYPE_D) +#define iswnumber(wc) __istype((wc), _CTYPE_D|_CTYPE_N) #define iswphonogram(wc) __istype((wc), _CTYPE_Q) #define iswrune(wc) __istype((wc), 0xFFFFFF00L) #define iswspecial(wc) __istype((wc), _CTYPE_T) Modified: head/include/xlocale/_ctype.h ============================================================================== --- head/include/xlocale/_ctype.h Sat Nov 7 12:33:30 2015 (r290493) +++ head/include/xlocale/_ctype.h Sat Nov 7 12:43:35 2015 (r290494) @@ -119,7 +119,7 @@ __sbistype_l(__ct_rune_t __c, unsigned l { return __sbistype_l(__c, __cat, __l); } #endif -XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D) +XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D|_CTYPE_N) XLOCALE_ISCTYPE(alpha, _CTYPE_A) XLOCALE_ISCTYPE(blank, _CTYPE_B) XLOCALE_ISCTYPE(cntrl, _CTYPE_C) @@ -128,7 +128,7 @@ XLOCALE_ISCTYPE(graph, _CTYPE_G) XLOCALE_ISCTYPE(hexnumber, _CTYPE_X) XLOCALE_ISCTYPE(ideogram, _CTYPE_I) XLOCALE_ISCTYPE(lower, _CTYPE_L) -XLOCALE_ISCTYPE(number, _CTYPE_D) +XLOCALE_ISCTYPE(number, _CTYPE_D|_CTYPE_N) XLOCALE_ISCTYPE(phonogram, _CTYPE_Q) XLOCALE_ISCTYPE(print, _CTYPE_R) XLOCALE_ISCTYPE(punct, _CTYPE_P) Modified: head/lib/libc/locale/Makefile.inc ============================================================================== --- head/lib/libc/locale/Makefile.inc Sat Nov 7 12:33:30 2015 (r290493) +++ head/lib/libc/locale/Makefile.inc Sat Nov 7 12:43:35 2015 (r290494) @@ -4,7 +4,7 @@ # locale sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/locale ${LIBC_SRCTOP}/locale -SRCS+= ascii.c big5.c btowc.c collate.c collcmp.c euc.c fix_grouping.c \ +SRCS+= big5.c btowc.c collate.c collcmp.c euc.c fix_grouping.c \ gb18030.c gb2312.c gbk.c ctype.c isctype.c iswctype.c \ ldpart.c lmessages.c lmonetary.c lnumeric.c localeconv.c mblen.c \ mbrlen.c \ Modified: head/lib/libc/locale/big5.c ============================================================================== --- head/lib/libc/locale/big5.c Sat Nov 7 12:33:30 2015 (r290493) +++ head/lib/libc/locale/big5.c Sat Nov 7 12:43:35 2015 (r290494) @@ -1,4 +1,6 @@ /*- + * Copyright 2013 Garrett D'Amore + * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -19,11 +21,7 @@ * 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 the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -61,6 +59,12 @@ static size_t _BIG5_mbrtowc(wchar_t * __ static int _BIG5_mbsinit(const mbstate_t *); static size_t _BIG5_wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict); +static size_t _BIG5_mbsnrtowcs(wchar_t * __restrict, + const char ** __restrict, size_t, size_t, + mbstate_t * __restrict); +static size_t _BIG5_wcsnrtombs(char * __restrict, + const wchar_t ** __restrict, size_t, size_t, + mbstate_t * __restrict); typedef struct { wchar_t ch; @@ -72,6 +76,8 @@ _BIG5_init(struct xlocale_ctype *l, _Run l->__mbrtowc = _BIG5_mbrtowc; l->__wcrtomb = _BIG5_wcrtomb; + l->__mbsnrtowcs = _BIG5_mbsnrtowcs; + l->__wcsnrtombs = _BIG5_wcsnrtombs; l->__mbsinit = _BIG5_mbsinit; l->runes = rl; l->__mb_cur_max = 2; @@ -147,7 +153,7 @@ _BIG5_mbrtowc(wchar_t * __restrict pwc, wc = (wc << 8) | (*s++ & 0xff); if (pwc != NULL) *pwc = wc; - return (2); + return (2); } else { if (pwc != NULL) *pwc = wc; @@ -178,3 +184,17 @@ _BIG5_wcrtomb(char * __restrict s, wchar *s = wc & 0xff; return (1); } + +static size_t +_BIG5_mbsnrtowcs(wchar_t * __restrict dst, const char ** __restrict src, + size_t nms, size_t len, mbstate_t * __restrict ps) +{ + return (__mbsnrtowcs_std(dst, src, nms, len, ps, _BIG5_mbrtowc)); +} + +static size_t +_BIG5_wcsnrtombs(char * __restrict dst, const wchar_t ** __restrict src, + size_t nwc, size_t len, mbstate_t * __restrict ps) +{ + return (__wcsnrtombs_std(dst, src, nwc, len, ps, _BIG5_wcrtomb)); +} Modified: head/lib/libc/locale/collate.c ============================================================================== --- head/lib/libc/locale/collate.c Sat Nov 7 12:33:30 2015 (r290493) +++ head/lib/libc/locale/collate.c Sat Nov 7 12:43:35 2015 (r290494) @@ -1,4 +1,6 @@ /*- + * Copyright 2014 Garrett D'Amore + * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 1995 Alex Tatmanjants * at Electronni Visti IA, Kiev, Ukraine. * All rights reserved. @@ -28,66 +30,57 @@ * 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. + * + * Adapted to xlocale by John Marino */ #include __FBSDID("$FreeBSD$"); #include "namespace.h" -#include + +#include +#include +#include + +#include #include #include #include +#include #include #include -#include +#include #include "un-namespace.h" #include "collate.h" #include "setlocale.h" #include "ldpart.h" - #include "libc_private.h" -/* - * To avoid modifying the original (single-threaded) code too much, we'll just - * define the old globals as fields inside the table. - * - * We also modify the collation table test functions to search the thread-local - * table first and the global table second. - */ -#define __collate_substitute_nontrivial (table->__collate_substitute_nontrivial) -#define __collate_substitute_table_ptr (table->__collate_substitute_table_ptr) -#define __collate_char_pri_table_ptr (table->__collate_char_pri_table_ptr) -#define __collate_chain_pri_table (table->__collate_chain_pri_table) -int __collate_load_error; - - struct xlocale_collate __xlocale_global_collate = { - {{0}, "C"}, 1, 0 + {{0}, "C"}, 1, 0, 0, 0 }; - struct xlocale_collate __xlocale_C_collate = { - {{0}, "C"}, 1, 0 +struct xlocale_collate __xlocale_C_collate = { + {{0}, "C"}, 1, 0, 0, 0 }; -void __collate_err(int ex, const char *f) __dead2; - -int +static int __collate_load_tables_l(const char *encoding, struct xlocale_collate *table); static void destruct_collate(void *t) { struct xlocale_collate *table = t; - if (__collate_chain_pri_table) { - free(__collate_chain_pri_table); + if (table->map && (table->maplen > 0)) { + (void) munmap(table->map, table->maplen); } free(t); } void * -__collate_load(const char *encoding, locale_t unused) +__collate_load(const char *encoding, __unused locale_t unused) { if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) { return &__xlocale_C_collate; @@ -109,237 +102,602 @@ __collate_load(const char *encoding, loc int __collate_load_tables(const char *encoding) { - int ret = __collate_load_tables_l(encoding, &__xlocale_global_collate); - __collate_load_error = __xlocale_global_collate.__collate_load_error; - return ret; + + return (__collate_load_tables_l(encoding, &__xlocale_global_collate)); } int __collate_load_tables_l(const char *encoding, struct xlocale_collate *table) { - FILE *fp; - int i, saverr, chains; - uint32_t u32; - char strbuf[STR_LEN], buf[PATH_MAX]; - void *TMP_substitute_table, *TMP_char_pri_table, *TMP_chain_pri_table; + int i, chains, z; + char *buf; + char *TMP; + char *map; + collate_info_t *info; + struct stat sbuf; + int fd; + + table->__collate_load_error = 1; /* 'encoding' must be already checked. */ if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) { - table->__collate_load_error = 1; return (_LDP_CACHE); } - /* 'PathLocale' must be already set & checked. */ - /* Range checking not needed, encoding has fixed size */ - (void)strcpy(buf, _PathLocale); - (void)strcat(buf, "/"); - (void)strcat(buf, encoding); - (void)strcat(buf, "/LC_COLLATE"); - if ((fp = fopen(buf, "re")) == NULL) + asprintf(&buf, "%s/%s/LC_COLLATE", _PathLocale, encoding); + if (buf == NULL) return (_LDP_ERROR); - if (fread(strbuf, sizeof(strbuf), 1, fp) != 1) { - saverr = errno; - (void)fclose(fp); - errno = saverr; + if ((fd = _open(buf, O_RDONLY)) < 0) { + free(buf); return (_LDP_ERROR); } - chains = -1; - if (strcmp(strbuf, COLLATE_VERSION) == 0) - chains = 0; - else if (strcmp(strbuf, COLLATE_VERSION1_2) == 0) - chains = 1; - if (chains < 0) { - (void)fclose(fp); - errno = EFTYPE; + free(buf); + if (_fstat(fd, &sbuf) < 0) { + (void) _close(fd); + return (_LDP_ERROR); + } + if (sbuf.st_size < (COLLATE_STR_LEN + sizeof (info))) { + (void) _close(fd); + errno = EINVAL; + return (_LDP_ERROR); + } + map = mmap(NULL, sbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0); + (void) _close(fd); + if ((TMP = map) == NULL) { return (_LDP_ERROR); } - if (chains) { - if (fread(&u32, sizeof(u32), 1, fp) != 1) { - saverr = errno; - (void)fclose(fp); - errno = saverr; - return (_LDP_ERROR); - } - if ((chains = (int)ntohl(u32)) < 1) { - (void)fclose(fp); - errno = EFTYPE; - return (_LDP_ERROR); - } - } else - chains = TABLE_SIZE; - if ((TMP_substitute_table = - malloc(sizeof(__collate_substitute_table))) == NULL) { - saverr = errno; - (void)fclose(fp); - errno = saverr; + if (strncmp(TMP, COLLATE_VERSION, COLLATE_STR_LEN) != 0) { + (void) munmap(map, sbuf.st_size); + errno = EINVAL; return (_LDP_ERROR); } - if ((TMP_char_pri_table = - malloc(sizeof(__collate_char_pri_table))) == NULL) { - saverr = errno; - free(TMP_substitute_table); - (void)fclose(fp); - errno = saverr; + TMP += COLLATE_STR_LEN; + + info = (void *)TMP; + TMP += sizeof (*info); + + if ((info->directive_count < 1) || + (info->directive_count >= COLL_WEIGHTS_MAX) || + ((chains = info->chain_count) < 0)) { + (void) munmap(map, sbuf.st_size); + errno = EINVAL; return (_LDP_ERROR); } - if ((TMP_chain_pri_table = - malloc(sizeof(*__collate_chain_pri_table) * chains)) == NULL) { - saverr = errno; - free(TMP_substitute_table); - free(TMP_char_pri_table); - (void)fclose(fp); - errno = saverr; + + i = (sizeof (collate_char_t) * (UCHAR_MAX + 1)) + + (sizeof (collate_chain_t) * chains) + + (sizeof (collate_large_t) * info->large_count); + for (z = 0; z < info->directive_count; z++) { + i += sizeof (collate_subst_t) * info->subst_count[z]; + } + if (i != (sbuf.st_size - (TMP - map))) { + (void) munmap(map, sbuf.st_size); + errno = EINVAL; return (_LDP_ERROR); } -#define FREAD(a, b, c, d) \ -{ \ - if (fread(a, b, c, d) != c) { \ - saverr = errno; \ - free(TMP_substitute_table); \ - free(TMP_char_pri_table); \ - free(TMP_chain_pri_table); \ - (void)fclose(d); \ - errno = saverr; \ - return (_LDP_ERROR); \ - } \ -} - - FREAD(TMP_substitute_table, sizeof(__collate_substitute_table), 1, fp); - FREAD(TMP_char_pri_table, sizeof(__collate_char_pri_table), 1, fp); - FREAD(TMP_chain_pri_table, - sizeof(*__collate_chain_pri_table), chains, fp); - (void)fclose(fp); - - if (__collate_substitute_table_ptr != NULL) - free(__collate_substitute_table_ptr); - __collate_substitute_table_ptr = TMP_substitute_table; - if (__collate_char_pri_table_ptr != NULL) - free(__collate_char_pri_table_ptr); - __collate_char_pri_table_ptr = TMP_char_pri_table; - for (i = 0; i < UCHAR_MAX + 1; i++) { - __collate_char_pri_table[i].prim = - ntohl(__collate_char_pri_table[i].prim); - __collate_char_pri_table[i].sec = - ntohl(__collate_char_pri_table[i].sec); - } - if (__collate_chain_pri_table != NULL) - free(__collate_chain_pri_table); - __collate_chain_pri_table = TMP_chain_pri_table; - for (i = 0; i < chains; i++) { - __collate_chain_pri_table[i].prim = - ntohl(__collate_chain_pri_table[i].prim); - __collate_chain_pri_table[i].sec = - ntohl(__collate_chain_pri_table[i].sec); - } - __collate_substitute_nontrivial = 0; - for (i = 0; i < UCHAR_MAX + 1; i++) { - if (__collate_substitute_table[i][0] != i || - __collate_substitute_table[i][1] != 0) { - __collate_substitute_nontrivial = 1; - break; + table->info = info; + table->char_pri_table = (void *)TMP; + TMP += sizeof (collate_char_t) * (UCHAR_MAX + 1); + + for (z = 0; z < info->directive_count; z++) { + if (info->subst_count[z] > 0) { + table->subst_table[z] = (void *)TMP; + TMP += info->subst_count[z] * sizeof (collate_subst_t); + } else { + table->subst_table[z] = NULL; } } - table->__collate_load_error = 0; + if (chains > 0) { + table->chain_pri_table = (void *)TMP; + TMP += chains * sizeof (collate_chain_t); + } else + table->chain_pri_table = NULL; + if (info->large_count > 0) + table->large_pri_table = (void *)TMP; + else + table->large_pri_table = NULL; + + table->__collate_load_error = 0; return (_LDP_LOADED); } -u_char * -__collate_substitute(struct xlocale_collate *table, const u_char *s) +static const int32_t * +substsearch(struct xlocale_collate *table, const wchar_t key, int pass) +{ + const collate_subst_t *p; + int n = table->info->subst_count[pass]; + + if (n == 0) + return (NULL); + + if (pass >= table->info->directive_count) + return (NULL); + + if (!(key & COLLATE_SUBST_PRIORITY)) + return (NULL); + + p = table->subst_table[pass] + (key & ~COLLATE_SUBST_PRIORITY); + assert(p->key == key); + return (p->pri); +} + +static collate_chain_t * +chainsearch(struct xlocale_collate *table, const wchar_t *key, int *len) { - int dest_len, len, nlen; - int delta = strlen(s); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Nov 7 12:45:54 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FFD8A2809B; Sat, 7 Nov 2015 12:45:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BEAE191F; Sat, 7 Nov 2015 12:45:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7Cjr5c035231; Sat, 7 Nov 2015 12:45:53 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7Cjrwo035230; Sat, 7 Nov 2015 12:45:53 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511071245.tA7Cjrwo035230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 12:45:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290495 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 12:45:54 -0000 Author: bapt Date: Sat Nov 7 12:45:52 2015 New Revision: 290495 URL: https://svnweb.freebsd.org/changeset/base/290495 Log: Bump __FreeBSD_version modification of the locales Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Nov 7 12:43:35 2015 (r290494) +++ head/sys/sys/param.h Sat Nov 7 12:45:52 2015 (r290495) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100087 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100088 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Sat Nov 7 12:48:30 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAB82A2817B; Sat, 7 Nov 2015 12:48:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B33811BA6; Sat, 7 Nov 2015 12:48:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7CmTeS035461; Sat, 7 Nov 2015 12:48:29 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7CmTEb035460; Sat, 7 Nov 2015 12:48:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511071248.tA7CmTEb035460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 12:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290496 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 12:48:31 -0000 Author: bapt Date: Sat Nov 7 12:48:29 2015 New Revision: 290496 URL: https://svnweb.freebsd.org/changeset/base/290496 Log: Add an UPDATING entry about the changed of behaviour for listed files due to now supporting correctly string collation Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Nov 7 12:45:52 2015 (r290495) +++ head/UPDATING Sat Nov 7 12:48:29 2015 (r290496) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151108: + Add support for unicode collation strings leads to a change of + order of files listed by ls(1) for example. To get back to the old + behaviour, set LC_COLLATE environment variable to "C". + 20151030: The OpenSSL has been upgraded to 1.0.2d. Any binaries requiring libcrypto.so.7 or libssl.so.7 must be recompiled. From owner-svn-src-head@freebsd.org Sat Nov 7 12:50:21 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3043A281FD; Sat, 7 Nov 2015 12:50:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAA661D48; Sat, 7 Nov 2015 12:50:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7CoK1C035573; Sat, 7 Nov 2015 12:50:20 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7CoKlA035572; Sat, 7 Nov 2015 12:50:20 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511071250.tA7CoKlA035572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 12:50:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290497 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 12:50:22 -0000 Author: bapt Date: Sat Nov 7 12:50:20 2015 New Revision: 290497 URL: https://svnweb.freebsd.org/changeset/base/290497 Log: Stop enforcing LC_COLLATE to C unicode collation is now supported Modified: head/etc/login.conf Modified: head/etc/login.conf ============================================================================== --- head/etc/login.conf Sat Nov 7 12:48:29 2015 (r290496) +++ head/etc/login.conf Sat Nov 7 12:50:20 2015 (r290497) @@ -26,7 +26,7 @@ default:\ :passwd_format=sha512:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ - :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,LC_COLLATE=C:\ + :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ From owner-svn-src-head@freebsd.org Sat Nov 7 13:25:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCC46A28A01; Sat, 7 Nov 2015 13:25:47 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71EC21033; Sat, 7 Nov 2015 13:25:47 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wmww144 with SMTP id w144so47372831wmw.1; Sat, 07 Nov 2015 05:25:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=i/3+gTG9nwBM9ffwn+5UtPk2K9gXYYvIq5A1p0mannM=; b=k70d4u+FN1j9fkeUsgosj+Z+bMFtjmA6p1FkO+n61ovboioZghYOGK8DnHDsICuUta sCbfnFH4Kyl0eP5GS9bNuCfHEg56A4/DjwV/yQHcQd4nkqKmjzcj7H/Nbf8KDZs12UOU 9vg+ki6LlCyf5BB9sE+LSUUtM0L3cTZ2kFaN30hWZdZ1poOLi6FyZfFI4UN9hkU8mM1x D2JhZAldIr0kde6mb25TgsVZObqRqp+DoFRBhD52dSYxn4J0ti+O89Yc+dXTAyVY28nF HZw8zXbKjbI+cP2uUkOkVFdd0RSR6vhDfZV1TsCfcZyH2O9jygNhaGX7TnxL5ZQcAEGN 3EGw== X-Received: by 10.28.52.12 with SMTP id b12mr14910260wma.16.1446902745978; Sat, 07 Nov 2015 05:25:45 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id lf10sm5110501wjb.23.2015.11.07.05.25.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Nov 2015 05:25:45 -0800 (PST) Sender: Baptiste Daroussin Date: Sat, 7 Nov 2015 14:25:43 +0100 From: Baptiste Daroussin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290494 - in head: . contrib/ipfilter contrib/llvm/lib/Target/Sparc/AsmParser contrib/llvm/lib/Target/Sparc/Disassembler contrib/llvm/lib/Target/Sparc/InstPrinter contrib/netbsd-tests/l... Message-ID: <20151107132543.GH31432@ivaldir.etoilebsd.net> References: <201511071243.tA7Chaai034980@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HuscSE0D68UGttcd" Content-Disposition: inline In-Reply-To: <201511071243.tA7Chaai034980@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 13:25:48 -0000 --HuscSE0D68UGttcd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 07, 2015 at 12:43:36PM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Sat Nov 7 12:43:35 2015 > New Revision: 290494 > URL: https://svnweb.freebsd.org/changeset/base/290494 >=20 > Log: > Improve collation string and locales support > =20 > Merge collation support from Illumos and DragonflyBSD. > =20 > Locales are now generated with the new localedef(1) tool from CLDR POSI= X files. > The generated files are now identified as "BSD 1.0" format. > =20 > The libc now only read "BSD 1.0" locales definitions, all other version= will be > set to "C" > The localedef(1) tool has been imported from Illumos and modified to us= e tree(3) > instead of the CDDL avl(3) > A set of tool created by edwin@ and extended by marino@ for dragonfly h= as been > added to be able to generate locales and the Makefiles from the vanilla= CLDR > unicode databases + a universal UTF-8 charmap (by marino@) > Update the locales to unicode v27 > Given our regex(3) does not support multibyte (yet) it has been forced = to always > use locale C > Remove now unused colldef(1) and mklocale(1) > Finish implementing the numeric BSD extension for ctypes > The number of supported locales has grown from 175 to 250 locales. Amon= g the new > locales: 6 Arabic locales (AE EG JO MA QA SA), Different variations of = spanish > locales. > Added new 3 components locales for mn_Cyrl_MN, sr_Cyrl_RS sr_Latn_RS, > zh_Hans_CN, zh_Hant_HK and zh_Hant_TW. Some aliases has been for 2 comp= onents > version when possible. > =20 > Thanks: Garrett D'Amore (Illumos) who made sure all his work was done u= nder > BSD license!, Edwin Groothuis (edwin@) for the work he made on tools to= be able > to generate locales definition usable in freebsd sources out of vanilla= CLDR > definitions, John Marino (DragonflyBSD) who first merge the Illumos wor= k into > Dragonfly and spent hours tracking down bugs. >=20 I forgot: Relnotes: yes Bapt --HuscSE0D68UGttcd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlY9+9cACgkQ8kTtMUmk6Ezg9wCgmBq0sPahkUoarbkWh24LKt7q X+kAnRHPgwGCdl/Ra6TzH3tFx0v3m4Jp =6Y6s -----END PGP SIGNATURE----- --HuscSE0D68UGttcd-- From owner-svn-src-head@freebsd.org Sat Nov 7 15:03:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01FECA28154; Sat, 7 Nov 2015 15:03:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2D9911E8; Sat, 7 Nov 2015 15:03:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7F3jRj076561; Sat, 7 Nov 2015 15:03:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7F3jnu076560; Sat, 7 Nov 2015 15:03:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511071503.tA7F3jnu076560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 15:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290498 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 15:03:47 -0000 Author: bapt Date: Sat Nov 7 15:03:45 2015 New Revision: 290498 URL: https://svnweb.freebsd.org/changeset/base/290498 Log: Fix build on arm64 Modified: head/usr.bin/localedef/wide.c Modified: head/usr.bin/localedef/wide.c ============================================================================== --- head/usr.bin/localedef/wide.c Sat Nov 7 12:50:20 2015 (r290497) +++ head/usr.bin/localedef/wide.c Sat Nov 7 15:03:45 2015 (r290498) @@ -210,7 +210,7 @@ towide_utf8(wchar_t *wc, const char *mb, { wchar_t c; int nb; - int lv; /* lowest legal value */ + wchar_t lv; /* lowest legal value */ int i; const uint8_t *s = (const uint8_t *)mb; From owner-svn-src-head@freebsd.org Sat Nov 7 15:48:07 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8223BA28A9A; Sat, 7 Nov 2015 15:48:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 657D513DE; Sat, 7 Nov 2015 15:48:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 5F8A010B0; Sat, 7 Nov 2015 15:48:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 0312F12D0D; Sat, 7 Nov 2015 15:48:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id rR3nOIrPl9WY; Sat, 7 Nov 2015 15:48:04 +0000 (UTC) Subject: Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 17F4612D06 To: Craig Rodrigues References: <201511060445.tA64jUjj063307@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <563E1D3A.8090407@FreeBSD.org> Date: Sat, 7 Nov 2015 07:48:10 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KnLcdbfsaG01xfvtEL52ei30AHhSmw3W2" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 15:48:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KnLcdbfsaG01xfvtEL52ei30AHhSmw3W2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/7/2015 12:41 AM, Craig Rodrigues wrote: >=20 >=20 > On Thu, Nov 5, 2015 at 8:45 PM, Bryan Drewery > wrote: >=20 > Author: bdrewery > Date: Fri Nov 6 04:45:29 2015 > New Revision: 290433 > URL: https://svnweb.freebsd.org/changeset/base/290433 >=20 > Log: > Add a FAST_DEPEND option, off by default, which speeds up the > build significantly. >=20 > Enabling this by default, for src or out-of-src, can be done once= > more testing > has been done, such as a ports exp-run, and with more compilers. >=20 >=20 > I put WITH_FAST_DEPEND=3D"yes" in make.conf for these builds: Thank you! One reason I left it as an off-by-default option is that I had not tested it (full universe or buildworld) with GCC yet. I only did micro tests with GCC and was satisfied with it. >=20 > https://jenkins.freebsd.org/job/FreeBSD_HEAD > https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc4.9 > https://jenkins.freebsd.org/job/FreeBSD_HEAD_sparc64 I will look. >=20 >=20 > For the FreeBSD_HEAD_sparc64 build, there is a weird failure on bootstr= ap: >=20 > https://jenkins.freebsd.org/job/FreeBSD_HEAD_sparc64/1311/console >=20 > If you put these entries in make.conf: >=20 > TARGET=3Dsparc64 > WITH_FAST_DEPEND=3Dyes >=20 > and do: >=20 > make -j 4 buildworld __MAKE_CONF=3Dmake.conf >=20 > That seems to trigger it. >=20 > Can you take a look? >=20 > -- > Craig --=20 Regards, Bryan Drewery --KnLcdbfsaG01xfvtEL52ei30AHhSmw3W2 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 iQEcBAEBAgAGBQJWPh06AAoJEDXXcbtuRpfP2SEH/1HBxDl6FtBtkkXc4nYqLPh3 6R01J7jMsJc9bPRsbm2Jpb90Rz5W349SfSEonJxeJ5iuS/enc7bGEJbEx+bUsQL5 Giiq4JEWMOG2Qhd9cKJ85kzRWjfTx3XIa5shnV0KSTU0mhNYn7egHMLLiQJEEYeR m5YkK7TKLV6A/DfSy6XQ/RrlfVBeYUlm+77JzKtPENzDMGbSFuWrD9WKTbjsjmMC kVYGEjRYqI18ZC7DzmQ+hsR25QOP/1bPQ3VAvQot3acWhoUqY1VHLNq8SL/krRT7 c83oI8i1lM9W6sdYZzlMaWuJx7ALTqzLOqvQCweG8MDMxMTf50lH3yMrZrYmrMI= =URE4 -----END PGP SIGNATURE----- --KnLcdbfsaG01xfvtEL52ei30AHhSmw3W2-- From owner-svn-src-head@freebsd.org Sat Nov 7 16:22:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FCAFA284E1; Sat, 7 Nov 2015 16:22:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBB371A67; Sat, 7 Nov 2015 16:22:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7GMTT2099728; Sat, 7 Nov 2015 16:22:29 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7GMTDN099727; Sat, 7 Nov 2015 16:22:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511071622.tA7GMTDN099727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 16:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290499 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 16:22:31 -0000 Author: bapt Date: Sat Nov 7 16:22:29 2015 New Revision: 290499 URL: https://svnweb.freebsd.org/changeset/base/290499 Log: Workaround an issue on i386 to unbreak the build until the real issue is tracked down Modified: head/usr.bin/localedef/collate.c Modified: head/usr.bin/localedef/collate.c ============================================================================== --- head/usr.bin/localedef/collate.c Sat Nov 7 15:03:45 2015 (r290498) +++ head/usr.bin/localedef/collate.c Sat Nov 7 16:22:29 2015 (r290499) @@ -1255,7 +1255,8 @@ dump_collate(void) * Large (> UCHAR_MAX) character priorities */ RB_NUMNODES(collchar_t, collchars, &collchars, n); - large = calloc(sizeof (collate_large_t) * n, 1); + large = malloc(sizeof (collate_large_t) * n); + memset(large, 0, sizeof (collate_large_t) * n); if (large == NULL) { fprintf(stderr, "out of memory"); return; From owner-svn-src-head@freebsd.org Sat Nov 7 16:45:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FBC6A28A45; Sat, 7 Nov 2015 16:45:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA19217DD; Sat, 7 Nov 2015 16:45:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7Gjpqp006120; Sat, 7 Nov 2015 16:45:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7Gjp9O006119; Sat, 7 Nov 2015 16:45:51 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511071645.tA7Gjp9O006119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 16:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290500 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 16:45:53 -0000 Author: bapt Date: Sat Nov 7 16:45:51 2015 New Revision: 290500 URL: https://svnweb.freebsd.org/changeset/base/290500 Log: Run memset only after having checked the return of malloc Submitted by: pluknet Modified: head/usr.bin/localedef/collate.c Modified: head/usr.bin/localedef/collate.c ============================================================================== --- head/usr.bin/localedef/collate.c Sat Nov 7 16:22:29 2015 (r290499) +++ head/usr.bin/localedef/collate.c Sat Nov 7 16:45:51 2015 (r290500) @@ -1256,11 +1256,11 @@ dump_collate(void) */ RB_NUMNODES(collchar_t, collchars, &collchars, n); large = malloc(sizeof (collate_large_t) * n); - memset(large, 0, sizeof (collate_large_t) * n); if (large == NULL) { fprintf(stderr, "out of memory"); return; } + memset(large, 0, sizeof (collate_large_t) * n); i = 0; RB_FOREACH(cc, collchars, &collchars) { From owner-svn-src-head@freebsd.org Sat Nov 7 16:49:52 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47222A28AE9 for ; Sat, 7 Nov 2015 16:49:52 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) (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 C91571A89 for ; Sat, 7 Nov 2015 16:49:51 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by lbblt2 with SMTP id lt2so56806603lbb.3 for ; Sat, 07 Nov 2015 08:49:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=8QzmZlOkICxaoFh4VYk1a5fUDl8tk8EoB60/7IaUvec=; b=DnSxLMQRQZcDzcLODrpxaHNZ5MWjcRKv4diV/SsHt9mPTpa8UQxLkgkkYzBcyJO5Vi eI8W7f6+7Q/oaA6rKXUDsF52zsogNGK34mctK/LQ91gVKAZbcdyit7oh7nFWg3tQUuwj d/0TqYBivO52wKA/MMJQ3Cavc5+jma+zbo5Py25NQpvD72bLUIYSQC2MKnGV0U6ep9KH +Qslc7lgt/V0qYD5oDr6V4LcgxYCnnbTQq6VQ9Vx3JibR0vSaLK0VF2JFjqOKu0JXo+z OmmFOdJriFaYHJJuI/z5NgLTQbfFE2+9nUAIxYD2ZBGnwPJYh2apCPd9QeTfOop667u+ 1pNg== X-Gm-Message-State: ALoCoQmk2XdxFlt+QMyRRtafxB2YhBt2NDiY1dPLBpgA3VhpFsduLVJgp99vZOGuFriHCyQWp3O1 X-Received: by 10.112.168.194 with SMTP id zy2mr10100542lbb.79.1446914984009; Sat, 07 Nov 2015 08:49:44 -0800 (PST) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id b142sm934655lfb.46.2015.11.07.08.49.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Nov 2015 08:49:43 -0800 (PST) Subject: Re: svn commit: r290499 - head/usr.bin/localedef To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511071622.tA7GMTDN099727@repo.freebsd.org> From: Andrey Chernov Message-ID: <563E2BA6.9020505@freebsd.org> Date: Sat, 7 Nov 2015 19:49:42 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201511071622.tA7GMTDN099727@repo.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 16:49:52 -0000 On 07.11.2015 19:22, Baptiste Daroussin wrote: > Author: bapt > Date: Sat Nov 7 16:22:29 2015 > New Revision: 290499 > URL: https://svnweb.freebsd.org/changeset/base/290499 > > Log: > Workaround an issue on i386 to unbreak the build until the real issue is tracked > down > - large = calloc(sizeof (collate_large_t) * n, 1); > + large = malloc(sizeof (collate_large_t) * n); > + memset(large, 0, sizeof (collate_large_t) * n); Should be calloc(n, sizeof (collate_large_t)) according to calloc usage and to prevent size_t overflow. Is it calloc() bug? -- http://ache.vniz.net/ From owner-svn-src-head@freebsd.org Sat Nov 7 16:56:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B644A28CBA; Sat, 7 Nov 2015 16:56:41 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c: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 963C51F67; Sat, 7 Nov 2015 16:56:40 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wijp11 with SMTP id p11so46698059wij.0; Sat, 07 Nov 2015 08:56:39 -0800 (PST) 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=q2xCqdq92yWoNFJUkJUBvYuREgdHP7/ZZkhrglhBryk=; b=VVTZqQdZEwyzaRuhBMIUXXJ12MEnFx6MBV30iqErAf2GDibvkdmP68Oo2fp2rnRaKg LezbKtHMBSiYbBozw24cAlvqftCdgXVmvdXOuTIxKnvZMtvUyffglUwwwuYewHem6tNP X15q2iS0nDlvj7F072fAdFgBSOpB9jjNf10E5HVgeM8p2U/e3iSARLpgiW2lbVJvklwN P6Je1MQS5yMYe406qWcmYES0HbmWKIpS+J+hYqkdK1gVD/LgYlIH64VpFDktjXfzcf6j hm1PzhuzE+sBVyESXrD+LEas1wANiBcl2jaFJnZFY9xYvEgSqmjbrfGjivtBqvh4B3vz n+yw== X-Received: by 10.194.249.69 with SMTP id ys5mr9764981wjc.97.1446915399073; Sat, 07 Nov 2015 08:56:39 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id r5sm329508wjf.18.2015.11.07.08.56.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Nov 2015 08:56:38 -0800 (PST) Sender: Baptiste Daroussin Date: Sat, 7 Nov 2015 17:56:36 +0100 From: Baptiste Daroussin To: Andrey Chernov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, jasone@FreeBSD.org Subject: Re: svn commit: r290499 - head/usr.bin/localedef Message-ID: <20151107165636.GA31396@ivaldir.etoilebsd.net> References: <201511071622.tA7GMTDN099727@repo.freebsd.org> <563E2BA6.9020505@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline In-Reply-To: <563E2BA6.9020505@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 16:56:41 -0000 --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 07, 2015 at 07:49:42PM +0300, Andrey Chernov wrote: > On 07.11.2015 19:22, Baptiste Daroussin wrote: > > Author: bapt > > Date: Sat Nov 7 16:22:29 2015 > > New Revision: 290499 > > URL: https://svnweb.freebsd.org/changeset/base/290499 > >=20 > > Log: > > Workaround an issue on i386 to unbreak the build until the real issue= is tracked > > down > > - large =3D calloc(sizeof (collate_large_t) * n, 1); > > + large =3D malloc(sizeof (collate_large_t) * n); > > + memset(large, 0, sizeof (collate_large_t) * n); >=20 > Should be calloc(n, sizeof (collate_large_t)) according to calloc usage > and to prevent size_t overflow. Is it calloc() bug? I have tried all combinaison with calloc before committing the workaround, = all fails the same way on i386: : jemalloc_arena.c:353: Failed assertion: "p[i] =3D=3D 0" So yes I'm thinking about a calloc bug (Jason CCed) FYI sizeof(collate_large_t) is 44 there and n is 1145 Best regards, Bapt --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlY+LUQACgkQ8kTtMUmk6Ewl9QCgnfCjkV77VCdYqHVOfXL042pP ElQAn0qAVxekWG103NuWoLmvsR8HNuD8 =I67P -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH-- From owner-svn-src-head@freebsd.org Sat Nov 7 17:54:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25B63A2891F; Sat, 7 Nov 2015 17:54:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6D711A07; Sat, 7 Nov 2015 17:54:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7HsqUi026964; Sat, 7 Nov 2015 17:54:52 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7HsqqX026963; Sat, 7 Nov 2015 17:54:52 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511071754.tA7HsqqX026963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 17:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290501 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 17:54:53 -0000 Author: bapt Date: Sat Nov 7 17:54:51 2015 New Revision: 290501 URL: https://svnweb.freebsd.org/changeset/base/290501 Log: Add a note about the inpact on databases of the changes in collation support Reported by: girgen Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Nov 7 16:45:51 2015 (r290500) +++ head/UPDATING Sat Nov 7 17:54:51 2015 (r290501) @@ -36,6 +36,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 order of files listed by ls(1) for example. To get back to the old behaviour, set LC_COLLATE environment variable to "C". + Databases administrators will need to reindex their databases given + collation results will be different. + 20151030: The OpenSSL has been upgraded to 1.0.2d. Any binaries requiring libcrypto.so.7 or libssl.so.7 must be recompiled. From owner-svn-src-head@freebsd.org Sat Nov 7 18:00:33 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1CAFA28A4D; Sat, 7 Nov 2015 18:00:33 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f178.google.com (mail-yk0-f178.google.com [209.85.160.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 869851E55; Sat, 7 Nov 2015 18:00:33 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykdv3 with SMTP id v3so126024738ykd.0; Sat, 07 Nov 2015 10:00:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=d5y7snafzM4ALC+w+4u+G2vZAdV00Hpw3rzfhdX+Xb0=; b=mQ+c7w22ELad001W2d3rfKjgkUIejXpWWd0T7+/sFrPc0mlm5lneLXqEvVmVkpDPMt Icr2SvBluR7WPNKtLCT7LDXMjDqcM2qlvtQDBrYGZib9rpk8pWdJh6YJaZdd02dNKK8L fTsySNrH6UQm+KiCS9Nhd3eFk5qdbm002q20UUB1TX56m9cQQ2cMHK8k5zMVzSAYhU2v LtbEMnkUdAQtEODxBVCuDd5CcEL6Q0OO2EZ1hojeyVeke/38ceZxHaoa5ds18bofc57e iTnlvM6Nz6gImn/j8PtVR8nBvb/RG0iHGpEi8xk2NyahETB4oE9AEdgwhxQLl5cIlTGd T2SQ== X-Received: by 10.129.106.193 with SMTP id f184mr17941120ywc.157.1446917768516; Sat, 07 Nov 2015 09:36:08 -0800 (PST) Received: from mail-yk0-f182.google.com (mail-yk0-f182.google.com. [209.85.160.182]) by smtp.gmail.com with ESMTPSA id e68sm4428804ywd.34.2015.11.07.09.36.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Nov 2015 09:36:08 -0800 (PST) Received: by ykba4 with SMTP id a4so215193279ykb.3; Sat, 07 Nov 2015 09:36:08 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.129.88.87 with SMTP id m84mr15503483ywb.73.1446917768129; Sat, 07 Nov 2015 09:36:08 -0800 (PST) Reply-To: cem@FreeBSD.org Received: by 10.37.17.2 with HTTP; Sat, 7 Nov 2015 09:36:08 -0800 (PST) In-Reply-To: <201511071233.tA7CXUKP032030@repo.freebsd.org> References: <201511071233.tA7CXUKP032030@repo.freebsd.org> Date: Sat, 7 Nov 2015 09:36:08 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r290493 - head/sys/sys From: Conrad Meyer To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 18:00:33 -0000 Missed that instance of intptr_t, sorry. Thanks for fixing it. I think we should also s/intptr_t/intmax_t/ in SYSCTL_HANDLER_ARGS. Thanks, Conrad On Sat, Nov 7, 2015 at 4:33 AM, Konstantin Belousov wrote: > Author: kib > Date: Sat Nov 7 12:33:30 2015 > New Revision: 290493 > URL: https://svnweb.freebsd.org/changeset/base/290493 > > Log: > Correct the argument type in the sysctl_add_oid(9) prototype. On > ILP32 machines, intptr_t and intmax_t are different types. > > Submitted by: skra > > Modified: > head/sys/sys/sysctl.h > > Modified: head/sys/sys/sysctl.h > ============================================================================== > --- head/sys/sys/sysctl.h Sat Nov 7 12:30:43 2015 (r290492) > +++ head/sys/sys/sysctl.h Sat Nov 7 12:33:30 2015 (r290493) > @@ -949,7 +949,7 @@ extern char kern_ident[]; > /* Dynamic oid handling */ > struct sysctl_oid *sysctl_add_oid(struct sysctl_ctx_list *clist, > struct sysctl_oid_list *parent, int nbr, const char *name, int kind, > - void *arg1, intptr_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), > + void *arg1, intmax_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), > const char *fmt, const char *descr); > int sysctl_remove_name(struct sysctl_oid *parent, const char *name, int del, > int recurse); > From owner-svn-src-head@freebsd.org Sat Nov 7 18:26:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 092B9A2910A; Sat, 7 Nov 2015 18:26:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D76971D7A; Sat, 7 Nov 2015 18:26:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7IQ28u035828; Sat, 7 Nov 2015 18:26:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7IQ2ip035814; Sat, 7 Nov 2015 18:26:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511071826.tA7IQ2ip035814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 7 Nov 2015 18:26:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290504 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 18:26:04 -0000 Author: mav Date: Sat Nov 7 18:26:02 2015 New Revision: 290504 URL: https://svnweb.freebsd.org/changeset/base/290504 Log: Make ISP_SLEEP() really sleep instead of spinning. While there, simplify the wait logic. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sat Nov 7 17:56:15 2015 (r290503) +++ head/sys/dev/isp/isp.c Sat Nov 7 18:26:02 2015 (r290504) @@ -2756,12 +2756,13 @@ static int isp_fclink_test(ispsoftc_t *isp, int chan, int usdelay) { mbreg_t mbs; - int count, check_for_fabric, r; + int check_for_fabric, r; uint8_t lwfs; int loopid; fcparam *fcp; fcportdb_t *lp; isp_pdb_t pdb; + NANOTIME_T hra, hrb; fcp = FCPARAM(isp, chan); @@ -2772,13 +2773,8 @@ isp_fclink_test(ispsoftc_t *isp, int cha * Wait up to N microseconds for F/W to go to a ready state. */ lwfs = FW_CONFIG_WAIT; - count = 0; - while (count < usdelay) { - uint64_t enano; - uint32_t wrk; - NANOTIME_T hra, hrb; - - GET_NANOTIME(&hra); + GET_NANOTIME(&hra); + do { isp_fw_state(isp, chan); if (lwfs != fcp->isp_fwstate) { isp_prt(isp, ISP_LOGCONFIG|ISP_LOG_SANCFG, "Chan %d Firmware State <%s->%s>", chan, isp_fc_fw_statename((int)lwfs), isp_fc_fw_statename((int)fcp->isp_fwstate)); @@ -2787,46 +2783,9 @@ isp_fclink_test(ispsoftc_t *isp, int cha if (fcp->isp_fwstate == FW_READY) { break; } + ISP_SLEEP(isp, 1000); GET_NANOTIME(&hrb); - - /* - * Get the elapsed time in nanoseconds. - * Always guaranteed to be non-zero. - */ - enano = NANOTIME_SUB(&hrb, &hra); - - isp_prt(isp, ISP_LOGDEBUG1, "usec%d: 0x%lx->0x%lx enano 0x%x%08x", count, (long) GET_NANOSEC(&hra), (long) GET_NANOSEC(&hrb), (uint32_t)(enano >> 32), (uint32_t)(enano)); - - /* - * If the elapsed time is less than 1 millisecond, - * delay a period of time up to that millisecond of - * waiting. - * - * This peculiar code is an attempt to try and avoid - * invoking uint64_t math support functions for some - * platforms where linkage is a problem. - */ - if (enano < (1000 * 1000)) { - count += 1000; - enano = (1000 * 1000) - enano; - while (enano > (uint64_t) 4000000000U) { - ISP_SLEEP(isp, 4000000); - enano -= (uint64_t) 4000000000U; - } - wrk = enano; - wrk /= 1000; - ISP_SLEEP(isp, wrk); - } else { - while (enano > (uint64_t) 4000000000U) { - count += 4000000; - enano -= (uint64_t) 4000000000U; - } - wrk = enano; - count += (wrk / 1000); - } - } - - + } while (NANOTIME_SUB(&hrb, &hra) / 1000 < usdelay); /* * If we haven't gone to 'ready' state, return. Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sat Nov 7 17:56:15 2015 (r290503) +++ head/sys/dev/isp/isp_freebsd.h Sat Nov 7 18:26:02 2015 (r290504) @@ -399,8 +399,14 @@ struct isposinfo { #define ISP_MEMZERO(a, b) memset(a, 0, b) #define ISP_MEMCPY memcpy #define ISP_SNPRINTF snprintf -#define ISP_DELAY DELAY -#define ISP_SLEEP(isp, x) DELAY(x) +#define ISP_DELAY(x) DELAY(x) +#if __FreeBSD_version < 1000029 +#define ISP_SLEEP(isp, x) msleep(&(isp)->isp_osinfo.lock, \ + &(isp)->isp_osinfo.lock, 0, "isp_sleep", ((x) + tick - 1) / tick) +#else +#define ISP_SLEEP(isp, x) msleep_sbt(&(isp)->isp_osinfo.lock, \ + &(isp)->isp_osinfo.lock, 0, "isp_sleep", (x) * SBT_1US, 0, 0) +#endif #define ISP_MIN imin From owner-svn-src-head@freebsd.org Sat Nov 7 18:26:34 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ADFBA2916B; Sat, 7 Nov 2015 18:26:34 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 353E31FB1; Sat, 7 Nov 2015 18:26:34 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7IQXep035923; Sat, 7 Nov 2015 18:26:33 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7IQWNR035920; Sat, 7 Nov 2015 18:26:32 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201511071826.tA7IQWNR035920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 7 Nov 2015 18:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290505 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 18:26:34 -0000 Author: cem Date: Sat Nov 7 18:26:32 2015 New Revision: 290505 URL: https://svnweb.freebsd.org/changeset/base/290505 Log: Flesh out sysctl types further (follow-up of r290475) Use the right intmax_t type instead of intptr_t in a few remaining places. Add support for CTLFLAG_TUN for the new fixed with types. Bruce will be upset that the new handlers silently truncate tuned quad-sized inputs, but so do all of the existing handlers. Add the new types to debug_dump_node, for whatever use that is. Bump FreeBSD_version again, for good measure. We are changing SYSCTL_HANDLER_ARGS and a member of struct sysctl_oid to intmax_t. Correct the sysctl typed NULL values for the fixed-width types. (Hat tip: hps@.) Suggested by: hps (partial) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/kern_sysctl.c head/sys/sys/param.h head/sys/sys/sysctl.h Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Sat Nov 7 18:26:02 2015 (r290504) +++ head/sys/kern/kern_sysctl.c Sat Nov 7 18:26:32 2015 (r290505) @@ -147,7 +147,7 @@ sysctl_wunlock(void) } static int -sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intptr_t arg2, +sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intmax_t arg2, struct sysctl_req *req, struct rm_priotracker *tracker) { int error; @@ -189,6 +189,9 @@ sysctl_load_tunable_by_oid_locked(struct char path[64]; ssize_t rem = sizeof(path); ssize_t len; + uint8_t val_8; + uint16_t val_16; + uint32_t val_32; int val_int; long val_long; int64_t val_64; @@ -243,6 +246,27 @@ sysctl_load_tunable_by_oid_locked(struct req.newlen = sizeof(val_long); req.newptr = &val_long; break; + case CTLTYPE_S8: + if (getenv_int(path + rem, &val_int) == 0) + return; + val_8 = val_int; + req.newlen = sizeof(val_8); + req.newptr = &val_8; + break; + case CTLTYPE_S16: + if (getenv_int(path + rem, &val_int) == 0) + return; + val_16 = val_int; + req.newlen = sizeof(val_16); + req.newptr = &val_16; + break; + case CTLTYPE_S32: + if (getenv_long(path + rem, &val_long) == 0) + return; + val_32 = val_long; + req.newlen = sizeof(val_32); + req.newptr = &val_32; + break; case CTLTYPE_S64: if (getenv_quad(path + rem, &val_quad) == 0) return; @@ -250,6 +274,27 @@ sysctl_load_tunable_by_oid_locked(struct req.newlen = sizeof(val_64); req.newptr = &val_64; break; + case CTLTYPE_U8: + if (getenv_uint(path + rem, (unsigned int *)&val_int) == 0) + return; + val_8 = val_int; + req.newlen = sizeof(val_8); + req.newptr = &val_8; + break; + case CTLTYPE_U16: + if (getenv_uint(path + rem, (unsigned int *)&val_int) == 0) + return; + val_16 = val_int; + req.newlen = sizeof(val_16); + req.newptr = &val_16; + break; + case CTLTYPE_U32: + if (getenv_ulong(path + rem, (unsigned long *)&val_long) == 0) + return; + val_32 = val_long; + req.newlen = sizeof(val_32); + req.newptr = &val_32; + break; case CTLTYPE_U64: /* XXX there is no getenv_uquad() */ if (getenv_quad(path + rem, &val_quad) == 0) @@ -806,8 +851,14 @@ sysctl_sysctl_debug_dump_node(struct sys case CTLTYPE_LONG: printf(" Long\n"); break; case CTLTYPE_ULONG: printf(" u_long\n"); break; case CTLTYPE_STRING: printf(" String\n"); break; - case CTLTYPE_U64: printf(" uint64_t\n"); break; + case CTLTYPE_S8: printf(" int8_t\n"); break; + case CTLTYPE_S16: printf(" int16_t\n"); break; + case CTLTYPE_S32: printf(" int32_t\n"); break; case CTLTYPE_S64: printf(" int64_t\n"); break; + case CTLTYPE_U8: printf(" uint8_t\n"); break; + case CTLTYPE_U16: printf(" uint16_t\n"); break; + case CTLTYPE_U32: printf(" uint32_t\n"); break; + case CTLTYPE_U64: printf(" uint64_t\n"); break; case CTLTYPE_OPAQUE: printf(" Opaque/struct\n"); break; default: printf("\n"); } Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Nov 7 18:26:02 2015 (r290504) +++ head/sys/sys/param.h Sat Nov 7 18:26:32 2015 (r290505) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100088 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100089 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Sat Nov 7 18:26:02 2015 (r290504) +++ head/sys/sys/sysctl.h Sat Nov 7 18:26:32 2015 (r290505) @@ -137,7 +137,7 @@ struct ctlname { #endif #define SYSCTL_HANDLER_ARGS struct sysctl_oid *oidp, void *arg1, \ - intptr_t arg2, struct sysctl_req *req + intmax_t arg2, struct sysctl_req *req /* definitions for sysctl_req 'lock' member */ #define REQ_UNWIRED 1 @@ -181,7 +181,7 @@ struct sysctl_oid { int oid_number; u_int oid_kind; void *oid_arg1; - intptr_t oid_arg2; + intmax_t oid_arg2; const char *oid_name; int (*oid_handler)(SYSCTL_HANDLER_ARGS); const char *oid_fmt; @@ -329,7 +329,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e }) /* Oid for a signed 8-bit int. If ptr is NULL, val is returned. */ -#define SYSCTL_NULL_S8_PTR ((unsigned *)NULL) +#define SYSCTL_NULL_S8_PTR ((int8_t *)NULL) #define SYSCTL_S8(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_S8 | CTLFLAG_MPSAFE | (access), \ @@ -349,7 +349,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e }) /* Oid for an unsigned 8-bit int. If ptr is NULL, val is returned. */ -#define SYSCTL_NULL_U8_PTR ((unsigned *)NULL) +#define SYSCTL_NULL_U8_PTR ((uint8_t *)NULL) #define SYSCTL_U8(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_U8 | CTLFLAG_MPSAFE | (access), \ @@ -369,7 +369,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e }) /* Oid for a signed 16-bit int. If ptr is NULL, val is returned. */ -#define SYSCTL_NULL_S16_PTR ((unsigned *)NULL) +#define SYSCTL_NULL_S16_PTR ((int16_t *)NULL) #define SYSCTL_S16(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_S16 | CTLFLAG_MPSAFE | (access), \ @@ -389,7 +389,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e }) /* Oid for an unsigned 16-bit int. If ptr is NULL, val is returned. */ -#define SYSCTL_NULL_U16_PTR ((unsigned *)NULL) +#define SYSCTL_NULL_U16_PTR ((uint16_t *)NULL) #define SYSCTL_U16(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_U16 | CTLFLAG_MPSAFE | (access), \ @@ -409,7 +409,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e }) /* Oid for a signed 32-bit int. If ptr is NULL, val is returned. */ -#define SYSCTL_NULL_S32_PTR ((unsigned *)NULL) +#define SYSCTL_NULL_S32_PTR ((int32_t *)NULL) #define SYSCTL_S32(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_S32 | CTLFLAG_MPSAFE | (access), \ @@ -429,7 +429,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e }) /* Oid for an unsigned 32-bit int. If ptr is NULL, val is returned. */ -#define SYSCTL_NULL_U32_PTR ((unsigned *)NULL) +#define SYSCTL_NULL_U32_PTR ((uint32_t *)NULL) #define SYSCTL_U32(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_U32 | CTLFLAG_MPSAFE | (access), \ @@ -449,7 +449,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e }) /* Oid for a signed 64-bit int. If ptr is NULL, val is returned. */ -#define SYSCTL_NULL_S64_PTR ((unsigned *)NULL) +#define SYSCTL_NULL_S64_PTR ((int64_t *)NULL) #define SYSCTL_S64(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_S64 | CTLFLAG_MPSAFE | (access), \ @@ -469,7 +469,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e }) /* Oid for an unsigned 64-bit int. If ptr is NULL, val is returned. */ -#define SYSCTL_NULL_U64_PTR ((unsigned *)NULL) +#define SYSCTL_NULL_U64_PTR ((uint64_t *)NULL) #define SYSCTL_U64(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \ From owner-svn-src-head@freebsd.org Sat Nov 7 18:26:51 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37EF7A2919E; Sat, 7 Nov 2015 18:26:51 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f170.google.com (mail-yk0-f170.google.com [209.85.160.170]) (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 EA1BA1144; Sat, 7 Nov 2015 18:26:50 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykdr3 with SMTP id r3so215983217ykd.1; Sat, 07 Nov 2015 10:26:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=qDxlDxdDcuZMIMAuBndUoRWXAxxRWhkuS+BMyaNCPgA=; b=MIgcSSo3ibsBOO+FSz0iHFE/wrK7zn7LRDAjMgmhzYcMF6LLTbyuVpbJjHm3DZSTaa d7NpRgye+AbN29kLSD2qwsMvBZVAUYxCntNsvi3o/fznPqEJMxIU4ZR0+uZxZpIpEVBA XeYJ5BYdVKqDWbxWr61koerKGDjQq+j3xLzCw19LFiKZfsiXoAlYACD9xQLLwDkDuV6t dP0C+pBnjWSomKKR+T8445CjuHhod4iZIu0hiM7zOia6XTwJAPA6YyLeKPMuEBK+T2s2 Vn+daHy6COjGhFkyHWAdDJOEX3ctKSNvauFAUZuPZwZbQqm+GaQ9OAftuVxtlhvStVRR LOog== X-Received: by 10.13.254.69 with SMTP id o66mr15631965ywf.252.1446920810007; Sat, 07 Nov 2015 10:26:50 -0800 (PST) Received: from mail-yk0-f172.google.com (mail-yk0-f172.google.com. [209.85.160.172]) by smtp.gmail.com with ESMTPSA id t132sm4559601ywa.42.2015.11.07.10.26.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Nov 2015 10:26:49 -0800 (PST) Received: by ykba4 with SMTP id a4so215883160ykb.3; Sat, 07 Nov 2015 10:26:49 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.129.107.8 with SMTP id g8mr15820986ywc.267.1446920809423; Sat, 07 Nov 2015 10:26:49 -0800 (PST) Reply-To: cem@FreeBSD.org Received: by 10.37.17.2 with HTTP; Sat, 7 Nov 2015 10:26:49 -0800 (PST) In-Reply-To: <563DDE73.6030307@selasky.org> References: <201511070143.tA71h13k038232@repo.freebsd.org> <563DDE73.6030307@selasky.org> Date: Sat, 7 Nov 2015 10:26:49 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r290475 - in head: share/man/man9 sys/kern sys/sys From: Conrad Meyer To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 18:26:51 -0000 Can do =E2=80=94 fixed in r290505. Thanks, Conrad On Sat, Nov 7, 2015 at 3:20 AM, Hans Petter Selasky wrote= : > On 11/07/15 09:37, Svatopluk Kraus wrote: >> >> +#define SYSCTL_NULL_U64_PTR ((unsigned *)NULL) > > > Hi Conrad, > > All the NULL macros must have correct type according to the size-check > asserts. Else they won't have any purpose: > > #define SYSCTL_NULL_U64_PTR ((uint64_t *)NULL) > #define SYSCTL_NULL_S64_PTR ((int64_t *)NULL) > > #define SYSCTL_NULL_U8_PTR ((uint8_t *)NULL) > #define SYSCTL_NULL_S8_PTR ((int8_t *)NULL) > > And so one. Can you fix this? > > --HPS > From owner-svn-src-head@freebsd.org Sat Nov 7 19:03:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2CADA299BE; Sat, 7 Nov 2015 19:03:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FFC01B01; Sat, 7 Nov 2015 19:03:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7J3lnW047711; Sat, 7 Nov 2015 19:03:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7J3lC0047710; Sat, 7 Nov 2015 19:03:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511071903.tA7J3lC0047710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 7 Nov 2015 19:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290506 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 19:03:48 -0000 Author: mav Date: Sat Nov 7 19:03:47 2015 New Revision: 290506 URL: https://svnweb.freebsd.org/changeset/base/290506 Log: Specify VP when sending a marker. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sat Nov 7 18:26:32 2015 (r290505) +++ head/sys/dev/isp/isp.c Sat Nov 7 19:03:47 2015 (r290506) @@ -4434,6 +4434,7 @@ isp_start(XS_T *xs) m->mrk_header.rqs_entry_count = 1; m->mrk_header.rqs_entry_type = RQSTYPE_MARKER; m->mrk_modifier = SYNC_ALL; + m->mrk_vphdl = XS_CHANNEL(xs); isp_put_marker_24xx(isp, m, qep); } else { isp_marker_t *m = (isp_marker_t *) reqp; From owner-svn-src-head@freebsd.org Sat Nov 7 19:14:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53D63A29B30; Sat, 7 Nov 2015 19:14:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 126861F98; Sat, 7 Nov 2015 19:14:54 +0000 (UTC) (envelope-from brde@optusnet.com.au) 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 A9D9ED63635; Sun, 8 Nov 2015 06:14:50 +1100 (AEDT) Date: Sun, 8 Nov 2015 06:14:50 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Conrad E. Meyer" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290505 - in head/sys: kern sys In-Reply-To: <201511071826.tA7IQWNR035920@repo.freebsd.org> Message-ID: <20151108054659.D5096@besplex.bde.org> References: <201511071826.tA7IQWNR035920@repo.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=R6/+YolX c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=KpWaLFP9ifmkMm4hwlsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 19:14:55 -0000 On Sat, 7 Nov 2015, Conrad E. Meyer wrote: > Log: > Flesh out sysctl types further (follow-up of r290475) > > Use the right intmax_t type instead of intptr_t in a few remaining > places. > > Add support for CTLFLAG_TUN for the new fixed with types. Bruce will be > upset that the new handlers silently truncate tuned quad-sized inputs, > but so do all of the existing handlers. I think I have complained about the getenv_*() integer functions before. All of them truncate or otherwise corrupt the value. getenv_quad() does non-blind clamping using strtoq() followed by blind scaling in the suffix case. All others use getenv_quad() with blind truncation, except on 64-bit arches long == quad so getenv_long() only has the same errors as getenv_quad(). > Modified: head/sys/kern/kern_sysctl.c > ============================================================================== > --- head/sys/kern/kern_sysctl.c Sat Nov 7 18:26:02 2015 (r290504) > +++ head/sys/kern/kern_sysctl.c Sat Nov 7 18:26:32 2015 (r290505) > ... > + case CTLTYPE_S32: > + if (getenv_long(path + rem, &val_long) == 0) > + return; > + val_32 = val_long; > + req.newlen = sizeof(val_32); > + req.newptr = &val_32; > + break; This should use getenv_int(). FreeBSD never supported 16-bit ints, and POSIX now requires >= 32-bit ints. > @@ -250,6 +274,27 @@ sysctl_load_tunable_by_oid_locked(struct > req.newlen = sizeof(val_64); > req.newptr = &val_64; > break; > + case CTLTYPE_U8: > + if (getenv_uint(path + rem, (unsigned int *)&val_int) == 0) > + return; > + val_8 = val_int; > + req.newlen = sizeof(val_8); > + req.newptr = &val_8; > + break; > + case CTLTYPE_U16: > + if (getenv_uint(path + rem, (unsigned int *)&val_int) == 0) > + return; > + val_16 = val_int; > + req.newlen = sizeof(val_16); > + req.newptr = &val_16; > + break; These could use getenv_int() since int is larger than int17_t. Will null error checking, there would be little difference for the overflows caused by negative values. With non-null error checking, the checking would be slightly different. > + case CTLTYPE_U32: > + if (getenv_ulong(path + rem, (unsigned long *)&val_long) == 0) > + return; > + val_32 = val_long; > + req.newlen = sizeof(val_32); > + req.newptr = &val_32; > + break; Like for S32. Bruce From owner-svn-src-head@freebsd.org Sat Nov 7 19:33:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A93A7A29F58; Sat, 7 Nov 2015 19:33:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AAA01A66; Sat, 7 Nov 2015 19:33:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7JXvU8056438; Sat, 7 Nov 2015 19:33:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7JXvU8056436; Sat, 7 Nov 2015 19:33:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511071933.tA7JXvU8056436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 7 Nov 2015 19:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290507 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 19:33:58 -0000 Author: mav Date: Sat Nov 7 19:33:57 2015 New Revision: 290507 URL: https://svnweb.freebsd.org/changeset/base/290507 Log: Rework r290504. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sat Nov 7 19:03:47 2015 (r290506) +++ head/sys/dev/isp/isp.c Sat Nov 7 19:33:57 2015 (r290507) @@ -2774,7 +2774,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha */ lwfs = FW_CONFIG_WAIT; GET_NANOTIME(&hra); - do { + while (1) { isp_fw_state(isp, chan); if (lwfs != fcp->isp_fwstate) { isp_prt(isp, ISP_LOGCONFIG|ISP_LOG_SANCFG, "Chan %d Firmware State <%s->%s>", chan, isp_fc_fw_statename((int)lwfs), isp_fc_fw_statename((int)fcp->isp_fwstate)); @@ -2783,9 +2783,11 @@ isp_fclink_test(ispsoftc_t *isp, int cha if (fcp->isp_fwstate == FW_READY) { break; } - ISP_SLEEP(isp, 1000); GET_NANOTIME(&hrb); - } while (NANOTIME_SUB(&hrb, &hra) / 1000 < usdelay); + if ((NANOTIME_SUB(&hrb, &hra) / 1000 + 1000 >= usdelay)) + break; + ISP_SLEEP(isp, 1000); + } /* * If we haven't gone to 'ready' state, return. Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sat Nov 7 19:03:47 2015 (r290506) +++ head/sys/dev/isp/isp_freebsd.h Sat Nov 7 19:33:57 2015 (r290507) @@ -401,10 +401,10 @@ struct isposinfo { #define ISP_SNPRINTF snprintf #define ISP_DELAY(x) DELAY(x) #if __FreeBSD_version < 1000029 -#define ISP_SLEEP(isp, x) msleep(&(isp)->isp_osinfo.lock, \ +#define ISP_SLEEP(isp, x) msleep(&(isp)->isp_osinfo.is_exiting, \ &(isp)->isp_osinfo.lock, 0, "isp_sleep", ((x) + tick - 1) / tick) #else -#define ISP_SLEEP(isp, x) msleep_sbt(&(isp)->isp_osinfo.lock, \ +#define ISP_SLEEP(isp, x) msleep_sbt(&(isp)->isp_osinfo.is_exiting, \ &(isp)->isp_osinfo.lock, 0, "isp_sleep", (x) * SBT_1US, 0, 0) #endif From owner-svn-src-head@freebsd.org Sat Nov 7 19:54:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94E0DA282E1; Sat, 7 Nov 2015 19:54:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5895A12C2; Sat, 7 Nov 2015 19:54:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7JseJe062090; Sat, 7 Nov 2015 19:54:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7Jsexv062089; Sat, 7 Nov 2015 19:54:40 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511071954.tA7Jsexv062089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 19:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290508 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 19:54:41 -0000 Author: bapt Date: Sat Nov 7 19:54:40 2015 New Revision: 290508 URL: https://svnweb.freebsd.org/changeset/base/290508 Log: Fix an off by one due to bad conversion from avl(3) to tree(3) Readd calloc as it was not the issue just the messenger Submitted by: dim Found by: Address Sanitizer Modified: head/usr.bin/localedef/collate.c Modified: head/usr.bin/localedef/collate.c ============================================================================== --- head/usr.bin/localedef/collate.c Sat Nov 7 19:33:57 2015 (r290507) +++ head/usr.bin/localedef/collate.c Sat Nov 7 19:54:40 2015 (r290508) @@ -1242,11 +1242,11 @@ dump_collate(void) } n = 0; RB_FOREACH(ce, elem_by_expand, &elem_by_expand) { - n++; (void) wsncpy(chain[n].str, ce->expand, COLLATE_STR_LEN); for (i = 0; i < NUM_WT; i++) { chain[n].pri[i] = get_weight(ce->ref[i], i); } + n++; } if (n != collinfo.chain_count) INTERR; @@ -1255,12 +1255,11 @@ dump_collate(void) * Large (> UCHAR_MAX) character priorities */ RB_NUMNODES(collchar_t, collchars, &collchars, n); - large = malloc(sizeof (collate_large_t) * n); + large = calloc(n, sizeof (collate_large_t)); if (large == NULL) { fprintf(stderr, "out of memory"); return; } - memset(large, 0, sizeof (collate_large_t) * n); i = 0; RB_FOREACH(cc, collchars, &collchars) { From owner-svn-src-head@freebsd.org Sat Nov 7 19:58:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 324B5A2834A; Sat, 7 Nov 2015 19:58:00 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::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 BE3AC1483; Sat, 7 Nov 2015 19:57:59 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wicll6 with SMTP id ll6so48392632wic.0; Sat, 07 Nov 2015 11:57:58 -0800 (PST) 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=jTXj+VdUlT8et+sHFSnIexXj1cSdM5x/UYngjb3+5r0=; b=L2O3cjKeOdeQPkCpQ5/RhJOMsphDkspBoIBH9vlc2mXvAPAMajjnD3sjOnCWTokq7C cIU8uGdWQp9GWoZn5jim6Sqz84bBDH1Mgv7MDk8HLrjRxAYzJDBj8OtnclZjjmvvN1Yo 8x/+/Ivid1TJOYIbejnKAx1AIa+m9tvp2GiHRk1Gx5dIS7oSGJuWa17IFNUNpEL4gr7l JmTBM4MQxMC7LZJrHLzGAUiyfJr1mL0rYSBpHD1FgPw/hDzxDLZf0o8wTuMpNuRXudJU Ad67NF4LIMhWnjrBVuh1Drw8LLPHg7QpvKe1jikoE2BFlBhk8NJaEyOlNLeqkbGL+HA9 0X6w== X-Received: by 10.194.90.79 with SMTP id bu15mr25318953wjb.36.1446926278199; Sat, 07 Nov 2015 11:57:58 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id 71sm5458488wmt.15.2015.11.07.11.57.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Nov 2015 11:57:57 -0800 (PST) Sender: Baptiste Daroussin Date: Sat, 7 Nov 2015 20:57:55 +0100 From: Baptiste Daroussin To: Andrey Chernov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, jasone@FreeBSD.org Subject: Re: svn commit: r290499 - head/usr.bin/localedef Message-ID: <20151107195755.GC31396@ivaldir.etoilebsd.net> References: <201511071622.tA7GMTDN099727@repo.freebsd.org> <563E2BA6.9020505@freebsd.org> <20151107165636.GA31396@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f+W+jCU1fRNres8c" Content-Disposition: inline In-Reply-To: <20151107165636.GA31396@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 19:58:00 -0000 --f+W+jCU1fRNres8c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 07, 2015 at 05:56:36PM +0100, Baptiste Daroussin wrote: > On Sat, Nov 07, 2015 at 07:49:42PM +0300, Andrey Chernov wrote: > > On 07.11.2015 19:22, Baptiste Daroussin wrote: > > > Author: bapt > > > Date: Sat Nov 7 16:22:29 2015 > > > New Revision: 290499 > > > URL: https://svnweb.freebsd.org/changeset/base/290499 > > >=20 > > > Log: > > > Workaround an issue on i386 to unbreak the build until the real iss= ue is tracked > > > down > > > - large =3D calloc(sizeof (collate_large_t) * n, 1); > > > + large =3D malloc(sizeof (collate_large_t) * n); > > > + memset(large, 0, sizeof (collate_large_t) * n); > >=20 > > Should be calloc(n, sizeof (collate_large_t)) according to calloc usage > > and to prevent size_t overflow. Is it calloc() bug? >=20 > I have tried all combinaison with calloc before committing the workaround= , all > fails the same way on i386: > : jemalloc_arena.c:353: Failed assertion: "p[i] =3D=3D 0" >=20 > So yes I'm thinking about a calloc bug (Jason CCed) >=20 > FYI sizeof(collate_large_t) is 44 there and n is 1145 >=20 > Best regards, > Bapt Issue found by dim@ using the Address Sanitizer Guilty was me through a bug I introduced during conversion from avl(3) to tree(3). Best regards, Bapt --f+W+jCU1fRNres8c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlY+V8MACgkQ8kTtMUmk6EwnpgCgiGB4A1tY9Q86PRUMYhqNuLxP b+AAnA4pc9Fx3N6Apn8Uin4TRUuIEHhe =bois -----END PGP SIGNATURE----- --f+W+jCU1fRNres8c-- From owner-svn-src-head@freebsd.org Sat Nov 7 20:02:09 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08A53A284A5; Sat, 7 Nov 2015 20:02:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA4C1181F; Sat, 7 Nov 2015 20:02:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7K272T064337; Sat, 7 Nov 2015 20:02:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7K27DI064330; Sat, 7 Nov 2015 20:02:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201511072002.tA7K27DI064330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 7 Nov 2015 20:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290509 - in head/sys: arm/at91 arm/conf conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 20:02:09 -0000 Author: imp Date: Sat Nov 7 20:02:07 2015 New Revision: 290509 URL: https://svnweb.freebsd.org/changeset/base/290509 Log: Add support for RMII in macb, cribbed slightly from the ate driver. This is taken from the MAC at boot, but can be overridden with 'options AT91_MACB_USE_RMII'. Switch to macb for HL201 and SAM9G20EK boards. It now works both places. Also start to sneak up on FDT for the SAM9G20EK board, but leave disabled due to issues with MMC that haven't been resolved. Add early debug support for the SAM9G20EK since that is required for FDT to work presently on these SoC. Modified: head/sys/arm/at91/if_macb.c head/sys/arm/at91/if_macbreg.h head/sys/arm/at91/if_macbvar.h head/sys/arm/conf/HL201 head/sys/arm/conf/SAM9G20EK head/sys/conf/options.arm Modified: head/sys/arm/at91/if_macb.c ============================================================================== --- head/sys/arm/at91/if_macb.c Sat Nov 7 19:54:40 2015 (r290508) +++ head/sys/arm/at91/if_macb.c Sat Nov 7 20:02:07 2015 (r290509) @@ -25,6 +25,7 @@ */ #include "opt_platform.h" +#include "opt_at91.h" #include __FBSDID("$FreeBSD$"); @@ -1359,8 +1360,14 @@ macb_attach(device_t dev) sc->clock = sc->clock << 10; +#ifdef AT91_MACB_USE_RMII + sc->use_rmii = USRIO_RMII; +#else + sc->use_rmii = read_4(sc, EMAC_USRIO) & USRIO_RMII; +#endif + write_4(sc, EMAC_NCFGR, sc->clock); - write_4(sc, EMAC_USRIO, USRIO_CLOCK); //enable clock + write_4(sc, EMAC_USRIO, USRIO_CLOCK | sc->use_rmii); //enable clock write_4(sc, EMAC_NCR, MPE_ENABLE); //enable MPE Modified: head/sys/arm/at91/if_macbreg.h ============================================================================== --- head/sys/arm/at91/if_macbreg.h Sat Nov 7 19:54:40 2015 (r290508) +++ head/sys/arm/at91/if_macbreg.h Sat Nov 7 20:02:07 2015 (r290509) @@ -99,7 +99,8 @@ #define CFG_DRFCS (1 << 17) -#define USRIO_CLOCK (1 << 1) +#define USRIO_RMII (1 << 0) /* RMII vs MII pins */ +#define USRIO_CLOCK (1 << 1) /* Enable the clock! */ Modified: head/sys/arm/at91/if_macbvar.h ============================================================================== --- head/sys/arm/at91/if_macbvar.h Sat Nov 7 19:54:40 2015 (r290508) +++ head/sys/arm/at91/if_macbvar.h Sat Nov 7 20:02:07 2015 (r290509) @@ -131,8 +131,8 @@ struct macb_softc struct macb_chain_data macb_cdata; int clock; -}; - + uint32_t use_rmii; /* 0 or USRIO_RMII */ +}; #endif Modified: head/sys/arm/conf/HL201 ============================================================================== --- head/sys/arm/conf/HL201 Sat Nov 7 19:54:40 2015 (r290508) +++ head/sys/arm/conf/HL201 Sat Nov 7 20:02:07 2015 (r290509) @@ -70,7 +70,7 @@ options DDB # Enable the kernel debug #options BOOTP_NFSROOT #options BOOTP_COMPAT #options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ate0 +#options BOOTP_WIRED_TO=macb0 options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" @@ -87,7 +87,7 @@ device bpf # Berkeley packet filter # Ethernet device mii # Minimal MII support -device ate # Atmel AT91 Ethernet driver +device macb # Atmel AT91 Ethernet driver device lxtphy # I2C Modified: head/sys/arm/conf/SAM9G20EK ============================================================================== --- head/sys/arm/conf/SAM9G20EK Sat Nov 7 19:54:40 2015 (r290508) +++ head/sys/arm/conf/SAM9G20EK Sat Nov 7 20:02:07 2015 (r290509) @@ -23,6 +23,14 @@ ident SAM9G20EK include "std.arm" include "../at91/std.sam9g20ek" +#options FDT +#options FDT_DTB_STATIC +#makeoptions FDT_DTS_FILE=at91sam9g20ek.dts + +options EARLY_PRINTF +options SOCDEV_PA=0xfc000000 +options SOCDEV_VA=0xdc000000 + #To statically compile in device wiring instead of /boot/device.hints hints "SAM9G20EK.hints" makeoptions MODULES_OVERRIDE="" @@ -92,8 +100,10 @@ device bpf # Berkeley packet filter # Ethernet device mii # Minimal MII support -device ate # Atmel AT91 Ethernet driver -options AT91_ATE_USE_RMII +#device ate # Atmel AT91 Ethernet driver +#options AT91_ATE_USE_RMII +device macb # Atmel AT91 Ethernet driver +options AT91_MACB_USE_RMII # I2C device at91_twi # Atmel AT91 Two-wire Interface Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Sat Nov 7 19:54:40 2015 (r290508) +++ head/sys/conf/options.arm Sat Nov 7 20:02:07 2015 (r290509) @@ -62,6 +62,7 @@ XSACLE_DISABLE_CCNT opt_timer.h VERBOSE_INIT_ARM opt_global.h VM_MAXUSER_ADDRESS opt_global.h AT91_ATE_USE_RMII opt_at91.h +AT91_MACB_USE_RMII opt_at91.h AT91_MCI_ALLOW_OVERCLOCK opt_at91.h AT91_MCI_HAS_4WIRE opt_at91.h AT91_MCI_SLOT_B opt_at91.h From owner-svn-src-head@freebsd.org Sat Nov 7 20:13:35 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 455DDA2866A; Sat, 7 Nov 2015 20:13:35 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::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 07E0A1DC7; Sat, 7 Nov 2015 20:13:35 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by iody8 with SMTP id y8so153108703iod.1; Sat, 07 Nov 2015 12:13:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=M4B3mkeVfuQpHd6Zg0c6yHQ4KxHxYckZzhCIbKkaX3U=; b=r90Lt8eKsGtH2pFnn8CrGvEo2x94Cuqyk41IfWlWUd0MrU8eDQLvCiPKdMbDcXTfu6 mslG7gqkwhC42DTLYMgMeF/qL2s72TfWUR3Zy9luapttvPkxQL8qPKtU4Re1MI3/7gIp +sONLTkn4SBjzE40PSSs8i9Cta1FTF3Mc8wNDLwyz+bZKDmE62LjCLjFUt6Fv+MfnAWI boMLbEfX+hqRyWfWQfpmGnkmkuO+ej59lAbRyHq3EVwN+UeMWCqXyQCv4l+tOqjVrNLJ 8sM9w50ItKHqR69TDcguxV5d4IRSnJXd43ErGveKKgoh/yNrd2OLECMjdZiv5cg1SZXw D6wg== X-Received: by 10.107.133.101 with SMTP id h98mr11945725iod.16.1446927214500; Sat, 07 Nov 2015 12:13:34 -0800 (PST) Received: from ?IPv6:2601:601:800:126d:1912:5f6f:1b43:3eed? ([2601:601:800:126d:1912:5f6f:1b43:3eed]) by smtp.gmail.com with ESMTPSA id 184sm2671610ioe.21.2015.11.07.12.13.33 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Nov 2015 12:13:33 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r290505 - in head/sys: kern sys From: NGie Cooper In-Reply-To: <20151108054659.D5096@besplex.bde.org> Date: Sat, 7 Nov 2015 12:13:32 -0800 Cc: "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201511071826.tA7IQWNR035920@repo.freebsd.org> <20151108054659.D5096@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 20:13:35 -0000 > On Nov 7, 2015, at 11:14, Bruce Evans wrote: >=20 > On Sat, 7 Nov 2015, Conrad E. Meyer wrote: >=20 >> Log: >> Flesh out sysctl types further (follow-up of r290475) >>=20 >> Use the right intmax_t type instead of intptr_t in a few remaining >> places. >>=20 >> Add support for CTLFLAG_TUN for the new fixed with types. Bruce will = be >> upset that the new handlers silently truncate tuned quad-sized = inputs, >> but so do all of the existing handlers. >=20 > I think I have complained about the getenv_*() integer functions = before. > All of them truncate or otherwise corrupt the value. getenv_quad() > does non-blind clamping using strtoq() followed by blind scaling in > the suffix case. All others use getenv_quad() with blind truncation, > except on 64-bit arches long =3D=3D quad so getenv_long() only has the = same > errors as getenv_quad(). Yes. I can=E2=80=99t find the exact thread (it was 3-5 years ago), but I = was involved and I proposed a patch which didn=E2=80=99t make it into = the tree. Thanks, -NGie= From owner-svn-src-head@freebsd.org Sat Nov 7 20:27:33 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A0F4A289C4; Sat, 7 Nov 2015 20:27:33 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D77961576; Sat, 7 Nov 2015 20:27:32 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7KRVXE070918; Sat, 7 Nov 2015 20:27:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7KRVMH070917; Sat, 7 Nov 2015 20:27:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511072027.tA7KRVMH070917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 20:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290510 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 20:27:33 -0000 Author: bapt Date: Sat Nov 7 20:27:31 2015 New Revision: 290510 URL: https://svnweb.freebsd.org/changeset/base/290510 Log: Make bsd declaration static Modified: head/usr.bin/localedef/localedef.c Modified: head/usr.bin/localedef/localedef.c ============================================================================== --- head/usr.bin/localedef/localedef.c Sat Nov 7 20:02:07 2015 (r290509) +++ head/usr.bin/localedef/localedef.c Sat Nov 7 20:27:31 2015 (r290510) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); #define TEXT_DOMAIN "SYS_TEST" #endif -int bsd = 0; +static int bsd = 0; int verbose = 0; int undefok = 0; int warnok = 0; From owner-svn-src-head@freebsd.org Sat Nov 7 20:29:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E4E6A28A3A; Sat, 7 Nov 2015 20:29:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C618F17F8; Sat, 7 Nov 2015 20:29:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7KTNnQ071018; Sat, 7 Nov 2015 20:29:23 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7KTNbu071016; Sat, 7 Nov 2015 20:29:23 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511072029.tA7KTNbu071016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 20:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290511 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 20:29:25 -0000 Author: bapt Date: Sat Nov 7 20:29:23 2015 New Revision: 290511 URL: https://svnweb.freebsd.org/changeset/base/290511 Log: Use const where needed instead of using pragmas to work around the warnings Modified: head/usr.bin/localedef/charmap.c head/usr.bin/localedef/localedef.h Modified: head/usr.bin/localedef/charmap.c ============================================================================== --- head/usr.bin/localedef/charmap.c Sat Nov 7 20:27:31 2015 (r290510) +++ head/usr.bin/localedef/charmap.c Sat Nov 7 20:29:23 2015 (r290511) @@ -68,11 +68,8 @@ RB_GENERATE_STATIC(cmap_wc, charmap, rb_ * Array of POSIX specific portable characters. */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" - static const struct { - char *name; + const char *name; int ch; } portable_chars[] = { { "NUL", '\0' }, @@ -189,8 +186,6 @@ static const struct { { NULL, 0 } }; -#pragma GCC diagnostic pop - static int cmap_compare_sym(const void *n1, const void *n2) { @@ -220,7 +215,7 @@ init_charmap(void) } static void -add_charmap_impl(char *sym, wchar_t wc, int nodups) +add_charmap_impl(const char *sym, wchar_t wc, int nodups) { charmap_t srch; charmap_t *n = NULL; @@ -260,7 +255,7 @@ add_charmap_impl(char *sym, wchar_t wc, } void -add_charmap(char *sym, int c) +add_charmap(const char *sym, int c) { add_charmap_impl(sym, c, 1); } @@ -322,7 +317,7 @@ add_charmap_range(char *s, char *e, int } void -add_charmap_char(char *name, int val) +add_charmap_char(const char *name, int val) { add_charmap_impl(name, val, 0); } Modified: head/usr.bin/localedef/localedef.h ============================================================================== --- head/usr.bin/localedef/localedef.h Sat Nov 7 20:27:31 2015 (r290510) +++ head/usr.bin/localedef/localedef.h Sat Nov 7 20:29:23 2015 (r290511) @@ -76,11 +76,11 @@ wchar_t *get_wcs(void); /* charmap.c - CHARMAP handling */ void init_charmap(void); -void add_charmap(char *, int); +void add_charmap(const char *, int); void add_charmap_undefined(char *); void add_charmap_posix(void); void add_charmap_range(char *, char *, int); -void add_charmap_char(char *name, int val); +void add_charmap_char(const char *name, int val); int lookup_charmap(const char *, wchar_t *); int check_charmap_undefined(char *); int check_charmap(wchar_t); From owner-svn-src-head@freebsd.org Sat Nov 7 20:31:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29545A28B16; Sat, 7 Nov 2015 20:31:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAB731A20; Sat, 7 Nov 2015 20:31:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7KVOBO071748; Sat, 7 Nov 2015 20:31:24 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7KVOYe071747; Sat, 7 Nov 2015 20:31:24 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511072031.tA7KVOYe071747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 20:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290512 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 20:31:25 -0000 Author: bapt Date: Sat Nov 7 20:31:23 2015 New Revision: 290512 URL: https://svnweb.freebsd.org/changeset/base/290512 Log: Bump warning level Modified: head/usr.bin/localedef/Makefile Modified: head/usr.bin/localedef/Makefile ============================================================================== --- head/usr.bin/localedef/Makefile Sat Nov 7 20:29:23 2015 (r290511) +++ head/usr.bin/localedef/Makefile Sat Nov 7 20:31:23 2015 (r290512) @@ -13,7 +13,7 @@ SRCS= charmap.c \ time.c \ wide.c -WARNS= 3 +WARNS= 5 ${SRCS:M*.c}: parser.h parser.h: parser.y From owner-svn-src-head@freebsd.org Sat Nov 7 20:36:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64DEFA28DD9; Sat, 7 Nov 2015 20:36:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 255C61E22; Sat, 7 Nov 2015 20:36:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7KasKL073941; Sat, 7 Nov 2015 20:36:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7KasoE073940; Sat, 7 Nov 2015 20:36:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511072036.tA7KasoE073940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 20:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290513 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 20:36:55 -0000 Author: bapt Date: Sat Nov 7 20:36:54 2015 New Revision: 290513 URL: https://svnweb.freebsd.org/changeset/base/290513 Log: Improve localedef(1) manpage Obtained from: DragonflyBSD Modified: head/usr.bin/localedef/localedef.1 Modified: head/usr.bin/localedef/localedef.1 ============================================================================== --- head/usr.bin/localedef/localedef.1 Sat Nov 7 20:31:23 2015 (r290512) +++ head/usr.bin/localedef/localedef.1 Sat Nov 7 20:36:54 2015 (r290513) @@ -30,6 +30,9 @@ .\" 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] +.\" +.\" $FreeBSD$ +.\" .Dd July 28, 2015 .Dt LOCALEDEF 1 .Os @@ -38,123 +41,139 @@ .Nd define locale environment .Sh SYNOPSIS .Nm -.Op Fl D -.Op Fl c -.Op Fl v -.Op Fl U +.Op Fl cDUv .Op Fl f Ar charmap -.Op Fl w Ar widthfile .Op Fl i Ar sourcefile .Op Fl u Ar codeset -localename +.Op Fl w Ar widthfile +.Ar localename .Sh DESCRIPTION The -.Nm localedef +.Nm utility converts source definitions for locale categories into a format usable by the functions and utilities whose operational behavior is determined by the setting of the locale environment variables; see -.Xr environ 5 . +.Xr environ 7 . .Pp The utility reads source definitions for one or more locale categories -belonging to the same locale from the file named in the \fB-i\fR option (if -specified) or from standard input. +belonging to the same locale from the file named in the +.Fl i +option (if specified) or from standard input. .Pp Each category source definition is identified by the corresponding environment variable name and terminated by an .Sy END .Em category-name -statement. The following categories are supported: -.Bl -tag -width LC_MONETARY -.It LC_CTYPE +statement. +The following categories are supported: +.Bl -tag -width ".Ev LC_MONETARY" +.It Ev LC_CTYPE Defines character classification and case conversion. -.It LC_COLLATE +.It Ev LC_COLLATE Defines collation rules. -.It LC_MONETARY +.It Ev LC_MONETARY Defines the format and symbols used in formatting of monetary information. -.It LC_NUMERIC +.It Ev LC_NUMERIC Defines the decimal delimiter, grouping and grouping symbol for non-monetary numeric editing. -.It LC_TIME +.It Ev LC_TIME Defines the format and content of date and time information. -.It LC_MESSAGES +.It Ev LC_MESSAGES Defines the format and values of affirmative and negative responses. .El .Pp The following options are supported: -.Bl -tag -width xx_sourcefile -.It -D -BSD-style output. Rather than the default of creating the -.Sy localename -directory and creating files like LC_CTYPE, LC_COLLATE, etc, in that directory, -the output files have the format "." and are -dumped to the current directory. -.It -c +.Bl -tag -width indent +.It Fl c Creates permanent output even if warning messages have been issued. -.It -v -Emit verbose debugging output on standard output. -.It -U +.It Fl D +.Dx Ns -style +output. +Rather than the default of creating the +.Ar localename +directory and creating files like +.Pa LC_CTYPE , +.Pa LC_COLLATE , +etc.\& in that directory, +the output file names have the format +.Dq . +and are dumped to the current directory. +.It Fl f Ar charmap +Specifies the pathname of a file containing a mapping of character symbols and +collating element symbols to actual character encodings. +This option must be specified if symbolic names (other than collating symbols +defined in a +.Sy collating-symbol +keyword) are used. +If the +.Fl f +option is not present, the default character mapping will be used. +.It Fl i Ar sourcefile +The path name of a file containing the source definitions. +If this option is not present, source definitions will be read from +standard input. +.It Fl u Ar codeset +Specifies the name of a codeset used as the target mapping of character symbols +and collating element symbols whose encoding values are defined in terms of the +ISO/IEC 10646-1:2000 standard position constant values. +See +.Sx NOTES . +.It Fl U Ignore the presence of character symbols that have no matching character definition. This facilitates the use of a common locale definition file to be used across multiple encodings, even when some symbols are not present in a given encoding. -.It -f charmap -Specifies the pathname of a file containing a mapping of character symbols and -collating element symbols to actual character encodings. This option must be -specified if symbolic names (other than collating symbols defined in a -.Sy collating-symbol -keyword) are used. If the -.Sy -f -option is not present, the default character mapping will be used. -.It -w widthfile +.It Fl v +Emit verbose debugging output on standard output. +.It Fl w Ar widthfile The path name of the file containing character screen width definitions. If not supplied, then default screen widths will be assumed, which will generally not account for East Asian encodings requiring more than a single character cell to display, nor for combining or accent marks that occupy no additional screen width. -.It -i sourcefile -The path name of a file containing the source definitions. If this option is -not present, source definitions will be read from standard input. -.It -u codeset -Specifies the name of a codeset used as the target mapping of character symbols -and collating element symbols whose encoding values are defined in terms of the -ISO/IEC 10646-1: 2000 standard position constant values. See NOTES. .El .Pp The following operands are required: -.Bl -tag -width localename -.It localename -Identifies the locale. If the name contains one or more slash characters, +.Bl -tag -width ".Ar localename" +.It Ar localename +Identifies the locale. +If the name contains one or more slash characters, .Ar localename will be interpreted as a path name where the created locale -definitions will be stored. This capability may be restricted to users with -appropriate privileges. (As a consequence of specifying one +definitions will be stored. +This capability may be restricted to users with appropriate privileges. +(As a consequence of specifying one .Ar localename , although several categories can be processed in one execution, only categories belonging to the same locale can be processed.) .El .Sh OUTPUT .Nm -creates a directory of files that represents the locale's data, unless instructed -otherwise by the -.Sy -D -(BSD output) option. The contants of this directory should generally be -copied into the appropriate subdirectory of /usr/share/locale in order the -definitions to be visible to programs linked with libc. +creates a directory of files that represents the locale's data, +unless instructed otherwise by the +.Fl D ( +.Dx +output) option. +The contants of this directory should generally be copied into the +appropriate subdirectory of +.Pa /usr/share/locale +in order the definitions to be visible to programs linked with libc. .Sh ENVIRONMENT See -.Xr Benviron 5 -for definitions of the following environment variables that affect the execution of +.Xr environ 7 +for definitions of the following environment variables that affect the +execution of .Nm : -.Sy LANG , -.Sy LC_ALL , -.Sy LC_COLLATE , -.Sy LC_CTYPE , -.Sy LC_MESSAGES , -.Sy LC_MONETARY , -.Sy LC_MUMERIC , -.Sy LC_TIME , +.Ev LANG , +.Ev LC_ALL , +.Ev LC_COLLATE , +.Ev LC_CTYPE , +.Ev LC_MESSAGES , +.Ev LC_MONETARY , +.Ev LC_MUMERIC , +.Ev LC_TIME , and -.Sy NLSPATH . +.Ev NLSPATH . .Sh EXIT STATUS The following exit values are returned: .Bl -tag -width XX @@ -176,48 +195,53 @@ If an error is detected, no permanent ou .Xr iconv_open 3 , .Xr nl_langinfo 3 , .Xr strftime 3 , -.Xr environ 5 +.Xr environ 7 .Sh WARNINGS If warnings occur, permanent output will be created if the -.Sy -c -option was specified. The following conditions will cause warning messages to be issued: -.Bl -tag -width X -.It * +.Fl c +option was specified. +The following conditions will cause warning messages to be issued: +.Bl -bullet +.It If a symbolic name not found in the -.Em charmap +.Pa charmap file is used for the descriptions of the .Sy LC_CTYPE or .Sy LC_COLLATE categories (for other categories, this will be an error condition). -.It * +.It If optional keywords not supported by the implementation are present in the source. .El .Sh NOTES When the -.Sy -u +.Fl u option is used, the -.Em codeset +.Ar codeset option-argument is interpreted as a name of a codeset to which the -ISO/IEC 10646-1: 2000 standard position constant values are converted. Both the -ISO/IEC 10646-1: 2000 standard position constant values and other formats (decimal, -hexadecimal, or octal) are valid as encoding values within the charmap file. The -codeset can be any codeset that is supported by the \fBiconv_open\fR(3C) function -on the system. +ISO/IEC 10646-1:2000 standard position constant values are converted. +Both the ISO/IEC 10646-1:2000 standard position constant values and +other formats (decimal, hexadecimal, or octal) are valid as encoding +values within the charmap file. +The +.Ar codeset +can be any codeset that is supported by the +.Fn iconv_open 3 +function. .Pp When conflicts occur between the charmap specification of -.Em codeset , +.Ar codeset , .Em mb_cur_max , or .Em mb_cur_min and the corresponding value for the codeset represented by the -.Sy -u +.Fl u option-argument -.Em codeset , +.Ar codeset , the .Nm -utility fails as an error. +utility fails with an error. .Pp When conflicts occur between the charmap encoding values specified for symbolic names of characters of the portable character set and the character encoding @@ -225,13 +249,13 @@ values defined by the US-ASCII, the resu .Sh HISTORY .Nm first appeared in -.Dx -4.4. It was ported from Illumos from the point +.Dx 4.3 . +It was ported from Illumos from the point .An Garrett D'Amore -.Aq garrett@nexenta.com +.Aq Mt garrett@nexenta.com added multibyte support (October 2010). .An John Marino -.Aq draco@marino.st +.Aq Mt draco@marino.st provided the alternations necessary to compile cleanly on .Dx as well as altered libc to use the new collation (the changes were also based From owner-svn-src-head@freebsd.org Sat Nov 7 20:41:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3D50A28EE4; Sat, 7 Nov 2015 20:41:00 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f169.google.com (mail-yk0-f169.google.com [209.85.160.169]) (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 5DF291FF8; Sat, 7 Nov 2015 20:40:59 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykek133 with SMTP id k133so217950998yke.2; Sat, 07 Nov 2015 12:40:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=o4hgo32yJGt9P//U7ARNLsKPceaTudeAFrjYhWpjKoU=; b=l+ckdL+25jW5aWjmWR2W0hDsnWvSkqupgtLPh4iKwmKz5Mn+MODNzoxKGhcx9khZZQ n4xI4qJIxCf4F5yG8hfJNbea6q1wV/0K5th11WnDw4F3We49/WvC1BxhmoRtUoy1yL/w C0GNjywd3X6UK98GalXzgjajwtr1i+8Uif3C1681doQswlRomLIP6qISek8tDueGgC4p Fb1ZB/8TmZZoLHiUyfmhGZLbcUZC5l87K667iq9PUWeIN/INi4mhhNr3APPyJIeBdBoG Gpg+YncoNTNYZKvp3KNBRGspkHOK7O/jZSSmH7iESlWrEBqwCcUFegdLTtXF2V7r49jd b7Bg== X-Received: by 10.129.92.68 with SMTP id q65mr18576395ywb.239.1446918653573; Sat, 07 Nov 2015 09:50:53 -0800 (PST) Received: from mail-yk0-f175.google.com (mail-yk0-f175.google.com. [209.85.160.175]) by smtp.gmail.com with ESMTPSA id t132sm4460059ywa.42.2015.11.07.09.50.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Nov 2015 09:50:53 -0800 (PST) Received: by ykdv3 with SMTP id v3so125893152ykd.0; Sat, 07 Nov 2015 09:50:52 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.129.2.193 with SMTP id 184mr15522122ywc.94.1446918652931; Sat, 07 Nov 2015 09:50:52 -0800 (PST) Reply-To: cem@FreeBSD.org Received: by 10.37.17.2 with HTTP; Sat, 7 Nov 2015 09:50:52 -0800 (PST) In-Reply-To: References: <201511070143.tA71h13k038232@repo.freebsd.org> Date: Sat, 7 Nov 2015 09:50:52 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r290475 - in head: share/man/man9 sys/kern sys/sys From: Conrad Meyer To: Svatopluk Kraus Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 20:41:00 -0000 Sorry about that =E2=80=94 Ravi and I missed this. I see Konstantin has si= nce fixed it (thanks!). There is also the intptr_t in SYSCTL_HANDLER_ARGS and oid_arg2 in struct sysctl_oid remaining. Best, Conrad On Sat, Nov 7, 2015 at 12:37 AM, Svatopluk Kraus wrote: > You broke buildkernel. The following patch helps: > > diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h > index 950e712..a34c890 100644 > --- a/sys/sys/sysctl.h > +++ b/sys/sys/sysctl.h > @@ -37,6 +37,7 @@ > #define _SYS_SYSCTL_H_ > > #include > +#include > > struct thread; > /* > @@ -949,7 +950,7 @@ extern char kern_ident[]; > /* Dynamic oid handling */ > struct sysctl_oid *sysctl_add_oid(struct sysctl_ctx_list *clist, > struct sysctl_oid_list *parent, int nbr, const char *name, int kind= , > - void *arg1, intptr_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), > + void *arg1, intmax_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), > const char *fmt, const char *descr); > int sysctl_remove_name(struct sysctl_oid *parent, const char *name, int = del, > int recurse); > > > > > On Sat, Nov 7, 2015 at 2:43 AM, Conrad E. Meyer wrote: >> Author: cem >> Date: Sat Nov 7 01:43:01 2015 >> New Revision: 290475 >> URL: https://svnweb.freebsd.org/changeset/base/290475 >> >> Log: >> Round out SYSCTL macros to the full set of fixed-width types >> >> Add S8, S16, S32, and U32 types; add SYSCTL*() macros for them, as we= ll >> as for the existing 64-bit types. (While SYSCTL*QUAD and UQUAD macros >> already exist, they do not take the same sort of 'val' parameter that >> the other macros do.) >> >> Clean up the documented "types" in the sysctl.9 document. (These are >> macros and thus not real types, but the manual page documents intent.) >> >> The sysctl_add_oid(9) arg2 has been bumped from intptr_t to intmax_t t= o >> accommodate 64-bit types on 32-bit pointer architectures. >> >> This is just the kernel support piece; the userspace sysctl(1) support >> will follow in a later patch. >> >> Submitted by: Ravi Pokala >> Reviewed by: cem >> Relnotes: no >> Sponsored by: Panasas >> Differential Revision: https://reviews.freebsd.org/D4091 >> >> Modified: >> head/share/man/man9/Makefile >> head/share/man/man9/sysctl.9 >> head/share/man/man9/sysctl_add_oid.9 >> head/sys/kern/kern_sysctl.c >> head/sys/sys/sysctl.h >> >> Modified: head/share/man/man9/Makefile >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/share/man/man9/Makefile Sat Nov 7 00:51:51 2015 = (r290474) >> +++ head/share/man/man9/Makefile Sat Nov 7 01:43:01 2015 = (r290475) >> @@ -1631,10 +1631,16 @@ MLINKS+=3Dsysctl.9 SYSCTL_DECL.9 \ >> sysctl.9 SYSCTL_ADD_PROC.9 \ >> sysctl.9 SYSCTL_ADD_QUAD.9 \ >> sysctl.9 SYSCTL_ADD_ROOT_NODE.9 \ >> + sysctl.9 SYSCTL_ADD_S8.9 \ >> + sysctl.9 SYSCTL_ADD_S16.9 \ >> + sysctl.9 SYSCTL_ADD_S32.9 \ >> + sysctl.9 SYSCTL_ADD_S64.9 \ >> sysctl.9 SYSCTL_ADD_STRING.9 \ >> sysctl.9 SYSCTL_ADD_STRUCT.9 \ >> sysctl.9 SYSCTL_ADD_U8.9 \ >> sysctl.9 SYSCTL_ADD_U16.9 \ >> + sysctl.9 SYSCTL_ADD_U32.9 \ >> + sysctl.9 SYSCTL_ADD_U64.9 \ >> sysctl.9 SYSCTL_ADD_UAUTO.9 \ >> sysctl.9 SYSCTL_ADD_UINT.9 \ >> sysctl.9 SYSCTL_ADD_ULONG.9 \ >> @@ -1650,10 +1656,16 @@ MLINKS+=3Dsysctl.9 SYSCTL_DECL.9 \ >> sysctl.9 SYSCTL_PROC.9 \ >> sysctl.9 SYSCTL_QUAD.9 \ >> sysctl.9 SYSCTL_ROOT_NODE.9 \ >> + sysctl.9 SYSCTL_S8.9 \ >> + sysctl.9 SYSCTL_S16.9 \ >> + sysctl.9 SYSCTL_S32.9 \ >> + sysctl.9 SYSCTL_S64.9 \ >> sysctl.9 SYSCTL_STRING.9 \ >> sysctl.9 SYSCTL_STRUCT.9 \ >> sysctl.9 SYSCTL_U8.9 \ >> sysctl.9 SYSCTL_U16.9 \ >> + sysctl.9 SYSCTL_U32.9 \ >> + sysctl.9 SYSCTL_U64.9 \ >> sysctl.9 SYSCTL_UINT.9 \ >> sysctl.9 SYSCTL_ULONG.9 \ >> sysctl.9 SYSCTL_UQUAD.9 >> >> Modified: head/share/man/man9/sysctl.9 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/share/man/man9/sysctl.9 Sat Nov 7 00:51:51 2015 = (r290474) >> +++ head/share/man/man9/sysctl.9 Sat Nov 7 01:43:01 2015 = (r290475) >> @@ -37,10 +37,16 @@ >> .Nm SYSCTL_ADD_PROC , >> .Nm SYSCTL_ADD_QUAD , >> .Nm SYSCTL_ADD_ROOT_NODE , >> +.Nm SYSCTL_ADD_S8 , >> +.Nm SYSCTL_ADD_S16 , >> +.Nm SYSCTL_ADD_S32 , >> +.Nm SYSCTL_ADD_S64 , >> .Nm SYSCTL_ADD_STRING , >> .Nm SYSCTL_ADD_STRUCT , >> .Nm SYSCTL_ADD_U8 , >> .Nm SYSCTL_ADD_U16 , >> +.Nm SYSCTL_ADD_U32 , >> +.Nm SYSCTL_ADD_U64 , >> .Nm SYSCTL_ADD_UAUTO , >> .Nm SYSCTL_ADD_UINT , >> .Nm SYSCTL_ADD_ULONG , >> @@ -56,10 +62,16 @@ >> .Nm SYSCTL_PROC , >> .Nm SYSCTL_QUAD , >> .Nm SYSCTL_ROOT_NODE , >> +.Nm SYSCTL_S8 , >> +.Nm SYSCTL_S16 , >> +.Nm SYSCTL_S32 , >> +.Nm SYSCTL_S64 , >> .Nm SYSCTL_STRING , >> .Nm SYSCTL_STRUCT , >> .Nm SYSCTL_U8 , >> .Nm SYSCTL_U16 , >> +.Nm SYSCTL_U32 , >> +.Nm SYSCTL_U64 , >> .Nm SYSCTL_UINT , >> .Nm SYSCTL_ULONG , >> .Nm SYSCTL_UQUAD >> @@ -76,7 +88,7 @@ >> .Fa "const char *name" >> .Fa "int ctlflags" >> .Fa "int *ptr" >> -.Fa "intptr_t val" >> +.Fa "int val" >> .Fa "const char *descr" >> .Fc >> .Ft struct sysctl_oid * >> @@ -131,7 +143,7 @@ >> .Fa "int number" >> .Fa "const char *name" >> .Fa "int ctlflags" >> -.Fa "quad_t *ptr" >> +.Fa "int64_t *ptr" >> .Fa "const char *descr" >> .Fc >> .Ft struct sysctl_oid * >> @@ -144,6 +156,50 @@ >> .Fa "const char *descr" >> .Fc >> .Ft struct sysctl_oid * >> +.Fo SYSCTL_ADD_S8 >> +.Fa "struct sysctl_ctx_list *ctx" >> +.Fa "struct sysctl_oid_list *parent" >> +.Fa "int number" >> +.Fa "const char *name" >> +.Fa "int ctlflags" >> +.Fa "int8_t *ptr" >> +.Fa "int8_t val" >> +.Fa "const char *descr" >> +.Fc >> +.Ft struct sysctl_oid * >> +.Fo SYSCTL_ADD_S16 >> +.Fa "struct sysctl_ctx_list *ctx" >> +.Fa "struct sysctl_oid_list *parent" >> +.Fa "int number" >> +.Fa "const char *name" >> +.Fa "int ctlflags" >> +.Fa "int16_t *ptr" >> +.Fa "int16_t val" >> +.Fa "const char *descr" >> +.Fc >> +.Ft struct sysctl_oid * >> +.Fo SYSCTL_ADD_S32 >> +.Fa "struct sysctl_ctx_list *ctx" >> +.Fa "struct sysctl_oid_list *parent" >> +.Fa "int number" >> +.Fa "const char *name" >> +.Fa "int ctlflags" >> +.Fa "int32_t *ptr" >> +.Fa "int32_t val" >> +.Fa "const char *descr" >> +.Fc >> +.Ft struct sysctl_oid * >> +.Fo SYSCTL_ADD_S64 >> +.Fa "struct sysctl_ctx_list *ctx" >> +.Fa "struct sysctl_oid_list *parent" >> +.Fa "int number" >> +.Fa "const char *name" >> +.Fa "int ctlflags" >> +.Fa "int64_t *ptr" >> +.Fa "int64_t val" >> +.Fa "const char *descr" >> +.Fc >> +.Ft struct sysctl_oid * >> .Fo SYSCTL_ADD_STRING >> .Fa "struct sysctl_ctx_list *ctx" >> .Fa "struct sysctl_oid_list *parent" >> @@ -172,8 +228,8 @@ >> .Fa "int number" >> .Fa "const char *name" >> .Fa "int ctlflags" >> -.Fa "unsigned int *ptr" >> -.Fa "intptr_t val" >> +.Fa "uint8_t *ptr" >> +.Fa "uint8_t val" >> .Fa "const char *descr" >> .Fc >> .Ft struct sysctl_oid * >> @@ -183,8 +239,30 @@ >> .Fa "int number" >> .Fa "const char *name" >> .Fa "int ctlflags" >> -.Fa "unsigned int *ptr" >> -.Fa "intptr_t val" >> +.Fa "uint16_t *ptr" >> +.Fa "uint16_t val" >> +.Fa "const char *descr" >> +.Fc >> +.Ft struct sysctl_oid * >> +.Fo SYSCTL_ADD_U32 >> +.Fa "struct sysctl_ctx_list *ctx" >> +.Fa "struct sysctl_oid_list *parent" >> +.Fa "int number" >> +.Fa "const char *name" >> +.Fa "int ctlflags" >> +.Fa "uint32_t *ptr" >> +.Fa "uint32_t val" >> +.Fa "const char *descr" >> +.Fc >> +.Ft struct sysctl_oid * >> +.Fo SYSCTL_ADD_U64 >> +.Fa "struct sysctl_ctx_list *ctx" >> +.Fa "struct sysctl_oid_list *parent" >> +.Fa "int number" >> +.Fa "const char *name" >> +.Fa "int ctlflags" >> +.Fa "uint64_t *ptr" >> +.Fa "uint64_t val" >> .Fa "const char *descr" >> .Fc >> .Ft struct sysctl_oid * >> @@ -195,7 +273,7 @@ >> .Fa "const char *name" >> .Fa "int ctlflags" >> .Fa "unsigned int *ptr" >> -.Fa "intptr_t val" >> +.Fa "unsigned int val" >> .Fa "const char *descr" >> .Fc >> .Ft struct sysctl_oid * >> @@ -215,7 +293,7 @@ >> .Fa "int number" >> .Fa "const char *name" >> .Fa "int ctlflags" >> -.Fa "u_quad_t *ptr" >> +.Fa "uint64_t *ptr" >> .Fa "const char *descr" >> .Fc >> .Ft struct sysctl_oid * >> @@ -251,11 +329,17 @@ >> .Fn SYSCTL_OPAQUE parent number name ctlflags ptr len format descr >> .Fn SYSCTL_PROC parent number name ctlflags arg1 arg2 handler format de= scr >> .Fn SYSCTL_QUAD parent number name ctlflags ptr val descr >> +.Fn SYSCTL_ROOT_NODE number name ctlflags handler descr >> +.Fn SYSCTL_S8 parent number name ctlflags ptr val descr >> +.Fn SYSCTL_S16 parent number name ctlflags ptr val descr >> +.Fn SYSCTL_S32 parent number name ctlflags ptr val descr >> +.Fn SYSCTL_S64 parent number name ctlflags ptr val descr >> .Fn SYSCTL_STRING parent number name ctlflags arg len descr >> .Fn SYSCTL_STRUCT parent number name ctlflags ptr struct_type descr >> -.Fn SYSCTL_ROOT_NODE number name ctlflags handler descr >> .Fn SYSCTL_U8 parent number name ctlflags ptr val descr >> .Fn SYSCTL_U16 parent number name ctlflags ptr val descr >> +.Fn SYSCTL_U32 parent number name ctlflags ptr val descr >> +.Fn SYSCTL_U64 parent number name ctlflags ptr val descr >> .Fn SYSCTL_UINT parent number name ctlflags ptr val descr >> .Fn SYSCTL_ULONG parent number name ctlflags ptr val descr >> .Fn SYSCTL_UQUAD parent number name ctlflags ptr val descr >> @@ -439,10 +523,16 @@ Static sysctls are declared using one of >> .Fn SYSCTL_PROC , >> .Fn SYSCTL_QUAD , >> .Fn SYSCTL_ROOT_NODE , >> +.Fn SYSCTL_S8 , >> +.Fn SYSCTL_S16 , >> +.Fn SYSCTL_S32 , >> +.Fn SYSCTL_S64 , >> .Fn SYSCTL_STRING , >> .Fn SYSCTL_STRUCT , >> .Fn SYSCTL_U8 , >> .Fn SYSCTL_U16 , >> +.Fn SYSCTL_U32 , >> +.Fn SYSCTL_U64 , >> .Fn SYSCTL_UINT , >> .Fn SYSCTL_ULONG >> or >> @@ -457,10 +547,16 @@ Dynamic nodes are created using one of t >> .Fn SYSCTL_ADD_PROC , >> .Fn SYSCTL_ADD_QUAD , >> .Fn SYSCTL_ADD_ROOT_NODE , >> +.Fn SYSCTL_ADD_S8 , >> +.Fn SYSCTL_ADD_S16 , >> +.Fn SYSCTL_ADD_S32 , >> +.Fn SYSCTL_ADD_S64 , >> .Fn SYSCTL_ADD_STRING , >> .Fn SYSCTL_ADD_STRUCT , >> .Fn SYSCTL_ADD_U8 , >> .Fn SYSCTL_ADD_U16 , >> +.Fn SYSCTL_ADD_U32 , >> +.Fn SYSCTL_ADD_U64 , >> .Fn SYSCTL_ADD_UAUTO , >> .Fn SYSCTL_ADD_UINT , >> .Fn SYSCTL_ADD_ULONG , >> @@ -484,6 +580,12 @@ This is a node intended to be a parent f >> This is a signed integer. >> .It Dv CTLTYPE_STRING >> This is a nul-terminated string stored in a character array. >> +.It Dv CTLTYPE_S8 >> +This is an 8-bit signed integer. >> +.It Dv CTLTYPE_S16 >> +This is a 16-bit signed integer. >> +.It Dv CTLTYPE_S32 >> +This is a 32-bit signed integer. >> .It Dv CTLTYPE_S64 >> This is a 64-bit signed integer. >> .It Dv CTLTYPE_OPAQUE >> @@ -495,14 +597,16 @@ Alias for >> This is an 8-bit unsigned integer. >> .It Dv CTLTYPE_U16 >> This is a 16-bit unsigned integer. >> +.It Dv CTLTYPE_U32 >> +This is a 32-bit unsigned integer. >> +.It Dv CTLTYPE_U64 >> +This is a 64-bit unsigned integer. >> .It Dv CTLTYPE_UINT >> This is an unsigned integer. >> .It Dv CTLTYPE_LONG >> This is a signed long. >> .It Dv CTLTYPE_ULONG >> This is an unsigned long. >> -.It Dv CTLTYPE_U64 >> -This is a 64-bit unsigned integer. >> .El >> .Pp >> All sysctl types except for new node declarations require one of the fo= llowing >> >> Modified: head/share/man/man9/sysctl_add_oid.9 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/share/man/man9/sysctl_add_oid.9 Sat Nov 7 00:51:51 2015= (r290474) >> +++ head/share/man/man9/sysctl_add_oid.9 Sat Nov 7 01:43:01 2015= (r290475) >> @@ -47,7 +47,7 @@ >> .Fa "const char *name" >> .Fa "int kind" >> .Fa "void *arg1" >> -.Fa "intptr_t arg2" >> +.Fa "intmax_t arg2" >> .Fa "int (*handler) (SYSCTL_HANDLER_ARGS)" >> .Fa "const char *format" >> .Fa "const char *descr" >> >> Modified: head/sys/kern/kern_sysctl.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/kern/kern_sysctl.c Sat Nov 7 00:51:51 2015 (r290474= ) >> +++ head/sys/kern/kern_sysctl.c Sat Nov 7 01:43:01 2015 (r290475= ) >> @@ -643,7 +643,7 @@ sysctl_remove_oid_locked(struct sysctl_o >> */ >> struct sysctl_oid * >> sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *p= arent, >> - int number, const char *name, int kind, void *arg1, intptr_t arg= 2, >> + int number, const char *name, int kind, void *arg1, intmax_t arg= 2, >> int (*handler)(SYSCTL_HANDLER_ARGS), const char *fmt, const char= *descr) >> { >> struct sysctl_oid *oidp; >> @@ -1192,6 +1192,38 @@ sysctl_handle_16(SYSCTL_HANDLER_ARGS) >> } >> >> /* >> + * Handle an int32_t, signed or unsigned. >> + * Two cases: >> + * a variable: point arg1 at it. >> + * a constant: pass it in arg2. >> + */ >> + >> +int >> +sysctl_handle_32(SYSCTL_HANDLER_ARGS) >> +{ >> + int32_t tmpout; >> + int error =3D 0; >> + >> + /* >> + * Attempt to get a coherent snapshot by making a copy of the da= ta. >> + */ >> + if (arg1) >> + tmpout =3D *(int32_t *)arg1; >> + else >> + tmpout =3D arg2; >> + error =3D SYSCTL_OUT(req, &tmpout, sizeof(tmpout)); >> + >> + if (error || !req->newptr) >> + return (error); >> + >> + if (!arg1) >> + error =3D EPERM; >> + else >> + error =3D SYSCTL_IN(req, arg1, sizeof(tmpout)); >> + return (error); >> +} >> + >> +/* >> * Handle an int, signed or unsigned. >> * Two cases: >> * a variable: point arg1 at it. >> >> Modified: head/sys/sys/sysctl.h >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/sys/sysctl.h Sat Nov 7 00:51:51 2015 (r290474= ) >> +++ head/sys/sys/sysctl.h Sat Nov 7 01:43:01 2015 (r290475= ) >> @@ -75,6 +75,10 @@ struct ctlname { >> #define CTLTYPE_U64 9 /* name describes an unsigned 64= -bit number */ >> #define CTLTYPE_U8 0xa /* name describes an unsigned 8-= bit number */ >> #define CTLTYPE_U16 0xb /* name describes an unsigned 16= -bit number */ >> +#define CTLTYPE_S8 0xc /* name describes a signed 8-bit= number */ >> +#define CTLTYPE_S16 0xd /* name describes a signed 16-bi= t number */ >> +#define CTLTYPE_S32 0xe /* name describes a signed 32-bi= t number */ >> +#define CTLTYPE_U32 0xf /* name describes an unsigned 32= -bit number */ >> >> #define CTLFLAG_RD 0x80000000 /* Allow reads of variab= le */ >> #define CTLFLAG_WR 0x40000000 /* Allow writes to the v= ariable */ >> @@ -192,10 +196,11 @@ struct sysctl_oid { >> >> int sysctl_handle_8(SYSCTL_HANDLER_ARGS); >> int sysctl_handle_16(SYSCTL_HANDLER_ARGS); >> +int sysctl_handle_32(SYSCTL_HANDLER_ARGS); >> +int sysctl_handle_64(SYSCTL_HANDLER_ARGS); >> int sysctl_handle_int(SYSCTL_HANDLER_ARGS); >> int sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS); >> int sysctl_handle_long(SYSCTL_HANDLER_ARGS); >> -int sysctl_handle_64(SYSCTL_HANDLER_ARGS); >> int sysctl_handle_string(SYSCTL_HANDLER_ARGS); >> int sysctl_handle_opaque(SYSCTL_HANDLER_ARGS); >> int sysctl_handle_counter_u64(SYSCTL_HANDLER_ARGS); >> @@ -323,6 +328,26 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e >> __arg, len, sysctl_handle_string, "A", __DESCR(descr)); = \ >> }) >> >> +/* Oid for a signed 8-bit int. If ptr is NULL, val is returned. */ >> +#define SYSCTL_NULL_S8_PTR ((unsigned *)NULL) >> +#define SYSCTL_S8(parent, nbr, name, access, ptr, val, descr) = \ >> + SYSCTL_OID(parent, nbr, name, \ >> + CTLTYPE_S8 | CTLFLAG_MPSAFE | (access), \ >> + ptr, val, sysctl_handle_8, "C", descr); \ >> + CTASSERT((((access) & CTLTYPE) =3D=3D 0 || \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_S8) && \ >> + sizeof(int8_t) =3D=3D sizeof(*(ptr))) >> + >> +#define SYSCTL_ADD_S8(ctx, parent, nbr, name, access, ptr, val, = descr) \ >> +({ = \ >> + int8_t *__ptr =3D (ptr); = \ >> + CTASSERT(((access) & CTLTYPE) =3D=3D 0 || = \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_S8); = \ >> + sysctl_add_oid(ctx, parent, nbr, name, = \ >> + CTLTYPE_S8 | CTLFLAG_MPSAFE | (access), = \ >> + __ptr, val, sysctl_handle_8, "C", __DESCR(descr)); \ >> +}) >> + >> /* Oid for an unsigned 8-bit int. If ptr is NULL, val is returned. */ >> #define SYSCTL_NULL_U8_PTR ((unsigned *)NULL) >> #define SYSCTL_U8(parent, nbr, name, access, ptr, val, descr) = \ >> @@ -343,6 +368,26 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e >> __ptr, val, sysctl_handle_8, "CU", __DESCR(descr)); \ >> }) >> >> +/* Oid for a signed 16-bit int. If ptr is NULL, val is returned. */ >> +#define SYSCTL_NULL_S16_PTR ((unsigned *)NULL) >> +#define SYSCTL_S16(parent, nbr, name, access, ptr, val, descr) = \ >> + SYSCTL_OID(parent, nbr, name, \ >> + CTLTYPE_S16 | CTLFLAG_MPSAFE | (access), \ >> + ptr, val, sysctl_handle_16, "S", descr); \ >> + CTASSERT((((access) & CTLTYPE) =3D=3D 0 || \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_S16) && \ >> + sizeof(int16_t) =3D=3D sizeof(*(ptr))) >> + >> +#define SYSCTL_ADD_S16(ctx, parent, nbr, name, access, ptr, val,= descr) \ >> +({ = \ >> + int16_t *__ptr =3D (ptr); = \ >> + CTASSERT(((access) & CTLTYPE) =3D=3D 0 || = \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_S16); = \ >> + sysctl_add_oid(ctx, parent, nbr, name, = \ >> + CTLTYPE_S16 | CTLFLAG_MPSAFE | (access), = \ >> + __ptr, val, sysctl_handle_16, "S", __DESCR(descr)); \ >> +}) >> + >> /* Oid for an unsigned 16-bit int. If ptr is NULL, val is returned. */ >> #define SYSCTL_NULL_U16_PTR ((unsigned *)NULL) >> #define SYSCTL_U16(parent, nbr, name, access, ptr, val, descr) = \ >> @@ -355,7 +400,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e >> >> #define SYSCTL_ADD_U16(ctx, parent, nbr, name, access, ptr, val,= descr) \ >> ({ = \ >> - uint16_t *__ptr =3D (ptr); = \ >> + uint16_t *__ptr =3D (ptr); = \ >> CTASSERT(((access) & CTLTYPE) =3D=3D 0 || = \ >> ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_U16); = \ >> sysctl_add_oid(ctx, parent, nbr, name, = \ >> @@ -363,6 +408,86 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e >> __ptr, val, sysctl_handle_16, "SU", __DESCR(descr)); = \ >> }) >> >> +/* Oid for a signed 32-bit int. If ptr is NULL, val is returned. */ >> +#define SYSCTL_NULL_S32_PTR ((unsigned *)NULL) >> +#define SYSCTL_S32(parent, nbr, name, access, ptr, val, descr) = \ >> + SYSCTL_OID(parent, nbr, name, \ >> + CTLTYPE_S32 | CTLFLAG_MPSAFE | (access), \ >> + ptr, val, sysctl_handle_32, "I", descr); \ >> + CTASSERT((((access) & CTLTYPE) =3D=3D 0 || \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_S32) && \ >> + sizeof(int32_t) =3D=3D sizeof(*(ptr))) >> + >> +#define SYSCTL_ADD_S32(ctx, parent, nbr, name, access, ptr, val,= descr) \ >> +({ = \ >> + int32_t *__ptr =3D (ptr); = \ >> + CTASSERT(((access) & CTLTYPE) =3D=3D 0 || = \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_S32); = \ >> + sysctl_add_oid(ctx, parent, nbr, name, = \ >> + CTLTYPE_S32 | CTLFLAG_MPSAFE | (access), = \ >> + __ptr, val, sysctl_handle_32, "I", __DESCR(descr)); \ >> +}) >> + >> +/* Oid for an unsigned 32-bit int. If ptr is NULL, val is returned. */ >> +#define SYSCTL_NULL_U32_PTR ((unsigned *)NULL) >> +#define SYSCTL_U32(parent, nbr, name, access, ptr, val, descr) = \ >> + SYSCTL_OID(parent, nbr, name, \ >> + CTLTYPE_U32 | CTLFLAG_MPSAFE | (access), \ >> + ptr, val, sysctl_handle_32, "IU", descr); \ >> + CTASSERT((((access) & CTLTYPE) =3D=3D 0 || \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_U32) && \ >> + sizeof(uint32_t) =3D=3D sizeof(*(ptr))) >> + >> +#define SYSCTL_ADD_U32(ctx, parent, nbr, name, access, ptr, val,= descr) \ >> +({ = \ >> + uint32_t *__ptr =3D (ptr); = \ >> + CTASSERT(((access) & CTLTYPE) =3D=3D 0 || = \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_U32); = \ >> + sysctl_add_oid(ctx, parent, nbr, name, = \ >> + CTLTYPE_U32 | CTLFLAG_MPSAFE | (access), = \ >> + __ptr, val, sysctl_handle_32, "IU", __DESCR(descr)); = \ >> +}) >> + >> +/* Oid for a signed 64-bit int. If ptr is NULL, val is returned. */ >> +#define SYSCTL_NULL_S64_PTR ((unsigned *)NULL) >> +#define SYSCTL_S64(parent, nbr, name, access, ptr, val, descr) = \ >> + SYSCTL_OID(parent, nbr, name, \ >> + CTLTYPE_S64 | CTLFLAG_MPSAFE | (access), \ >> + ptr, val, sysctl_handle_64, "Q", descr); \ >> + CTASSERT((((access) & CTLTYPE) =3D=3D 0 || \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_S64) && \ >> + sizeof(int64_t) =3D=3D sizeof(*(ptr))) >> + >> +#define SYSCTL_ADD_S64(ctx, parent, nbr, name, access, ptr, val,= descr) \ >> +({ = \ >> + int64_t *__ptr =3D (ptr); = \ >> + CTASSERT(((access) & CTLTYPE) =3D=3D 0 || = \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_S64); = \ >> + sysctl_add_oid(ctx, parent, nbr, name, = \ >> + CTLTYPE_S64 | CTLFLAG_MPSAFE | (access), = \ >> + __ptr, val, sysctl_handle_64, "Q", __DESCR(descr)); \ >> +}) >> + >> +/* Oid for an unsigned 64-bit int. If ptr is NULL, val is returned. */ >> +#define SYSCTL_NULL_U64_PTR ((unsigned *)NULL) >> +#define SYSCTL_U64(parent, nbr, name, access, ptr, val, descr) = \ >> + SYSCTL_OID(parent, nbr, name, \ >> + CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \ >> + ptr, val, sysctl_handle_64, "QU", descr); \ >> + CTASSERT((((access) & CTLTYPE) =3D=3D 0 || \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_U64) && \ >> + sizeof(uint64_t) =3D=3D sizeof(*(ptr))) >> + >> +#define SYSCTL_ADD_U64(ctx, parent, nbr, name, access, ptr, val,= descr) \ >> +({ = \ >> + uint64_t *__ptr =3D (ptr); = \ >> + CTASSERT(((access) & CTLTYPE) =3D=3D 0 || = \ >> + ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_U64); = \ >> + sysctl_add_oid(ctx, parent, nbr, name, = \ >> + CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), = \ >> + __ptr, val, sysctl_handle_64, "QU", __DESCR(descr)); = \ >> +}) >> + >> /* Oid for an int. If ptr is SYSCTL_NULL_INT_PTR, val is returned. */ >> #define SYSCTL_NULL_INT_PTR ((int *)NULL) >> #define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) = \ >> From owner-svn-src-head@freebsd.org Sat Nov 7 20:56:49 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2246DA2913D; Sat, 7 Nov 2015 20:56:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 073071773; Sat, 7 Nov 2015 20:56:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id F1DE8123E; Sat, 7 Nov 2015 20:56:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 8CBAF1216D; Sat, 7 Nov 2015 20:56:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id BcmktdJ6uZvd; Sat, 7 Nov 2015 20:56:41 +0000 (UTC) Subject: Re: svn commit: r290513 - head/usr.bin/localedef DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com E79C312165 To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511072036.tA7KasoE073940@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <563E6585.4070108@FreeBSD.org> Date: Sat, 7 Nov 2015 12:56:37 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201511072036.tA7KasoE073940@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 20:56:49 -0000 On 11/7/15 12:36 PM, Baptiste Daroussin wrote: > first appeared in > -.Dx It might be more relevant what *FreeBSD* version it appeared in rather than DragonFly here. > -4.4. It was ported from Illumos from the point > +.Dx 4.3 . > +It was ported from Illumos from the point This reads very strange and I'm not sure what it is trying to convey. > .An Garrett D'Amore > -.Aq garrett@nexenta.com > +.Aq Mt garrett@nexenta.com > added multibyte support (October 2010). -- Regards, Bryan Drewery From owner-svn-src-head@freebsd.org Sat Nov 7 21:07:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C26F1A29330; Sat, 7 Nov 2015 21:07:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 820A71E03; Sat, 7 Nov 2015 21:07:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7L7eu0082787; Sat, 7 Nov 2015 21:07:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7L7eab082786; Sat, 7 Nov 2015 21:07:40 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511072107.tA7L7eab082786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 21:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290514 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 21:07:41 -0000 Author: bapt Date: Sat Nov 7 21:07:40 2015 New Revision: 290514 URL: https://svnweb.freebsd.org/changeset/base/290514 Log: Rewrite the histoty part Fix information about "Dragonfly-style" format which on freebsd is named BSD-style Noted by: bdrewery Modified: head/usr.bin/localedef/localedef.1 Modified: head/usr.bin/localedef/localedef.1 ============================================================================== --- head/usr.bin/localedef/localedef.1 Sat Nov 7 20:36:54 2015 (r290513) +++ head/usr.bin/localedef/localedef.1 Sat Nov 7 21:07:40 2015 (r290514) @@ -87,7 +87,7 @@ The following options are supported: .It Fl c Creates permanent output even if warning messages have been issued. .It Fl D -.Dx Ns -style +BSD-style output. Rather than the default of creating the .Ar localename @@ -152,7 +152,7 @@ belonging to the same locale can be proc creates a directory of files that represents the locale's data, unless instructed otherwise by the .Fl D ( -.Dx +BSD output) option. The contants of this directory should generally be copied into the appropriate subdirectory of @@ -249,14 +249,19 @@ values defined by the US-ASCII, the resu .Sh HISTORY .Nm first appeared in -.Dx 4.3 . -It was ported from Illumos from the point +.Fx 11 . +.Pp +It was written by .An Garrett D'Amore .Aq Mt garrett@nexenta.com -added multibyte support (October 2010). +for Illumos. .An John Marino .Aq Mt draco@marino.st provided the alternations necessary to compile cleanly on -.Dx -as well as altered libc to use the new collation (the changes were also based -on Illumos, but modified to work with xlocale functionality.) +.Dx . +.An Baptiste Daroussin +.Aq Mt bapt@FreeBSD.org +ported it to +.Fx +and converted it to +.Xr tree 3 . From owner-svn-src-head@freebsd.org Sat Nov 7 21:52:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28115A299C4 for ; Sat, 7 Nov 2015 21:52:41 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::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 A7B411F9A for ; Sat, 7 Nov 2015 21:52:40 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by wicll6 with SMTP id ll6so46971159wic.1 for ; Sat, 07 Nov 2015 13:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd_org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=7NyVMMbZTQyI3TMvlJYuR1ML2x6mTuClL1nw7aEKxYk=; b=Hm+F5NTzhm2BzmrnqsXgA7mVlKLt26YLUnZDCJ3IsPJU1IbkkdearDceS0iWV2r7Ru dPM3m9i8rTVemBRrQcWhSkXnBe+aw4QEn97HwVkTWhKr6iMQnAWNNKGMTqoZbtiWgTAL swKxWqE/hNVQtfAoj39b4QAgcGA1v6vh+RAUbv7jfVRqufC3xscqlMNk5WghpV4fySPB MJ9jWjYc+mJ6B3hFvuQgxlM0wprJMfivludluiTDpyT11mDPsNH+rfL87dil0rFWZCuu puTycE2dWJ0zXSEAHZUUro1SECypbBy+zLRFLNIwHoI07cxgPdG7CUd+xqTY1EsNYxl0 pJIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=7NyVMMbZTQyI3TMvlJYuR1ML2x6mTuClL1nw7aEKxYk=; b=IVzu8ujDL9dO3MRZYSve4ksfiVZWXJ6L2+iK7+3u05Lr24gvfhJgqbktSQy5xMxmdA DXyGRA5EQakdatqSstqclopIohNGF0Mu+KkdRmaWp/DvODRm+3Wu3de/7hilfp4j9UwM O586QClBjuNq2L9jahYJTql4hWQGdQLYdLEB46NPvRwXjrejBTXkcYZuOrSkck7fE+xf qLlaf46nr1c+EDT1AblnOrVYC2PpysbOshZtocaT21AoPVdj40YtrWsiJaRV4aE7M6jx 9PI+OnBb+mlK4YalgEugoY98VPeFmiMBrMwXd+1fYS9/bNvhtae7KB71nvE93m+C3k2Z 8R4w== X-Gm-Message-State: ALoCoQlv4nFjZH4JhvaX//V5gLLzLM1XLOO329CmXD/r+8vhAfSqjFPG6pTYq0J5JGwsYVOmf2Cq MIME-Version: 1.0 X-Received: by 10.194.116.100 with SMTP id jv4mr21013233wjb.67.1446933158596; Sat, 07 Nov 2015 13:52:38 -0800 (PST) Received: by 10.194.158.225 with HTTP; Sat, 7 Nov 2015 13:52:38 -0800 (PST) In-Reply-To: <56379731.7010702@FreeBSD.org> References: <201510231539.t9NFdxPe018130@repo.freebsd.org> <562A564D.9080703@citrix.com> <562E1F8F.3010304@FreeBSD.org> <5632447B.1020402@FreeBSD.org> <56376567.9090100@FreeBSD.org> <56379731.7010702@FreeBSD.org> Date: Sat, 7 Nov 2015 22:52:38 +0100 Message-ID: Subject: Re: svn commit: r289834 - head/sys/x86/x86 From: Oliver Pinter To: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Cc: Adrian Chadd , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 21:52:41 -0000 On Mon, Nov 2, 2015 at 6:02 PM, Roger Pau Monn=C3=A9 w= rote: > El 02/11/15 a les 17.41, Oliver Pinter ha escrit: >> Okay, the server survived a full buildworld + installer generation >> with the new patch. > > Thanks for the heads up! I will wait a couple more days and then commit i= t. 4:51PM up 4 days, 20:43, 2 users, load averages: 0.05, 0.07, 0.07 FreeBSD nyi-01.build.hardenedbsd.org 11.0-CURRENT-HBSD FreeBSD 11.0-CURRENT-HBSD #14 8f6110b(jenkins-world-kernel-20151102): Mon Nov 2 09:42:26 EST 2015 root@nyi-01.build.hardenedbsd.org:/usr/obj/usr/src/sys/JENKINS amd64 > > Roger. From owner-svn-src-head@freebsd.org Sat Nov 7 22:06:50 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE2ABA29C07; Sat, 7 Nov 2015 22:06:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B675D1584; Sat, 7 Nov 2015 22:06:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7M6nnh000153; Sat, 7 Nov 2015 22:06:49 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7M6nI1000152; Sat, 7 Nov 2015 22:06:49 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201511072206.tA7M6nI1000152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 7 Nov 2015 22:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290515 - head/etc/defaults X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 22:06:51 -0000 Author: jilles Date: Sat Nov 7 22:06:49 2015 New Revision: 290515 URL: https://svnweb.freebsd.org/changeset/base/290515 Log: periodic: Fix backwards compatibility for daily_status_security_* vars. Most daily_status_security_* variables in periodic.conf were changed to security_status_* in SVN r254974. The compatibility code for the old names did not work. PR: 204331 Submitted by: martin at lispworks.com MFC after: 1 week Modified: head/etc/defaults/periodic.conf Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Sat Nov 7 21:07:40 2015 (r290514) +++ head/etc/defaults/periodic.conf Sat Nov 7 22:06:49 2015 (r290515) @@ -311,8 +311,8 @@ if [ -z "${source_periodic_confs_defined "use \$$var instead." >&2 case "$value" in [Yy][Ee][Ss]) - $var=YES - $periodvar=daily + eval $var=YES + eval $periodvar=daily ;; *) eval $var=\"$value\" From owner-svn-src-head@freebsd.org Sat Nov 7 22:52:07 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2E9AA21608; Sat, 7 Nov 2015 22:52:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FEDA1B9C; Sat, 7 Nov 2015 22:52:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7Mq6xE011888; Sat, 7 Nov 2015 22:52:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7Mq6Pi011886; Sat, 7 Nov 2015 22:52:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201511072252.tA7Mq6Pi011886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 7 Nov 2015 22:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290516 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 22:52:08 -0000 Author: imp Date: Sat Nov 7 22:52:06 2015 New Revision: 290516 URL: https://svnweb.freebsd.org/changeset/base/290516 Log: Implement the phy-mode property for ate and macb. If it is set to "rmii", use rmii mode for the MAC, otherwise use MII mode. The code is somewhat duplicated between these drivers for this. Also, add AT91RM9200 compatibility strings to the ate driver. In the future, there's a good chance that ate will lose the MACB support and only attach to the AT91RM9200 EMAC device since the macb works now that RMII support has been added to it. Modified: head/sys/arm/at91/if_ate.c head/sys/arm/at91/if_macb.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Sat Nov 7 22:06:49 2015 (r290515) +++ head/sys/arm/at91/if_ate.c Sat Nov 7 22:52:06 2015 (r290516) @@ -228,23 +228,82 @@ static void ate_rxfilter(struct ate_soft static int ate_miibus_readreg(device_t dev, int phy, int reg); static int ate_miibus_writereg(device_t dev, int phy, int reg, int data); + /* * The AT91 family of products has the ethernet interface called EMAC. * However, it isn't self identifying. It is anticipated that the parent bus * code will take care to only add ate devices where they really are. As * such, we do nothing here to identify the device and just set its name. + * However, FDT makes it self-identifying. */ static int ate_probe(device_t dev) { #ifdef FDT - if (!ofw_bus_is_compatible(dev, "cdns,at32ap7000-macb")) + if (!ofw_bus_is_compatible(dev, "cdns,at91rm9200-emac") && + !ofw_bus_is_compatible(dev, "cdns,emac") && + !ofw_bus_is_compatible(dev, "cdns,at32ap7000-macb")) return (ENXIO); #endif device_set_desc(dev, "EMAC"); return (0); } +#ifdef FDT +/* + * We have to know if we're using MII or RMII attachment + * for the MACB to talk to the PHY correctly. With FDT, + * we must use rmii if there's a proprety phy-mode + * equal to "rmii". Otherwise we MII mode is used. + */ +static void +ate_set_rmii(struct ate_softc *sc) +{ + phandle_t node; + char prop[10]; + ssize_t len; + + node = ofw_bus_get_node(sc->dev); + memset(prop, 0 ,sizeof(prop)); + len = OF_getproplen(node, "phy-mode"); + if (len != 4) + return; + if (OF_getprop(node, "phy-mode", prop, len) != len) + return; + if (strncmp(prop, "rmii", 4) == 0) + sc->use_rmii = 1; +} + +#else +/* + * We have to know if we're using MII or RMII attachment + * for the MACB to talk to the PHY correctly. Without FDT, + * there's no good way to do this. So, if the config file + * has 'option AT91_ATE_USE_RMII', then we'll force RMII. + * Otherwise, we'll use what the bootloader setup. Either + * it setup RMII or MII, in which case we'll get it right, + * or it did nothing, and we'll fall back to MII and the + * option would override if present. + */ +static void +ata_set_rmii(struct ate_softc *sc) +{ + + /* Default to what boot rom did */ + if (!sc->is_emacb) + sc->use_rmii = + (RD4(sc, ETH_CFG) & ETH_CFG_RMII) == ETH_CFG_RMII; + else + sc->use_rmii = + (RD4(sc, ETHB_UIO) & ETHB_UIO_RMII) == ETHB_UIO_RMII; + +#ifdef AT91_ATE_USE_RMII + /* Compile time override */ + sc->use_rmii = 1; +#endif +} +#endif + static int ate_attach(device_t dev) { @@ -278,25 +337,19 @@ ate_attach(device_t dev) } /* New or old version, chooses buffer size. */ +#ifdef FDT + sc->is_emacb = ofw_bus_is_compatible(dev, "cdns,at32ap7000-macb"); +#else sc->is_emacb = at91_is_sam9() || at91_is_sam9xe(); +#endif sc->rx_buf_size = RX_BUF_SIZE(sc); err = ate_activate(dev); if (err) goto out; - /* Default to what boot rom did */ - if (!sc->is_emacb) - sc->use_rmii = - (RD4(sc, ETH_CFG) & ETH_CFG_RMII) == ETH_CFG_RMII; - else - sc->use_rmii = - (RD4(sc, ETHB_UIO) & ETHB_UIO_RMII) == ETHB_UIO_RMII; + ate_set_rmii(sc); -#ifdef AT91_ATE_USE_RMII - /* Compile time override */ - sc->use_rmii = 1; -#endif /* Sysctls */ sctx = device_get_sysctl_ctx(dev); soid = device_get_sysctl_tree(dev); Modified: head/sys/arm/at91/if_macb.c ============================================================================== --- head/sys/arm/at91/if_macb.c Sat Nov 7 22:06:49 2015 (r290515) +++ head/sys/arm/at91/if_macb.c Sat Nov 7 22:52:06 2015 (r290516) @@ -1294,6 +1294,52 @@ macb_get_mac(struct macb_softc *sc, u_ch } +#ifdef FDT +/* + * We have to know if we're using MII or RMII attachment + * for the MACB to talk to the PHY correctly. With FDT, + * we must use rmii if there's a proprety phy-mode + * equal to "rmii". Otherwise we MII mode is used. + */ +static void +macb_set_rmii(struct macb_softc *sc) +{ + phandle_t node; + char prop[10]; + ssize_t len; + + node = ofw_bus_get_node(sc->dev); + memset(prop, 0 ,sizeof(prop)); + len = OF_getproplen(node, "phy-mode"); + if (len != 4) + return; + if (OF_getprop(node, "phy-mode", prop, len) != len) + return; + if (strncmp(prop, "rmii", 4) == 0) + sc->use_rmii = USRIO_RMII; +} +#else +/* + * We have to know if we're using MII or RMII attachment + * for the MACB to talk to the PHY correctly. Without FDT, + * there's no good way to do this. So, if the config file + * has 'option AT91_MACB_USE_RMII', then we'll force RMII. + * Otherwise, we'll use what the bootloader setup. Either + * it setup RMII or MII, in which case we'll get it right, + * or it did nothing, and we'll fall back to MII and the + * option would override if present. + */ +static void +macb_set_rmii(struct macb_softc *sc) +{ +#ifdef AT91_MACB_USE_RMII + sc->use_rmii = USRIO_RMII; +#else + sc->use_rmii = read_4(sc, EMAC_USRIO) & USRIO_RMII; +#endif +} +#endif + static int macb_attach(device_t dev) { @@ -1360,12 +1406,7 @@ macb_attach(device_t dev) sc->clock = sc->clock << 10; -#ifdef AT91_MACB_USE_RMII - sc->use_rmii = USRIO_RMII; -#else - sc->use_rmii = read_4(sc, EMAC_USRIO) & USRIO_RMII; -#endif - + macb_set_rmii(sc); write_4(sc, EMAC_NCFGR, sc->clock); write_4(sc, EMAC_USRIO, USRIO_CLOCK | sc->use_rmii); //enable clock From owner-svn-src-head@freebsd.org Sat Nov 7 22:57:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07E61A21686; Sat, 7 Nov 2015 22:57:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A47881D60; Sat, 7 Nov 2015 22:57:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7Mv0O9014684; Sat, 7 Nov 2015 22:57:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7Mv0uL014680; Sat, 7 Nov 2015 22:57:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511072257.tA7Mv0uL014680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 22:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290517 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 22:57:02 -0000 Author: bapt Date: Sat Nov 7 22:57:00 2015 New Revision: 290517 URL: https://svnweb.freebsd.org/changeset/base/290517 Log: Fix build of localedef(1) on arm where wchar_t is an unsigned int Modified: head/usr.bin/localedef/charmap.c head/usr.bin/localedef/ctype.c head/usr.bin/localedef/localedef.h Modified: head/usr.bin/localedef/charmap.c ============================================================================== --- head/usr.bin/localedef/charmap.c Sat Nov 7 22:52:06 2015 (r290516) +++ head/usr.bin/localedef/charmap.c Sat Nov 7 22:57:00 2015 (r290517) @@ -227,7 +227,7 @@ add_charmap_impl(const char *sym, wchar_ * also possibly insert the wide mapping, although note that there * can only be one of these per wide character code. */ - if ((wc != -1) && ((RB_FIND(cmap_wc, &cmap_wc, &srch)) == NULL)) { + if ((wc != (wchar_t)-1) && ((RB_FIND(cmap_wc, &cmap_wc, &srch)) == NULL)) { if ((n = calloc(1, sizeof (*n))) == NULL) { errf("out of memory"); return; @@ -269,7 +269,7 @@ add_charmap_undefined(char *sym) srch.name = sym; cm = RB_FIND(cmap_sym, &cmap_sym, &srch); - if ((undefok == 0) && ((cm == NULL) || (cm->wc == -1))) { + if ((undefok == 0) && ((cm == NULL) || (cm->wc == (wchar_t)-1))) { warn("undefined symbol <%s>", sym); add_charmap_impl(sym, -1, 0); } else { @@ -344,7 +344,7 @@ lookup_charmap(const char *sym, wchar_t srch.name = sym; n = RB_FIND(cmap_sym, &cmap_sym, &srch); - if (n && n->wc != -1) { + if (n && n->wc != (wchar_t)-1) { if (wc) *wc = n->wc; return (0); Modified: head/usr.bin/localedef/ctype.c ============================================================================== --- head/usr.bin/localedef/ctype.c Sat Nov 7 22:52:06 2015 (r290516) +++ head/usr.bin/localedef/ctype.c Sat Nov 7 22:57:00 2015 (r290517) @@ -199,7 +199,7 @@ add_ctype(int val) } void -add_ctype_range(int end) +add_ctype_range(wchar_t end) { ctype_node_t *ctn; wchar_t cur; Modified: head/usr.bin/localedef/localedef.h ============================================================================== --- head/usr.bin/localedef/localedef.h Sat Nov 7 22:52:06 2015 (r290516) +++ head/usr.bin/localedef/localedef.h Sat Nov 7 22:57:00 2015 (r290517) @@ -124,7 +124,7 @@ wchar_t * wsncpy(wchar_t *, const wchar_ /* ctype.c - LC_CTYPE handling */ void init_ctype(void); void add_ctype(int); -void add_ctype_range(int); +void add_ctype_range(wchar_t); void add_width(int, int); void add_width_range(int, int, int); void add_caseconv(int, int); From owner-svn-src-head@freebsd.org Sat Nov 7 22:58:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20822A21713; Sat, 7 Nov 2015 22:58:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0CD81F10; Sat, 7 Nov 2015 22:58:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7MwuIK014786; Sat, 7 Nov 2015 22:58:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7MwuKn014785; Sat, 7 Nov 2015 22:58:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201511072258.tA7MwuKn014785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 7 Nov 2015 22:58:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290518 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 22:58:58 -0000 Author: imp Date: Sat Nov 7 22:58:56 2015 New Revision: 290518 URL: https://svnweb.freebsd.org/changeset/base/290518 Log: Correct !FDT case with proper name. Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Sat Nov 7 22:57:00 2015 (r290517) +++ head/sys/arm/at91/if_ate.c Sat Nov 7 22:58:56 2015 (r290518) @@ -286,7 +286,7 @@ ate_set_rmii(struct ate_softc *sc) * option would override if present. */ static void -ata_set_rmii(struct ate_softc *sc) +ate_set_rmii(struct ate_softc *sc) { /* Default to what boot rom did */ From owner-svn-src-head@freebsd.org Sat Nov 7 23:05:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 260CCA21969; Sat, 7 Nov 2015 23:05:25 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB11F14A4; Sat, 7 Nov 2015 23:05:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7N5NLP017644; Sat, 7 Nov 2015 23:05:23 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7N5NNj017643; Sat, 7 Nov 2015 23:05:23 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201511072305.tA7N5NNj017643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 7 Nov 2015 23:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290519 - head/sys/dev/hptmv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 23:05:25 -0000 Author: cem Date: Sat Nov 7 23:05:23 2015 New Revision: 290519 URL: https://svnweb.freebsd.org/changeset/base/290519 Log: hptmv(4): Fix broken sysctl(9) API assumptions Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/hptmv/hptproc.c Modified: head/sys/dev/hptmv/hptproc.c ============================================================================== --- head/sys/dev/hptmv/hptproc.c Sat Nov 7 22:58:56 2015 (r290518) +++ head/sys/dev/hptmv/hptproc.c Sat Nov 7 23:05:23 2015 (r290519) @@ -51,9 +51,6 @@ int hpt_rescan_all(void); static char hptproc_buffer[256]; extern char DRIVER_VERSION[]; -#define FORMAL_HANDLER_ARGS struct sysctl_oid *oidp, void *arg1, \ - intptr_t arg2, struct sysctl_req *req -#define REAL_HANDLER_ARGS oidp, arg1, arg2, req typedef struct sysctl_req HPT_GET_INFO; static int @@ -572,7 +569,7 @@ hpt_get_info(IAL_ADAPTER_T *pAdapter, HP } static __inline int -hpt_proc_in(FORMAL_HANDLER_ARGS, int *len) +hpt_proc_in(SYSCTL_HANDLER_ARGS, int *len) { int i, error=0; @@ -590,12 +587,12 @@ hpt_proc_in(FORMAL_HANDLER_ARGS, int *le } static int -hpt_status(FORMAL_HANDLER_ARGS) +hpt_status(SYSCTL_HANDLER_ARGS) { int length, error=0, retval=0; IAL_ADAPTER_T *pAdapter; - error = hpt_proc_in(REAL_HANDLER_ARGS, &length); + error = hpt_proc_in(oidp, arg1, arg2, req, &length); if (req->newptr != NULL) { From owner-svn-src-head@freebsd.org Sat Nov 7 23:27:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FBE2A21D78; Sat, 7 Nov 2015 23:27:04 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4419A1F3A; Sat, 7 Nov 2015 23:27:04 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7NR32s023359; Sat, 7 Nov 2015 23:27:03 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7NR3m1023358; Sat, 7 Nov 2015 23:27:03 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201511072327.tA7NR3m1023358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 7 Nov 2015 23:27:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290520 - head/sbin/savecore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 23:27:04 -0000 Author: cem Date: Sat Nov 7 23:27:03 2015 New Revision: 290520 URL: https://svnweb.freebsd.org/changeset/base/290520 Log: savecore(8): Be quiet unless the user asks for verbose Make savecore(8) more suitable for init-time scripts; be quiet by default. Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3229 Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Sat Nov 7 23:05:23 2015 (r290519) +++ head/sbin/savecore/savecore.c Sat Nov 7 23:27:03 2015 (r290520) @@ -836,15 +836,18 @@ main(int argc, char **argv) /* Emit minimal output. */ if (nfound == 0) { if (checkfor) { - printf("No dump exists\n"); + if (verbose) + printf("No dump exists\n"); exit(1); } - syslog(LOG_WARNING, "no dumps found"); - } - else if (nsaved == 0) { - if (nerr != 0) - syslog(LOG_WARNING, "unsaved dumps found but not saved"); - else + if (verbose) + syslog(LOG_WARNING, "no dumps found"); + } else if (nsaved == 0) { + if (nerr != 0) { + if (verbose) + syslog(LOG_WARNING, "unsaved dumps found but not saved"); + exit(1); + } else if (verbose) syslog(LOG_WARNING, "no unsaved dumps found"); } From owner-svn-src-head@freebsd.org Sat Nov 7 23:51:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE56EA2810E; Sat, 7 Nov 2015 23:51:43 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 991EC19B4; Sat, 7 Nov 2015 23:51:43 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7Npgqk031938; Sat, 7 Nov 2015 23:51:42 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7NpgG0031937; Sat, 7 Nov 2015 23:51:42 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201511072351.tA7NpgG0031937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 7 Nov 2015 23:51:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290521 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 23:51:43 -0000 Author: kp Date: Sat Nov 7 23:51:42 2015 New Revision: 290521 URL: https://svnweb.freebsd.org/changeset/base/290521 Log: pf: Fix broken rule skip calculation r289932 accidentally broke the rule skip calculation. The address family argument to PF_ANEQ() is now important, and because it was set to 0 the macro always evaluated to false. This resulted in incorrect skip values, which in turn broke the rule evaluations. Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sat Nov 7 23:27:03 2015 (r290520) +++ head/sys/netpfil/pf/pf.c Sat Nov 7 23:51:42 2015 (r290521) @@ -1973,9 +1973,9 @@ pf_addr_wrap_neq(struct pf_addr_wrap *aw switch (aw1->type) { case PF_ADDR_ADDRMASK: case PF_ADDR_RANGE: - if (PF_ANEQ(&aw1->v.a.addr, &aw2->v.a.addr, 0)) + if (PF_ANEQ(&aw1->v.a.addr, &aw2->v.a.addr, AF_INET6)) return (1); - if (PF_ANEQ(&aw1->v.a.mask, &aw2->v.a.mask, 0)) + if (PF_ANEQ(&aw1->v.a.mask, &aw2->v.a.mask, AF_INET6)) return (1); return (0); case PF_ADDR_DYNIFTL: From owner-svn-src-head@freebsd.org Sat Nov 7 23:54:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81811A28276; Sat, 7 Nov 2015 23:54:16 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41EC41BE3; Sat, 7 Nov 2015 23:54:16 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA7NsFwT032078; Sat, 7 Nov 2015 23:54:15 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA7NsEPs032069; Sat, 7 Nov 2015 23:54:14 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511072354.tA7NsEPs032069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Sat, 7 Nov 2015 23:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290522 - head/share/timedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 23:54:16 -0000 Author: ume Date: Sat Nov 7 23:54:14 2015 New Revision: 290522 URL: https://svnweb.freebsd.org/changeset/base/290522 Log: Fix alignment of the short month names for CJK locales, as far as I could edit them. Modified: head/share/timedef/ja_JP.SJIS.src head/share/timedef/ja_JP.UTF-8.src head/share/timedef/ja_JP.eucJP.src head/share/timedef/ko_KR.UTF-8.src head/share/timedef/ko_KR.eucKR.src head/share/timedef/zh_Hans_CN.GBK.src head/share/timedef/zh_Hans_CN.UTF-8.src head/share/timedef/zh_Hant_HK.Big5HKSCS.src head/share/timedef/zh_Hant_HK.UTF-8.src head/share/timedef/zh_Hant_TW.UTF-8.src Modified: head/share/timedef/ja_JP.SJIS.src ============================================================================== --- head/share/timedef/ja_JP.SJIS.src Sat Nov 7 23:51:42 2015 (r290521) +++ head/share/timedef/ja_JP.SJIS.src Sat Nov 7 23:54:14 2015 (r290522) @@ -4,15 +4,15 @@ # ----------------------------------------------------------------------------- # # Short month names -1月 -2月 -3月 -4月 -5月 -6月 -7月 -8月 -9月 + 1月 + 2月 + 3月 + 4月 + 5月 + 6月 + 7月 + 8月 + 9月 10月 11月 12月 Modified: head/share/timedef/ja_JP.UTF-8.src ============================================================================== --- head/share/timedef/ja_JP.UTF-8.src Sat Nov 7 23:51:42 2015 (r290521) +++ head/share/timedef/ja_JP.UTF-8.src Sat Nov 7 23:54:14 2015 (r290522) @@ -4,15 +4,15 @@ # ----------------------------------------------------------------------------- # # Short month names -1譛 -2譛 -3譛 -4譛 -5譛 -6譛 -7譛 -8譛 -9譛 + 1譛 + 2譛 + 3譛 + 4譛 + 5譛 + 6譛 + 7譛 + 8譛 + 9譛 10譛 11譛 12譛 Modified: head/share/timedef/ja_JP.eucJP.src ============================================================================== --- head/share/timedef/ja_JP.eucJP.src Sat Nov 7 23:51:42 2015 (r290521) +++ head/share/timedef/ja_JP.eucJP.src Sat Nov 7 23:54:14 2015 (r290522) @@ -4,15 +4,15 @@ # ----------------------------------------------------------------------------- # # Short month names -1キ -2キ -3キ -4キ -5キ -6キ -7キ -8キ -9キ + 1キ + 2キ + 3キ + 4キ + 5キ + 6キ + 7キ + 8キ + 9キ 10キ 11キ 12キ Modified: head/share/timedef/ko_KR.UTF-8.src ============================================================================== --- head/share/timedef/ko_KR.UTF-8.src Sat Nov 7 23:51:42 2015 (r290521) +++ head/share/timedef/ko_KR.UTF-8.src Sat Nov 7 23:54:14 2015 (r290522) @@ -4,15 +4,15 @@ # ----------------------------------------------------------------------------- # # Short month names -1對 -2對 -3對 -4對 -5對 -6對 -7對 -8對 -9對 + 1對 + 2對 + 3對 + 4對 + 5對 + 6對 + 7對 + 8對 + 9對 10對 11對 12對 Modified: head/share/timedef/ko_KR.eucKR.src ============================================================================== --- head/share/timedef/ko_KR.eucKR.src Sat Nov 7 23:51:42 2015 (r290521) +++ head/share/timedef/ko_KR.eucKR.src Sat Nov 7 23:54:14 2015 (r290522) @@ -4,15 +4,15 @@ # ----------------------------------------------------------------------------- # # Short month names -1ソ -2ソ -3ソ -4ソ -5ソ -6ソ -7ソ -8ソ -9ソ + 1ソ + 2ソ + 3ソ + 4ソ + 5ソ + 6ソ + 7ソ + 8ソ + 9ソ 10ソ 11ソ 12ソ Modified: head/share/timedef/zh_Hans_CN.GBK.src ============================================================================== --- head/share/timedef/zh_Hans_CN.GBK.src Sat Nov 7 23:51:42 2015 (r290521) +++ head/share/timedef/zh_Hans_CN.GBK.src Sat Nov 7 23:54:14 2015 (r290522) @@ -4,15 +4,15 @@ # ----------------------------------------------------------------------------- # # Short month names -1ヤツ -2ヤツ -3ヤツ -4ヤツ -5ヤツ -6ヤツ -7ヤツ -8ヤツ -9ヤツ + 1ヤツ + 2ヤツ + 3ヤツ + 4ヤツ + 5ヤツ + 6ヤツ + 7ヤツ + 8ヤツ + 9ヤツ 10ヤツ 11ヤツ 12ヤツ Modified: head/share/timedef/zh_Hans_CN.UTF-8.src ============================================================================== Binary file (source and/or target). No diff available. Modified: head/share/timedef/zh_Hant_HK.Big5HKSCS.src ============================================================================== --- head/share/timedef/zh_Hant_HK.Big5HKSCS.src Sat Nov 7 23:51:42 2015 (r290521) +++ head/share/timedef/zh_Hant_HK.Big5HKSCS.src Sat Nov 7 23:54:14 2015 (r290522) @@ -4,15 +4,15 @@ # ----------------------------------------------------------------------------- # # Short month names -1、 -2、 -3、 -4、 -5、 -6、 -7、 -8、 -9、 + 1、 + 2、 + 3、 + 4、 + 5、 + 6、 + 7、 + 8、 + 9、 10、 11、 12、 Modified: head/share/timedef/zh_Hant_HK.UTF-8.src ============================================================================== --- head/share/timedef/zh_Hant_HK.UTF-8.src Sat Nov 7 23:51:42 2015 (r290521) +++ head/share/timedef/zh_Hant_HK.UTF-8.src Sat Nov 7 23:54:14 2015 (r290522) @@ -4,15 +4,15 @@ # ----------------------------------------------------------------------------- # # Short month names -1譛 -2譛 -3譛 -4譛 -5譛 -6譛 -7譛 -8譛 -9譛 + 1譛 + 2譛 + 3譛 + 4譛 + 5譛 + 6譛 + 7譛 + 8譛 + 9譛 10譛 11譛 12譛 Modified: head/share/timedef/zh_Hant_TW.UTF-8.src ============================================================================== --- head/share/timedef/zh_Hant_TW.UTF-8.src Sat Nov 7 23:51:42 2015 (r290521) +++ head/share/timedef/zh_Hant_TW.UTF-8.src Sat Nov 7 23:54:14 2015 (r290522) @@ -4,15 +4,15 @@ # ----------------------------------------------------------------------------- # # Short month names -1譛 -2譛 -3譛 -4譛 -5譛 -6譛 -7譛 -8譛 -9譛 + 1譛 + 2譛 + 3譛 + 4譛 + 5譛 + 6譛 + 7譛 + 8譛 + 9譛 10譛 11譛 12譛